wp-typia 0.24.4 → 0.24.5
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/README.md +7 -5
- package/bin/wp-typia.js +24 -103
- package/{dist-bunli/node-cli.js → dist/cli.js} +5013 -3687
- package/package.json +9 -36
- package/bin/routing-metadata.generated.d.ts +0 -8
- package/bin/routing-metadata.generated.js +0 -93
- package/bin/runtime-routing.d.ts +0 -34
- package/bin/runtime-routing.js +0 -124
- package/dist-bunli/.bunli/commands.gen.js +0 -304441
- package/dist-bunli/.bunli/highlights-eq9cgrbb.scm +0 -604
- package/dist-bunli/.bunli/highlights-ghv9g403.scm +0 -205
- package/dist-bunli/.bunli/highlights-hk7bwhj4.scm +0 -284
- package/dist-bunli/.bunli/highlights-r812a2qc.scm +0 -150
- package/dist-bunli/.bunli/highlights-x6tmsnaa.scm +0 -115
- package/dist-bunli/.bunli/injections-73j83es3.scm +0 -27
- package/dist-bunli/.bunli/tree-sitter-javascript-nd0q4pe9.wasm +0 -0
- package/dist-bunli/.bunli/tree-sitter-markdown-411r6y9b.wasm +0 -0
- package/dist-bunli/.bunli/tree-sitter-markdown_inline-j5349f42.wasm +0 -0
- package/dist-bunli/.bunli/tree-sitter-typescript-zxjzwt75.wasm +0 -0
- package/dist-bunli/.bunli/tree-sitter-zig-e78zbjpm.wasm +0 -0
- package/dist-bunli/agents-91fpdyyt.js +0 -12
- package/dist-bunli/chunk-bdqvmfwv-f5qmzmxg.js +0 -16825
- package/dist-bunli/cli-03j0axbt.js +0 -163
- package/dist-bunli/cli-1170yyve.js +0 -106
- package/dist-bunli/cli-368d4cgy.js +0 -1235
- package/dist-bunli/cli-377p86mf.js +0 -191
- package/dist-bunli/cli-6v0pcxw6.js +0 -314
- package/dist-bunli/cli-84c7wff4.js +0 -198
- package/dist-bunli/cli-8hxf9qw6.js +0 -198
- package/dist-bunli/cli-9fx0qgb7.js +0 -3680
- package/dist-bunli/cli-ac2ebaf8.js +0 -3
- package/dist-bunli/cli-add-qjd3ba8j.js +0 -10671
- package/dist-bunli/cli-am5x7tb4.js +0 -192
- package/dist-bunli/cli-bajwv85z.js +0 -24
- package/dist-bunli/cli-ccax7s0s.js +0 -34
- package/dist-bunli/cli-cvxvcw7c.js +0 -46
- package/dist-bunli/cli-diagnostics-10drxh34.js +0 -34
- package/dist-bunli/cli-doctor-6fyxq940.js +0 -1446
- package/dist-bunli/cli-e4bwd81c.js +0 -1260
- package/dist-bunli/cli-fv4h3ydt.js +0 -173823
- package/dist-bunli/cli-hv2yedw2.js +0 -74591
- package/dist-bunli/cli-init-7avk42dh.js +0 -880
- package/dist-bunli/cli-kfm9mm68.js +0 -14679
- package/dist-bunli/cli-prompt-ncyg68rn.js +0 -12
- package/dist-bunli/cli-rdcga1bd.js +0 -135
- package/dist-bunli/cli-scaffold-0bb6pr3w.js +0 -538
- package/dist-bunli/cli-t73q5aqz.js +0 -103
- package/dist-bunli/cli-templates-g8t4fm11.js +0 -167
- package/dist-bunli/cli-tj7ajdvf.js +0 -2612
- package/dist-bunli/cli-tq730sqt.js +0 -344
- package/dist-bunli/cli-xnn9xjcy.js +0 -68
- package/dist-bunli/cli-z48frc8t.js +0 -229
- package/dist-bunli/cli.js +0 -2523
- package/dist-bunli/command-list-y3g7e9rb.js +0 -4013
- package/dist-bunli/create-template-validation-4fr851vg.js +0 -16
- package/dist-bunli/migrations-3vngdy51.js +0 -47
- package/dist-bunli/sync-k2k8svyc.js +0 -13
- package/dist-bunli/workspace-project-gmv2a71z.js +0 -22
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wp-typia",
|
|
3
|
-
"version": "0.24.
|
|
3
|
+
"version": "0.24.5",
|
|
4
4
|
"description": "Canonical CLI package for wp-typia scaffolding and project workflows",
|
|
5
5
|
"packageManager": "bun@1.3.11",
|
|
6
6
|
"type": "module",
|
|
@@ -9,26 +9,20 @@
|
|
|
9
9
|
},
|
|
10
10
|
"files": [
|
|
11
11
|
"bin/",
|
|
12
|
-
"dist
|
|
12
|
+
"dist/",
|
|
13
13
|
"README.md",
|
|
14
14
|
"package.json"
|
|
15
15
|
],
|
|
16
16
|
"scripts": {
|
|
17
|
-
"generate
|
|
18
|
-
"
|
|
19
|
-
"generate": "node scripts/generate-routing-metadata.mjs && bun scripts/generate-bunli-metadata.ts",
|
|
20
|
-
"build": "bun run generate && bun scripts/build-bunli-runtime.ts",
|
|
17
|
+
"generate": "bun scripts/build-runtime.ts",
|
|
18
|
+
"build": "bun run generate",
|
|
21
19
|
"build:standalone": "bun scripts/build-standalone-runtime.ts --targets native --outdir ./dist-standalone",
|
|
22
20
|
"build:standalone:release": "bun scripts/build-standalone-runtime.ts --targets darwin-arm64,darwin-x64,linux-arm64,linux-x64,windows-x64 --outdir ./.cache/standalone/raw",
|
|
23
|
-
"bunli:generate": "bun run generate",
|
|
24
|
-
"bunli:build": "bun run build",
|
|
25
|
-
"bunli:dev": "bun src/cli.ts",
|
|
26
|
-
"bunli:test": "bun test tests/*.test.ts",
|
|
27
21
|
"dev": "bun run build && node bin/wp-typia.js",
|
|
28
22
|
"standalone:prepare-release-assets": "bun scripts/prepare-standalone-release-assets.ts --input-dir ./.cache/standalone/raw --outdir ./.cache/standalone/release-assets",
|
|
29
23
|
"test": "cd ../wp-typia-project-tools && bun run build && cd ../wp-typia && bun run build && bun test tests/*.test.ts",
|
|
30
24
|
"test:coverage": "cd ../wp-typia-project-tools && bun run build && cd ../wp-typia && bun run build && bun test tests/*.test.ts --coverage --coverage-reporter=lcov --coverage-dir=coverage",
|
|
31
|
-
"clean": "rm -rf .
|
|
25
|
+
"clean": "rm -rf .cache/standalone .pack-backup dist dist-standalone",
|
|
32
26
|
"prepack": "bun run build && node ./scripts/publish-runtime-maps.mjs prepare",
|
|
33
27
|
"postpack": "node ./scripts/publish-runtime-maps.mjs restore"
|
|
34
28
|
},
|
|
@@ -60,34 +54,13 @@
|
|
|
60
54
|
"npm": ">=10.0.0"
|
|
61
55
|
},
|
|
62
56
|
"dependencies": {
|
|
63
|
-
"@
|
|
64
|
-
"@
|
|
65
|
-
"@
|
|
66
|
-
"
|
|
67
|
-
"@bunli/plugin-mcp": "0.2.5",
|
|
68
|
-
"@bunli/plugin-skills": "0.1.0",
|
|
69
|
-
"@bunli/runtime": "0.3.1",
|
|
70
|
-
"@bunli/tui": "0.6.0",
|
|
71
|
-
"@bunli/utils": "0.6.0",
|
|
72
|
-
"@wp-typia/api-client": "^0.4.5",
|
|
73
|
-
"@wp-typia/project-tools": "0.24.4",
|
|
74
|
-
"better-result": "^2.7.0",
|
|
75
|
-
"react": "^19.2.5",
|
|
76
|
-
"react-dom": "^19.2.5",
|
|
57
|
+
"@gunshi/plugin-completion": "0.32.0",
|
|
58
|
+
"@wp-typia/api-client": "^0.4.6",
|
|
59
|
+
"@wp-typia/project-tools": "0.24.5",
|
|
60
|
+
"gunshi": "0.32.0",
|
|
77
61
|
"zod": "4.3.6"
|
|
78
62
|
},
|
|
79
63
|
"devDependencies": {
|
|
80
|
-
"@bunli/generator": "0.6.5",
|
|
81
|
-
"@bunli/test": "0.6.0",
|
|
82
|
-
"bunli": "0.9.0",
|
|
83
64
|
"typescript": "^5.9.2"
|
|
84
|
-
},
|
|
85
|
-
"optionalDependencies": {
|
|
86
|
-
"@opentui/core-darwin-arm64": "0.1.97",
|
|
87
|
-
"@opentui/core-darwin-x64": "0.1.97",
|
|
88
|
-
"@opentui/core-linux-arm64": "0.1.97",
|
|
89
|
-
"@opentui/core-linux-x64": "0.1.97",
|
|
90
|
-
"@opentui/core-win32-arm64": "0.1.97",
|
|
91
|
-
"@opentui/core-win32-x64": "0.1.97"
|
|
92
65
|
}
|
|
93
66
|
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
// This file was automatically generated by `node scripts/generate-routing-metadata.mjs`.
|
|
2
|
-
// Do not edit directly.
|
|
3
|
-
|
|
4
|
-
export declare const fullRuntimeCommands: readonly string[];
|
|
5
|
-
export declare const interactiveRuntimeCommands: readonly string[];
|
|
6
|
-
export declare const longValueOptions: readonly string[];
|
|
7
|
-
export declare const reservedCommands: readonly string[];
|
|
8
|
-
export declare const shortValueOptions: readonly string[];
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
// This file was automatically generated by `node scripts/generate-routing-metadata.mjs`.
|
|
2
|
-
// Do not edit directly.
|
|
3
|
-
|
|
4
|
-
export const fullRuntimeCommands = Object.freeze([
|
|
5
|
-
'mcp',
|
|
6
|
-
'skills',
|
|
7
|
-
'completions',
|
|
8
|
-
'complete',
|
|
9
|
-
]);
|
|
10
|
-
export const interactiveRuntimeCommands = Object.freeze([
|
|
11
|
-
'create',
|
|
12
|
-
'add',
|
|
13
|
-
'migrate',
|
|
14
|
-
]);
|
|
15
|
-
export const longValueOptions = Object.freeze([
|
|
16
|
-
'--alternate-render-targets',
|
|
17
|
-
'--anchor',
|
|
18
|
-
'--attribute',
|
|
19
|
-
'--auth',
|
|
20
|
-
'--block',
|
|
21
|
-
'--body-type',
|
|
22
|
-
'--catalog-title',
|
|
23
|
-
'--config',
|
|
24
|
-
'--controller-class',
|
|
25
|
-
'--controller-extends',
|
|
26
|
-
'--current-migration-version',
|
|
27
|
-
'--data-storage',
|
|
28
|
-
'--external-layer-id',
|
|
29
|
-
'--external-layer-source',
|
|
30
|
-
'--format',
|
|
31
|
-
'--from',
|
|
32
|
-
'--from-migration-version',
|
|
33
|
-
'--from-post-meta',
|
|
34
|
-
'--id',
|
|
35
|
-
'--inner-blocks-preset',
|
|
36
|
-
'--iterations',
|
|
37
|
-
'--meta-key',
|
|
38
|
-
'--meta-path',
|
|
39
|
-
'--method',
|
|
40
|
-
'--methods',
|
|
41
|
-
'--migration-version',
|
|
42
|
-
'--namespace',
|
|
43
|
-
'--output-dir',
|
|
44
|
-
'--package-manager',
|
|
45
|
-
'--path',
|
|
46
|
-
'--permission-callback',
|
|
47
|
-
'--persistence-policy',
|
|
48
|
-
'--php-prefix',
|
|
49
|
-
'--position',
|
|
50
|
-
'--post-meta',
|
|
51
|
-
'--post-type',
|
|
52
|
-
'--profile',
|
|
53
|
-
'--query-post-type',
|
|
54
|
-
'--query-type',
|
|
55
|
-
'--response-type',
|
|
56
|
-
'--route-pattern',
|
|
57
|
-
'--scope',
|
|
58
|
-
'--secret-field',
|
|
59
|
-
'--secret-has-value-field',
|
|
60
|
-
'--secret-masked-response-field',
|
|
61
|
-
'--secret-preserve-on-empty',
|
|
62
|
-
'--secret-state-field',
|
|
63
|
-
'--section-role',
|
|
64
|
-
'--seed',
|
|
65
|
-
'--service',
|
|
66
|
-
'--slot',
|
|
67
|
-
'--source',
|
|
68
|
-
'--tag',
|
|
69
|
-
'--tags',
|
|
70
|
-
'--template',
|
|
71
|
-
'--text-domain',
|
|
72
|
-
'--thumbnail-url',
|
|
73
|
-
'--to',
|
|
74
|
-
'--to-migration-version',
|
|
75
|
-
'--type',
|
|
76
|
-
'--variant',
|
|
77
|
-
]);
|
|
78
|
-
export const reservedCommands = Object.freeze([
|
|
79
|
-
'create',
|
|
80
|
-
'init',
|
|
81
|
-
'sync',
|
|
82
|
-
'add',
|
|
83
|
-
'migrate',
|
|
84
|
-
'templates',
|
|
85
|
-
'doctor',
|
|
86
|
-
'mcp',
|
|
87
|
-
'help',
|
|
88
|
-
'version',
|
|
89
|
-
'skills',
|
|
90
|
-
'completions',
|
|
91
|
-
'complete',
|
|
92
|
-
]);
|
|
93
|
-
export const shortValueOptions = Object.freeze(['-c', '-p', '-t']);
|
package/bin/runtime-routing.d.ts
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
type RuntimeRoutingValues = readonly string[] | ReadonlySet<string>;
|
|
2
|
-
|
|
3
|
-
type RuntimeRoutingMetadata = {
|
|
4
|
-
longValueOptions: RuntimeRoutingValues;
|
|
5
|
-
reservedCommands: RuntimeRoutingValues;
|
|
6
|
-
shortValueOptions: RuntimeRoutingValues;
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
type RuntimeRoutingStream = {
|
|
10
|
-
isTTY?: boolean;
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
export declare function getRuntimeRoutingInvocation(
|
|
14
|
-
argv: readonly string[],
|
|
15
|
-
metadata: RuntimeRoutingMetadata,
|
|
16
|
-
): {
|
|
17
|
-
command: string | undefined;
|
|
18
|
-
isSinglePositionalAlias: boolean;
|
|
19
|
-
positionals: string[];
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
export declare function shouldRouteToFullRuntime(options: {
|
|
23
|
-
argv: readonly string[];
|
|
24
|
-
fullRuntimeCommands: RuntimeRoutingValues;
|
|
25
|
-
hasBuiltRuntime: boolean;
|
|
26
|
-
hasWorkingBun: boolean;
|
|
27
|
-
interactiveRuntimeCommands: RuntimeRoutingValues;
|
|
28
|
-
longValueOptions: RuntimeRoutingValues;
|
|
29
|
-
reservedCommands: RuntimeRoutingValues;
|
|
30
|
-
shortValueOptions: RuntimeRoutingValues;
|
|
31
|
-
stdin?: RuntimeRoutingStream;
|
|
32
|
-
stdout?: RuntimeRoutingStream;
|
|
33
|
-
term?: string;
|
|
34
|
-
}): boolean;
|
package/bin/runtime-routing.js
DELETED
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
import { collectPositionalIndexes } from './argv-walker.js';
|
|
2
|
-
|
|
3
|
-
function normalizeSet(values) {
|
|
4
|
-
return values instanceof Set ? values : new Set(values);
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
function hasBooleanFlagBeforeTerminator(argv, longFlag, shortFlag) {
|
|
8
|
-
let matched = false;
|
|
9
|
-
for (const arg of argv) {
|
|
10
|
-
if (arg === '--') {
|
|
11
|
-
break;
|
|
12
|
-
}
|
|
13
|
-
if (arg === longFlag || (shortFlag && arg === shortFlag)) {
|
|
14
|
-
matched = true;
|
|
15
|
-
continue;
|
|
16
|
-
}
|
|
17
|
-
if (arg.startsWith(`${longFlag}=`)) {
|
|
18
|
-
const value = arg.slice(longFlag.length + 1).toLowerCase();
|
|
19
|
-
matched = value !== 'false' && value !== '0' && value !== 'no';
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
return matched;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
function hasLongOptionBeforeTerminator(argv, optionName) {
|
|
27
|
-
for (let index = 0; index < argv.length; index += 1) {
|
|
28
|
-
const arg = argv[index];
|
|
29
|
-
if (arg === '--') {
|
|
30
|
-
return false;
|
|
31
|
-
}
|
|
32
|
-
if (arg === optionName || arg.startsWith(`${optionName}=`)) {
|
|
33
|
-
return true;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
return false;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
function isInteractiveTerminal({ stdin, stdout, term }) {
|
|
41
|
-
return Boolean(stdin?.isTTY) && Boolean(stdout?.isTTY) && term !== 'dumb';
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
export function getRuntimeRoutingInvocation(argv, metadata) {
|
|
45
|
-
const positionalIndexes = collectPositionalIndexes(argv, metadata);
|
|
46
|
-
const positionals = positionalIndexes
|
|
47
|
-
.map((index) => argv[index])
|
|
48
|
-
.filter((value) => typeof value === 'string' && value.length > 0);
|
|
49
|
-
const command = positionals[0];
|
|
50
|
-
const reservedCommandSet = normalizeSet(metadata.reservedCommands);
|
|
51
|
-
const isSinglePositionalAlias =
|
|
52
|
-
Boolean(command) &&
|
|
53
|
-
positionals.length === 1 &&
|
|
54
|
-
!reservedCommandSet.has(command);
|
|
55
|
-
|
|
56
|
-
return {
|
|
57
|
-
command,
|
|
58
|
-
isSinglePositionalAlias,
|
|
59
|
-
positionals,
|
|
60
|
-
};
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
export function shouldRouteToFullRuntime({
|
|
64
|
-
argv,
|
|
65
|
-
fullRuntimeCommands,
|
|
66
|
-
hasBuiltRuntime,
|
|
67
|
-
hasWorkingBun,
|
|
68
|
-
interactiveRuntimeCommands,
|
|
69
|
-
longValueOptions,
|
|
70
|
-
reservedCommands,
|
|
71
|
-
shortValueOptions,
|
|
72
|
-
stdin = process.stdin,
|
|
73
|
-
stdout = process.stdout,
|
|
74
|
-
term = process.env.TERM,
|
|
75
|
-
}) {
|
|
76
|
-
if (!hasWorkingBun || !hasBuiltRuntime) {
|
|
77
|
-
return false;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
const fullRuntimeCommandSet = normalizeSet(fullRuntimeCommands);
|
|
81
|
-
const interactiveRuntimeCommandSet = normalizeSet(interactiveRuntimeCommands);
|
|
82
|
-
const invocation = getRuntimeRoutingInvocation(argv, {
|
|
83
|
-
longValueOptions,
|
|
84
|
-
reservedCommands,
|
|
85
|
-
shortValueOptions,
|
|
86
|
-
});
|
|
87
|
-
|
|
88
|
-
if (invocation.command && fullRuntimeCommandSet.has(invocation.command)) {
|
|
89
|
-
return true;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
if (
|
|
93
|
-
!isInteractiveTerminal({
|
|
94
|
-
stdin,
|
|
95
|
-
stdout,
|
|
96
|
-
term,
|
|
97
|
-
})
|
|
98
|
-
) {
|
|
99
|
-
return false;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
if (
|
|
103
|
-
invocation.command === 'help' ||
|
|
104
|
-
invocation.command === 'version' ||
|
|
105
|
-
hasBooleanFlagBeforeTerminator(argv, '--help', '-h') ||
|
|
106
|
-
hasBooleanFlagBeforeTerminator(argv, '--version', '-v') ||
|
|
107
|
-
hasLongOptionBeforeTerminator(argv, '--format') ||
|
|
108
|
-
hasBooleanFlagBeforeTerminator(argv, '--yes', '-y')
|
|
109
|
-
) {
|
|
110
|
-
return false;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
if (
|
|
114
|
-
invocation.command &&
|
|
115
|
-
interactiveRuntimeCommandSet.has(invocation.command)
|
|
116
|
-
) {
|
|
117
|
-
return true;
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
return (
|
|
121
|
-
invocation.isSinglePositionalAlias &&
|
|
122
|
-
interactiveRuntimeCommandSet.has('create')
|
|
123
|
-
);
|
|
124
|
-
}
|