oclif 1.18.2-dev.3 → 1.18.2-dev.4
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/.oclif.manifest.json +1 -1
- package/CHANGELOG.md +2 -1
- package/README.md +5 -5
- package/lib/commands/pack/macos.d.ts +1 -1
- package/lib/commands/pack/macos.js +11 -11
- package/lib/commands/pack/win.d.ts +1 -1
- package/lib/commands/pack/win.js +15 -13
- package/package.json +1 -1
package/.oclif.manifest.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"1.18.2-dev.
|
|
1
|
+
{"version":"1.18.2-dev.4","commands":{"base":{"id":"base","pluginName":"oclif","pluginType":"core","hidden":true,"aliases":[],"flags":{"defaults":{"name":"defaults","type":"boolean","description":"use defaults for every setting","allowNo":false},"options":{"name":"options","type":"option","description":"(yarn|typescript|eslint|mocha)"},"force":{"name":"force","type":"boolean","description":"overwrite existing files","allowNo":false}},"args":[{"name":"path","description":"path to project, defaults to current directory","required":false}]},"command":{"id":"command","description":"add a command to an existing CLI or plugin","pluginName":"oclif","pluginType":"core","aliases":[],"flags":{"defaults":{"name":"defaults","type":"boolean","description":"use defaults for every setting","allowNo":false},"force":{"name":"force","type":"boolean","description":"overwrite existing files","allowNo":false}},"args":[{"name":"name","description":"name of command","required":true}]},"hook":{"id":"hook","description":"add a hook to an existing CLI or plugin","pluginName":"oclif","pluginType":"core","aliases":[],"flags":{"defaults":{"name":"defaults","type":"boolean","description":"use defaults for every setting","allowNo":false},"force":{"name":"force","type":"boolean","description":"overwrite existing files","allowNo":false},"event":{"name":"event","type":"option","description":"event to run hook on","default":"init"}},"args":[{"name":"name","description":"name of hook (snake_case)","required":true}]},"manifest":{"id":"manifest","description":"generates plugin manifest json","pluginName":"oclif","pluginType":"core","hidden":true,"aliases":[],"flags":{},"args":[{"name":"path","description":"path to plugin","default":"."}]},"multi":{"id":"multi","description":"generate a new multi-command CLI","pluginName":"oclif","pluginType":"core","aliases":[],"flags":{"defaults":{"name":"defaults","type":"boolean","description":"use defaults for every setting","allowNo":false},"options":{"name":"options","type":"option","description":"(yarn|typescript|eslint|mocha)"},"force":{"name":"force","type":"boolean","description":"overwrite existing files","allowNo":false}},"args":[{"name":"path","description":"path to project, defaults to current directory","required":false}]},"plugin":{"id":"plugin","description":"create a new CLI plugin","pluginName":"oclif","pluginType":"core","aliases":[],"flags":{"defaults":{"name":"defaults","type":"boolean","description":"use defaults for every setting","allowNo":false},"options":{"name":"options","type":"option","description":"(yarn|typescript|eslint|mocha)"},"force":{"name":"force","type":"boolean","description":"overwrite existing files","allowNo":false}},"args":[{"name":"path","description":"path to project, defaults to current directory","required":false}]},"promote":{"id":"promote","description":"promote CLI builds to a S3 release channel","pluginName":"oclif","pluginType":"core","hidden":true,"aliases":[],"flags":{"root":{"name":"root","type":"option","char":"r","description":"path to the oclif CLI project root","required":true,"default":"."},"version":{"name":"version","type":"option","description":"semantic version of the CLI to promote","required":true},"sha":{"name":"sha","type":"option","description":"7-digit short git commit SHA of the CLI to promote","required":true},"channel":{"name":"channel","type":"option","description":"which channel to promote to","required":true,"default":"stable"},"targets":{"name":"targets","type":"option","char":"t","description":"comma-separated targets to promote (e.g.: linux-arm,win32-x64)","default":"linux-x64,linux-arm,win32-x64,win32-x86,darwin-x64"},"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","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","pluginName":"oclif","pluginType":"core","hidden":true,"aliases":[],"flags":{"dir":{"name":"dir","type":"option","description":"output directory for multi docs","required":true,"default":"docs"},"multi":{"name":"multi","type":"boolean","description":"create a different markdown page for each topic","allowNo":false}},"args":[]},"single":{"id":"single","description":"generate a new single-command CLI","pluginName":"oclif","pluginType":"core","aliases":[],"flags":{"defaults":{"name":"defaults","type":"boolean","description":"use defaults for every setting","allowNo":false},"options":{"name":"options","type":"option","description":"(yarn|typescript|eslint|mocha)"},"force":{"name":"force","type":"boolean","description":"overwrite existing files","allowNo":false}},"args":[{"name":"path","description":"path to project, defaults to current directory","required":false}]},"pack:deb":{"id":"pack:deb","description":"pack CLI into debian package","pluginName":"oclif","pluginType":"core","hidden":true,"aliases":[],"flags":{"root":{"name":"root","type":"option","char":"r","description":"path to oclif CLI root","required":true,"default":"."}},"args":[]},"pack:macos":{"id":"pack:macos","description":"pack CLI into macOS .pkg","pluginName":"oclif","pluginType":"core","hidden":true,"aliases":[],"flags":{"root":{"name":"root","type":"option","char":"r","description":"path to oclif CLI root","required":true,"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\""}},"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","pluginName":"oclif","pluginType":"core","hidden":true,"aliases":[],"flags":{"root":{"name":"root","type":"option","char":"r","description":"path to oclif CLI root","required":true,"default":"."},"targets":{"name":"targets","type":"option","char":"t","description":"comma-separated targets to pack (e.g.: linux-arm,win32-x64)","default":"linux-x64,linux-arm,win32-x64,win32-x86,darwin-x64"},"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","pluginName":"oclif","pluginType":"core","hidden":true,"aliases":[],"flags":{"root":{"name":"root","type":"option","char":"r","description":"path to oclif CLI root","required":true,"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\""}},"args":[]},"upload:deb":{"id":"upload:deb","description":"upload deb package built with pack:deb","pluginName":"oclif","pluginType":"core","hidden":true,"aliases":[],"flags":{"root":{"name":"root","type":"option","char":"r","description":"path to oclif CLI root","required":true,"default":"."}},"args":[]},"upload:macos":{"id":"upload:macos","description":"upload macos installers built with pack:macos","pluginName":"oclif","pluginType":"core","hidden":true,"aliases":[],"flags":{"root":{"name":"root","type":"option","char":"r","description":"path to oclif CLI root","required":true,"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","pluginName":"oclif","pluginType":"core","hidden":true,"aliases":[],"flags":{"root":{"name":"root","type":"option","char":"r","description":"path to oclif CLI root","required":true,"default":"."},"targets":{"name":"targets","type":"option","char":"t","description":"comma-separated targets to upload (e.g.: linux-arm,win32-x64)","default":"linux-x64,linux-arm,win32-x64,win32-x86,darwin-x64"},"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","pluginName":"oclif","pluginType":"core","hidden":true,"aliases":[],"flags":{"root":{"name":"root","type":"option","char":"r","description":"path to oclif CLI root","required":true,"default":"."}},"args":[]}}}
|
package/CHANGELOG.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
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.18.2-dev.
|
|
5
|
+
### [1.18.2-dev.4](https://github.com/oclif/oclif/compare/v1.18.1...v1.18.2-dev.4) (2021-10-29)
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
### ⚠ BREAKING CHANGES
|
|
@@ -17,6 +17,7 @@ All notable changes to this project will be documented in this file. See [standa
|
|
|
17
17
|
|
|
18
18
|
### Bug Fixes
|
|
19
19
|
|
|
20
|
+
* allow additional oclif CLIs, not executables in general ([c009e8e](https://github.com/oclif/oclif/commit/c009e8efec46401162364d815863969a567a67ec))
|
|
20
21
|
* build and find tarballs using the same version ([44c4177](https://github.com/oclif/oclif/commit/44c41774c262c85eebd1a0eb8afce07edfd5ef8c))
|
|
21
22
|
* lint ([110e659](https://github.com/oclif/oclif/commit/110e6597c3fe41a1453c0034b166b23419324b71))
|
|
22
23
|
* release new dev version ([cb63e9c](https://github.com/oclif/oclif/commit/cb63e9c508dbbf7dea0ed44a3bd082be7fbc122b))
|
package/README.md
CHANGED
|
@@ -146,7 +146,7 @@ OPTIONS
|
|
|
146
146
|
--force overwrite existing files
|
|
147
147
|
```
|
|
148
148
|
|
|
149
|
-
_See code: [src/commands/command.ts](https://github.com/oclif/oclif/blob/v1.18.2-dev.
|
|
149
|
+
_See code: [src/commands/command.ts](https://github.com/oclif/oclif/blob/v1.18.2-dev.4/src/commands/command.ts)_
|
|
150
150
|
|
|
151
151
|
## `oclif help [COMMAND]`
|
|
152
152
|
|
|
@@ -182,7 +182,7 @@ OPTIONS
|
|
|
182
182
|
--force overwrite existing files
|
|
183
183
|
```
|
|
184
184
|
|
|
185
|
-
_See code: [src/commands/hook.ts](https://github.com/oclif/oclif/blob/v1.18.2-dev.
|
|
185
|
+
_See code: [src/commands/hook.ts](https://github.com/oclif/oclif/blob/v1.18.2-dev.4/src/commands/hook.ts)_
|
|
186
186
|
|
|
187
187
|
## `oclif multi [PATH]`
|
|
188
188
|
|
|
@@ -201,7 +201,7 @@ OPTIONS
|
|
|
201
201
|
--options=options (yarn|typescript|eslint|mocha)
|
|
202
202
|
```
|
|
203
203
|
|
|
204
|
-
_See code: [src/commands/multi.ts](https://github.com/oclif/oclif/blob/v1.18.2-dev.
|
|
204
|
+
_See code: [src/commands/multi.ts](https://github.com/oclif/oclif/blob/v1.18.2-dev.4/src/commands/multi.ts)_
|
|
205
205
|
|
|
206
206
|
## `oclif plugin [PATH]`
|
|
207
207
|
|
|
@@ -220,7 +220,7 @@ OPTIONS
|
|
|
220
220
|
--options=options (yarn|typescript|eslint|mocha)
|
|
221
221
|
```
|
|
222
222
|
|
|
223
|
-
_See code: [src/commands/plugin.ts](https://github.com/oclif/oclif/blob/v1.18.2-dev.
|
|
223
|
+
_See code: [src/commands/plugin.ts](https://github.com/oclif/oclif/blob/v1.18.2-dev.4/src/commands/plugin.ts)_
|
|
224
224
|
|
|
225
225
|
## `oclif single [PATH]`
|
|
226
226
|
|
|
@@ -239,7 +239,7 @@ OPTIONS
|
|
|
239
239
|
--options=options (yarn|typescript|eslint|mocha)
|
|
240
240
|
```
|
|
241
241
|
|
|
242
|
-
_See code: [src/commands/single.ts](https://github.com/oclif/oclif/blob/v1.18.2-dev.
|
|
242
|
+
_See code: [src/commands/single.ts](https://github.com/oclif/oclif/blob/v1.18.2-dev.4/src/commands/single.ts)_
|
|
243
243
|
<!-- commandsstop -->
|
|
244
244
|
|
|
245
245
|
# 🏭 Related Repositories
|
|
@@ -4,7 +4,7 @@ export default class PackMacos extends Command {
|
|
|
4
4
|
static description: string;
|
|
5
5
|
static flags: {
|
|
6
6
|
root: flags.IOptionFlag<string>;
|
|
7
|
-
'additional-
|
|
7
|
+
'additional-cli': flags.IOptionFlag<string | undefined>;
|
|
8
8
|
};
|
|
9
9
|
run(): Promise<void>;
|
|
10
10
|
}
|
|
@@ -6,21 +6,21 @@ const qq = require("qqjs");
|
|
|
6
6
|
const Tarballs = require("../../tarballs");
|
|
7
7
|
const upload_util_1 = require("../../upload-util");
|
|
8
8
|
const scripts = {
|
|
9
|
-
preinstall: (config,
|
|
9
|
+
preinstall: (config, additionalCLI) => `#!/usr/bin/env bash
|
|
10
10
|
sudo rm -rf /usr/local/lib/${config.dirname}
|
|
11
11
|
sudo rm -rf /usr/local/${config.bin}
|
|
12
12
|
sudo rm -rf /usr/local/bin/${config.bin}
|
|
13
|
-
${
|
|
14
|
-
`sudo rm -rf /usr/local/${
|
|
15
|
-
sudo rm -rf /usr/local/bin/${
|
|
13
|
+
${additionalCLI ?
|
|
14
|
+
`sudo rm -rf /usr/local/${additionalCLI}
|
|
15
|
+
sudo rm -rf /usr/local/bin/${additionalCLI}` : ''}
|
|
16
16
|
`,
|
|
17
|
-
postinstall: (config,
|
|
17
|
+
postinstall: (config, additionalCLI) => `#!/usr/bin/env bash
|
|
18
18
|
set -x
|
|
19
19
|
sudo mkdir -p /usr/local/bin
|
|
20
20
|
sudo ln -sf /usr/local/lib/${config.dirname}/bin/${config.bin} /usr/local/bin/${config.bin}
|
|
21
|
-
${
|
|
21
|
+
${additionalCLI ? `sudo ln -sf /usr/local/lib/${config.dirname}/bin/${additionalCLI} /usr/local/bin/${additionalCLI}` : ''}
|
|
22
22
|
`,
|
|
23
|
-
uninstall: (config,
|
|
23
|
+
uninstall: (config, additionalCLI) => {
|
|
24
24
|
const packageIdentifier = config.pjson.oclif.macos.identifier;
|
|
25
25
|
return `#!/usr/bin/env bash
|
|
26
26
|
|
|
@@ -61,7 +61,7 @@ done
|
|
|
61
61
|
echo "Application uninstalling process started"
|
|
62
62
|
# remove link to shorcut file
|
|
63
63
|
find "/usr/local/bin/" -name "${config.bin}" | xargs rm
|
|
64
|
-
${
|
|
64
|
+
${additionalCLI ? `find "/usr/local/bin/" -name "${additionalCLI}" | xargs rm` : ''}
|
|
65
65
|
if [ $? -eq 0 ]
|
|
66
66
|
then
|
|
67
67
|
echo "[1/3] [DONE] Successfully deleted shortcut links"
|
|
@@ -115,7 +115,7 @@ class PackMacos extends command_1.Command {
|
|
|
115
115
|
const writeScript = async (script) => {
|
|
116
116
|
const path = script === 'uninstall' ? [rootDir, 'bin'] : [scriptsDir];
|
|
117
117
|
path.push(script);
|
|
118
|
-
await qq.write(path, scripts[script](config, flags['additional-
|
|
118
|
+
await qq.write(path, scripts[script](config, flags['additional-cli']));
|
|
119
119
|
await qq.chmod(path, 0o755);
|
|
120
120
|
};
|
|
121
121
|
await writeScript('preinstall');
|
|
@@ -146,6 +146,6 @@ PackMacos.hidden = true;
|
|
|
146
146
|
PackMacos.description = 'pack CLI into macOS .pkg';
|
|
147
147
|
PackMacos.flags = {
|
|
148
148
|
root: command_1.flags.string({ char: 'r', description: 'path to oclif CLI root', default: '.', required: true }),
|
|
149
|
-
'additional-
|
|
150
|
-
the
|
|
149
|
+
'additional-cli': command_1.flags.string({ description: `an Oclif CLI other than the one listed in config.bin that should be made available to the user
|
|
150
|
+
the CLI should already exist in a directory named after the CLI that is the root of the tarball produced by "oclif pack:tarballs"` }),
|
|
151
151
|
};
|
|
@@ -4,7 +4,7 @@ export default class PackWin extends Command {
|
|
|
4
4
|
static description: string;
|
|
5
5
|
static flags: {
|
|
6
6
|
root: flags.IOptionFlag<string>;
|
|
7
|
-
'additional-
|
|
7
|
+
'additional-cli': flags.IOptionFlag<string | undefined>;
|
|
8
8
|
};
|
|
9
9
|
run(): Promise<void>;
|
|
10
10
|
private checkForNSIS;
|
package/lib/commands/pack/win.js
CHANGED
|
@@ -6,20 +6,20 @@ const Tarballs = require("../../tarballs");
|
|
|
6
6
|
const upload_util_1 = require("../../upload-util");
|
|
7
7
|
const scripts = {
|
|
8
8
|
/* eslint-disable no-useless-escape */
|
|
9
|
-
cmd: (config,
|
|
9
|
+
cmd: (config, additionalCLI = undefined) => `@echo off
|
|
10
10
|
setlocal enableextensions
|
|
11
11
|
|
|
12
|
-
set ${config.scopedEnvVarKey('BINPATH')}=%~dp0\\${
|
|
13
|
-
if exist "%LOCALAPPDATA%\\${config.dirname}\\client\\bin\\${
|
|
14
|
-
"%LOCALAPPDATA%\\${config.dirname}\\client\\bin\\${
|
|
12
|
+
set ${additionalCLI ? `${additionalCLI.toUpperCase()}_BINPATH` : config.scopedEnvVarKey('BINPATH')}=%~dp0\\${additionalCLI !== null && additionalCLI !== void 0 ? additionalCLI : config.bin}.cmd
|
|
13
|
+
if exist "%LOCALAPPDATA%\\${config.dirname}\\client\\bin\\${additionalCLI !== null && additionalCLI !== void 0 ? additionalCLI : config.bin}.cmd" (
|
|
14
|
+
"%LOCALAPPDATA%\\${config.dirname}\\client\\bin\\${additionalCLI !== null && additionalCLI !== void 0 ? additionalCLI : config.bin}.cmd" %*
|
|
15
15
|
) else (
|
|
16
|
-
"%~dp0\\..\\client\\bin\\node.exe" "%~dp0\\..\\client
|
|
16
|
+
"%~dp0\\..\\client\\bin\\node.exe" "%~dp0\\..\\client\\${additionalCLI ? `${additionalCLI}\\bin\\run` : 'bin\\run'}" %*
|
|
17
17
|
)
|
|
18
18
|
`,
|
|
19
|
-
sh: (config
|
|
19
|
+
sh: (config) => `#!/bin/sh
|
|
20
20
|
basedir=$(dirname "$(echo "$0" | sed -e 's,\\\\,/,g')")
|
|
21
21
|
|
|
22
|
-
"$basedir/../client/bin/${
|
|
22
|
+
"$basedir/../client/bin/${config.bin}.cmd" "$@"
|
|
23
23
|
ret=$?
|
|
24
24
|
exit $ret
|
|
25
25
|
`,
|
|
@@ -203,9 +203,9 @@ class PackWin extends command_1.Command {
|
|
|
203
203
|
await qq.write([installerBase, `bin/${config.bin}.cmd`], scripts.cmd(config));
|
|
204
204
|
// eslint-disable-next-line no-await-in-loop
|
|
205
205
|
await qq.write([installerBase, `bin/${config.bin}`], scripts.sh(config));
|
|
206
|
-
if (flags['additional-
|
|
207
|
-
await qq.write([installerBase, `bin/${flags['additional-
|
|
208
|
-
await qq.write([installerBase, `bin/${flags['additional-
|
|
206
|
+
if (flags['additional-cli']) {
|
|
207
|
+
await qq.write([installerBase, `bin/${flags['additional-cli']}.cmd`], scripts.cmd(config, flags['additional-cli'])); // eslint-disable-line no-await-in-loop
|
|
208
|
+
await qq.write([installerBase, `bin/${flags['additional-cli']}`], scripts.sh({ bin: flags['additional-cli'] })); // eslint-disable-line no-await-in-loop
|
|
209
209
|
}
|
|
210
210
|
// eslint-disable-next-line no-await-in-loop
|
|
211
211
|
await qq.write([installerBase, `${config.bin}.nsi`], scripts.nsis(config, arch));
|
|
@@ -256,9 +256,11 @@ class PackWin extends command_1.Command {
|
|
|
256
256
|
}
|
|
257
257
|
exports.default = PackWin;
|
|
258
258
|
PackWin.hidden = true;
|
|
259
|
-
PackWin.description =
|
|
259
|
+
PackWin.description = `create windows installer from oclif CLI
|
|
260
|
+
|
|
261
|
+
This command requires WINDOWS_SIGNING (prefixed with the name of your executable, e.g. OCLIF_WINDOWS_SIGNING_PASS) to be set in the environment`;
|
|
260
262
|
PackWin.flags = {
|
|
261
263
|
root: command_1.flags.string({ char: 'r', description: 'path to oclif CLI root', default: '.', required: true }),
|
|
262
|
-
'additional-
|
|
263
|
-
the
|
|
264
|
+
'additional-cli': command_1.flags.string({ description: `an Oclif CLI other than the one listed in config.bin that should be made available to the user
|
|
265
|
+
the CLI should already exist in a directory named after the CLI that is the root of the tarball produced by "oclif pack:tarballs"` }),
|
|
264
266
|
};
|