|
|
|
@ -50,7 +50,9 @@ export class CompilerMetadata extends Plugin { |
|
|
|
|
// Access each file in build-info, check the input sources
|
|
|
|
|
// If they are all same as in current compiled file and sources includes the path of compiled file, remove old build file
|
|
|
|
|
async removeStoredBuildInfo (currentInput, path, filePath) { |
|
|
|
|
const allBuildFiles = await this.call('fileManager', 'fileList', this.joinPath(path, this.innerPath, 'build-info/')) |
|
|
|
|
const buildDir = this.joinPath(path, this.innerPath, 'build-info/') |
|
|
|
|
if (await this.call('fileManager', 'exists', buildDir)) { |
|
|
|
|
const allBuildFiles = await this.call('fileManager', 'fileList', buildDir) |
|
|
|
|
const currentInputFileNames = Object.keys(currentInput.sources) |
|
|
|
|
for (const fileName of allBuildFiles) { |
|
|
|
|
let fileContent = await this.call('fileManager', 'readFile', fileName) |
|
|
|
@ -60,6 +62,7 @@ export class CompilerMetadata extends Plugin { |
|
|
|
|
if (inputIntersection.length === 0 && inputFiles.includes(filePath)) await this.call('fileManager', 'remove', fileName) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
async setBuildInfo (version, input, output, path, filePath) { |
|
|
|
|
input = JSON.parse(input) |
|
|
|
|