wp-typia 0.22.8 → 0.22.10

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.
@@ -9,6 +9,9 @@ import {
9
9
  isBuiltInTemplateId,
10
10
  isRemovedBuiltInTemplateId
11
11
  } from "./cli-qse6myha.js";
12
+ import {
13
+ suggestCloseId
14
+ } from "./cli-cvxvcw7c.js";
12
15
  import {
13
16
  CLI_DIAGNOSTIC_CODES,
14
17
  createCliDiagnosticCodeError
@@ -3629,37 +3632,12 @@ function looksLikeExplicitNonNpmExternalTemplateLocator(templateId) {
3629
3632
  function looksLikeExplicitCreateExternalTemplateLocator(templateId) {
3630
3633
  return looksLikeExplicitNonNpmExternalTemplateLocator(templateId) || parseNpmTemplateLocator(templateId) !== null;
3631
3634
  }
3632
- function getEditDistance(left, right) {
3633
- const previous = Array.from({ length: right.length + 1 }, (_, index) => index);
3634
- const current = new Array(right.length + 1);
3635
- for (let leftIndex = 0;leftIndex < left.length; leftIndex += 1) {
3636
- current[0] = leftIndex + 1;
3637
- for (let rightIndex = 0;rightIndex < right.length; rightIndex += 1) {
3638
- const substitutionCost = left[leftIndex] === right[rightIndex] ? 0 : 1;
3639
- current[rightIndex + 1] = Math.min(current[rightIndex] + 1, previous[rightIndex + 1] + 1, previous[rightIndex] + substitutionCost);
3640
- }
3641
- for (let index = 0;index < current.length; index += 1) {
3642
- previous[index] = current[index];
3643
- }
3644
- }
3645
- return previous[right.length];
3646
- }
3647
3635
  function findMistypedBuiltInTemplateSuggestion(templateId) {
3648
3636
  const normalizedTemplateId = templateId.trim().toLowerCase();
3649
3637
  if (normalizedTemplateId.length === 0 || looksLikeExplicitNonNpmExternalTemplateLocator(normalizedTemplateId)) {
3650
3638
  return null;
3651
3639
  }
3652
- let bestCandidate = null;
3653
- for (const candidateId of TEMPLATE_SUGGESTION_IDS) {
3654
- const distance = getEditDistance(normalizedTemplateId, candidateId);
3655
- if (bestCandidate === null || distance < bestCandidate.distance) {
3656
- bestCandidate = {
3657
- distance,
3658
- id: candidateId
3659
- };
3660
- }
3661
- }
3662
- return bestCandidate && bestCandidate.distance <= 2 ? bestCandidate.id : null;
3640
+ return suggestCloseId(normalizedTemplateId, TEMPLATE_SUGGESTION_IDS);
3663
3641
  }
3664
3642
  function getMistypedBuiltInTemplateMessage(templateId) {
3665
3643
  const suggestion = findMistypedBuiltInTemplateSuggestion(templateId);
@@ -3699,4 +3677,4 @@ function validateExplicitCreateTemplateId(templateId) {
3699
3677
 
3700
3678
  export { require_semver2 as require_semver, parseTemplateLocator, CREATE_TEMPLATE_SELECTION_HINT, validateExplicitCreateTemplateId };
3701
3679
 
3702
- //# debugId=BE9DD1EB4BD209FD64756E2164756E21
3680
+ //# debugId=4BED06AE7FCF36F264756E2164756E21
@@ -20,7 +20,18 @@ import {
20
20
  scaffoldProject,
21
21
  syncPersistenceRestArtifacts,
22
22
  updatePluginHeaderCompatibility
23
- } from "./cli-fa7g1aqm.js";
23
+ } from "./cli-2x49egkd.js";
24
+ import {
25
+ parseTemplateLocator,
26
+ require_semver
27
+ } from "./cli-8reep89s.js";
28
+ import {
29
+ findExecutablePatternMatch,
30
+ hasExecutablePattern,
31
+ hasUncommentedPattern,
32
+ maskTypeScriptCommentsAndLiterals
33
+ } from "./cli-rwjkqjhs.js";
34
+ import"./cli-1k61xyn2.js";
24
35
  import {
25
36
  DEFAULT_WORDPRESS_ABILITIES_VERSION,
26
37
  DEFAULT_WORDPRESS_CORE_ABILITIES_VERSION,
@@ -30,31 +41,19 @@ import {
30
41
  DEFAULT_WP_TYPIA_DATAVIEWS_VERSION,
31
42
  getPackageVersions,
32
43
  resolveManagedPackageVersionRange
33
- } from "./cli-arz4rcye.js";
44
+ } from "./cli-2mswafd6.js";
34
45
  import {
35
- parseTemplateLocator,
36
- require_semver
37
- } from "./cli-mzvzbpnz.js";
46
+ SHARED_WORKSPACE_TEMPLATE_ROOT
47
+ } from "./cli-qse6myha.js";
38
48
  import {
39
49
  snapshotProjectVersion
40
- } from "./cli-bwwssctv.js";
50
+ } from "./cli-tjf0070f.js";
41
51
  import {
42
52
  ensureMigrationDirectories,
43
53
  parseMigrationConfig,
44
54
  writeInitialMigrationScaffold,
45
55
  writeMigrationConfig
46
56
  } from "./cli-2rqf6t0b.js";
47
- import"./cli-bq2v559b.js";
48
- import {
49
- findExecutablePatternMatch,
50
- hasExecutablePattern,
51
- hasUncommentedPattern,
52
- maskTypeScriptCommentsAndLiterals
53
- } from "./cli-rwjkqjhs.js";
54
- import"./cli-pnjx2e2h.js";
55
- import {
56
- SHARED_WORKSPACE_TEMPLATE_ROOT
57
- } from "./cli-qse6myha.js";
58
57
  import {
59
58
  ADD_BLOCK_TEMPLATE_IDS,
60
59
  EDITOR_PLUGIN_SLOT_IDS,
@@ -81,10 +80,12 @@ import {
81
80
  getMutableBlockHooks,
82
81
  getPropertyNameText,
83
82
  getWorkspaceBlockSelectOptions,
83
+ getWorkspaceBlockSelectOptionsAsync,
84
84
  getWorkspaceBootstrapPath,
85
85
  hasPhpFunctionCall,
86
86
  hasPhpFunctionDefinition,
87
87
  isAddBlockTemplateId,
88
+ isFileNotFoundError,
88
89
  normalizeBlockSlug,
89
90
  patchFile,
90
91
  pathExists,
@@ -101,12 +102,14 @@ import {
101
102
  resolveWorkspaceBlock,
102
103
  rollbackWorkspaceMutation,
103
104
  snapshotWorkspaceFiles,
105
+ suggestAddBlockTemplateId,
104
106
  toCamelCase,
105
107
  toKebabCase,
106
108
  toPascalCase,
107
109
  toSnakeCase,
108
110
  toTitleCase
109
- } from "./cli-bbj0kn1e.js";
111
+ } from "./cli-3fzqhpx9.js";
112
+ import"./cli-cvxvcw7c.js";
110
113
  import {
111
114
  createManagedTempRoot
112
115
  } from "./cli-t73q5aqz.js";
@@ -120,6 +123,7 @@ import {
120
123
  import {
121
124
  formatInstallCommand
122
125
  } from "./cli-52ke0ptp.js";
126
+ import"./cli-bq2v559b.js";
123
127
  import {
124
128
  __reExport,
125
129
  __toESM
@@ -504,6 +508,13 @@ async function assertWorkspaceDependenciesInstalled(workspace) {
504
508
  }
505
509
  throw new Error(`Workspace dependencies have not been installed yet. Run \`${formatInstallCommand(workspace.packageManager)}\` from the workspace root before using \`wp-typia add block ...\`.`);
506
510
  }
511
+ function getMistypedAddBlockTemplateMessage(templateId) {
512
+ const suggestion = suggestAddBlockTemplateId(templateId);
513
+ if (!suggestion) {
514
+ return null;
515
+ }
516
+ return `Unknown add-block template "${templateId}". Did you mean "${suggestion}"? Use \`--template ${suggestion}\`, or run \`wp-typia templates list\` to inspect available templates.`;
517
+ }
507
518
  async function copyScaffoldedBlockSlice(projectDir, templateId, tempProjectDir, variables, legacyValidatorPaths = []) {
508
519
  if (templateId === "compound") {
509
520
  await ensureCompoundWorkspaceSupportFiles(projectDir, tempProjectDir, legacyValidatorPaths);
@@ -681,6 +692,10 @@ async function runAddBlockCommand({
681
692
  throw new Error("`wp-typia add block --template query-loop` is not supported. Query Loop is a create-time `core/query` variation scaffold, so use `wp-typia create <project-dir> --template query-loop` instead.");
682
693
  }
683
694
  if (!isAddBlockTemplateId(templateId)) {
695
+ const mistypedAddBlockTemplateMessage = getMistypedAddBlockTemplateMessage(templateId);
696
+ if (mistypedAddBlockTemplateMessage) {
697
+ throw new Error(mistypedAddBlockTemplateMessage);
698
+ }
684
699
  throw new Error(`Unknown add-block template "${templateId}". Expected one of: ${ADD_BLOCK_TEMPLATE_IDS.join(", ")}. Run \`wp-typia templates list\` to inspect available templates.`);
685
700
  }
686
701
  const resolvedTemplateId = templateId;
@@ -5283,8 +5298,7 @@ async function reconcileGeneratedArtifact(options) {
5283
5298
  throw new Error(`Generated AI feature artifact is stale: ${options.label} (${options.filePath}).`);
5284
5299
  }
5285
5300
  } catch (error) {
5286
- const code = error && typeof error === "object" && "code" in error ? error.code : undefined;
5287
- if (code === "ENOENT") {
5301
+ if (isFileNotFoundError(error)) {
5288
5302
  throw new Error(`Generated AI feature artifact is missing: ${options.label} (${options.filePath}).`);
5289
5303
  }
5290
5304
  throw error;
@@ -7386,6 +7400,7 @@ async function runAddHookedBlockCommand({
7386
7400
  }
7387
7401
  }
7388
7402
  export {
7403
+ suggestAddBlockTemplateId,
7389
7404
  seedWorkspaceMigrationProject,
7390
7405
  runAddVariationCommand,
7391
7406
  runAddRestResourceCommand,
@@ -7400,6 +7415,7 @@ export {
7400
7415
  runAddAdminViewCommand,
7401
7416
  runAddAbilityCommand,
7402
7417
  isAddBlockTemplateId,
7418
+ getWorkspaceBlockSelectOptionsAsync,
7403
7419
  getWorkspaceBlockSelectOptions,
7404
7420
  formatAddHelpText,
7405
7421
  EDITOR_PLUGIN_SLOT_IDS,
@@ -7407,4 +7423,4 @@ export {
7407
7423
  ADD_BLOCK_TEMPLATE_IDS
7408
7424
  };
7409
7425
 
7410
- //# debugId=D2A71082E757E7C764756E2164756E21
7426
+ //# debugId=B9D15C6E02FD001464756E2164756E21
@@ -0,0 +1,46 @@
1
+ // @bun
2
+ // ../wp-typia-project-tools/src/runtime/id-suggestions.ts
3
+ function normalizeCloseId(value) {
4
+ return value.trim().toLowerCase();
5
+ }
6
+ function getEditDistance(left, right) {
7
+ const previous = Array.from({ length: right.length + 1 }, (_, index) => index);
8
+ const current = new Array(right.length + 1);
9
+ for (let leftIndex = 0;leftIndex < left.length; leftIndex += 1) {
10
+ current[0] = leftIndex + 1;
11
+ for (let rightIndex = 0;rightIndex < right.length; rightIndex += 1) {
12
+ const substitutionCost = left[leftIndex] === right[rightIndex] ? 0 : 1;
13
+ current[rightIndex + 1] = Math.min(current[rightIndex] + 1, previous[rightIndex + 1] + 1, previous[rightIndex] + substitutionCost);
14
+ }
15
+ for (let index = 0;index < current.length; index += 1) {
16
+ previous[index] = current[index];
17
+ }
18
+ }
19
+ return previous[right.length];
20
+ }
21
+ function suggestCloseId(input, candidates, options = {}) {
22
+ const normalize = options.normalize ?? normalizeCloseId;
23
+ const normalizedInput = normalize(input);
24
+ if (normalizedInput.length === 0) {
25
+ return null;
26
+ }
27
+ const maxDistance = options.maxDistance ?? 2;
28
+ if (maxDistance < 0) {
29
+ return null;
30
+ }
31
+ let bestCandidate = null;
32
+ for (const candidateId of candidates) {
33
+ const distance = getEditDistance(normalizedInput, normalize(candidateId));
34
+ if (bestCandidate === null || distance < bestCandidate.distance) {
35
+ bestCandidate = {
36
+ distance,
37
+ id: candidateId
38
+ };
39
+ }
40
+ }
41
+ return bestCandidate && bestCandidate.distance <= maxDistance ? bestCandidate.id : null;
42
+ }
43
+
44
+ export { suggestCloseId };
45
+
46
+ //# debugId=7EAC7A78B56C749964756E2164756E21
@@ -7,7 +7,7 @@ import {
7
7
  import {
8
8
  getBuiltInTemplateLayerDirs,
9
9
  isOmittableBuiltInTemplateLayerDir
10
- } from "./cli-pnjx2e2h.js";
10
+ } from "./cli-1k61xyn2.js";
11
11
  import {
12
12
  isBuiltInTemplateId,
13
13
  listTemplates
@@ -19,9 +19,10 @@ import {
19
19
  REST_RESOURCE_METHOD_IDS,
20
20
  REST_RESOURCE_NAMESPACE_PATTERN,
21
21
  escapeRegex,
22
- readWorkspaceInventory,
22
+ readWorkspaceInventoryAsync,
23
23
  resolveEditorPluginSlotAlias
24
- } from "./cli-bbj0kn1e.js";
24
+ } from "./cli-3fzqhpx9.js";
25
+ import"./cli-cvxvcw7c.js";
25
26
  import"./cli-t73q5aqz.js";
26
27
  import"./cli-fys8vm2t.js";
27
28
  import {
@@ -1035,7 +1036,7 @@ function formatWorkspaceInventorySummary(inventory) {
1035
1036
  `${inventory.adminViews.length} admin view(s)`
1036
1037
  ].join(", ");
1037
1038
  }
1038
- function getWorkspaceDoctorChecks(cwd) {
1039
+ async function getWorkspaceDoctorChecks(cwd) {
1039
1040
  const checks = [];
1040
1041
  let workspace = null;
1041
1042
  let invalidWorkspaceReason = null;
@@ -1066,7 +1067,7 @@ function getWorkspaceDoctorChecks(cwd) {
1066
1067
  }
1067
1068
  checks.push(getWorkspacePackageMetadataCheck(workspace, workspacePackageJson));
1068
1069
  try {
1069
- const inventory = readWorkspaceInventory(workspace.projectDir);
1070
+ const inventory = await readWorkspaceInventoryAsync(workspace.projectDir);
1070
1071
  checks.push(createDoctorCheck2("Workspace inventory", "pass", formatWorkspaceInventorySummary(inventory)));
1071
1072
  checks.push(...getWorkspaceBlockDoctorChecks(workspace, inventory));
1072
1073
  checks.push(...getWorkspaceBindingDoctorChecks(workspace, inventory));
@@ -1085,7 +1086,7 @@ function getWorkspaceDoctorChecks(cwd) {
1085
1086
  async function getDoctorChecks(cwd) {
1086
1087
  return [
1087
1088
  ...await getEnvironmentDoctorChecks(cwd),
1088
- ...getWorkspaceDoctorChecks(cwd)
1089
+ ...await getWorkspaceDoctorChecks(cwd)
1089
1090
  ];
1090
1091
  }
1091
1092
  async function runDoctor(cwd, options = {}) {
@@ -1114,4 +1115,4 @@ export {
1114
1115
  getDoctorChecks
1115
1116
  };
1116
1117
 
1117
- //# debugId=3C7A7D362A24E1A964756E2164756E21
1118
+ //# debugId=927037660E5564A064756E2164756E21
@@ -1,11 +1,11 @@
1
1
  // @bun
2
2
  import {
3
3
  getPackageVersions
4
- } from "./cli-arz4rcye.js";
4
+ } from "./cli-2mswafd6.js";
5
+ import"./cli-qse6myha.js";
5
6
  import {
6
7
  discoverMigrationInitLayout
7
8
  } from "./cli-2rqf6t0b.js";
8
- import"./cli-qse6myha.js";
9
9
  import {
10
10
  quoteTsString,
11
11
  require_typescript,
@@ -13,7 +13,8 @@ import {
13
13
  snapshotWorkspaceFiles,
14
14
  toPascalCase,
15
15
  updateWorkspaceInventorySource
16
- } from "./cli-bbj0kn1e.js";
16
+ } from "./cli-3fzqhpx9.js";
17
+ import"./cli-cvxvcw7c.js";
17
18
  import"./cli-fys8vm2t.js";
18
19
  import {
19
20
  CLI_DIAGNOSTIC_CODES,
@@ -862,4 +863,4 @@ export {
862
863
  applyInitPlan
863
864
  };
864
865
 
865
- //# debugId=4F60C8DD81E9727764756E2164756E21
866
+ //# debugId=0E94BF54150D779464756E2164756E21
@@ -20,18 +20,20 @@ import {
20
20
  resolvePackageManagerId,
21
21
  resolveTemplateId,
22
22
  scaffoldProject
23
- } from "./cli-fa7g1aqm.js";
24
- import"./cli-arz4rcye.js";
25
- import"./cli-mzvzbpnz.js";
26
- import"./cli-bwwssctv.js";
27
- import"./cli-2rqf6t0b.js";
28
- import"./cli-bq2v559b.js";
29
- import"./cli-pnjx2e2h.js";
23
+ } from "./cli-2x49egkd.js";
24
+ import"./cli-8reep89s.js";
25
+ import"./cli-1k61xyn2.js";
26
+ import"./cli-2mswafd6.js";
30
27
  import {
31
28
  OFFICIAL_WORKSPACE_TEMPLATE_PACKAGE,
32
29
  isBuiltInTemplateId
33
30
  } from "./cli-qse6myha.js";
34
- import"./cli-bbj0kn1e.js";
31
+ import"./cli-tjf0070f.js";
32
+ import"./cli-2rqf6t0b.js";
33
+ import {
34
+ pathExists
35
+ } from "./cli-3fzqhpx9.js";
36
+ import"./cli-cvxvcw7c.js";
35
37
  import {
36
38
  createManagedTempRoot
37
39
  } from "./cli-t73q5aqz.js";
@@ -42,10 +44,10 @@ import {
42
44
  formatInstallCommand,
43
45
  formatRunScript
44
46
  } from "./cli-52ke0ptp.js";
47
+ import"./cli-bq2v559b.js";
45
48
  import"./cli-xnn9xjcy.js";
46
49
 
47
50
  // ../wp-typia-project-tools/src/runtime/cli-scaffold.ts
48
- import fs from "fs";
49
51
  import { promises as fsp } from "fs";
50
52
  import path from "path";
51
53
  async function listRelativeProjectFiles(rootDir) {
@@ -65,7 +67,7 @@ async function listRelativeProjectFiles(rootDir) {
65
67
  return relativeFiles.sort((left, right) => left.localeCompare(right));
66
68
  }
67
69
  async function assertDryRunTargetDirectoryReady(projectDir, allowExistingDir) {
68
- if (!fs.existsSync(projectDir) || allowExistingDir) {
70
+ if (!await pathExists(projectDir) || allowExistingDir) {
69
71
  return;
70
72
  }
71
73
  const entries = await fsp.readdir(projectDir);
@@ -510,7 +512,7 @@ async function runScaffoldFlow({
510
512
  let availableScripts;
511
513
  if (!dryRun) {
512
514
  try {
513
- const parsedPackageJson = JSON.parse(fs.readFileSync(path.join(projectDir, "package.json"), "utf8"));
515
+ const parsedPackageJson = JSON.parse(await fsp.readFile(path.join(projectDir, "package.json"), "utf8"));
514
516
  const scripts = parsedPackageJson.scripts && typeof parsedPackageJson.scripts === "object" && !Array.isArray(parsedPackageJson.scripts) ? parsedPackageJson.scripts : {};
515
517
  availableScripts = Object.entries(scripts).filter(([, value]) => typeof value === "string").map(([scriptName]) => scriptName);
516
518
  } catch {
@@ -559,4 +561,4 @@ export {
559
561
  getNextSteps
560
562
  };
561
563
 
562
- //# debugId=8FDC4D734EED3CDC64756E2164756E21
564
+ //# debugId=2B866835B8626C1664756E2164756E21
@@ -14,7 +14,7 @@ import {
14
14
  // package.json
15
15
  var package_default = {
16
16
  name: "wp-typia",
17
- version: "0.22.8",
17
+ version: "0.22.10",
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.22.8",
87
+ "@wp-typia/project-tools": "0.22.10",
88
88
  "better-result": "^2.7.0",
89
89
  react: "^19.2.5",
90
90
  "react-dom": "^19.2.5",
@@ -151,7 +151,83 @@ function findFirstPositional(argv, metadata) {
151
151
  return firstPositionalIndex === -1 ? undefined : argv[firstPositionalIndex];
152
152
  }
153
153
 
154
- // src/command-option-metadata.ts
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
+ block: {
169
+ description: "Target block slug for variation, style, and end-to-end binding-source workflows.",
170
+ type: "string"
171
+ },
172
+ "data-storage": {
173
+ description: "Persistence storage mode for persistence-capable templates.",
174
+ type: "string"
175
+ },
176
+ "dry-run": {
177
+ argumentKind: "flag",
178
+ description: "Preview workspace file updates and completion guidance without writing them.",
179
+ type: "boolean"
180
+ },
181
+ "external-layer-id": {
182
+ description: "Explicit layer id when an external layer package exposes multiple selectable layers.",
183
+ type: "string"
184
+ },
185
+ "external-layer-source": {
186
+ description: "Local path, GitHub locator, or npm package that exposes wp-typia.layers.json for built-in block templates.",
187
+ type: "string"
188
+ },
189
+ from: {
190
+ description: "Source full block name (namespace/block) for transform workflows.",
191
+ type: "string"
192
+ },
193
+ "inner-blocks-preset": {
194
+ description: "Compound-only InnerBlocks preset (freeform, ordered, horizontal, locked-structure).",
195
+ type: "string"
196
+ },
197
+ methods: {
198
+ description: "Comma-separated REST resource methods for rest-resource workflows.",
199
+ type: "string"
200
+ },
201
+ namespace: {
202
+ description: "REST namespace for rest-resource and ai-feature workflows.",
203
+ type: "string"
204
+ },
205
+ "persistence-policy": {
206
+ description: "Persistence write policy for persistence-capable templates.",
207
+ type: "string"
208
+ },
209
+ position: {
210
+ description: "Hook position for hooked-block workflows.",
211
+ type: "string"
212
+ },
213
+ slot: {
214
+ description: "Document editor shell slot for editor-plugin workflows (sidebar or document-setting-panel).",
215
+ type: "string"
216
+ },
217
+ source: {
218
+ description: "Optional data source locator for admin-view workflows, such as rest-resource:products or core-data:postType/post.",
219
+ type: "string"
220
+ },
221
+ template: {
222
+ 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.",
223
+ type: "string"
224
+ },
225
+ to: {
226
+ description: "Target workspace block slug or full block name for transform workflows.",
227
+ type: "string"
228
+ }
229
+ };
230
+ // src/command-options/create.ts
155
231
  var CREATE_OPTION_METADATA = {
156
232
  "alternate-render-targets": {
157
233
  description: "Comma-separated alternate render targets for dynamic block scaffolds (email,mjml,plain-text).",
@@ -239,81 +315,30 @@ var CREATE_OPTION_METADATA = {
239
315
  type: "boolean"
240
316
  }
241
317
  };
242
- var ADD_OPTION_METADATA = {
243
- "alternate-render-targets": {
244
- description: "Comma-separated alternate render targets for dynamic block scaffolds (email,mjml,plain-text).",
245
- type: "string"
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).",
318
+ // src/command-options/doctor.ts
319
+ var DOCTOR_OPTION_METADATA = {
320
+ format: {
321
+ description: "Use `json` for machine-readable doctor check output or `text` for human-readable output.",
302
322
  type: "string"
303
- },
304
- source: {
305
- description: "Optional data source locator for admin-view workflows, such as rest-resource:products or core-data:postType/post.",
323
+ }
324
+ };
325
+ // src/command-options/global.ts
326
+ var GLOBAL_OPTION_METADATA = {
327
+ config: {
328
+ description: "Config override file path.",
329
+ short: "c",
306
330
  type: "string"
307
331
  },
308
- template: {
309
- 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.",
332
+ format: {
333
+ description: "Output format for supported commands (`json` or `text`).",
310
334
  type: "string"
311
335
  },
312
- to: {
313
- description: "Target workspace block slug or full block name for transform workflows.",
336
+ id: {
337
+ description: "Template id for top-level `templates inspect` convenience.",
314
338
  type: "string"
315
339
  }
316
340
  };
341
+ // src/command-options/init.ts
317
342
  var INIT_OPTION_METADATA = {
318
343
  apply: {
319
344
  argumentKind: "flag",
@@ -326,6 +351,14 @@ var INIT_OPTION_METADATA = {
326
351
  type: "string"
327
352
  }
328
353
  };
354
+ // src/command-options/mcp.ts
355
+ var MCP_OPTION_METADATA = {
356
+ "output-dir": {
357
+ description: "Output directory for generated MCP metadata.",
358
+ type: "string"
359
+ }
360
+ };
361
+ // src/command-options/migrate.ts
329
362
  var MIGRATE_OPTION_METADATA = {
330
363
  all: {
331
364
  argumentKind: "flag",
@@ -362,12 +395,7 @@ var MIGRATE_OPTION_METADATA = {
362
395
  type: "string"
363
396
  }
364
397
  };
365
- var MCP_OPTION_METADATA = {
366
- "output-dir": {
367
- description: "Output directory for generated MCP metadata.",
368
- type: "string"
369
- }
370
- };
398
+ // src/command-options/sync.ts
371
399
  var SYNC_OPTION_METADATA = {
372
400
  check: {
373
401
  argumentKind: "flag",
@@ -380,33 +408,14 @@ var SYNC_OPTION_METADATA = {
380
408
  type: "boolean"
381
409
  }
382
410
  };
383
- var DOCTOR_OPTION_METADATA = {
384
- format: {
385
- description: "Use `json` for machine-readable doctor check output or `text` for human-readable output.",
386
- type: "string"
387
- }
388
- };
411
+ // src/command-options/templates.ts
389
412
  var TEMPLATES_OPTION_METADATA = {
390
413
  id: {
391
414
  description: "Template id for `templates inspect`.",
392
415
  type: "string"
393
416
  }
394
417
  };
395
- var GLOBAL_OPTION_METADATA = {
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
- };
418
+ // src/command-option-metadata.ts
410
419
  var COMMAND_OPTION_METADATA_BY_GROUP = {
411
420
  add: ADD_OPTION_METADATA,
412
421
  create: CREATE_OPTION_METADATA,
@@ -704,6 +713,15 @@ function writeStructuredCliDiagnosticError(argv, error) {
704
713
  process.exitCode = 1;
705
714
  return true;
706
715
  }
716
+
717
+ // src/add-kind-ids.ts
718
+ function formatAddKindList() {
719
+ return ADD_KIND_IDS.join(", ");
720
+ }
721
+ function formatAddKindUsagePlaceholder() {
722
+ return `<${ADD_KIND_IDS.join("|")}>`;
723
+ }
724
+
707
725
  // src/command-registry.ts
708
726
  var WP_TYPIA_CANONICAL_CREATE_USAGE = "wp-typia create <project-dir>";
709
727
  var WP_TYPIA_COMMAND_REGISTRY = [
@@ -1004,6 +1022,6 @@ function getMcpSchemaSources(config) {
1004
1022
  function createPlugin(input) {
1005
1023
  return input;
1006
1024
  }
1007
- export { createPlugin, package_default, collectPositionalIndexes, findFirstPositionalIndex, CREATE_OPTION_METADATA, ADD_OPTION_METADATA, INIT_OPTION_METADATA, MIGRATE_OPTION_METADATA, MCP_OPTION_METADATA, SYNC_OPTION_METADATA, DOCTOR_OPTION_METADATA, TEMPLATES_OPTION_METADATA, GLOBAL_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, 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 };
1025
+ 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
1026
 
1009
- //# debugId=1B6B6622EAD33E5164756E2164756E21
1027
+ //# debugId=A8F5341830BE069D64756E2164756E21