@salesforce/plugin-info 1.1.0
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 +22 -0
- package/LICENSE.txt +12 -0
- package/README.md +112 -0
- package/lib/commands/info/releasenotes/display.d.ts +12 -0
- package/lib/commands/info/releasenotes/display.js +87 -0
- package/lib/commands/info/releasenotes/display.js.map +1 -0
- package/lib/constants.d.ts +1 -0
- package/lib/constants.js +11 -0
- package/lib/constants.js.map +1 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.js +9 -0
- package/lib/index.js.map +1 -0
- package/lib/shared/getDistTagVersion.d.ts +6 -0
- package/lib/shared/getDistTagVersion.js +21 -0
- package/lib/shared/getDistTagVersion.js.map +1 -0
- package/lib/shared/getInfoConfig.d.ts +15 -0
- package/lib/shared/getInfoConfig.js +36 -0
- package/lib/shared/getInfoConfig.js.map +1 -0
- package/lib/shared/getReleaseNotes.d.ts +2 -0
- package/lib/shared/getReleaseNotes.js +29 -0
- package/lib/shared/getReleaseNotes.js.map +1 -0
- package/lib/shared/parseReleaseNotes.d.ts +3 -0
- package/lib/shared/parseReleaseNotes.js +46 -0
- package/lib/shared/parseReleaseNotes.js.map +1 -0
- package/messages/display.js +24 -0
- package/messages/messages.json +22 -0
- package/oclif.manifest.json +1 -0
- package/package.json +132 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
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
|
+
|
|
5
|
+
## [1.1.0](https://github.com/salesforcecli/plugin-info/compare/v1.0.0...v1.1.0) (2021-11-22)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* initial setup and release notes fetch ([d258d91](https://github.com/salesforcecli/plugin-info/commit/d258d91cf3f781c0afbc4f8b3c776cd4fd0085ef))
|
|
11
|
+
* parse and render release notes ([f5e3398](https://github.com/salesforcecli/plugin-info/commit/f5e3398f14e74aa1f83fa308c9601f1b770afcae))
|
|
12
|
+
* parse release notes ([83f0a47](https://github.com/salesforcecli/plugin-info/commit/83f0a47d5e54e0e0cacace1f3bc12ad757aa6e38))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Bug Fixes
|
|
16
|
+
|
|
17
|
+
* no more partial version match. updates footer ([010c4f3](https://github.com/salesforcecli/plugin-info/commit/010c4f38e963e416f57032db9578a28b26ed2b08))
|
|
18
|
+
* pin typescript ([c02bd4e](https://github.com/salesforcecli/plugin-info/commit/c02bd4e0beb4b686e5a3e6ced866e97d4d61ed88))
|
|
19
|
+
* switch from axios to got, added tests ([ef74275](https://github.com/salesforcecli/plugin-info/commit/ef74275517f2305e705e9f21d62f9f916a17471a))
|
|
20
|
+
* test for Windows ([16db159](https://github.com/salesforcecli/plugin-info/commit/16db159ca3fb64a51f0076881bea5df37e4edce9))
|
|
21
|
+
|
|
22
|
+
## 1.0.0 (2021-10-12)
|
package/LICENSE.txt
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
Copyright (c) 2018, Salesforce.com, Inc.
|
|
2
|
+
All rights reserved.
|
|
3
|
+
|
|
4
|
+
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
|
5
|
+
|
|
6
|
+
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
|
7
|
+
|
|
8
|
+
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
|
9
|
+
|
|
10
|
+
* Neither the name of Salesforce.com nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
|
11
|
+
|
|
12
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
package/README.md
ADDED
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
# plugin-info
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/@salesforce/plugin-info) [](https://circleci.com/gh/salesforcecli/plugin-info/tree/main) [](https://npmjs.org/package/@salesforce/plugin-info) [](https://raw.githubusercontent.com/salesforcecli/plugin-info/main/LICENSE.txt)
|
|
4
|
+
## Learn about the plugin-info
|
|
5
|
+
|
|
6
|
+
Salesforce CLI plugins are based on the [oclif plugin framework](<(https://oclif.io/docs/introduction.html)>). Read the [plugin developer guide](https://developer.salesforce.com/docs/atlas.en-us.sfdx_cli_plugins.meta/sfdx_cli_plugins/cli_plugins_architecture_sf_cli.htm) to learn about Salesforce CLI plugin development.
|
|
7
|
+
|
|
8
|
+
This repository contains a lot of additional scripts and tools to help with general Salesforce node development and enforce coding standards. You should familiarize yourself with some of the [node developer packages](https://github.com/forcedotcom/sfdx-dev-packages/) used by Salesforce. There is also a default circleci config using the [release management orb](https://github.com/forcedotcom/npm-release-management-orb) standards.
|
|
9
|
+
|
|
10
|
+
Additionally, there are some additional tests that the Salesforce CLI will enforce if this plugin is ever bundled with the CLI. These test are included by default under the `posttest` script and it is recommended to keep these tests active in your plugin, regardless if you plan to have it bundled.
|
|
11
|
+
|
|
12
|
+
This plugin is bundled with the [Salesforce CLI](https://developer.salesforce.com/tools/sfdxcli). For more information on the CLI, read the [getting started guide](https://developer.salesforce.com/docs/atlas.en-us.sfdx_setup.meta/sfdx_setup/sfdx_setup_intro.htm).
|
|
13
|
+
|
|
14
|
+
We always recommend using the latest version of these commands bundled with the CLI, however, you can install a specific version or tag if needed.
|
|
15
|
+
|
|
16
|
+
## Install
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
sfdx plugins:install info@x.y.z
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Issues
|
|
23
|
+
|
|
24
|
+
Please report any issues at https://github.com/forcedotcom/cli/issues
|
|
25
|
+
|
|
26
|
+
## Contributing
|
|
27
|
+
|
|
28
|
+
1. Please read our [Code of Conduct](CODE_OF_CONDUCT.md)
|
|
29
|
+
2. Create a new issue before starting your project so that we can keep track of
|
|
30
|
+
what you are trying to add/fix. That way, we can also offer suggestions or
|
|
31
|
+
let you know if there is already an effort in progress.
|
|
32
|
+
3. Fork this repository.
|
|
33
|
+
4. [Build the plugin locally](#build)
|
|
34
|
+
5. Create a _topic_ branch in your fork. Note, this step is recommended but technically not required if contributing using a fork.
|
|
35
|
+
6. Edit the code in your fork.
|
|
36
|
+
7. Write appropriate tests for your changes. Try to achieve at least 95% code coverage on any new code. No pull request will be accepted without unit tests.
|
|
37
|
+
8. Sign CLA (see [CLA](#cla) below).
|
|
38
|
+
9. Send us a pull request when you are done. We'll review your code, suggest any needed changes, and merge it in.
|
|
39
|
+
|
|
40
|
+
### CLA
|
|
41
|
+
|
|
42
|
+
External contributors will be required to sign a Contributor's License
|
|
43
|
+
Agreement. You can do so by going to https://cla.salesforce.com/sign-cla.
|
|
44
|
+
|
|
45
|
+
### Build
|
|
46
|
+
|
|
47
|
+
To build the plugin locally, make sure to have yarn installed and run the following commands:
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
# Clone the repository
|
|
51
|
+
git clone git@github.com:salesforcecli/plugin-info
|
|
52
|
+
|
|
53
|
+
# Install the dependencies and compile
|
|
54
|
+
yarn install
|
|
55
|
+
yarn build
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
To use your plugin, run using the local `./bin/run` or `./bin/run.cmd` file.
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
# Run using local run file.
|
|
62
|
+
./bin/run info
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
There should be no differences when running via the Salesforce CLI or using the local run file. However, it can be useful to link the plugin to do some additional testing or run your commands from anywhere on your machine.
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
# Link your plugin to the sfdx cli
|
|
69
|
+
sfdx plugins:link .
|
|
70
|
+
# To verify
|
|
71
|
+
sfdx plugins
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
## Commands
|
|
75
|
+
|
|
76
|
+
<!-- commands -->
|
|
77
|
+
* [`sfdx info:releasenotes:display [-v <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`](#sfdx-inforeleasenotesdisplay--v-string---json---loglevel-tracedebuginfowarnerrorfataltracedebuginfowarnerrorfatal)
|
|
78
|
+
|
|
79
|
+
## `sfdx info:releasenotes:display [-v <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`
|
|
80
|
+
|
|
81
|
+
display Salesforce CLI release notes on the command line
|
|
82
|
+
|
|
83
|
+
```
|
|
84
|
+
USAGE
|
|
85
|
+
$ sfdx info:releasenotes:display [-v <string>] [--json] [--loglevel
|
|
86
|
+
trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
|
|
87
|
+
|
|
88
|
+
OPTIONS
|
|
89
|
+
-v, --version=version CLI version or tag for which to
|
|
90
|
+
display release notes
|
|
91
|
+
|
|
92
|
+
--json format output as json
|
|
93
|
+
|
|
94
|
+
--loglevel=(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL) [default: warn] logging level for
|
|
95
|
+
this command invocation
|
|
96
|
+
|
|
97
|
+
ALIASES
|
|
98
|
+
$ sfdx whatsnew
|
|
99
|
+
|
|
100
|
+
EXAMPLES
|
|
101
|
+
Display release notes for the currently installed CLI version:
|
|
102
|
+
sfdx info:releasenotes:display
|
|
103
|
+
|
|
104
|
+
Display release notes for CLI version 7.120.0:
|
|
105
|
+
sfdx info:releasenotes:display --version 7.120.0
|
|
106
|
+
|
|
107
|
+
Display release notes for the CLI version that corresponds to a tag (stable, stable-rc, latest, latest-rc, rc):
|
|
108
|
+
sfdx info:releasenotes:display --version latest
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
_See code: [src/commands/info/releasenotes/display.ts](https://github.com/salesforcecli/plugin-info/blob/v1.1.0/src/commands/info/releasenotes/display.ts)_
|
|
112
|
+
<!-- commandsstop -->
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { flags, SfdxCommand } from '@salesforce/command';
|
|
2
|
+
export default class Display extends SfdxCommand {
|
|
3
|
+
private static helpers;
|
|
4
|
+
static description: string;
|
|
5
|
+
static aliases: string[];
|
|
6
|
+
static examples: string[];
|
|
7
|
+
protected static flagsConfig: {
|
|
8
|
+
version: flags.Discriminated<flags.String>;
|
|
9
|
+
hook: flags.Discriminated<flags.Boolean<boolean>>;
|
|
10
|
+
};
|
|
11
|
+
run(): Promise<void>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
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
|
+
// Needed this to ensure the "helpers" were declared before read in examples
|
|
10
|
+
/* eslint-disable @typescript-eslint/member-ordering */
|
|
11
|
+
const os = require("os");
|
|
12
|
+
const marked_1 = require("marked");
|
|
13
|
+
const TerminalRenderer = require("marked-terminal");
|
|
14
|
+
const kit_1 = require("@salesforce/kit");
|
|
15
|
+
const command_1 = require("@salesforce/command");
|
|
16
|
+
const core_1 = require("@salesforce/core");
|
|
17
|
+
const getInfoConfig_1 = require("../../../shared/getInfoConfig");
|
|
18
|
+
const getReleaseNotes_1 = require("../../../shared/getReleaseNotes");
|
|
19
|
+
const getDistTagVersion_1 = require("../../../shared/getDistTagVersion");
|
|
20
|
+
const parseReleaseNotes_1 = require("../../../shared/parseReleaseNotes");
|
|
21
|
+
// Initialize Messages with the current plugin directory
|
|
22
|
+
core_1.Messages.importMessagesDirectory(__dirname);
|
|
23
|
+
const HIDE_NOTES = 'PLUGIN_INFO_HIDE_RELEASE_NOTES';
|
|
24
|
+
const HIDE_FOOTER = 'PLUGIN_INFO_HIDE_FOOTER';
|
|
25
|
+
// Load the specific messages for this file. Messages from @salesforce/command, @salesforce/core,
|
|
26
|
+
// or any library that is using the messages framework can also be loaded this way.
|
|
27
|
+
const messages = core_1.Messages.loadMessages('@salesforce/plugin-info', 'display');
|
|
28
|
+
class Display extends command_1.SfdxCommand {
|
|
29
|
+
async run() {
|
|
30
|
+
var _a;
|
|
31
|
+
const env = new kit_1.Env();
|
|
32
|
+
if (env.getBoolean(HIDE_NOTES)) {
|
|
33
|
+
// We don't ever want to exit the process for info:releasenotes:display (whatsnew)
|
|
34
|
+
// In most cases we will log a message, but here we only trace log in case someone using stdout of the update command
|
|
35
|
+
this.logger.trace(`release notes disabled via env var: ${HIDE_NOTES}`);
|
|
36
|
+
this.logger.trace('exiting');
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
const isHook = !!this.flags.hook;
|
|
40
|
+
try {
|
|
41
|
+
const installedVersion = this.config.pjson.version;
|
|
42
|
+
const infoConfig = await (0, getInfoConfig_1.getInfoConfig)(this.config.root);
|
|
43
|
+
const { distTagUrl, releaseNotesPath, releaseNotesFilename } = infoConfig.releasenotes;
|
|
44
|
+
let version = (_a = this.flags.version) !== null && _a !== void 0 ? _a : installedVersion;
|
|
45
|
+
if (Display.helpers.includes(version)) {
|
|
46
|
+
version = await (0, getDistTagVersion_1.getDistTagVersion)(distTagUrl, version);
|
|
47
|
+
}
|
|
48
|
+
const releaseNotes = await (0, getReleaseNotes_1.getReleaseNotes)(releaseNotesPath, releaseNotesFilename, version);
|
|
49
|
+
const tokens = (0, parseReleaseNotes_1.parseReleaseNotes)(releaseNotes, version, releaseNotesPath);
|
|
50
|
+
marked_1.marked.setOptions({
|
|
51
|
+
renderer: new TerminalRenderer(),
|
|
52
|
+
});
|
|
53
|
+
this.ux.log(marked_1.marked.parser(tokens));
|
|
54
|
+
if (isHook && !env.getBoolean(HIDE_FOOTER)) {
|
|
55
|
+
const footer = messages.getMessage('footer', [this.config.bin, releaseNotesPath, HIDE_NOTES, HIDE_FOOTER]);
|
|
56
|
+
this.ux.log(marked_1.marked.parse(footer));
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
catch (err) {
|
|
60
|
+
if (isHook) {
|
|
61
|
+
// Do not throw error if --hook is passed, just warn so we don't exit any processes.
|
|
62
|
+
// --hook is passed in the post install/update scripts
|
|
63
|
+
const { message, stack } = err;
|
|
64
|
+
this.ux.warn(`${this.id} failed: ${message}`);
|
|
65
|
+
this.logger.trace(stack);
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
throw err;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
exports.default = Display;
|
|
73
|
+
Display.helpers = ['stable', 'stable-rc', 'latest', 'latest-rc', 'rc'];
|
|
74
|
+
Display.description = messages.getMessage('commandDescription');
|
|
75
|
+
Display.aliases = ['whatsnew'];
|
|
76
|
+
Display.examples = messages.getMessage('examples', [Display.helpers.join(', ')]).split(os.EOL);
|
|
77
|
+
Display.flagsConfig = {
|
|
78
|
+
version: command_1.flags.string({
|
|
79
|
+
char: 'v',
|
|
80
|
+
description: messages.getMessage('flags.version'),
|
|
81
|
+
}),
|
|
82
|
+
hook: command_1.flags.boolean({
|
|
83
|
+
hidden: true,
|
|
84
|
+
description: messages.getMessage('flags.hook'),
|
|
85
|
+
}),
|
|
86
|
+
};
|
|
87
|
+
//# sourceMappingURL=display.js.map
|
|
@@ -0,0 +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,iDAAyD;AACzD,2CAA4C;AAC5C,iEAA8D;AAC9D,qEAAkE;AAClE,yEAAsE;AACtE,yEAAsE;AAEtE,wDAAwD;AACxD,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAE5C,MAAM,UAAU,GAAG,gCAAgC,CAAC;AACpD,MAAM,WAAW,GAAG,yBAAyB,CAAC;AAE9C,iGAAiG;AACjG,mFAAmF;AACnF,MAAM,QAAQ,GAAG,eAAQ,CAAC,YAAY,CAAC,yBAAyB,EAAE,SAAS,CAAC,CAAC;AAE7E,MAAqB,OAAQ,SAAQ,qBAAW;IAoBvC,KAAK,CAAC,GAAG;;QACd,MAAM,GAAG,GAAG,IAAI,SAAG,EAAE,CAAC;QAEtB,IAAI,GAAG,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE;YAC9B,kFAAkF;YAClF,qHAAqH;YACrH,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,uCAAuC,UAAU,EAAE,CAAC,CAAC;YACvE,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;YAE7B,OAAO;SACR;QAED,MAAM,MAAM,GAAG,CA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* 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
|
+
exports.PLUGIN_INFO_GET_TIMEOUT = void 0;
|
|
10
|
+
exports.PLUGIN_INFO_GET_TIMEOUT = (process.env.PLUGIN_INFO_GET_TIMEOUT || 3000);
|
|
11
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEU,QAAA,uBAAuB,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,uBAAuB,IAAI,IAAI,CAAW,CAAC"}
|
package/lib/index.d.ts
ADDED
package/lib/index.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
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
|
+
module.exports = {};
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;AAEH,iBAAS,EAAE,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
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
|
+
exports.getDistTagVersion = void 0;
|
|
10
|
+
const got_1 = require("got");
|
|
11
|
+
const constants_1 = require("../constants");
|
|
12
|
+
const getDistTagVersion = async (url, distTag) => {
|
|
13
|
+
// TODO: Could use npm instead here. That way private cli repos could auth with .npmrc
|
|
14
|
+
// -- could utilize this: https://github.com/salesforcecli/plugin-trust/blob/0393b906a30e8858816625517eda5db69377c178/src/lib/npmCommand.ts
|
|
15
|
+
const options = { timeout: constants_1.PLUGIN_INFO_GET_TIMEOUT };
|
|
16
|
+
const body = await (0, got_1.default)(url, options).json();
|
|
17
|
+
// We are only interested in latest and latest-rc, could update this if other tags are desired
|
|
18
|
+
return distTag.includes('rc') ? body['latest-rc'] : body['latest'];
|
|
19
|
+
};
|
|
20
|
+
exports.getDistTagVersion = getDistTagVersion;
|
|
21
|
+
//# sourceMappingURL=getDistTagVersion.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getDistTagVersion.js","sourceRoot":"","sources":["../../src/shared/getDistTagVersion.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,6BAAsB;AACtB,4CAAuD;AAOvD,MAAM,iBAAiB,GAAG,KAAK,EAAE,GAAW,EAAE,OAAe,EAAmB,EAAE;IAChF,sFAAsF;IACtF,2IAA2I;IAC3I,MAAM,OAAO,GAAG,EAAE,OAAO,EAAE,mCAAuB,EAAE,CAAC;IAErD,MAAM,IAAI,GAAG,MAAM,IAAA,aAAG,EAAC,GAAG,EAAE,OAAO,CAAC,CAAC,IAAI,EAAe,CAAC;IAEzD,8FAA8F;IAC9F,OAAO,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;AACrE,CAAC,CAAC;AAEO,8CAAiB"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { PJSON } from '@oclif/config';
|
|
2
|
+
export interface PjsonWithInfo extends PJSON {
|
|
3
|
+
oclif: PJSON['oclif'] & {
|
|
4
|
+
info: InfoConfig;
|
|
5
|
+
};
|
|
6
|
+
}
|
|
7
|
+
export interface InfoConfig {
|
|
8
|
+
releasenotes: {
|
|
9
|
+
distTagUrl: string;
|
|
10
|
+
releaseNotesPath: string;
|
|
11
|
+
releaseNotesFilename: string;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
declare const getInfoConfig: (path: string) => Promise<InfoConfig>;
|
|
15
|
+
export { getInfoConfig };
|
|
@@ -0,0 +1,36 @@
|
|
|
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
|
+
exports.getInfoConfig = void 0;
|
|
10
|
+
const path_1 = require("path");
|
|
11
|
+
const core_1 = require("@salesforce/core");
|
|
12
|
+
/* sfdx example to add to cli pjson.oclif
|
|
13
|
+
|
|
14
|
+
example location with npm install:
|
|
15
|
+
~/.nvm/versions/node/v14.17.5/lib/node_modules/sfdx-cli/package.json
|
|
16
|
+
|
|
17
|
+
Add to oclif object
|
|
18
|
+
"info": {
|
|
19
|
+
"releasenotes": {
|
|
20
|
+
"distTagUrl": "https://registry.npmjs.org/-/package/sfdx-cli/dist-tags",
|
|
21
|
+
"releaseNotesPath": "https://github.com/forcedotcom/cli/tree/main/releasenotes/sfdx",
|
|
22
|
+
"releaseNotesFilename": "README.md"
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
*/
|
|
26
|
+
const getInfoConfig = async (path) => {
|
|
27
|
+
// TODO: could add env var support for these values
|
|
28
|
+
const fullPath = (0, path_1.join)(path, 'package.json');
|
|
29
|
+
const json = (await core_1.fs.readJson(fullPath));
|
|
30
|
+
const { info } = json.oclif;
|
|
31
|
+
if (!info)
|
|
32
|
+
throw new Error('getInfoConfig() failed to find pjson.oclif.info config');
|
|
33
|
+
return info;
|
|
34
|
+
};
|
|
35
|
+
exports.getInfoConfig = getInfoConfig;
|
|
36
|
+
//# sourceMappingURL=getInfoConfig.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getInfoConfig.js","sourceRoot":"","sources":["../../src/shared/getInfoConfig.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,+BAA4B;AAC5B,2CAAsC;AAiBtC;;;;;;;;;;;;;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,CAAC,MAAM,SAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAkB,CAAC;IAE5D,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"}
|
|
@@ -0,0 +1,29 @@
|
|
|
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
|
+
exports.getReleaseNotes = void 0;
|
|
10
|
+
const got_1 = require("got");
|
|
11
|
+
const semver_1 = require("semver");
|
|
12
|
+
const constants_1 = require("../constants");
|
|
13
|
+
const getReleaseNotes = async (base, filename, version) => {
|
|
14
|
+
const majorVersion = (0, semver_1.major)(version);
|
|
15
|
+
const rawBase = base.replace('github.com', 'raw.githubusercontent.com').replace('/blob/', '/').replace('/tree/', '/');
|
|
16
|
+
const options = {
|
|
17
|
+
timeout: constants_1.PLUGIN_INFO_GET_TIMEOUT,
|
|
18
|
+
throwHttpErrors: false,
|
|
19
|
+
};
|
|
20
|
+
const getPromises = [
|
|
21
|
+
(0, got_1.default)(`${rawBase}/v${majorVersion}.md`, options),
|
|
22
|
+
(0, got_1.default)(`${rawBase}/${filename}`, { ...options, throwHttpErrors: true }),
|
|
23
|
+
];
|
|
24
|
+
const [versioned, readme] = await Promise.all(getPromises);
|
|
25
|
+
const { body } = versioned.statusCode === 200 ? versioned : readme;
|
|
26
|
+
return body;
|
|
27
|
+
};
|
|
28
|
+
exports.getReleaseNotes = getReleaseNotes;
|
|
29
|
+
//# sourceMappingURL=getReleaseNotes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getReleaseNotes.js","sourceRoot":"","sources":["../../src/shared/getReleaseNotes.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,6BAAsB;AACtB,mCAA+B;AAC/B,4CAAuD;AAEvD,MAAM,eAAe,GAAG,KAAK,EAAE,IAAY,EAAE,QAAgB,EAAE,OAAe,EAAmB,EAAE;IACjG,MAAM,YAAY,GAAG,IAAA,cAAK,EAAC,OAAO,CAAC,CAAC;IAEpC,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,YAAY,EAAE,2BAA2B,CAAC,CAAC,OAAO,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC;IAEtH,MAAM,OAAO,GAAG;QACd,OAAO,EAAE,mCAAuB;QAChC,eAAe,EAAE,KAAK;KACvB,CAAC;IAEF,MAAM,WAAW,GAAG;QAClB,IAAA,aAAG,EAAC,GAAG,OAAO,KAAK,YAAY,KAAK,EAAE,OAAO,CAAC;QAC9C,IAAA,aAAG,EAAC,GAAG,OAAO,IAAI,QAAQ,EAAE,EAAE,EAAE,GAAG,OAAO,EAAE,eAAe,EAAE,IAAI,EAAE,CAAC;KACrE,CAAC;IAEF,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;IAE3D,MAAM,EAAE,IAAI,EAAE,GAAG,SAAS,CAAC,UAAU,KAAK,GAAG,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC;IAEnE,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAEO,0CAAe"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright (c) 2018, 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.parseReleaseNotes = void 0;
|
|
10
|
+
const marked_1 = require("marked");
|
|
11
|
+
const parseReleaseNotes = (notes, version, baseUrl) => {
|
|
12
|
+
let found = false;
|
|
13
|
+
const parsed = marked_1.marked.lexer(notes);
|
|
14
|
+
// https://stackoverflow.com/a/6969486
|
|
15
|
+
const escapeRegExp = (string) => {
|
|
16
|
+
return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); // $& means the whole matched string
|
|
17
|
+
};
|
|
18
|
+
const regexp = new RegExp(`\\b${escapeRegExp(version)}\\b`);
|
|
19
|
+
const tokens = parsed.filter((token) => {
|
|
20
|
+
// TODO: Could make header depth (2) a setting in oclif.info.releasenotes
|
|
21
|
+
if (token.type === 'heading' && token.depth === 2) {
|
|
22
|
+
if (regexp.exec(token.text)) {
|
|
23
|
+
found = true;
|
|
24
|
+
return token;
|
|
25
|
+
}
|
|
26
|
+
found = false;
|
|
27
|
+
}
|
|
28
|
+
else if (found === true) {
|
|
29
|
+
return token;
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
if (!tokens.length) {
|
|
33
|
+
throw new Error(`Didn't find version '${version}'. View release notes online at: ${baseUrl}`);
|
|
34
|
+
}
|
|
35
|
+
const fixRelativeLinks = (token) => {
|
|
36
|
+
// If link is relative, add the baseurl. https://regex101.com/r/h802kJ/1
|
|
37
|
+
// FWIW: 'marked' does have a 'baseURL' option, but the 'marked-terminal' renderer does not honor it
|
|
38
|
+
if (token.type === 'link' && !token.href.match(/(?:[a-z][a-z0-9+.-]*:|\/\/)/gi)) {
|
|
39
|
+
token.href = `${baseUrl}/${token.href}`;
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
marked_1.marked.walkTokens(tokens, fixRelativeLinks);
|
|
43
|
+
return tokens;
|
|
44
|
+
};
|
|
45
|
+
exports.parseReleaseNotes = parseReleaseNotes;
|
|
46
|
+
//# sourceMappingURL=parseReleaseNotes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parseReleaseNotes.js","sourceRoot":"","sources":["../../src/shared/parseReleaseNotes.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,mCAAgC;AAEhC,MAAM,iBAAiB,GAAG,CAAC,KAAa,EAAE,OAAe,EAAE,OAAe,EAAkB,EAAE;IAC5F,IAAI,KAAK,GAAG,KAAK,CAAC;IAElB,MAAM,MAAM,GAAG,eAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAEnC,sCAAsC;IACtC,MAAM,YAAY,GAAG,CAAC,MAAc,EAAU,EAAE;QAC9C,OAAO,MAAM,CAAC,O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+
flags: {
|
|
4
|
+
version: 'CLI version or tag for which to display release notes',
|
|
5
|
+
hook: 'suppresses errors; this is a hidden parameter used after install or update',
|
|
6
|
+
},
|
|
7
|
+
examples: [
|
|
8
|
+
`Display release notes for the currently installed CLI version:
|
|
9
|
+
<%= config.bin %> <%= command.id %>
|
|
10
|
+
|
|
11
|
+
Display release notes for CLI version 7.120.0:
|
|
12
|
+
<%= config.bin %> <%= command.id %> --version 7.120.0
|
|
13
|
+
|
|
14
|
+
Display release notes for the CLI version that corresponds to a tag (%s):
|
|
15
|
+
<%= config.bin %> <%= command.id %> --version latest
|
|
16
|
+
`,
|
|
17
|
+
],
|
|
18
|
+
footer: `---
|
|
19
|
+
- Run \`%s whatsnew\` to manually view the current release notes.
|
|
20
|
+
- You can also view them on GitHub by visiting the [forcedotcom/cli](%s) repo.
|
|
21
|
+
- Silence notes by setting the \`%s\` env var to \`true\`.
|
|
22
|
+
- Hide this footer by setting the \`%s\` env var to \`true\`.
|
|
23
|
+
---`,
|
|
24
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"HelpDefaults": "If not supplied, the apiversion, template, and outputdir use default values.\n",
|
|
3
|
+
"HelpOutputDirRelative": "The outputdir can be an absolute path or relative to the current working directory.\n",
|
|
4
|
+
"HelpOutputDirRelativeLightning": "If you don’t specify an outputdir, we create a subfolder in your current working directory with the name of your bundle. For example, if the current working directory is force-app and your Lightning bundle is called myBundle, we create force-app/myBundle/ to store the files in the bundle.\n",
|
|
5
|
+
"HelpExamplesTitle": "\nExamples:\n",
|
|
6
|
+
"OutputDirFlagDescription": "folder for saving the created files",
|
|
7
|
+
"OutputDirFlagLongDescription": "The directory to store the newly created files. The location can be an absolute path or relative to the current working directory. The default is the current directory.",
|
|
8
|
+
"TemplateFlagDescription": "template to use for file creation",
|
|
9
|
+
"TemplateFlagLongDescription": "The template to use to create the file. Supplied parameter values or default values are filled into a copy of the template.",
|
|
10
|
+
"TargetDirOutput": "target dir = %s",
|
|
11
|
+
"App": "app",
|
|
12
|
+
"Event": "event",
|
|
13
|
+
"Interface": "interface",
|
|
14
|
+
"Test": "test",
|
|
15
|
+
"Component": "component",
|
|
16
|
+
"Page": "page",
|
|
17
|
+
|
|
18
|
+
"AlphaNumericNameError": "Name must contain only alphanumeric characters.",
|
|
19
|
+
"NameMustStartWithLetterError": "Name must start with a letter.",
|
|
20
|
+
"EndWithUnderscoreError": "Name can't end with an underscore.",
|
|
21
|
+
"DoubleUnderscoreError": "Name can't contain 2 consecutive underscores."
|
|
22
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":"1.1.0","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":"suppresses errors; this is a hidden parameter used after install or update","hidden":true,"allowNo":false}},"args":[]}}}
|
package/package.json
ADDED
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@salesforce/plugin-info",
|
|
3
|
+
"description": "Plugin for accessing cli info from the command line",
|
|
4
|
+
"version": "1.1.0",
|
|
5
|
+
"author": "Salesforce",
|
|
6
|
+
"bugs": "https://github.com/forcedotcom/cli/issues",
|
|
7
|
+
"dependencies": {
|
|
8
|
+
"@oclif/config": "^1",
|
|
9
|
+
"@salesforce/command": "^4.1.5",
|
|
10
|
+
"@salesforce/core": "^2.29.0",
|
|
11
|
+
"@salesforce/kit": "^1.5.17",
|
|
12
|
+
"got": "^11.8.2",
|
|
13
|
+
"marked": "^4.0.1",
|
|
14
|
+
"marked-terminal": "^4.2.0",
|
|
15
|
+
"semver": "^7.3.5",
|
|
16
|
+
"sinon-chai": "^3.7.0",
|
|
17
|
+
"tslib": "^2"
|
|
18
|
+
},
|
|
19
|
+
"devDependencies": {
|
|
20
|
+
"@oclif/dev-cli": "^1",
|
|
21
|
+
"@oclif/plugin-command-snapshot": "^2.2.2",
|
|
22
|
+
"@salesforce/cli-plugins-testkit": "^1.4.17",
|
|
23
|
+
"@salesforce/dev-config": "^2.1.2",
|
|
24
|
+
"@salesforce/dev-scripts": "^0.9.18",
|
|
25
|
+
"@salesforce/plugin-command-reference": "^1.3.17",
|
|
26
|
+
"@salesforce/prettier-config": "^0.0.2",
|
|
27
|
+
"@salesforce/ts-sinon": "1.3.21",
|
|
28
|
+
"@types/fs-extra": "^9.0.13",
|
|
29
|
+
"@types/marked": "^4.0.0",
|
|
30
|
+
"@types/marked-terminal": "^3.1.3",
|
|
31
|
+
"@types/semver": "^7.3.8",
|
|
32
|
+
"@typescript-eslint/eslint-plugin": "^4.33.0",
|
|
33
|
+
"@typescript-eslint/parser": "^4.33.0",
|
|
34
|
+
"chai": "^4.3.4",
|
|
35
|
+
"cz-conventional-changelog": "^3.3.0",
|
|
36
|
+
"eslint": "^7.32.0",
|
|
37
|
+
"eslint-config-prettier": "^8.3.0",
|
|
38
|
+
"eslint-config-salesforce": "^0.1.6",
|
|
39
|
+
"eslint-config-salesforce-license": "^0.1.6",
|
|
40
|
+
"eslint-config-salesforce-typescript": "^0.2.8",
|
|
41
|
+
"eslint-plugin-header": "^3.1.1",
|
|
42
|
+
"eslint-plugin-import": "^2.25.3",
|
|
43
|
+
"eslint-plugin-jsdoc": "^35.5.1",
|
|
44
|
+
"eslint-plugin-prettier": "^3.4.1",
|
|
45
|
+
"husky": "^4.3.8",
|
|
46
|
+
"lint-staged": "^11.2.6",
|
|
47
|
+
"mocha": "^8.4.0",
|
|
48
|
+
"nyc": "^15.1.0",
|
|
49
|
+
"prettier": "^2.4.1",
|
|
50
|
+
"pretty-quick": "^3.1.0",
|
|
51
|
+
"shx": "0.3.3",
|
|
52
|
+
"sinon": "^11.1.1",
|
|
53
|
+
"ts-node": "^10.4.0",
|
|
54
|
+
"typescript": "^4.5.2"
|
|
55
|
+
},
|
|
56
|
+
"config": {
|
|
57
|
+
"commitizen": {
|
|
58
|
+
"path": "cz-conventional-changelog"
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
"engines": {
|
|
62
|
+
"node": ">=12.0.0"
|
|
63
|
+
},
|
|
64
|
+
"files": [
|
|
65
|
+
"/lib",
|
|
66
|
+
"/messages",
|
|
67
|
+
"/oclif.manifest.json"
|
|
68
|
+
],
|
|
69
|
+
"homepage": "https://github.com/salesforcecli/plugin-info",
|
|
70
|
+
"keywords": [
|
|
71
|
+
"force",
|
|
72
|
+
"salesforce",
|
|
73
|
+
"sfdx",
|
|
74
|
+
"salesforcedx",
|
|
75
|
+
"sfdx-plugin"
|
|
76
|
+
],
|
|
77
|
+
"license": "BSD-3-Clause",
|
|
78
|
+
"oclif": {
|
|
79
|
+
"commands": "./lib/commands",
|
|
80
|
+
"bin": "sfdx",
|
|
81
|
+
"devPlugins": [
|
|
82
|
+
"@oclif/plugin-help",
|
|
83
|
+
"@oclif/plugin-command-snapshot",
|
|
84
|
+
"@salesforce/plugin-command-reference"
|
|
85
|
+
],
|
|
86
|
+
"topics": {
|
|
87
|
+
"info": {
|
|
88
|
+
"description": "access cli info from the command line",
|
|
89
|
+
"subtopics": {
|
|
90
|
+
"releasenotes": {
|
|
91
|
+
"description": "commands related to cli release notes"
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
"repository": "salesforcecli/plugin-info",
|
|
98
|
+
"scripts": {
|
|
99
|
+
"build": "sf-build",
|
|
100
|
+
"clean": "sf-clean",
|
|
101
|
+
"clean-all": "sf-clean all",
|
|
102
|
+
"clean:lib": "shx rm -rf lib && shx rm -rf coverage && shx rm -rf .nyc_output && shx rm -f oclif.manifest.json",
|
|
103
|
+
"compile": "sf-compile",
|
|
104
|
+
"docs": "sf-docs",
|
|
105
|
+
"format": "sf-format",
|
|
106
|
+
"lint": "sf-lint",
|
|
107
|
+
"postpack": "shx rm -f oclif.manifest.json",
|
|
108
|
+
"posttest": "yarn lint && yarn test:deprecation-policy && yarn test:command-reference",
|
|
109
|
+
"prepack": "sf-prepack",
|
|
110
|
+
"prepare": "sf-install",
|
|
111
|
+
"pretest": "sf-compile-test",
|
|
112
|
+
"test": "sf-test",
|
|
113
|
+
"test:command-reference": "./bin/run commandreference:generate --erroronwarnings",
|
|
114
|
+
"test:deprecation-policy": "./bin/run snapshot:compare",
|
|
115
|
+
"test:nuts": "nyc mocha \"**/*.nut.ts\" --slow 4500 --timeout 600000 --parallel",
|
|
116
|
+
"version": "oclif-dev readme"
|
|
117
|
+
},
|
|
118
|
+
"husky": {
|
|
119
|
+
"hooks": {
|
|
120
|
+
"pre-commit": "sf-husky-pre-commit",
|
|
121
|
+
"commit-msg": "sf-husky-commit-msg",
|
|
122
|
+
"pre-push": "sf-husky-pre-push"
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
"publishConfig": {
|
|
126
|
+
"access": "public"
|
|
127
|
+
},
|
|
128
|
+
"sfdx": {
|
|
129
|
+
"publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-info/1.1.0.crt",
|
|
130
|
+
"signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-info/1.1.0.sig"
|
|
131
|
+
}
|
|
132
|
+
}
|