@oclif/core 4.0.0-beta.7 → 4.0.0-beta.9
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/args.d.ts +4 -4
- package/lib/cache.d.ts +3 -3
- package/lib/cache.js +1 -1
- package/lib/command.d.ts +18 -19
- package/lib/command.js +10 -8
- package/lib/config/config.d.ts +10 -30
- package/lib/config/config.js +25 -66
- package/lib/config/plugin-loader.d.ts +6 -6
- package/lib/config/plugin-loader.js +3 -26
- package/lib/config/plugin.d.ts +3 -3
- package/lib/config/plugin.js +2 -5
- package/lib/config/ts-path.d.ts +1 -1
- package/lib/errors/errors/cli.d.ts +5 -5
- package/lib/errors/errors/pretty-print.d.ts +2 -2
- package/lib/flags.d.ts +4 -4
- package/lib/flush.js +2 -2
- package/lib/help/formatter.d.ts +3 -3
- package/lib/help/index.d.ts +1 -0
- package/lib/help/index.js +19 -10
- package/lib/index.d.ts +4 -5
- package/lib/index.js +1 -1
- package/lib/interfaces/config.d.ts +9 -9
- package/lib/interfaces/errors.d.ts +5 -5
- package/lib/interfaces/flags.d.ts +3 -2
- package/lib/interfaces/hooks.d.ts +1 -1
- package/lib/interfaces/index.d.ts +1 -1
- package/lib/interfaces/parser.d.ts +7 -8
- package/lib/interfaces/pjson.d.ts +217 -151
- package/lib/interfaces/plugin.d.ts +25 -25
- package/lib/interfaces/topic.d.ts +2 -2
- package/lib/main.js +2 -2
- package/lib/parser/errors.d.ts +1 -1
- package/lib/parser/index.d.ts +1 -1
- package/lib/settings.d.ts +5 -5
- package/lib/util/aggregate-flags.d.ts +1 -1
- package/lib/util/aggregate-flags.js +2 -3
- package/lib/util/cache-command.js +3 -4
- package/lib/util/determine-priority.d.ts +21 -0
- package/lib/util/determine-priority.js +55 -0
- package/lib/util/ids.d.ts +1 -1
- package/lib/util/read-pjson.d.ts +1 -1
- package/lib/ux/colorize-json.d.ts +2 -2
- package/lib/ux/index.d.ts +7 -2
- package/lib/ux/index.js +15 -3
- package/lib/ux/theme.d.ts +1 -1
- package/package.json +26 -11
- package/flush.d.ts +0 -3
- package/flush.js +0 -1
- package/handle.js +0 -1
|
@@ -3,35 +3,35 @@ import { Logger } from './logger';
|
|
|
3
3
|
import { HookOptions, PJSON } from './pjson';
|
|
4
4
|
import { Topic } from './topic';
|
|
5
5
|
export interface PluginOptions {
|
|
6
|
-
children?: Plugin[];
|
|
7
|
-
errorOnManifestCreate?: boolean;
|
|
8
|
-
flexibleTaxonomy?: boolean;
|
|
9
|
-
ignoreManifest?: boolean;
|
|
10
|
-
isRoot?: boolean;
|
|
11
|
-
name?: string;
|
|
12
|
-
parent?: Plugin;
|
|
13
|
-
pjson?: PJSON
|
|
14
|
-
respectNoCacheDefault?: boolean;
|
|
6
|
+
children?: Plugin[] | undefined;
|
|
7
|
+
errorOnManifestCreate?: boolean | undefined;
|
|
8
|
+
flexibleTaxonomy?: boolean | undefined;
|
|
9
|
+
ignoreManifest?: boolean | undefined;
|
|
10
|
+
isRoot?: boolean | undefined;
|
|
11
|
+
name?: string | undefined;
|
|
12
|
+
parent?: Plugin | undefined;
|
|
13
|
+
pjson?: PJSON | undefined;
|
|
14
|
+
respectNoCacheDefault?: boolean | undefined;
|
|
15
15
|
root: string;
|
|
16
|
-
tag?: string;
|
|
17
|
-
type?: string;
|
|
18
|
-
url?: string;
|
|
16
|
+
tag?: string | undefined;
|
|
17
|
+
type?: string | undefined;
|
|
18
|
+
url?: string | undefined;
|
|
19
19
|
}
|
|
20
20
|
export interface Options extends PluginOptions {
|
|
21
|
-
channel?: string;
|
|
22
|
-
devPlugins?: boolean;
|
|
23
|
-
enablePerf?: boolean;
|
|
24
|
-
jitPlugins?: boolean;
|
|
25
|
-
logger?: Logger;
|
|
26
|
-
pjson?: PJSON
|
|
21
|
+
channel?: string | undefined;
|
|
22
|
+
devPlugins?: boolean | undefined;
|
|
23
|
+
enablePerf?: boolean | undefined;
|
|
24
|
+
jitPlugins?: boolean | undefined;
|
|
25
|
+
logger?: Logger | undefined;
|
|
26
|
+
pjson?: PJSON | undefined;
|
|
27
27
|
pluginAdditions?: {
|
|
28
28
|
core?: string[];
|
|
29
29
|
dev?: string[];
|
|
30
30
|
path?: string;
|
|
31
|
-
};
|
|
32
|
-
plugins?: Map<string, Plugin
|
|
33
|
-
userPlugins?: boolean;
|
|
34
|
-
version?: string;
|
|
31
|
+
} | undefined;
|
|
32
|
+
plugins?: Map<string, Plugin> | undefined;
|
|
33
|
+
userPlugins?: boolean | undefined;
|
|
34
|
+
version?: string | undefined;
|
|
35
35
|
}
|
|
36
36
|
export interface Plugin {
|
|
37
37
|
/**
|
|
@@ -69,13 +69,13 @@ export interface Plugin {
|
|
|
69
69
|
*/
|
|
70
70
|
name: string;
|
|
71
71
|
readonly options: Options;
|
|
72
|
-
parent?: Plugin;
|
|
72
|
+
parent?: Plugin | undefined;
|
|
73
73
|
/**
|
|
74
74
|
* full package.json
|
|
75
75
|
*
|
|
76
76
|
* parsed with read-pkg
|
|
77
77
|
*/
|
|
78
|
-
pjson: PJSON
|
|
78
|
+
pjson: PJSON;
|
|
79
79
|
/**
|
|
80
80
|
* base path of plugin
|
|
81
81
|
*/
|
|
@@ -84,7 +84,7 @@ export interface Plugin {
|
|
|
84
84
|
* npm dist-tag of plugin
|
|
85
85
|
* only used for user plugins
|
|
86
86
|
*/
|
|
87
|
-
tag?: string;
|
|
87
|
+
tag?: string | undefined;
|
|
88
88
|
readonly topics: Topic[];
|
|
89
89
|
/**
|
|
90
90
|
* used to tell the user how the plugin was installed
|
package/lib/main.js
CHANGED
|
@@ -11,7 +11,7 @@ const help_1 = require("./help");
|
|
|
11
11
|
const logger_1 = require("./logger");
|
|
12
12
|
const performance_1 = require("./performance");
|
|
13
13
|
const symbols_1 = require("./symbols");
|
|
14
|
-
const ux_1 =
|
|
14
|
+
const ux_1 = require("./ux");
|
|
15
15
|
const helpAddition = (argv, config) => {
|
|
16
16
|
if (argv.length === 0 && !config.isSingleCommandCLI)
|
|
17
17
|
return true;
|
|
@@ -69,7 +69,7 @@ async function run(argv, options) {
|
|
|
69
69
|
await config.runHook('init', { argv: argvSlice, id });
|
|
70
70
|
// display version if applicable
|
|
71
71
|
if ((0, exports.versionAddition)(argv, config)) {
|
|
72
|
-
ux_1.
|
|
72
|
+
ux_1.ux.stdout(config.userAgent);
|
|
73
73
|
await collectPerf();
|
|
74
74
|
return;
|
|
75
75
|
}
|
package/lib/parser/errors.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { Arg, ArgInput, CLIParseErrorOptions, OptionFlag } from '../interfaces/p
|
|
|
3
3
|
export { CLIError } from '../errors';
|
|
4
4
|
export type Validation = {
|
|
5
5
|
name: string;
|
|
6
|
-
reason?: string;
|
|
6
|
+
reason?: string | undefined;
|
|
7
7
|
status: 'failed' | 'success';
|
|
8
8
|
validationFn: string;
|
|
9
9
|
};
|
package/lib/parser/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { Input, OutputArgs, OutputFlags, ParserOutput } from '../interfaces/parser';
|
|
2
2
|
export { flagUsages } from './help';
|
|
3
|
-
export declare function parse<TFlags extends OutputFlags<any>,
|
|
3
|
+
export declare function parse<TFlags extends OutputFlags<any>, TArgs extends OutputArgs<any>>(argv: string[], options: Input<TFlags, TArgs>): Promise<ParserOutput<TFlags, TArgs>>;
|
package/lib/settings.d.ts
CHANGED
|
@@ -5,19 +5,19 @@ export type Settings = {
|
|
|
5
5
|
* Environment Variable:
|
|
6
6
|
* OCLIF_COLUMNS=80
|
|
7
7
|
*/
|
|
8
|
-
columns?: number;
|
|
8
|
+
columns?: number | undefined;
|
|
9
9
|
/**
|
|
10
10
|
* Show additional debug output without DEBUG. Mainly shows stackstraces.
|
|
11
11
|
*
|
|
12
12
|
* Useful to set in the ./bin/dev.js script.
|
|
13
13
|
* oclif.settings.debug = true;
|
|
14
14
|
*/
|
|
15
|
-
debug?: boolean;
|
|
15
|
+
debug?: boolean | undefined;
|
|
16
16
|
/**
|
|
17
17
|
* Enable performance tracking. Resulting data is available in the `perf` property of the `Config` class.
|
|
18
18
|
* This will be overridden by the `enablePerf` property passed into Config constructor.
|
|
19
19
|
*/
|
|
20
|
-
performanceEnabled?: boolean;
|
|
20
|
+
performanceEnabled?: boolean | undefined;
|
|
21
21
|
/**
|
|
22
22
|
* Try to use ts-node to load typescript source files instead of javascript files.
|
|
23
23
|
* Defaults to true in development and test environments (e.g. using bin/dev.js or
|
|
@@ -25,12 +25,12 @@ export type Settings = {
|
|
|
25
25
|
*
|
|
26
26
|
* @deprecated use enableAutoTranspile instead.
|
|
27
27
|
*/
|
|
28
|
-
tsnodeEnabled?: boolean;
|
|
28
|
+
tsnodeEnabled?: boolean | undefined;
|
|
29
29
|
/**
|
|
30
30
|
* Enable automatic transpilation of TypeScript files to JavaScript.
|
|
31
31
|
*
|
|
32
32
|
* Defaults to true in development and test environments (e.g. using bin/dev.js or NODE_ENV=development or NODE_ENV=test).
|
|
33
33
|
*/
|
|
34
|
-
enableAutoTranspile?: boolean;
|
|
34
|
+
enableAutoTranspile?: boolean | undefined;
|
|
35
35
|
};
|
|
36
36
|
export declare const settings: Settings;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { FlagInput, FlagOutput } from '../interfaces/parser';
|
|
2
|
-
export declare function aggregateFlags<F extends FlagOutput
|
|
2
|
+
export declare function aggregateFlags<F extends FlagOutput>(flags: FlagInput<F> | undefined, enableJsonFlag: boolean | undefined): FlagInput<F>;
|
|
@@ -6,8 +6,7 @@ const json = (0, flags_1.boolean)({
|
|
|
6
6
|
description: 'Format output as json.',
|
|
7
7
|
helpGroup: 'GLOBAL',
|
|
8
8
|
});
|
|
9
|
-
function aggregateFlags(flags,
|
|
10
|
-
|
|
11
|
-
return (enableJsonFlag ? { json, ...combinedFlags } : combinedFlags);
|
|
9
|
+
function aggregateFlags(flags, enableJsonFlag) {
|
|
10
|
+
return (enableJsonFlag ? { json, ...flags } : flags);
|
|
12
11
|
}
|
|
13
12
|
exports.aggregateFlags = aggregateFlags;
|
|
@@ -6,8 +6,7 @@ const cache_default_value_1 = require("./cache-default-value");
|
|
|
6
6
|
const ensure_arg_object_1 = require("./ensure-arg-object");
|
|
7
7
|
const util_1 = require("./util");
|
|
8
8
|
// In order to collect static properties up the inheritance chain, we need to recursively
|
|
9
|
-
// access the prototypes until there's nothing left.
|
|
10
|
-
// and flags as well as add in the json flag if enableJsonFlag is enabled.
|
|
9
|
+
// access the prototypes until there's nothing left.
|
|
11
10
|
function mergePrototype(result, cmd) {
|
|
12
11
|
const proto = Object.getPrototypeOf(cmd);
|
|
13
12
|
const filteredProto = (0, util_1.pickBy)(proto, (v) => v !== undefined);
|
|
@@ -71,10 +70,10 @@ async function cacheCommand(uncachedCmd, plugin, respectNoCacheDefault = false)
|
|
|
71
70
|
const cmd = mergePrototype(uncachedCmd, uncachedCmd);
|
|
72
71
|
// @ts-expect-error because v2 commands have flags stored in _flags
|
|
73
72
|
const uncachedFlags = cmd.flags ?? cmd._flags;
|
|
74
|
-
// @ts-expect-error because v2 commands have base flags stored in _baseFlags
|
|
73
|
+
// @ts-expect-error because v2 commands have base flags stored in `_baseFlags` and v4 commands never have `baseFlags`
|
|
75
74
|
const uncachedBaseFlags = cmd.baseFlags ?? cmd._baseFlags;
|
|
76
75
|
const [flags, args] = await Promise.all([
|
|
77
|
-
await cacheFlags((0, aggregate_flags_1.aggregateFlags)(uncachedFlags, uncachedBaseFlags, cmd.enableJsonFlag), respectNoCacheDefault),
|
|
76
|
+
await cacheFlags((0, aggregate_flags_1.aggregateFlags)({ ...uncachedFlags, ...uncachedBaseFlags }, cmd.enableJsonFlag), respectNoCacheDefault),
|
|
78
77
|
await cacheArgs((0, ensure_arg_object_1.ensureArgObject)(cmd.args), respectNoCacheDefault),
|
|
79
78
|
]);
|
|
80
79
|
const stdProperties = {
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Command } from '../command';
|
|
2
|
+
/**
|
|
3
|
+
* This function is responsible for locating the correct plugin to use for a named command id
|
|
4
|
+
* It searches the {Config} registered commands to match either the raw command id or the command alias
|
|
5
|
+
* It is possible that more than one command will be found. This is due the ability of two distinct plugins to
|
|
6
|
+
* create the same command or command alias.
|
|
7
|
+
*
|
|
8
|
+
* In the case of more than one found command, the function will select the command based on the order in which
|
|
9
|
+
* the plugin is included in the package.json `oclif.plugins` list. The command that occurs first in the list
|
|
10
|
+
* is selected as the command to run.
|
|
11
|
+
*
|
|
12
|
+
* Commands can also be present from either an install or a link. When a command is one of these and a core plugin
|
|
13
|
+
* is present, this function defers to the core plugin.
|
|
14
|
+
*
|
|
15
|
+
* If there is not a core plugin command present, this function will return the first
|
|
16
|
+
* plugin as discovered (will not change the order)
|
|
17
|
+
*
|
|
18
|
+
* @param commands commands to determine the priority of
|
|
19
|
+
* @returns command instance {Command.Loadable} or undefined
|
|
20
|
+
*/
|
|
21
|
+
export declare function determinePriority(plugins: string[], commands: Command.Loadable[]): Command.Loadable;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.determinePriority = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* This function is responsible for locating the correct plugin to use for a named command id
|
|
6
|
+
* It searches the {Config} registered commands to match either the raw command id or the command alias
|
|
7
|
+
* It is possible that more than one command will be found. This is due the ability of two distinct plugins to
|
|
8
|
+
* create the same command or command alias.
|
|
9
|
+
*
|
|
10
|
+
* In the case of more than one found command, the function will select the command based on the order in which
|
|
11
|
+
* the plugin is included in the package.json `oclif.plugins` list. The command that occurs first in the list
|
|
12
|
+
* is selected as the command to run.
|
|
13
|
+
*
|
|
14
|
+
* Commands can also be present from either an install or a link. When a command is one of these and a core plugin
|
|
15
|
+
* is present, this function defers to the core plugin.
|
|
16
|
+
*
|
|
17
|
+
* If there is not a core plugin command present, this function will return the first
|
|
18
|
+
* plugin as discovered (will not change the order)
|
|
19
|
+
*
|
|
20
|
+
* @param commands commands to determine the priority of
|
|
21
|
+
* @returns command instance {Command.Loadable} or undefined
|
|
22
|
+
*/
|
|
23
|
+
function determinePriority(plugins, commands) {
|
|
24
|
+
const commandPlugins = commands.sort((a, b) => {
|
|
25
|
+
const pluginAliasA = a.pluginAlias ?? 'A-Cannot-Find-This';
|
|
26
|
+
const pluginAliasB = b.pluginAlias ?? 'B-Cannot-Find-This';
|
|
27
|
+
const aIndex = plugins.indexOf(pluginAliasA);
|
|
28
|
+
const bIndex = plugins.indexOf(pluginAliasB);
|
|
29
|
+
// When both plugin types are 'core' plugins sort based on index
|
|
30
|
+
if (a.pluginType === 'core' && b.pluginType === 'core') {
|
|
31
|
+
// If b appears first in the pjson.plugins sort it first
|
|
32
|
+
return aIndex - bIndex;
|
|
33
|
+
}
|
|
34
|
+
// if b is a core plugin and a is not sort b first
|
|
35
|
+
if (b.pluginType === 'core' && a.pluginType !== 'core') {
|
|
36
|
+
return 1;
|
|
37
|
+
}
|
|
38
|
+
// if a is a core plugin and b is not sort a first
|
|
39
|
+
if (a.pluginType === 'core' && b.pluginType !== 'core') {
|
|
40
|
+
return -1;
|
|
41
|
+
}
|
|
42
|
+
// if a is a jit plugin and b is not sort b first
|
|
43
|
+
if (a.pluginType === 'jit' && b.pluginType !== 'jit') {
|
|
44
|
+
return 1;
|
|
45
|
+
}
|
|
46
|
+
// if b is a jit plugin and a is not sort a first
|
|
47
|
+
if (b.pluginType === 'jit' && a.pluginType !== 'jit') {
|
|
48
|
+
return -1;
|
|
49
|
+
}
|
|
50
|
+
// neither plugin is core, so do not change the order
|
|
51
|
+
return 0;
|
|
52
|
+
});
|
|
53
|
+
return commandPlugins[0];
|
|
54
|
+
}
|
|
55
|
+
exports.determinePriority = determinePriority;
|
package/lib/util/ids.d.ts
CHANGED
package/lib/util/read-pjson.d.ts
CHANGED
|
@@ -4,4 +4,4 @@ import { PJSON } from '../interfaces';
|
|
|
4
4
|
*
|
|
5
5
|
* We can assume that the package.json file exists because the plugin root has already been loaded at this point.
|
|
6
6
|
*/
|
|
7
|
-
export declare function readPjson(path: string): Promise<PJSON
|
|
7
|
+
export declare function readPjson(path: string): Promise<PJSON>;
|
package/lib/ux/index.d.ts
CHANGED
|
@@ -5,7 +5,13 @@ import Simple from './action/simple';
|
|
|
5
5
|
import Spinner from './action/spinner';
|
|
6
6
|
import colorizeJson from './colorize-json';
|
|
7
7
|
import { colorize } from './theme';
|
|
8
|
-
export
|
|
8
|
+
export { error } from '../errors/error';
|
|
9
|
+
export { exit } from '../errors/exit';
|
|
10
|
+
export { warn } from '../errors/warn';
|
|
11
|
+
export { default as colorizeJson } from './colorize-json';
|
|
12
|
+
export { colorize } from './theme';
|
|
13
|
+
export { stderr, stdout } from './write';
|
|
14
|
+
export declare const ux: {
|
|
9
15
|
action: Simple | Spinner;
|
|
10
16
|
/**
|
|
11
17
|
* Add color to text.
|
|
@@ -61,4 +67,3 @@ export declare const methods: {
|
|
|
61
67
|
*/
|
|
62
68
|
warn: typeof warn;
|
|
63
69
|
};
|
|
64
|
-
export default methods;
|
package/lib/ux/index.js
CHANGED
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
6
|
+
exports.ux = exports.stdout = exports.stderr = exports.colorize = exports.colorizeJson = exports.warn = exports.exit = exports.error = void 0;
|
|
7
7
|
const error_1 = require("../errors/error");
|
|
8
8
|
const exit_1 = require("../errors/exit");
|
|
9
9
|
const warn_1 = require("../errors/warn");
|
|
@@ -12,12 +12,25 @@ const spinner_1 = __importDefault(require("./action/spinner"));
|
|
|
12
12
|
const colorize_json_1 = __importDefault(require("./colorize-json"));
|
|
13
13
|
const theme_1 = require("./theme");
|
|
14
14
|
const write_1 = require("./write");
|
|
15
|
+
var error_2 = require("../errors/error");
|
|
16
|
+
Object.defineProperty(exports, "error", { enumerable: true, get: function () { return error_2.error; } });
|
|
17
|
+
var exit_2 = require("../errors/exit");
|
|
18
|
+
Object.defineProperty(exports, "exit", { enumerable: true, get: function () { return exit_2.exit; } });
|
|
19
|
+
var warn_2 = require("../errors/warn");
|
|
20
|
+
Object.defineProperty(exports, "warn", { enumerable: true, get: function () { return warn_2.warn; } });
|
|
21
|
+
var colorize_json_2 = require("./colorize-json");
|
|
22
|
+
Object.defineProperty(exports, "colorizeJson", { enumerable: true, get: function () { return __importDefault(colorize_json_2).default; } });
|
|
23
|
+
var theme_2 = require("./theme");
|
|
24
|
+
Object.defineProperty(exports, "colorize", { enumerable: true, get: function () { return theme_2.colorize; } });
|
|
25
|
+
var write_2 = require("./write");
|
|
26
|
+
Object.defineProperty(exports, "stderr", { enumerable: true, get: function () { return write_2.stderr; } });
|
|
27
|
+
Object.defineProperty(exports, "stdout", { enumerable: true, get: function () { return write_2.stdout; } });
|
|
15
28
|
const ACTION_TYPE = (Boolean(process.stderr.isTTY) &&
|
|
16
29
|
!process.env.CI &&
|
|
17
30
|
!['dumb', 'emacs-color'].includes(process.env.TERM) &&
|
|
18
31
|
'spinner') ||
|
|
19
32
|
'simple';
|
|
20
|
-
exports.
|
|
33
|
+
exports.ux = {
|
|
21
34
|
action: ACTION_TYPE === 'spinner' ? new spinner_1.default() : new simple_1.default(),
|
|
22
35
|
/**
|
|
23
36
|
* Add color to text.
|
|
@@ -73,4 +86,3 @@ exports.methods = {
|
|
|
73
86
|
*/
|
|
74
87
|
warn: warn_1.warn,
|
|
75
88
|
};
|
|
76
|
-
exports.default = exports.methods;
|
package/lib/ux/theme.d.ts
CHANGED
|
@@ -6,4 +6,4 @@ import { StandardAnsi, Theme } from '../interfaces/theme';
|
|
|
6
6
|
* @returns colorized string
|
|
7
7
|
*/
|
|
8
8
|
export declare function colorize(color: string | StandardAnsi | undefined, text: string): string;
|
|
9
|
-
export declare function parseTheme(theme: Record<string, string
|
|
9
|
+
export declare function parseTheme(theme: Record<string, string | Record<string, string>>): Theme;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oclif/core",
|
|
3
3
|
"description": "base library for oclif CLIs",
|
|
4
|
-
"version": "4.0.0-beta.
|
|
4
|
+
"version": "4.0.0-beta.9",
|
|
5
5
|
"author": "Salesforce",
|
|
6
6
|
"bugs": "https://github.com/oclif/core/issues",
|
|
7
7
|
"dependencies": {
|
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
"@oclif/plugin-help": "^6",
|
|
29
29
|
"@oclif/plugin-plugins": "^5",
|
|
30
30
|
"@oclif/prettier-config": "^0.2.1",
|
|
31
|
+
"@oclif/test": "^4",
|
|
31
32
|
"@types/benchmark": "^2.1.5",
|
|
32
33
|
"@types/chai": "^4.3.11",
|
|
33
34
|
"@types/chai-as-promised": "^7.1.8",
|
|
@@ -57,7 +58,7 @@
|
|
|
57
58
|
"nyc": "^15.1.0",
|
|
58
59
|
"prettier": "^3.2.5",
|
|
59
60
|
"shx": "^0.3.4",
|
|
60
|
-
"sinon": "^
|
|
61
|
+
"sinon": "^18",
|
|
61
62
|
"ts-node": "^10.9.2",
|
|
62
63
|
"tsd": "^0.31.0",
|
|
63
64
|
"typescript": "^5"
|
|
@@ -66,10 +67,7 @@
|
|
|
66
67
|
"node": ">=18.0.0"
|
|
67
68
|
},
|
|
68
69
|
"files": [
|
|
69
|
-
"/lib"
|
|
70
|
-
"/flush.js",
|
|
71
|
-
"/flush.d.ts",
|
|
72
|
-
"/handle.js"
|
|
70
|
+
"/lib"
|
|
73
71
|
],
|
|
74
72
|
"homepage": "https://github.com/oclif/core",
|
|
75
73
|
"keywords": [
|
|
@@ -82,7 +80,26 @@
|
|
|
82
80
|
"argv"
|
|
83
81
|
],
|
|
84
82
|
"license": "MIT",
|
|
85
|
-
"
|
|
83
|
+
"exports": {
|
|
84
|
+
".": "./lib/index.js",
|
|
85
|
+
"./args": "./lib/args.js",
|
|
86
|
+
"./command": "./lib/command.js",
|
|
87
|
+
"./config": "./lib/config/index.js",
|
|
88
|
+
"./errors": "./lib/errors/index.js",
|
|
89
|
+
"./execute": "./lib/execute.js",
|
|
90
|
+
"./flags": "./lib/flags.js",
|
|
91
|
+
"./flush": "./lib/flush.js",
|
|
92
|
+
"./handle": "./lib/errors/handle.js",
|
|
93
|
+
"./help": "./lib/help/index.js",
|
|
94
|
+
"./hooks": "./lib/interfaces/hooks.js",
|
|
95
|
+
"./interfaces": "./lib/interfaces/index.js",
|
|
96
|
+
"./logger": "./lib/logger.js",
|
|
97
|
+
"./performance": "./lib/performance.js",
|
|
98
|
+
"./run": "./lib/main.js",
|
|
99
|
+
"./settings": "./lib/settings.js",
|
|
100
|
+
"./util/ids": "./lib/util/ids.js",
|
|
101
|
+
"./ux": "./lib/ux/index.js"
|
|
102
|
+
},
|
|
86
103
|
"repository": "oclif/core",
|
|
87
104
|
"oclif": {
|
|
88
105
|
"bin": "oclif",
|
|
@@ -96,20 +113,18 @@
|
|
|
96
113
|
},
|
|
97
114
|
"scripts": {
|
|
98
115
|
"build": "shx rm -rf lib && tsc",
|
|
99
|
-
"commitlint": "commitlint",
|
|
100
116
|
"compile": "tsc",
|
|
101
117
|
"format": "prettier --write \"+(src|test)/**/*.+(ts|js|json)\"",
|
|
102
118
|
"lint": "eslint . --ext .ts",
|
|
103
119
|
"posttest": "yarn lint && yarn test:circular-deps",
|
|
104
120
|
"prepack": "yarn run build",
|
|
105
121
|
"prepare": "husky",
|
|
106
|
-
"
|
|
107
|
-
"test:circular-deps": "madge lib/ -c",
|
|
122
|
+
"test:circular-deps": "yarn build && madge lib/ -c",
|
|
108
123
|
"test:debug": "nyc mocha --debug-brk --inspect \"test/**/*.test.ts\"",
|
|
109
124
|
"test:integration": "mocha --forbid-only \"test/**/*.integration.ts\" --parallel --timeout 1200000",
|
|
110
125
|
"test:interoperability": "cross-env DEBUG=integration:* ts-node test/integration/interop.ts",
|
|
111
126
|
"test:perf": "ts-node test/perf/parser.perf.ts",
|
|
112
|
-
"test": "nyc mocha --forbid-only \"test/**/*.test.ts\""
|
|
127
|
+
"test": "nyc mocha --forbid-only \"test/**/*.test.ts\" --parallel"
|
|
113
128
|
},
|
|
114
129
|
"types": "lib/index.d.ts"
|
|
115
130
|
}
|
package/flush.d.ts
DELETED
package/flush.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require('./lib/cli-ux/flush').flush
|
package/handle.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = async error => require('./lib/errors/handle').handle(error)
|