wp-typia 0.24.8 → 0.24.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.
Files changed (3) hide show
  1. package/README.md +6 -0
  2. package/dist/cli.js +38 -15
  3. package/package.json +2 -2
package/README.md CHANGED
@@ -15,6 +15,12 @@ The published package executes through the Node-first CLI runtime. `bunx` is a
15
15
  supported package-runner invocation, not a requirement for npm-installed
16
16
  commands.
17
17
 
18
+ Generated scaffolds target WordPress 7.0 for `Tested up to` plugin headers by
19
+ default. Pass `--wp-version 6.9` to restore the legacy 6.9 scaffold target; the
20
+ `Requires at least` header remains tied to the selected feature hard floor. Use
21
+ `wp-typia doctor --wp-version-check` to validate workspace headers against
22
+ generated block, ability, and AI feature metadata.
23
+
18
24
  Extend an existing workspace with:
19
25
 
20
26
  - `wp-typia add block counter-card --template basic`
package/dist/cli.js CHANGED
@@ -21,7 +21,7 @@ var package_default;
21
21
  var init_package = __esm(() => {
22
22
  package_default = {
23
23
  name: "wp-typia",
24
- version: "0.24.8",
24
+ version: "0.24.10",
25
25
  description: "Canonical CLI package for wp-typia scaffolding and project workflows",
26
26
  packageManager: "bun@1.3.11",
27
27
  type: "module",
@@ -77,7 +77,7 @@ var init_package = __esm(() => {
77
77
  dependencies: {
78
78
  "@gunshi/plugin-completion": "0.32.0",
79
79
  "@wp-typia/api-client": "^0.4.6",
80
- "@wp-typia/project-tools": "0.24.6",
80
+ "@wp-typia/project-tools": "0.24.8",
81
81
  gunshi: "0.32.0",
82
82
  zod: "4.3.6"
83
83
  },
@@ -1287,7 +1287,8 @@ var init_pattern = __esm(() => {
1287
1287
  const catalogTitle = rawCatalogTitle;
1288
1288
  const tags = normalizePatternTagFlags(context.flags.tags, context.flags.tag);
1289
1289
  const thumbnailUrl = rawThumbnailUrl;
1290
- if (context.flags.tag !== undefined && context.flags.format !== "json") {
1290
+ const legacyTagWarning = context.flags.tag !== undefined ? LEGACY_TAG_FLAG_WARNING : undefined;
1291
+ if (legacyTagWarning && context.flags.format !== "json") {
1291
1292
  context.warnLine(LEGACY_TAG_FLAG_WARNING);
1292
1293
  }
1293
1294
  return {
@@ -1313,6 +1314,7 @@ var init_pattern = __esm(() => {
1313
1314
  patternScope: result.patternScope,
1314
1315
  ...result.sectionRole ? { sectionRole: result.sectionRole } : {}
1315
1316
  }),
1317
+ getWarnings: () => context.flags.format === "json" && legacyTagWarning ? [legacyTagWarning] : undefined,
1316
1318
  warnLine: context.warnLine
1317
1319
  };
1318
1320
  },
@@ -2446,6 +2448,7 @@ function isInteractiveTerminal({
2446
2448
  }
2447
2449
 
2448
2450
  // src/runtime-bridge-add.ts
2451
+ import { HOOKED_BLOCK_POSITION_IDS } from "@wp-typia/project-tools/hooked-blocks";
2449
2452
  import {
2450
2453
  CLI_DIAGNOSTIC_CODES as CLI_DIAGNOSTIC_CODES16,
2451
2454
  createCliDiagnosticCodeError as createCliDiagnosticCodeError12
@@ -2510,6 +2513,14 @@ async function promptForRequiredAddFields(options) {
2510
2513
  }
2511
2514
  const label = REQUIRED_FIELD_PROMPT_LABELS[fieldName];
2512
2515
  const fieldPrompt = await options.getOrCreatePrompt();
2516
+ if (fieldName === "position") {
2517
+ options.flags[fieldName] = await fieldPrompt.select(label, HOOKED_BLOCK_POSITION_IDS.map((position) => ({
2518
+ hint: `Insert relative to the anchor block as ${position}`,
2519
+ label: position,
2520
+ value: position
2521
+ })), 2);
2522
+ continue;
2523
+ }
2513
2524
  options.flags[fieldName] = await fieldPrompt.text(label, "", (value) => value.trim().length > 0 ? true : `${label} is required.`);
2514
2525
  }
2515
2526
  }
@@ -2541,7 +2552,6 @@ async function executeAddCommand({
2541
2552
  };
2542
2553
  let resolvedKind = kind;
2543
2554
  let resolvedName = name;
2544
- let promptedForKind = false;
2545
2555
  if (!resolvedKind && isInteractiveSession && contextAllowsInteractivePrompts(resolvedFlags)) {
2546
2556
  const kindPrompt = await getOrCreatePrompt();
2547
2557
  resolvedKind = await kindPrompt.select("Select what to add", getAddKindOptions().map((option) => ({
@@ -2549,7 +2559,6 @@ async function executeAddCommand({
2549
2559
  label: option.name,
2550
2560
  value: option.value
2551
2561
  })), 1);
2552
- promptedForKind = true;
2553
2562
  }
2554
2563
  if (!resolvedKind) {
2555
2564
  if (shouldPrintMissingAddKindHelp({ emitOutput })) {
@@ -2560,11 +2569,11 @@ async function executeAddCommand({
2560
2569
  if (!isAddKindId(resolvedKind)) {
2561
2570
  throw createCliDiagnosticCodeError12(CLI_DIAGNOSTIC_CODES16.INVALID_COMMAND, `Unknown add kind "${resolvedKind}". Expected one of: ${formatAddKindList()}.`);
2562
2571
  }
2563
- if (!resolvedName && promptedForKind) {
2572
+ if (!resolvedName && isInteractiveSession && contextAllowsInteractivePrompts(resolvedFlags)) {
2564
2573
  const namePrompt = await getOrCreatePrompt();
2565
2574
  resolvedName = await namePrompt.text(getAddNameLabel(resolvedKind), "", (value) => value.trim().length > 0 ? true : `${getAddNameLabel(resolvedKind)} is required.`);
2566
2575
  }
2567
- if (promptedForKind) {
2576
+ if (isInteractiveSession && contextAllowsInteractivePrompts(resolvedFlags)) {
2568
2577
  await promptForRequiredAddFields({
2569
2578
  flags: resolvedFlags,
2570
2579
  getOrCreatePrompt,
@@ -2698,6 +2707,7 @@ async function executeCreateCommand({
2698
2707
  withMigrationUi: flags["with-migration-ui"],
2699
2708
  withTestPreset: flags["with-test-preset"],
2700
2709
  withWpEnv: flags["with-wp-env"],
2710
+ wpVersion: readOptionalLooseStringFlag(flags, "wp-version"),
2701
2711
  yes: effectiveYes
2702
2712
  });
2703
2713
  const payload = flow.dryRun && flow.plan ? buildCreateDryRunPayload({
@@ -2755,7 +2765,10 @@ var init_runtime_bridge_create = __esm(() => {
2755
2765
  async function executeDoctorCommand(cwd, options = {}) {
2756
2766
  try {
2757
2767
  const { runDoctor } = await loadCliDoctorRuntime();
2758
- await runDoctor(cwd, { exitPolicy: options.exitPolicy });
2768
+ await runDoctor(cwd, {
2769
+ exitPolicy: options.exitPolicy,
2770
+ wordpressVersionCheck: options.wordpressVersionCheck
2771
+ });
2759
2772
  } catch (error) {
2760
2773
  throw await wrapCliCommandError("doctor", error);
2761
2774
  }
@@ -2945,13 +2958,13 @@ import {
2945
2958
  CLI_DIAGNOSTIC_CODES as CLI_DIAGNOSTIC_CODES19,
2946
2959
  createCliCommandError as createCliCommandError8
2947
2960
  } from "@wp-typia/project-tools/cli-diagnostics";
2948
- async function renderPortableCliDoctorJson(cwd, exitPolicy, printLine) {
2961
+ async function renderPortableCliDoctorJson(cwd, exitPolicy, wordpressVersionCheck, printLine) {
2949
2962
  const {
2950
2963
  createDoctorRunSummary,
2951
2964
  getDoctorChecks,
2952
2965
  getDoctorExitFailureDetailLines
2953
2966
  } = await import("@wp-typia/project-tools/cli-doctor");
2954
- const checks = await getDoctorChecks(cwd);
2967
+ const checks = await getDoctorChecks(cwd, { wordpressVersionCheck });
2955
2968
  const summary = createDoctorRunSummary(checks, { exitPolicy });
2956
2969
  printLine(JSON.stringify({
2957
2970
  checks,
@@ -2972,11 +2985,12 @@ async function dispatchPortableCliDoctor({
2972
2985
  printLine
2973
2986
  }) {
2974
2987
  const exitPolicy = mergedFlags["workspace-only"] ? "workspace-only" : "strict";
2988
+ const wordpressVersionCheck = Boolean(mergedFlags["wp-version-check"]);
2975
2989
  if (mergedFlags.format === "json") {
2976
- await renderPortableCliDoctorJson(cwd, exitPolicy, printLine);
2990
+ await renderPortableCliDoctorJson(cwd, exitPolicy, wordpressVersionCheck, printLine);
2977
2991
  return;
2978
2992
  }
2979
- await executeDoctorCommand(cwd, { exitPolicy });
2993
+ await executeDoctorCommand(cwd, { exitPolicy, wordpressVersionCheck });
2980
2994
  }
2981
2995
  var init_doctor = __esm(() => {
2982
2996
  init_runtime_bridge();
@@ -3605,6 +3619,10 @@ var CREATE_OPTION_METADATA = {
3605
3619
  description: "Include a local wp-env preset.",
3606
3620
  type: "boolean"
3607
3621
  },
3622
+ "wp-version": {
3623
+ description: "WordPress target for generated plugin headers; one of 6.9 or 7.0. Defaults to 7.0.",
3624
+ type: "string"
3625
+ },
3608
3626
  yes: {
3609
3627
  argumentKind: "flag",
3610
3628
  description: "Accept defaults without prompt fallbacks.",
@@ -3622,6 +3640,11 @@ var DOCTOR_OPTION_METADATA = {
3622
3640
  argumentKind: "flag",
3623
3641
  description: "Fail only on workspace-scoped doctor checks; environment/runtime failures remain advisory in JSON summaries.",
3624
3642
  type: "boolean"
3643
+ },
3644
+ "wp-version-check": {
3645
+ argumentKind: "flag",
3646
+ description: "Check generated WordPress feature floors against plugin bootstrap headers and the current scaffold target.",
3647
+ type: "boolean"
3625
3648
  }
3626
3649
  };
3627
3650
  // src/command-options/global.ts
@@ -4384,9 +4407,9 @@ var PORTABLE_CLI_COMMAND_HELP_CONFIG = {
4384
4407
  },
4385
4408
  doctor: {
4386
4409
  bodyLines: [
4387
- "Runs read-only environment readiness checks. Official wp-typia workspace roots also get inventory, source-tree drift, iframe/API v3 compatibility, and shared convention checks. Use --workspace-only for CI gates that should fail only on workspace-scoped checks while keeping environment failures advisory."
4410
+ "Runs read-only environment readiness checks. Official wp-typia workspace roots also get inventory, source-tree drift, iframe/API v3 compatibility, and shared convention checks. Use --workspace-only for CI gates that should fail only on workspace-scoped checks while keeping environment failures advisory. Use --wp-version-check to compare generated feature floors with plugin bootstrap headers."
4388
4411
  ],
4389
- heading: "Usage: wp-typia doctor [--format json] [--workspace-only]",
4412
+ heading: "Usage: wp-typia doctor [--format json] [--workspace-only] [--wp-version-check]",
4390
4413
  optionMetadata: DOCTOR_OPTION_METADATA
4391
4414
  },
4392
4415
  mcp: {
@@ -5986,4 +6009,4 @@ export {
5986
6009
  runGunshiCli
5987
6010
  };
5988
6011
 
5989
- //# debugId=C5F9F3777C8262A064756E2164756E21
6012
+ //# debugId=44BF5956FBE186F864756E2164756E21
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wp-typia",
3
- "version": "0.24.8",
3
+ "version": "0.24.10",
4
4
  "description": "Canonical CLI package for wp-typia scaffolding and project workflows",
5
5
  "packageManager": "bun@1.3.11",
6
6
  "type": "module",
@@ -56,7 +56,7 @@
56
56
  "dependencies": {
57
57
  "@gunshi/plugin-completion": "0.32.0",
58
58
  "@wp-typia/api-client": "^0.4.6",
59
- "@wp-typia/project-tools": "0.24.6",
59
+ "@wp-typia/project-tools": "0.24.8",
60
60
  "gunshi": "0.32.0",
61
61
  "zod": "4.3.6"
62
62
  },