oclif 4.0.4 → 4.1.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.
package/lib/commands/pack/win.js
CHANGED
|
@@ -202,8 +202,8 @@ exit $ret
|
|
|
202
202
|
};
|
|
203
203
|
class PackWin extends core_1.Command {
|
|
204
204
|
static description = `create windows installer from oclif CLI
|
|
205
|
-
|
|
206
|
-
This command
|
|
205
|
+
|
|
206
|
+
This command will produce unsigned installers unless you supply WINDOWS_SIGNING_PASS (prefixed with the name of your executable, e.g. OCLIF_WINDOWS_SIGNING_PASS) in the environment and have set the windows.name and windows.keypath properties in your package.json's oclif property.`;
|
|
207
207
|
static flags = {
|
|
208
208
|
'additional-cli': core_1.Flags.string({
|
|
209
209
|
description: `an Oclif CLI other than the one listed in config.bin that should be made available to the user
|
package/lib/commands/readme.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ export default class Readme extends Command {
|
|
|
5
5
|
aliases: Interfaces.BooleanFlag<boolean>;
|
|
6
6
|
dir: Interfaces.OptionFlag<string, Interfaces.CustomOptions>;
|
|
7
7
|
multi: Interfaces.BooleanFlag<boolean>;
|
|
8
|
+
'readme-path': Interfaces.OptionFlag<string, Interfaces.CustomOptions>;
|
|
8
9
|
'repository-prefix': Interfaces.OptionFlag<string | undefined, Interfaces.CustomOptions>;
|
|
9
10
|
version: Interfaces.OptionFlag<string | undefined, Interfaces.CustomOptions>;
|
|
10
11
|
};
|
package/lib/commands/readme.js
CHANGED
|
@@ -26,6 +26,7 @@ Customize the code URL prefix by setting oclif.repositoryPrefix in package.json.
|
|
|
26
26
|
aliases: core_1.Flags.boolean({ allowNo: true, default: true, description: 'include aliases in the command list' }),
|
|
27
27
|
dir: core_1.Flags.string({ default: 'docs', description: 'output directory for multi docs', required: true }),
|
|
28
28
|
multi: core_1.Flags.boolean({ description: 'create a different markdown page for each topic' }),
|
|
29
|
+
'readme-path': core_1.Flags.string({ default: 'README.md', description: 'Path to the README file.', required: true }),
|
|
29
30
|
'repository-prefix': core_1.Flags.string({ description: 'a template string used to build links to the source code' }),
|
|
30
31
|
version: core_1.Flags.string({
|
|
31
32
|
description: 'version to use in readme links. defaults to the version in package.json',
|
|
@@ -138,7 +139,7 @@ Customize the code URL prefix by setting oclif.repositoryPrefix in package.json.
|
|
|
138
139
|
if (readme.includes(`<!-- ${tag}stop -->`)) {
|
|
139
140
|
readme = readme.replace(new RegExp(`<!-- ${tag} -->(.|\n)*<!-- ${tag}stop -->`, 'm'), `<!-- ${tag} -->`);
|
|
140
141
|
}
|
|
141
|
-
this.log(`replacing <!-- ${tag} --> in
|
|
142
|
+
this.log(`replacing <!-- ${tag} --> in ${this.flags['readme-path']}`);
|
|
142
143
|
}
|
|
143
144
|
return readme.replace(`<!-- ${tag} -->`, `<!-- ${tag} -->\n${body}\n<!-- ${tag}stop -->`);
|
|
144
145
|
}
|
|
@@ -146,7 +147,7 @@ Customize the code URL prefix by setting oclif.repositoryPrefix in package.json.
|
|
|
146
147
|
const { flags } = await this.parse(Readme);
|
|
147
148
|
this.flags = flags;
|
|
148
149
|
const cwd = process.cwd();
|
|
149
|
-
const readmePath = path.resolve(cwd, '
|
|
150
|
+
const readmePath = path.resolve(cwd, flags['readme-path']);
|
|
150
151
|
const tsConfigPath = path.resolve(cwd, 'tsconfig.json');
|
|
151
152
|
const tsConfig = await fs.readJSON(tsConfigPath).catch(() => ({}));
|
|
152
153
|
const outDir = tsConfig.compilerOptions?.outDir ?? 'lib';
|
package/oclif.manifest.json
CHANGED
|
@@ -218,6 +218,15 @@
|
|
|
218
218
|
"allowNo": false,
|
|
219
219
|
"type": "boolean"
|
|
220
220
|
},
|
|
221
|
+
"readme-path": {
|
|
222
|
+
"description": "Path to the README file.",
|
|
223
|
+
"name": "readme-path",
|
|
224
|
+
"required": true,
|
|
225
|
+
"default": "README.md",
|
|
226
|
+
"hasDynamicHelp": false,
|
|
227
|
+
"multiple": false,
|
|
228
|
+
"type": "option"
|
|
229
|
+
},
|
|
221
230
|
"repository-prefix": {
|
|
222
231
|
"description": "a template string used to build links to the source code",
|
|
223
232
|
"name": "repository-prefix",
|
|
@@ -483,7 +492,7 @@
|
|
|
483
492
|
"pack:win": {
|
|
484
493
|
"aliases": [],
|
|
485
494
|
"args": {},
|
|
486
|
-
"description": "create windows installer from oclif CLI\n\n This command
|
|
495
|
+
"description": "create windows installer from oclif CLI\n \n This command will produce unsigned installers unless you supply WINDOWS_SIGNING_PASS (prefixed with the name of your executable, e.g. OCLIF_WINDOWS_SIGNING_PASS) in the environment and have set the windows.name and windows.keypath properties in your package.json's oclif property.",
|
|
487
496
|
"flags": {
|
|
488
497
|
"additional-cli": {
|
|
489
498
|
"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\"",
|
|
@@ -708,5 +717,5 @@
|
|
|
708
717
|
]
|
|
709
718
|
}
|
|
710
719
|
},
|
|
711
|
-
"version": "4.0
|
|
720
|
+
"version": "4.1.0"
|
|
712
721
|
}
|