oclif 2.1.8 → 2.2.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.
@@ -1 +1 @@
1
- {"version":"2.1.8","commands":{"generate":{"id":"generate","description":"generate a new CLI\nThis will clone the template repo 'oclif/hello-world' and update package properties","strict":true,"pluginName":"oclif","pluginAlias":"oclif","pluginType":"core","aliases":[],"flags":{},"args":[{"name":"name","description":"directory name of new project","required":true}]},"manifest":{"id":"manifest","description":"generates plugin manifest json","strict":true,"pluginName":"oclif","pluginAlias":"oclif","pluginType":"core","aliases":[],"flags":{},"args":[{"name":"path","description":"path to plugin","default":"."}]},"promote":{"id":"promote","description":"promote CLI builds to a S3 release channel","strict":true,"pluginName":"oclif","pluginAlias":"oclif","pluginType":"core","aliases":[],"flags":{"root":{"name":"root","type":"option","char":"r","description":"path to the oclif CLI project root","required":true,"multiple":false,"default":"."},"version":{"name":"version","type":"option","description":"semantic version of the CLI to promote","required":true,"multiple":false},"sha":{"name":"sha","type":"option","description":"7-digit short git commit SHA of the CLI to promote","required":true,"multiple":false},"channel":{"name":"channel","type":"option","description":"which channel to promote to","required":true,"multiple":false,"default":"stable"},"targets":{"name":"targets","type":"option","char":"t","description":"comma-separated targets to promote (e.g.: linux-arm,win32-x64)","multiple":false,"default":"linux-x64,linux-arm,win32-x64,win32-x86,darwin-x64,darwin-arm64"},"deb":{"name":"deb","type":"boolean","char":"d","description":"promote debian artifacts","allowNo":false},"macos":{"name":"macos","type":"boolean","char":"m","description":"promote macOS pkg","allowNo":false},"win":{"name":"win","type":"boolean","char":"w","description":"promote Windows exe","allowNo":false},"max-age":{"name":"max-age","type":"option","char":"a","description":"cache control max-age in seconds","multiple":false,"default":"86400"},"xz":{"name":"xz","type":"boolean","description":"also upload xz","allowNo":true},"indexes":{"name":"indexes","type":"boolean","description":"append the promoted urls into the index files","allowNo":false}},"args":[]},"readme":{"id":"readme","description":"adds commands to README.md in current directory\nThe readme must have any of the following tags inside of it for it to be replaced or else it will do nothing:\n# Usage\n<!-- usage -->\n# Commands\n<!-- commands -->\n\nCustomize the code URL prefix by setting oclif.repositoryPrefix in package.json.\n","strict":true,"pluginName":"oclif","pluginAlias":"oclif","pluginType":"core","aliases":[],"flags":{"dir":{"name":"dir","type":"option","description":"output directory for multi docs","required":true,"multiple":false,"default":"docs"},"multi":{"name":"multi","type":"boolean","description":"create a different markdown page for each topic","allowNo":false}},"args":[]},"generate:command":{"id":"generate:command","description":"add a command to an existing CLI or plugin","strict":true,"pluginName":"oclif","pluginAlias":"oclif","pluginType":"core","aliases":[],"flags":{"force":{"name":"force","type":"boolean","description":"overwrite existing files","allowNo":false}},"args":[{"name":"name","description":"name of command","required":true}]},"generate:hook":{"id":"generate:hook","description":"add a hook to an existing CLI or plugin","strict":true,"pluginName":"oclif","pluginAlias":"oclif","pluginType":"core","aliases":[],"flags":{"force":{"name":"force","type":"boolean","description":"overwrite existing files","allowNo":false},"event":{"name":"event","type":"option","description":"event to run hook on","multiple":false,"default":"init"}},"args":[{"name":"name","description":"name of hook (snake_case)","required":true}]},"pack:deb":{"id":"pack:deb","description":"pack CLI into debian package","strict":true,"pluginName":"oclif","pluginAlias":"oclif","pluginType":"core","aliases":[],"flags":{"root":{"name":"root","type":"option","char":"r","description":"path to oclif CLI root","required":true,"multiple":false,"default":"."}},"args":[]},"pack:macos":{"id":"pack:macos","description":"pack CLI into macOS .pkg","strict":true,"pluginName":"oclif","pluginAlias":"oclif","pluginType":"core","aliases":[],"flags":{"root":{"name":"root","type":"option","char":"r","description":"path to oclif CLI root","required":true,"multiple":false,"default":"."},"additional-cli":{"name":"additional-cli","type":"option","description":"an Oclif CLI other than the one listed in config.bin that should be made available to the user\nthe CLI should already exist in a directory named after the CLI that is the root of the tarball produced by \"oclif pack:tarballs\"","hidden":true,"multiple":false}},"args":[]},"pack:tarballs":{"id":"pack:tarballs","description":"packages oclif CLI into tarballs\n\nThis can be used to create oclif CLIs that use the system node or that come preloaded with a node binary.\n","strict":true,"pluginName":"oclif","pluginAlias":"oclif","pluginType":"core","aliases":[],"flags":{"root":{"name":"root","type":"option","char":"r","description":"path to oclif CLI root","required":true,"multiple":false,"default":"."},"targets":{"name":"targets","type":"option","char":"t","description":"comma-separated targets to pack (e.g.: linux-arm,win32-x64)","multiple":false,"default":"linux-x64,linux-arm,win32-x64,win32-x86,darwin-x64,darwin-arm64"},"xz":{"name":"xz","type":"boolean","description":"also build xz","allowNo":true}},"args":[]},"pack:win":{"id":"pack:win","description":"create windows installer from oclif CLI\n\n This command requires WINDOWS_SIGNING (prefixed with the name of your executable, e.g. OCLIF_WINDOWS_SIGNING_PASS) to be set in the environment","strict":true,"pluginName":"oclif","pluginAlias":"oclif","pluginType":"core","aliases":[],"flags":{"root":{"name":"root","type":"option","char":"r","description":"path to oclif CLI root","required":true,"multiple":false,"default":"."},"additional-cli":{"name":"additional-cli","type":"option","description":"an Oclif CLI other than the one listed in config.bin that should be made available to the user\nthe CLI should already exist in a directory named after the CLI that is the root of the tarball produced by \"oclif pack:tarballs\"","hidden":true,"multiple":false}},"args":[]},"upload:deb":{"id":"upload:deb","description":"upload deb package built with pack:deb","strict":true,"pluginName":"oclif","pluginAlias":"oclif","pluginType":"core","aliases":[],"flags":{"root":{"name":"root","type":"option","char":"r","description":"path to oclif CLI root","required":true,"multiple":false,"default":"."}},"args":[]},"upload:macos":{"id":"upload:macos","description":"upload macos installers built with pack:macos","strict":true,"pluginName":"oclif","pluginAlias":"oclif","pluginType":"core","aliases":[],"flags":{"root":{"name":"root","type":"option","char":"r","description":"path to oclif CLI root","required":true,"multiple":false,"default":"."}},"args":[]},"upload:tarballs":{"id":"upload:tarballs","description":"upload an oclif CLI to S3\n\n\"aws-sdk\" will need to be installed as a devDependency to upload.\n","strict":true,"pluginName":"oclif","pluginAlias":"oclif","pluginType":"core","aliases":[],"flags":{"root":{"name":"root","type":"option","char":"r","description":"path to oclif CLI root","required":true,"multiple":false,"default":"."},"targets":{"name":"targets","type":"option","char":"t","description":"comma-separated targets to upload (e.g.: linux-arm,win32-x64)","multiple":false,"default":"linux-x64,linux-arm,win32-x64,win32-x86,darwin-x64,darwin-arm64"},"xz":{"name":"xz","type":"boolean","description":"also upload xz","allowNo":true}},"args":[]},"upload:win":{"id":"upload:win","description":"upload windows installers built with pack:win","strict":true,"pluginName":"oclif","pluginAlias":"oclif","pluginType":"core","aliases":[],"flags":{"root":{"name":"root","type":"option","char":"r","description":"path to oclif CLI root","required":true,"multiple":false,"default":"."}},"args":[]}}}
1
+ {"version":"2.2.0","commands":{"generate":{"id":"generate","description":"generate a new CLI\nThis will clone the template repo 'oclif/hello-world' and update package properties","strict":true,"pluginName":"oclif","pluginAlias":"oclif","pluginType":"core","aliases":[],"flags":{},"args":[{"name":"name","description":"directory name of new project","required":true}]},"manifest":{"id":"manifest","description":"generates plugin manifest json","strict":true,"pluginName":"oclif","pluginAlias":"oclif","pluginType":"core","aliases":[],"flags":{},"args":[{"name":"path","description":"path to plugin","default":"."}]},"promote":{"id":"promote","description":"promote CLI builds to a S3 release channel","strict":true,"pluginName":"oclif","pluginAlias":"oclif","pluginType":"core","aliases":[],"flags":{"root":{"name":"root","type":"option","char":"r","description":"path to the oclif CLI project root","required":true,"multiple":false,"default":"."},"version":{"name":"version","type":"option","description":"semantic version of the CLI to promote","required":true,"multiple":false},"sha":{"name":"sha","type":"option","description":"7-digit short git commit SHA of the CLI to promote","required":true,"multiple":false},"channel":{"name":"channel","type":"option","description":"which channel to promote to","required":true,"multiple":false,"default":"stable"},"targets":{"name":"targets","type":"option","char":"t","description":"comma-separated targets to promote (e.g.: linux-arm,win32-x64)","multiple":false,"default":"linux-x64,linux-arm,win32-x64,win32-x86,darwin-x64,darwin-arm64"},"deb":{"name":"deb","type":"boolean","char":"d","description":"promote debian artifacts","allowNo":false},"macos":{"name":"macos","type":"boolean","char":"m","description":"promote macOS pkg","allowNo":false},"win":{"name":"win","type":"boolean","char":"w","description":"promote Windows exe","allowNo":false},"max-age":{"name":"max-age","type":"option","char":"a","description":"cache control max-age in seconds","multiple":false,"default":"86400"},"xz":{"name":"xz","type":"boolean","description":"also upload xz","allowNo":true},"indexes":{"name":"indexes","type":"boolean","description":"append the promoted urls into the index files","allowNo":false}},"args":[]},"readme":{"id":"readme","description":"adds commands to README.md in current directory\nThe readme must have any of the following tags inside of it for it to be replaced or else it will do nothing:\n# Usage\n<!-- usage -->\n# Commands\n<!-- commands -->\n\nCustomize the code URL prefix by setting oclif.repositoryPrefix in package.json.\n","strict":true,"pluginName":"oclif","pluginAlias":"oclif","pluginType":"core","aliases":[],"flags":{"dir":{"name":"dir","type":"option","description":"output directory for multi docs","required":true,"multiple":false,"default":"docs"},"multi":{"name":"multi","type":"boolean","description":"create a different markdown page for each topic","allowNo":false}},"args":[]},"generate:command":{"id":"generate:command","description":"add a command to an existing CLI or plugin","strict":true,"pluginName":"oclif","pluginAlias":"oclif","pluginType":"core","aliases":[],"flags":{"force":{"name":"force","type":"boolean","description":"overwrite existing files","allowNo":false}},"args":[{"name":"name","description":"name of command","required":true}]},"generate:hook":{"id":"generate:hook","description":"add a hook to an existing CLI or plugin","strict":true,"pluginName":"oclif","pluginAlias":"oclif","pluginType":"core","aliases":[],"flags":{"force":{"name":"force","type":"boolean","description":"overwrite existing files","allowNo":false},"event":{"name":"event","type":"option","description":"event to run hook on","multiple":false,"default":"init"}},"args":[{"name":"name","description":"name of hook (snake_case)","required":true}]},"pack:deb":{"id":"pack:deb","description":"pack CLI into debian package","strict":true,"pluginName":"oclif","pluginAlias":"oclif","pluginType":"core","aliases":[],"flags":{"root":{"name":"root","type":"option","char":"r","description":"path to oclif CLI root","required":true,"multiple":false,"default":"."},"tarball":{"name":"tarball","type":"option","char":"t","description":"optionally specify a path to a tarball already generated by NPM","required":false,"multiple":false}},"args":[]},"pack:macos":{"id":"pack:macos","description":"pack CLI into macOS .pkg","strict":true,"pluginName":"oclif","pluginAlias":"oclif","pluginType":"core","aliases":[],"flags":{"root":{"name":"root","type":"option","char":"r","description":"path to oclif CLI root","required":true,"multiple":false,"default":"."},"additional-cli":{"name":"additional-cli","type":"option","description":"an Oclif CLI other than the one listed in config.bin that should be made available to the user\nthe CLI should already exist in a directory named after the CLI that is the root of the tarball produced by \"oclif pack:tarballs\"","hidden":true,"multiple":false},"tarball":{"name":"tarball","type":"option","char":"t","description":"optionally specify a path to a tarball already generated by NPM","required":false,"multiple":false}},"args":[]},"pack:tarballs":{"id":"pack:tarballs","description":"packages oclif CLI into tarballs\n\nThis can be used to create oclif CLIs that use the system node or that come preloaded with a node binary.\n","strict":true,"pluginName":"oclif","pluginAlias":"oclif","pluginType":"core","aliases":[],"flags":{"root":{"name":"root","type":"option","char":"r","description":"path to oclif CLI root","required":true,"multiple":false,"default":"."},"targets":{"name":"targets","type":"option","char":"t","description":"comma-separated targets to pack (e.g.: linux-arm,win32-x64)","multiple":false,"default":"linux-x64,linux-arm,win32-x64,win32-x86,darwin-x64,darwin-arm64"},"xz":{"name":"xz","type":"boolean","description":"also build xz","allowNo":true},"tarball":{"name":"tarball","type":"option","char":"t","description":"optionally specify a path to a tarball already generated by NPM","required":false,"multiple":false}},"args":[]},"pack:win":{"id":"pack:win","description":"create windows installer from oclif CLI\n\n This command requires WINDOWS_SIGNING (prefixed with the name of your executable, e.g. OCLIF_WINDOWS_SIGNING_PASS) to be set in the environment","strict":true,"pluginName":"oclif","pluginAlias":"oclif","pluginType":"core","aliases":[],"flags":{"root":{"name":"root","type":"option","char":"r","description":"path to oclif CLI root","required":true,"multiple":false,"default":"."},"additional-cli":{"name":"additional-cli","type":"option","description":"an Oclif CLI other than the one listed in config.bin that should be made available to the user\nthe CLI should already exist in a directory named after the CLI that is the root of the tarball produced by \"oclif pack:tarballs\"","hidden":true,"multiple":false},"tarball":{"name":"tarball","type":"option","char":"t","description":"optionally specify a path to a tarball already generated by NPM","required":false,"multiple":false}},"args":[]},"upload:deb":{"id":"upload:deb","description":"upload deb package built with pack:deb","strict":true,"pluginName":"oclif","pluginAlias":"oclif","pluginType":"core","aliases":[],"flags":{"root":{"name":"root","type":"option","char":"r","description":"path to oclif CLI root","required":true,"multiple":false,"default":"."}},"args":[]},"upload:macos":{"id":"upload:macos","description":"upload macos installers built with pack:macos","strict":true,"pluginName":"oclif","pluginAlias":"oclif","pluginType":"core","aliases":[],"flags":{"root":{"name":"root","type":"option","char":"r","description":"path to oclif CLI root","required":true,"multiple":false,"default":"."}},"args":[]},"upload:tarballs":{"id":"upload:tarballs","description":"upload an oclif CLI to S3\n\n\"aws-sdk\" will need to be installed as a devDependency to upload.\n","strict":true,"pluginName":"oclif","pluginAlias":"oclif","pluginType":"core","aliases":[],"flags":{"root":{"name":"root","type":"option","char":"r","description":"path to oclif CLI root","required":true,"multiple":false,"default":"."},"targets":{"name":"targets","type":"option","char":"t","description":"comma-separated targets to upload (e.g.: linux-arm,win32-x64)","multiple":false,"default":"linux-x64,linux-arm,win32-x64,win32-x86,darwin-x64,darwin-arm64"},"xz":{"name":"xz","type":"boolean","description":"also upload xz","allowNo":true}},"args":[]},"upload:win":{"id":"upload:win","description":"upload windows installers built with pack:win","strict":true,"pluginName":"oclif","pluginAlias":"oclif","pluginType":"core","aliases":[],"flags":{"root":{"name":"root","type":"option","char":"r","description":"path to oclif CLI root","required":true,"multiple":false,"default":"."}},"args":[]}}}
package/CHANGELOG.md CHANGED
@@ -2,6 +2,13 @@
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
+ ## [2.2.0](https://github.com/oclif/oclif/compare/v2.1.8...v2.2.0) (2022-01-13)
6
+
7
+
8
+ ### Features
9
+
10
+ * optionally include tarball path as input ([#764](https://github.com/oclif/oclif/issues/764)) ([#796](https://github.com/oclif/oclif/issues/796)) ([ee6ff99](https://github.com/oclif/oclif/commit/ee6ff99ad5e11cb1abe1de17791a8b987833e381))
11
+
5
12
  ### [2.1.8](https://github.com/oclif/oclif/compare/v2.1.7...v2.1.8) (2022-01-12)
6
13
 
7
14
 
package/README.md CHANGED
@@ -146,7 +146,7 @@ DESCRIPTION
146
146
  This will clone the template repo 'oclif/hello-world' and update package properties
147
147
  ```
148
148
 
149
- _See code: [src/commands/generate.ts](https://github.com/oclif/oclif/blob/v2.1.7/src/commands/generate.ts)_
149
+ _See code: [src/commands/generate.ts](https://github.com/oclif/oclif/blob/v2.1.8/src/commands/generate.ts)_
150
150
 
151
151
  ## `oclif generate command NAME`
152
152
 
@@ -220,7 +220,7 @@ DESCRIPTION
220
220
  generates plugin manifest json
221
221
  ```
222
222
 
223
- _See code: [src/commands/manifest.ts](https://github.com/oclif/oclif/blob/v2.1.7/src/commands/manifest.ts)_
223
+ _See code: [src/commands/manifest.ts](https://github.com/oclif/oclif/blob/v2.1.8/src/commands/manifest.ts)_
224
224
 
225
225
  ## `oclif pack deb`
226
226
 
@@ -228,10 +228,11 @@ pack CLI into debian package
228
228
 
229
229
  ```
230
230
  USAGE
231
- $ oclif pack deb -r <value>
231
+ $ oclif pack deb -r <value> [-t <value>]
232
232
 
233
233
  FLAGS
234
- -r, --root=<value> (required) [default: .] path to oclif CLI root
234
+ -r, --root=<value> (required) [default: .] path to oclif CLI root
235
+ -t, --tarball=<value> optionally specify a path to a tarball already generated by NPM
235
236
 
236
237
  DESCRIPTION
237
238
  pack CLI into debian package
@@ -243,10 +244,11 @@ pack CLI into macOS .pkg
243
244
 
244
245
  ```
245
246
  USAGE
246
- $ oclif pack macos -r <value>
247
+ $ oclif pack macos -r <value> [-t <value>]
247
248
 
248
249
  FLAGS
249
- -r, --root=<value> (required) [default: .] path to oclif CLI root
250
+ -r, --root=<value> (required) [default: .] path to oclif CLI root
251
+ -t, --tarball=<value> optionally specify a path to a tarball already generated by NPM
250
252
 
251
253
  DESCRIPTION
252
254
  pack CLI into macOS .pkg
@@ -258,10 +260,11 @@ packages oclif CLI into tarballs
258
260
 
259
261
  ```
260
262
  USAGE
261
- $ oclif pack tarballs -r <value> [-t <value>] [--xz]
263
+ $ oclif pack tarballs -r <value> [-t <value>] [--xz] [-t <value>]
262
264
 
263
265
  FLAGS
264
266
  -r, --root=<value> (required) [default: .] path to oclif CLI root
267
+ -t, --tarball=<value> optionally specify a path to a tarball already generated by NPM
265
268
  -t, --targets=<value> [default: linux-x64,linux-arm,win32-x64,win32-x86,darwin-x64,darwin-arm64] comma-separated
266
269
  targets to pack (e.g.: linux-arm,win32-x64)
267
270
  --[no-]xz also build xz
@@ -278,10 +281,11 @@ create windows installer from oclif CLI
278
281
 
279
282
  ```
280
283
  USAGE
281
- $ oclif pack win -r <value>
284
+ $ oclif pack win -r <value> [-t <value>]
282
285
 
283
286
  FLAGS
284
- -r, --root=<value> (required) [default: .] path to oclif CLI root
287
+ -r, --root=<value> (required) [default: .] path to oclif CLI root
288
+ -t, --tarball=<value> optionally specify a path to a tarball already generated by NPM
285
289
 
286
290
  DESCRIPTION
287
291
  create windows installer from oclif CLI
@@ -317,7 +321,7 @@ DESCRIPTION
317
321
  promote CLI builds to a S3 release channel
318
322
  ```
319
323
 
320
- _See code: [src/commands/promote.ts](https://github.com/oclif/oclif/blob/v2.1.7/src/commands/promote.ts)_
324
+ _See code: [src/commands/promote.ts](https://github.com/oclif/oclif/blob/v2.1.8/src/commands/promote.ts)_
321
325
 
322
326
  ## `oclif readme`
323
327
 
@@ -347,7 +351,7 @@ DESCRIPTION
347
351
  Customize the code URL prefix by setting oclif.repositoryPrefix in package.json.
348
352
  ```
349
353
 
350
- _See code: [src/commands/readme.ts](https://github.com/oclif/oclif/blob/v2.1.7/src/commands/readme.ts)_
354
+ _See code: [src/commands/readme.ts](https://github.com/oclif/oclif/blob/v2.1.8/src/commands/readme.ts)_
351
355
 
352
356
  ## `oclif upload deb`
353
357
 
@@ -4,6 +4,7 @@ export default class PackDeb extends Command {
4
4
  static description: string;
5
5
  static flags: {
6
6
  root: Interfaces.OptionFlag<string>;
7
+ tarball: Interfaces.OptionFlag<string | undefined>;
7
8
  };
8
9
  run(): Promise<void>;
9
10
  }
@@ -48,7 +48,7 @@ class PackDeb extends core_1.Command {
48
48
  const { flags } = await this.parse(PackDeb);
49
49
  const buildConfig = await Tarballs.buildConfig(flags.root);
50
50
  const { config } = buildConfig;
51
- await Tarballs.build(buildConfig, { platform: 'linux', pack: false });
51
+ await Tarballs.build(buildConfig, { platform: 'linux', pack: false, tarball: flags.tarball });
52
52
  const dist = buildConfig.dist('deb');
53
53
  await qq.emptyDir(dist);
54
54
  const build = async (arch) => {
@@ -92,4 +92,5 @@ exports.default = PackDeb;
92
92
  PackDeb.description = 'pack CLI into debian package';
93
93
  PackDeb.flags = {
94
94
  root: core_1.Flags.string({ char: 'r', description: 'path to oclif CLI root', default: '.', required: true }),
95
+ tarball: core_1.Flags.string({ char: 't', description: 'optionally specify a path to a tarball already generated by NPM', required: false })
95
96
  };
@@ -5,6 +5,7 @@ export default class PackMacos extends Command {
5
5
  static flags: {
6
6
  root: Interfaces.OptionFlag<string>;
7
7
  'additional-cli': Interfaces.OptionFlag<string | undefined>;
8
+ tarball: Interfaces.OptionFlag<string | undefined>;
8
9
  };
9
10
  run(): Promise<void>;
10
11
  }
@@ -106,7 +106,7 @@ class PackMacos extends core_1.Command {
106
106
  this.error('package.json must have oclif.macos.identifier set');
107
107
  const macos = c.macos;
108
108
  const packageIdentifier = macos.identifier;
109
- await Tarballs.build(buildConfig, { platform: 'darwin', pack: false });
109
+ await Tarballs.build(buildConfig, { platform: 'darwin', pack: false, tarball: flags.tarball });
110
110
  const templateKey = (0, upload_util_1.templateShortKey)('macos', { bin: config.bin, version: config.version, sha: buildConfig.gitSha });
111
111
  const dist = buildConfig.dist(`macos/${templateKey}`);
112
112
  await qq.emptyDir(path.dirname(dist));
@@ -147,4 +147,5 @@ PackMacos.flags = {
147
147
  root: core_1.Flags.string({ char: 'r', description: 'path to oclif CLI root', default: '.', required: true }),
148
148
  'additional-cli': core_1.Flags.string({ description: `an Oclif CLI other than the one listed in config.bin that should be made available to the user
149
149
  the CLI should already exist in a directory named after the CLI that is the root of the tarball produced by "oclif pack:tarballs"`, hidden: true }),
150
+ tarball: core_1.Flags.string({ char: 't', description: 'optionally specify a path to a tarball already generated by NPM', required: false })
150
151
  };
@@ -5,6 +5,7 @@ export default class PackTarballs extends Command {
5
5
  root: import("@oclif/core/lib/interfaces").OptionFlag<string>;
6
6
  targets: import("@oclif/core/lib/interfaces").OptionFlag<string>;
7
7
  xz: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
8
+ tarball: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
8
9
  };
9
10
  run(): Promise<void>;
10
11
  }
@@ -14,7 +14,9 @@ class PackTarballs extends core_1.Command {
14
14
  if (buildConfig.targets.length === 0) {
15
15
  throw new Error('Please specify one or more valid targets.');
16
16
  }
17
- await Tarballs.build(buildConfig);
17
+ await Tarballs.build(buildConfig, {
18
+ tarball: flags.tarball
19
+ });
18
20
  qq.cd(prevCwd);
19
21
  }
20
22
  }
@@ -30,4 +32,5 @@ PackTarballs.flags = {
30
32
  default: Tarballs.TARGETS.join(','),
31
33
  }),
32
34
  xz: core_1.Flags.boolean({ description: 'also build xz', allowNo: true, default: true }),
35
+ tarball: core_1.Flags.string({ char: 't', description: 'optionally specify a path to a tarball already generated by NPM', required: false })
33
36
  };
@@ -5,6 +5,7 @@ export default class PackWin extends Command {
5
5
  static flags: {
6
6
  root: Interfaces.OptionFlag<string>;
7
7
  'additional-cli': Interfaces.OptionFlag<string | undefined>;
8
+ tarball: Interfaces.OptionFlag<string | undefined>;
8
9
  };
9
10
  run(): Promise<void>;
10
11
  private checkForNSIS;
@@ -199,7 +199,7 @@ class PackWin extends core_1.Command {
199
199
  const { flags } = await this.parse(PackWin);
200
200
  const buildConfig = await Tarballs.buildConfig(flags.root);
201
201
  const { config } = buildConfig;
202
- await Tarballs.build(buildConfig, { platform: 'win32', pack: false });
202
+ await Tarballs.build(buildConfig, { platform: 'win32', pack: false, tarball: flags.tarball });
203
203
  const arches = buildConfig.targets.filter(t => t.platform === 'win32').map(t => t.arch);
204
204
  for (const arch of arches) {
205
205
  const installerBase = qq.join(buildConfig.tmp, `windows-${arch}-installer`);
@@ -270,4 +270,5 @@ PackWin.flags = {
270
270
  root: core_1.Flags.string({ char: 'r', description: 'path to oclif CLI root', default: '.', required: true }),
271
271
  'additional-cli': core_1.Flags.string({ description: `an Oclif CLI other than the one listed in config.bin that should be made available to the user
272
272
  the CLI should already exist in a directory named after the CLI that is the root of the tarball produced by "oclif pack:tarballs"`, hidden: true }),
273
+ tarball: core_1.Flags.string({ char: 't', description: 'optionally specify a path to a tarball already generated by NPM', required: false })
273
274
  };
@@ -2,4 +2,5 @@ import { BuildConfig } from './config';
2
2
  export declare function build(c: BuildConfig, options?: {
3
3
  platform?: string;
4
4
  pack?: boolean;
5
+ tarball?: string;
5
6
  }): Promise<void>;
@@ -136,7 +136,7 @@ async function build(c, options = {}) {
136
136
  await qq.writeJSON(manifestFilepath, manifest);
137
137
  };
138
138
  (0, log_1.log)(`gathering workspace for ${config.bin} to ${c.workspace()}`);
139
- await extractCLI(await packCLI());
139
+ await extractCLI(options.tarball ? options.tarball : await packCLI());
140
140
  await updatePJSON();
141
141
  await addDependencies();
142
142
  await (0, bin_1.writeBinScripts)({ config, baseWorkspace: c.workspace(), nodeVersion: c.nodeVersion });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "oclif",
3
3
  "description": "oclif: create your own CLI",
4
- "version": "2.1.8",
4
+ "version": "2.2.0",
5
5
  "author": "Salesforce",
6
6
  "bin": {
7
7
  "oclif": "bin/run"