Skip to content

Commit

Permalink
minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
NickRimmer committed Jun 27, 2023
1 parent 2381e48 commit a712941
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/services/workspace-service-multiple-files.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,18 @@ export class WorkspaceServiceMultipleFiles extends WorkspaceServiceBase {
await writeFile(resourceFilePath, WorkspaceServiceBase.stringifyExportData(resource), {encoding: 'utf8'})
}

data.resources = data.resources.filter(x => x._id.startsWith('wrk') || (x._id.startsWith('spc') || (x._id.startsWith('env') && x.name === "Base Environment")))
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 a712941

Please sign in to comment.