Skip to content

Commit 6206030

Browse files
authored
fix: remove 0. for mobile launch params (#107)
* fix: remove 0. for mobile launch params * ci: Move UT_DISABLE_NODE_CURRENT from env to var
1 parent b71f788 commit 6206030

File tree

4 files changed

+15
-20
lines changed

4 files changed

+15
-20
lines changed

.github/workflows/test.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@ on:
44
branches-ignore: [main]
55
workflow_dispatch:
66

7-
env:
8-
UT_DISABLE_NODE_CURRENT: true
9-
107
jobs:
118
yarn-lockfile-check:
129
uses: salesforcecli/github-workflows/.github/workflows/lockFileCheck.yml@main

src/shared/configUtils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ export class ConfigUtils {
7676
}
7777

7878
public static async getCertData(): Promise<SSLCertificateData | undefined> {
79-
const config = await this.getLocalConfig();
79+
const config = await this.getGlobalConfig();
8080
const serializedData = config.get(ConfigVars.LOCAL_DEV_SERVER_HTTPS_CERT_DATA) as SerializedSSLCertificateData;
8181
if (serializedData) {
8282
const deserializedData: SSLCertificateData = {

src/shared/previewUtils.ts

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -222,11 +222,11 @@ export class PreviewUtils {
222222
launchArguments.push({ name: 'LightningExperienceAppID', value: appId });
223223
}
224224

225-
launchArguments.push({ name: '0.aura.ldpServerUrl', value: ldpServerUrl });
225+
launchArguments.push({ name: 'aura.ldpServerUrl', value: ldpServerUrl });
226226

227-
launchArguments.push({ name: '0.aura.mode', value: auraMode });
227+
launchArguments.push({ name: 'aura.mode', value: auraMode });
228228

229-
launchArguments.push({ name: '0.aura.ldpServerId', value: entityId });
229+
launchArguments.push({ name: 'aura.ldpServerId', value: entityId });
230230

231231
return launchArguments;
232232
}
@@ -255,13 +255,11 @@ export class PreviewUtils {
255255
const targetFile =
256256
platform === Platform.ios ? path.join(basePath, 'localhost.der') : path.join(basePath, 'localhost.pem');
257257

258-
// If we have not previously generated the cert files then go ahead and do so
259-
if (!fs.existsSync(targetFile)) {
260-
if (platform === Platform.ios) {
261-
fs.writeFileSync(targetFile, data.derCertificate);
262-
} else {
263-
fs.writeFileSync(targetFile, data.pemCertificate);
264-
}
258+
// save to file
259+
if (platform === Platform.ios) {
260+
fs.writeFileSync(targetFile, data.derCertificate);
261+
} else {
262+
fs.writeFileSync(targetFile, data.pemCertificate);
265263
}
266264

267265
return { certData: data, certFilePath: targetFile };

test/shared/previewUtils.test.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -160,15 +160,15 @@ describe('previewUtils', () => {
160160
).to.deep.equal([
161161
{ name: 'LightningExperienceAppName', value: 'MyAppName' },
162162
{ name: 'LightningExperienceAppID', value: 'MyAppId' },
163-
{ name: '0.aura.ldpServerUrl', value: 'MyLdpServerUrl' },
164-
{ name: '0.aura.mode', value: 'MyAuraMode' },
165-
{ name: '0.aura.ldpServerId', value: fakeEntityId },
163+
{ name: 'aura.ldpServerUrl', value: 'MyLdpServerUrl' },
164+
{ name: 'aura.mode', value: 'MyAuraMode' },
165+
{ name: 'aura.ldpServerId', value: fakeEntityId },
166166
]);
167167

168168
expect(PreviewUtils.generateMobileAppPreviewLaunchArguments('MyLdpServerUrl', fakeEntityId)).to.deep.equal([
169-
{ name: '0.aura.ldpServerUrl', value: 'MyLdpServerUrl' },
170-
{ name: '0.aura.mode', value: 'DEVPREVIEW' },
171-
{ name: '0.aura.ldpServerId', value: fakeEntityId },
169+
{ name: 'aura.ldpServerUrl', value: 'MyLdpServerUrl' },
170+
{ name: 'aura.mode', value: 'DEVPREVIEW' },
171+
{ name: 'aura.ldpServerId', value: fakeEntityId },
172172
]);
173173
});
174174

0 commit comments

Comments
 (0)