@wooksjs/event-cli 0.7.0 → 0.7.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/dist/index.cjs +2 -3
- package/dist/index.mjs +3 -4
- package/package.json +5 -5
package/dist/index.cjs
CHANGED
|
@@ -40,14 +40,13 @@ const flagsKey = (0, __wooksjs_event_core.key)("cli.flags");
|
|
|
40
40
|
//#region packages/event-cli/src/event-cli.ts
|
|
41
41
|
/** Creates a new event context for a CLI command invocation. */
|
|
42
42
|
function createCliContext(data, options) {
|
|
43
|
-
|
|
44
|
-
return (fn) => (0, __wooksjs_event_core.run)(ctx, () => ctx.seed(cliKind, {
|
|
43
|
+
return (fn) => (0, __wooksjs_event_core.createEventContext)(options, cliKind, {
|
|
45
44
|
argv: data.argv,
|
|
46
45
|
pathParams: data.pathParams,
|
|
47
46
|
command: data.command,
|
|
48
47
|
opts: data.opts,
|
|
49
48
|
cliHelp: data.cliHelp
|
|
50
|
-
}, fn)
|
|
49
|
+
}, fn);
|
|
51
50
|
}
|
|
52
51
|
|
|
53
52
|
//#endregion
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CliHelpRenderer } from "@prostojs/cli-help";
|
|
2
|
-
import {
|
|
2
|
+
import { createEventContext, current, defineEventKind, key, slot, useLogger, useRouteParams } from "@wooksjs/event-core";
|
|
3
3
|
import minimist from "minimist";
|
|
4
4
|
import { WooksAdapterBase } from "wooks";
|
|
5
5
|
|
|
@@ -17,14 +17,13 @@ const flagsKey = key("cli.flags");
|
|
|
17
17
|
//#region packages/event-cli/src/event-cli.ts
|
|
18
18
|
/** Creates a new event context for a CLI command invocation. */
|
|
19
19
|
function createCliContext(data, options) {
|
|
20
|
-
|
|
21
|
-
return (fn) => run(ctx, () => ctx.seed(cliKind, {
|
|
20
|
+
return (fn) => createEventContext(options, cliKind, {
|
|
22
21
|
argv: data.argv,
|
|
23
22
|
pathParams: data.pathParams,
|
|
24
23
|
command: data.command,
|
|
25
24
|
opts: data.opts,
|
|
26
25
|
cliHelp: data.cliHelp
|
|
27
|
-
}, fn)
|
|
26
|
+
}, fn);
|
|
28
27
|
}
|
|
29
28
|
|
|
30
29
|
//#endregion
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wooksjs/event-cli",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.2",
|
|
4
4
|
"description": "@wooksjs/event-cli",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"api",
|
|
@@ -52,14 +52,14 @@
|
|
|
52
52
|
"@types/minimist": "^1.2.5",
|
|
53
53
|
"typescript": "^5.9.3",
|
|
54
54
|
"vitest": "^3.2.4",
|
|
55
|
-
"@wooksjs/event-core": "^0.7.
|
|
56
|
-
"wooks": "^0.7.
|
|
55
|
+
"@wooksjs/event-core": "^0.7.2",
|
|
56
|
+
"wooks": "^0.7.2"
|
|
57
57
|
},
|
|
58
58
|
"peerDependencies": {
|
|
59
59
|
"@prostojs/logger": "^0.4.3",
|
|
60
60
|
"@prostojs/router": "^0.3.2",
|
|
61
|
-
"@wooksjs/event-core": "^0.7.
|
|
62
|
-
"wooks": "^0.7.
|
|
61
|
+
"@wooksjs/event-core": "^0.7.2",
|
|
62
|
+
"wooks": "^0.7.2"
|
|
63
63
|
},
|
|
64
64
|
"scripts": {
|
|
65
65
|
"build": "rolldown -c ../../rolldown.config.mjs",
|