@salesforce/plugin-info 1.3.0 → 2.0.1
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/CHANGELOG.md +18 -0
- package/README.md +4 -4
- package/lib/shared/getInfoConfig.js +2 -2
- package/lib/shared/getInfoConfig.js.map +1 -1
- package/messages/display.js +3 -3
- package/oclif.manifest.json +1 -1
- package/package.json +13 -10
- package/lib/commands/force.d.ts +0 -8
- package/lib/commands/force.js +0 -79
- package/lib/commands/force.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,24 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [2.0.1](https://github.com/salesforcecli/plugin-info/compare/v2.0.0...v2.0.1) (2022-05-24)
|
|
6
|
+
|
|
7
|
+
### Bug Fixes
|
|
8
|
+
|
|
9
|
+
- add prompt to examples ([981c3d3](https://github.com/salesforcecli/plugin-info/commit/981c3d3ac38659d537fb641d1501d4d85c31e37e))
|
|
10
|
+
|
|
11
|
+
## [2.0.0](https://github.com/salesforcecli/plugin-info/compare/v1.3.1...v2.0.0) (2022-04-01)
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
- parking orbit plugin-info ([f18721f](https://github.com/salesforcecli/plugin-info/commit/f18721ff411cb4720d6d297d3250206129eb620b))
|
|
16
|
+
|
|
17
|
+
### [1.3.1](https://github.com/salesforcecli/plugin-info/compare/v1.3.0...v1.3.1) (2022-03-16)
|
|
18
|
+
|
|
19
|
+
### Bug Fixes
|
|
20
|
+
|
|
21
|
+
- remove force.ts ([c663604](https://github.com/salesforcecli/plugin-info/commit/c6636048571b198f7ae23c1fb014ebc180075bb9))
|
|
22
|
+
|
|
5
23
|
## [1.3.0](https://github.com/salesforcecli/plugin-info/compare/v1.2.1...v1.3.0) (2022-02-28)
|
|
6
24
|
|
|
7
25
|
### Features
|
package/README.md
CHANGED
|
@@ -101,13 +101,13 @@ ALIASES
|
|
|
101
101
|
|
|
102
102
|
EXAMPLES
|
|
103
103
|
Display release notes for the currently installed CLI version:
|
|
104
|
-
|
|
104
|
+
$ sfdx info:releasenotes:display
|
|
105
105
|
Display release notes for CLI version 7.120.0:
|
|
106
|
-
|
|
106
|
+
$ sfdx info:releasenotes:display --version 7.120.0
|
|
107
107
|
Display release notes for the CLI version that corresponds to a tag (stable, stable-rc, latest, latest-rc, rc):
|
|
108
|
-
|
|
108
|
+
$ sfdx info:releasenotes:display --version latest
|
|
109
109
|
```
|
|
110
110
|
|
|
111
|
-
_See code: [src/commands/info/releasenotes/display.ts](https://github.com/salesforcecli/plugin-info/blob/
|
|
111
|
+
_See code: [src/commands/info/releasenotes/display.ts](https://github.com/salesforcecli/plugin-info/blob/v2.0.0/src/commands/info/releasenotes/display.ts)_
|
|
112
112
|
|
|
113
113
|
<!-- commandsstop -->
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
9
|
exports.getInfoConfig = void 0;
|
|
10
10
|
const path_1 = require("path");
|
|
11
|
-
const
|
|
11
|
+
const fs = require("fs");
|
|
12
12
|
/* sfdx example to add to cli pjson.oclif
|
|
13
13
|
|
|
14
14
|
example location with npm install:
|
|
@@ -26,7 +26,7 @@ Add to oclif object
|
|
|
26
26
|
const getInfoConfig = async (path) => {
|
|
27
27
|
// TODO: could add env var support for these values
|
|
28
28
|
const fullPath = (0, path_1.join)(path, 'package.json');
|
|
29
|
-
const json = (await
|
|
29
|
+
const json = JSON.parse(await fs.promises.readFile(fullPath, 'utf8'));
|
|
30
30
|
const { info } = json.oclif;
|
|
31
31
|
if (!info)
|
|
32
32
|
throw new Error('getInfoConfig() failed to find pjson.oclif.info config');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getInfoConfig.js","sourceRoot":"","sources":["../../src/shared/getInfoConfig.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,+BAA4B;AAC5B,
|
|
1
|
+
{"version":3,"file":"getInfoConfig.js","sourceRoot":"","sources":["../../src/shared/getInfoConfig.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,+BAA4B;AAC5B,yBAAyB;AAiBzB;;;;;;;;;;;;;EAaE;AAEF,MAAM,aAAa,GAAG,KAAK,EAAE,IAAY,EAAuB,EAAE;IAChE,mDAAmD;IACnD,MAAM,QAAQ,GAAG,IAAA,WAAI,EAAC,IAAI,EAAE,cAAc,CAAC,CAAC;IAE5C,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAkB,CAAC;IAEvF,MAAM,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC;IAE5B,IAAI,CAAC,IAAI;QAAE,MAAM,IAAI,KAAK,CAAC,wDAAwD,CAAC,CAAC;IAErF,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAEO,sCAAa"}
|
package/messages/display.js
CHANGED
|
@@ -6,11 +6,11 @@ module.exports = {
|
|
|
6
6
|
},
|
|
7
7
|
examples: [
|
|
8
8
|
`Display release notes for the currently installed CLI version:
|
|
9
|
-
|
|
9
|
+
$ <%= config.bin %> <%= command.id %>
|
|
10
10
|
Display release notes for CLI version 7.120.0:
|
|
11
|
-
|
|
11
|
+
$ <%= config.bin %> <%= command.id %> --version 7.120.0
|
|
12
12
|
Display release notes for the CLI version that corresponds to a tag (%s):
|
|
13
|
-
|
|
13
|
+
$ <%= config.bin %> <%= command.id %> --version latest
|
|
14
14
|
`,
|
|
15
15
|
],
|
|
16
16
|
footer: `---
|
package/oclif.manifest.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"
|
|
1
|
+
{"version":"2.0.1","commands":{"info:releasenotes:display":{"id":"info:releasenotes:display","description":"Display Salesforce CLI release notes on the command line.","usage":"<%= command.id %> [-v <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@salesforce/plugin-info","pluginType":"core","aliases":["whatsnew"],"examples":["Display release notes for the currently installed CLI version:","$ <%= config.bin %> <%= command.id %>","Display release notes for CLI version 7.120.0:","$ <%= config.bin %> <%= command.id %> --version 7.120.0","Display release notes for the CLI version that corresponds to a tag (stable, stable-rc, latest, latest-rc, rc):","$ <%= config.bin %> <%= command.id %> --version latest"," "],"flags":{"json":{"name":"json","type":"boolean","description":"format output as json","allowNo":false},"loglevel":{"name":"loglevel","type":"option","description":"logging level for this command invocation","required":false,"helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"version":{"name":"version","type":"option","char":"v","description":"CLI version or tag for which to display release notes."},"hook":{"name":"hook","type":"boolean","description":"This hidden parameter is used in post install or update hooks.","hidden":true,"allowNo":false}},"args":[]}}}
|
package/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/plugin-info",
|
|
3
3
|
"description": "Plugin for accessing cli info from the command line",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "2.0.1",
|
|
5
5
|
"author": "Salesforce",
|
|
6
6
|
"bugs": "https://github.com/forcedotcom/cli/issues",
|
|
7
|
+
"main": "lib/index.js",
|
|
7
8
|
"dependencies": {
|
|
8
|
-
"@oclif/
|
|
9
|
-
"@
|
|
10
|
-
"@salesforce/
|
|
11
|
-
"@salesforce/
|
|
12
|
-
"@salesforce/kit": "^1.5.17",
|
|
9
|
+
"@oclif/core": "^1.6.3",
|
|
10
|
+
"@salesforce/command": "^5.0.4",
|
|
11
|
+
"@salesforce/core": "^3.10.1",
|
|
12
|
+
"@salesforce/kit": "^1.5.34",
|
|
13
13
|
"got": "^11.8.2",
|
|
14
14
|
"marked": "^4.0.1",
|
|
15
15
|
"marked-terminal": "^4.2.0",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
22
|
"@oclif/dev-cli": "^1",
|
|
23
|
-
"@oclif/plugin-command-snapshot": "^
|
|
23
|
+
"@oclif/plugin-command-snapshot": "^3",
|
|
24
24
|
"@salesforce/cli-plugins-testkit": "^1.4.17",
|
|
25
25
|
"@salesforce/dev-config": "^3.0.0",
|
|
26
26
|
"@salesforce/dev-scripts": "^2.0.0",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
}
|
|
64
64
|
},
|
|
65
65
|
"engines": {
|
|
66
|
-
"node": ">=
|
|
66
|
+
"node": ">=14.0.0"
|
|
67
67
|
},
|
|
68
68
|
"files": [
|
|
69
69
|
"/lib",
|
|
@@ -81,6 +81,9 @@
|
|
|
81
81
|
"license": "BSD-3-Clause",
|
|
82
82
|
"oclif": {
|
|
83
83
|
"commands": "./lib/commands",
|
|
84
|
+
"additionalHelpFlags": [
|
|
85
|
+
"-h"
|
|
86
|
+
],
|
|
84
87
|
"bin": "sfdx",
|
|
85
88
|
"devPlugins": [
|
|
86
89
|
"@oclif/plugin-help",
|
|
@@ -123,7 +126,7 @@
|
|
|
123
126
|
"access": "public"
|
|
124
127
|
},
|
|
125
128
|
"sfdx": {
|
|
126
|
-
"publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-info/
|
|
127
|
-
"signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-info/
|
|
129
|
+
"publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-info/2.0.1.crt",
|
|
130
|
+
"signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-info/2.0.1.sig"
|
|
128
131
|
}
|
|
129
132
|
}
|
package/lib/commands/force.d.ts
DELETED
package/lib/commands/force.js
DELETED
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Copyright (c) 2020, salesforce.com, inc.
|
|
4
|
-
* All rights reserved.
|
|
5
|
-
* Licensed under the BSD 3-Clause license.
|
|
6
|
-
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
7
|
-
*/
|
|
8
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.ForceCommand = void 0;
|
|
10
|
-
// This is a doc command
|
|
11
|
-
/* istanbul ignore file */
|
|
12
|
-
const command_1 = require("@salesforce/command");
|
|
13
|
-
const got_1 = require("got");
|
|
14
|
-
const plugin_help_1 = require("@oclif/plugin-help");
|
|
15
|
-
const ProxyAgent = require("proxy-agent");
|
|
16
|
-
const proxy_from_env_1 = require("proxy-from-env");
|
|
17
|
-
const core_1 = require("@salesforce/core");
|
|
18
|
-
const getAsciiSignature = (apiVersion) => `
|
|
19
|
-
DX DX DX
|
|
20
|
-
DX DX DX DX DX DX DX DX DX
|
|
21
|
-
DX DX DX DX DX DX DX DX DX DX DX DX
|
|
22
|
-
DX DX DX DX DX DX DX DX DX DX
|
|
23
|
-
DX DX DX DX DX DX DX DX DX DX
|
|
24
|
-
DX DX DX DX DX DX DX DX DX DX DX
|
|
25
|
-
DX DX DX DX DX DX DX DX
|
|
26
|
-
DX DX DX DX DX DX
|
|
27
|
-
DX DX DX DX
|
|
28
|
-
DX DX DX DX
|
|
29
|
-
DX DX DX DX
|
|
30
|
-
DX DX DX DX
|
|
31
|
-
DX DX DX DX
|
|
32
|
-
DX DX DX DX
|
|
33
|
-
DX DX DX DX
|
|
34
|
-
DX DX DX DX
|
|
35
|
-
DX DX DX DX
|
|
36
|
-
DX DX DX DX DX
|
|
37
|
-
DX DX DX DX DX DX DX DX
|
|
38
|
-
DX DX DX DX DX DX DX
|
|
39
|
-
DX DX DX DX DX DX DX DX
|
|
40
|
-
DX DX DX DX DX DX DX DX DX DX DX
|
|
41
|
-
DX DX DX DX DX DX DX DX DX
|
|
42
|
-
DX DX DX DX
|
|
43
|
-
DX DX DX DX DX DX
|
|
44
|
-
DX DX DX DX DX DX v${apiVersion}
|
|
45
|
-
DX DX DX
|
|
46
|
-
|
|
47
|
-
* Salesforce CLI Release Notes: https://github.com/forcedotcom/cli/tree/main/releasenotes
|
|
48
|
-
* Salesforce DX Setup Guide: https://sfdc.co/sfdx_setup_guide
|
|
49
|
-
* Salesforce DX Developer Guide: https://sfdc.co/sfdx_dev_guide
|
|
50
|
-
* Salesforce CLI Command Reference: https://sfdc.co/sfdx_cli_reference
|
|
51
|
-
* Salesforce Extensions for VS Code: https://marketplace.visualstudio.com/items?itemName=salesforce.salesforcedx-vscode
|
|
52
|
-
`;
|
|
53
|
-
const getCurrentApiVersion = async () => {
|
|
54
|
-
const apiFromConfig = core_1.ConfigAggregator.getValue('apiVersion').value;
|
|
55
|
-
if (apiFromConfig) {
|
|
56
|
-
return apiFromConfig;
|
|
57
|
-
}
|
|
58
|
-
const url = 'https://mdcoverage.secure.force.com/services/apexrest/report';
|
|
59
|
-
return `${JSON.parse((await (0, got_1.default)(url, {
|
|
60
|
-
agent: { https: ProxyAgent((0, proxy_from_env_1.getProxyForUrl)(url)) },
|
|
61
|
-
})).body).versions.selected.toString()}.0`;
|
|
62
|
-
};
|
|
63
|
-
class ForceCommand extends command_1.SfdxCommand {
|
|
64
|
-
async run() {
|
|
65
|
-
const apiVersion = await getCurrentApiVersion();
|
|
66
|
-
this.ux.log(getAsciiSignature(apiVersion));
|
|
67
|
-
return { apiVersion };
|
|
68
|
-
}
|
|
69
|
-
// overrides the help so that it shows the help for the `force` topic and not "help" for this command
|
|
70
|
-
_help() {
|
|
71
|
-
const help = new plugin_help_1.Help(this.config);
|
|
72
|
-
// We need to include force in the args for topics to be shown
|
|
73
|
-
help.showHelp(process.argv.slice(2));
|
|
74
|
-
return this.exit(0);
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
exports.ForceCommand = ForceCommand;
|
|
78
|
-
ForceCommand.hidden = true;
|
|
79
|
-
//# sourceMappingURL=force.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"force.js","sourceRoot":"","sources":["../../src/commands/force.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,wBAAwB;AACxB,0BAA0B;AAE1B,iDAAkD;AAClD,6BAAsB;AACtB,oDAA0C;AAC1C,0CAA0C;AAC1C,mDAAgD;AAChD,2CAAoD;AAEpD,MAAM,iBAAiB,GAAG,CAAC,UAAkB,EAAU,EAAE,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;+DA0BK,UAAU;;;;;;;;CAQxE,CAAC;AAEF,MAAM,oBAAoB,GAAG,KAAK,IAAqB,EAAE;IACvD,MAAM,aAAa,GAAG,uBAAgB,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC,KAAe,CAAC;IAC9E,IAAI,aAAa,EAAE;QACjB,OAAO,aAAa,CAAC;KACtB;IACD,MAAM,GAAG,GAAG,8DAA8D,CAAC;IAC3E,OAAO,GACL,IAAI,CAAC,KAAK,CACR,CACE,MAAM,IAAA,aAAG,EAAC,GAAG,EAAE;QACb,KAAK,EAAE,EAAE,KAAK,EAAE,UAAU,CAAC,IAAA,+BAAc,EAAC,GAAG,CAAC,CAAC,EAAE;KAClD,CAAC,CACH,CAAC,IAAI,CAIT,CAAC,QAAQ,CAAC,QAAQ,CAAC,QAAQ,EAAE,IAAI,CAAC;AACrC,CAAC,CAAC;AAEF,MAAa,YAAa,SAAQ,qBAAW;IAGpC,KAAK,CAAC,GAAG;QACd,MAAM,UAAU,GAAG,MAAM,oBAAoB,EAAE,CAAC;QAChD,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,iBAAiB,CAAC,UAAU,CAAC,CAAC,CAAC;QAC3C,OAAO,EAAE,UAAU,EAAE,CAAC;IACxB,CAAC;IAED,qGAAqG;IAC3F,KAAK;QACb,MAAM,IAAI,GAAG,IAAI,kBAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACnC,8DAA8D;QAC9D,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;QACrC,OAAO,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACtB,CAAC;;AAfH,oCAgBC;AAfwB,mBAAM,GAAG,IAAI,CAAC"}
|