diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0c5292bd..04639c09 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -4,9 +4,6 @@ on: branches-ignore: [main] workflow_dispatch: -env: - UT_DISABLE_NODE_CURRENT: true - jobs: yarn-lockfile-check: uses: salesforcecli/github-workflows/.github/workflows/lockFileCheck.yml@main diff --git a/src/shared/configUtils.ts b/src/shared/configUtils.ts index 6e2cbfb2..9b94347e 100644 --- a/src/shared/configUtils.ts +++ b/src/shared/configUtils.ts @@ -76,7 +76,7 @@ export class ConfigUtils { } public static async getCertData(): Promise { - const config = await this.getLocalConfig(); + const config = await this.getGlobalConfig(); const serializedData = config.get(ConfigVars.LOCAL_DEV_SERVER_HTTPS_CERT_DATA) as SerializedSSLCertificateData; if (serializedData) { const deserializedData: SSLCertificateData = { diff --git a/src/shared/previewUtils.ts b/src/shared/previewUtils.ts index 908f6f8e..040705b5 100644 --- a/src/shared/previewUtils.ts +++ b/src/shared/previewUtils.ts @@ -222,11 +222,11 @@ export class PreviewUtils { launchArguments.push({ name: 'LightningExperienceAppID', value: appId }); } - launchArguments.push({ name: '0.aura.ldpServerUrl', value: ldpServerUrl }); + launchArguments.push({ name: 'aura.ldpServerUrl', value: ldpServerUrl }); - launchArguments.push({ name: '0.aura.mode', value: auraMode }); + launchArguments.push({ name: 'aura.mode', value: auraMode }); - launchArguments.push({ name: '0.aura.ldpServerId', value: entityId }); + launchArguments.push({ name: 'aura.ldpServerId', value: entityId }); return launchArguments; } @@ -255,13 +255,11 @@ export class PreviewUtils { const targetFile = platform === Platform.ios ? path.join(basePath, 'localhost.der') : path.join(basePath, 'localhost.pem'); - // If we have not previously generated the cert files then go ahead and do so - if (!fs.existsSync(targetFile)) { - if (platform === Platform.ios) { - fs.writeFileSync(targetFile, data.derCertificate); - } else { - fs.writeFileSync(targetFile, data.pemCertificate); - } + // save to file + if (platform === Platform.ios) { + fs.writeFileSync(targetFile, data.derCertificate); + } else { + fs.writeFileSync(targetFile, data.pemCertificate); } return { certData: data, certFilePath: targetFile }; diff --git a/test/shared/previewUtils.test.ts b/test/shared/previewUtils.test.ts index 3c51a073..302649bc 100644 --- a/test/shared/previewUtils.test.ts +++ b/test/shared/previewUtils.test.ts @@ -160,15 +160,15 @@ describe('previewUtils', () => { ).to.deep.equal([ { name: 'LightningExperienceAppName', value: 'MyAppName' }, { name: 'LightningExperienceAppID', value: 'MyAppId' }, - { name: '0.aura.ldpServerUrl', value: 'MyLdpServerUrl' }, - { name: '0.aura.mode', value: 'MyAuraMode' }, - { name: '0.aura.ldpServerId', value: fakeEntityId }, + { name: 'aura.ldpServerUrl', value: 'MyLdpServerUrl' }, + { name: 'aura.mode', value: 'MyAuraMode' }, + { name: 'aura.ldpServerId', value: fakeEntityId }, ]); expect(PreviewUtils.generateMobileAppPreviewLaunchArguments('MyLdpServerUrl', fakeEntityId)).to.deep.equal([ - { name: '0.aura.ldpServerUrl', value: 'MyLdpServerUrl' }, - { name: '0.aura.mode', value: 'DEVPREVIEW' }, - { name: '0.aura.ldpServerId', value: fakeEntityId }, + { name: 'aura.ldpServerUrl', value: 'MyLdpServerUrl' }, + { name: 'aura.mode', value: 'DEVPREVIEW' }, + { name: 'aura.ldpServerId', value: fakeEntityId }, ]); });