@salesforce/plugin-info 2.6.18 → 2.6.19
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.
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { SfCommand } from '@salesforce/sf-plugins-core';
|
|
2
2
|
export default class Display extends SfCommand<DisplayOutput | undefined> {
|
|
3
|
-
private static helpers;
|
|
4
3
|
static readonly summary: string;
|
|
5
4
|
static readonly description: string;
|
|
6
|
-
static aliases: string[];
|
|
5
|
+
static readonly aliases: string[];
|
|
7
6
|
static readonly examples: string[];
|
|
8
7
|
static readonly flags: {
|
|
9
8
|
version: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
@@ -20,18 +20,18 @@ const getDistTagVersion_1 = require("../../../shared/getDistTagVersion");
|
|
|
20
20
|
const parseReleaseNotes_1 = require("../../../shared/parseReleaseNotes");
|
|
21
21
|
// Initialize Messages with the current plugin directory
|
|
22
22
|
core_1.Messages.importMessagesDirectory(__dirname);
|
|
23
|
-
const
|
|
24
|
-
const HIDE_FOOTER = 'SFDX_HIDE_RELEASE_NOTES_FOOTER';
|
|
23
|
+
const helpers = ['stable', 'stable-rc', 'latest', 'latest-rc', 'rc'];
|
|
25
24
|
// Load the specific messages for this file. Messages from @salesforce/command, @salesforce/core,
|
|
26
25
|
// or any library that is using the messages framework can also be loaded this way.
|
|
27
26
|
const messages = core_1.Messages.loadMessages('@salesforce/plugin-info', 'display');
|
|
28
27
|
class Display extends sf_plugins_core_1.SfCommand {
|
|
29
28
|
async run() {
|
|
29
|
+
const HIDE_NOTES = this.config.bin === 'sf' ? 'SF_HIDE_RELEASE_NOTES' : 'SFDX_HIDE_RELEASE_NOTES';
|
|
30
|
+
const HIDE_FOOTER = this.config.bin === 'sf' ? 'SF_HIDE_RELEASE_NOTES_FOOTER' : 'SFDX_HIDE_RELEASE_NOTES_FOOTER';
|
|
30
31
|
const logger = core_1.Logger.childFromRoot(this.constructor.name);
|
|
31
32
|
const { flags } = await this.parse(Display);
|
|
32
33
|
const env = new kit_1.Env();
|
|
33
|
-
|
|
34
|
-
if (env.getBoolean(HIDE_NOTES) && isHook) {
|
|
34
|
+
if (env.getBoolean(HIDE_NOTES) && flags.hook) {
|
|
35
35
|
// We don't ever want to exit the process for info:releasenotes:display (whatsnew)
|
|
36
36
|
// In most cases we will log a message, but here we only trace log in case someone using stdout of the update command
|
|
37
37
|
logger.trace(`release notes disabled via env var: ${HIDE_NOTES}`);
|
|
@@ -44,7 +44,7 @@ class Display extends sf_plugins_core_1.SfCommand {
|
|
|
44
44
|
const infoConfig = await (0, getInfoConfig_1.getInfoConfig)(this.config.root);
|
|
45
45
|
const { distTagUrl, releaseNotesPath, releaseNotesFilename } = infoConfig.releasenotes;
|
|
46
46
|
let version = flags.version ?? installedVersion;
|
|
47
|
-
if (
|
|
47
|
+
if (helpers.includes(version)) {
|
|
48
48
|
version = await (0, getDistTagVersion_1.getDistTagVersion)(distTagUrl, version);
|
|
49
49
|
}
|
|
50
50
|
const releaseNotes = await (0, getReleaseNotes_1.getReleaseNotes)(releaseNotesPath, releaseNotesFilename, version);
|
|
@@ -60,7 +60,7 @@ class Display extends sf_plugins_core_1.SfCommand {
|
|
|
60
60
|
else {
|
|
61
61
|
this.log(marked_1.marked.parser(tokens));
|
|
62
62
|
}
|
|
63
|
-
if (
|
|
63
|
+
if (flags.hook) {
|
|
64
64
|
if (env.getBoolean(HIDE_FOOTER)) {
|
|
65
65
|
await core_1.Lifecycle.getInstance().emitTelemetry({ eventName: 'FOOTER_HIDDEN' });
|
|
66
66
|
}
|
|
@@ -71,7 +71,7 @@ class Display extends sf_plugins_core_1.SfCommand {
|
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
73
|
catch (err) {
|
|
74
|
-
if (
|
|
74
|
+
if (flags.hook) {
|
|
75
75
|
// Do not throw error if --hook is passed, just warn so we don't exit any processes.
|
|
76
76
|
// --hook is passed in the post install/update scripts
|
|
77
77
|
const { message, stack, name } = err;
|
|
@@ -95,11 +95,10 @@ class Display extends sf_plugins_core_1.SfCommand {
|
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
97
|
exports.default = Display;
|
|
98
|
-
Display.helpers = ['stable', 'stable-rc', 'latest', 'latest-rc', 'rc'];
|
|
99
98
|
Display.summary = messages.getMessage('summary');
|
|
100
99
|
Display.description = messages.getMessage('description');
|
|
101
100
|
Display.aliases = ['whatsnew'];
|
|
102
|
-
Display.examples = messages.getMessages('examples', [
|
|
101
|
+
Display.examples = messages.getMessages('examples', [helpers.join(', ')]);
|
|
103
102
|
Display.flags = {
|
|
104
103
|
version: sf_plugins_core_1.Flags.string({
|
|
105
104
|
char: 'v',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"display.js","sourceRoot":"","sources":["../../../../src/commands/info/releasenotes/display.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;AAEH,4EAA4E;AAC5E,uDAAuD;AAEvD,yBAAyB;AACzB,mCAAgC;AAChC,oDAAoD;AACpD,yCAAsC;AACtC,iEAAyE;AACzE,2CAA+D;AAE/D,iEAA8D;AAC9D,qEAAkE;AAClE,yEAAsE;AACtE,yEAAsE;AAEtE,wDAAwD;AACxD,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAE5C,MAAM,
|
|
1
|
+
{"version":3,"file":"display.js","sourceRoot":"","sources":["../../../../src/commands/info/releasenotes/display.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;AAEH,4EAA4E;AAC5E,uDAAuD;AAEvD,yBAAyB;AACzB,mCAAgC;AAChC,oDAAoD;AACpD,yCAAsC;AACtC,iEAAyE;AACzE,2CAA+D;AAE/D,iEAA8D;AAC9D,qEAAkE;AAClE,yEAAsE;AACtE,yEAAsE;AAEtE,wDAAwD;AACxD,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAE5C,MAAM,OAAO,GAAG,CAAC,QAA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AAC,CAAC,CAAC,CAAC;AAElE,aAAK,GAAG;IAC7B,OAAO,EAAE,uBAAK,CAAC,MAAM,CAAC;QACpB,IAAI,EAAE,GAAG;QACT,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,uBAAuB,CAAC;KACtD,CAAC;IACF,IAAI,EAAE,uBAAK,CAAC,OAAO,CAAC;QAClB,MAAM,EAAE,IAAI;QACZ,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,oBAAoB,CAAC;KACnD,CAAC;IACF,QAAQ,EAAR,0BAAQ;CACT,CAAC"}
|
package/oclif.manifest.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "2.6.
|
|
2
|
+
"version": "2.6.19",
|
|
3
3
|
"commands": {
|
|
4
4
|
"doctor": {
|
|
5
5
|
"id": "doctor",
|
|
@@ -118,14 +118,7 @@
|
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
120
|
},
|
|
121
|
-
"args": {}
|
|
122
|
-
"helpers": [
|
|
123
|
-
"stable",
|
|
124
|
-
"stable-rc",
|
|
125
|
-
"latest",
|
|
126
|
-
"latest-rc",
|
|
127
|
-
"rc"
|
|
128
|
-
]
|
|
121
|
+
"args": {}
|
|
129
122
|
}
|
|
130
123
|
}
|
|
131
124
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/plugin-info",
|
|
3
3
|
"description": "Plugin for accessing cli info from the command line",
|
|
4
|
-
"version": "2.6.
|
|
4
|
+
"version": "2.6.19",
|
|
5
5
|
"author": "Salesforce",
|
|
6
6
|
"bugs": "https://github.com/forcedotcom/cli/issues",
|
|
7
7
|
"main": "lib/index.js",
|
|
@@ -20,10 +20,10 @@
|
|
|
20
20
|
"tslib": "^2"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
|
-
"@oclif/plugin-command-snapshot": "^
|
|
24
|
-
"@salesforce/cli-plugins-testkit": "^
|
|
23
|
+
"@oclif/plugin-command-snapshot": "^4.0.2",
|
|
24
|
+
"@salesforce/cli-plugins-testkit": "^4.0.1",
|
|
25
25
|
"@salesforce/dev-config": "^4.0.1",
|
|
26
|
-
"@salesforce/dev-scripts": "^5.4.
|
|
26
|
+
"@salesforce/dev-scripts": "^5.4.2",
|
|
27
27
|
"@salesforce/plugin-command-reference": "^3.0.2",
|
|
28
28
|
"@salesforce/prettier-config": "^0.0.3",
|
|
29
29
|
"@salesforce/ts-sinon": "^1.4.6",
|
|
@@ -234,7 +234,7 @@
|
|
|
234
234
|
}
|
|
235
235
|
},
|
|
236
236
|
"sfdx": {
|
|
237
|
-
"publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-info/2.6.
|
|
238
|
-
"signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-info/2.6.
|
|
237
|
+
"publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-info/2.6.19.crt",
|
|
238
|
+
"signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-info/2.6.19.sig"
|
|
239
239
|
}
|
|
240
240
|
}
|