wp-typia 0.23.1 → 0.24.1

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.
@@ -4,7 +4,7 @@ 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,
@@ -14,7 +14,7 @@ import {
14
14
  // package.json
15
15
  var package_default = {
16
16
  name: "wp-typia",
17
- version: "0.23.1",
17
+ version: "0.24.1",
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.1",
87
+ "@wp-typia/project-tools": "0.24.1",
88
88
  "better-result": "^2.7.0",
89
89
  react: "^19.2.5",
90
90
  "react-dom": "^19.2.5",
@@ -170,7 +170,11 @@ 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
+ type: "string"
175
+ },
176
+ "catalog-title": {
177
+ description: "Human-readable title for typed pattern catalog entries; defaults to the pattern slug title.",
174
178
  type: "string"
175
179
  },
176
180
  "controller-class": {
@@ -202,6 +206,10 @@ var ADD_OPTION_METADATA = {
202
206
  description: "Source full block name (namespace/block) for transform workflows.",
203
207
  type: "string"
204
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
+ },
205
213
  "inner-blocks-preset": {
206
214
  description: "Compound-only InnerBlocks preset (freeform, ordered, horizontal, locked-structure).",
207
215
  type: "string"
@@ -220,6 +228,10 @@ var ADD_OPTION_METADATA = {
220
228
  description: "WordPress meta key for post-meta workflows; defaults to _<phpPrefix>_<name>.",
221
229
  type: "string"
222
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
+ },
223
235
  method: {
224
236
  description: "HTTP method for manual REST contract workflows (GET, POST, PUT, PATCH, or DELETE).",
225
237
  type: "string"
@@ -240,6 +252,10 @@ var ADD_OPTION_METADATA = {
240
252
  description: "WordPress post type key for post-meta workflows.",
241
253
  type: "string"
242
254
  },
255
+ "post-meta": {
256
+ description: "Typed post-meta contract slug used to back a binding-source scaffold.",
257
+ type: "string"
258
+ },
243
259
  "persistence-policy": {
244
260
  description: "Persistence write policy for persistence-capable templates.",
245
261
  type: "string"
@@ -269,6 +285,14 @@ var ADD_OPTION_METADATA = {
269
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.",
270
286
  type: "string"
271
287
  },
288
+ scope: {
289
+ description: "Pattern catalog scope for pattern workflows (full or section).",
290
+ type: "string"
291
+ },
292
+ "section-role": {
293
+ description: "Typed section role for section-scoped pattern catalog entries.",
294
+ type: "string"
295
+ },
272
296
  "secret-field": {
273
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.",
274
298
  type: "string"
@@ -305,6 +329,20 @@ var ADD_OPTION_METADATA = {
305
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.",
306
330
  type: "string"
307
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; may be repeated.",
338
+ repeatable: true,
339
+ type: "string"
340
+ },
341
+ tag: {
342
+ description: "Repeatable singular tag for typed pattern catalog entries.",
343
+ repeatable: true,
344
+ type: "string"
345
+ },
308
346
  type: {
309
347
  description: "Exported TypeScript type or interface name for standalone contract workflows.",
310
348
  type: "string"
@@ -552,7 +590,8 @@ function buildCommandOptions(metadata) {
552
590
  {
553
591
  ...option.argumentKind ? { argumentKind: option.argumentKind } : {},
554
592
  description: option.description,
555
- schema: option.type === "boolean" ? exports_external.boolean().default(false) : exports_external.string().optional(),
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(),
556
595
  ...option.short ? { short: option.short } : {}
557
596
  }
558
597
  ]));
@@ -572,10 +611,19 @@ function buildCommandOptionParser(...metadataMaps) {
572
611
  }
573
612
  return {
574
613
  booleanOptionNames: new Set(collectOptionNamesByType(metadata, "boolean")),
614
+ repeatableOptionNames: new Set(Object.entries(metadata).filter(([, option]) => option.repeatable).map(([name]) => name)),
575
615
  shortFlagMap: new Map(Object.entries(metadata).flatMap(([name, option]) => option.short ? [[option.short, { name, type: option.type }]] : [])),
576
616
  stringOptionNames: new Set(collectOptionNamesByType(metadata, "string"))
577
617
  };
578
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
+ }
579
627
  function buildArgvWalkerRoutingMetadata(...metadataMaps) {
580
628
  const parser = buildCommandOptionParser(...metadataMaps);
581
629
  return {
@@ -614,7 +662,11 @@ function extractKnownOptionValuesFromArgv(argv, options) {
614
662
  if (!next || next.startsWith("-")) {
615
663
  throw createMissingOptionValueError(arg);
616
664
  }
617
- flags[shortFlag.name] = next;
665
+ assignParsedOptionValue(flags, {
666
+ name: shortFlag.name,
667
+ parser: options.parser,
668
+ value: next
669
+ });
618
670
  index += 1;
619
671
  continue;
620
672
  }
@@ -639,14 +691,22 @@ function extractKnownOptionValuesFromArgv(argv, options) {
639
691
  if (!inlineValue) {
640
692
  throw createMissingOptionValueError(`--${rawName}`);
641
693
  }
642
- flags[rawName] = inlineValue;
694
+ assignParsedOptionValue(flags, {
695
+ name: rawName,
696
+ parser: options.parser,
697
+ value: inlineValue
698
+ });
643
699
  continue;
644
700
  }
645
701
  const next = argv[index + 1];
646
702
  if (!next || next.startsWith("-")) {
647
703
  throw createMissingOptionValueError(`--${rawName}`);
648
704
  }
649
- flags[rawName] = next;
705
+ assignParsedOptionValue(flags, {
706
+ name: rawName,
707
+ parser: options.parser,
708
+ value: next
709
+ });
650
710
  index += 1;
651
711
  continue;
652
712
  }
@@ -671,6 +731,10 @@ function resolveCommandOptionValues(metadata, options) {
671
731
  resolved[name] = Boolean(value ?? false);
672
732
  continue;
673
733
  }
734
+ if (descriptor.repeatable && Array.isArray(value)) {
735
+ resolved[name] = value.every((item) => typeof item === "string") ? value.join(",") : undefined;
736
+ continue;
737
+ }
674
738
  resolved[name] = typeof value === "string" ? value : undefined;
675
739
  }
676
740
  return resolved;
@@ -975,10 +1039,19 @@ var WP_TYPIA_CONFIG_SOURCES = [
975
1039
  ".wp-typiarc",
976
1040
  ".wp-typiarc.json"
977
1041
  ];
1042
+ var wordpressVersionSchema = exports_external.string().regex(/^\d+\.\d+(?:\.\d+)?$/u, 'expected dotted numeric WordPress version such as "6.7" or "6.7.1"');
978
1043
  var wpTypiaSchemaSourceSchema = exports_external.object({
979
1044
  namespace: exports_external.string(),
980
1045
  path: exports_external.string()
981
1046
  }).strict();
1047
+ var wordpressCompatibilityConfigSchema = exports_external.object({
1048
+ minVersion: wordpressVersionSchema.optional(),
1049
+ testedVersions: exports_external.array(wordpressVersionSchema).optional()
1050
+ }).strict();
1051
+ var blockApiCompatibilityConfigSchema = exports_external.object({
1052
+ allowUnknownFutureKeys: exports_external.boolean().optional(),
1053
+ strict: exports_external.boolean().optional()
1054
+ }).strict();
982
1055
  var createConfigSchema = exports_external.object({
983
1056
  "alternate-render-targets": exports_external.string().optional(),
984
1057
  "inner-blocks-preset": exports_external.string().optional(),
@@ -1018,8 +1091,10 @@ var mcpConfigSchema = exports_external.object({
1018
1091
  }).strict();
1019
1092
  var wpTypiaUserConfigSchema = exports_external.object({
1020
1093
  add: addConfigSchema.optional(),
1094
+ compatibility: blockApiCompatibilityConfigSchema.optional(),
1021
1095
  create: createConfigSchema.optional(),
1022
- mcp: mcpConfigSchema.optional()
1096
+ mcp: mcpConfigSchema.optional(),
1097
+ wordpress: wordpressCompatibilityConfigSchema.optional()
1023
1098
  }).strict();
1024
1099
  function formatIssuePath(issuePath) {
1025
1100
  if (issuePath.length === 0) {
@@ -1130,4 +1205,4 @@ function createPlugin(input) {
1130
1205
  }
1131
1206
  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 };
1132
1207
 
1133
- //# debugId=B4E0791804C009A564756E2164756E21
1208
+ //# debugId=C72B79CCBF0C2E7664756E2164756E21