wp-typia 0.23.0 → 0.24.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.
Files changed (34) hide show
  1. package/README.md +3 -1
  2. package/bin/routing-metadata.generated.js +11 -0
  3. package/dist-bunli/.bunli/commands.gen.js +11884 -9017
  4. package/dist-bunli/{cli-9npd9was.js → cli-0v407aag.js} +12 -10
  5. package/dist-bunli/{cli-hhp1d348.js → cli-1170yyve.js} +8 -7
  6. package/dist-bunli/{cli-1meywwsy.js → cli-74y6z3yx.js} +1455 -819
  7. package/dist-bunli/{cli-qse6myha.js → cli-8hxf9qw6.js} +11 -3
  8. package/dist-bunli/{cli-8reep89s.js → cli-9fx0qgb7.js} +2 -2
  9. package/dist-bunli/{cli-add-21bvpfgw.js → cli-add-nmdraf20.js} +8542 -7667
  10. package/dist-bunli/{cli-52ke0ptp.js → cli-am5x7tb4.js} +8 -2
  11. package/dist-bunli/{cli-43mx1vfb.js → cli-bajwv85z.js} +2 -1
  12. package/dist-bunli/cli-ccax7s0s.js +34 -0
  13. package/dist-bunli/{cli-z5qkx2pn.js → cli-cwjdzq6n.js} +79 -13
  14. package/dist-bunli/{cli-diagnostics-5dvztm7q.js → cli-diagnostics-10drxh34.js} +1 -1
  15. package/dist-bunli/{cli-doctor-wy2yjsge.js → cli-doctor-pcss6ecx.js} +688 -459
  16. package/dist-bunli/{cli-2rqf6t0b.js → cli-e4bwd81c.js} +8 -11
  17. package/dist-bunli/{cli-init-xnsbxncv.js → cli-init-he7vm7kc.js} +15 -11
  18. package/dist-bunli/{cli-prompt-614tq57c.js → cli-prompt-ncyg68rn.js} +1 -1
  19. package/dist-bunli/{cli-bq2v559b.js → cli-rdcga1bd.js} +31 -13
  20. package/dist-bunli/{cli-scaffold-zhp2ym8z.js → cli-scaffold-an2k0fnm.js} +28 -16
  21. package/dist-bunli/{cli-c2acv5dv.js → cli-sw06c521.js} +2 -2
  22. package/dist-bunli/{cli-templates-hc71dfc2.js → cli-templates-g8t4fm11.js} +3 -2
  23. package/dist-bunli/{cli-p95wr1q8.js → cli-tq730sqt.js} +6 -3
  24. package/dist-bunli/{cli-ts9thts5.js → cli-v0nnagb3.js} +1513 -1053
  25. package/dist-bunli/{cli-agywa5n6.js → cli-y0a8nztv.js} +15 -6
  26. package/dist-bunli/cli-z48frc8t.js +229 -0
  27. package/dist-bunli/cli.js +5 -5
  28. package/dist-bunli/{command-list-aqrkx021.js → command-list-xaw5agks.js} +241 -64
  29. package/dist-bunli/{create-template-validation-rtec5sng.js → create-template-validation-4fr851vg.js} +5 -4
  30. package/dist-bunli/{migrations-bx0yvc2v.js → migrations-z7f4kxba.js} +10 -9
  31. package/dist-bunli/node-cli.js +661 -389
  32. package/dist-bunli/{workspace-project-csnnggz6.js → workspace-project-gmv2a71z.js} +4 -3
  33. package/package.json +2 -2
  34. package/dist-bunli/cli-j8et6jvr.js +0 -123
@@ -1,4 +1,8 @@
1
1
  // @bun
2
+ import {
3
+ readJsonFileSync
4
+ } from "./cli-ccax7s0s.js";
5
+
2
6
  // ../wp-typia-project-tools/src/runtime/package-managers.ts
3
7
  import fs from "fs";
4
8
  import path from "path";
@@ -68,7 +72,9 @@ function readPackageManagerField(projectDir) {
68
72
  if (!fs.existsSync(packageJsonPath)) {
69
73
  return;
70
74
  }
71
- const manifest = JSON.parse(fs.readFileSync(packageJsonPath, "utf8"));
75
+ const manifest = readJsonFileSync(packageJsonPath, {
76
+ context: "package manager manifest"
77
+ });
72
78
  return typeof manifest.packageManager === "string" ? manifest.packageManager : undefined;
73
79
  } catch {
74
80
  return;
@@ -183,4 +189,4 @@ function transformPackageManagerText(content, packageManagerId) {
183
189
 
184
190
  export { PACKAGE_MANAGER_IDS, getPackageManager, parsePackageManagerField, inferPackageManagerId, formatRunScript, formatInstallCommand, formatAddDevDependenciesCommand, formatPackageExecCommand, transformPackageManagerText };
185
191
 
186
- //# debugId=0DCB52DE9DB6EE9D64756E2164756E21
192
+ //# debugId=3287AD727A1EC20664756E2164756E21
@@ -4,6 +4,7 @@ var ADD_KIND_IDS = [
4
4
  "admin-view",
5
5
  "block",
6
6
  "integration-env",
7
+ "core-variation",
7
8
  "variation",
8
9
  "style",
9
10
  "transform",
@@ -20,4 +21,4 @@ var ADD_KIND_IDS = [
20
21
 
21
22
  export { ADD_KIND_IDS };
22
23
 
23
- //# debugId=C480D575E839E69A64756E2164756E21
24
+ //# debugId=39A9377B00AF01BA64756E2164756E21
@@ -0,0 +1,34 @@
1
+ // @bun
2
+ // ../wp-typia-project-tools/src/runtime/json-utils.ts
3
+ import fs from "fs";
4
+ import { promises as fsp } from "fs";
5
+ function cloneJsonValue(value) {
6
+ return JSON.parse(JSON.stringify(value));
7
+ }
8
+ function formatJsonParseTarget({ context, filePath }) {
9
+ const operation = context?.trim() || "JSON";
10
+ return filePath ? `${operation} at ${filePath}` : operation;
11
+ }
12
+ function safeJsonParse(source, options = {}) {
13
+ try {
14
+ return JSON.parse(source);
15
+ } catch (error) {
16
+ throw new Error(`Failed to parse ${formatJsonParseTarget(options)}: ${error instanceof Error ? error.message : String(error)}`);
17
+ }
18
+ }
19
+ function readJsonFileSync(filePath, options = {}) {
20
+ return safeJsonParse(fs.readFileSync(filePath, "utf8"), {
21
+ ...options,
22
+ filePath
23
+ });
24
+ }
25
+ async function readJsonFile(filePath, options = {}) {
26
+ return safeJsonParse(await fsp.readFile(filePath, "utf8"), {
27
+ ...options,
28
+ filePath
29
+ });
30
+ }
31
+
32
+ export { cloneJsonValue, safeJsonParse, readJsonFileSync, readJsonFile };
33
+
34
+ //# debugId=4CC2BF13AF5DC85A64756E2164756E21
@@ -4,17 +4,17 @@ import {
4
4
  } from "./cli-hv2yedw2.js";
5
5
  import {
6
6
  ADD_KIND_IDS
7
- } from "./cli-43mx1vfb.js";
7
+ } from "./cli-bajwv85z.js";
8
8
  import {
9
9
  CLI_DIAGNOSTIC_CODES,
10
10
  createCliCommandError,
11
11
  createCliDiagnosticCodeError,
12
12
  serializeCliDiagnosticError
13
- } from "./cli-p95wr1q8.js";
13
+ } from "./cli-tq730sqt.js";
14
14
  // package.json
15
15
  var package_default = {
16
16
  name: "wp-typia",
17
- version: "0.23.0",
17
+ version: "0.24.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.23.0",
87
+ "@wp-typia/project-tools": "0.24.0",
88
88
  "better-result": "^2.7.0",
89
89
  react: "^19.2.5",
90
90
  "react-dom": "^19.2.5",
@@ -170,15 +170,15 @@ var ADD_OPTION_METADATA = {
170
170
  type: "string"
171
171
  },
172
172
  block: {
173
- description: "Target block slug for variation, style, and end-to-end binding-source workflows.",
173
+ description: "Target block slug/name for variation, core-variation, style, and end-to-end binding-source workflows.",
174
174
  type: "string"
175
175
  },
176
176
  "controller-class": {
177
- description: "Generated REST resource controller class used for route callbacks.",
177
+ description: "REST resource controller class used for generated route callbacks or declared manual/provider route ownership.",
178
178
  type: "string"
179
179
  },
180
180
  "controller-extends": {
181
- description: "Optional base class for generated REST resource controller wrappers.",
181
+ description: "Optional base class for generated REST resource controller wrappers or declared manual/provider controller ownership.",
182
182
  type: "string"
183
183
  },
184
184
  "data-storage": {
@@ -202,6 +202,10 @@ var ADD_OPTION_METADATA = {
202
202
  description: "Source full block name (namespace/block) for transform workflows.",
203
203
  type: "string"
204
204
  },
205
+ "from-post-meta": {
206
+ description: "Alias for --post-meta when backing a binding-source scaffold from a typed post-meta contract.",
207
+ type: "string"
208
+ },
205
209
  "inner-blocks-preset": {
206
210
  description: "Compound-only InnerBlocks preset (freeform, ordered, horizontal, locked-structure).",
207
211
  type: "string"
@@ -220,6 +224,10 @@ var ADD_OPTION_METADATA = {
220
224
  description: "WordPress meta key for post-meta workflows; defaults to _<phpPrefix>_<name>.",
221
225
  type: "string"
222
226
  },
227
+ "meta-path": {
228
+ description: "Top-level post-meta field used as the default binding-source field when --post-meta or --from-post-meta is provided.",
229
+ type: "string"
230
+ },
223
231
  method: {
224
232
  description: "HTTP method for manual REST contract workflows (GET, POST, PUT, PATCH, or DELETE).",
225
233
  type: "string"
@@ -233,13 +241,17 @@ var ADD_OPTION_METADATA = {
233
241
  type: "string"
234
242
  },
235
243
  "permission-callback": {
236
- description: "PHP permission callback for generated REST resource route registrations.",
244
+ description: "PHP permission callback for generated route registrations or declared manual/provider route ownership.",
237
245
  type: "string"
238
246
  },
239
247
  "post-type": {
240
248
  description: "WordPress post type key for post-meta workflows.",
241
249
  type: "string"
242
250
  },
251
+ "post-meta": {
252
+ description: "Typed post-meta contract slug used to back a binding-source scaffold.",
253
+ type: "string"
254
+ },
243
255
  "persistence-policy": {
244
256
  description: "Persistence write policy for persistence-capable templates.",
245
257
  type: "string"
@@ -260,16 +272,41 @@ var ADD_OPTION_METADATA = {
260
272
  description: "Exported TypeScript response type for manual REST contract workflows.",
261
273
  type: "string"
262
274
  },
275
+ "release-zip": {
276
+ argumentKind: "flag",
277
+ description: "Add release zip packaging scripts for integration-env plugin QA workflows.",
278
+ type: "boolean"
279
+ },
263
280
  "route-pattern": {
264
- description: "Generated REST resource item route pattern relative to the REST namespace.",
281
+ 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.",
282
+ type: "string"
283
+ },
284
+ scope: {
285
+ description: "Pattern catalog scope for pattern workflows (full or section).",
286
+ type: "string"
287
+ },
288
+ "section-role": {
289
+ description: "Typed section role for section-scoped pattern catalog entries.",
265
290
  type: "string"
266
291
  },
267
292
  "secret-field": {
268
- description: "Write-only request body field for manual settings REST contracts.",
293
+ description: "Write-only request body field for manual settings REST contracts; requires --manual and a request body, typically generated by POST, PUT, or PATCH.",
294
+ type: "string"
295
+ },
296
+ "secret-has-value-field": {
297
+ description: "Alias for --secret-state-field when the manual settings response exposes a safe has-value indicator.",
298
+ type: "string"
299
+ },
300
+ "secret-masked-response-field": {
301
+ description: "Alias for --secret-state-field when the manual settings response exposes masked secret state.",
302
+ type: "string"
303
+ },
304
+ "secret-preserve-on-empty": {
305
+ description: "Whether blank manual settings secret submissions should preserve the stored secret (true by default).",
269
306
  type: "string"
270
307
  },
271
308
  "secret-state-field": {
272
- description: "Masked response boolean field for --secret-field; defaults to has<SecretField>.",
309
+ description: "Masked response boolean field for --secret-field; defaults to has<SecretField> and may also be provided as --secret-has-value-field.",
273
310
  type: "string"
274
311
  },
275
312
  service: {
@@ -288,6 +325,14 @@ var ADD_OPTION_METADATA = {
288
325
  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
326
  type: "string"
290
327
  },
328
+ "thumbnail-url": {
329
+ description: "Optional thumbnail URL or relative path for typed pattern catalog entries.",
330
+ type: "string"
331
+ },
332
+ tags: {
333
+ description: "Comma-separated tags for typed pattern catalog entries.",
334
+ type: "string"
335
+ },
291
336
  type: {
292
337
  description: "Exported TypeScript type or interface name for standalone contract workflows.",
293
338
  type: "string"
@@ -355,6 +400,10 @@ var CREATE_OPTION_METADATA = {
355
400
  description: "Custom PHP symbol prefix.",
356
401
  type: "string"
357
402
  },
403
+ profile: {
404
+ description: "Opt-in scaffold profile; use plugin-qa with --template workspace for wp-env, smoke, and release zip starters.",
405
+ type: "string"
406
+ },
358
407
  "query-post-type": {
359
408
  description: "Default post type assigned to Query Loop variation scaffolds.",
360
409
  type: "string"
@@ -399,6 +448,11 @@ var DOCTOR_OPTION_METADATA = {
399
448
  format: {
400
449
  description: "Use `json` for machine-readable doctor check output or `text` for human-readable output.",
401
450
  type: "string"
451
+ },
452
+ "workspace-only": {
453
+ argumentKind: "flag",
454
+ description: "Fail only on workspace-scoped doctor checks; environment/runtime failures remain advisory in JSON summaries.",
455
+ type: "boolean"
402
456
  }
403
457
  };
404
458
  // src/command-options/global.ts
@@ -949,10 +1003,19 @@ var WP_TYPIA_CONFIG_SOURCES = [
949
1003
  ".wp-typiarc",
950
1004
  ".wp-typiarc.json"
951
1005
  ];
1006
+ var wordpressVersionSchema = exports_external.string().regex(/^\d+\.\d+(?:\.\d+)?$/u, 'expected dotted numeric WordPress version such as "6.7" or "6.7.1"');
952
1007
  var wpTypiaSchemaSourceSchema = exports_external.object({
953
1008
  namespace: exports_external.string(),
954
1009
  path: exports_external.string()
955
1010
  }).strict();
1011
+ var wordpressCompatibilityConfigSchema = exports_external.object({
1012
+ minVersion: wordpressVersionSchema.optional(),
1013
+ testedVersions: exports_external.array(wordpressVersionSchema).optional()
1014
+ }).strict();
1015
+ var blockApiCompatibilityConfigSchema = exports_external.object({
1016
+ allowUnknownFutureKeys: exports_external.boolean().optional(),
1017
+ strict: exports_external.boolean().optional()
1018
+ }).strict();
956
1019
  var createConfigSchema = exports_external.object({
957
1020
  "alternate-render-targets": exports_external.string().optional(),
958
1021
  "inner-blocks-preset": exports_external.string().optional(),
@@ -965,6 +1028,7 @@ var createConfigSchema = exports_external.object({
965
1028
  "package-manager": exports_external.string().optional(),
966
1029
  "persistence-policy": exports_external.string().optional(),
967
1030
  "php-prefix": exports_external.string().optional(),
1031
+ profile: exports_external.string().optional(),
968
1032
  "query-post-type": exports_external.string().optional(),
969
1033
  template: exports_external.string().optional(),
970
1034
  "text-domain": exports_external.string().optional(),
@@ -991,8 +1055,10 @@ var mcpConfigSchema = exports_external.object({
991
1055
  }).strict();
992
1056
  var wpTypiaUserConfigSchema = exports_external.object({
993
1057
  add: addConfigSchema.optional(),
1058
+ compatibility: blockApiCompatibilityConfigSchema.optional(),
994
1059
  create: createConfigSchema.optional(),
995
- mcp: mcpConfigSchema.optional()
1060
+ mcp: mcpConfigSchema.optional(),
1061
+ wordpress: wordpressCompatibilityConfigSchema.optional()
996
1062
  }).strict();
997
1063
  function formatIssuePath(issuePath) {
998
1064
  if (issuePath.length === 0) {
@@ -1103,4 +1169,4 @@ function createPlugin(input) {
1103
1169
  }
1104
1170
  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 };
1105
1171
 
1106
- //# debugId=7C44F3F606B3311C64756E2164756E21
1172
+ //# debugId=F63C0DE9696AEB4464756E2164756E21
@@ -13,7 +13,7 @@ import {
13
13
  getFailingDoctorChecks,
14
14
  isCliDiagnosticError,
15
15
  serializeCliDiagnosticError
16
- } from "./cli-p95wr1q8.js";
16
+ } from "./cli-tq730sqt.js";
17
17
  import"./cli-xnn9xjcy.js";
18
18
  export {
19
19
  serializeCliDiagnosticError,