Skip to content

Commit

Permalink
Add necessary ids for initial import to metadata json.
Browse files Browse the repository at this point in the history
  • Loading branch information
Patrick Murrell committed Mar 21, 2023
1 parent 68f10b4 commit 2381e48
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/services/workspace-service-multiple-files.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,12 @@ export class WorkspaceServiceMultipleFiles extends WorkspaceServiceBase {
await writeFile(resourceFilePath, WorkspaceServiceBase.stringifyExportData(resource), {encoding: 'utf8'})
}

data.resources = []
data.resources = data.resources.filter(x => x._id.startsWith('wrk') || (x._id.startsWith('spc') || (x._id.startsWith('env') && x.name === "Base Environment")))
data.resources.forEach(resource => {
if(resource?.contents) resource.contents = "";
if(resource?.data) resource.data = {};
if(resource?.dataPropertyOrder) resource.dataPropertyOrder = {};
})
await writeFile(
path.join(configuration.filePath!, WorkspaceServiceMultipleFiles.metaFileName),
WorkspaceServiceBase.stringifyExportData(data), {encoding: 'utf8'},
Expand Down

0 comments on commit 2381e48

Please sign in to comment.