wp-typia 0.22.4 → 0.22.5
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.
- package/dist-bunli/.bunli/commands.gen.js +280 -349
- package/dist-bunli/{cli-add-6s6kzf7x.js → cli-add-1gqgshf0.js} +14 -126
- package/dist-bunli/{cli-6ymn63t4.js → cli-ctddkm3n.js} +2 -2
- package/dist-bunli/{cli-doctor-70zd5m3b.js → cli-doctor-w35s8y9w.js} +1 -1
- package/dist-bunli/{cli-init-kjjyky1y.js → cli-init-z8sjmkvc.js} +1 -1
- package/dist-bunli/{cli-qr2ek735.js → cli-j30rk466.js} +250 -219
- package/dist-bunli/{cli-gsj6vyn5.js → cli-nzwpmw4y.js} +89 -53
- package/dist-bunli/{cli-scaffold-f57ccf5v.js → cli-scaffold-ad3bd555.js} +3 -3
- package/dist-bunli/{cli-2mt6bvcj.js → cli-xbzfx7qz.js} +1 -1
- package/dist-bunli/cli.js +5 -4
- package/dist-bunli/{command-list-wsaa4t2p.js → command-list-scd6zqp8.js} +7 -7
- package/dist-bunli/{migrations-vw502qf9.js → migrations-skkzdvhm.js} +2 -2
- package/dist-bunli/node-cli.js +69 -96
- package/package.json +2 -2
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
// package.json
|
|
12
12
|
var package_default = {
|
|
13
13
|
name: "wp-typia",
|
|
14
|
-
version: "0.22.
|
|
14
|
+
version: "0.22.5",
|
|
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.
|
|
84
|
+
"@wp-typia/project-tools": "0.22.5",
|
|
85
85
|
"better-result": "^2.7.0",
|
|
86
86
|
react: "^19.2.5",
|
|
87
87
|
"react-dom": "^19.2.5",
|
|
@@ -103,6 +103,51 @@ var package_default = {
|
|
|
103
103
|
}
|
|
104
104
|
};
|
|
105
105
|
|
|
106
|
+
// bin/argv-walker.js
|
|
107
|
+
function normalizeOptionSet(values) {
|
|
108
|
+
return values instanceof Set ? values : new Set(values);
|
|
109
|
+
}
|
|
110
|
+
function collectPositionalIndexes(argv, metadata) {
|
|
111
|
+
const longValueOptionSet = normalizeOptionSet(metadata.longValueOptions);
|
|
112
|
+
const shortValueOptionSet = normalizeOptionSet(metadata.shortValueOptions);
|
|
113
|
+
const positionalIndexes = [];
|
|
114
|
+
for (let index = 0;index < argv.length; index += 1) {
|
|
115
|
+
const arg = argv[index];
|
|
116
|
+
if (arg === "--") {
|
|
117
|
+
for (let restIndex = index + 1;restIndex < argv.length; restIndex += 1) {
|
|
118
|
+
positionalIndexes.push(restIndex);
|
|
119
|
+
}
|
|
120
|
+
break;
|
|
121
|
+
}
|
|
122
|
+
if (!arg.startsWith("-") || arg === "-") {
|
|
123
|
+
positionalIndexes.push(index);
|
|
124
|
+
continue;
|
|
125
|
+
}
|
|
126
|
+
if (arg.startsWith("--")) {
|
|
127
|
+
if (arg.includes("=")) {
|
|
128
|
+
continue;
|
|
129
|
+
}
|
|
130
|
+
const next = argv[index + 1];
|
|
131
|
+
if (longValueOptionSet.has(arg) && next && !next.startsWith("-")) {
|
|
132
|
+
index += 1;
|
|
133
|
+
}
|
|
134
|
+
continue;
|
|
135
|
+
}
|
|
136
|
+
if (arg.length === 2 && shortValueOptionSet.has(arg) && argv[index + 1] && !argv[index + 1].startsWith("-")) {
|
|
137
|
+
index += 1;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
return positionalIndexes;
|
|
141
|
+
}
|
|
142
|
+
function findFirstPositionalIndex(argv, metadata) {
|
|
143
|
+
const positionalIndexes = collectPositionalIndexes(argv, metadata);
|
|
144
|
+
return positionalIndexes[0] ?? -1;
|
|
145
|
+
}
|
|
146
|
+
function findFirstPositional(argv, metadata) {
|
|
147
|
+
const firstPositionalIndex = findFirstPositionalIndex(argv, metadata);
|
|
148
|
+
return firstPositionalIndex === -1 ? undefined : argv[firstPositionalIndex];
|
|
149
|
+
}
|
|
150
|
+
|
|
106
151
|
// src/command-option-metadata.ts
|
|
107
152
|
var CREATE_OPTION_METADATA = {
|
|
108
153
|
"alternate-render-targets": {
|
|
@@ -334,7 +379,7 @@ var SYNC_OPTION_METADATA = {
|
|
|
334
379
|
};
|
|
335
380
|
var DOCTOR_OPTION_METADATA = {
|
|
336
381
|
format: {
|
|
337
|
-
description: "Use `json` for machine-readable doctor check output or `
|
|
382
|
+
description: "Use `json` for machine-readable doctor check output or `text` for human-readable output.",
|
|
338
383
|
type: "string"
|
|
339
384
|
}
|
|
340
385
|
};
|
|
@@ -351,7 +396,7 @@ var GLOBAL_OPTION_METADATA = {
|
|
|
351
396
|
type: "string"
|
|
352
397
|
},
|
|
353
398
|
format: {
|
|
354
|
-
description: "Output format for supported commands (`json` or `
|
|
399
|
+
description: "Output format for supported commands (`json` or `text`).",
|
|
355
400
|
type: "string"
|
|
356
401
|
},
|
|
357
402
|
id: {
|
|
@@ -511,65 +556,56 @@ function resolveCommandOptionValues(metadata, options) {
|
|
|
511
556
|
return resolved;
|
|
512
557
|
}
|
|
513
558
|
|
|
514
|
-
//
|
|
515
|
-
function
|
|
516
|
-
return
|
|
559
|
+
// src/cli-command-resolution.ts
|
|
560
|
+
function resolveEntrypointCliCommand(argv) {
|
|
561
|
+
return findFirstPositional(argv, COMMAND_ROUTING_METADATA) ?? "wp-typia";
|
|
517
562
|
}
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
563
|
+
|
|
564
|
+
// src/cli-output-format.ts
|
|
565
|
+
var PUBLIC_CLI_OUTPUT_FORMATS = ["json", "text"];
|
|
566
|
+
var LEGACY_CLI_OUTPUT_FORMAT_ALIASES = ["toon"];
|
|
567
|
+
var SUPPORTED_CLI_OUTPUT_FORMATS = [
|
|
568
|
+
...PUBLIC_CLI_OUTPUT_FORMATS,
|
|
569
|
+
...LEGACY_CLI_OUTPUT_FORMAT_ALIASES
|
|
570
|
+
];
|
|
571
|
+
var SUPPORTED_CLI_OUTPUT_FORMAT_VALUES = SUPPORTED_CLI_OUTPUT_FORMATS;
|
|
572
|
+
function formatSupportedCliOutputFormats() {
|
|
573
|
+
return PUBLIC_CLI_OUTPUT_FORMATS.join(", ");
|
|
574
|
+
}
|
|
575
|
+
function isSupportedCliOutputFormat(value) {
|
|
576
|
+
return typeof value === "string" && SUPPORTED_CLI_OUTPUT_FORMAT_VALUES.includes(value);
|
|
577
|
+
}
|
|
578
|
+
function normalizeCliOutputFormatArgv(argv) {
|
|
579
|
+
let normalized;
|
|
522
580
|
for (let index = 0;index < argv.length; index += 1) {
|
|
523
581
|
const arg = argv[index];
|
|
582
|
+
if (!arg) {
|
|
583
|
+
continue;
|
|
584
|
+
}
|
|
524
585
|
if (arg === "--") {
|
|
525
|
-
for (let restIndex = index + 1;restIndex < argv.length; restIndex += 1) {
|
|
526
|
-
positionalIndexes.push(restIndex);
|
|
527
|
-
}
|
|
528
586
|
break;
|
|
529
587
|
}
|
|
530
|
-
if (
|
|
531
|
-
positionalIndexes.push(index);
|
|
532
|
-
continue;
|
|
533
|
-
}
|
|
534
|
-
if (arg.startsWith("--")) {
|
|
535
|
-
if (arg.includes("=")) {
|
|
536
|
-
continue;
|
|
537
|
-
}
|
|
588
|
+
if (arg === "--format") {
|
|
538
589
|
const next = argv[index + 1];
|
|
539
|
-
if (
|
|
590
|
+
if (next === "text") {
|
|
591
|
+
normalized ??= [...argv];
|
|
592
|
+
normalized[index + 1] = "toon";
|
|
593
|
+
}
|
|
594
|
+
if (next && !next.startsWith("-")) {
|
|
540
595
|
index += 1;
|
|
541
596
|
}
|
|
542
597
|
continue;
|
|
543
598
|
}
|
|
544
|
-
if (arg
|
|
545
|
-
|
|
599
|
+
if (arg === "--format=text") {
|
|
600
|
+
normalized ??= [...argv];
|
|
601
|
+
normalized[index] = "--format=toon";
|
|
546
602
|
}
|
|
547
603
|
}
|
|
548
|
-
return
|
|
549
|
-
}
|
|
550
|
-
function findFirstPositionalIndex(argv, metadata) {
|
|
551
|
-
const positionalIndexes = collectPositionalIndexes(argv, metadata);
|
|
552
|
-
return positionalIndexes[0] ?? -1;
|
|
553
|
-
}
|
|
554
|
-
function findFirstPositional(argv, metadata) {
|
|
555
|
-
const firstPositionalIndex = findFirstPositionalIndex(argv, metadata);
|
|
556
|
-
return firstPositionalIndex === -1 ? undefined : argv[firstPositionalIndex];
|
|
557
|
-
}
|
|
558
|
-
|
|
559
|
-
// src/cli-output-format.ts
|
|
560
|
-
var SUPPORTED_CLI_OUTPUT_FORMATS = ["json", "toon"];
|
|
561
|
-
function formatSupportedCliOutputFormats() {
|
|
562
|
-
return SUPPORTED_CLI_OUTPUT_FORMATS.join(", ");
|
|
563
|
-
}
|
|
564
|
-
function isSupportedCliOutputFormat(value) {
|
|
565
|
-
return SUPPORTED_CLI_OUTPUT_FORMATS.includes(value);
|
|
604
|
+
return normalized ?? argv;
|
|
566
605
|
}
|
|
567
606
|
function formatInvalidCliOutputFormatMessage(value) {
|
|
568
607
|
return `Invalid --format value "${value}". Supported values: ${formatSupportedCliOutputFormats()}.`;
|
|
569
608
|
}
|
|
570
|
-
function resolveEntrypointCliCommand(argv) {
|
|
571
|
-
return findFirstPositional(argv, COMMAND_ROUTING_METADATA) ?? "wp-typia";
|
|
572
|
-
}
|
|
573
609
|
function assertSupportedCliOutputFormat(value, argv) {
|
|
574
610
|
if (isSupportedCliOutputFormat(value)) {
|
|
575
611
|
return;
|
|
@@ -607,9 +643,6 @@ function validateCliOutputFormatArgv(argv) {
|
|
|
607
643
|
}
|
|
608
644
|
|
|
609
645
|
// src/cli-diagnostic-output.ts
|
|
610
|
-
function resolveEntrypointCliCommand2(argv) {
|
|
611
|
-
return findFirstPositional(argv, COMMAND_ROUTING_METADATA) ?? "wp-typia";
|
|
612
|
-
}
|
|
613
646
|
function writeStructuredCliJsonToStderr(payload) {
|
|
614
647
|
process.stderr.write(`${JSON.stringify(payload, null, 2)}
|
|
615
648
|
`);
|
|
@@ -633,7 +666,10 @@ function prefersStructuredCliArgv(argv) {
|
|
|
633
666
|
return false;
|
|
634
667
|
}
|
|
635
668
|
function prefersStructuredCliOutput(args) {
|
|
636
|
-
|
|
669
|
+
if (args.formatExplicit) {
|
|
670
|
+
return args.format === "json" && isSupportedCliOutputFormat(args.format);
|
|
671
|
+
}
|
|
672
|
+
return Boolean(args.agent) || Boolean(args.context?.store?.isAIAgent);
|
|
637
673
|
}
|
|
638
674
|
function emitCliDiagnosticFailure(args, options) {
|
|
639
675
|
const diagnostic = createCliCommandError(options);
|
|
@@ -654,7 +690,7 @@ function writeStructuredCliDiagnosticError(argv, error) {
|
|
|
654
690
|
}
|
|
655
691
|
writeStructuredCliJsonToStderr({
|
|
656
692
|
error: serializeCliDiagnosticError(createCliCommandError({
|
|
657
|
-
command:
|
|
693
|
+
command: resolveEntrypointCliCommand(argv),
|
|
658
694
|
error
|
|
659
695
|
})),
|
|
660
696
|
ok: false
|
|
@@ -902,6 +938,6 @@ function getMcpSchemaSources(config) {
|
|
|
902
938
|
function createPlugin(input) {
|
|
903
939
|
return input;
|
|
904
940
|
}
|
|
905
|
-
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,
|
|
941
|
+
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, extractKnownOptionValuesFromArgv, resolveCommandOptionValues, normalizeCliOutputFormatArgv, validateCliOutputFormatArgv, 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 };
|
|
906
942
|
|
|
907
|
-
//# debugId=
|
|
943
|
+
//# debugId=B9D55210C12B16C464756E2164756E21
|
|
@@ -19,9 +19,9 @@ import {
|
|
|
19
19
|
resolvePackageManagerId,
|
|
20
20
|
resolveTemplateId,
|
|
21
21
|
scaffoldProject
|
|
22
|
-
} from "./cli-
|
|
22
|
+
} from "./cli-ctddkm3n.js";
|
|
23
23
|
import"./cli-1sm60g1z.js";
|
|
24
|
-
import"./cli-
|
|
24
|
+
import"./cli-xbzfx7qz.js";
|
|
25
25
|
import"./cli-hb9vpsev.js";
|
|
26
26
|
import"./cli-bq2v559b.js";
|
|
27
27
|
import"./cli-10pe4mf8.js";
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
OFFICIAL_WORKSPACE_TEMPLATE_PACKAGE,
|
|
30
30
|
isBuiltInTemplateId
|
|
31
31
|
} from "./cli-tke8twkn.js";
|
|
32
|
-
import"./cli-
|
|
32
|
+
import"./cli-j30rk466.js";
|
|
33
33
|
import {
|
|
34
34
|
createManagedTempRoot
|
|
35
35
|
} from "./cli-t73q5aqz.js";
|
package/dist-bunli/cli.js
CHANGED
|
@@ -17,10 +17,11 @@ import {
|
|
|
17
17
|
loadWpTypiaUserConfig,
|
|
18
18
|
loadWpTypiaUserConfigFromSource,
|
|
19
19
|
mergeWpTypiaUserConfig,
|
|
20
|
+
normalizeCliOutputFormatArgv,
|
|
20
21
|
package_default,
|
|
21
22
|
validateCliOutputFormatArgv,
|
|
22
23
|
writeStructuredCliDiagnosticError
|
|
23
|
-
} from "./cli-
|
|
24
|
+
} from "./cli-nzwpmw4y.js";
|
|
24
25
|
import"./cli-03j0axbt.js";
|
|
25
26
|
import {
|
|
26
27
|
GLOBAL_FLAGS,
|
|
@@ -2454,7 +2455,7 @@ async function formatCliError(error) {
|
|
|
2454
2455
|
}
|
|
2455
2456
|
async function createWpTypiaCli(options = {}) {
|
|
2456
2457
|
applyStandaloneSupportLayoutEnv();
|
|
2457
|
-
const { wpTypiaCommands } = await import("./command-list-
|
|
2458
|
+
const { wpTypiaCommands } = await import("./command-list-scd6zqp8.js");
|
|
2458
2459
|
const cli = await createCLI({
|
|
2459
2460
|
...bunliConfig,
|
|
2460
2461
|
description: package_default.description,
|
|
@@ -2490,7 +2491,7 @@ async function main(argv = process.argv.slice(2)) {
|
|
|
2490
2491
|
const { argv: cliArgv, configOverridePath } = extractWpTypiaConfigOverride(normalizedArgv);
|
|
2491
2492
|
validateCliOutputFormatArgv(cliArgv);
|
|
2492
2493
|
const cli = await createWpTypiaCli({ configOverridePath });
|
|
2493
|
-
await cli.run(cliArgv);
|
|
2494
|
+
await cli.run(normalizeCliOutputFormatArgv(cliArgv));
|
|
2494
2495
|
}
|
|
2495
2496
|
async function runCliEntrypoint(argv = process.argv.slice(2)) {
|
|
2496
2497
|
try {
|
|
@@ -2514,4 +2515,4 @@ export {
|
|
|
2514
2515
|
createWpTypiaCli
|
|
2515
2516
|
};
|
|
2516
2517
|
|
|
2517
|
-
//# debugId=
|
|
2518
|
+
//# debugId=47FFF7F809C451D764756E2164756E21
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
package_default,
|
|
19
19
|
prefersStructuredCliOutput,
|
|
20
20
|
resolveCommandOptionValues
|
|
21
|
-
} from "./cli-
|
|
21
|
+
} from "./cli-nzwpmw4y.js";
|
|
22
22
|
import {
|
|
23
23
|
Result,
|
|
24
24
|
TaggedError,
|
|
@@ -1380,14 +1380,14 @@ async function executeSyncCommand({
|
|
|
1380
1380
|
}
|
|
1381
1381
|
|
|
1382
1382
|
// src/runtime-bridge.ts
|
|
1383
|
-
var loadCliAddRuntime = () => import("./cli-add-
|
|
1383
|
+
var loadCliAddRuntime = () => import("./cli-add-1gqgshf0.js");
|
|
1384
1384
|
var loadCliDiagnosticsRuntime = () => import("./cli-diagnostics-5dvztm7q.js");
|
|
1385
|
-
var loadCliDoctorRuntime = () => import("./cli-doctor-
|
|
1386
|
-
var loadCliInitRuntime = () => import("./cli-init-
|
|
1385
|
+
var loadCliDoctorRuntime = () => import("./cli-doctor-w35s8y9w.js");
|
|
1386
|
+
var loadCliInitRuntime = () => import("./cli-init-z8sjmkvc.js");
|
|
1387
1387
|
var loadCliPromptRuntime = () => import("./cli-prompt-614tq57c.js");
|
|
1388
|
-
var loadCliScaffoldRuntime = () => import("./cli-scaffold-
|
|
1388
|
+
var loadCliScaffoldRuntime = () => import("./cli-scaffold-ad3bd555.js");
|
|
1389
1389
|
var loadCliTemplatesRuntime = () => import("./cli-templates-9t2a7zqd.js");
|
|
1390
|
-
var loadMigrationsRuntime = () => import("./migrations-
|
|
1390
|
+
var loadMigrationsRuntime = () => import("./migrations-skkzdvhm.js");
|
|
1391
1391
|
async function wrapCliCommandError(command, error) {
|
|
1392
1392
|
const { createCliCommandError } = await loadCliDiagnosticsRuntime();
|
|
1393
1393
|
return createCliCommandError({ command, error });
|
|
@@ -2335,7 +2335,7 @@ var doctorCommand = defineCommand({
|
|
|
2335
2335
|
const prefersStructuredOutput = prefersStructuredCliOutput(args);
|
|
2336
2336
|
if (prefersStructuredOutput) {
|
|
2337
2337
|
const [{ getDoctorChecks }, { getDoctorFailureDetailLines }] = await Promise.all([
|
|
2338
|
-
import("./cli-doctor-
|
|
2338
|
+
import("./cli-doctor-w35s8y9w.js"),
|
|
2339
2339
|
import("./cli-diagnostics-5dvztm7q.js")
|
|
2340
2340
|
]);
|
|
2341
2341
|
const checks = await getDoctorChecks(args.cwd);
|
|
@@ -15,10 +15,10 @@ import {
|
|
|
15
15
|
snapshotProjectVersion,
|
|
16
16
|
verifyProjectMigrations,
|
|
17
17
|
wizardProjectMigrations
|
|
18
|
-
} from "./cli-
|
|
18
|
+
} from "./cli-xbzfx7qz.js";
|
|
19
19
|
import"./cli-hb9vpsev.js";
|
|
20
20
|
import"./cli-bq2v559b.js";
|
|
21
|
-
import"./cli-
|
|
21
|
+
import"./cli-j30rk466.js";
|
|
22
22
|
import"./cli-btbpt84c.js";
|
|
23
23
|
import"./cli-6bhfzq5e.js";
|
|
24
24
|
import"./cli-xnn9xjcy.js";
|
package/dist-bunli/node-cli.js
CHANGED
|
@@ -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.
|
|
6
|
+
version: "0.22.5",
|
|
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.
|
|
76
|
+
"@wp-typia/project-tools": "0.22.5",
|
|
77
77
|
"better-result": "^2.7.0",
|
|
78
78
|
react: "^19.2.5",
|
|
79
79
|
"react-dom": "^19.2.5",
|
|
@@ -336,7 +336,7 @@ var SYNC_OPTION_METADATA = {
|
|
|
336
336
|
};
|
|
337
337
|
var DOCTOR_OPTION_METADATA = {
|
|
338
338
|
format: {
|
|
339
|
-
description: "Use `json` for machine-readable doctor check output or `
|
|
339
|
+
description: "Use `json` for machine-readable doctor check output or `text` for human-readable output.",
|
|
340
340
|
type: "string"
|
|
341
341
|
}
|
|
342
342
|
};
|
|
@@ -353,7 +353,7 @@ var GLOBAL_OPTION_METADATA = {
|
|
|
353
353
|
type: "string"
|
|
354
354
|
},
|
|
355
355
|
format: {
|
|
356
|
-
description: "Output format for supported commands (`json` or `
|
|
356
|
+
description: "Output format for supported commands (`json` or `text`).",
|
|
357
357
|
type: "string"
|
|
358
358
|
},
|
|
359
359
|
id: {
|
|
@@ -584,12 +584,6 @@ import {
|
|
|
584
584
|
serializeCliDiagnosticError
|
|
585
585
|
} from "@wp-typia/project-tools/cli-diagnostics";
|
|
586
586
|
|
|
587
|
-
// src/cli-output-format.ts
|
|
588
|
-
import {
|
|
589
|
-
CLI_DIAGNOSTIC_CODES,
|
|
590
|
-
createCliCommandError
|
|
591
|
-
} from "@wp-typia/project-tools/cli-diagnostics";
|
|
592
|
-
|
|
593
587
|
// bin/argv-walker.js
|
|
594
588
|
function normalizeOptionSet(values) {
|
|
595
589
|
return values instanceof Set ? values : new Set(values);
|
|
@@ -635,20 +629,32 @@ function findFirstPositional(argv, metadata) {
|
|
|
635
629
|
return firstPositionalIndex === -1 ? undefined : argv[firstPositionalIndex];
|
|
636
630
|
}
|
|
637
631
|
|
|
632
|
+
// src/cli-command-resolution.ts
|
|
633
|
+
function resolveEntrypointCliCommand(argv) {
|
|
634
|
+
return findFirstPositional(argv, COMMAND_ROUTING_METADATA) ?? "wp-typia";
|
|
635
|
+
}
|
|
636
|
+
|
|
638
637
|
// src/cli-output-format.ts
|
|
639
|
-
|
|
638
|
+
import {
|
|
639
|
+
CLI_DIAGNOSTIC_CODES,
|
|
640
|
+
createCliCommandError
|
|
641
|
+
} from "@wp-typia/project-tools/cli-diagnostics";
|
|
642
|
+
var PUBLIC_CLI_OUTPUT_FORMATS = ["json", "text"];
|
|
643
|
+
var LEGACY_CLI_OUTPUT_FORMAT_ALIASES = ["toon"];
|
|
644
|
+
var SUPPORTED_CLI_OUTPUT_FORMATS = [
|
|
645
|
+
...PUBLIC_CLI_OUTPUT_FORMATS,
|
|
646
|
+
...LEGACY_CLI_OUTPUT_FORMAT_ALIASES
|
|
647
|
+
];
|
|
648
|
+
var SUPPORTED_CLI_OUTPUT_FORMAT_VALUES = SUPPORTED_CLI_OUTPUT_FORMATS;
|
|
640
649
|
function formatSupportedCliOutputFormats() {
|
|
641
|
-
return
|
|
650
|
+
return PUBLIC_CLI_OUTPUT_FORMATS.join(", ");
|
|
642
651
|
}
|
|
643
652
|
function isSupportedCliOutputFormat(value) {
|
|
644
|
-
return
|
|
653
|
+
return typeof value === "string" && SUPPORTED_CLI_OUTPUT_FORMAT_VALUES.includes(value);
|
|
645
654
|
}
|
|
646
655
|
function formatInvalidCliOutputFormatMessage(value) {
|
|
647
656
|
return `Invalid --format value "${value}". Supported values: ${formatSupportedCliOutputFormats()}.`;
|
|
648
657
|
}
|
|
649
|
-
function resolveEntrypointCliCommand(argv) {
|
|
650
|
-
return findFirstPositional(argv, COMMAND_ROUTING_METADATA) ?? "wp-typia";
|
|
651
|
-
}
|
|
652
658
|
function assertSupportedCliOutputFormat(value, argv) {
|
|
653
659
|
if (isSupportedCliOutputFormat(value)) {
|
|
654
660
|
return;
|
|
@@ -2789,9 +2795,9 @@ var NODE_FALLBACK_RUNTIME_SUMMARY_LINES = [
|
|
|
2789
2795
|
`Install Bun 1.3.11+ or use \`bunx wp-typia ...\` for the full Bunli/OpenTUI runtime and Bun-only command surfaces such as \`skills\`, \`completions\`, and \`mcp\`. ${STANDALONE_GUIDANCE_LINE}`,
|
|
2790
2796
|
"Output markers: WP_TYPIA_ASCII=1 forces ASCII markers, WP_TYPIA_ASCII=0 opts back into Unicode markers, and non-empty NO_COLOR requests ASCII markers when WP_TYPIA_ASCII is unset."
|
|
2791
2797
|
];
|
|
2792
|
-
|
|
2798
|
+
var printLine = (line) => {
|
|
2793
2799
|
console.log(line);
|
|
2794
|
-
}
|
|
2800
|
+
};
|
|
2795
2801
|
function printBlock2(lines) {
|
|
2796
2802
|
for (const line of lines) {
|
|
2797
2803
|
printLine(line);
|
|
@@ -2878,91 +2884,58 @@ function renderGeneralHelp() {
|
|
|
2878
2884
|
`- ${WP_TYPIA_POSITIONAL_ALIAS_USAGE}`
|
|
2879
2885
|
]);
|
|
2880
2886
|
}
|
|
2881
|
-
function
|
|
2882
|
-
printBlock2([
|
|
2883
|
-
"wp-typia templates <list|inspect>",
|
|
2884
|
-
"",
|
|
2885
|
-
...NODE_FALLBACK_RUNTIME_SUMMARY_LINES,
|
|
2886
|
-
"",
|
|
2887
|
-
"Supported flags:",
|
|
2888
|
-
...formatNodeFallbackOptionHelp(TEMPLATES_OPTION_METADATA)
|
|
2889
|
-
]);
|
|
2890
|
-
}
|
|
2891
|
-
function renderCreateHelp() {
|
|
2892
|
-
printBlock2([
|
|
2893
|
-
`Usage: ${WP_TYPIA_CANONICAL_CREATE_USAGE}`,
|
|
2894
|
-
"",
|
|
2895
|
-
...NODE_FALLBACK_RUNTIME_SUMMARY_LINES,
|
|
2896
|
-
"",
|
|
2897
|
-
"Supported flags:",
|
|
2898
|
-
...formatNodeFallbackOptionHelp(CREATE_OPTION_METADATA)
|
|
2899
|
-
]);
|
|
2900
|
-
}
|
|
2901
|
-
function renderInitHelp() {
|
|
2902
|
-
printBlock2([
|
|
2903
|
-
"Usage: wp-typia init [project-dir]",
|
|
2904
|
-
"",
|
|
2905
|
-
...NODE_FALLBACK_RUNTIME_SUMMARY_LINES,
|
|
2906
|
-
"",
|
|
2907
|
-
"Preview-by-default retrofit planner for existing WordPress block or plugin projects. Re-run with --apply to write package.json updates and helper scripts.",
|
|
2908
|
-
"",
|
|
2909
|
-
"Supported flags:",
|
|
2910
|
-
...formatNodeFallbackOptionHelp(INIT_OPTION_METADATA)
|
|
2911
|
-
]);
|
|
2912
|
-
}
|
|
2913
|
-
function renderAddHelp() {
|
|
2914
|
-
printBlock2([
|
|
2915
|
-
"Usage: wp-typia add <kind> <name>",
|
|
2916
|
-
"",
|
|
2917
|
-
...NODE_FALLBACK_RUNTIME_SUMMARY_LINES,
|
|
2918
|
-
"",
|
|
2919
|
-
`Supported kinds: ${formatAddKindList()}`,
|
|
2920
|
-
"",
|
|
2921
|
-
"Supported flags:",
|
|
2922
|
-
...formatNodeFallbackOptionHelp(ADD_OPTION_METADATA)
|
|
2923
|
-
]);
|
|
2924
|
-
}
|
|
2925
|
-
function renderMigrateHelp() {
|
|
2926
|
-
printBlock2([
|
|
2927
|
-
`Usage: ${WP_TYPIA_CANONICAL_MIGRATE_USAGE}`,
|
|
2928
|
-
"",
|
|
2929
|
-
...NODE_FALLBACK_RUNTIME_SUMMARY_LINES,
|
|
2930
|
-
"",
|
|
2931
|
-
"Supported flags:",
|
|
2932
|
-
...formatNodeFallbackOptionHelp(MIGRATE_OPTION_METADATA)
|
|
2933
|
-
]);
|
|
2934
|
-
}
|
|
2935
|
-
function renderSyncHelp() {
|
|
2887
|
+
function renderNodeFallbackCommandHelp(config) {
|
|
2936
2888
|
printBlock2([
|
|
2937
|
-
|
|
2889
|
+
config.heading,
|
|
2938
2890
|
"",
|
|
2939
2891
|
...NODE_FALLBACK_RUNTIME_SUMMARY_LINES,
|
|
2940
2892
|
"",
|
|
2893
|
+
...config.bodyLines ? [...config.bodyLines, ""] : [],
|
|
2941
2894
|
"Supported flags:",
|
|
2942
|
-
...formatNodeFallbackOptionHelp(
|
|
2895
|
+
...formatNodeFallbackOptionHelp(config.optionMetadata)
|
|
2943
2896
|
]);
|
|
2944
2897
|
}
|
|
2945
|
-
|
|
2946
|
-
|
|
2947
|
-
|
|
2948
|
-
"",
|
|
2949
|
-
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
|
|
2953
|
-
|
|
2954
|
-
|
|
2955
|
-
|
|
2956
|
-
|
|
2957
|
-
|
|
2958
|
-
|
|
2959
|
-
|
|
2960
|
-
|
|
2961
|
-
|
|
2962
|
-
|
|
2963
|
-
|
|
2964
|
-
|
|
2898
|
+
var NODE_FALLBACK_COMMAND_HELP_CONFIG = {
|
|
2899
|
+
add: {
|
|
2900
|
+
bodyLines: [`Supported kinds: ${formatAddKindList()}`],
|
|
2901
|
+
heading: "Usage: wp-typia add <kind> <name>",
|
|
2902
|
+
optionMetadata: ADD_OPTION_METADATA
|
|
2903
|
+
},
|
|
2904
|
+
create: {
|
|
2905
|
+
heading: `Usage: ${WP_TYPIA_CANONICAL_CREATE_USAGE}`,
|
|
2906
|
+
optionMetadata: CREATE_OPTION_METADATA
|
|
2907
|
+
},
|
|
2908
|
+
doctor: {
|
|
2909
|
+
bodyLines: [
|
|
2910
|
+
"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."
|
|
2911
|
+
],
|
|
2912
|
+
heading: "Usage: wp-typia doctor [--format json]",
|
|
2913
|
+
optionMetadata: DOCTOR_OPTION_METADATA
|
|
2914
|
+
},
|
|
2915
|
+
init: {
|
|
2916
|
+
bodyLines: [
|
|
2917
|
+
"Preview-by-default retrofit planner for existing WordPress block or plugin projects. Re-run with --apply to write package.json updates and helper scripts."
|
|
2918
|
+
],
|
|
2919
|
+
heading: "Usage: wp-typia init [project-dir]",
|
|
2920
|
+
optionMetadata: INIT_OPTION_METADATA
|
|
2921
|
+
},
|
|
2922
|
+
migrate: {
|
|
2923
|
+
heading: `Usage: ${WP_TYPIA_CANONICAL_MIGRATE_USAGE}`,
|
|
2924
|
+
optionMetadata: MIGRATE_OPTION_METADATA
|
|
2925
|
+
},
|
|
2926
|
+
sync: {
|
|
2927
|
+
heading: "Usage: wp-typia sync [ai]",
|
|
2928
|
+
optionMetadata: SYNC_OPTION_METADATA
|
|
2929
|
+
},
|
|
2930
|
+
templates: {
|
|
2931
|
+
heading: "wp-typia templates <list|inspect>",
|
|
2932
|
+
optionMetadata: TEMPLATES_OPTION_METADATA
|
|
2933
|
+
}
|
|
2965
2934
|
};
|
|
2935
|
+
var NODE_FALLBACK_HELP_RENDERERS = Object.fromEntries(Object.entries(NODE_FALLBACK_COMMAND_HELP_CONFIG).map(([command, config]) => [
|
|
2936
|
+
command,
|
|
2937
|
+
() => renderNodeFallbackCommandHelp(config)
|
|
2938
|
+
]));
|
|
2966
2939
|
function renderVersion(options = {}) {
|
|
2967
2940
|
if (options.format === "json") {
|
|
2968
2941
|
printLine(JSON.stringify({
|
|
@@ -3310,4 +3283,4 @@ export {
|
|
|
3310
3283
|
hasFlagBeforeTerminator
|
|
3311
3284
|
};
|
|
3312
3285
|
|
|
3313
|
-
//# debugId=
|
|
3286
|
+
//# debugId=A8E2D093C9BAE2C064756E2164756E21
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wp-typia",
|
|
3
|
-
"version": "0.22.
|
|
3
|
+
"version": "0.22.5",
|
|
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.
|
|
73
|
+
"@wp-typia/project-tools": "0.22.5",
|
|
74
74
|
"better-result": "^2.7.0",
|
|
75
75
|
"react": "^19.2.5",
|
|
76
76
|
"react-dom": "^19.2.5",
|