wp-typia 0.22.1 → 0.22.2

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.
@@ -11,7 +11,7 @@ import {
11
11
  // package.json
12
12
  var package_default = {
13
13
  name: "wp-typia",
14
- version: "0.22.1",
14
+ version: "0.22.2",
15
15
  description: "Canonical CLI package for wp-typia scaffolding and project workflows",
16
16
  packageManager: "bun@1.3.11",
17
17
  type: "module",
@@ -81,7 +81,7 @@ var package_default = {
81
81
  "@bunli/tui": "0.6.0",
82
82
  "@bunli/utils": "0.6.0",
83
83
  "@wp-typia/api-client": "^0.4.5",
84
- "@wp-typia/project-tools": "0.22.1",
84
+ "@wp-typia/project-tools": "0.22.2",
85
85
  "better-result": "^2.7.0",
86
86
  react: "^19.2.5",
87
87
  "react-dom": "^19.2.5",
@@ -854,4 +854,4 @@ function createPlugin(input) {
854
854
  }
855
855
  export { createPlugin, package_default, 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, extractKnownOptionValuesFromArgv, resolveCommandOptionValues, collectPositionalIndexes, findFirstPositionalIndex, prefersStructuredCliOutput, emitCliDiagnosticFailure, writeStructuredCliDiagnosticError, ADD_KIND_IDS, 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 };
856
856
 
857
- //# debugId=E0DC9F2A7BC46CCF64756E2164756E21
857
+ //# debugId=A538A90F648FC90E64756E2164756E21
@@ -19,9 +19,9 @@ import {
19
19
  resolvePackageManagerId,
20
20
  resolveTemplateId,
21
21
  scaffoldProject
22
- } from "./cli-886tjd8m.js";
22
+ } from "./cli-kww2sraq.js";
23
23
  import"./cli-1sm60g1z.js";
24
- import"./cli-yzmkz95r.js";
24
+ import"./cli-6hcbjvym.js";
25
25
  import"./cli-gcbre1zs.js";
26
26
  import"./cli-bq2v559b.js";
27
27
  import {
@@ -33,7 +33,7 @@ import {
33
33
  OFFICIAL_WORKSPACE_TEMPLATE_PACKAGE,
34
34
  isBuiltInTemplateId
35
35
  } from "./cli-tke8twkn.js";
36
- import"./cli-5md428hf.js";
36
+ import"./cli-smzkbfna.js";
37
37
  import {
38
38
  createManagedTempRoot
39
39
  } from "./cli-t73q5aqz.js";
@@ -171518,7 +171518,9 @@ var WORKSPACE_COMPATIBILITY_CONFIG_FIELD = ` compatibility?: {
171518
171518
  wordpress?: string;
171519
171519
  };
171520
171520
  mode: 'baseline' | 'optional' | 'required';
171521
+ optionalFeatureIds: string[];
171521
171522
  optionalFeatures: string[];
171523
+ requiredFeatureIds: string[];
171522
171524
  requiredFeatures: string[];
171523
171525
  runtimeGates: string[];
171524
171526
  };
@@ -172036,6 +172038,27 @@ function ensureInterfaceField(source, interfaceName, fieldName, fieldSource) {
172036
172038
  return `${start}${body}${body.length > 0 && !body.endsWith(lineEnding) ? lineEnding : ""}${formattedFieldSource}${end}`;
172037
172039
  });
172038
172040
  }
172041
+ function normalizeInterfaceFieldBlock(source, interfaceName, fieldName, fieldSource, requiredFragments) {
172042
+ const interfacePattern = new RegExp(`(export\\s+interface\\s+${escapeRegex(interfaceName)}\\s*\\{\\r?\\n)([\\s\\S]*?)(\\r?\\n\\})`, "u");
172043
+ return source.replace(interfacePattern, (match, start, body, end) => {
172044
+ const fieldPattern = new RegExp(`(^([ \\t]*)${escapeRegex(fieldName)}\\??:\\s*\\{[ \\t]*\\r?\\n)([\\s\\S]*?)(^\\2\\};\\r?\\n?)`, "mu");
172045
+ const fieldMatch = fieldPattern.exec(body);
172046
+ if (!fieldMatch) {
172047
+ return match;
172048
+ }
172049
+ const existingFieldSource = fieldMatch[0];
172050
+ if (requiredFragments.every((fragment) => existingFieldSource.includes(fragment))) {
172051
+ return match;
172052
+ }
172053
+ const lineEnding = start.endsWith(`\r
172054
+ `) ? `\r
172055
+ ` : `
172056
+ `;
172057
+ const formattedFieldSource = `${fieldSource.replace(/\r?\n$/u, "").split(`
172058
+ `).join(lineEnding)}${lineEnding}`;
172059
+ return `${start}${body.slice(0, fieldMatch.index)}${formattedFieldSource}${body.slice(fieldMatch.index + existingFieldSource.length)}${end}`;
172060
+ });
172061
+ }
172039
172062
  function updateWorkspaceInventorySource(source, {
172040
172063
  blockEntries = [],
172041
172064
  blockStyleEntries = [],
@@ -172067,7 +172090,9 @@ function updateWorkspaceInventorySource(source, {
172067
172090
  nextSource = ensureInterfaceField(nextSource, "WorkspaceBindingSourceConfig", "attribute", "\tattribute?: string;");
172068
172091
  nextSource = ensureInterfaceField(nextSource, "WorkspaceBindingSourceConfig", "block", "\tblock?: string;");
172069
172092
  nextSource = ensureInterfaceField(nextSource, "WorkspaceAbilityConfig", "compatibility", WORKSPACE_COMPATIBILITY_CONFIG_FIELD);
172093
+ nextSource = normalizeInterfaceFieldBlock(nextSource, "WorkspaceAbilityConfig", "compatibility", WORKSPACE_COMPATIBILITY_CONFIG_FIELD, ["optionalFeatureIds: string[];", "requiredFeatureIds: string[];"]);
172070
172094
  nextSource = ensureInterfaceField(nextSource, "WorkspaceAiFeatureConfig", "compatibility", WORKSPACE_COMPATIBILITY_CONFIG_FIELD);
172095
+ nextSource = normalizeInterfaceFieldBlock(nextSource, "WorkspaceAiFeatureConfig", "compatibility", WORKSPACE_COMPATIBILITY_CONFIG_FIELD, ["optionalFeatureIds: string[];", "requiredFeatureIds: string[];"]);
172071
172096
  nextSource = appendEntriesAtMarker(nextSource, EDITOR_PLUGIN_CONFIG_ENTRY_MARKER, editorPluginEntries);
172072
172097
  return nextSource;
172073
172098
  }
@@ -172082,4 +172107,4 @@ async function appendWorkspaceInventoryEntries(projectDir, options) {
172082
172107
 
172083
172108
  export { HOOKED_BLOCK_POSITION_SET, HOOKED_BLOCK_ANCHOR_PATTERN, toKebabCase, toSnakeCase, toPascalCase, toCamelCase, toSegmentPascalCase, toTitleCase, validateBlockSlug, validateNamespace, normalizeBlockSlug, resolveNonEmptyNormalizedBlockSlug, buildBlockCssClassName, buildFrontendCssClassName, resolveScaffoldIdentifiers, ADD_KIND_IDS, REST_RESOURCE_METHOD_IDS, EDITOR_PLUGIN_SLOT_IDS, resolveEditorPluginSlotAlias, ADD_BLOCK_TEMPLATE_IDS, REST_RESOURCE_NAMESPACE_PATTERN, assertValidGeneratedSlug, resolveRestResourceNamespace, assertValidRestResourceMethods, assertValidHookedBlockPosition, getWorkspaceBootstrapPath, buildWorkspacePhpPrefix, isAddBlockTemplateId, quoteTsString, patchFile, readOptionalFile, snapshotWorkspaceFiles, rollbackWorkspaceMutation, resolveWorkspaceBlock, assertValidHookAnchor, assertValidEditorPluginSlot, readWorkspaceBlockJson, getMutableBlockHooks, assertVariationDoesNotExist, assertPatternDoesNotExist, assertBindingSourceDoesNotExist, assertRestResourceDoesNotExist, assertAdminViewDoesNotExist, assertAbilityDoesNotExist, assertAiFeatureDoesNotExist, assertEditorPluginDoesNotExist, formatAddHelpText, require_typescript, escapeRegex, quotePhpString, hasPhpFunctionDefinition, findPhpFunctionRange, replacePhpFunctionDefinition, readWorkspaceInventory, getWorkspaceBlockSelectOptions, updateWorkspaceInventorySource, appendWorkspaceInventoryEntries };
172084
172109
 
172085
- //# debugId=9C33172215A7E9B864756E2164756E21
172110
+ //# debugId=D35A39562AB1875A64756E2164756E21
package/dist-bunli/cli.js CHANGED
@@ -19,7 +19,7 @@ import {
19
19
  mergeWpTypiaUserConfig,
20
20
  package_default,
21
21
  writeStructuredCliDiagnosticError
22
- } from "./cli-0p8wz4a4.js";
22
+ } from "./cli-n6hgvysz.js";
23
23
  import"./cli-03j0axbt.js";
24
24
  import {
25
25
  GLOBAL_FLAGS,
@@ -2453,7 +2453,7 @@ async function formatCliError(error) {
2453
2453
  }
2454
2454
  async function createWpTypiaCli(options = {}) {
2455
2455
  applyStandaloneSupportLayoutEnv();
2456
- const { wpTypiaCommands } = await import("./command-list-tgyxdhb0.js");
2456
+ const { wpTypiaCommands } = await import("./command-list-d3dcvzg2.js");
2457
2457
  const cli = await createCLI({
2458
2458
  ...bunliConfig,
2459
2459
  description: package_default.description,
@@ -18,7 +18,7 @@ import {
18
18
  package_default,
19
19
  prefersStructuredCliOutput,
20
20
  resolveCommandOptionValues
21
- } from "./cli-0p8wz4a4.js";
21
+ } from "./cli-n6hgvysz.js";
22
22
  import {
23
23
  Result,
24
24
  TaggedError,
@@ -1440,14 +1440,14 @@ async function executeSyncCommand({
1440
1440
  }
1441
1441
 
1442
1442
  // src/runtime-bridge.ts
1443
- var loadCliAddRuntime = () => import("./cli-add-5z3wpzkh.js");
1443
+ var loadCliAddRuntime = () => import("./cli-add-s0p4w1wz.js");
1444
1444
  var loadCliDiagnosticsRuntime = () => import("./cli-diagnostics-5dvztm7q.js");
1445
- var loadCliDoctorRuntime = () => import("./cli-doctor-jd7qyr5s.js");
1446
- var loadCliInitRuntime = () => import("./cli-init-10nktmme.js");
1445
+ var loadCliDoctorRuntime = () => import("./cli-doctor-6dchxz12.js");
1446
+ var loadCliInitRuntime = () => import("./cli-init-r6h1xchq.js");
1447
1447
  var loadCliPromptRuntime = () => import("./cli-prompt-614tq57c.js");
1448
- var loadCliScaffoldRuntime = () => import("./cli-scaffold-837x3xsv.js");
1448
+ var loadCliScaffoldRuntime = () => import("./cli-scaffold-f023yxc5.js");
1449
1449
  var loadCliTemplatesRuntime = () => import("./cli-templates-9t2a7zqd.js");
1450
- var loadMigrationsRuntime = () => import("./migrations-x3a9t9yf.js");
1450
+ var loadMigrationsRuntime = () => import("./migrations-pg5b9fh4.js");
1451
1451
  async function wrapCliCommandError(command, error) {
1452
1452
  const { createCliCommandError } = await loadCliDiagnosticsRuntime();
1453
1453
  return createCliCommandError({ command, error });
@@ -2406,7 +2406,7 @@ var doctorCommand = defineCommand({
2406
2406
  const prefersStructuredOutput = prefersStructuredCliOutput(args);
2407
2407
  if (prefersStructuredOutput) {
2408
2408
  const [{ getDoctorChecks }, { getDoctorFailureDetailLines }] = await Promise.all([
2409
- import("./cli-doctor-jd7qyr5s.js"),
2409
+ import("./cli-doctor-6dchxz12.js"),
2410
2410
  import("./cli-diagnostics-5dvztm7q.js")
2411
2411
  ]);
2412
2412
  const checks = await getDoctorChecks(args.cwd);
@@ -15,11 +15,11 @@ import {
15
15
  snapshotProjectVersion,
16
16
  verifyProjectMigrations,
17
17
  wizardProjectMigrations
18
- } from "./cli-yzmkz95r.js";
18
+ } from "./cli-6hcbjvym.js";
19
19
  import"./cli-gcbre1zs.js";
20
20
  import"./cli-bq2v559b.js";
21
21
  import"./cli-sj5mtyzj.js";
22
- import"./cli-5md428hf.js";
22
+ import"./cli-smzkbfna.js";
23
23
  import"./cli-pd5pqgre.js";
24
24
  import"./cli-xnn9xjcy.js";
25
25
  export {
@@ -3,7 +3,7 @@ var __require = /* @__PURE__ */ createRequire(import.meta.url);
3
3
  // package.json
4
4
  var package_default = {
5
5
  name: "wp-typia",
6
- version: "0.22.1",
6
+ version: "0.22.2",
7
7
  description: "Canonical CLI package for wp-typia scaffolding and project workflows",
8
8
  packageManager: "bun@1.3.11",
9
9
  type: "module",
@@ -73,7 +73,7 @@ var package_default = {
73
73
  "@bunli/tui": "0.6.0",
74
74
  "@bunli/utils": "0.6.0",
75
75
  "@wp-typia/api-client": "^0.4.5",
76
- "@wp-typia/project-tools": "0.22.1",
76
+ "@wp-typia/project-tools": "0.22.2",
77
77
  "better-result": "^2.7.0",
78
78
  react: "^19.2.5",
79
79
  "react-dom": "^19.2.5",
@@ -3304,4 +3304,4 @@ export {
3304
3304
  hasFlagBeforeTerminator
3305
3305
  };
3306
3306
 
3307
- //# debugId=8E37F3E4F2CC8EE464756E2164756E21
3307
+ //# debugId=F8B7C97D684FB07764756E2164756E21
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wp-typia",
3
- "version": "0.22.1",
3
+ "version": "0.22.2",
4
4
  "description": "Canonical CLI package for wp-typia scaffolding and project workflows",
5
5
  "packageManager": "bun@1.3.11",
6
6
  "type": "module",
@@ -70,7 +70,7 @@
70
70
  "@bunli/tui": "0.6.0",
71
71
  "@bunli/utils": "0.6.0",
72
72
  "@wp-typia/api-client": "^0.4.5",
73
- "@wp-typia/project-tools": "0.22.1",
73
+ "@wp-typia/project-tools": "0.22.2",
74
74
  "better-result": "^2.7.0",
75
75
  "react": "^19.2.5",
76
76
  "react-dom": "^19.2.5",