Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/shared/configUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export class ConfigUtils {
}

public static async getCertData(): Promise<SSLCertificateData | undefined> {
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 = {
Expand Down
18 changes: 8 additions & 10 deletions src/shared/previewUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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 };
Expand Down
12 changes: 6 additions & 6 deletions test/shared/previewUtils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
]);
});

Expand Down