@oclif/core 3.26.0 → 3.26.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/lib/interfaces/hooks.d.ts +33 -0
- package/package.json +8 -8
|
@@ -105,14 +105,47 @@ export type Hook<T extends keyof P, P extends Hooks = Hooks> = (this: Hook.Conte
|
|
|
105
105
|
context: Context;
|
|
106
106
|
}) => Promise<P[T]['return']>;
|
|
107
107
|
export declare namespace Hook {
|
|
108
|
+
/**
|
|
109
|
+
* Runs when the CLI is initialized before a command is executed.
|
|
110
|
+
*/
|
|
108
111
|
type Init = Hook<'init'>;
|
|
112
|
+
/**
|
|
113
|
+
* Runs before the `plugins install` command from @oclif/plugin-plugins is run.
|
|
114
|
+
*/
|
|
109
115
|
type PluginsPreinstall = Hook<'plugins:preinstall'>;
|
|
116
|
+
/**
|
|
117
|
+
* Runs after the `init` hook, after a command is found but before it is executed.
|
|
118
|
+
*/
|
|
110
119
|
type Prerun = Hook<'prerun'>;
|
|
120
|
+
/**
|
|
121
|
+
* Runs after a command is successfully executed. Does not run if the command fails.
|
|
122
|
+
*/
|
|
111
123
|
type Postrun = Hook<'postrun'>;
|
|
124
|
+
/**
|
|
125
|
+
* Runs before the CLI is updated by `update` command from @oclif/plugin-update.
|
|
126
|
+
*/
|
|
112
127
|
type Preupdate = Hook<'preupdate'>;
|
|
128
|
+
/**
|
|
129
|
+
* Runs before a command's flags and args are parsed. Useful for modifying the command line arguments before they are parsed.
|
|
130
|
+
*
|
|
131
|
+
* The return value is a string[] of the modified arguments.
|
|
132
|
+
*/
|
|
133
|
+
type Preparse = Hook<'preparse'>;
|
|
134
|
+
/**
|
|
135
|
+
* Runs once the `update` command from @oclif/plugin-update is run.
|
|
136
|
+
*/
|
|
113
137
|
type Update = Hook<'update'>;
|
|
138
|
+
/**
|
|
139
|
+
* Runs when a command is not found.
|
|
140
|
+
*/
|
|
114
141
|
type CommandNotFound = Hook<'command_not_found'>;
|
|
142
|
+
/**
|
|
143
|
+
* Runs when a partial command is entered and no matching command is found.
|
|
144
|
+
*/
|
|
115
145
|
type CommandIncomplete = Hook<'command_incomplete'>;
|
|
146
|
+
/**
|
|
147
|
+
* Runs when a command from an uninstalled JIT plugins is run.
|
|
148
|
+
*/
|
|
116
149
|
type JitPluginNotInstalled = Hook<'jit_plugin_not_installed'>;
|
|
117
150
|
interface Context {
|
|
118
151
|
config: Config;
|
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": "3.26.
|
|
4
|
+
"version": "3.26.1",
|
|
5
5
|
"author": "Salesforce",
|
|
6
6
|
"bugs": "https://github.com/oclif/core/issues",
|
|
7
7
|
"dependencies": {
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"indent-string": "^4.0.0",
|
|
22
22
|
"is-wsl": "^2.2.0",
|
|
23
23
|
"js-yaml": "^3.14.1",
|
|
24
|
-
"minimatch": "^9.0.
|
|
24
|
+
"minimatch": "^9.0.4",
|
|
25
25
|
"natural-orderby": "^2.0.3",
|
|
26
26
|
"object-treeify": "^1.1.33",
|
|
27
27
|
"password-prompt": "^1.1.3",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"@oclif/plugin-help": "^6",
|
|
40
40
|
"@oclif/plugin-plugins": "^4",
|
|
41
41
|
"@oclif/prettier-config": "^0.2.1",
|
|
42
|
-
"@oclif/test": "^3.2.
|
|
42
|
+
"@oclif/test": "^3.2.8",
|
|
43
43
|
"@types/ansi-styles": "^3.2.1",
|
|
44
44
|
"@types/benchmark": "^2.1.5",
|
|
45
45
|
"@types/chai": "^4.3.11",
|
|
@@ -65,21 +65,21 @@
|
|
|
65
65
|
"commitlint": "^17.8.1",
|
|
66
66
|
"cross-env": "^7.0.3",
|
|
67
67
|
"eslint": "^8.57.0",
|
|
68
|
-
"eslint-config-oclif": "^5.1.
|
|
69
|
-
"eslint-config-oclif-typescript": "^3.1.
|
|
68
|
+
"eslint-config-oclif": "^5.1.1",
|
|
69
|
+
"eslint-config-oclif-typescript": "^3.1.3",
|
|
70
70
|
"eslint-config-prettier": "^9.1.0",
|
|
71
|
-
"fancy-test": "^3.0.
|
|
71
|
+
"fancy-test": "^3.0.14",
|
|
72
72
|
"globby": "^11.1.0",
|
|
73
73
|
"husky": "^8",
|
|
74
74
|
"lint-staged": "^14.0.1",
|
|
75
75
|
"madge": "^6.1.0",
|
|
76
|
-
"mocha": "^10.
|
|
76
|
+
"mocha": "^10.4.0",
|
|
77
77
|
"nyc": "^15.1.0",
|
|
78
78
|
"prettier": "^3.2.5",
|
|
79
79
|
"shx": "^0.3.4",
|
|
80
80
|
"sinon": "^16.1.3",
|
|
81
81
|
"ts-node": "^10.9.2",
|
|
82
|
-
"tsd": "^0.
|
|
82
|
+
"tsd": "^0.31.0",
|
|
83
83
|
"typescript": "^5"
|
|
84
84
|
},
|
|
85
85
|
"engines": {
|