@gunshi/definition 0.29.3 → 0.29.4
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/index.js +3 -7
- package/package.json +4 -4
package/lib/index.js
CHANGED
|
@@ -21,7 +21,6 @@ const CLI_OPTIONS_DEFAULT = {
|
|
|
21
21
|
plugins: void 0,
|
|
22
22
|
fallbackToEntry: false
|
|
23
23
|
};
|
|
24
|
-
|
|
25
24
|
//#endregion
|
|
26
25
|
//#region ../gunshi/src/utils.ts
|
|
27
26
|
/**
|
|
@@ -66,7 +65,6 @@ function deepFreeze(obj, ignores = []) {
|
|
|
66
65
|
}
|
|
67
66
|
return Object.freeze(obj);
|
|
68
67
|
}
|
|
69
|
-
|
|
70
68
|
//#endregion
|
|
71
69
|
//#region ../gunshi/src/context.ts
|
|
72
70
|
/**
|
|
@@ -151,11 +149,10 @@ async function createCommandContext({ args = {}, explicit = {}, values = {}, pos
|
|
|
151
149
|
return deepFreeze(core, ["extensions"]);
|
|
152
150
|
}
|
|
153
151
|
function getCommandName(cmd) {
|
|
154
|
-
if (isLazyCommand(cmd)) return cmd.commandName || cmd.name ||
|
|
155
|
-
else if (typeof cmd === "object") return cmd.name ||
|
|
152
|
+
if (isLazyCommand(cmd)) return cmd.commandName || cmd.name || "(anonymous)";
|
|
153
|
+
else if (typeof cmd === "object") return cmd.name || "(anonymous)";
|
|
156
154
|
else return ANONYMOUS_COMMAND_NAME;
|
|
157
155
|
}
|
|
158
|
-
|
|
159
156
|
//#endregion
|
|
160
157
|
//#region ../gunshi/src/definition.ts
|
|
161
158
|
/**
|
|
@@ -264,6 +261,5 @@ function lazyWithTypes() {
|
|
|
264
261
|
return lazy(loader, definition);
|
|
265
262
|
};
|
|
266
263
|
}
|
|
267
|
-
|
|
268
264
|
//#endregion
|
|
269
|
-
export { createCommandContext, define, defineWithTypes, lazy, lazyWithTypes };
|
|
265
|
+
export { createCommandContext, define, defineWithTypes, lazy, lazyWithTypes };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gunshi/definition",
|
|
3
3
|
"description": "utilities for gunshi command definition",
|
|
4
|
-
"version": "0.29.
|
|
4
|
+
"version": "0.29.4",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "kazuya kawaguchi",
|
|
7
7
|
"email": "kawakazu80@gmail.com"
|
|
@@ -52,12 +52,12 @@
|
|
|
52
52
|
}
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
|
-
"deno": "^2.7.
|
|
56
|
-
"jsr": "^0.
|
|
55
|
+
"deno": "^2.7.11",
|
|
56
|
+
"jsr": "^0.14.3",
|
|
57
57
|
"jsr-exports-lint": "^0.4.2",
|
|
58
58
|
"publint": "^0.3.18",
|
|
59
59
|
"tsdown": "0.15.12",
|
|
60
|
-
"gunshi": "0.29.
|
|
60
|
+
"gunshi": "0.29.4"
|
|
61
61
|
},
|
|
62
62
|
"scripts": {
|
|
63
63
|
"build": "tsdown",
|