oclif 3.11.0 → 3.11.2
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/README.md +2 -2
- package/lib/commands/readme.js +4 -1
- package/lib/generators/cli.js +1 -2
- package/lib/generators/command.d.ts +3 -2
- package/lib/generators/command.js +1 -2
- package/lib/generators/hook.d.ts +3 -2
- package/lib/generators/hook.js +1 -2
- package/lib/types/index.d.ts +0 -10
- package/package.json +4 -10
package/.oclif.manifest.json
CHANGED
package/README.md
CHANGED
package/lib/commands/readme.js
CHANGED
|
@@ -125,11 +125,14 @@ USAGE
|
|
|
125
125
|
return usage ? `## \`${config.bin} ${usage}\`` : `## \`${config.bin}\``;
|
|
126
126
|
};
|
|
127
127
|
try {
|
|
128
|
+
// copy c to keep the command ID with colons, see:
|
|
129
|
+
// https://github.com/oclif/oclif/pull/1165#discussion_r1282305242
|
|
130
|
+
const command = Object.assign({}, c);
|
|
128
131
|
return (0, util_1.compact)([
|
|
129
132
|
header(),
|
|
130
133
|
title,
|
|
131
134
|
'```\n' + wrapper.formatCommand(c).trim() + '\n```',
|
|
132
|
-
this.commandCode(config,
|
|
135
|
+
this.commandCode(config, command),
|
|
133
136
|
]).join('\n\n');
|
|
134
137
|
}
|
|
135
138
|
catch (error) {
|
package/lib/generators/cli.js
CHANGED
|
@@ -5,7 +5,6 @@ const fs = require("fs");
|
|
|
5
5
|
const _ = require("lodash");
|
|
6
6
|
const path = require("path");
|
|
7
7
|
const Generator = require("yeoman-generator");
|
|
8
|
-
const yosay = require("yosay");
|
|
9
8
|
const debug = require('debug')('generator-oclif');
|
|
10
9
|
const { version } = require('../../package.json');
|
|
11
10
|
let hasYarn = false;
|
|
@@ -26,7 +25,7 @@ class CLI extends Generator {
|
|
|
26
25
|
}
|
|
27
26
|
async prompting() {
|
|
28
27
|
const msg = 'Time to build an oclif CLI!';
|
|
29
|
-
this.log(
|
|
28
|
+
this.log(`${msg} Version: ${version}`);
|
|
30
29
|
const { moduleType } = await this.prompt([
|
|
31
30
|
{
|
|
32
31
|
type: 'list',
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import * as Generator from 'yeoman-generator';
|
|
2
|
-
import { GeneratorOptions
|
|
2
|
+
import { GeneratorOptions } from '../types';
|
|
3
|
+
import { Interfaces } from '@oclif/core';
|
|
3
4
|
export default class Command extends Generator {
|
|
4
5
|
options: GeneratorOptions;
|
|
5
|
-
pjson:
|
|
6
|
+
pjson: Interfaces.PJSON;
|
|
6
7
|
constructor(args: string | string[], opts: GeneratorOptions);
|
|
7
8
|
private hasMocha;
|
|
8
9
|
prompting(): Promise<void>;
|
|
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const _ = require("lodash");
|
|
4
4
|
const path = require("path");
|
|
5
5
|
const Generator = require("yeoman-generator");
|
|
6
|
-
const yosay = require("yosay");
|
|
7
6
|
const { version } = require('../../package.json');
|
|
8
7
|
class Command extends Generator {
|
|
9
8
|
constructor(args, opts) {
|
|
@@ -23,7 +22,7 @@ class Command extends Generator {
|
|
|
23
22
|
if (!this.pjson)
|
|
24
23
|
throw new Error('not in a project directory');
|
|
25
24
|
this.pjson.oclif = this.pjson.oclif || {};
|
|
26
|
-
this.log(
|
|
25
|
+
this.log(`Adding a command to ${this.pjson.name}! Version: ${version}`);
|
|
27
26
|
}
|
|
28
27
|
writing() {
|
|
29
28
|
const cmdPath = this.options.name.split(':').join('/');
|
package/lib/generators/hook.d.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import * as Generator from 'yeoman-generator';
|
|
2
|
-
import { GeneratorOptions
|
|
2
|
+
import { GeneratorOptions } from '../types';
|
|
3
|
+
import { Interfaces } from '@oclif/core';
|
|
3
4
|
export interface Options extends GeneratorOptions {
|
|
4
5
|
event: string;
|
|
5
6
|
}
|
|
6
7
|
export default class Hook extends Generator {
|
|
7
8
|
options: Options;
|
|
8
|
-
pjson:
|
|
9
|
+
pjson: Interfaces.PJSON;
|
|
9
10
|
constructor(args: string | string[], options: Options);
|
|
10
11
|
private hasMocha;
|
|
11
12
|
prompting(): Promise<void>;
|
package/lib/generators/hook.js
CHANGED
|
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const _ = require("lodash");
|
|
4
4
|
const path = require("path");
|
|
5
5
|
const Generator = require("yeoman-generator");
|
|
6
|
-
const yosay = require("yosay");
|
|
7
6
|
const { version } = require('../../package.json');
|
|
8
7
|
class Hook extends Generator {
|
|
9
8
|
constructor(args, options) {
|
|
@@ -19,7 +18,7 @@ class Hook extends Generator {
|
|
|
19
18
|
this.pjson.oclif = this.pjson.oclif || {};
|
|
20
19
|
if (!this.pjson)
|
|
21
20
|
throw new Error('not in a project directory');
|
|
22
|
-
this.log(
|
|
21
|
+
this.log(`Adding a ${this.options.event} hook to ${this.pjson.name}! Version: ${version}`);
|
|
23
22
|
}
|
|
24
23
|
writing() {
|
|
25
24
|
this.sourceRoot(path.join(__dirname, '../../templates'));
|
package/lib/types/index.d.ts
CHANGED
|
@@ -1,14 +1,4 @@
|
|
|
1
1
|
import * as Generator from 'yeoman-generator';
|
|
2
|
-
export interface PackageJson {
|
|
3
|
-
name: string;
|
|
4
|
-
devDependencies: Record<string, string>;
|
|
5
|
-
dependencies: Record<string, string>;
|
|
6
|
-
oclif: {
|
|
7
|
-
bin: string;
|
|
8
|
-
dirname: string;
|
|
9
|
-
hooks: Record<string, string | string[]>;
|
|
10
|
-
};
|
|
11
|
-
}
|
|
12
2
|
export interface GeneratorOptions extends Generator.GeneratorOptions {
|
|
13
3
|
name: string;
|
|
14
4
|
defaults?: boolean;
|
package/package.json
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "oclif",
|
|
3
3
|
"description": "oclif: create your own CLI",
|
|
4
|
-
"version": "3.11.
|
|
4
|
+
"version": "3.11.2",
|
|
5
5
|
"author": "Salesforce",
|
|
6
6
|
"bin": {
|
|
7
|
-
"oclif": "bin/run"
|
|
8
|
-
"oclif2": "bin/run"
|
|
7
|
+
"oclif": "bin/run"
|
|
9
8
|
},
|
|
10
9
|
"bugs": "https://github.com/oclif/oclif/issues",
|
|
11
10
|
"dependencies": {
|
|
12
|
-
"@oclif/core": "^2.
|
|
11
|
+
"@oclif/core": "^2.11.4",
|
|
13
12
|
"@oclif/plugin-help": "^5.2.14",
|
|
14
13
|
"@oclif/plugin-not-found": "^2.3.32",
|
|
15
14
|
"@oclif/plugin-warn-if-update-available": "^2.0.44",
|
|
@@ -26,8 +25,7 @@
|
|
|
26
25
|
"shelljs": "^0.8.5",
|
|
27
26
|
"tslib": "^2.3.1",
|
|
28
27
|
"yeoman-environment": "^3.15.1",
|
|
29
|
-
"yeoman-generator": "^5.8.0"
|
|
30
|
-
"yosay": "^2.0.2"
|
|
28
|
+
"yeoman-generator": "^5.8.0"
|
|
31
29
|
},
|
|
32
30
|
"devDependencies": {
|
|
33
31
|
"@oclif/plugin-legacy": "^1.3.0",
|
|
@@ -42,7 +40,6 @@
|
|
|
42
40
|
"@types/semver": "^7.3.13",
|
|
43
41
|
"@types/shelljs": "^0.8.11",
|
|
44
42
|
"@types/yeoman-generator": "^5.2.11",
|
|
45
|
-
"@types/yosay": "^2.0.1",
|
|
46
43
|
"chai": "^4.3.7",
|
|
47
44
|
"conventional-changelog-cli": "^2.2.2",
|
|
48
45
|
"eslint": "^7.32.0",
|
|
@@ -87,9 +84,6 @@
|
|
|
87
84
|
"@oclif/plugin-not-found"
|
|
88
85
|
],
|
|
89
86
|
"bin": "oclif",
|
|
90
|
-
"binAliases": [
|
|
91
|
-
"oclif2"
|
|
92
|
-
],
|
|
93
87
|
"dirname": "oclif",
|
|
94
88
|
"topicSeparator": " ",
|
|
95
89
|
"macos": {
|