@oclif/plugin-version 1.0.2 → 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 +26 -0
- package/README.md +1 -1
- package/lib/commands/version.d.ts +3 -0
- package/lib/commands/version.js +27 -1
- package/oclif.manifest.json +1 -1
- package/package.json +10 -9
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,32 @@
|
|
|
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
|
+
## [1.1.0](https://github.com/oclif/plugin-version/compare/v1.0.4...v1.1.0) (2022-06-13)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* allow getting more info from version command ([b47a1fd](https://github.com/oclif/plugin-version/commit/b47a1fd83cc09f179e1594e94291051a043caaa8))
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
* unit tests & lint ([a7037af](https://github.com/oclif/plugin-version/commit/a7037af4220d06f0f1ff63e09d837e2fe06568e5))
|
|
16
|
+
|
|
17
|
+
### [1.0.4](https://github.com/oclif/plugin-version/compare/v1.0.3...v1.0.4) (2022-01-06)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
* bump @oclif/core ([8e841bd](https://github.com/oclif/plugin-version/commit/8e841bd1a77fa3a6d6f450dfa5c5f06f80ebd87f))
|
|
23
|
+
|
|
24
|
+
### [1.0.3](https://github.com/oclif/plugin-version/compare/v1.0.2...v1.0.3) (2021-12-08)
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
### Bug Fixes
|
|
28
|
+
|
|
29
|
+
* bump demps ([f2098c8](https://github.com/oclif/plugin-version/commit/f2098c819b7265eac440f2863de7d95377735ae1))
|
|
30
|
+
|
|
5
31
|
### [1.0.2](https://github.com/oclif/plugin-version/compare/v1.0.1...v1.0.2) (2021-12-02)
|
|
6
32
|
|
|
7
33
|
### [1.0.1](https://github.com/oclif/plugin-version/compare/v1.0.0...v1.0.1) (2021-12-01)
|
package/README.md
CHANGED
|
@@ -6,4 +6,4 @@ An oclif command that shows the CLI version
|
|
|
6
6
|
[](https://npmjs.org/package/@oclif/plugin-version)
|
|
7
7
|
[](https://circleci.com/gh/oclif/plugin-version/tree/main)
|
|
8
8
|
[](https://npmjs.org/package/@oclif/plugin-version)
|
|
9
|
-
[](https://github.com/oclif/plugin-version/blob/
|
|
9
|
+
[](https://github.com/oclif/plugin-version/blob/main/package.json)
|
package/lib/commands/version.js
CHANGED
|
@@ -1,9 +1,35 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const core_1 = require("@oclif/core");
|
|
4
|
+
const node_os_1 = require("node:os");
|
|
4
5
|
class Version extends core_1.Command {
|
|
5
6
|
async run() {
|
|
6
|
-
|
|
7
|
+
const { flags } = await this.parse(Version);
|
|
8
|
+
let output = `${this.config.userAgent}${node_os_1.EOL}`;
|
|
9
|
+
if (flags.verbose) {
|
|
10
|
+
const versions = this.config.userAgent.split(' ');
|
|
11
|
+
const cliVersion = versions[0];
|
|
12
|
+
const architecture = versions[1];
|
|
13
|
+
const nodeVersion = versions[2];
|
|
14
|
+
let pluginVersions = '';
|
|
15
|
+
for (const plugin of this.config.plugins) {
|
|
16
|
+
pluginVersions += `${node_os_1.EOL}\t${plugin.name}@${plugin.version} (${plugin.type})`;
|
|
17
|
+
}
|
|
18
|
+
const osVersion = `${(0, node_os_1.type)()} ${(0, node_os_1.release)()}`;
|
|
19
|
+
output = ` CLI Version : ${node_os_1.EOL}\t${cliVersion}
|
|
20
|
+
${node_os_1.EOL} Architecture: ${node_os_1.EOL}\t${architecture}
|
|
21
|
+
${node_os_1.EOL} Node Version : ${node_os_1.EOL}\t${nodeVersion}
|
|
22
|
+
${node_os_1.EOL} Plugin Version: ${pluginVersions}
|
|
23
|
+
${node_os_1.EOL} OS and Version: ${node_os_1.EOL}\t${osVersion}
|
|
24
|
+
`;
|
|
25
|
+
}
|
|
26
|
+
process.stdout.write(output);
|
|
7
27
|
}
|
|
8
28
|
}
|
|
9
29
|
exports.default = Version;
|
|
30
|
+
Version.flags = {
|
|
31
|
+
verbose: core_1.Flags.boolean({
|
|
32
|
+
summary: 'Show additional information about the CLI.',
|
|
33
|
+
description: 'Additionally shows the architecture, node version, operating system, and versions of plugins that the CLI is using.',
|
|
34
|
+
}),
|
|
35
|
+
};
|
package/oclif.manifest.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"1.0
|
|
1
|
+
{"version":"1.1.0","commands":{"version":{"id":"version","strict":true,"pluginName":"@oclif/plugin-version","pluginAlias":"@oclif/plugin-version","pluginType":"core","aliases":[],"flags":{"verbose":{"name":"verbose","type":"boolean","summary":"Show additional information about the CLI.","description":"Additionally shows the architecture, node version, operating system, and versions of plugins that the CLI is using.","allowNo":false}},"args":[],"_globalFlags":{}}}}
|
package/package.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oclif/plugin-version",
|
|
3
3
|
"description": "A command that shows the CLI version",
|
|
4
|
-
"version": "1.0
|
|
4
|
+
"version": "1.1.0",
|
|
5
5
|
"author": "Salesforce",
|
|
6
6
|
"bugs": "https://github.com/oclif/plugin-version/issues",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@oclif/core": "^1.
|
|
8
|
+
"@oclif/core": "^1.1.1"
|
|
9
9
|
},
|
|
10
10
|
"devDependencies": {
|
|
11
11
|
"@commitlint/config-conventional": "^12.1.4",
|
|
12
|
-
"@oclif/plugin-help": "
|
|
13
|
-
"@oclif/test": "^2.0.
|
|
14
|
-
"@types/chai": "^4.1
|
|
12
|
+
"@oclif/plugin-help": "5.1.12",
|
|
13
|
+
"@oclif/test": "^2.0.3",
|
|
14
|
+
"@types/chai": "^4.3.1",
|
|
15
15
|
"@types/mocha": "^8.0.0",
|
|
16
16
|
"@types/node": "^14.0.26",
|
|
17
17
|
"chai": "^4.2.0",
|
|
@@ -21,9 +21,10 @@
|
|
|
21
21
|
"eslint-config-oclif-typescript": "^1.0.2",
|
|
22
22
|
"husky": "6",
|
|
23
23
|
"mocha": "^8.2.1",
|
|
24
|
-
"oclif": "2.
|
|
24
|
+
"oclif": "2.1.0",
|
|
25
|
+
"shx": "^0.3.4",
|
|
25
26
|
"ts-node": "^10.4.0",
|
|
26
|
-
"typescript": "4.
|
|
27
|
+
"typescript": "4.6.3"
|
|
27
28
|
},
|
|
28
29
|
"engines": {
|
|
29
30
|
"node": ">=12.0.0"
|
|
@@ -46,9 +47,9 @@
|
|
|
46
47
|
},
|
|
47
48
|
"repository": "oclif/plugin-version",
|
|
48
49
|
"scripts": {
|
|
49
|
-
"build": "rm -rf lib && tsc",
|
|
50
|
+
"build": "shx rm -rf lib && tsc",
|
|
50
51
|
"commitlint": "commitlint",
|
|
51
|
-
"clean": "rm -f oclif.manifest.json",
|
|
52
|
+
"clean": "shx rm -f oclif.manifest.json",
|
|
52
53
|
"lint": "eslint . --ext .ts --config .eslintrc",
|
|
53
54
|
"pretest": "yarn build",
|
|
54
55
|
"test": "mocha --forbid-only \"test/**/*.test.ts\"",
|