|
|
@ -52,7 +52,7 @@ export class FoundryClient extends PluginClient { |
|
|
|
listenOnFoundryFolder() { |
|
|
|
listenOnFoundryFolder() { |
|
|
|
console.log('Foundry out folder doesn\'t exist... waiting for the compilation.') |
|
|
|
console.log('Foundry out folder doesn\'t exist... waiting for the compilation.') |
|
|
|
try { |
|
|
|
try { |
|
|
|
if(this.watcher) this.watcher.close() |
|
|
|
if (this.watcher) this.watcher.close() |
|
|
|
this.watcher = chokidar.watch(this.currentSharedFolder, { depth: 1, ignorePermissionErrors: true, ignoreInitial: true }) |
|
|
|
this.watcher = chokidar.watch(this.currentSharedFolder, { depth: 1, ignorePermissionErrors: true, ignoreInitial: true }) |
|
|
|
// watch for new folders
|
|
|
|
// watch for new folders
|
|
|
|
this.watcher.on('addDir', () => { |
|
|
|
this.watcher.on('addDir', () => { |
|
|
@ -126,7 +126,7 @@ export class FoundryClient extends PluginClient { |
|
|
|
this.logTimeout = setTimeout(() => { |
|
|
|
this.logTimeout = setTimeout(() => { |
|
|
|
// @ts-ignore
|
|
|
|
// @ts-ignore
|
|
|
|
this.call('terminal', 'log', { type: 'log', value: `receiving compilation result from Foundry` }) |
|
|
|
this.call('terminal', 'log', { type: 'log', value: `receiving compilation result from Foundry` }) |
|
|
|
console.log('Syncing compilation result from Foundry')
|
|
|
|
console.log('Syncing compilation result from Foundry') |
|
|
|
}, 1000) |
|
|
|
}, 1000) |
|
|
|
|
|
|
|
|
|
|
|
} catch (e) { |
|
|
|
} catch (e) { |
|
|
@ -142,7 +142,7 @@ export class FoundryClient extends PluginClient { |
|
|
|
|
|
|
|
|
|
|
|
listenOnFoundryCompilation() { |
|
|
|
listenOnFoundryCompilation() { |
|
|
|
try { |
|
|
|
try { |
|
|
|
if(this.watcher) this.watcher.close() |
|
|
|
if (this.watcher) this.watcher.close() |
|
|
|
this.watcher = chokidar.watch(this.cachePath, { depth: 0, ignorePermissionErrors: true, ignoreInitial: true }) |
|
|
|
this.watcher = chokidar.watch(this.cachePath, { depth: 0, ignorePermissionErrors: true, ignoreInitial: true }) |
|
|
|
this.watcher.on('change', async () => await this.triggerProcessArtifact()) |
|
|
|
this.watcher.on('change', async () => await this.triggerProcessArtifact()) |
|
|
|
this.watcher.on('add', async () => await this.triggerProcessArtifact()) |
|
|
|
this.watcher.on('add', async () => await this.triggerProcessArtifact()) |
|
|
@ -193,7 +193,6 @@ export class FoundryClient extends PluginClient { |
|
|
|
console.log('\x1b[32m%s\x1b[0m', 'sources input not found, please update Foundry to the latest version.') |
|
|
|
console.log('\x1b[32m%s\x1b[0m', 'sources input not found, please update Foundry to the latest version.') |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
compilationResultPart.compilationTarget = contentJSON.ast.absolutePath |
|
|
|
compilationResultPart.compilationTarget = contentJSON.ast.absolutePath |
|
|
|
// extract data
|
|
|
|
// extract data
|
|
|
|
if (!compilationResultPart.output['sources'][contentJSON.ast.absolutePath]) compilationResultPart.output['sources'][contentJSON.ast.absolutePath] = {} |
|
|
|
if (!compilationResultPart.output['sources'][contentJSON.ast.absolutePath]) compilationResultPart.output['sources'][contentJSON.ast.absolutePath] = {} |
|
|
|