|
|
|
@ -50,10 +50,10 @@ class WorkspaceFileProvider extends FileProvider { |
|
|
|
|
|
|
|
|
|
async copyFolderToJson (directory, visitFile) { |
|
|
|
|
visitFile = visitFile || (() => {}) |
|
|
|
|
const regex = new RegExp(`.workspaces/${this.workspace}/`, 'g'); |
|
|
|
|
const regex = new RegExp(`.workspaces/${this.workspace}/`, 'g') |
|
|
|
|
let json = await super._copyFolderToJsonInternal(directory, ({ path, content }) => { |
|
|
|
|
visitFile({ path: path.replace(regex, ''), content }) |
|
|
|
|
})
|
|
|
|
|
}) |
|
|
|
|
json = JSON.stringify(json).replace(regex, '') |
|
|
|
|
return JSON.parse(json) |
|
|
|
|
} |
|
|
|
|