diff --git a/src/LaunchConfiguration.ts b/src/LaunchConfiguration.ts index 14209221..05d7d0b3 100644 --- a/src/LaunchConfiguration.ts +++ b/src/LaunchConfiguration.ts @@ -260,9 +260,16 @@ export interface LaunchConfiguration extends DebugProtocol.LaunchRequestArgument /** * The path used for the staging folder of roku-deploy * This should generally be set to "${cwd}/.roku-deploy-staging", but that's ultimately up to the debug client. + * @deprecated use `stagingDir` instead */ stagingFolderPath?: string; + /** + * Path used for the staging folder where files are written right before being packaged. This folder will contain any roku-debug related sourcemaps, + * as well as having breakpoints injected into source code + */ + stagingDir?: string; + /** * What level of debug server's internal logging should be performed in the debug session */ diff --git a/src/debugSession/BrightScriptDebugSession.spec.ts b/src/debugSession/BrightScriptDebugSession.spec.ts index c69f9382..395b0a3a 100644 --- a/src/debugSession/BrightScriptDebugSession.spec.ts +++ b/src/debugSession/BrightScriptDebugSession.spec.ts @@ -64,7 +64,7 @@ describe('BrightScriptDebugSession', () => { launchConfiguration = { rootDir: rootDir, outDir: outDir, - stagingFolderPath: stagingDir, + stagingDir: stagingDir, files: DefaultFiles } as any; session['launchConfiguration'] = launchConfiguration; @@ -658,7 +658,7 @@ describe('BrightScriptDebugSession', () => { it('registers the entry breakpoint when stopOnEntry is enabled', async () => { (session as any).launchConfiguration = { stopOnEntry: true }; session.projectManager.mainProject = { - stagingFolderPath: stagingDir + stagingDir: stagingDir }; let stub = sinon.stub(session.projectManager, 'registerEntryBreakpoint').returns(Promise.resolve()); await session.handleEntryBreakpoint(); @@ -677,10 +677,10 @@ describe('BrightScriptDebugSession', () => { it('erases all staging folders when configured to do so', async () => { let stub = sinon.stub(fsExtra, 'removeSync').returns(null); session.projectManager.mainProject = { - stagingFolderPath: 'stagingPathA' + stagingDir: 'stagingPathA' }; session.projectManager.componentLibraryProjects.push({ - stagingFolderPath: 'stagingPathB' + stagingDir: 'stagingPathB' }); (session as any).launchConfiguration = { retainStagingFolder: false @@ -830,7 +830,7 @@ describe('BrightScriptDebugSession', () => { session.projectManager.componentLibraryProjects.push( new ComponentLibraryProject({ rootDir: complib1Dir, - stagingFolderPath: stagingDir, + stagingDir: stagingDir, outDir: outDir, libraryIndex: 1 } as Partial as any) diff --git a/src/debugSession/BrightScriptDebugSession.ts b/src/debugSession/BrightScriptDebugSession.ts index e7abae1b..962b3e7e 100644 --- a/src/debugSession/BrightScriptDebugSession.ts +++ b/src/debugSession/BrightScriptDebugSession.ts @@ -229,6 +229,7 @@ export class BrightScriptDebugSession extends BaseDebugSession { config.sceneGraphDebugCommandsPort ??= 8080; config.controlPort ??= 8081; config.brightScriptConsolePort ??= 8085; + config.stagingDir ??= config.stagingFolderPath; return config; } @@ -628,7 +629,7 @@ export class BrightScriptDebugSession extends BaseDebugSession { raleTrackerTaskFileLocation: this.launchConfiguration.raleTrackerTaskFileLocation, injectRdbOnDeviceComponent: this.launchConfiguration.injectRdbOnDeviceComponent, rdbFilesBasePath: this.launchConfiguration.rdbFilesBasePath, - stagingFolderPath: this.launchConfiguration.stagingFolderPath + stagingDir: this.launchConfiguration.stagingDir }); util.log('Moving selected files to staging area'); @@ -1439,7 +1440,7 @@ export class BrightScriptDebugSession extends BaseDebugSession { if (!this.enableDebugProtocol) { this.entryBreakpointWasHandled = true; if (this.launchConfiguration.stopOnEntry || this.launchConfiguration.deepLinkUrl) { - await this.projectManager.registerEntryBreakpoint(this.projectManager.mainProject.stagingFolderPath); + await this.projectManager.registerEntryBreakpoint(this.projectManager.mainProject.stagingDir); } } } @@ -1468,14 +1469,14 @@ export class BrightScriptDebugSession extends BaseDebugSession { //if configured, delete the staging directory if (!this.launchConfiguration.retainStagingFolder) { - const stagingFolders = this.projectManager?.getStagingFolderPaths() ?? []; - this.logger.info('deleting staging folders', stagingFolders); - for (let stagingFolderPath of stagingFolders) { + const stagingDirs = this.projectManager?.getStagingDirs() ?? []; + this.logger.info('deleting staging folders', stagingDirs); + for (let stagingDir of stagingDirs) { try { - fsExtra.removeSync(stagingFolderPath); + fsExtra.removeSync(stagingDir); } catch (e) { this.logger.error(e); - util.log(`Error removing staging directory '${stagingFolderPath}': ${JSON.stringify(e)}`); + util.log(`Error removing staging directory '${stagingDir}': ${JSON.stringify(e)}`); } } } diff --git a/src/managers/BreakpointManager.spec.ts b/src/managers/BreakpointManager.spec.ts index 746a611b..715e5ca0 100644 --- a/src/managers/BreakpointManager.spec.ts +++ b/src/managers/BreakpointManager.spec.ts @@ -388,7 +388,7 @@ describe('BreakpointManager', () => { await bpManager.writeBreakpointsForProject(new Project({ rootDir: rootDir, outDir: outDir, - stagingFolderPath: stagingDir + stagingDir: stagingDir })); //it wrote the breakpoint in the correct location @@ -429,7 +429,7 @@ describe('BreakpointManager', () => { rootDir: rootDir, outDir: s`${cwd}/out`, sourceDirs: [sourceDir1], - stagingFolderPath: stagingDir + stagingDir: stagingDir }) ); @@ -467,7 +467,7 @@ describe('BreakpointManager', () => { rootDir: rootDir, outDir: s`${cwd}/out`, sourceDirs: [sourceDir1, sourceDir2], - stagingFolderPath: stagingDir + stagingDir: stagingDir }) ); @@ -510,7 +510,7 @@ describe('BreakpointManager', () => { rootDir: rootDir, outDir: s`${cwd}/out`, sourceDirs: [sourceDir1, sourceDir2], - stagingFolderPath: stagingDir + stagingDir: stagingDir }) ); @@ -552,7 +552,7 @@ describe('BreakpointManager', () => { rootDir: rootDir, outDir: s`${cwd}/out`, sourceDirs: [sourceDir1, sourceDir2], - stagingFolderPath: stagingDir + stagingDir: stagingDir }) ); @@ -609,7 +609,7 @@ describe('BreakpointManager', () => { ], rootDir: s`${tmpDir}/dist`, outDir: s`${tmpDir}/out`, - stagingFolderPath: stagingDir + stagingDir: stagingDir })); //the breakpoints should be placed in the proper locations @@ -714,7 +714,7 @@ describe('BreakpointManager', () => { files: [ 'source/main.brs' ], - stagingFolderPath: stagingDir, + stagingDir: stagingDir, outDir: outDir, rootDir: rootDir })); @@ -726,7 +726,7 @@ describe('BreakpointManager', () => { lineNumber: 2, fileMappings: [], rootDir: rootDir, - stagingFolderPath: stagingDir, + stagingDir: stagingDir, enableSourceMaps: true }); @@ -775,7 +775,7 @@ describe('BreakpointManager', () => { files: [ 'source/main.brs' ], - stagingFolderPath: stagingDir, + stagingDir: stagingDir, outDir: outDir, rootDir: rootDir })); @@ -813,7 +813,7 @@ describe('BreakpointManager', () => { dest: '' } ], - stagingFolderPath: stagingDir, + stagingDir: stagingDir, outDir: outDir, rootDir: rootDir }); diff --git a/src/managers/BreakpointManager.ts b/src/managers/BreakpointManager.ts index be71a303..76824b67 100644 --- a/src/managers/BreakpointManager.ts +++ b/src/managers/BreakpointManager.ts @@ -368,7 +368,7 @@ export class BreakpointManager { ...project?.sourceDirs ?? [], project.rootDir ], - project.stagingFolderPath, + project.stagingDir, project.fileMappings ); @@ -376,7 +376,7 @@ export class BreakpointManager { let relativeStagingPath = fileUtils.replaceCaseInsensitive( stagingLocation.filePath, fileUtils.standardizePath( - fileUtils.removeTrailingSlash(project.stagingFolderPath) + '/' + fileUtils.removeTrailingSlash(project.stagingDir) + '/' ), '' ); @@ -384,7 +384,7 @@ export class BreakpointManager { //replace staging folder path with nothing (so we can build a pkg path) .replaceCaseInsensitive( s`${stagingLocation.filePath}`, - s`${project.stagingFolderPath}`, + s`${project.stagingDir}`, '' ) //force to unix path separators diff --git a/src/managers/LocationManager.spec.ts b/src/managers/LocationManager.spec.ts index 8387a665..ca2294ac 100644 --- a/src/managers/LocationManager.spec.ts +++ b/src/managers/LocationManager.spec.ts @@ -52,7 +52,7 @@ describe('LocationManager', () => { let location = await locationManager.getSourceLocation({ stagingFilePath: stagingFilePath, - stagingFolderPath: stagingDir, + stagingDir: stagingDir, fileMappings: [], rootDir: rootDir, lineNumber: 1, @@ -76,7 +76,7 @@ describe('LocationManager', () => { let location = await locationManager.getSourceLocation({ stagingFilePath: s`${stagingDir}/lib1.brs`, - stagingFolderPath: stagingDir, + stagingDir: stagingDir, fileMappings: [{ src: s`${rootDir}/lib1.brs`, dest: s`${stagingDir}/lib1.brs` @@ -116,7 +116,7 @@ describe('LocationManager', () => { let location = await locationManager.getSourceLocation({ stagingFilePath: stagingFilePath, - stagingFolderPath: stagingDir, + stagingDir: stagingDir, fileMappings: [], rootDir: rootDir, lineNumber: 3, @@ -142,7 +142,7 @@ describe('LocationManager', () => { let location = await locationManager.getSourceLocation({ stagingFilePath: s`${stagingDir}/lib1.brs`, - stagingFolderPath: stagingDir, + stagingDir: stagingDir, fileMappings: [{ src: s`${sourceDirs[0]}/lib1.brs`, dest: '/lib1.brs' @@ -169,7 +169,7 @@ describe('LocationManager', () => { let location = await locationManager.getSourceLocation({ stagingFilePath: s`${stagingDir}/lib1.brs`, - stagingFolderPath: stagingDir, + stagingDir: stagingDir, fileMappings: [{ src: s`${sourceDirs[1]}/lib1.brs`, dest: '/lib1.brs' @@ -195,7 +195,7 @@ describe('LocationManager', () => { let location = await locationManager.getSourceLocation({ stagingFilePath: s`${stagingDir}/lib1.brs`, - stagingFolderPath: stagingDir, + stagingDir: stagingDir, fileMappings: [{ src: s`${sourceDirs[2]}/lib1.brs`, dest: '/lib1.brs' diff --git a/src/managers/LocationManager.ts b/src/managers/LocationManager.ts index 91a712ec..e0433898 100644 --- a/src/managers/LocationManager.ts +++ b/src/managers/LocationManager.ts @@ -18,7 +18,7 @@ export class LocationManager { */ public async getSourceLocation(options: GetSourceLocationOptions): Promise { let rootDir = s`${options.rootDir}`; - let stagingFolderPath = s`${options.stagingFolderPath}`; + let stagingDir = s`${options.stagingDir}`; let currentFilePath = s`${options.stagingFilePath}`; let sourceDirs = options.sourceDirs ? options.sourceDirs.map(x => s`${x}`) : []; //throw out any sourceDirs pointing the rootDir @@ -62,7 +62,7 @@ export class LocationManager { //if we have sourceDirs, rootDir is the project's OUTPUT folder, so skip looking for files there, and //instead walk backwards through sourceDirs until we find the file we want if (sourceDirs.length > 0) { - let relativeFilePath = fileUtils.getRelativePath(stagingFolderPath, currentFilePath); + let relativeFilePath = fileUtils.getRelativePath(stagingDir, currentFilePath); let sourceDirsFilePath = await fileUtils.findFirstRelativeFile(relativeFilePath, sourceDirs); //if we found a file in one of the sourceDirs, use that if (sourceDirsFilePath) { @@ -104,18 +104,18 @@ export class LocationManager { sourceLineNumber: number, sourceColumnIndex: number, sourceDirs: string[], - stagingFolderPath: string, + stagingDir: string, fileMappings: Array<{ src: string; dest: string }> ): Promise<{ type: 'fileMap' | 'sourceDirs' | 'sourceMap'; locations: SourceLocation[] }> { sourceFilePath = s`${sourceFilePath}`; sourceDirs = sourceDirs.map(x => s`${x}`); - stagingFolderPath = s`${stagingFolderPath}`; + stagingDir = s`${stagingDir}`; //look through the sourcemaps in the staging folder for any instances of this source location let locations = await this.sourceMapManager.getGeneratedLocations( glob.sync('**/*.map', { - cwd: stagingFolderPath, + cwd: stagingDir, absolute: true }), { @@ -141,7 +141,7 @@ export class LocationManager { let parentFolderPath = fileUtils.findFirstParent(sourceFilePath, sourceDirs); if (parentFolderPath) { let relativeFilePath = fileUtils.replaceCaseInsensitive(sourceFilePath, parentFolderPath, ''); - let stagingFilePathAbsolute = path.join(stagingFolderPath, relativeFilePath); + let stagingFilePathAbsolute = path.join(stagingDir, relativeFilePath); return { type: 'sourceDirs', locations: [{ @@ -180,7 +180,7 @@ export interface GetSourceLocationOptions { /** * The absolute path to the staging folder */ - stagingFolderPath: string; + stagingDir: string; /** * The absolute path to the file in the staging folder diff --git a/src/managers/ProjectManager.spec.ts b/src/managers/ProjectManager.spec.ts index e86b92ee..cf1c4d44 100644 --- a/src/managers/ProjectManager.spec.ts +++ b/src/managers/ProjectManager.spec.ts @@ -19,9 +19,9 @@ let cwd = fileUtils.standardizePath(process.cwd()); let tempPath = s`${cwd}/.tmp`; let rootDir = s`${tempPath}/rootDir`; let outDir = s`${tempPath}/outDir`; -let stagingFolderPath = s`${outDir}/stagingDir`; +let stagingDir = s`${outDir}/stagingDir`; let compLibOutDir = s`${outDir}/component-libraries`; -let compLibStagingFolderPath = s`${rootDir}/component-libraries/CompLibA`; +let compLibstagingDir = s`${rootDir}/component-libraries/CompLibA`; beforeEach(() => { fsExtra.ensureDirSync(tempPath); @@ -44,10 +44,10 @@ describe('ProjectManager', () => { manager = new ProjectManager(breakpointManager, locationManager); manager.mainProject = { - stagingFolderPath: stagingFolderPath + stagingDir: stagingDir }; manager.componentLibraryProjects.push({ - stagingFolderPath: compLibStagingFolderPath, + stagingDir: compLibstagingDir, libraryIndex: 1, outDir: compLibOutDir }); @@ -173,7 +173,7 @@ describe('ProjectManager', () => { expect( await manager.getStagingFileInfo('pkg:/source/main.brs') ).to.include({ - absolutePath: s`${stagingFolderPath}/source/main.brs`, + absolutePath: s`${stagingDir}/source/main.brs`, //the relative path should not include a leading slash relativePath: s`source/main.brs` }); @@ -182,13 +182,13 @@ describe('ProjectManager', () => { it(`searches for partial files in main project when '...' is encountered`, async () => { let stub = sinon.stub(fileUtils, 'findPartialFileInDirectory').callsFake((partialFilePath, directoryPath) => { expect(partialFilePath).to.equal('...ource/main.brs'); - expect(directoryPath).to.equal(manager.mainProject.stagingFolderPath); + expect(directoryPath).to.equal(manager.mainProject.stagingDir); return Promise.resolve(`source/main.brs`); }); expect( (await manager.getStagingFileInfo('...ource/main.brs')).absolutePath ).to.equal( - s`${stagingFolderPath}/source/main.brs` + s`${stagingDir}/source/main.brs` ); expect(stub.called).to.be.true; }); @@ -197,20 +197,20 @@ describe('ProjectManager', () => { expect( (await manager.getStagingFileInfo('pkg:/source/main__lib1.brs')).absolutePath ).to.equal( - s`${compLibStagingFolderPath}/source/main__lib1.brs` + s`${compLibstagingDir}/source/main__lib1.brs` ); }); it(`detects partial paths to component library filenames`, async () => { let stub = sinon.stub(fileUtils, 'findPartialFileInDirectory').callsFake((partialFilePath, directoryPath) => { expect(partialFilePath).to.equal('...ource/main__lib1.brs'); - expect(directoryPath).to.equal(manager.componentLibraryProjects[0].stagingFolderPath); + expect(directoryPath).to.equal(manager.componentLibraryProjects[0].stagingDir); return Promise.resolve(`source/main__lib1.brs`); }); let info = await manager.getStagingFileInfo('...ource/main__lib1.brs'); expect(info).to.deep.include({ relativePath: s`source/main__lib1.brs`, - absolutePath: s`${compLibStagingFolderPath}/source/main__lib1.brs` + absolutePath: s`${compLibstagingDir}/source/main__lib1.brs` }); expect(info.project).to.include({ outDir: compLibOutDir @@ -224,7 +224,7 @@ describe('ProjectManager', () => { it(`does not crash when file is missing`, async () => { manager.mainProject.fileMappings = []; let sourceLocation = await manager.getSourceLocation('pkg:/source/file-we-dont-know-about.brs', 1); - expect(n(sourceLocation.filePath)).to.equal(n(`${stagingFolderPath}/source/file-we-dont-know-about.brs`)); + expect(n(sourceLocation.filePath)).to.equal(n(`${stagingDir}/source/file-we-dont-know-about.brs`)); }); it('handles truncated paths', async () => { @@ -241,13 +241,13 @@ describe('ProjectManager', () => { 'source/file2.brs' ])); manager.mainProject.rootDir = rootDir; - manager.mainProject.stagingFolderPath = stagingFolderPath; + manager.mainProject.stagingDir = stagingDir; manager.mainProject.fileMappings = [{ src: s`${rootDir}/source/file1.brs`, - dest: s`${stagingFolderPath}/source/file1.brs` + dest: s`${stagingDir}/source/file1.brs` }, { src: s`${rootDir}/source/file2.brs`, - dest: s`${stagingFolderPath}/source/file2.brs` + dest: s`${stagingDir}/source/file2.brs` }]; let sourceLocation = await manager.getSourceLocation('...rce/file1.brs', 1); @@ -268,13 +268,13 @@ describe('ProjectManager', () => { } }); manager.mainProject.rootDir = rootDir; - manager.mainProject.stagingFolderPath = stagingFolderPath; + manager.mainProject.stagingDir = stagingDir; manager.mainProject.fileMappings = [{ src: s`${rootDir}/source/file1.brs`, - dest: s`${stagingFolderPath}/source/file1.brs` + dest: s`${stagingDir}/source/file1.brs` }, { src: s`${rootDir}/source/file2.brs`, - dest: s`${stagingFolderPath}/source/file2.brs` + dest: s`${stagingDir}/source/file2.brs` }]; let sourceLocation = await manager.getSourceLocation('pkg:source/file1.brs', 1); @@ -304,7 +304,7 @@ describe('Project', () => { injectRdbOnDeviceComponent: true, rdbFilesBasePath: rdbFilesBasePath, sourceDirs: [s`${cwd}/source1`], - stagingFolderPath: stagingFolderPath, + stagingDir: stagingDir, raleTrackerTaskFileLocation: 'z' }); }); @@ -320,7 +320,7 @@ describe('Project', () => { expect(project.injectRaleTrackerTask).to.equal(true); expect(project.outDir).to.eql(outDir); expect(project.sourceDirs).to.eql([s`${cwd}/source1`]); - expect(project.stagingFolderPath).to.eql(stagingFolderPath); + expect(project.stagingDir).to.eql(stagingDir); expect(project.raleTrackerTaskFileLocation).to.eql('z'); expect(project.injectRdbOnDeviceComponent).to.equal(true); expect(project.rdbFilesBasePath).to.eql(rdbFilesBasePath); @@ -336,17 +336,17 @@ describe('Project', () => { project.raleTrackerTaskFileLocation = undefined; project.rootDir = rootDir; project.outDir = outDir; - project.stagingFolderPath = stagingFolderPath; + project.stagingDir = stagingDir; fsExtra.ensureDirSync(project.rootDir); fsExtra.ensureDirSync(project.outDir); - fsExtra.ensureDirSync(project.stagingFolderPath); + fsExtra.ensureDirSync(project.stagingDir); fsExtra.writeFileSync(s`${project.rootDir}/manifest`, 'bs_const=b=true'); project.files = [ 'manifest' ]; await project.stage(); - expect(fsExtra.pathExistsSync(`${stagingFolderPath}/manifest`)).to.be.true; + expect(fsExtra.pathExistsSync(`${stagingDir}/manifest`)).to.be.true; }); }); @@ -443,7 +443,7 @@ describe('Project', () => { let filePath = s`${folder}/main.${fileExt}`; fsExtra.writeFileSync(filePath, fileContents); - project.stagingFolderPath = folder; + project.stagingDir = folder; project.injectRaleTrackerTask = true; //these file contents don't actually matter project.raleTrackerTaskFileLocation = raleTrackerTaskFileLocation; @@ -456,7 +456,7 @@ describe('Project', () => { fsExtra.ensureDirSync(tempPath); fsExtra.writeFileSync(`${tempPath}/RALE.xml`, 'test contents'); await doTest(`sub main()\nend sub`, `sub main()\nend sub`); - expect(fsExtra.pathExistsSync(s`${project.stagingFolderPath}/components/TrackerTask.xml`), 'TrackerTask.xml was not copied to staging').to.be.true; + expect(fsExtra.pathExistsSync(s`${project.stagingDir}/components/TrackerTask.xml`), 'TrackerTask.xml was not copied to staging').to.be.true; }); it('works for inline comments brs files', async () => { @@ -556,7 +556,7 @@ describe('Project', () => { let filePath = s`${folder}/main.${fileExt}`; fsExtra.writeFileSync(filePath, fileContents); - project.stagingFolderPath = folder; + project.stagingDir = folder; project.injectRdbOnDeviceComponent = injectRdbOnDeviceComponent; project.rdbFilesBasePath = rdbFilesBasePath; await project.copyAndTransformRDB(); @@ -567,8 +567,8 @@ describe('Project', () => { it('copies the RDB files', async () => { fsExtra.ensureDirSync(tempPath); await doTest(`sub main()\nend sub`, `sub main()\nend sub`); - expect(fsExtra.pathExistsSync(s`${project.stagingFolderPath}/${sourceFileRelativePath}`), `${sourceFileRelativePath} was not copied to staging`).to.be.true; - expect(fsExtra.pathExistsSync(s`${project.stagingFolderPath}/${componentsFileRelativePath}`), `${componentsFileRelativePath} was not copied to staging`).to.be.true; + expect(fsExtra.pathExistsSync(s`${project.stagingDir}/${sourceFileRelativePath}`), `${sourceFileRelativePath} was not copied to staging`).to.be.true; + expect(fsExtra.pathExistsSync(s`${project.stagingDir}/${componentsFileRelativePath}`), `${componentsFileRelativePath} was not copied to staging`).to.be.true; }); it('works for inline comments brs files', async () => { @@ -587,8 +587,8 @@ describe('Project', () => { // let brsSample = `\nsub main()\n screen.show\n ' ${Project.RDB_ODC_ENTRY}\nend sub`; // project.injectRdbOnDeviceComponent = false // await doTest(brsSample, brsSample, 'brs', false); - // expect(fsExtra.pathExistsSync(s`${project.stagingFolderPath}/${sourceFileRelativePath}`), `${sourceFileRelativePath} should not have been copied to staging`).to.be.false; - // expect(fsExtra.pathExistsSync(s`${project.stagingFolderPath}/${componentsFileRelativePath}`), `${componentsFileRelativePath} should not have been copied to staging`).to.be.false; + // expect(fsExtra.pathExistsSync(s`${project.stagingDir}/${sourceFileRelativePath}`), `${sourceFileRelativePath} should not have been copied to staging`).to.be.false; + // expect(fsExtra.pathExistsSync(s`${project.stagingDir}/${componentsFileRelativePath}`), `${componentsFileRelativePath} should not have been copied to staging`).to.be.false; // }); it('works for in line comments in xml files', async () => { @@ -652,9 +652,9 @@ describe('Project', () => { describe('zipPackage', () => { it('excludes sourcemaps', async () => { - fsExtra.outputFileSync(`${project.stagingFolderPath}/manifest`, '#stuff'); - fsExtra.outputFileSync(`${project.stagingFolderPath}/source/main.brs`, 'sub main() : end sub'); - fsExtra.outputFileSync(`${project.stagingFolderPath}/source/main.brs.map`, '{}'); + fsExtra.outputFileSync(`${project.stagingDir}/manifest`, '#stuff'); + fsExtra.outputFileSync(`${project.stagingDir}/source/main.brs`, 'sub main() : end sub'); + fsExtra.outputFileSync(`${project.stagingDir}/source/main.brs.map`, '{}'); await project.zipPackage({ retainStagingFolder: true }); const zipPath = path.join( project.outDir, @@ -680,7 +680,7 @@ describe('ComponentLibraryProject', () => { bsConst: { b: true }, injectRaleTrackerTask: true, sourceDirs: [s`${tempPath}/source1`], - stagingFolderPath: s`${outDir}/complib1-staging`, + stagingDir: s`${outDir}/complib1-staging`, raleTrackerTaskFileLocation: 'z', libraryIndex: 0, outFile: 'PrettyComponent.zip' @@ -700,8 +700,8 @@ describe('ComponentLibraryProject', () => { it('adds postfix if path is 1) pkg:/ or 2) relative - no spaces in url', async () => { let project = new ComponentLibraryProject(params); project.fileMappings = []; - fsExtra.outputFileSync(`${params.stagingFolderPath}/source/main.brs`, ''); - fsExtra.outputFileSync(`${params.stagingFolderPath}/components/Component1.xml`, ` + fsExtra.outputFileSync(`${params.stagingDir}/source/main.brs`, ''); + fsExtra.outputFileSync(`${params.stagingDir}/components/Component1.xml`, `