oclif 3.6.5 → 3.7.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.
- package/.oclif.manifest.json +1 -1
- package/lib/commands/generate/hook.d.ts +1 -1
- package/lib/commands/manifest.js +1 -1
- package/lib/commands/pack/deb.d.ts +2 -2
- package/lib/commands/pack/macos.d.ts +5 -6
- package/lib/commands/pack/macos.js +12 -4
- package/lib/commands/pack/tarballs.d.ts +3 -3
- package/lib/commands/pack/win.d.ts +3 -3
- package/lib/commands/promote.d.ts +6 -6
- package/lib/commands/readme.d.ts +1 -1
- package/lib/commands/upload/deb.d.ts +1 -1
- package/lib/commands/upload/macos.d.ts +2 -2
- package/lib/commands/upload/tarballs.d.ts +2 -2
- package/lib/commands/upload/win.d.ts +1 -1
- package/lib/generators/cli.js +6 -1
- package/package.json +2 -2
package/.oclif.manifest.json
CHANGED
|
@@ -3,7 +3,7 @@ export default class GenerateHook extends CommandBase {
|
|
|
3
3
|
static description: string;
|
|
4
4
|
static flags: {
|
|
5
5
|
force: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
6
|
-
event: import("@oclif/core/lib/interfaces").OptionFlag<string,
|
|
6
|
+
event: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
7
7
|
};
|
|
8
8
|
static args: {
|
|
9
9
|
name: import("@oclif/core/lib/interfaces/parser").Arg<string, Record<string, unknown>>;
|
package/lib/commands/manifest.js
CHANGED
|
@@ -54,7 +54,7 @@ class Manifest extends core_1.Command {
|
|
|
54
54
|
let plugin = new core_1.Plugin({ root, type: 'core', ignoreManifest: true, errorOnManifestCreate: true });
|
|
55
55
|
if (!plugin)
|
|
56
56
|
throw new Error('plugin not found');
|
|
57
|
-
await plugin.load();
|
|
57
|
+
await plugin.load(true);
|
|
58
58
|
if (!plugin.valid) {
|
|
59
59
|
const p = require.resolve('@oclif/plugin-legacy', { paths: [process.cwd()] });
|
|
60
60
|
const { PluginLegacy } = require(p);
|
|
@@ -3,8 +3,8 @@ import { Interfaces } from '@oclif/core';
|
|
|
3
3
|
export default class PackDeb extends Command {
|
|
4
4
|
static description: string;
|
|
5
5
|
static flags: {
|
|
6
|
-
root: Interfaces.OptionFlag<string,
|
|
7
|
-
tarball: Interfaces.OptionFlag<string | undefined,
|
|
6
|
+
root: Interfaces.OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
7
|
+
tarball: Interfaces.OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
8
8
|
};
|
|
9
9
|
run(): Promise<void>;
|
|
10
10
|
}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import { Command } from '@oclif/core';
|
|
2
|
-
import { Interfaces } from '@oclif/core';
|
|
1
|
+
import { Command, Interfaces } from '@oclif/core';
|
|
3
2
|
export default class PackMacos extends Command {
|
|
4
3
|
static description: string;
|
|
5
4
|
static flags: {
|
|
6
|
-
root: Interfaces.OptionFlag<string,
|
|
7
|
-
'additional-cli': Interfaces.OptionFlag<string | undefined,
|
|
8
|
-
tarball: Interfaces.OptionFlag<string | undefined,
|
|
9
|
-
targets: Interfaces.OptionFlag<string | undefined,
|
|
5
|
+
root: Interfaces.OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
6
|
+
'additional-cli': Interfaces.OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
7
|
+
tarball: Interfaces.OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
8
|
+
targets: Interfaces.OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
10
9
|
};
|
|
11
10
|
run(): Promise<void>;
|
|
12
11
|
}
|
|
@@ -8,6 +8,7 @@ const Tarballs = require("../../tarballs");
|
|
|
8
8
|
const upload_util_1 = require("../../upload-util");
|
|
9
9
|
const child_process_1 = require("child_process");
|
|
10
10
|
const node_util_1 = require("node:util");
|
|
11
|
+
const os = require("os");
|
|
11
12
|
const exec = (0, node_util_1.promisify)(child_process_1.exec);
|
|
12
13
|
const noBundleConfiguration = `<?xml version="1.0" encoding="UTF-8"?>
|
|
13
14
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
@@ -23,13 +24,18 @@ sudo rm -rf /usr/local/bin/${config.bin}
|
|
|
23
24
|
${additionalCLI ?
|
|
24
25
|
`sudo rm -rf /usr/local/${additionalCLI}
|
|
25
26
|
sudo rm -rf /usr/local/bin/${additionalCLI}` : ''}
|
|
27
|
+
${config.binAliases ? config.binAliases.map(alias => `sudo rm -rf /usr/local/bin/${alias}`).join(os.EOL) : ''}
|
|
26
28
|
`,
|
|
27
|
-
postinstall: (config, additionalCLI) =>
|
|
29
|
+
postinstall: (config, additionalCLI) => {
|
|
30
|
+
var _a;
|
|
31
|
+
return `#!/usr/bin/env bash
|
|
28
32
|
set -x
|
|
29
33
|
sudo mkdir -p /usr/local/bin
|
|
30
34
|
sudo ln -sf /usr/local/lib/${config.dirname}/bin/${config.bin} /usr/local/bin/${config.bin}
|
|
35
|
+
${config.binAliases ? (_a = config.binAliases) === null || _a === void 0 ? void 0 : _a.map(alias => `sudo ln -sf /usr/local/lib/${config.dirname}/bin/${config.bin} /usr/local/bin/${alias}`).join(os.EOL) : ''}
|
|
31
36
|
${additionalCLI ? `sudo ln -sf /usr/local/lib/${config.dirname}/bin/${additionalCLI} /usr/local/bin/${additionalCLI}` : ''}
|
|
32
|
-
|
|
37
|
+
`;
|
|
38
|
+
},
|
|
33
39
|
uninstall: (config, additionalCLI) => {
|
|
34
40
|
const packageIdentifier = config.pjson.oclif.macos.identifier;
|
|
35
41
|
return `#!/usr/bin/env bash
|
|
@@ -69,6 +75,8 @@ while [ "$1" != "-y" ]; do
|
|
|
69
75
|
done
|
|
70
76
|
|
|
71
77
|
echo "Application uninstalling process started"
|
|
78
|
+
# remove bin aliases link
|
|
79
|
+
${config.binAliases ? config.binAliases.map(alias => `find "/usr/local/bin/" -name "${alias}" | xargs rm`).join(os.EOL) : ''}
|
|
72
80
|
# remove link to shortcut file
|
|
73
81
|
find "/usr/local/bin/" -name "${config.bin}" | xargs rm
|
|
74
82
|
${additionalCLI ? `find "/usr/local/bin/" -name "${additionalCLI}" | xargs rm` : ''}
|
|
@@ -83,9 +91,9 @@ fi
|
|
|
83
91
|
pkgutil --forget "${packageIdentifier}" > /dev/null 2>&1
|
|
84
92
|
if [ $? -eq 0 ]
|
|
85
93
|
then
|
|
86
|
-
echo "[2/3] [DONE] Successfully deleted application
|
|
94
|
+
echo "[2/3] [DONE] Successfully deleted application information"
|
|
87
95
|
else
|
|
88
|
-
echo "[2/3] [ERROR] Could not delete application
|
|
96
|
+
echo "[2/3] [ERROR] Could not delete application information" >&2
|
|
89
97
|
fi
|
|
90
98
|
|
|
91
99
|
#remove application source distribution
|
|
@@ -2,11 +2,11 @@ import { Command } from '@oclif/core';
|
|
|
2
2
|
export default class PackTarballs extends Command {
|
|
3
3
|
static description: string;
|
|
4
4
|
static flags: {
|
|
5
|
-
root: import("@oclif/core/lib/interfaces").OptionFlag<string,
|
|
6
|
-
targets: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined,
|
|
5
|
+
root: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
6
|
+
targets: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
7
7
|
xz: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
8
8
|
parallel: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
9
|
-
tarball: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined,
|
|
9
|
+
tarball: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
10
10
|
};
|
|
11
11
|
run(): Promise<void>;
|
|
12
12
|
}
|
|
@@ -3,9 +3,9 @@ import { Interfaces } from '@oclif/core';
|
|
|
3
3
|
export default class PackWin extends Command {
|
|
4
4
|
static description: string;
|
|
5
5
|
static flags: {
|
|
6
|
-
root: Interfaces.OptionFlag<string,
|
|
7
|
-
'additional-cli': Interfaces.OptionFlag<string | undefined,
|
|
8
|
-
tarball: Interfaces.OptionFlag<string | undefined,
|
|
6
|
+
root: Interfaces.OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
7
|
+
'additional-cli': Interfaces.OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
8
|
+
tarball: Interfaces.OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
9
9
|
};
|
|
10
10
|
run(): Promise<void>;
|
|
11
11
|
private checkForNSIS;
|
|
@@ -2,15 +2,15 @@ import { Command } from '@oclif/core';
|
|
|
2
2
|
export default class Promote extends Command {
|
|
3
3
|
static description: string;
|
|
4
4
|
static flags: {
|
|
5
|
-
root: import("@oclif/core/lib/interfaces").OptionFlag<string,
|
|
6
|
-
version: import("@oclif/core/lib/interfaces").OptionFlag<string,
|
|
7
|
-
sha: import("@oclif/core/lib/interfaces").OptionFlag<string,
|
|
8
|
-
channel: import("@oclif/core/lib/interfaces").OptionFlag<string,
|
|
9
|
-
targets: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined,
|
|
5
|
+
root: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
6
|
+
version: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
7
|
+
sha: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
8
|
+
channel: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
9
|
+
targets: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
10
10
|
deb: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
11
11
|
macos: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
12
12
|
win: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
13
|
-
'max-age': import("@oclif/core/lib/interfaces").OptionFlag<string,
|
|
13
|
+
'max-age': import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
14
14
|
xz: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
15
15
|
indexes: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
16
16
|
};
|
package/lib/commands/readme.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { Command, Interfaces } from '@oclif/core';
|
|
|
2
2
|
export default class Readme extends Command {
|
|
3
3
|
static description: string;
|
|
4
4
|
static flags: {
|
|
5
|
-
dir: Interfaces.OptionFlag<string,
|
|
5
|
+
dir: Interfaces.OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
6
6
|
multi: Interfaces.BooleanFlag<boolean>;
|
|
7
7
|
aliases: Interfaces.BooleanFlag<boolean>;
|
|
8
8
|
};
|
|
@@ -2,7 +2,7 @@ import { Command } from '@oclif/core';
|
|
|
2
2
|
export default class UploadDeb extends Command {
|
|
3
3
|
static description: string;
|
|
4
4
|
static flags: {
|
|
5
|
-
root: import("@oclif/core/lib/interfaces").OptionFlag<string,
|
|
5
|
+
root: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
6
6
|
};
|
|
7
7
|
run(): Promise<void>;
|
|
8
8
|
}
|
|
@@ -2,8 +2,8 @@ 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: Interfaces.OptionFlag<string,
|
|
6
|
-
targets: Interfaces.OptionFlag<string | undefined,
|
|
5
|
+
root: Interfaces.OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
6
|
+
targets: Interfaces.OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
7
7
|
};
|
|
8
8
|
run(): Promise<void>;
|
|
9
9
|
}
|
|
@@ -3,8 +3,8 @@ import { Interfaces } from '@oclif/core';
|
|
|
3
3
|
export default class UploadTarballs extends Command {
|
|
4
4
|
static description: string;
|
|
5
5
|
static flags: {
|
|
6
|
-
root: Interfaces.OptionFlag<string,
|
|
7
|
-
targets: Interfaces.OptionFlag<string | undefined,
|
|
6
|
+
root: Interfaces.OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
7
|
+
targets: Interfaces.OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
8
8
|
xz: Interfaces.BooleanFlag<boolean>;
|
|
9
9
|
};
|
|
10
10
|
run(): Promise<void>;
|
|
@@ -2,7 +2,7 @@ import { Command } from '@oclif/core';
|
|
|
2
2
|
export default class UploadWin extends Command {
|
|
3
3
|
static description: string;
|
|
4
4
|
static flags: {
|
|
5
|
-
root: import("@oclif/core/lib/interfaces").OptionFlag<string,
|
|
5
|
+
root: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
6
6
|
};
|
|
7
7
|
run(): Promise<void>;
|
|
8
8
|
}
|
package/lib/generators/cli.js
CHANGED
|
@@ -94,7 +94,7 @@ class CLI extends Generator {
|
|
|
94
94
|
type: 'input',
|
|
95
95
|
name: 'github.repo',
|
|
96
96
|
message: 'What is the GitHub name of repository (https://github.com/owner/REPO)',
|
|
97
|
-
default: (answers) => (this.pjson.repository ||
|
|
97
|
+
default: (answers) => (answers.name || this.pjson.repository || this.pjson.name).split('/').pop(),
|
|
98
98
|
},
|
|
99
99
|
{
|
|
100
100
|
type: 'list',
|
|
@@ -129,6 +129,10 @@ class CLI extends Generator {
|
|
|
129
129
|
this.pjson.oclif.dirname = this.answers.bin;
|
|
130
130
|
this.pjson.bin = {};
|
|
131
131
|
this.pjson.bin[this.pjson.oclif.bin] = './bin/run';
|
|
132
|
+
if (!this.options.yarn) {
|
|
133
|
+
const scripts = (this.pjson.scripts || {});
|
|
134
|
+
this.pjson.scripts = Object.fromEntries(Object.entries(scripts).map(([k, v]) => [k, v.replace('yarn', 'npm run')]));
|
|
135
|
+
}
|
|
132
136
|
}
|
|
133
137
|
writing() {
|
|
134
138
|
if (this.pjson.oclif && Array.isArray(this.pjson.oclif.plugins)) {
|
|
@@ -139,6 +143,7 @@ class CLI extends Generator {
|
|
|
139
143
|
this.pjson.files = _.uniq((this.pjson.files || []).sort());
|
|
140
144
|
this.fs.writeJSON(this.destinationPath('./package.json'), this.pjson);
|
|
141
145
|
this.fs.write(this.destinationPath('.gitignore'), this._gitignore());
|
|
146
|
+
this.fs.delete(this.destinationPath('LICENSE'));
|
|
142
147
|
}
|
|
143
148
|
end() {
|
|
144
149
|
this.spawnCommandSync(this.env.options.nodePackageManager, ['run', 'build']);
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "oclif",
|
|
3
3
|
"description": "oclif: create your own CLI",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.7.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": "^2.0
|
|
11
|
+
"@oclif/core": "^2.7.0",
|
|
12
12
|
"@oclif/plugin-help": "^5.1.19",
|
|
13
13
|
"@oclif/plugin-not-found": "^2.3.7",
|
|
14
14
|
"@oclif/plugin-warn-if-update-available": "^2.0.14",
|