wp-typia 0.22.9 → 0.23.0
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 +5 -0
- package/bin/routing-metadata.generated.js +16 -0
- package/dist-bunli/.bunli/commands.gen.js +7312 -3829
- package/dist-bunli/{cli-2pnk64h0.js → cli-1meywwsy.js} +148 -124
- package/dist-bunli/{cli-fys8vm2t.js → cli-43mx1vfb.js} +4 -1
- package/dist-bunli/{cli-ag722tzm.js → cli-9npd9was.js} +9 -5
- package/dist-bunli/{cli-add-6dn9h94t.js → cli-add-21bvpfgw.js} +4591 -2319
- package/dist-bunli/{cli-arz4rcye.js → cli-agywa5n6.js} +6 -6
- package/dist-bunli/{cli-xw1wbxf3.js → cli-c2acv5dv.js} +1 -1
- package/dist-bunli/{cli-doctor-564c43ay.js → cli-doctor-wy2yjsge.js} +245 -146
- package/dist-bunli/{cli-init-znhqp8tr.js → cli-init-xnsbxncv.js} +16 -6
- package/dist-bunli/{cli-rwjkqjhs.js → cli-j8et6jvr.js} +37 -2
- package/dist-bunli/{cli-scaffold-6trxyyk6.js → cli-scaffold-zhp2ym8z.js} +9 -9
- package/dist-bunli/{cli-regw5384.js → cli-ts9thts5.js} +1568 -1035
- package/dist-bunli/{cli-y934dq2k.js → cli-z5qkx2pn.js} +197 -100
- package/dist-bunli/cli.js +3 -3
- package/dist-bunli/{command-list-g3qhb3y4.js → command-list-aqrkx021.js} +881 -505
- package/dist-bunli/{migrations-qc1r0yqe.js → migrations-bx0yvc2v.js} +4 -4
- package/dist-bunli/node-cli.js +1173 -693
- package/package.json +2 -2
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
} from "./cli-hv2yedw2.js";
|
|
5
5
|
import {
|
|
6
6
|
ADD_KIND_IDS
|
|
7
|
-
} from "./cli-
|
|
7
|
+
} from "./cli-43mx1vfb.js";
|
|
8
8
|
import {
|
|
9
9
|
CLI_DIAGNOSTIC_CODES,
|
|
10
10
|
createCliCommandError,
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
// package.json
|
|
15
15
|
var package_default = {
|
|
16
16
|
name: "wp-typia",
|
|
17
|
-
version: "0.
|
|
17
|
+
version: "0.23.0",
|
|
18
18
|
description: "Canonical CLI package for wp-typia scaffolding and project workflows",
|
|
19
19
|
packageManager: "bun@1.3.11",
|
|
20
20
|
type: "module",
|
|
@@ -84,7 +84,7 @@ var package_default = {
|
|
|
84
84
|
"@bunli/tui": "0.6.0",
|
|
85
85
|
"@bunli/utils": "0.6.0",
|
|
86
86
|
"@wp-typia/api-client": "^0.4.5",
|
|
87
|
-
"@wp-typia/project-tools": "0.
|
|
87
|
+
"@wp-typia/project-tools": "0.23.0",
|
|
88
88
|
"better-result": "^2.7.0",
|
|
89
89
|
react: "^19.2.5",
|
|
90
90
|
"react-dom": "^19.2.5",
|
|
@@ -151,7 +151,162 @@ function findFirstPositional(argv, metadata) {
|
|
|
151
151
|
return firstPositionalIndex === -1 ? undefined : argv[firstPositionalIndex];
|
|
152
152
|
}
|
|
153
153
|
|
|
154
|
-
// src/command-
|
|
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 for variation, style, and end-to-end binding-source workflows.",
|
|
174
|
+
type: "string"
|
|
175
|
+
},
|
|
176
|
+
"controller-class": {
|
|
177
|
+
description: "Generated REST resource controller class used for route callbacks.",
|
|
178
|
+
type: "string"
|
|
179
|
+
},
|
|
180
|
+
"controller-extends": {
|
|
181
|
+
description: "Optional base class for generated REST resource controller wrappers.",
|
|
182
|
+
type: "string"
|
|
183
|
+
},
|
|
184
|
+
"data-storage": {
|
|
185
|
+
description: "Persistence storage mode for persistence-capable templates.",
|
|
186
|
+
type: "string"
|
|
187
|
+
},
|
|
188
|
+
"dry-run": {
|
|
189
|
+
argumentKind: "flag",
|
|
190
|
+
description: "Preview workspace file updates and completion guidance without writing them.",
|
|
191
|
+
type: "boolean"
|
|
192
|
+
},
|
|
193
|
+
"external-layer-id": {
|
|
194
|
+
description: "Explicit layer id when an external layer package exposes multiple selectable layers.",
|
|
195
|
+
type: "string"
|
|
196
|
+
},
|
|
197
|
+
"external-layer-source": {
|
|
198
|
+
description: "Local path, GitHub locator, or npm package that exposes wp-typia.layers.json for built-in block templates.",
|
|
199
|
+
type: "string"
|
|
200
|
+
},
|
|
201
|
+
from: {
|
|
202
|
+
description: "Source full block name (namespace/block) for transform workflows.",
|
|
203
|
+
type: "string"
|
|
204
|
+
},
|
|
205
|
+
"inner-blocks-preset": {
|
|
206
|
+
description: "Compound-only InnerBlocks preset (freeform, ordered, horizontal, locked-structure).",
|
|
207
|
+
type: "string"
|
|
208
|
+
},
|
|
209
|
+
manual: {
|
|
210
|
+
argumentKind: "flag",
|
|
211
|
+
description: "Create a type-only manual REST contract without PHP route/controller files.",
|
|
212
|
+
type: "boolean"
|
|
213
|
+
},
|
|
214
|
+
"hide-from-rest": {
|
|
215
|
+
argumentKind: "flag",
|
|
216
|
+
description: "Keep a generated post-meta contract out of WordPress REST/editor responses.",
|
|
217
|
+
type: "boolean"
|
|
218
|
+
},
|
|
219
|
+
"meta-key": {
|
|
220
|
+
description: "WordPress meta key for post-meta workflows; defaults to _<phpPrefix>_<name>.",
|
|
221
|
+
type: "string"
|
|
222
|
+
},
|
|
223
|
+
method: {
|
|
224
|
+
description: "HTTP method for manual REST contract workflows (GET, POST, PUT, PATCH, or DELETE).",
|
|
225
|
+
type: "string"
|
|
226
|
+
},
|
|
227
|
+
methods: {
|
|
228
|
+
description: "Comma-separated REST resource methods for rest-resource workflows.",
|
|
229
|
+
type: "string"
|
|
230
|
+
},
|
|
231
|
+
namespace: {
|
|
232
|
+
description: "REST namespace for rest-resource and ai-feature workflows.",
|
|
233
|
+
type: "string"
|
|
234
|
+
},
|
|
235
|
+
"permission-callback": {
|
|
236
|
+
description: "PHP permission callback for generated REST resource route registrations.",
|
|
237
|
+
type: "string"
|
|
238
|
+
},
|
|
239
|
+
"post-type": {
|
|
240
|
+
description: "WordPress post type key for post-meta workflows.",
|
|
241
|
+
type: "string"
|
|
242
|
+
},
|
|
243
|
+
"persistence-policy": {
|
|
244
|
+
description: "Persistence write policy for persistence-capable templates.",
|
|
245
|
+
type: "string"
|
|
246
|
+
},
|
|
247
|
+
path: {
|
|
248
|
+
description: "Route path pattern for manual REST contract workflows, relative to the REST namespace.",
|
|
249
|
+
type: "string"
|
|
250
|
+
},
|
|
251
|
+
position: {
|
|
252
|
+
description: "Hook position for hooked-block workflows.",
|
|
253
|
+
type: "string"
|
|
254
|
+
},
|
|
255
|
+
"query-type": {
|
|
256
|
+
description: "Exported TypeScript query type for manual REST contract workflows.",
|
|
257
|
+
type: "string"
|
|
258
|
+
},
|
|
259
|
+
"response-type": {
|
|
260
|
+
description: "Exported TypeScript response type for manual REST contract workflows.",
|
|
261
|
+
type: "string"
|
|
262
|
+
},
|
|
263
|
+
"route-pattern": {
|
|
264
|
+
description: "Generated REST resource item route pattern relative to the REST namespace.",
|
|
265
|
+
type: "string"
|
|
266
|
+
},
|
|
267
|
+
"secret-field": {
|
|
268
|
+
description: "Write-only request body field for manual settings REST contracts.",
|
|
269
|
+
type: "string"
|
|
270
|
+
},
|
|
271
|
+
"secret-state-field": {
|
|
272
|
+
description: "Masked response boolean field for --secret-field; defaults to has<SecretField>.",
|
|
273
|
+
type: "string"
|
|
274
|
+
},
|
|
275
|
+
service: {
|
|
276
|
+
description: "Optional local service starter for integration-env workflows (none or docker-compose).",
|
|
277
|
+
type: "string"
|
|
278
|
+
},
|
|
279
|
+
slot: {
|
|
280
|
+
description: "Document editor shell slot for editor-plugin workflows (sidebar or document-setting-panel).",
|
|
281
|
+
type: "string"
|
|
282
|
+
},
|
|
283
|
+
source: {
|
|
284
|
+
description: "Optional data source locator for admin-view workflows, such as rest-resource:products or core-data:postType/post.",
|
|
285
|
+
type: "string"
|
|
286
|
+
},
|
|
287
|
+
template: {
|
|
288
|
+
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.",
|
|
289
|
+
type: "string"
|
|
290
|
+
},
|
|
291
|
+
type: {
|
|
292
|
+
description: "Exported TypeScript type or interface name for standalone contract workflows.",
|
|
293
|
+
type: "string"
|
|
294
|
+
},
|
|
295
|
+
"body-type": {
|
|
296
|
+
description: "Exported TypeScript body type for manual REST contract workflows.",
|
|
297
|
+
type: "string"
|
|
298
|
+
},
|
|
299
|
+
to: {
|
|
300
|
+
description: "Target workspace block slug or full block name for transform workflows.",
|
|
301
|
+
type: "string"
|
|
302
|
+
},
|
|
303
|
+
"wp-env": {
|
|
304
|
+
argumentKind: "flag",
|
|
305
|
+
description: "Add a local @wordpress/env preset for integration-env workflows.",
|
|
306
|
+
type: "boolean"
|
|
307
|
+
}
|
|
308
|
+
};
|
|
309
|
+
// src/command-options/create.ts
|
|
155
310
|
var CREATE_OPTION_METADATA = {
|
|
156
311
|
"alternate-render-targets": {
|
|
157
312
|
description: "Comma-separated alternate render targets for dynamic block scaffolds (email,mjml,plain-text).",
|
|
@@ -239,81 +394,30 @@ var CREATE_OPTION_METADATA = {
|
|
|
239
394
|
type: "boolean"
|
|
240
395
|
}
|
|
241
396
|
};
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
},
|
|
247
|
-
anchor: {
|
|
248
|
-
description: "Anchor block name for hooked-block workflows.",
|
|
249
|
-
type: "string"
|
|
250
|
-
},
|
|
251
|
-
attribute: {
|
|
252
|
-
description: "Target block attribute for end-to-end binding-source workflows.",
|
|
253
|
-
type: "string"
|
|
254
|
-
},
|
|
255
|
-
block: {
|
|
256
|
-
description: "Target block slug for variation, style, and end-to-end binding-source workflows.",
|
|
257
|
-
type: "string"
|
|
258
|
-
},
|
|
259
|
-
"data-storage": {
|
|
260
|
-
description: "Persistence storage mode for persistence-capable templates.",
|
|
261
|
-
type: "string"
|
|
262
|
-
},
|
|
263
|
-
"dry-run": {
|
|
264
|
-
argumentKind: "flag",
|
|
265
|
-
description: "Preview workspace file updates and completion guidance without writing them.",
|
|
266
|
-
type: "boolean"
|
|
267
|
-
},
|
|
268
|
-
"external-layer-id": {
|
|
269
|
-
description: "Explicit layer id when an external layer package exposes multiple selectable layers.",
|
|
270
|
-
type: "string"
|
|
271
|
-
},
|
|
272
|
-
"external-layer-source": {
|
|
273
|
-
description: "Local path, GitHub locator, or npm package that exposes wp-typia.layers.json for built-in block templates.",
|
|
274
|
-
type: "string"
|
|
275
|
-
},
|
|
276
|
-
from: {
|
|
277
|
-
description: "Source full block name (namespace/block) for transform workflows.",
|
|
278
|
-
type: "string"
|
|
279
|
-
},
|
|
280
|
-
"inner-blocks-preset": {
|
|
281
|
-
description: "Compound-only InnerBlocks preset (freeform, ordered, horizontal, locked-structure).",
|
|
282
|
-
type: "string"
|
|
283
|
-
},
|
|
284
|
-
methods: {
|
|
285
|
-
description: "Comma-separated REST resource methods for rest-resource workflows.",
|
|
286
|
-
type: "string"
|
|
287
|
-
},
|
|
288
|
-
namespace: {
|
|
289
|
-
description: "REST namespace for rest-resource and ai-feature workflows.",
|
|
290
|
-
type: "string"
|
|
291
|
-
},
|
|
292
|
-
"persistence-policy": {
|
|
293
|
-
description: "Persistence write policy for persistence-capable templates.",
|
|
294
|
-
type: "string"
|
|
295
|
-
},
|
|
296
|
-
position: {
|
|
297
|
-
description: "Hook position for hooked-block workflows.",
|
|
298
|
-
type: "string"
|
|
299
|
-
},
|
|
300
|
-
slot: {
|
|
301
|
-
description: "Document editor shell slot for editor-plugin workflows (sidebar or document-setting-panel).",
|
|
397
|
+
// src/command-options/doctor.ts
|
|
398
|
+
var DOCTOR_OPTION_METADATA = {
|
|
399
|
+
format: {
|
|
400
|
+
description: "Use `json` for machine-readable doctor check output or `text` for human-readable output.",
|
|
302
401
|
type: "string"
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
|
|
402
|
+
}
|
|
403
|
+
};
|
|
404
|
+
// src/command-options/global.ts
|
|
405
|
+
var GLOBAL_OPTION_METADATA = {
|
|
406
|
+
config: {
|
|
407
|
+
description: "Config override file path.",
|
|
408
|
+
short: "c",
|
|
306
409
|
type: "string"
|
|
307
410
|
},
|
|
308
|
-
|
|
309
|
-
description: "
|
|
411
|
+
format: {
|
|
412
|
+
description: "Output format for supported commands (`json` or `text`).",
|
|
310
413
|
type: "string"
|
|
311
414
|
},
|
|
312
|
-
|
|
313
|
-
description: "
|
|
415
|
+
id: {
|
|
416
|
+
description: "Template id for top-level `templates inspect` convenience.",
|
|
314
417
|
type: "string"
|
|
315
418
|
}
|
|
316
419
|
};
|
|
420
|
+
// src/command-options/init.ts
|
|
317
421
|
var INIT_OPTION_METADATA = {
|
|
318
422
|
apply: {
|
|
319
423
|
argumentKind: "flag",
|
|
@@ -326,6 +430,14 @@ var INIT_OPTION_METADATA = {
|
|
|
326
430
|
type: "string"
|
|
327
431
|
}
|
|
328
432
|
};
|
|
433
|
+
// src/command-options/mcp.ts
|
|
434
|
+
var MCP_OPTION_METADATA = {
|
|
435
|
+
"output-dir": {
|
|
436
|
+
description: "Output directory for generated MCP metadata.",
|
|
437
|
+
type: "string"
|
|
438
|
+
}
|
|
439
|
+
};
|
|
440
|
+
// src/command-options/migrate.ts
|
|
329
441
|
var MIGRATE_OPTION_METADATA = {
|
|
330
442
|
all: {
|
|
331
443
|
argumentKind: "flag",
|
|
@@ -362,12 +474,7 @@ var MIGRATE_OPTION_METADATA = {
|
|
|
362
474
|
type: "string"
|
|
363
475
|
}
|
|
364
476
|
};
|
|
365
|
-
|
|
366
|
-
"output-dir": {
|
|
367
|
-
description: "Output directory for generated MCP metadata.",
|
|
368
|
-
type: "string"
|
|
369
|
-
}
|
|
370
|
-
};
|
|
477
|
+
// src/command-options/sync.ts
|
|
371
478
|
var SYNC_OPTION_METADATA = {
|
|
372
479
|
check: {
|
|
373
480
|
argumentKind: "flag",
|
|
@@ -380,33 +487,14 @@ var SYNC_OPTION_METADATA = {
|
|
|
380
487
|
type: "boolean"
|
|
381
488
|
}
|
|
382
489
|
};
|
|
383
|
-
|
|
384
|
-
format: {
|
|
385
|
-
description: "Use `json` for machine-readable doctor check output or `text` for human-readable output.",
|
|
386
|
-
type: "string"
|
|
387
|
-
}
|
|
388
|
-
};
|
|
490
|
+
// src/command-options/templates.ts
|
|
389
491
|
var TEMPLATES_OPTION_METADATA = {
|
|
390
492
|
id: {
|
|
391
493
|
description: "Template id for `templates inspect`.",
|
|
392
494
|
type: "string"
|
|
393
495
|
}
|
|
394
496
|
};
|
|
395
|
-
|
|
396
|
-
config: {
|
|
397
|
-
description: "Config override file path.",
|
|
398
|
-
short: "c",
|
|
399
|
-
type: "string"
|
|
400
|
-
},
|
|
401
|
-
format: {
|
|
402
|
-
description: "Output format for supported commands (`json` or `text`).",
|
|
403
|
-
type: "string"
|
|
404
|
-
},
|
|
405
|
-
id: {
|
|
406
|
-
description: "Template id for top-level `templates inspect` convenience.",
|
|
407
|
-
type: "string"
|
|
408
|
-
}
|
|
409
|
-
};
|
|
497
|
+
// src/command-option-metadata.ts
|
|
410
498
|
var COMMAND_OPTION_METADATA_BY_GROUP = {
|
|
411
499
|
add: ADD_OPTION_METADATA,
|
|
412
500
|
create: CREATE_OPTION_METADATA,
|
|
@@ -704,6 +792,15 @@ function writeStructuredCliDiagnosticError(argv, error) {
|
|
|
704
792
|
process.exitCode = 1;
|
|
705
793
|
return true;
|
|
706
794
|
}
|
|
795
|
+
|
|
796
|
+
// src/add-kind-ids.ts
|
|
797
|
+
function formatAddKindList() {
|
|
798
|
+
return ADD_KIND_IDS.join(", ");
|
|
799
|
+
}
|
|
800
|
+
function formatAddKindUsagePlaceholder() {
|
|
801
|
+
return `<${ADD_KIND_IDS.join("|")}>`;
|
|
802
|
+
}
|
|
803
|
+
|
|
707
804
|
// src/command-registry.ts
|
|
708
805
|
var WP_TYPIA_CANONICAL_CREATE_USAGE = "wp-typia create <project-dir>";
|
|
709
806
|
var WP_TYPIA_COMMAND_REGISTRY = [
|
|
@@ -1004,6 +1101,6 @@ function getMcpSchemaSources(config) {
|
|
|
1004
1101
|
function createPlugin(input) {
|
|
1005
1102
|
return input;
|
|
1006
1103
|
}
|
|
1007
|
-
export { createPlugin, package_default, collectPositionalIndexes, findFirstPositionalIndex, CREATE_OPTION_METADATA,
|
|
1104
|
+
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 };
|
|
1008
1105
|
|
|
1009
|
-
//# debugId=
|
|
1106
|
+
//# debugId=7C44F3F606B3311C64756E2164756E21
|
package/dist-bunli/cli.js
CHANGED
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
package_default,
|
|
23
23
|
validateCliOutputFormatArgv,
|
|
24
24
|
writeStructuredCliDiagnosticError
|
|
25
|
-
} from "./cli-
|
|
25
|
+
} from "./cli-z5qkx2pn.js";
|
|
26
26
|
import"./cli-03j0axbt.js";
|
|
27
27
|
import {
|
|
28
28
|
GLOBAL_FLAGS,
|
|
@@ -37,7 +37,7 @@ import {
|
|
|
37
37
|
} from "./cli-hv2yedw2.js";
|
|
38
38
|
import"./cli-ac2ebaf8.js";
|
|
39
39
|
import"./cli-6v0pcxw6.js";
|
|
40
|
-
import"./cli-
|
|
40
|
+
import"./cli-43mx1vfb.js";
|
|
41
41
|
import {
|
|
42
42
|
CLI_DIAGNOSTIC_CODES,
|
|
43
43
|
createCliDiagnosticCodeError
|
|
@@ -2460,7 +2460,7 @@ async function formatCliError(error) {
|
|
|
2460
2460
|
}
|
|
2461
2461
|
async function createWpTypiaCli(options = {}) {
|
|
2462
2462
|
applyStandaloneSupportLayoutEnv();
|
|
2463
|
-
const { wpTypiaCommands } = await import("./command-list-
|
|
2463
|
+
const { wpTypiaCommands } = await import("./command-list-aqrkx021.js");
|
|
2464
2464
|
const cli = await createCLI({
|
|
2465
2465
|
...bunliConfig,
|
|
2466
2466
|
description: package_default.description,
|