@salesforce/cli 2.0.0-beta.30 → 2.0.0-beta.31
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.
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright (c) 2021, 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
|
+
const path_1 = require("path");
|
|
10
|
+
const child_process_1 = require("child_process");
|
|
11
|
+
const core_1 = require("@oclif/core");
|
|
12
|
+
const logError = (msg) => {
|
|
13
|
+
core_1.ux.log('NOTE: This error can be ignored in CI and may be silenced in the future');
|
|
14
|
+
core_1.ux.log('- Set the SF_HIDE_RELEASE_NOTES env var to "true" to skip this script\n');
|
|
15
|
+
core_1.ux.log(msg.toString());
|
|
16
|
+
};
|
|
17
|
+
/*
|
|
18
|
+
* NOTE: Please read "Notes about the hook scripts" in this PR before making changes:
|
|
19
|
+
* https://github.com/salesforcecli/sfdx-cli/pull/407
|
|
20
|
+
*/
|
|
21
|
+
const hook = async () => new Promise((resolve) => {
|
|
22
|
+
if (process.env.SFDX_HIDE_RELEASE_NOTES === 'true' || process.env.SF_HIDE_RELEASE_NOTES === 'true') {
|
|
23
|
+
resolve();
|
|
24
|
+
}
|
|
25
|
+
const executable = process.platform === 'win32' ? 'run.cmd' : 'run';
|
|
26
|
+
const cmd = (0, child_process_1.spawn)((0, path_1.join)(__dirname, '..', '..', 'bin', executable), ['whatsnew', '--hook'], {
|
|
27
|
+
stdio: ['ignore', 'inherit', 'pipe'],
|
|
28
|
+
timeout: 10000,
|
|
29
|
+
});
|
|
30
|
+
cmd.stderr.on('data', (error) => {
|
|
31
|
+
logError(error);
|
|
32
|
+
resolve();
|
|
33
|
+
});
|
|
34
|
+
cmd.on('error', (error) => {
|
|
35
|
+
logError(error);
|
|
36
|
+
resolve();
|
|
37
|
+
});
|
|
38
|
+
// 'exit' fires whether or not the stream are finished
|
|
39
|
+
cmd.on('exit', () => {
|
|
40
|
+
resolve();
|
|
41
|
+
});
|
|
42
|
+
cmd.on('close', () => {
|
|
43
|
+
resolve();
|
|
44
|
+
});
|
|
45
|
+
});
|
|
46
|
+
exports.default = hook;
|
|
47
|
+
//# sourceMappingURL=display-release-notes.js.map
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/cli",
|
|
3
|
-
"version": "2.0.0-beta.
|
|
3
|
+
"version": "2.0.0-beta.31",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@salesforce/cli",
|
|
9
|
-
"version": "2.0.0-beta.
|
|
9
|
+
"version": "2.0.0-beta.31",
|
|
10
10
|
"hasInstallScript": true,
|
|
11
11
|
"license": "BSD-3-Clause",
|
|
12
12
|
"dependencies": {
|
package/oclif.manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/cli",
|
|
3
3
|
"description": "The Salesforce CLI",
|
|
4
|
-
"version": "2.0.0-beta.
|
|
4
|
+
"version": "2.0.0-beta.31",
|
|
5
5
|
"author": "Salesforce",
|
|
6
6
|
"bin": {
|
|
7
7
|
"sf": "./bin/run",
|
|
@@ -18,7 +18,8 @@
|
|
|
18
18
|
"/dist/**/*.js",
|
|
19
19
|
"/oclif.manifest.json",
|
|
20
20
|
"/npm-shrinkwrap.json",
|
|
21
|
-
"/scripts/preinstall.js"
|
|
21
|
+
"/scripts/preinstall.js",
|
|
22
|
+
"/scripts/post-install-release-notes.js"
|
|
22
23
|
],
|
|
23
24
|
"keywords": [
|
|
24
25
|
"oclif",
|
|
@@ -85,7 +86,8 @@
|
|
|
85
86
|
"hooks": {
|
|
86
87
|
"preupdate": "./dist/hooks/preupdate",
|
|
87
88
|
"command_incomplete": "./dist/hooks/incomplete",
|
|
88
|
-
"plugins:preinstall": "./dist/hooks/pluginsPreinstall.js"
|
|
89
|
+
"plugins:preinstall": "./dist/hooks/pluginsPreinstall.js",
|
|
90
|
+
"update": "./dist/hooks/display-release-notes.js"
|
|
89
91
|
},
|
|
90
92
|
"update": {
|
|
91
93
|
"s3": {
|
|
@@ -206,6 +208,7 @@
|
|
|
206
208
|
"pack:win": "oclif pack:win",
|
|
207
209
|
"postpack": "rm -f oclif.manifest.json npm-shrinkwrap.json",
|
|
208
210
|
"preinstall": "node ./scripts/preinstall.js",
|
|
211
|
+
"postinstall": "node ./scripts/post-install-release-notes.js",
|
|
209
212
|
"prepack": "sf-prepack",
|
|
210
213
|
"prepare": "sf-install && yarn compile && yarn lint",
|
|
211
214
|
"prepublishOnly": "npm shrinkwrap",
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const { spawn } = require('child_process');
|
|
4
|
+
const { join } = require('path');
|
|
5
|
+
|
|
6
|
+
if (process.env.SFDX_HIDE_RELEASE_NOTES === 'true' || process.env.SF_HIDE_RELEASE_NOTES === 'true') process.exit(0);
|
|
7
|
+
|
|
8
|
+
const logAndExit = (msg) => {
|
|
9
|
+
console.log('NOTE: This error can be ignored in CI and may be silenced in the future');
|
|
10
|
+
console.log('- Set the SF_HIDE_RELEASE_NOTES env var to "true" to skip this script\n');
|
|
11
|
+
console.log(msg.toString());
|
|
12
|
+
|
|
13
|
+
process.exit(0);
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
/*
|
|
17
|
+
* NOTE: Please read "Notes about the hook scripts" in this PR before making changes:
|
|
18
|
+
* https://github.com/salesforcecli/sfdx-cli/pull/407
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
var executable = process.platform === 'win32' ? 'run.cmd' : 'run';
|
|
22
|
+
|
|
23
|
+
var cmd = spawn(join(__dirname, '..', 'bin', executable), ['whatsnew', '--hook'], {
|
|
24
|
+
stdio: ['ignore', 'inherit', 'pipe'],
|
|
25
|
+
timeout: 10000,
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
cmd.stderr.on('data', (error) => {
|
|
29
|
+
logAndExit(error);
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
cmd.on('error', (error) => {
|
|
33
|
+
logAndExit(error);
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
// 'exit' fires whether or not the stream are finished
|
|
37
|
+
cmd.on('exit', (code) => {
|
|
38
|
+
process.exit(0);
|
|
39
|
+
});
|