oclif 2.6.2 → 3.0.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.
@@ -1 +1 @@
1
- {"version":"2.6.2","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}],"_globalFlags":{}},"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},"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":[],"_globalFlags":{}},"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":[],"_globalFlags":{}},"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}],"_globalFlags":{}},"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}],"_globalFlags":{}},"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":[],"_globalFlags":{}},"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":[],"_globalFlags":{}},"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},"xz":{"name":"xz","type":"boolean","description":"also build xz","allowNo":true},"tarball":{"name":"tarball","type":"option","char":"l","description":"optionally specify a path to a tarball already generated by NPM","required":false,"multiple":false}},"args":[],"_globalFlags":{}},"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":[],"_globalFlags":{}},"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":[],"_globalFlags":{}},"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":[],"_globalFlags":{}},"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},"xz":{"name":"xz","type":"boolean","description":"also upload xz","allowNo":true}},"args":[],"_globalFlags":{}},"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":[],"_globalFlags":{}}}}
1
+ {"version":"3.0.1","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}],"_globalFlags":{}},"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},"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":[],"_globalFlags":{}},"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":[],"_globalFlags":{}},"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}],"_globalFlags":{}},"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}],"_globalFlags":{}},"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":[],"_globalFlags":{}},"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":[],"_globalFlags":{}},"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},"xz":{"name":"xz","type":"boolean","description":"also build xz","allowNo":true},"tarball":{"name":"tarball","type":"option","char":"l","description":"optionally specify a path to a tarball already generated by NPM","required":false,"multiple":false}},"args":[],"_globalFlags":{}},"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":[],"_globalFlags":{}},"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":[],"_globalFlags":{}},"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":[],"_globalFlags":{}},"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},"xz":{"name":"xz","type":"boolean","description":"also upload xz","allowNo":true}},"args":[],"_globalFlags":{}},"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":[],"_globalFlags":{}}}}
package/CHANGELOG.md CHANGED
@@ -2,6 +2,31 @@
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
+ ### [3.0.1](https://github.com/oclif/oclif/compare/v3.0.0...v3.0.1) (2022-04-18)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * remove outdated code ([#866](https://github.com/oclif/oclif/issues/866)) ([e3f60a3](https://github.com/oclif/oclif/commit/e3f60a3109502bc59d1fbd71a3fbbd3668dcd3eb))
11
+
12
+ ## [3.0.0](https://github.com/oclif/oclif/compare/v2.6.3...v3.0.0) (2022-04-13)
13
+
14
+
15
+ ### ⚠ BREAKING CHANGES
16
+
17
+ * Add arch to macos pkg file (#849)
18
+
19
+ ### Features
20
+
21
+ * Add arch to macos pkg file ([#849](https://github.com/oclif/oclif/issues/849)) ([656d529](https://github.com/oclif/oclif/commit/656d52909c0ae1c4b66b7b3eaada9916d5871e4a))
22
+
23
+ ### [2.6.3](https://github.com/oclif/oclif/compare/v2.6.2...v2.6.3) (2022-03-31)
24
+
25
+
26
+ ### Bug Fixes
27
+
28
+ * update oclif/core ([7e86036](https://github.com/oclif/oclif/commit/7e86036b4e673003ad6226852260c929d62a1c39))
29
+
5
30
  ### [2.6.2](https://github.com/oclif/oclif/compare/v2.6.1...v2.6.2) (2022-03-31)
6
31
 
7
32
 
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.6.1/src/commands/generate.ts)_
149
+ _See code: [src/commands/generate.ts](https://github.com/oclif/oclif/blob/v3.0.0/src/commands/generate.ts)_
150
150
 
151
151
  ## `oclif generate command NAME`
152
152
 
@@ -203,7 +203,7 @@ DESCRIPTION
203
203
  Display help for oclif.
204
204
  ```
205
205
 
206
- _See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v5.1.11/src/commands/help.ts)_
206
+ _See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v5.1.12/src/commands/help.ts)_
207
207
 
208
208
  ## `oclif manifest [PATH]`
209
209
 
@@ -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.6.1/src/commands/manifest.ts)_
223
+ _See code: [src/commands/manifest.ts](https://github.com/oclif/oclif/blob/v3.0.0/src/commands/manifest.ts)_
224
224
 
225
225
  ## `oclif pack deb`
226
226
 
@@ -319,7 +319,7 @@ DESCRIPTION
319
319
  promote CLI builds to a S3 release channel
320
320
  ```
321
321
 
322
- _See code: [src/commands/promote.ts](https://github.com/oclif/oclif/blob/v2.6.1/src/commands/promote.ts)_
322
+ _See code: [src/commands/promote.ts](https://github.com/oclif/oclif/blob/v3.0.0/src/commands/promote.ts)_
323
323
 
324
324
  ## `oclif readme`
325
325
 
@@ -349,7 +349,7 @@ DESCRIPTION
349
349
  Customize the code URL prefix by setting oclif.repositoryPrefix in package.json.
350
350
  ```
351
351
 
352
- _See code: [src/commands/readme.ts](https://github.com/oclif/oclif/blob/v2.6.1/src/commands/readme.ts)_
352
+ _See code: [src/commands/readme.ts](https://github.com/oclif/oclif/blob/v3.0.0/src/commands/readme.ts)_
353
353
 
354
354
  ## `oclif upload deb`
355
355
 
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const core_1 = require("@oclif/core");
4
- const path = require("path");
3
+ const _ = require("lodash");
5
4
  const qq = require("qqjs");
5
+ const core_1 = require("@oclif/core");
6
6
  const Tarballs = require("../../tarballs");
7
7
  const upload_util_1 = require("../../upload-util");
8
8
  const scripts = {
@@ -117,38 +117,46 @@ class PackMacos extends core_1.Command {
117
117
  const macos = c.macos;
118
118
  const packageIdentifier = macos.identifier;
119
119
  await Tarballs.build(buildConfig, { platform: 'darwin', pack: false, tarball: flags.tarball });
120
- const templateKey = (0, upload_util_1.templateShortKey)('macos', { bin: config.bin, version: config.version, sha: buildConfig.gitSha });
121
- const dist = buildConfig.dist(`macos/${templateKey}`);
122
- await qq.emptyDir(path.dirname(dist));
123
120
  const scriptsDir = qq.join(buildConfig.tmp, 'macos/scripts');
124
- const rootDir = buildConfig.workspace({ platform: 'darwin', arch: 'x64' });
125
- const writeScript = async (script) => {
126
- const path = script === 'uninstall' ? [rootDir, 'bin'] : [scriptsDir];
127
- path.push(script);
128
- await qq.write(path, scripts[script](config, flags['additional-cli']));
129
- await qq.chmod(path, 0o755);
121
+ await qq.emptyDir(buildConfig.dist('macos'));
122
+ const build = async (arch) => {
123
+ const templateKey = (0, upload_util_1.templateShortKey)('macos', { bin: config.bin, version: config.version, sha: buildConfig.gitSha, arch });
124
+ const dist = buildConfig.dist(`macos/${templateKey}`);
125
+ const rootDir = buildConfig.workspace({ platform: 'darwin', arch });
126
+ const writeScript = async (script) => {
127
+ const path = script === 'uninstall' ? [rootDir, 'bin'] : [scriptsDir];
128
+ path.push(script);
129
+ await qq.write(path, scripts[script](config, flags['additional-cli']));
130
+ await qq.chmod(path, 0o755);
131
+ };
132
+ await writeScript('preinstall');
133
+ await writeScript('postinstall');
134
+ await writeScript('uninstall');
135
+ /* eslint-disable array-element-newline */
136
+ const args = [
137
+ '--root', rootDir,
138
+ '--identifier', packageIdentifier,
139
+ '--version', config.version,
140
+ '--install-location', `/usr/local/lib/${config.dirname}`,
141
+ '--scripts', scriptsDir,
142
+ ];
143
+ /* eslint-enable array-element-newline */
144
+ if (macos.sign) {
145
+ args.push('--sign', macos.sign);
146
+ }
147
+ else
148
+ this.debug('Skipping macOS pkg signing');
149
+ if (process.env.OSX_KEYCHAIN)
150
+ args.push('--keychain', process.env.OSX_KEYCHAIN);
151
+ args.push(dist);
152
+ await qq.x('pkgbuild', args);
130
153
  };
131
- await writeScript('preinstall');
132
- await writeScript('postinstall');
133
- await writeScript('uninstall');
134
- /* eslint-disable array-element-newline */
135
- const args = [
136
- '--root', rootDir,
137
- '--identifier', packageIdentifier,
138
- '--version', config.version,
139
- '--install-location', `/usr/local/lib/${config.dirname}`,
140
- '--scripts', scriptsDir,
141
- ];
142
- /* eslint-enable array-element-newline */
143
- if (macos.sign) {
144
- args.push('--sign', macos.sign);
145
- }
146
- else
147
- this.debug('Skipping macOS pkg signing');
148
- if (process.env.OSX_KEYCHAIN)
149
- args.push('--keychain', process.env.OSX_KEYCHAIN);
150
- args.push(dist);
151
- await qq.x('pkgbuild', args);
154
+ const arches = _.uniq(buildConfig.targets
155
+ .filter(t => t.platform === 'darwin')
156
+ .map(t => t.arch));
157
+ // eslint-disable-next-line no-await-in-loop
158
+ for (const a of arches)
159
+ await build(a);
152
160
  }
153
161
  }
154
162
  exports.default = PackMacos;
@@ -1,7 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const core_1 = require("@oclif/core");
4
3
  const path = require("path");
4
+ const _ = require("lodash");
5
+ const core_1 = require("@oclif/core");
5
6
  const aws_1 = require("../aws");
6
7
  const Tarballs = require("../tarballs");
7
8
  const upload_util_1 = require("../upload-util");
@@ -94,21 +95,26 @@ class Promote extends core_1.Command {
94
95
  }
95
96
  // copy darwin pkg
96
97
  if (flags.macos) {
97
- this.log(`Promoting macos pkg to ${flags.channel}`);
98
- const darwinPkg = (0, upload_util_1.templateShortKey)('macos', { bin: config.bin, version: flags.version, sha: flags.sha });
99
- const darwinCopySource = cloudBucketCommitKey(darwinPkg);
100
- // strip version & sha so scripts can point to a static channel pkg
101
- const unversionedPkg = darwinPkg.replace(`-v${flags.version}-${flags.sha}`, '');
102
- const darwinKey = cloudChannelKey(unversionedPkg);
103
- await aws_1.default.s3.copyObject({
104
- Bucket: s3Config.bucket,
105
- CopySource: darwinCopySource,
106
- Key: darwinKey,
107
- CacheControl: maxAge,
108
- MetadataDirective: 'REPLACE',
109
- });
110
- if (flags.indexes)
111
- await (0, version_indexes_1.appendToIndex)(Object.assign(Object.assign({}, indexDefaults), { originalUrl: darwinCopySource, filename: unversionedPkg }));
98
+ this.log(`Promoting macos pkgs to ${flags.channel}`);
99
+ const arches = _.uniq(buildConfig.targets.filter(t => t.platform === 'darwin').map(t => t.arch));
100
+ for (const arch of arches) {
101
+ const darwinPkg = (0, upload_util_1.templateShortKey)('macos', { bin: config.bin, version: flags.version, sha: flags.sha, arch });
102
+ const darwinCopySource = cloudBucketCommitKey(darwinPkg);
103
+ // strip version & sha so scripts can point to a static channel pkg
104
+ const unversionedPkg = darwinPkg.replace(`-v${flags.version}-${flags.sha}`, '');
105
+ const darwinKey = cloudChannelKey(unversionedPkg);
106
+ // eslint-disable-next-line no-await-in-loop
107
+ await aws_1.default.s3.copyObject({
108
+ Bucket: s3Config.bucket,
109
+ CopySource: darwinCopySource,
110
+ Key: darwinKey,
111
+ CacheControl: maxAge,
112
+ MetadataDirective: 'REPLACE',
113
+ });
114
+ // eslint-disable-next-line no-await-in-loop
115
+ if (flags.indexes)
116
+ await (0, version_indexes_1.appendToIndex)(Object.assign(Object.assign({}, indexDefaults), { originalUrl: darwinCopySource, filename: unversionedPkg }));
117
+ }
112
118
  }
113
119
  // copy win exe
114
120
  if (flags.win) {
@@ -1,8 +1,8 @@
1
- import { Command } from '@oclif/core';
1
+ import { Command, Interfaces } from '@oclif/core';
2
2
  export default class UploadMacos extends Command {
3
3
  static description: string;
4
4
  static flags: {
5
- root: import("@oclif/core/lib/interfaces").OptionFlag<string>;
5
+ root: Interfaces.OptionFlag<string>;
6
6
  };
7
7
  run(): Promise<void>;
8
8
  }
@@ -1,7 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const core_1 = require("@oclif/core");
3
+ const _ = require("lodash");
4
4
  const qq = require("qqjs");
5
+ const core_1 = require("@oclif/core");
5
6
  const aws_1 = require("../../aws");
6
7
  const log_1 = require("../../log");
7
8
  const Tarballs = require("../../tarballs");
@@ -16,16 +17,24 @@ class UploadMacos extends core_1.Command {
16
17
  ACL: s3Config.acl || 'public-read',
17
18
  };
18
19
  const cloudKeyBase = (0, upload_util_1.commitAWSDir)(config.version, buildConfig.gitSha, s3Config);
19
- const templateKey = (0, upload_util_1.templateShortKey)('macos', { bin: config.bin, version: config.version, sha: buildConfig.gitSha });
20
- const cloudKey = `${cloudKeyBase}/${templateKey}`;
21
- const localPkg = dist(`macos/${templateKey}`);
22
- if (await qq.exists(localPkg))
23
- await aws_1.default.s3.uploadFile(localPkg, Object.assign(Object.assign({}, S3Options), { CacheControl: 'max-age=86400', Key: cloudKey }));
24
- else
25
- this.error('Cannot find macOS pkg', {
26
- suggestions: ['Run "oclif pack macos" before uploading'],
27
- });
28
- (0, log_1.log)(`done uploading macos pkg for v${config.version}-${buildConfig.gitSha}`);
20
+ const upload = async (arch) => {
21
+ const templateKey = (0, upload_util_1.templateShortKey)('macos', { bin: config.bin, version: config.version, sha: buildConfig.gitSha, arch });
22
+ const cloudKey = `${cloudKeyBase}/${templateKey}`;
23
+ const localPkg = dist(`macos/${templateKey}`);
24
+ if (await qq.exists(localPkg))
25
+ await aws_1.default.s3.uploadFile(localPkg, Object.assign(Object.assign({}, S3Options), { CacheControl: 'max-age=86400', Key: cloudKey }));
26
+ else
27
+ this.error('Cannot find macOS pkg', {
28
+ suggestions: ['Run "oclif pack macos" before uploading'],
29
+ });
30
+ };
31
+ const arches = _.uniq(buildConfig.targets
32
+ .filter(t => t.platform === 'darwin')
33
+ .map(t => t.arch));
34
+ // eslint-disable-next-line no-await-in-loop
35
+ for (const a of arches)
36
+ await upload(a);
37
+ (0, log_1.log)(`done uploading macos pkgs for v${config.version}-${buildConfig.gitSha}`);
29
38
  }
30
39
  }
31
40
  exports.default = UploadMacos;
@@ -33,7 +33,7 @@ options = { root: '.' }) {
33
33
  unversioned: '<%- bin %>-<%- platform %>-<%- arch %><%- ext %>',
34
34
  versioned: '<%- bin %>-v<%- version %>-<%- sha %>-<%- platform %>-<%- arch %><%- ext %>',
35
35
  manifest: '<%- bin %>-v<%- version %>-<%- sha %>-<%- platform %>-<%- arch %>-buildmanifest',
36
- macos: '<%- bin %>-v<%- version %>-<%- sha %>.pkg',
36
+ macos: '<%- bin %>-v<%- version %>-<%- sha %>-<%- arch %>.pkg',
37
37
  win32: '<%- bin %>-v<%- version %>-<%- sha %>-<%- arch %>.exe',
38
38
  deb: '<%- bin %>_<%- versionShaRevision %>_<%- arch %>.deb',
39
39
  };
package/package.json CHANGED
@@ -1,15 +1,15 @@
1
1
  {
2
2
  "name": "oclif",
3
3
  "description": "oclif: create your own CLI",
4
- "version": "2.6.2",
4
+ "version": "3.0.1",
5
5
  "author": "Salesforce",
6
6
  "bin": {
7
7
  "oclif": "bin/run"
8
8
  },
9
9
  "bugs": "https://github.com/oclif/oclif/issues",
10
10
  "dependencies": {
11
- "@oclif/core": "^1.6.1",
12
- "@oclif/plugin-help": "^5.1.11",
11
+ "@oclif/core": "^1.6.4",
12
+ "@oclif/plugin-help": "^5.1.12",
13
13
  "@oclif/plugin-not-found": "^2.3.1",
14
14
  "@oclif/plugin-warn-if-update-available": "^2.0.4",
15
15
  "aws-sdk": "^2.1069.0",
@@ -62,10 +62,12 @@
62
62
  "typescript": "4.5.5"
63
63
  },
64
64
  "resolutions": {
65
- "colors": "1.4.0"
65
+ "colors": "1.4.0",
66
+ "@oclif/core": "^1.6.4"
66
67
  },
67
68
  "overrides": {
68
- "colors": "1.4.0"
69
+ "colors": "1.4.0",
70
+ "@oclif/core": "^1.6.4"
69
71
  },
70
72
  "engines": {
71
73
  "node": ">=12.0.0"