@salesforce/plugin-command-reference 2.3.1 → 2.4.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.
@@ -0,0 +1,9 @@
1
+ import { SfCommand } from '@salesforce/sf-plugins-core';
2
+ export default class JitInstall extends SfCommand<void> {
3
+ static readonly summary: string;
4
+ static readonly examples: string[];
5
+ static readonly flags: {
6
+ 'dry-run': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
7
+ };
8
+ run(): Promise<void>;
9
+ }
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ /*
4
+ * Copyright (c) 2020, salesforce.com, inc.
5
+ * All rights reserved.
6
+ * Licensed under the BSD 3-Clause license.
7
+ * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
8
+ */
9
+ const sf_plugins_core_1 = require("@salesforce/sf-plugins-core");
10
+ const core_1 = require("@salesforce/core");
11
+ const chalk = require("chalk");
12
+ core_1.Messages.importMessagesDirectory(__dirname);
13
+ const messages = core_1.Messages.load('@salesforce/plugin-command-reference', 'jit.install', [
14
+ 'summary',
15
+ 'examples',
16
+ 'flags.dry-run.summary',
17
+ ]);
18
+ class JitInstall extends sf_plugins_core_1.SfCommand {
19
+ async run() {
20
+ const { flags } = await this.parse(JitInstall);
21
+ this.styledHeader(`Install all JIT Plugins${flags['dry-run'] ? ' (dry-run)' : ''}`);
22
+ for (const [plugin, version] of Object.entries(this.config.pjson.oclif.jitPlugins)) {
23
+ this.log(`• ${plugin} ${chalk.dim(version)}`);
24
+ if (flags['dry-run'])
25
+ continue;
26
+ try {
27
+ await this.config.runCommand('plugins:install', [`${plugin}@${version}`]);
28
+ }
29
+ catch {
30
+ this.log(`Failed to install ${plugin} ${chalk.dim(version)}.`);
31
+ }
32
+ }
33
+ }
34
+ }
35
+ exports.default = JitInstall;
36
+ JitInstall.summary = messages.getMessage('summary');
37
+ JitInstall.examples = messages.getMessages('examples');
38
+ JitInstall.flags = {
39
+ 'dry-run': sf_plugins_core_1.Flags.boolean({
40
+ char: 'd',
41
+ summary: messages.getMessage('flags.dry-run.summary'),
42
+ }),
43
+ };
44
+ //# sourceMappingURL=install.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"install.js","sourceRoot":"","sources":["../../../src/commands/jit/install.ts"],"names":[],"mappings":";;AAAA;;;;;GAKG;AACH,iEAA+D;AAC/D,2CAA4C;AAC5C,+BAA+B;AAE/B,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAC5C,MAAM,QAAQ,GAAG,eAAQ,CAAC,IAAI,CAAC,sCAAsC,EAAE,aAAa,EAAE;IACpF,SAAS;IACT,UAAU;IACV,uBAAuB;CACxB,CAAC,CAAC;AAEH,MAAqB,UAAW,SAAQ,2BAAe;IAW9C,KAAK,CAAC,GAAG;QACd,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;QAE/C,IAAI,CAAC,YAAY,CAAC,0BAA0B,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QACpF,KAAK,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,UAAU,CAAC,EAAE;YAClF,IAAI,CAAC,GAAG,CAAC,KAAK,MAAM,IAAI,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;YAC9C,IAAI,KAAK,CAAC,SAAS,CAAC;gBAAE,SAAS;YAC/B,IAAI;gBACF,MAAM,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,iBAAiB,EAAE,CAAC,GAAG,MAAM,IAAI,OAAO,EAAE,CAAC,CAAC,CAAC;aAC3E;YAAC,MAAM;gBACN,IAAI,CAAC,GAAG,CAAC,qBAAqB,MAAM,IAAI,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;aAChE;SACF;IACH,CAAC;;AAxBH,6BAyBC;AAxBwB,kBAAO,GAAG,QAAQ,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;AACzC,mBAAQ,GAAG,QAAQ,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;AAE5C,gBAAK,GAAG;IAC7B,SAAS,EAAE,uBAAK,CAAC,OAAO,CAAC;QACvB,IAAI,EAAE,GAAG;QACT,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,uBAAuB,CAAC;KACtD,CAAC;CACH,CAAC"}
@@ -0,0 +1,11 @@
1
+ # summary
2
+
3
+ Install all JIT plugins.
4
+
5
+ # examples
6
+
7
+ - <%= config.bin %> <%= command.id %>
8
+
9
+ # flags.dry-run.summary
10
+
11
+ List the plugins that would be installed.
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "2.3.1",
2
+ "version": "2.4.1",
3
3
  "commands": {
4
4
  "commandreference:generate": {
5
5
  "id": "commandreference:generate",
@@ -67,6 +67,35 @@
67
67
  }
68
68
  },
69
69
  "args": {}
70
+ },
71
+ "jit:install": {
72
+ "id": "jit:install",
73
+ "summary": "Install all JIT plugins.",
74
+ "strict": true,
75
+ "pluginName": "@salesforce/plugin-command-reference",
76
+ "pluginAlias": "@salesforce/plugin-command-reference",
77
+ "pluginType": "core",
78
+ "aliases": [],
79
+ "examples": [
80
+ "<%= config.bin %> <%= command.id %>"
81
+ ],
82
+ "flags": {
83
+ "json": {
84
+ "name": "json",
85
+ "type": "boolean",
86
+ "description": "Format output as json.",
87
+ "helpGroup": "GLOBAL",
88
+ "allowNo": false
89
+ },
90
+ "dry-run": {
91
+ "name": "dry-run",
92
+ "type": "boolean",
93
+ "char": "d",
94
+ "summary": "List the plugins that would be installed.",
95
+ "allowNo": false
96
+ }
97
+ },
98
+ "args": {}
70
99
  }
71
100
  }
72
101
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@salesforce/plugin-command-reference",
3
3
  "description": "Generate the Salesforce CLI command reference guide",
4
- "version": "2.3.1",
4
+ "version": "2.4.1",
5
5
  "author": "Salesforce",
6
6
  "bugs": "https://github.com/salesforcecli/plugin-command-reference/issues",
7
7
  "dependencies": {
@@ -71,6 +71,9 @@
71
71
  "commandreference": {
72
72
  "description": "generate the Salesforce CLI command reference guide.",
73
73
  "longDescription": "xx"
74
+ },
75
+ "jit": {
76
+ "description": "description for jit"
74
77
  }
75
78
  },
76
79
  "devPlugins": [