wp-typia 0.24.4 → 0.24.6
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 +8 -6
- package/bin/wp-typia.js +24 -103
- package/{dist-bunli/node-cli.js → dist/cli.js} +5086 -3693
- 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
|
@@ -1,1235 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import {
|
|
3
|
-
exports_external
|
|
4
|
-
} from "./cli-hv2yedw2.js";
|
|
5
|
-
import {
|
|
6
|
-
ADD_KIND_IDS
|
|
7
|
-
} from "./cli-bajwv85z.js";
|
|
8
|
-
import {
|
|
9
|
-
CLI_DIAGNOSTIC_CODES,
|
|
10
|
-
createCliCommandError,
|
|
11
|
-
createCliDiagnosticCodeError,
|
|
12
|
-
serializeCliDiagnosticError
|
|
13
|
-
} from "./cli-tq730sqt.js";
|
|
14
|
-
// package.json
|
|
15
|
-
var package_default = {
|
|
16
|
-
name: "wp-typia",
|
|
17
|
-
version: "0.24.4",
|
|
18
|
-
description: "Canonical CLI package for wp-typia scaffolding and project workflows",
|
|
19
|
-
packageManager: "bun@1.3.11",
|
|
20
|
-
type: "module",
|
|
21
|
-
bin: {
|
|
22
|
-
"wp-typia": "bin/wp-typia.js"
|
|
23
|
-
},
|
|
24
|
-
files: [
|
|
25
|
-
"bin/",
|
|
26
|
-
"dist-bunli/",
|
|
27
|
-
"README.md",
|
|
28
|
-
"package.json"
|
|
29
|
-
],
|
|
30
|
-
scripts: {
|
|
31
|
-
"generate:routing": "node scripts/generate-routing-metadata.mjs",
|
|
32
|
-
"validate:routing": "node scripts/generate-routing-metadata.mjs --check",
|
|
33
|
-
generate: "node scripts/generate-routing-metadata.mjs && bun scripts/generate-bunli-metadata.ts",
|
|
34
|
-
build: "bun run generate && bun scripts/build-bunli-runtime.ts",
|
|
35
|
-
"build:standalone": "bun scripts/build-standalone-runtime.ts --targets native --outdir ./dist-standalone",
|
|
36
|
-
"build:standalone:release": "bun scripts/build-standalone-runtime.ts --targets darwin-arm64,darwin-x64,linux-arm64,linux-x64,windows-x64 --outdir ./.cache/standalone/raw",
|
|
37
|
-
"bunli:generate": "bun run generate",
|
|
38
|
-
"bunli:build": "bun run build",
|
|
39
|
-
"bunli:dev": "bun src/cli.ts",
|
|
40
|
-
"bunli:test": "bun test tests/*.test.ts",
|
|
41
|
-
dev: "bun run build && node bin/wp-typia.js",
|
|
42
|
-
"standalone:prepare-release-assets": "bun scripts/prepare-standalone-release-assets.ts --input-dir ./.cache/standalone/raw --outdir ./.cache/standalone/release-assets",
|
|
43
|
-
test: "cd ../wp-typia-project-tools && bun run build && cd ../wp-typia && bun run build && bun test tests/*.test.ts",
|
|
44
|
-
"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",
|
|
45
|
-
clean: "rm -rf .bunli .cache/standalone .pack-backup dist-bunli dist-standalone",
|
|
46
|
-
prepack: "bun run build && node ./scripts/publish-runtime-maps.mjs prepare",
|
|
47
|
-
postpack: "node ./scripts/publish-runtime-maps.mjs restore"
|
|
48
|
-
},
|
|
49
|
-
keywords: [
|
|
50
|
-
"wordpress",
|
|
51
|
-
"gutenberg",
|
|
52
|
-
"typia",
|
|
53
|
-
"cli",
|
|
54
|
-
"scaffold",
|
|
55
|
-
"templates"
|
|
56
|
-
],
|
|
57
|
-
author: "imjlk",
|
|
58
|
-
license: "GPL-2.0-or-later",
|
|
59
|
-
repository: {
|
|
60
|
-
type: "git",
|
|
61
|
-
url: "git+https://github.com/imjlk/wp-typia.git",
|
|
62
|
-
directory: "packages/wp-typia"
|
|
63
|
-
},
|
|
64
|
-
bugs: {
|
|
65
|
-
url: "https://github.com/imjlk/wp-typia/issues"
|
|
66
|
-
},
|
|
67
|
-
homepage: "https://github.com/imjlk/wp-typia/tree/main/packages/wp-typia#readme",
|
|
68
|
-
publishConfig: {
|
|
69
|
-
access: "public"
|
|
70
|
-
},
|
|
71
|
-
engines: {
|
|
72
|
-
bun: ">=1.3.11",
|
|
73
|
-
node: ">=20.0.0",
|
|
74
|
-
npm: ">=10.0.0"
|
|
75
|
-
},
|
|
76
|
-
dependencies: {
|
|
77
|
-
"@bunli/core": "0.9.0",
|
|
78
|
-
"@bunli/plugin-ai-detect": "0.6.4",
|
|
79
|
-
"@bunli/plugin-completions": "0.3.5",
|
|
80
|
-
"@bunli/plugin-config": "0.4.4",
|
|
81
|
-
"@bunli/plugin-mcp": "0.2.5",
|
|
82
|
-
"@bunli/plugin-skills": "0.1.0",
|
|
83
|
-
"@bunli/runtime": "0.3.1",
|
|
84
|
-
"@bunli/tui": "0.6.0",
|
|
85
|
-
"@bunli/utils": "0.6.0",
|
|
86
|
-
"@wp-typia/api-client": "^0.4.5",
|
|
87
|
-
"@wp-typia/project-tools": "0.24.4",
|
|
88
|
-
"better-result": "^2.7.0",
|
|
89
|
-
react: "^19.2.5",
|
|
90
|
-
"react-dom": "^19.2.5",
|
|
91
|
-
zod: "4.3.6"
|
|
92
|
-
},
|
|
93
|
-
devDependencies: {
|
|
94
|
-
"@bunli/generator": "0.6.5",
|
|
95
|
-
"@bunli/test": "0.6.0",
|
|
96
|
-
bunli: "0.9.0",
|
|
97
|
-
typescript: "^5.9.2"
|
|
98
|
-
},
|
|
99
|
-
optionalDependencies: {
|
|
100
|
-
"@opentui/core-darwin-arm64": "0.1.97",
|
|
101
|
-
"@opentui/core-darwin-x64": "0.1.97",
|
|
102
|
-
"@opentui/core-linux-arm64": "0.1.97",
|
|
103
|
-
"@opentui/core-linux-x64": "0.1.97",
|
|
104
|
-
"@opentui/core-win32-arm64": "0.1.97",
|
|
105
|
-
"@opentui/core-win32-x64": "0.1.97"
|
|
106
|
-
}
|
|
107
|
-
};
|
|
108
|
-
|
|
109
|
-
// bin/argv-walker.js
|
|
110
|
-
function normalizeOptionSet(values) {
|
|
111
|
-
return values instanceof Set ? values : new Set(values);
|
|
112
|
-
}
|
|
113
|
-
function collectPositionalIndexes(argv, metadata) {
|
|
114
|
-
const longValueOptionSet = normalizeOptionSet(metadata.longValueOptions);
|
|
115
|
-
const shortValueOptionSet = normalizeOptionSet(metadata.shortValueOptions);
|
|
116
|
-
const positionalIndexes = [];
|
|
117
|
-
for (let index = 0;index < argv.length; index += 1) {
|
|
118
|
-
const arg = argv[index];
|
|
119
|
-
if (arg === "--") {
|
|
120
|
-
for (let restIndex = index + 1;restIndex < argv.length; restIndex += 1) {
|
|
121
|
-
positionalIndexes.push(restIndex);
|
|
122
|
-
}
|
|
123
|
-
break;
|
|
124
|
-
}
|
|
125
|
-
if (!arg.startsWith("-") || arg === "-") {
|
|
126
|
-
positionalIndexes.push(index);
|
|
127
|
-
continue;
|
|
128
|
-
}
|
|
129
|
-
if (arg.startsWith("--")) {
|
|
130
|
-
if (arg.includes("=")) {
|
|
131
|
-
continue;
|
|
132
|
-
}
|
|
133
|
-
const next = argv[index + 1];
|
|
134
|
-
if (longValueOptionSet.has(arg) && next && !next.startsWith("-")) {
|
|
135
|
-
index += 1;
|
|
136
|
-
}
|
|
137
|
-
continue;
|
|
138
|
-
}
|
|
139
|
-
if (arg.length === 2 && shortValueOptionSet.has(arg) && argv[index + 1] && !argv[index + 1].startsWith("-")) {
|
|
140
|
-
index += 1;
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
return positionalIndexes;
|
|
144
|
-
}
|
|
145
|
-
function findFirstPositionalIndex(argv, metadata) {
|
|
146
|
-
const positionalIndexes = collectPositionalIndexes(argv, metadata);
|
|
147
|
-
return positionalIndexes[0] ?? -1;
|
|
148
|
-
}
|
|
149
|
-
function findFirstPositional(argv, metadata) {
|
|
150
|
-
const firstPositionalIndex = findFirstPositionalIndex(argv, metadata);
|
|
151
|
-
return firstPositionalIndex === -1 ? undefined : argv[firstPositionalIndex];
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
// src/command-options/add.ts
|
|
155
|
-
var ADD_OPTION_METADATA = {
|
|
156
|
-
"alternate-render-targets": {
|
|
157
|
-
description: "Comma-separated alternate render targets for dynamic block scaffolds (email,mjml,plain-text).",
|
|
158
|
-
type: "string"
|
|
159
|
-
},
|
|
160
|
-
anchor: {
|
|
161
|
-
description: "Anchor block name for hooked-block workflows.",
|
|
162
|
-
type: "string"
|
|
163
|
-
},
|
|
164
|
-
attribute: {
|
|
165
|
-
description: "Target block attribute for end-to-end binding-source workflows.",
|
|
166
|
-
type: "string"
|
|
167
|
-
},
|
|
168
|
-
auth: {
|
|
169
|
-
description: "Auth intent for manual REST contract workflows (public, authenticated, or public-write-protected).",
|
|
170
|
-
type: "string"
|
|
171
|
-
},
|
|
172
|
-
block: {
|
|
173
|
-
description: "Target block slug/name for variation, core-variation, style, and end-to-end binding-source workflows.",
|
|
174
|
-
type: "string"
|
|
175
|
-
},
|
|
176
|
-
"catalog-title": {
|
|
177
|
-
description: "Human-readable title for typed pattern catalog entries; defaults to the pattern slug title.",
|
|
178
|
-
type: "string"
|
|
179
|
-
},
|
|
180
|
-
"controller-class": {
|
|
181
|
-
description: "REST resource controller class used for generated route callbacks or declared manual/provider route ownership.",
|
|
182
|
-
type: "string"
|
|
183
|
-
},
|
|
184
|
-
"controller-extends": {
|
|
185
|
-
description: "Optional base class for generated REST resource controller wrappers or declared manual/provider controller ownership.",
|
|
186
|
-
type: "string"
|
|
187
|
-
},
|
|
188
|
-
"data-storage": {
|
|
189
|
-
description: "Persistence storage mode for persistence-capable templates.",
|
|
190
|
-
type: "string"
|
|
191
|
-
},
|
|
192
|
-
"dry-run": {
|
|
193
|
-
argumentKind: "flag",
|
|
194
|
-
description: "Preview workspace file updates and completion guidance without writing them.",
|
|
195
|
-
type: "boolean"
|
|
196
|
-
},
|
|
197
|
-
"external-layer-id": {
|
|
198
|
-
description: "Explicit layer id when an external layer package exposes multiple selectable layers.",
|
|
199
|
-
type: "string"
|
|
200
|
-
},
|
|
201
|
-
"external-layer-source": {
|
|
202
|
-
description: "Local path, GitHub locator, or npm package that exposes wp-typia.layers.json for built-in block templates.",
|
|
203
|
-
type: "string"
|
|
204
|
-
},
|
|
205
|
-
from: {
|
|
206
|
-
description: "Source full block name (namespace/block) for transform workflows.",
|
|
207
|
-
type: "string"
|
|
208
|
-
},
|
|
209
|
-
"from-post-meta": {
|
|
210
|
-
description: "Alias for --post-meta when backing a binding-source scaffold from a typed post-meta contract.",
|
|
211
|
-
type: "string"
|
|
212
|
-
},
|
|
213
|
-
"inner-blocks-preset": {
|
|
214
|
-
description: "Compound-only InnerBlocks preset (freeform, ordered, horizontal, locked-structure).",
|
|
215
|
-
type: "string"
|
|
216
|
-
},
|
|
217
|
-
manual: {
|
|
218
|
-
argumentKind: "flag",
|
|
219
|
-
description: "Create a type-only manual REST contract without PHP route/controller files.",
|
|
220
|
-
type: "boolean"
|
|
221
|
-
},
|
|
222
|
-
"hide-from-rest": {
|
|
223
|
-
argumentKind: "flag",
|
|
224
|
-
description: "Keep a generated post-meta contract out of WordPress REST/editor responses.",
|
|
225
|
-
type: "boolean"
|
|
226
|
-
},
|
|
227
|
-
"meta-key": {
|
|
228
|
-
description: "WordPress meta key for post-meta workflows; defaults to _<phpPrefix>_<name>.",
|
|
229
|
-
type: "string"
|
|
230
|
-
},
|
|
231
|
-
"meta-path": {
|
|
232
|
-
description: "Top-level post-meta field used as the default binding-source field when --post-meta or --from-post-meta is provided.",
|
|
233
|
-
type: "string"
|
|
234
|
-
},
|
|
235
|
-
method: {
|
|
236
|
-
description: "HTTP method for manual REST contract workflows (GET, POST, PUT, PATCH, or DELETE).",
|
|
237
|
-
type: "string"
|
|
238
|
-
},
|
|
239
|
-
methods: {
|
|
240
|
-
description: "Comma-separated REST resource methods for rest-resource workflows.",
|
|
241
|
-
type: "string"
|
|
242
|
-
},
|
|
243
|
-
namespace: {
|
|
244
|
-
description: "REST namespace for rest-resource and ai-feature workflows.",
|
|
245
|
-
type: "string"
|
|
246
|
-
},
|
|
247
|
-
"permission-callback": {
|
|
248
|
-
description: "PHP permission callback for generated route registrations or declared manual/provider route ownership.",
|
|
249
|
-
type: "string"
|
|
250
|
-
},
|
|
251
|
-
"post-type": {
|
|
252
|
-
description: "WordPress post type key for post-meta workflows.",
|
|
253
|
-
type: "string"
|
|
254
|
-
},
|
|
255
|
-
"post-meta": {
|
|
256
|
-
description: "Typed post-meta contract slug used to back a binding-source scaffold.",
|
|
257
|
-
type: "string"
|
|
258
|
-
},
|
|
259
|
-
"persistence-policy": {
|
|
260
|
-
description: "Persistence write policy for persistence-capable templates.",
|
|
261
|
-
type: "string"
|
|
262
|
-
},
|
|
263
|
-
path: {
|
|
264
|
-
description: "Route path pattern for manual REST contract workflows, relative to the REST namespace.",
|
|
265
|
-
type: "string"
|
|
266
|
-
},
|
|
267
|
-
position: {
|
|
268
|
-
description: "Hook position for hooked-block workflows.",
|
|
269
|
-
type: "string"
|
|
270
|
-
},
|
|
271
|
-
"query-type": {
|
|
272
|
-
description: "Exported TypeScript query type for manual REST contract workflows.",
|
|
273
|
-
type: "string"
|
|
274
|
-
},
|
|
275
|
-
"response-type": {
|
|
276
|
-
description: "Exported TypeScript response type for manual REST contract workflows.",
|
|
277
|
-
type: "string"
|
|
278
|
-
},
|
|
279
|
-
"release-zip": {
|
|
280
|
-
argumentKind: "flag",
|
|
281
|
-
description: "Add release zip packaging scripts for integration-env plugin QA workflows.",
|
|
282
|
-
type: "boolean"
|
|
283
|
-
},
|
|
284
|
-
"route-pattern": {
|
|
285
|
-
description: "REST route pattern relative to the namespace; generated resources use it for item routes and manual/provider contracts may use it as an alias for --path.",
|
|
286
|
-
type: "string"
|
|
287
|
-
},
|
|
288
|
-
scope: {
|
|
289
|
-
description: "Pattern catalog scope for pattern workflows; one of full or section.",
|
|
290
|
-
type: "string"
|
|
291
|
-
},
|
|
292
|
-
"section-role": {
|
|
293
|
-
description: "Typed section role for section-scoped pattern catalog entries; requires --scope section.",
|
|
294
|
-
type: "string"
|
|
295
|
-
},
|
|
296
|
-
"secret-field": {
|
|
297
|
-
description: "Write-only request body field for manual settings REST contracts; requires --manual and a request body, typically generated by POST, PUT, or PATCH.",
|
|
298
|
-
type: "string"
|
|
299
|
-
},
|
|
300
|
-
"secret-has-value-field": {
|
|
301
|
-
description: "Alias for --secret-state-field when the manual settings response exposes a safe has-value indicator.",
|
|
302
|
-
type: "string"
|
|
303
|
-
},
|
|
304
|
-
"secret-masked-response-field": {
|
|
305
|
-
description: "Alias for --secret-state-field when the manual settings response exposes masked secret state.",
|
|
306
|
-
type: "string"
|
|
307
|
-
},
|
|
308
|
-
"secret-preserve-on-empty": {
|
|
309
|
-
description: "Whether blank manual settings secret submissions should preserve the stored secret (true by default).",
|
|
310
|
-
type: "string"
|
|
311
|
-
},
|
|
312
|
-
"secret-state-field": {
|
|
313
|
-
description: "Masked response boolean field for --secret-field; defaults to has<SecretField> and may also be provided as --secret-has-value-field.",
|
|
314
|
-
type: "string"
|
|
315
|
-
},
|
|
316
|
-
service: {
|
|
317
|
-
description: "Optional local service starter for integration-env workflows (none or docker-compose).",
|
|
318
|
-
type: "string"
|
|
319
|
-
},
|
|
320
|
-
slot: {
|
|
321
|
-
description: "Document editor shell slot for editor-plugin workflows (sidebar or document-setting-panel).",
|
|
322
|
-
type: "string"
|
|
323
|
-
},
|
|
324
|
-
source: {
|
|
325
|
-
description: "Optional data source locator for admin-view workflows, such as rest-resource:products or core-data:postType/post.",
|
|
326
|
-
type: "string"
|
|
327
|
-
},
|
|
328
|
-
template: {
|
|
329
|
-
description: "Optional built-in block family for the new block; interactive flows let you choose it when omitted and non-interactive runs default to basic.",
|
|
330
|
-
type: "string"
|
|
331
|
-
},
|
|
332
|
-
"thumbnail-url": {
|
|
333
|
-
description: "Optional thumbnail URL or relative path for typed pattern catalog entries.",
|
|
334
|
-
type: "string"
|
|
335
|
-
},
|
|
336
|
-
tags: {
|
|
337
|
-
description: "Comma-separated tags for typed pattern catalog entries; combine with repeatable --tag for single tags.",
|
|
338
|
-
repeatable: true,
|
|
339
|
-
type: "string"
|
|
340
|
-
},
|
|
341
|
-
tag: {
|
|
342
|
-
description: "Repeatable single tag for typed pattern catalog entries; use --tags for comma-separated lists.",
|
|
343
|
-
repeatable: true,
|
|
344
|
-
type: "string"
|
|
345
|
-
},
|
|
346
|
-
type: {
|
|
347
|
-
description: "Exported TypeScript type or interface name for standalone contract workflows.",
|
|
348
|
-
type: "string"
|
|
349
|
-
},
|
|
350
|
-
"body-type": {
|
|
351
|
-
description: "Exported TypeScript body type for manual REST contract workflows.",
|
|
352
|
-
type: "string"
|
|
353
|
-
},
|
|
354
|
-
to: {
|
|
355
|
-
description: "Target workspace block slug or full block name for transform workflows.",
|
|
356
|
-
type: "string"
|
|
357
|
-
},
|
|
358
|
-
"wp-env": {
|
|
359
|
-
argumentKind: "flag",
|
|
360
|
-
description: "Add a local @wordpress/env preset for integration-env workflows.",
|
|
361
|
-
type: "boolean"
|
|
362
|
-
}
|
|
363
|
-
};
|
|
364
|
-
// src/command-options/create.ts
|
|
365
|
-
var CREATE_OPTION_METADATA = {
|
|
366
|
-
"alternate-render-targets": {
|
|
367
|
-
description: "Comma-separated alternate render targets for dynamic block scaffolds (email,mjml,plain-text).",
|
|
368
|
-
type: "string"
|
|
369
|
-
},
|
|
370
|
-
"data-storage": {
|
|
371
|
-
description: "Persistence storage mode for persistence-capable templates.",
|
|
372
|
-
type: "string"
|
|
373
|
-
},
|
|
374
|
-
"dry-run": {
|
|
375
|
-
argumentKind: "flag",
|
|
376
|
-
description: "Preview scaffold output for a logical <project-dir> without writing files to the target directory.",
|
|
377
|
-
type: "boolean"
|
|
378
|
-
},
|
|
379
|
-
"external-layer-id": {
|
|
380
|
-
description: "Explicit layer id when an external layer package exposes multiple selectable layers.",
|
|
381
|
-
type: "string"
|
|
382
|
-
},
|
|
383
|
-
"external-layer-source": {
|
|
384
|
-
description: "Local path, GitHub locator, or npm package that exposes wp-typia.layers.json for built-in templates.",
|
|
385
|
-
type: "string"
|
|
386
|
-
},
|
|
387
|
-
"inner-blocks-preset": {
|
|
388
|
-
description: "Compound-only InnerBlocks preset (freeform, ordered, horizontal, locked-structure).",
|
|
389
|
-
type: "string"
|
|
390
|
-
},
|
|
391
|
-
namespace: {
|
|
392
|
-
description: "Override the default block namespace.",
|
|
393
|
-
type: "string"
|
|
394
|
-
},
|
|
395
|
-
"no-install": {
|
|
396
|
-
argumentKind: "flag",
|
|
397
|
-
description: "Skip dependency installation after scaffold.",
|
|
398
|
-
type: "boolean"
|
|
399
|
-
},
|
|
400
|
-
"package-manager": {
|
|
401
|
-
description: "Package manager to use for install and scripts.",
|
|
402
|
-
short: "p",
|
|
403
|
-
type: "string"
|
|
404
|
-
},
|
|
405
|
-
"persistence-policy": {
|
|
406
|
-
description: "Authenticated or public write policy for persistence-capable templates.",
|
|
407
|
-
type: "string"
|
|
408
|
-
},
|
|
409
|
-
"php-prefix": {
|
|
410
|
-
description: "Custom PHP symbol prefix.",
|
|
411
|
-
type: "string"
|
|
412
|
-
},
|
|
413
|
-
profile: {
|
|
414
|
-
description: "Opt-in scaffold profile; use plugin-qa with --template workspace for wp-env, smoke, and release zip starters.",
|
|
415
|
-
type: "string"
|
|
416
|
-
},
|
|
417
|
-
"query-post-type": {
|
|
418
|
-
description: "Default post type assigned to Query Loop variation scaffolds.",
|
|
419
|
-
type: "string"
|
|
420
|
-
},
|
|
421
|
-
template: {
|
|
422
|
-
description: "Template id or external template package.",
|
|
423
|
-
short: "t",
|
|
424
|
-
type: "string"
|
|
425
|
-
},
|
|
426
|
-
"text-domain": {
|
|
427
|
-
description: "Custom text domain for the generated project.",
|
|
428
|
-
type: "string"
|
|
429
|
-
},
|
|
430
|
-
variant: {
|
|
431
|
-
description: "Optional template variant identifier.",
|
|
432
|
-
type: "string"
|
|
433
|
-
},
|
|
434
|
-
"with-migration-ui": {
|
|
435
|
-
argumentKind: "flag",
|
|
436
|
-
description: "Enable migration UI support when the template supports it.",
|
|
437
|
-
type: "boolean"
|
|
438
|
-
},
|
|
439
|
-
"with-test-preset": {
|
|
440
|
-
argumentKind: "flag",
|
|
441
|
-
description: "Include the Playwright smoke-test preset.",
|
|
442
|
-
type: "boolean"
|
|
443
|
-
},
|
|
444
|
-
"with-wp-env": {
|
|
445
|
-
argumentKind: "flag",
|
|
446
|
-
description: "Include a local wp-env preset.",
|
|
447
|
-
type: "boolean"
|
|
448
|
-
},
|
|
449
|
-
yes: {
|
|
450
|
-
argumentKind: "flag",
|
|
451
|
-
description: "Accept defaults without prompt fallbacks.",
|
|
452
|
-
short: "y",
|
|
453
|
-
type: "boolean"
|
|
454
|
-
}
|
|
455
|
-
};
|
|
456
|
-
// src/command-options/doctor.ts
|
|
457
|
-
var DOCTOR_OPTION_METADATA = {
|
|
458
|
-
format: {
|
|
459
|
-
description: "Use `json` for machine-readable doctor check output or `text` for human-readable output.",
|
|
460
|
-
type: "string"
|
|
461
|
-
},
|
|
462
|
-
"workspace-only": {
|
|
463
|
-
argumentKind: "flag",
|
|
464
|
-
description: "Fail only on workspace-scoped doctor checks; environment/runtime failures remain advisory in JSON summaries.",
|
|
465
|
-
type: "boolean"
|
|
466
|
-
}
|
|
467
|
-
};
|
|
468
|
-
// src/command-options/global.ts
|
|
469
|
-
var GLOBAL_OPTION_METADATA = {
|
|
470
|
-
config: {
|
|
471
|
-
description: "Config override file path.",
|
|
472
|
-
short: "c",
|
|
473
|
-
type: "string"
|
|
474
|
-
},
|
|
475
|
-
format: {
|
|
476
|
-
description: "Output format for supported commands (`json` or `text`).",
|
|
477
|
-
type: "string"
|
|
478
|
-
},
|
|
479
|
-
id: {
|
|
480
|
-
description: "Template id for top-level `templates inspect` convenience.",
|
|
481
|
-
type: "string"
|
|
482
|
-
}
|
|
483
|
-
};
|
|
484
|
-
// src/command-options/init.ts
|
|
485
|
-
var INIT_OPTION_METADATA = {
|
|
486
|
-
apply: {
|
|
487
|
-
argumentKind: "flag",
|
|
488
|
-
description: "Write the planned package.json updates and retrofit helper files instead of previewing only.",
|
|
489
|
-
type: "boolean"
|
|
490
|
-
},
|
|
491
|
-
"package-manager": {
|
|
492
|
-
description: "Package manager to use for emitted scripts and next steps.",
|
|
493
|
-
short: "p",
|
|
494
|
-
type: "string"
|
|
495
|
-
}
|
|
496
|
-
};
|
|
497
|
-
// src/command-options/mcp.ts
|
|
498
|
-
var MCP_OPTION_METADATA = {
|
|
499
|
-
"output-dir": {
|
|
500
|
-
description: "Output directory for generated MCP metadata.",
|
|
501
|
-
type: "string"
|
|
502
|
-
}
|
|
503
|
-
};
|
|
504
|
-
// src/command-options/migrate.ts
|
|
505
|
-
var MIGRATE_OPTION_METADATA = {
|
|
506
|
-
all: {
|
|
507
|
-
argumentKind: "flag",
|
|
508
|
-
description: "Run across every configured migration version and block target.",
|
|
509
|
-
type: "boolean"
|
|
510
|
-
},
|
|
511
|
-
"current-migration-version": {
|
|
512
|
-
description: "Current migration version label for `migrate init`.",
|
|
513
|
-
type: "string"
|
|
514
|
-
},
|
|
515
|
-
force: {
|
|
516
|
-
argumentKind: "flag",
|
|
517
|
-
description: "Force overwrite behavior where supported.",
|
|
518
|
-
type: "boolean"
|
|
519
|
-
},
|
|
520
|
-
"from-migration-version": {
|
|
521
|
-
description: "Source migration version label.",
|
|
522
|
-
type: "string"
|
|
523
|
-
},
|
|
524
|
-
iterations: {
|
|
525
|
-
description: "Iteration count for `migrate fuzz`.",
|
|
526
|
-
type: "string"
|
|
527
|
-
},
|
|
528
|
-
"migration-version": {
|
|
529
|
-
description: "Version label to capture with `migrate snapshot`.",
|
|
530
|
-
type: "string"
|
|
531
|
-
},
|
|
532
|
-
seed: {
|
|
533
|
-
description: "Deterministic fuzz seed.",
|
|
534
|
-
type: "string"
|
|
535
|
-
},
|
|
536
|
-
"to-migration-version": {
|
|
537
|
-
description: "Target migration version label.",
|
|
538
|
-
type: "string"
|
|
539
|
-
}
|
|
540
|
-
};
|
|
541
|
-
// src/command-options/sync.ts
|
|
542
|
-
var SYNC_OPTION_METADATA = {
|
|
543
|
-
check: {
|
|
544
|
-
argumentKind: "flag",
|
|
545
|
-
description: "Check generated artifacts without writing changes. Advanced sync-types-only flags stay on sync-types.",
|
|
546
|
-
type: "boolean"
|
|
547
|
-
},
|
|
548
|
-
"dry-run": {
|
|
549
|
-
argumentKind: "flag",
|
|
550
|
-
description: "Preview the generated sync commands that would run without executing them.",
|
|
551
|
-
type: "boolean"
|
|
552
|
-
}
|
|
553
|
-
};
|
|
554
|
-
// src/command-options/templates.ts
|
|
555
|
-
var TEMPLATES_OPTION_METADATA = {
|
|
556
|
-
id: {
|
|
557
|
-
description: "Template id for `templates inspect`.",
|
|
558
|
-
type: "string"
|
|
559
|
-
}
|
|
560
|
-
};
|
|
561
|
-
// src/command-option-metadata.ts
|
|
562
|
-
var COMMAND_OPTION_METADATA_BY_GROUP = {
|
|
563
|
-
add: ADD_OPTION_METADATA,
|
|
564
|
-
create: CREATE_OPTION_METADATA,
|
|
565
|
-
doctor: DOCTOR_OPTION_METADATA,
|
|
566
|
-
global: GLOBAL_OPTION_METADATA,
|
|
567
|
-
init: INIT_OPTION_METADATA,
|
|
568
|
-
migrate: MIGRATE_OPTION_METADATA,
|
|
569
|
-
mcp: MCP_OPTION_METADATA,
|
|
570
|
-
sync: SYNC_OPTION_METADATA,
|
|
571
|
-
templates: TEMPLATES_OPTION_METADATA
|
|
572
|
-
};
|
|
573
|
-
var COMMAND_OPTION_GROUP_NAMES = Object.keys(COMMAND_OPTION_METADATA_BY_GROUP);
|
|
574
|
-
function collectCommandOptionMetadata(...groupNames) {
|
|
575
|
-
const metadata = {};
|
|
576
|
-
for (const groupName of groupNames) {
|
|
577
|
-
for (const [optionName, option] of Object.entries(COMMAND_OPTION_METADATA_BY_GROUP[groupName])) {
|
|
578
|
-
metadata[optionName] = {
|
|
579
|
-
...metadata[optionName] ?? {},
|
|
580
|
-
...option
|
|
581
|
-
};
|
|
582
|
-
}
|
|
583
|
-
}
|
|
584
|
-
return metadata;
|
|
585
|
-
}
|
|
586
|
-
var ALL_COMMAND_OPTION_METADATA = collectCommandOptionMetadata(...COMMAND_OPTION_GROUP_NAMES);
|
|
587
|
-
function buildCommandOptions(metadata) {
|
|
588
|
-
return Object.fromEntries(Object.entries(metadata).map(([name, option]) => [
|
|
589
|
-
name,
|
|
590
|
-
{
|
|
591
|
-
...option.argumentKind ? { argumentKind: option.argumentKind } : {},
|
|
592
|
-
description: option.description,
|
|
593
|
-
...option.repeatable ? { repeatable: true } : {},
|
|
594
|
-
schema: option.type === "boolean" ? exports_external.boolean().default(false) : option.repeatable ? exports_external.union([exports_external.string(), exports_external.array(exports_external.string())]).optional() : exports_external.string().optional(),
|
|
595
|
-
...option.short ? { short: option.short } : {}
|
|
596
|
-
}
|
|
597
|
-
]));
|
|
598
|
-
}
|
|
599
|
-
function collectOptionNamesByType(metadata, type) {
|
|
600
|
-
return Object.entries(metadata).filter(([, option]) => option.type === type).map(([name]) => name);
|
|
601
|
-
}
|
|
602
|
-
function buildCommandOptionParser(...metadataMaps) {
|
|
603
|
-
const metadata = {};
|
|
604
|
-
for (const metadataMap of metadataMaps) {
|
|
605
|
-
for (const [optionName, option] of Object.entries(metadataMap)) {
|
|
606
|
-
metadata[optionName] = {
|
|
607
|
-
...metadata[optionName] ?? {},
|
|
608
|
-
...option
|
|
609
|
-
};
|
|
610
|
-
}
|
|
611
|
-
}
|
|
612
|
-
return {
|
|
613
|
-
booleanOptionNames: new Set(collectOptionNamesByType(metadata, "boolean")),
|
|
614
|
-
repeatableOptionNames: new Set(Object.entries(metadata).filter(([, option]) => option.repeatable).map(([name]) => name)),
|
|
615
|
-
shortFlagMap: new Map(Object.entries(metadata).flatMap(([name, option]) => option.short ? [[option.short, { name, type: option.type }]] : [])),
|
|
616
|
-
stringOptionNames: new Set(collectOptionNamesByType(metadata, "string"))
|
|
617
|
-
};
|
|
618
|
-
}
|
|
619
|
-
function assignParsedOptionValue(flags, options) {
|
|
620
|
-
if (!options.parser.repeatableOptionNames.has(options.name)) {
|
|
621
|
-
flags[options.name] = options.value;
|
|
622
|
-
return;
|
|
623
|
-
}
|
|
624
|
-
const current = flags[options.name];
|
|
625
|
-
flags[options.name] = Array.isArray(current) ? [...current, options.value] : current === undefined ? [options.value] : [current, options.value];
|
|
626
|
-
}
|
|
627
|
-
function buildArgvWalkerRoutingMetadata(...metadataMaps) {
|
|
628
|
-
const parser = buildCommandOptionParser(...metadataMaps);
|
|
629
|
-
return {
|
|
630
|
-
longValueOptions: Array.from(parser.stringOptionNames).map((optionName) => `--${optionName}`).sort((left, right) => left.localeCompare(right)),
|
|
631
|
-
shortValueOptions: Array.from(parser.shortFlagMap.entries()).filter(([, option]) => option.type === "string").map(([short]) => `-${short}`).sort((left, right) => left.localeCompare(right))
|
|
632
|
-
};
|
|
633
|
-
}
|
|
634
|
-
var COMMAND_ROUTING_METADATA = buildArgvWalkerRoutingMetadata(ALL_COMMAND_OPTION_METADATA);
|
|
635
|
-
function createMissingOptionValueError(optionLabel) {
|
|
636
|
-
return createCliDiagnosticCodeError(CLI_DIAGNOSTIC_CODES.MISSING_ARGUMENT, `\`${optionLabel}\` requires a value.`);
|
|
637
|
-
}
|
|
638
|
-
function createUnknownOptionError(optionLabel) {
|
|
639
|
-
return createCliDiagnosticCodeError(CLI_DIAGNOSTIC_CODES.INVALID_ARGUMENT, `Unknown option \`${optionLabel}\`.`);
|
|
640
|
-
}
|
|
641
|
-
function walkArgvOptions(argv, options) {
|
|
642
|
-
const flags = {};
|
|
643
|
-
const nextArgv = [];
|
|
644
|
-
const booleanOptionNames = new Set(options.parser.booleanOptionNames);
|
|
645
|
-
const optionNames = new Set(options.optionNames ?? []);
|
|
646
|
-
for (const optionName of options.extraBooleanOptionNames ?? []) {
|
|
647
|
-
booleanOptionNames.add(optionName);
|
|
648
|
-
}
|
|
649
|
-
for (let index = 0;index < argv.length; index += 1) {
|
|
650
|
-
const arg = argv[index];
|
|
651
|
-
if (!arg) {
|
|
652
|
-
continue;
|
|
653
|
-
}
|
|
654
|
-
if (arg === "--") {
|
|
655
|
-
nextArgv.push(...argv.slice(index + (options.strict ? 1 : 0)));
|
|
656
|
-
break;
|
|
657
|
-
}
|
|
658
|
-
if (arg.length === 2 && arg.startsWith("-")) {
|
|
659
|
-
const shortFlag = options.parser.shortFlagMap.get(arg.slice(1));
|
|
660
|
-
if (!shortFlag || !options.strict && !optionNames.has(shortFlag.name)) {
|
|
661
|
-
if (options.strict) {
|
|
662
|
-
throw createUnknownOptionError(arg);
|
|
663
|
-
}
|
|
664
|
-
nextArgv.push(arg);
|
|
665
|
-
continue;
|
|
666
|
-
}
|
|
667
|
-
if (shortFlag.type === "boolean") {
|
|
668
|
-
flags[shortFlag.name] = true;
|
|
669
|
-
continue;
|
|
670
|
-
}
|
|
671
|
-
const next = argv[index + 1];
|
|
672
|
-
if (!next || next.startsWith("-")) {
|
|
673
|
-
throw createMissingOptionValueError(arg);
|
|
674
|
-
}
|
|
675
|
-
assignParsedOptionValue(flags, {
|
|
676
|
-
name: shortFlag.name,
|
|
677
|
-
parser: options.parser,
|
|
678
|
-
value: next
|
|
679
|
-
});
|
|
680
|
-
index += 1;
|
|
681
|
-
continue;
|
|
682
|
-
}
|
|
683
|
-
if (arg.startsWith("--")) {
|
|
684
|
-
const option = arg.slice(2);
|
|
685
|
-
const separatorIndex = option.indexOf("=");
|
|
686
|
-
const rawName = separatorIndex === -1 ? option : option.slice(0, separatorIndex);
|
|
687
|
-
const inlineValue = separatorIndex === -1 ? undefined : option.slice(separatorIndex + 1);
|
|
688
|
-
if (!options.strict && !optionNames.has(rawName)) {
|
|
689
|
-
nextArgv.push(arg);
|
|
690
|
-
continue;
|
|
691
|
-
}
|
|
692
|
-
if (booleanOptionNames.has(rawName)) {
|
|
693
|
-
flags[rawName] = true;
|
|
694
|
-
continue;
|
|
695
|
-
}
|
|
696
|
-
if (!options.parser.stringOptionNames.has(rawName)) {
|
|
697
|
-
if (options.strict) {
|
|
698
|
-
throw createUnknownOptionError(`--${rawName}`);
|
|
699
|
-
}
|
|
700
|
-
nextArgv.push(arg);
|
|
701
|
-
continue;
|
|
702
|
-
}
|
|
703
|
-
if (inlineValue !== undefined) {
|
|
704
|
-
if (!inlineValue) {
|
|
705
|
-
throw createMissingOptionValueError(`--${rawName}`);
|
|
706
|
-
}
|
|
707
|
-
assignParsedOptionValue(flags, {
|
|
708
|
-
name: rawName,
|
|
709
|
-
parser: options.parser,
|
|
710
|
-
value: inlineValue
|
|
711
|
-
});
|
|
712
|
-
continue;
|
|
713
|
-
}
|
|
714
|
-
const next = argv[index + 1];
|
|
715
|
-
if (!next || next.startsWith("-")) {
|
|
716
|
-
throw createMissingOptionValueError(`--${rawName}`);
|
|
717
|
-
}
|
|
718
|
-
assignParsedOptionValue(flags, {
|
|
719
|
-
name: rawName,
|
|
720
|
-
parser: options.parser,
|
|
721
|
-
value: next
|
|
722
|
-
});
|
|
723
|
-
index += 1;
|
|
724
|
-
continue;
|
|
725
|
-
}
|
|
726
|
-
if (arg.startsWith("-") && options.strict) {
|
|
727
|
-
throw createUnknownOptionError(arg);
|
|
728
|
-
}
|
|
729
|
-
nextArgv.push(arg);
|
|
730
|
-
}
|
|
731
|
-
return {
|
|
732
|
-
argv: nextArgv,
|
|
733
|
-
flags
|
|
734
|
-
};
|
|
735
|
-
}
|
|
736
|
-
function extractKnownOptionValuesFromArgv(argv, options) {
|
|
737
|
-
return walkArgvOptions(argv, {
|
|
738
|
-
optionNames: options.optionNames,
|
|
739
|
-
parser: options.parser,
|
|
740
|
-
strict: false
|
|
741
|
-
});
|
|
742
|
-
}
|
|
743
|
-
function resolveCommandOptionValues(metadata, options) {
|
|
744
|
-
const resolved = {};
|
|
745
|
-
const optionNames = options.optionNames ?? Object.keys(metadata);
|
|
746
|
-
for (const optionName of optionNames) {
|
|
747
|
-
const name = String(optionName);
|
|
748
|
-
const descriptor = metadata[name];
|
|
749
|
-
if (!descriptor) {
|
|
750
|
-
continue;
|
|
751
|
-
}
|
|
752
|
-
const value = options.flags?.[name] ?? options.defaults?.[name];
|
|
753
|
-
if (descriptor.type === "boolean") {
|
|
754
|
-
resolved[name] = Boolean(value ?? false);
|
|
755
|
-
continue;
|
|
756
|
-
}
|
|
757
|
-
if (descriptor.repeatable && Array.isArray(value)) {
|
|
758
|
-
if (!value.every((item) => typeof item === "string")) {
|
|
759
|
-
resolved[name] = undefined;
|
|
760
|
-
continue;
|
|
761
|
-
}
|
|
762
|
-
resolved[name] = options.preserveArrays ? [...value] : value.join(",");
|
|
763
|
-
continue;
|
|
764
|
-
}
|
|
765
|
-
resolved[name] = typeof value === "string" ? value : undefined;
|
|
766
|
-
}
|
|
767
|
-
return resolved;
|
|
768
|
-
}
|
|
769
|
-
|
|
770
|
-
// src/cli-command-resolution.ts
|
|
771
|
-
function resolveEntrypointCliCommand(argv) {
|
|
772
|
-
return findFirstPositional(argv, COMMAND_ROUTING_METADATA) ?? "wp-typia";
|
|
773
|
-
}
|
|
774
|
-
|
|
775
|
-
// src/cli-output-format.ts
|
|
776
|
-
var PUBLIC_CLI_OUTPUT_FORMATS = ["json", "text"];
|
|
777
|
-
var LEGACY_CLI_OUTPUT_FORMAT_ALIASES = ["toon"];
|
|
778
|
-
var SUPPORTED_CLI_OUTPUT_FORMATS = [
|
|
779
|
-
...PUBLIC_CLI_OUTPUT_FORMATS,
|
|
780
|
-
...LEGACY_CLI_OUTPUT_FORMAT_ALIASES
|
|
781
|
-
];
|
|
782
|
-
var SUPPORTED_CLI_OUTPUT_FORMAT_VALUES = SUPPORTED_CLI_OUTPUT_FORMATS;
|
|
783
|
-
function formatSupportedCliOutputFormats() {
|
|
784
|
-
return PUBLIC_CLI_OUTPUT_FORMATS.join(", ");
|
|
785
|
-
}
|
|
786
|
-
function isSupportedCliOutputFormat(value) {
|
|
787
|
-
return typeof value === "string" && SUPPORTED_CLI_OUTPUT_FORMAT_VALUES.includes(value);
|
|
788
|
-
}
|
|
789
|
-
function normalizeCliOutputFormatArgv(argv) {
|
|
790
|
-
let normalized;
|
|
791
|
-
for (let index = 0;index < argv.length; index += 1) {
|
|
792
|
-
const arg = argv[index];
|
|
793
|
-
if (!arg) {
|
|
794
|
-
continue;
|
|
795
|
-
}
|
|
796
|
-
if (arg === "--") {
|
|
797
|
-
break;
|
|
798
|
-
}
|
|
799
|
-
if (arg === "--format") {
|
|
800
|
-
const next = argv[index + 1];
|
|
801
|
-
if (next === "text") {
|
|
802
|
-
normalized ??= [...argv];
|
|
803
|
-
normalized[index + 1] = "toon";
|
|
804
|
-
}
|
|
805
|
-
if (next && !next.startsWith("-")) {
|
|
806
|
-
index += 1;
|
|
807
|
-
}
|
|
808
|
-
continue;
|
|
809
|
-
}
|
|
810
|
-
if (arg === "--format=text") {
|
|
811
|
-
normalized ??= [...argv];
|
|
812
|
-
normalized[index] = "--format=toon";
|
|
813
|
-
}
|
|
814
|
-
}
|
|
815
|
-
return normalized ?? argv;
|
|
816
|
-
}
|
|
817
|
-
function formatInvalidCliOutputFormatMessage(value) {
|
|
818
|
-
return `Invalid --format value "${value}". Supported values: ${formatSupportedCliOutputFormats()}.`;
|
|
819
|
-
}
|
|
820
|
-
function assertSupportedCliOutputFormat(value, argv) {
|
|
821
|
-
if (isSupportedCliOutputFormat(value)) {
|
|
822
|
-
return;
|
|
823
|
-
}
|
|
824
|
-
throw createCliCommandError({
|
|
825
|
-
code: CLI_DIAGNOSTIC_CODES.INVALID_ARGUMENT,
|
|
826
|
-
command: resolveEntrypointCliCommand(argv),
|
|
827
|
-
detailLines: [formatInvalidCliOutputFormatMessage(value)]
|
|
828
|
-
});
|
|
829
|
-
}
|
|
830
|
-
function validateCliOutputFormatArgv(argv) {
|
|
831
|
-
for (let index = 0;index < argv.length; index += 1) {
|
|
832
|
-
const arg = argv[index];
|
|
833
|
-
if (!arg) {
|
|
834
|
-
continue;
|
|
835
|
-
}
|
|
836
|
-
if (arg === "--") {
|
|
837
|
-
return;
|
|
838
|
-
}
|
|
839
|
-
if (arg === "--format") {
|
|
840
|
-
const next = argv[index + 1];
|
|
841
|
-
if (next && !next.startsWith("-")) {
|
|
842
|
-
assertSupportedCliOutputFormat(next, argv);
|
|
843
|
-
index += 1;
|
|
844
|
-
}
|
|
845
|
-
continue;
|
|
846
|
-
}
|
|
847
|
-
if (arg.startsWith("--format=")) {
|
|
848
|
-
const value = arg.slice("--format=".length);
|
|
849
|
-
if (value) {
|
|
850
|
-
assertSupportedCliOutputFormat(value, argv);
|
|
851
|
-
}
|
|
852
|
-
}
|
|
853
|
-
}
|
|
854
|
-
}
|
|
855
|
-
|
|
856
|
-
// src/cli-diagnostic-output.ts
|
|
857
|
-
function writeStructuredCliJsonToStderr(payload) {
|
|
858
|
-
process.stderr.write(`${JSON.stringify(payload, null, 2)}
|
|
859
|
-
`);
|
|
860
|
-
}
|
|
861
|
-
function prefersStructuredCliArgv(argv) {
|
|
862
|
-
for (let index = 0;index < argv.length; index += 1) {
|
|
863
|
-
const arg = argv[index];
|
|
864
|
-
if (!arg) {
|
|
865
|
-
continue;
|
|
866
|
-
}
|
|
867
|
-
if (arg === "--") {
|
|
868
|
-
return false;
|
|
869
|
-
}
|
|
870
|
-
if (arg === "--format") {
|
|
871
|
-
return argv[index + 1] === "json";
|
|
872
|
-
}
|
|
873
|
-
if (arg.startsWith("--format=")) {
|
|
874
|
-
return arg.slice("--format=".length) === "json";
|
|
875
|
-
}
|
|
876
|
-
}
|
|
877
|
-
return false;
|
|
878
|
-
}
|
|
879
|
-
function prefersStructuredCliOutput(args) {
|
|
880
|
-
if (args.formatExplicit) {
|
|
881
|
-
return args.format === "json" && isSupportedCliOutputFormat(args.format);
|
|
882
|
-
}
|
|
883
|
-
return Boolean(args.agent) || Boolean(args.context?.store?.isAIAgent);
|
|
884
|
-
}
|
|
885
|
-
function emitCliDiagnosticFailure(args, options) {
|
|
886
|
-
const diagnostic = createCliCommandError(options);
|
|
887
|
-
if (prefersStructuredCliOutput(args)) {
|
|
888
|
-
writeStructuredCliJsonToStderr({
|
|
889
|
-
...options.extraOutput ?? {},
|
|
890
|
-
error: serializeCliDiagnosticError(diagnostic),
|
|
891
|
-
ok: false
|
|
892
|
-
});
|
|
893
|
-
process.exitCode = 1;
|
|
894
|
-
return true;
|
|
895
|
-
}
|
|
896
|
-
throw diagnostic;
|
|
897
|
-
}
|
|
898
|
-
function writeStructuredCliDiagnosticError(argv, error) {
|
|
899
|
-
if (!prefersStructuredCliArgv(argv)) {
|
|
900
|
-
return false;
|
|
901
|
-
}
|
|
902
|
-
writeStructuredCliJsonToStderr({
|
|
903
|
-
error: serializeCliDiagnosticError(createCliCommandError({
|
|
904
|
-
command: resolveEntrypointCliCommand(argv),
|
|
905
|
-
error
|
|
906
|
-
})),
|
|
907
|
-
ok: false
|
|
908
|
-
});
|
|
909
|
-
process.exitCode = 1;
|
|
910
|
-
return true;
|
|
911
|
-
}
|
|
912
|
-
|
|
913
|
-
// src/add-kind-ids.ts
|
|
914
|
-
function formatAddKindList() {
|
|
915
|
-
return ADD_KIND_IDS.join(", ");
|
|
916
|
-
}
|
|
917
|
-
function formatAddKindUsagePlaceholder() {
|
|
918
|
-
return `<${ADD_KIND_IDS.join("|")}>`;
|
|
919
|
-
}
|
|
920
|
-
|
|
921
|
-
// src/command-registry.ts
|
|
922
|
-
var WP_TYPIA_CANONICAL_CREATE_USAGE = "wp-typia create <project-dir>";
|
|
923
|
-
var WP_TYPIA_COMMAND_REGISTRY = [
|
|
924
|
-
{
|
|
925
|
-
commandTree: true,
|
|
926
|
-
description: "Scaffold a new wp-typia project.",
|
|
927
|
-
interactiveRuntime: true,
|
|
928
|
-
name: "create",
|
|
929
|
-
nodeFallback: true,
|
|
930
|
-
optionGroups: ["create"],
|
|
931
|
-
requiresBunRuntime: false
|
|
932
|
-
},
|
|
933
|
-
{
|
|
934
|
-
commandTree: true,
|
|
935
|
-
description: "Preview or apply the minimum retrofit plan for an existing project.",
|
|
936
|
-
name: "init",
|
|
937
|
-
nodeFallback: true,
|
|
938
|
-
optionGroups: ["init"],
|
|
939
|
-
requiresBunRuntime: false
|
|
940
|
-
},
|
|
941
|
-
{
|
|
942
|
-
commandTree: true,
|
|
943
|
-
description: "Run the common generated-project sync workflow.",
|
|
944
|
-
name: "sync",
|
|
945
|
-
nodeFallback: true,
|
|
946
|
-
optionGroups: ["sync"],
|
|
947
|
-
requiresBunRuntime: false,
|
|
948
|
-
subcommands: ["ai"]
|
|
949
|
-
},
|
|
950
|
-
{
|
|
951
|
-
commandTree: true,
|
|
952
|
-
description: "Extend an official wp-typia workspace.",
|
|
953
|
-
interactiveRuntime: true,
|
|
954
|
-
name: "add",
|
|
955
|
-
nodeFallback: true,
|
|
956
|
-
optionGroups: ["add"],
|
|
957
|
-
requiresBunRuntime: false,
|
|
958
|
-
subcommands: ADD_KIND_IDS
|
|
959
|
-
},
|
|
960
|
-
{
|
|
961
|
-
commandTree: true,
|
|
962
|
-
description: "Run migration workflows.",
|
|
963
|
-
interactiveRuntime: true,
|
|
964
|
-
name: "migrate",
|
|
965
|
-
nodeFallback: true,
|
|
966
|
-
optionGroups: ["migrate"],
|
|
967
|
-
requiresBunRuntime: false,
|
|
968
|
-
subcommands: [
|
|
969
|
-
"init",
|
|
970
|
-
"snapshot",
|
|
971
|
-
"diff",
|
|
972
|
-
"scaffold",
|
|
973
|
-
"plan",
|
|
974
|
-
"wizard",
|
|
975
|
-
"verify",
|
|
976
|
-
"doctor",
|
|
977
|
-
"fixtures",
|
|
978
|
-
"fuzz"
|
|
979
|
-
]
|
|
980
|
-
},
|
|
981
|
-
{
|
|
982
|
-
commandTree: true,
|
|
983
|
-
description: "Inspect scaffold templates.",
|
|
984
|
-
name: "templates",
|
|
985
|
-
nodeFallback: true,
|
|
986
|
-
optionGroups: ["templates"],
|
|
987
|
-
requiresBunRuntime: false,
|
|
988
|
-
subcommands: ["list", "inspect"]
|
|
989
|
-
},
|
|
990
|
-
{
|
|
991
|
-
commandTree: true,
|
|
992
|
-
description: "Run repository and project diagnostics.",
|
|
993
|
-
name: "doctor",
|
|
994
|
-
nodeFallback: true,
|
|
995
|
-
optionGroups: ["doctor"],
|
|
996
|
-
requiresBunRuntime: false
|
|
997
|
-
},
|
|
998
|
-
{
|
|
999
|
-
commandTree: true,
|
|
1000
|
-
description: "Inspect or sync schema-driven MCP metadata.",
|
|
1001
|
-
name: "mcp",
|
|
1002
|
-
nodeFallback: false,
|
|
1003
|
-
optionGroups: ["mcp"],
|
|
1004
|
-
requiresBunRuntime: true,
|
|
1005
|
-
subcommands: ["list", "sync"]
|
|
1006
|
-
},
|
|
1007
|
-
{
|
|
1008
|
-
commandTree: false,
|
|
1009
|
-
name: "help",
|
|
1010
|
-
nodeFallback: true,
|
|
1011
|
-
optionGroups: [],
|
|
1012
|
-
requiresBunRuntime: false
|
|
1013
|
-
},
|
|
1014
|
-
{
|
|
1015
|
-
commandTree: false,
|
|
1016
|
-
name: "version",
|
|
1017
|
-
nodeFallback: true,
|
|
1018
|
-
optionGroups: [],
|
|
1019
|
-
requiresBunRuntime: false
|
|
1020
|
-
},
|
|
1021
|
-
{
|
|
1022
|
-
commandTree: false,
|
|
1023
|
-
name: "skills",
|
|
1024
|
-
nodeFallback: false,
|
|
1025
|
-
optionGroups: [],
|
|
1026
|
-
requiresBunRuntime: true
|
|
1027
|
-
},
|
|
1028
|
-
{
|
|
1029
|
-
commandTree: false,
|
|
1030
|
-
name: "completions",
|
|
1031
|
-
nodeFallback: false,
|
|
1032
|
-
optionGroups: [],
|
|
1033
|
-
requiresBunRuntime: true
|
|
1034
|
-
},
|
|
1035
|
-
{
|
|
1036
|
-
commandTree: false,
|
|
1037
|
-
name: "complete",
|
|
1038
|
-
nodeFallback: false,
|
|
1039
|
-
optionGroups: [],
|
|
1040
|
-
requiresBunRuntime: true
|
|
1041
|
-
}
|
|
1042
|
-
];
|
|
1043
|
-
var WP_TYPIA_RESERVED_TOP_LEVEL_COMMAND_NAMES = WP_TYPIA_COMMAND_REGISTRY.map((command) => command.name);
|
|
1044
|
-
var WP_TYPIA_NODE_FALLBACK_TOP_LEVEL_COMMAND_NAMES = WP_TYPIA_COMMAND_REGISTRY.filter((command) => command.nodeFallback).map((command) => command.name);
|
|
1045
|
-
var WP_TYPIA_INTERACTIVE_RUNTIME_TOP_LEVEL_COMMAND_NAMES = WP_TYPIA_COMMAND_REGISTRY.filter((command) => ("interactiveRuntime" in command) && command.interactiveRuntime).map((command) => command.name);
|
|
1046
|
-
var WP_TYPIA_TOP_LEVEL_COMMAND_NAMES = WP_TYPIA_COMMAND_REGISTRY.filter((command) => command.commandTree).map((command) => command.name);
|
|
1047
|
-
var WP_TYPIA_BUN_REQUIRED_TOP_LEVEL_COMMAND_NAMES = WP_TYPIA_COMMAND_REGISTRY.filter((command) => command.requiresBunRuntime).map((command) => command.name);
|
|
1048
|
-
var WP_TYPIA_FUTURE_COMMAND_TREE = WP_TYPIA_COMMAND_REGISTRY.filter((command) => command.commandTree).map((command) => ({
|
|
1049
|
-
description: command.description,
|
|
1050
|
-
name: command.name,
|
|
1051
|
-
subcommands: "subcommands" in command ? command.subcommands : undefined
|
|
1052
|
-
}));
|
|
1053
|
-
var commandOptionGroupNamesByTopLevelCommand = {};
|
|
1054
|
-
for (const command of WP_TYPIA_COMMAND_REGISTRY) {
|
|
1055
|
-
commandOptionGroupNamesByTopLevelCommand[command.name] = command.optionGroups;
|
|
1056
|
-
}
|
|
1057
|
-
var WP_TYPIA_COMMAND_OPTION_GROUP_NAMES_BY_TOP_LEVEL_COMMAND = commandOptionGroupNamesByTopLevelCommand;
|
|
1058
|
-
|
|
1059
|
-
// src/config.ts
|
|
1060
|
-
import fs from "fs/promises";
|
|
1061
|
-
import os from "os";
|
|
1062
|
-
import path from "path";
|
|
1063
|
-
import { isPlainObject as isRecord } from "@wp-typia/api-client/runtime-primitives";
|
|
1064
|
-
var WP_TYPIA_CONFIG_SOURCES = [
|
|
1065
|
-
"~/.config/wp-typia/config.json",
|
|
1066
|
-
".wp-typiarc",
|
|
1067
|
-
".wp-typiarc.json"
|
|
1068
|
-
];
|
|
1069
|
-
var wordpressVersionSchema = exports_external.string().regex(/^\d+\.\d+(?:\.\d+)?$/u, 'expected dotted numeric WordPress version such as "6.7" or "6.7.1"');
|
|
1070
|
-
var wpTypiaSchemaSourceSchema = exports_external.object({
|
|
1071
|
-
namespace: exports_external.string(),
|
|
1072
|
-
path: exports_external.string()
|
|
1073
|
-
}).strict();
|
|
1074
|
-
var wordpressCompatibilityConfigSchema = exports_external.object({
|
|
1075
|
-
minVersion: wordpressVersionSchema.optional(),
|
|
1076
|
-
testedVersions: exports_external.array(wordpressVersionSchema).optional()
|
|
1077
|
-
}).strict();
|
|
1078
|
-
var blockApiCompatibilityConfigSchema = exports_external.object({
|
|
1079
|
-
allowUnknownFutureKeys: exports_external.boolean().optional(),
|
|
1080
|
-
strict: exports_external.boolean().optional()
|
|
1081
|
-
}).strict();
|
|
1082
|
-
var createConfigSchema = exports_external.object({
|
|
1083
|
-
"alternate-render-targets": exports_external.string().optional(),
|
|
1084
|
-
"inner-blocks-preset": exports_external.string().optional(),
|
|
1085
|
-
"data-storage": exports_external.string().optional(),
|
|
1086
|
-
"dry-run": exports_external.boolean().optional(),
|
|
1087
|
-
"external-layer-id": exports_external.string().optional(),
|
|
1088
|
-
"external-layer-source": exports_external.string().optional(),
|
|
1089
|
-
namespace: exports_external.string().optional(),
|
|
1090
|
-
"no-install": exports_external.boolean().optional(),
|
|
1091
|
-
"package-manager": exports_external.string().optional(),
|
|
1092
|
-
"persistence-policy": exports_external.string().optional(),
|
|
1093
|
-
"php-prefix": exports_external.string().optional(),
|
|
1094
|
-
profile: exports_external.string().optional(),
|
|
1095
|
-
"query-post-type": exports_external.string().optional(),
|
|
1096
|
-
template: exports_external.string().optional(),
|
|
1097
|
-
"text-domain": exports_external.string().optional(),
|
|
1098
|
-
variant: exports_external.string().optional(),
|
|
1099
|
-
"with-migration-ui": exports_external.boolean().optional(),
|
|
1100
|
-
"with-test-preset": exports_external.boolean().optional(),
|
|
1101
|
-
"with-wp-env": exports_external.boolean().optional(),
|
|
1102
|
-
yes: exports_external.boolean().optional()
|
|
1103
|
-
}).strict();
|
|
1104
|
-
var addBlockConfigSchema = exports_external.object({
|
|
1105
|
-
"alternate-render-targets": exports_external.string().optional(),
|
|
1106
|
-
"data-storage": exports_external.string().optional(),
|
|
1107
|
-
"external-layer-id": exports_external.string().optional(),
|
|
1108
|
-
"external-layer-source": exports_external.string().optional(),
|
|
1109
|
-
"inner-blocks-preset": exports_external.string().optional(),
|
|
1110
|
-
"persistence-policy": exports_external.string().optional(),
|
|
1111
|
-
template: exports_external.string().optional()
|
|
1112
|
-
}).strict();
|
|
1113
|
-
var addConfigSchema = exports_external.object({
|
|
1114
|
-
block: addBlockConfigSchema.optional()
|
|
1115
|
-
}).strict();
|
|
1116
|
-
var mcpConfigSchema = exports_external.object({
|
|
1117
|
-
schemaSources: exports_external.array(wpTypiaSchemaSourceSchema).optional()
|
|
1118
|
-
}).strict();
|
|
1119
|
-
var wpTypiaUserConfigSchema = exports_external.object({
|
|
1120
|
-
add: addConfigSchema.optional(),
|
|
1121
|
-
compatibility: blockApiCompatibilityConfigSchema.optional(),
|
|
1122
|
-
create: createConfigSchema.optional(),
|
|
1123
|
-
mcp: mcpConfigSchema.optional(),
|
|
1124
|
-
wordpress: wordpressCompatibilityConfigSchema.optional()
|
|
1125
|
-
}).strict();
|
|
1126
|
-
function formatIssuePath(issuePath) {
|
|
1127
|
-
if (issuePath.length === 0) {
|
|
1128
|
-
return "config";
|
|
1129
|
-
}
|
|
1130
|
-
return issuePath.map((segment) => typeof segment === "number" ? `[${segment}]` : `.${String(segment)}`).join("").replace(/^\./u, "");
|
|
1131
|
-
}
|
|
1132
|
-
function formatConfigValidationIssue(issue) {
|
|
1133
|
-
const pathLabel = formatIssuePath(issue.path);
|
|
1134
|
-
if (issue.code === "unrecognized_keys") {
|
|
1135
|
-
const keys = issue.keys.map((key) => `"${String(key)}"`).join(", ");
|
|
1136
|
-
const label = issue.keys.length === 1 ? "unknown key" : "unknown keys";
|
|
1137
|
-
return `${pathLabel}: ${label} ${keys}. Unknown keys are errors in wp-typia config.`;
|
|
1138
|
-
}
|
|
1139
|
-
return `${pathLabel}: ${issue.message}`;
|
|
1140
|
-
}
|
|
1141
|
-
function validateWpTypiaUserConfig(value, source) {
|
|
1142
|
-
const result = wpTypiaUserConfigSchema.safeParse(value);
|
|
1143
|
-
if (result.success) {
|
|
1144
|
-
return result.data;
|
|
1145
|
-
}
|
|
1146
|
-
const issueLines = result.error.issues.map(formatConfigValidationIssue);
|
|
1147
|
-
throw createCliDiagnosticCodeError(CLI_DIAGNOSTIC_CODES.INVALID_ARGUMENT, [
|
|
1148
|
-
`Invalid wp-typia config at ${source}.`,
|
|
1149
|
-
...issueLines.map((line) => `- ${line}`)
|
|
1150
|
-
].join(`
|
|
1151
|
-
`));
|
|
1152
|
-
}
|
|
1153
|
-
function deepMerge(base, incoming) {
|
|
1154
|
-
const merged = { ...base };
|
|
1155
|
-
for (const [key, value] of Object.entries(incoming)) {
|
|
1156
|
-
if (Array.isArray(value)) {
|
|
1157
|
-
merged[key] = value.slice();
|
|
1158
|
-
continue;
|
|
1159
|
-
}
|
|
1160
|
-
if (isRecord(value) && isRecord(merged[key])) {
|
|
1161
|
-
merged[key] = deepMerge(merged[key], value);
|
|
1162
|
-
continue;
|
|
1163
|
-
}
|
|
1164
|
-
merged[key] = value;
|
|
1165
|
-
}
|
|
1166
|
-
return merged;
|
|
1167
|
-
}
|
|
1168
|
-
async function readJsonFile(filePath) {
|
|
1169
|
-
let source;
|
|
1170
|
-
try {
|
|
1171
|
-
source = await fs.readFile(filePath, "utf8");
|
|
1172
|
-
} catch (error) {
|
|
1173
|
-
if (typeof error === "object" && error !== null && "code" in error && error.code === "ENOENT") {
|
|
1174
|
-
return;
|
|
1175
|
-
}
|
|
1176
|
-
throw error;
|
|
1177
|
-
}
|
|
1178
|
-
try {
|
|
1179
|
-
return JSON.parse(source);
|
|
1180
|
-
} catch (error) {
|
|
1181
|
-
const message = error instanceof Error ? error.message : String(error);
|
|
1182
|
-
throw createCliDiagnosticCodeError(CLI_DIAGNOSTIC_CODES.INVALID_ARGUMENT, `Unable to parse ${filePath}: ${message}`, error instanceof Error ? { cause: error } : undefined);
|
|
1183
|
-
}
|
|
1184
|
-
}
|
|
1185
|
-
async function readWpTypiaConfigFile(filePath) {
|
|
1186
|
-
const parsed = await readJsonFile(filePath);
|
|
1187
|
-
return parsed === undefined ? null : validateWpTypiaUserConfig(parsed, filePath);
|
|
1188
|
-
}
|
|
1189
|
-
function resolveConfigPath(cwd, source) {
|
|
1190
|
-
if (source.startsWith("~/")) {
|
|
1191
|
-
return path.join(os.homedir(), source.slice(2));
|
|
1192
|
-
}
|
|
1193
|
-
return path.resolve(cwd, source);
|
|
1194
|
-
}
|
|
1195
|
-
function mergeWpTypiaUserConfig(base, incoming) {
|
|
1196
|
-
return deepMerge(base, incoming);
|
|
1197
|
-
}
|
|
1198
|
-
async function loadWpTypiaUserConfigFromSource(cwd, source) {
|
|
1199
|
-
const config = await readWpTypiaConfigFile(resolveConfigPath(cwd, source));
|
|
1200
|
-
return config ?? {};
|
|
1201
|
-
}
|
|
1202
|
-
async function loadWpTypiaUserConfig(cwd) {
|
|
1203
|
-
let merged = {};
|
|
1204
|
-
for (const source of WP_TYPIA_CONFIG_SOURCES) {
|
|
1205
|
-
const configPath = resolveConfigPath(cwd, source);
|
|
1206
|
-
const config = await readWpTypiaConfigFile(configPath);
|
|
1207
|
-
if (config) {
|
|
1208
|
-
merged = deepMerge(merged, config);
|
|
1209
|
-
}
|
|
1210
|
-
}
|
|
1211
|
-
const packageJsonPath = path.join(cwd, "package.json");
|
|
1212
|
-
const packageJson = await readJsonFile(packageJsonPath);
|
|
1213
|
-
if (isRecord(packageJson) && "wp-typia" in packageJson) {
|
|
1214
|
-
const packageConfig = validateWpTypiaUserConfig(packageJson["wp-typia"], `${packageJsonPath}#wp-typia`);
|
|
1215
|
-
merged = deepMerge(merged, packageConfig);
|
|
1216
|
-
}
|
|
1217
|
-
return merged;
|
|
1218
|
-
}
|
|
1219
|
-
function getCreateDefaults(config) {
|
|
1220
|
-
return config.create ?? {};
|
|
1221
|
-
}
|
|
1222
|
-
function getAddBlockDefaults(config) {
|
|
1223
|
-
return config.add?.block ?? {};
|
|
1224
|
-
}
|
|
1225
|
-
function getMcpSchemaSources(config) {
|
|
1226
|
-
return config.mcp?.schemaSources ?? [];
|
|
1227
|
-
}
|
|
1228
|
-
|
|
1229
|
-
// ../../node_modules/.bun/@bunli+core@0.9.0+44deef6f8e4a2f18/node_modules/@bunli/core/src/plugin/create.ts
|
|
1230
|
-
function createPlugin(input) {
|
|
1231
|
-
return input;
|
|
1232
|
-
}
|
|
1233
|
-
export { createPlugin, package_default, collectPositionalIndexes, findFirstPositionalIndex, ADD_OPTION_METADATA, CREATE_OPTION_METADATA, DOCTOR_OPTION_METADATA, GLOBAL_OPTION_METADATA, INIT_OPTION_METADATA, MCP_OPTION_METADATA, MIGRATE_OPTION_METADATA, SYNC_OPTION_METADATA, TEMPLATES_OPTION_METADATA, COMMAND_OPTION_METADATA_BY_GROUP, ALL_COMMAND_OPTION_METADATA, buildCommandOptions, collectOptionNamesByType, buildCommandOptionParser, COMMAND_ROUTING_METADATA, createMissingOptionValueError, extractKnownOptionValuesFromArgv, resolveCommandOptionValues, normalizeCliOutputFormatArgv, validateCliOutputFormatArgv, prefersStructuredCliOutput, emitCliDiagnosticFailure, writeStructuredCliDiagnosticError, formatAddKindList, formatAddKindUsagePlaceholder, WP_TYPIA_CANONICAL_CREATE_USAGE, WP_TYPIA_RESERVED_TOP_LEVEL_COMMAND_NAMES, WP_TYPIA_TOP_LEVEL_COMMAND_NAMES, WP_TYPIA_COMMAND_OPTION_GROUP_NAMES_BY_TOP_LEVEL_COMMAND, WP_TYPIA_CONFIG_SOURCES, mergeWpTypiaUserConfig, loadWpTypiaUserConfigFromSource, loadWpTypiaUserConfig, getCreateDefaults, getAddBlockDefaults, getMcpSchemaSources };
|
|
1234
|
-
|
|
1235
|
-
//# debugId=213462D0D4B1919364756E2164756E21
|