@salesforce/plugin-lightning-dev 3.2.6 → 3.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/lib/commands/lightning/dev/component.js +35 -30
- package/lib/commands/lightning/dev/component.js.map +1 -1
- package/lib/shared/componentUtils.d.ts +15 -0
- package/lib/shared/componentUtils.js +46 -0
- package/lib/shared/componentUtils.js.map +1 -0
- package/lib/shared/promptUtils.js +1 -1
- package/lib/shared/promptUtils.js.map +1 -1
- package/messages/lightning.dev.component.md +8 -0
- package/npm-shrinkwrap.json +15 -3
- package/oclif.lock +7 -0
- package/oclif.manifest.json +1 -1
- package/package.json +6 -4
package/README.md
CHANGED
|
@@ -201,7 +201,7 @@ EXAMPLES
|
|
|
201
201
|
$ sf lightning dev app --target-org myOrg --device-type ios --device-id "iPhone 15 Pro Max"
|
|
202
202
|
```
|
|
203
203
|
|
|
204
|
-
_See code: [src/commands/lightning/dev/app.ts](https://github.com/salesforcecli/plugin-lightning-dev/blob/3.2.
|
|
204
|
+
_See code: [src/commands/lightning/dev/app.ts](https://github.com/salesforcecli/plugin-lightning-dev/blob/3.2.7/src/commands/lightning/dev/app.ts)_
|
|
205
205
|
|
|
206
206
|
## `sf lightning dev component`
|
|
207
207
|
|
|
@@ -246,7 +246,7 @@ EXAMPLES
|
|
|
246
246
|
$ sf lightning dev component --name myComponent
|
|
247
247
|
```
|
|
248
248
|
|
|
249
|
-
_See code: [src/commands/lightning/dev/component.ts](https://github.com/salesforcecli/plugin-lightning-dev/blob/3.2.
|
|
249
|
+
_See code: [src/commands/lightning/dev/component.ts](https://github.com/salesforcecli/plugin-lightning-dev/blob/3.2.7/src/commands/lightning/dev/component.ts)_
|
|
250
250
|
|
|
251
251
|
## `sf lightning dev site`
|
|
252
252
|
|
|
@@ -300,6 +300,6 @@ EXAMPLES
|
|
|
300
300
|
$ sf lightning dev site --name "Partner Central" --target-org myOrg --get-latest
|
|
301
301
|
```
|
|
302
302
|
|
|
303
|
-
_See code: [src/commands/lightning/dev/site.ts](https://github.com/salesforcecli/plugin-lightning-dev/blob/3.2.
|
|
303
|
+
_See code: [src/commands/lightning/dev/site.ts](https://github.com/salesforcecli/plugin-lightning-dev/blob/3.2.7/src/commands/lightning/dev/site.ts)_
|
|
304
304
|
|
|
305
305
|
<!-- commandsstop -->
|
|
@@ -4,26 +4,14 @@
|
|
|
4
4
|
* Licensed under the BSD 3-Clause license.
|
|
5
5
|
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
6
6
|
*/
|
|
7
|
-
import fs from 'node:fs';
|
|
8
7
|
import path from 'node:path';
|
|
9
8
|
import { SfCommand, Flags } from '@salesforce/sf-plugins-core';
|
|
10
|
-
import { Messages } from '@salesforce/core';
|
|
9
|
+
import { Messages, SfProject } from '@salesforce/core';
|
|
11
10
|
import { cmpDev } from '@lwrjs/api';
|
|
11
|
+
import { ComponentUtils } from '../../../shared/componentUtils.js';
|
|
12
12
|
import { PromptUtils } from '../../../shared/promptUtils.js';
|
|
13
13
|
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
|
|
14
14
|
const messages = Messages.loadMessages('@salesforce/plugin-lightning-dev', 'lightning.dev.component');
|
|
15
|
-
// TODO support other module directories
|
|
16
|
-
const MODULES_DIR = path.resolve(path.join('force-app', 'main', 'default', 'lwc'));
|
|
17
|
-
function getDirectories(filePath) {
|
|
18
|
-
try {
|
|
19
|
-
const items = fs.readdirSync(filePath);
|
|
20
|
-
const directories = items.filter((item) => fs.statSync(path.join(filePath, item)).isDirectory());
|
|
21
|
-
return directories;
|
|
22
|
-
}
|
|
23
|
-
catch (error) {
|
|
24
|
-
return [];
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
15
|
export default class LightningDevComponent extends SfCommand {
|
|
28
16
|
static summary = messages.getMessage('summary');
|
|
29
17
|
static description = messages.getMessage('description');
|
|
@@ -40,29 +28,46 @@ export default class LightningDevComponent extends SfCommand {
|
|
|
40
28
|
};
|
|
41
29
|
async run() {
|
|
42
30
|
const { flags } = await this.parse(LightningDevComponent);
|
|
31
|
+
const project = await SfProject.resolve();
|
|
32
|
+
const namespacePaths = await ComponentUtils.getNamespacePaths(project);
|
|
33
|
+
const componentPaths = await ComponentUtils.getAllComponentPaths(namespacePaths);
|
|
34
|
+
if (!componentPaths) {
|
|
35
|
+
throw new Error(messages.getMessage('error.directory'));
|
|
36
|
+
}
|
|
37
|
+
const components = (await Promise.all(componentPaths.map(async (componentPath) => {
|
|
38
|
+
let xml;
|
|
39
|
+
try {
|
|
40
|
+
xml = await ComponentUtils.getComponentMetadata(componentPath);
|
|
41
|
+
}
|
|
42
|
+
catch (err) {
|
|
43
|
+
this.warn(messages.getMessage('error.component-metadata', [componentPath]));
|
|
44
|
+
}
|
|
45
|
+
// components must have meta xml to be previewed
|
|
46
|
+
if (!xml) {
|
|
47
|
+
return undefined;
|
|
48
|
+
}
|
|
49
|
+
const componentName = path.basename(componentPath);
|
|
50
|
+
const label = ComponentUtils.componentNameToTitleCase(componentName);
|
|
51
|
+
return {
|
|
52
|
+
name: componentName,
|
|
53
|
+
label: xml.LightningComponentBundle.masterLabel ?? label,
|
|
54
|
+
description: xml.LightningComponentBundle.description ?? '',
|
|
55
|
+
};
|
|
56
|
+
}))).filter((component) => !!component);
|
|
43
57
|
let name = flags.name;
|
|
44
|
-
if (
|
|
45
|
-
|
|
46
|
-
if (!
|
|
47
|
-
throw new Error(messages.getMessage('error.
|
|
58
|
+
if (name) {
|
|
59
|
+
// validate that the component exists before launching the server
|
|
60
|
+
if (!components.find((component) => name === component.name)) {
|
|
61
|
+
throw new Error(messages.getMessage('error.component-not-found', [name]));
|
|
48
62
|
}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
const label = xmlContent.match(/<masterLabel>(.*?)<\/masterLabel>/);
|
|
53
|
-
const description = xmlContent.match(/<description>(.*?)<\/description>/);
|
|
54
|
-
return {
|
|
55
|
-
name: dir,
|
|
56
|
-
label: label ? label[1] : '',
|
|
57
|
-
description: description ? description[1] : '',
|
|
58
|
-
};
|
|
59
|
-
});
|
|
63
|
+
}
|
|
64
|
+
else {
|
|
65
|
+
// prompt the user for a name if one was not provided
|
|
60
66
|
name = await PromptUtils.promptUserToSelectComponent(components);
|
|
61
67
|
if (!name) {
|
|
62
68
|
throw new Error(messages.getMessage('error.component'));
|
|
63
69
|
}
|
|
64
70
|
}
|
|
65
|
-
this.log('Starting application on port 3000...');
|
|
66
71
|
const port = parseInt(process.env.PORT ?? '3000', 10);
|
|
67
72
|
await cmpDev({
|
|
68
73
|
mode: 'dev',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.js","sourceRoot":"","sources":["../../../../src/commands/lightning/dev/component.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"component.js","sourceRoot":"","sources":["../../../../src/commands/lightning/dev/component.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACnE,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAE7D,QAAQ,CAAC,kCAAkC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7D,MAAM,QAAQ,GAAG,QAAQ,CAAC,YAAY,CAAC,kCAAkC,EAAE,yBAAyB,CAAC,CAAC;AAEtG,MAAM,CAAC,OAAO,OAAO,qBAAsB,SAAQ,SAAe;IACzD,MAAM,CAAU,OAAO,GAAG,QAAQ,CAAC,UAAU,CAAC,SAA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tD,MAAM,MAAM,CAAC;YACX,IAAI,EAAE,KAAK;YACX,IAAI;YACJ,IAAI,EAAE,KAAK,IAAI,EAAE;SAClB,CAAC,CAAC;IACL,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { SfProject } from '@salesforce/core';
|
|
2
|
+
export type LwcMetadata = {
|
|
3
|
+
LightningComponentBundle: {
|
|
4
|
+
description?: string;
|
|
5
|
+
masterLabel?: string;
|
|
6
|
+
};
|
|
7
|
+
};
|
|
8
|
+
export declare class ComponentUtils {
|
|
9
|
+
static componentNameToTitleCase(componentName: string): string;
|
|
10
|
+
static getNamespacePaths(project: SfProject): Promise<string[]>;
|
|
11
|
+
static getAllComponentPaths(namespacePaths: string[]): Promise<string[]>;
|
|
12
|
+
static getComponentPaths(namespacePath: string): Promise<string[]>;
|
|
13
|
+
static getComponentMetadata(dirname: string): Promise<LwcMetadata | undefined>;
|
|
14
|
+
private static isLwcMetadata;
|
|
15
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2024, salesforce.com, inc.
|
|
3
|
+
* All rights reserved.
|
|
4
|
+
* Licensed under the BSD 3-Clause license.
|
|
5
|
+
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
6
|
+
*/
|
|
7
|
+
import path from 'node:path';
|
|
8
|
+
import fs from 'node:fs';
|
|
9
|
+
import { glob } from 'glob';
|
|
10
|
+
import { parseStringPromise } from 'xml2js';
|
|
11
|
+
export class ComponentUtils {
|
|
12
|
+
static componentNameToTitleCase(componentName) {
|
|
13
|
+
if (!componentName) {
|
|
14
|
+
return '';
|
|
15
|
+
}
|
|
16
|
+
return componentName.replace(/([A-Z])/g, ' $1').replace(/^./, (str) => str.toUpperCase());
|
|
17
|
+
}
|
|
18
|
+
static async getNamespacePaths(project) {
|
|
19
|
+
const packageDirs = project.getPackageDirectories();
|
|
20
|
+
return (await Promise.all(packageDirs.map((dir) => glob(`${dir.fullPath}/**/lwc`, { absolute: true })))).flat();
|
|
21
|
+
}
|
|
22
|
+
static async getAllComponentPaths(namespacePaths) {
|
|
23
|
+
return (await Promise.all(namespacePaths.map((namespacePath) => ComponentUtils.getComponentPaths(namespacePath)))).flat();
|
|
24
|
+
}
|
|
25
|
+
static async getComponentPaths(namespacePath) {
|
|
26
|
+
const children = await fs.promises.readdir(namespacePath, { withFileTypes: true });
|
|
27
|
+
return children.filter((child) => child.isDirectory()).map((child) => path.join(child.parentPath, child.name));
|
|
28
|
+
}
|
|
29
|
+
static async getComponentMetadata(dirname) {
|
|
30
|
+
const componentName = path.basename(dirname);
|
|
31
|
+
const metaXmlPath = path.join(dirname, `${componentName}.js-meta.xml`);
|
|
32
|
+
if (!fs.existsSync(metaXmlPath)) {
|
|
33
|
+
return undefined;
|
|
34
|
+
}
|
|
35
|
+
const xmlContent = await fs.promises.readFile(metaXmlPath, 'utf8');
|
|
36
|
+
const parsedData = (await parseStringPromise(xmlContent));
|
|
37
|
+
if (!this.isLwcMetadata(parsedData)) {
|
|
38
|
+
return undefined;
|
|
39
|
+
}
|
|
40
|
+
return parsedData;
|
|
41
|
+
}
|
|
42
|
+
static isLwcMetadata(obj) {
|
|
43
|
+
return (obj && typeof obj === 'object' && 'LightningComponentBundle' in obj) === true;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=componentUtils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"componentUtils.js","sourceRoot":"","sources":["../../src/shared/componentUtils.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,kBAAkB,EAAE,MAAM,QAAQ,CAAC;AAU5C,MAAM,OAAO,cAAc;IAClB,MAAM,CAAC,wBAAwB,CAAC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AAI,CAAC,CAAC,CAAC;IACjH,CAAC;IAEM,MAAM,CAAC,KAAK,CAAC,oBAAoB,CAAC,OAAe;QACtD,MAAM,aAAa,GAAG,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QAC7C,MAAM,WAAW,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,GAAG,aAAa,cAAc,CAAC,CAAC;QACvE,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC,EAAE,CAAC;YAChC,OAAO,SAAS,CAAC;QACnB,CAAC;QAED,MAAM,UAAU,GAAG,MAAM,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;QACnE,MAAM,UAAU,GAAG,CAAC,MAAM,kBAAkB,CAAC,UAAU,CAAC,CAAgB,CAAC;QACzE,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,UAAU,CAAC,EAAE,CAAC;YACpC,OAAO,SAAS,CAAC;QACnB,CAAC;QAED,OAAO,UAAU,CAAC;IACpB,CAAC;IAEO,MAAM,CAAC,aAAa,CAAC,GAAY;QACvC,OAAO,CAAC,GAAG,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,0BAA0B,IAAI,GAAG,CAAC,KAAK,IAAI,CAAC;IACxF,CAAC;CACF"}
|
|
@@ -66,7 +66,7 @@ export class PromptUtils {
|
|
|
66
66
|
}
|
|
67
67
|
static async promptUserToSelectComponent(components) {
|
|
68
68
|
const choices = components.map((component) => ({
|
|
69
|
-
name: component.label
|
|
69
|
+
name: component.label ?? component.name,
|
|
70
70
|
value: component.name,
|
|
71
71
|
description: component.description,
|
|
72
72
|
}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"promptUtils.js","sourceRoot":"","sources":["../../src/shared/promptUtils.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,MAAM,MAAM,kBAAkB,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,MAAM,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component-metadata
|
|
32
|
+
|
|
33
|
+
Failed to parse component metadata at: %s
|
|
34
|
+
|
|
35
|
+
# error.component-not-found
|
|
36
|
+
|
|
37
|
+
Unable to find component with name: %s
|
|
38
|
+
|
|
31
39
|
# examples
|
|
32
40
|
|
|
33
41
|
- Select a component and launch the component preview:
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/plugin-lightning-dev",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.7",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@salesforce/plugin-lightning-dev",
|
|
9
|
-
"version": "3.2.
|
|
9
|
+
"version": "3.2.7",
|
|
10
10
|
"license": "BSD-3-Clause",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@inquirer/prompts": "^5.3.8",
|
|
@@ -22,7 +22,8 @@
|
|
|
22
22
|
"axios": "^1.7.9",
|
|
23
23
|
"glob": "^10.4.5",
|
|
24
24
|
"lwc": "~8.12.5",
|
|
25
|
-
"node-fetch": "^3.3.2"
|
|
25
|
+
"node-fetch": "^3.3.2",
|
|
26
|
+
"xml2js": "^0.6.2"
|
|
26
27
|
},
|
|
27
28
|
"devDependencies": {
|
|
28
29
|
"@oclif/plugin-command-snapshot": "^5.2.35",
|
|
@@ -30,6 +31,7 @@
|
|
|
30
31
|
"@salesforce/dev-scripts": "^10.2.11",
|
|
31
32
|
"@salesforce/plugin-command-reference": "^3.1.44",
|
|
32
33
|
"@types/node-fetch": "^2.6.11",
|
|
34
|
+
"@types/xml2js": "^0.4.14",
|
|
33
35
|
"eslint-plugin-sf-plugin": "^1.20.15",
|
|
34
36
|
"esmock": "^2.6.9",
|
|
35
37
|
"oclif": "^4.17.27",
|
|
@@ -8084,6 +8086,16 @@
|
|
|
8084
8086
|
"integrity": "sha512-ltIpx+kM7g/MLRZfkbL7EsCEjfzCcScLpkg37eXEtx5kmrAKBkTJwd1GIAjDSL8wTpM6Hzn5YO4pSb91BEwu1g==",
|
|
8085
8087
|
"license": "MIT"
|
|
8086
8088
|
},
|
|
8089
|
+
"node_modules/@types/xml2js": {
|
|
8090
|
+
"version": "0.4.14",
|
|
8091
|
+
"resolved": "https://registry.npmjs.org/@types/xml2js/-/xml2js-0.4.14.tgz",
|
|
8092
|
+
"integrity": "sha512-4YnrRemBShWRO2QjvUin8ESA41rH+9nQGLUGZV/1IDhi3SL9OhdpNC/MrulTWuptXKwhx/aDxE7toV0f/ypIXQ==",
|
|
8093
|
+
"dev": true,
|
|
8094
|
+
"license": "MIT",
|
|
8095
|
+
"dependencies": {
|
|
8096
|
+
"@types/node": "*"
|
|
8097
|
+
}
|
|
8098
|
+
},
|
|
8087
8099
|
"node_modules/@typescript-eslint/eslint-plugin": {
|
|
8088
8100
|
"version": "6.21.0",
|
|
8089
8101
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.21.0.tgz",
|
package/oclif.lock
CHANGED
|
@@ -4162,6 +4162,13 @@
|
|
|
4162
4162
|
resolved "https://registry.yarnpkg.com/@types/wrap-ansi/-/wrap-ansi-3.0.0.tgz#18b97a972f94f60a679fd5c796d96421b9abb9fd"
|
|
4163
4163
|
integrity sha512-ltIpx+kM7g/MLRZfkbL7EsCEjfzCcScLpkg37eXEtx5kmrAKBkTJwd1GIAjDSL8wTpM6Hzn5YO4pSb91BEwu1g==
|
|
4164
4164
|
|
|
4165
|
+
"@types/xml2js@^0.4.14":
|
|
4166
|
+
version "0.4.14"
|
|
4167
|
+
resolved "https://registry.yarnpkg.com/@types/xml2js/-/xml2js-0.4.14.tgz#5d462a2a7330345e2309c6b549a183a376de8f9a"
|
|
4168
|
+
integrity sha512-4YnrRemBShWRO2QjvUin8ESA41rH+9nQGLUGZV/1IDhi3SL9OhdpNC/MrulTWuptXKwhx/aDxE7toV0f/ypIXQ==
|
|
4169
|
+
dependencies:
|
|
4170
|
+
"@types/node" "*"
|
|
4171
|
+
|
|
4165
4172
|
"@typescript-eslint/eslint-plugin@^6.21.0":
|
|
4166
4173
|
version "6.21.0"
|
|
4167
4174
|
resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.21.0.tgz#30830c1ca81fd5f3c2714e524c4303e0194f9cd3"
|
package/oclif.manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/plugin-lightning-dev",
|
|
3
3
|
"description": "Lightning development tools for LEX, Mobile, and Experience Sites",
|
|
4
|
-
"version": "3.2.
|
|
4
|
+
"version": "3.2.7",
|
|
5
5
|
"author": "Salesforce",
|
|
6
6
|
"bugs": "https://github.com/forcedotcom/cli/issues",
|
|
7
7
|
"dependencies": {
|
|
@@ -18,7 +18,8 @@
|
|
|
18
18
|
"axios": "^1.7.9",
|
|
19
19
|
"glob": "^10.4.5",
|
|
20
20
|
"lwc": "~8.12.5",
|
|
21
|
-
"node-fetch": "^3.3.2"
|
|
21
|
+
"node-fetch": "^3.3.2",
|
|
22
|
+
"xml2js": "^0.6.2"
|
|
22
23
|
},
|
|
23
24
|
"devDependencies": {
|
|
24
25
|
"@oclif/plugin-command-snapshot": "^5.2.35",
|
|
@@ -26,6 +27,7 @@
|
|
|
26
27
|
"@salesforce/dev-scripts": "^10.2.11",
|
|
27
28
|
"@salesforce/plugin-command-reference": "^3.1.44",
|
|
28
29
|
"@types/node-fetch": "^2.6.11",
|
|
30
|
+
"@types/xml2js": "^0.4.14",
|
|
29
31
|
"eslint-plugin-sf-plugin": "^1.20.15",
|
|
30
32
|
"esmock": "^2.6.9",
|
|
31
33
|
"oclif": "^4.17.27",
|
|
@@ -243,7 +245,7 @@
|
|
|
243
245
|
"yarn": "1.22.22"
|
|
244
246
|
},
|
|
245
247
|
"sfdx": {
|
|
246
|
-
"publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-lightning-dev/3.2.
|
|
247
|
-
"signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-lightning-dev/3.2.
|
|
248
|
+
"publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-lightning-dev/3.2.7.crt",
|
|
249
|
+
"signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-lightning-dev/3.2.7.sig"
|
|
248
250
|
}
|
|
249
251
|
}
|