wp-typia 0.23.0 → 0.24.0
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/README.md +3 -1
- package/bin/routing-metadata.generated.js +11 -0
- package/dist-bunli/.bunli/commands.gen.js +11884 -9017
- package/dist-bunli/{cli-9npd9was.js → cli-0v407aag.js} +12 -10
- package/dist-bunli/{cli-hhp1d348.js → cli-1170yyve.js} +8 -7
- package/dist-bunli/{cli-1meywwsy.js → cli-74y6z3yx.js} +1455 -819
- package/dist-bunli/{cli-qse6myha.js → cli-8hxf9qw6.js} +11 -3
- package/dist-bunli/{cli-8reep89s.js → cli-9fx0qgb7.js} +2 -2
- package/dist-bunli/{cli-add-21bvpfgw.js → cli-add-nmdraf20.js} +8542 -7667
- package/dist-bunli/{cli-52ke0ptp.js → cli-am5x7tb4.js} +8 -2
- package/dist-bunli/{cli-43mx1vfb.js → cli-bajwv85z.js} +2 -1
- package/dist-bunli/cli-ccax7s0s.js +34 -0
- package/dist-bunli/{cli-z5qkx2pn.js → cli-cwjdzq6n.js} +79 -13
- package/dist-bunli/{cli-diagnostics-5dvztm7q.js → cli-diagnostics-10drxh34.js} +1 -1
- package/dist-bunli/{cli-doctor-wy2yjsge.js → cli-doctor-pcss6ecx.js} +688 -459
- package/dist-bunli/{cli-2rqf6t0b.js → cli-e4bwd81c.js} +8 -11
- package/dist-bunli/{cli-init-xnsbxncv.js → cli-init-he7vm7kc.js} +15 -11
- package/dist-bunli/{cli-prompt-614tq57c.js → cli-prompt-ncyg68rn.js} +1 -1
- package/dist-bunli/{cli-bq2v559b.js → cli-rdcga1bd.js} +31 -13
- package/dist-bunli/{cli-scaffold-zhp2ym8z.js → cli-scaffold-an2k0fnm.js} +28 -16
- package/dist-bunli/{cli-c2acv5dv.js → cli-sw06c521.js} +2 -2
- package/dist-bunli/{cli-templates-hc71dfc2.js → cli-templates-g8t4fm11.js} +3 -2
- package/dist-bunli/{cli-p95wr1q8.js → cli-tq730sqt.js} +6 -3
- package/dist-bunli/{cli-ts9thts5.js → cli-v0nnagb3.js} +1513 -1053
- package/dist-bunli/{cli-agywa5n6.js → cli-y0a8nztv.js} +15 -6
- package/dist-bunli/cli-z48frc8t.js +229 -0
- package/dist-bunli/cli.js +5 -5
- package/dist-bunli/{command-list-aqrkx021.js → command-list-xaw5agks.js} +241 -64
- package/dist-bunli/{create-template-validation-rtec5sng.js → create-template-validation-4fr851vg.js} +5 -4
- package/dist-bunli/{migrations-bx0yvc2v.js → migrations-z7f4kxba.js} +10 -9
- package/dist-bunli/node-cli.js +661 -389
- package/dist-bunli/{workspace-project-csnnggz6.js → workspace-project-gmv2a71z.js} +4 -3
- package/package.json +2 -2
- package/dist-bunli/cli-j8et6jvr.js +0 -123
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
package_default,
|
|
20
20
|
prefersStructuredCliOutput,
|
|
21
21
|
resolveCommandOptionValues
|
|
22
|
-
} from "./cli-
|
|
22
|
+
} from "./cli-cwjdzq6n.js";
|
|
23
23
|
import {
|
|
24
24
|
Result,
|
|
25
25
|
TaggedError,
|
|
@@ -38,11 +38,11 @@ import {
|
|
|
38
38
|
} from "./cli-t73q5aqz.js";
|
|
39
39
|
import {
|
|
40
40
|
ADD_KIND_IDS
|
|
41
|
-
} from "./cli-
|
|
41
|
+
} from "./cli-bajwv85z.js";
|
|
42
42
|
import {
|
|
43
43
|
CLI_DIAGNOSTIC_CODES,
|
|
44
44
|
createCliDiagnosticCodeError
|
|
45
|
-
} from "./cli-
|
|
45
|
+
} from "./cli-tq730sqt.js";
|
|
46
46
|
import {
|
|
47
47
|
PACKAGE_MANAGER_IDS,
|
|
48
48
|
formatInstallCommand,
|
|
@@ -50,7 +50,8 @@ import {
|
|
|
50
50
|
formatRunScript,
|
|
51
51
|
inferPackageManagerId,
|
|
52
52
|
parsePackageManagerField
|
|
53
|
-
} from "./cli-
|
|
53
|
+
} from "./cli-am5x7tb4.js";
|
|
54
|
+
import"./cli-ccax7s0s.js";
|
|
54
55
|
import {
|
|
55
56
|
__require,
|
|
56
57
|
__toESM
|
|
@@ -124,11 +125,13 @@ var NAME_TYPE_VISIBLE_FIELDS = [
|
|
|
124
125
|
"name",
|
|
125
126
|
"type"
|
|
126
127
|
];
|
|
127
|
-
var
|
|
128
|
+
var NAME_BLOCK_ATTRIBUTE_POST_META_VISIBLE_FIELDS = [
|
|
128
129
|
"kind",
|
|
129
130
|
"name",
|
|
130
131
|
"block",
|
|
131
|
-
"attribute"
|
|
132
|
+
"attribute",
|
|
133
|
+
"post-meta",
|
|
134
|
+
"meta-path"
|
|
132
135
|
];
|
|
133
136
|
var NAME_BLOCK_VISIBLE_FIELDS = [
|
|
134
137
|
"kind",
|
|
@@ -377,7 +380,7 @@ var aiFeatureAddKindEntry = defineAddKindRegistryEntry({
|
|
|
377
380
|
});
|
|
378
381
|
|
|
379
382
|
// src/add-kinds/binding-source.ts
|
|
380
|
-
var BINDING_SOURCE_MISSING_NAME_MESSAGE = "`wp-typia add binding-source` requires <name>. Usage: wp-typia add binding-source <name> [--block <block-slug|namespace/block-slug> --attribute <attribute>].";
|
|
383
|
+
var BINDING_SOURCE_MISSING_NAME_MESSAGE = "`wp-typia add binding-source` requires <name>. Usage: wp-typia add binding-source <name> [--block <block-slug|namespace/block-slug> --attribute <attribute>] [--from-post-meta <post-meta> --meta-path <field>].";
|
|
381
384
|
var bindingSourceAddKindEntry = defineAddKindRegistryEntry({
|
|
382
385
|
completion: {
|
|
383
386
|
nextSteps: (values) => [
|
|
@@ -385,11 +388,18 @@ var bindingSourceAddKindEntry = defineAddKindRegistryEntry({
|
|
|
385
388
|
...values.blockSlug && values.attributeName ? [
|
|
386
389
|
`Review src/blocks/${values.blockSlug}/block.json for the ${values.attributeName} bindable attribute.`
|
|
387
390
|
] : [],
|
|
391
|
+
...values.postMetaSlug ? [
|
|
392
|
+
`Run wp-typia sync-rest --check after editing ${values.schemaFile}.`
|
|
393
|
+
] : [],
|
|
388
394
|
"Run your workspace build or dev command to verify the binding source hooks and editor registration."
|
|
389
395
|
],
|
|
390
396
|
summaryLines: (values, projectDir) => [
|
|
391
397
|
`Binding source: ${values.bindingSourceSlug}`,
|
|
392
398
|
...values.blockSlug && values.attributeName ? [`Target: ${values.blockSlug}.${values.attributeName}`] : [],
|
|
399
|
+
...values.postMetaSlug ? [
|
|
400
|
+
`Post meta: ${values.postMetaSlug}`,
|
|
401
|
+
`Meta field: ${values.metaPath}`
|
|
402
|
+
] : [],
|
|
393
403
|
`Project directory: ${projectDir}`
|
|
394
404
|
],
|
|
395
405
|
title: "Added binding source"
|
|
@@ -399,17 +409,26 @@ var bindingSourceAddKindEntry = defineAddKindRegistryEntry({
|
|
|
399
409
|
async prepareExecution(context) {
|
|
400
410
|
const name = requireAddKindName(context, BINDING_SOURCE_MISSING_NAME_MESSAGE);
|
|
401
411
|
const [blockName, attributeName] = readOptionalPairedStrictStringFlags(context.flags, "block", "attribute", "`wp-typia add binding-source` requires --block and --attribute to be provided together.");
|
|
412
|
+
const postMetaName = readOptionalDashedOrCamelStringFlag(context.flags, "from-post-meta", "fromPostMeta") ?? readOptionalDashedOrCamelStringFlag(context.flags, "post-meta", "postMeta");
|
|
413
|
+
const metaPath = readOptionalDashedOrCamelStringFlag(context.flags, "meta-path", "metaPath");
|
|
402
414
|
return createNamedExecutionPlan(context, {
|
|
403
415
|
execute: ({ cwd, name: name2 }) => context.addRuntime.runAddBindingSourceCommand({
|
|
404
416
|
attributeName,
|
|
405
417
|
bindingSourceName: name2,
|
|
406
418
|
blockName,
|
|
407
|
-
cwd
|
|
419
|
+
cwd,
|
|
420
|
+
metaPath,
|
|
421
|
+
postMetaName
|
|
408
422
|
}),
|
|
409
423
|
getValues: (result) => ({
|
|
410
424
|
...result.attributeName ? { attributeName: result.attributeName } : {},
|
|
411
425
|
...result.blockSlug ? { blockSlug: result.blockSlug } : {},
|
|
412
|
-
bindingSourceSlug: result.bindingSourceSlug
|
|
426
|
+
bindingSourceSlug: result.bindingSourceSlug,
|
|
427
|
+
...result.metaKey ? { metaKey: result.metaKey } : {},
|
|
428
|
+
...result.metaPath ? { metaPath: result.metaPath } : {},
|
|
429
|
+
...result.postMetaSlug ? { postMetaSlug: result.postMetaSlug } : {},
|
|
430
|
+
...result.postType ? { postType: result.postType } : {},
|
|
431
|
+
...result.schemaFile ? { schemaFile: result.schemaFile } : {}
|
|
413
432
|
}),
|
|
414
433
|
missingNameMessage: BINDING_SOURCE_MISSING_NAME_MESSAGE,
|
|
415
434
|
name,
|
|
@@ -418,8 +437,8 @@ var bindingSourceAddKindEntry = defineAddKindRegistryEntry({
|
|
|
418
437
|
},
|
|
419
438
|
sortOrder: 70,
|
|
420
439
|
supportsDryRun: true,
|
|
421
|
-
usage: "wp-typia add binding-source <name> [--block <block-slug|namespace/block-slug> --attribute <attribute>] [--dry-run]",
|
|
422
|
-
visibleFieldNames: () =>
|
|
440
|
+
usage: "wp-typia add binding-source <name> [--block <block-slug|namespace/block-slug> --attribute <attribute>] [--from-post-meta|--post-meta <post-meta> [--meta-path <field>]] [--dry-run]",
|
|
441
|
+
visibleFieldNames: () => NAME_BLOCK_ATTRIBUTE_POST_META_VISIBLE_FIELDS
|
|
423
442
|
});
|
|
424
443
|
|
|
425
444
|
// src/external-layer-prompt-options.ts
|
|
@@ -561,6 +580,74 @@ var contractAddKindEntry = defineAddKindRegistryEntry({
|
|
|
561
580
|
visibleFieldNames: () => NAME_TYPE_VISIBLE_FIELDS
|
|
562
581
|
});
|
|
563
582
|
|
|
583
|
+
// src/add-kinds/core-variation.ts
|
|
584
|
+
var CORE_VARIATION_MISSING_NAME_MESSAGE = "`wp-typia add core-variation` requires <name>. Usage: wp-typia add core-variation <block-name> <name> or wp-typia add core-variation <name> --block <namespace/block>.";
|
|
585
|
+
var CORE_VARIATION_MISSING_BLOCK_MESSAGE = "`wp-typia add core-variation` requires <block-name>. Usage: wp-typia add core-variation <block-name> <name> or wp-typia add core-variation <name> --block <namespace/block>.";
|
|
586
|
+
function resolveCoreVariationInputs(context) {
|
|
587
|
+
const positionalTargetBlockName = context.positionalArgs?.[1];
|
|
588
|
+
const positionalVariationName = context.positionalArgs?.[2];
|
|
589
|
+
if (positionalVariationName) {
|
|
590
|
+
if (!positionalTargetBlockName) {
|
|
591
|
+
throw createCliDiagnosticCodeError(CLI_DIAGNOSTIC_CODES.MISSING_ARGUMENT, CORE_VARIATION_MISSING_BLOCK_MESSAGE);
|
|
592
|
+
}
|
|
593
|
+
return {
|
|
594
|
+
targetBlockName: positionalTargetBlockName,
|
|
595
|
+
variationName: positionalVariationName
|
|
596
|
+
};
|
|
597
|
+
}
|
|
598
|
+
if (context.name?.includes("/") && !readOptionalStrictStringFlag(context.flags, "block")) {
|
|
599
|
+
throw createCliDiagnosticCodeError(CLI_DIAGNOSTIC_CODES.MISSING_ARGUMENT, CORE_VARIATION_MISSING_NAME_MESSAGE);
|
|
600
|
+
}
|
|
601
|
+
const variationName = requireAddKindName(context, CORE_VARIATION_MISSING_NAME_MESSAGE);
|
|
602
|
+
const targetBlockName = readOptionalStrictStringFlag(context.flags, "block");
|
|
603
|
+
if (!targetBlockName) {
|
|
604
|
+
throw createCliDiagnosticCodeError(CLI_DIAGNOSTIC_CODES.MISSING_ARGUMENT, CORE_VARIATION_MISSING_BLOCK_MESSAGE);
|
|
605
|
+
}
|
|
606
|
+
return {
|
|
607
|
+
targetBlockName,
|
|
608
|
+
variationName
|
|
609
|
+
};
|
|
610
|
+
}
|
|
611
|
+
var coreVariationAddKindEntry = defineAddKindRegistryEntry({
|
|
612
|
+
completion: {
|
|
613
|
+
nextSteps: (values) => [
|
|
614
|
+
`Review ${values.variationFile}.`,
|
|
615
|
+
"Run your workspace build or dev command to verify the editor-side variation registration."
|
|
616
|
+
],
|
|
617
|
+
summaryLines: (values, projectDir) => [
|
|
618
|
+
`Core variation: ${values.variationSlug}`,
|
|
619
|
+
`Target block: ${values.targetBlockName}`,
|
|
620
|
+
`Project directory: ${projectDir}`
|
|
621
|
+
],
|
|
622
|
+
title: "Added core block variation"
|
|
623
|
+
},
|
|
624
|
+
description: "Add an editor-side variation for an existing core or external block",
|
|
625
|
+
nameLabel: "Variation name",
|
|
626
|
+
async prepareExecution(context) {
|
|
627
|
+
const { targetBlockName, variationName } = resolveCoreVariationInputs(context);
|
|
628
|
+
return createNamedExecutionPlan(context, {
|
|
629
|
+
execute: ({ cwd, name }) => context.addRuntime.runAddCoreVariationCommand({
|
|
630
|
+
cwd,
|
|
631
|
+
targetBlockName,
|
|
632
|
+
variationName: name
|
|
633
|
+
}),
|
|
634
|
+
getValues: (result) => ({
|
|
635
|
+
targetBlockName: result.targetBlockName,
|
|
636
|
+
variationFile: result.variationFile,
|
|
637
|
+
variationSlug: result.variationSlug
|
|
638
|
+
}),
|
|
639
|
+
missingNameMessage: CORE_VARIATION_MISSING_NAME_MESSAGE,
|
|
640
|
+
name: variationName,
|
|
641
|
+
warnLine: context.warnLine
|
|
642
|
+
});
|
|
643
|
+
},
|
|
644
|
+
sortOrder: 25,
|
|
645
|
+
supportsDryRun: true,
|
|
646
|
+
usage: `wp-typia add core-variation <block-name> <name> [--dry-run]
|
|
647
|
+
Alias: wp-typia add core-variation <name> --block <namespace/block> [--dry-run]`,
|
|
648
|
+
visibleFieldNames: () => NAME_BLOCK_VISIBLE_FIELDS
|
|
649
|
+
});
|
|
650
|
+
|
|
564
651
|
// src/add-kinds/editor-plugin.ts
|
|
565
652
|
var EDITOR_PLUGIN_MISSING_NAME_MESSAGE = "`wp-typia add editor-plugin` requires <name>. Usage: wp-typia add editor-plugin <name> [--slot <sidebar|document-setting-panel>].";
|
|
566
653
|
var editorPluginAddKindEntry = defineAddKindRegistryEntry({
|
|
@@ -648,17 +735,19 @@ var hookedBlockAddKindEntry = defineAddKindRegistryEntry({
|
|
|
648
735
|
});
|
|
649
736
|
|
|
650
737
|
// src/add-kinds/integration-env.ts
|
|
651
|
-
var INTEGRATION_ENV_MISSING_NAME_MESSAGE = "`wp-typia add integration-env` requires <name>. Usage: wp-typia add integration-env <name> [--wp-env] [--service <none|docker-compose>].";
|
|
738
|
+
var INTEGRATION_ENV_MISSING_NAME_MESSAGE = "`wp-typia add integration-env` requires <name>. Usage: wp-typia add integration-env <name> [--wp-env] [--release-zip] [--service <none|docker-compose>].";
|
|
652
739
|
var integrationEnvAddKindEntry = defineAddKindRegistryEntry({
|
|
653
740
|
completion: {
|
|
654
741
|
nextSteps: (values) => [
|
|
655
742
|
`Review scripts/integration-smoke/${values.integrationEnvSlug}.mjs and docs/integration-env/${values.integrationEnvSlug}.md.`,
|
|
656
743
|
"Copy `.env.example` to `.env`, adjust local URLs or credentials, then run the generated smoke script.",
|
|
657
|
-
...values.withWpEnv === "true" ? ["Run `npm run wp-env:start` before the smoke check when using the generated wp-env preset."] : []
|
|
744
|
+
...values.withWpEnv === "true" ? ["Run `npm run wp-env:start` before the smoke check when using the generated wp-env preset."] : [],
|
|
745
|
+
...values.withReleaseZip === "true" ? ["Run `npm run release:zip` after smoke checks pass to build a distributable plugin zip."] : []
|
|
658
746
|
],
|
|
659
747
|
summaryLines: (values, projectDir) => [
|
|
660
748
|
`Integration env: ${values.integrationEnvSlug}`,
|
|
661
749
|
`wp-env preset: ${values.withWpEnv}`,
|
|
750
|
+
`Release zip scripts: ${values.withReleaseZip}`,
|
|
662
751
|
`Service starter: ${values.service}`,
|
|
663
752
|
`Project directory: ${projectDir}`
|
|
664
753
|
],
|
|
@@ -668,17 +757,20 @@ var integrationEnvAddKindEntry = defineAddKindRegistryEntry({
|
|
|
668
757
|
nameLabel: "Integration env name",
|
|
669
758
|
async prepareExecution(context) {
|
|
670
759
|
const service = readOptionalStrictStringFlag(context.flags, "service");
|
|
760
|
+
const withReleaseZip = Boolean(context.flags["release-zip"]);
|
|
671
761
|
const withWpEnv = Boolean(context.flags["wp-env"]);
|
|
672
762
|
return createNamedExecutionPlan(context, {
|
|
673
763
|
execute: ({ cwd, name }) => context.addRuntime.runAddIntegrationEnvCommand({
|
|
674
764
|
cwd,
|
|
675
765
|
integrationEnvName: name,
|
|
676
766
|
service,
|
|
767
|
+
withReleaseZip,
|
|
677
768
|
withWpEnv
|
|
678
769
|
}),
|
|
679
770
|
getValues: (result) => ({
|
|
680
771
|
integrationEnvSlug: result.integrationEnvSlug,
|
|
681
772
|
service: result.service,
|
|
773
|
+
withReleaseZip: String(result.withReleaseZip),
|
|
682
774
|
withWpEnv: String(result.withWpEnv)
|
|
683
775
|
}),
|
|
684
776
|
getWarnings: (result) => result.warnings,
|
|
@@ -688,8 +780,9 @@ var integrationEnvAddKindEntry = defineAddKindRegistryEntry({
|
|
|
688
780
|
},
|
|
689
781
|
sortOrder: 25,
|
|
690
782
|
supportsDryRun: true,
|
|
691
|
-
usage: "wp-typia add integration-env <name> [--wp-env] [--service <none|docker-compose>] [--dry-run]",
|
|
692
|
-
visibleFieldNames: () => NAME_ONLY_VISIBLE_FIELDS
|
|
783
|
+
usage: "wp-typia add integration-env <name> [--wp-env] [--release-zip] [--service <none|docker-compose>] [--dry-run]",
|
|
784
|
+
visibleFieldNames: () => NAME_ONLY_VISIBLE_FIELDS,
|
|
785
|
+
hiddenBooleanSubmitFields: ["wp-env", "release-zip"]
|
|
693
786
|
});
|
|
694
787
|
|
|
695
788
|
// src/add-kinds/pattern.ts
|
|
@@ -697,33 +790,51 @@ var PATTERN_MISSING_NAME_MESSAGE = "`wp-typia add pattern` requires <name>. Usag
|
|
|
697
790
|
var patternAddKindEntry = defineAddKindRegistryEntry({
|
|
698
791
|
completion: {
|
|
699
792
|
nextSteps: (values) => [
|
|
700
|
-
`Review
|
|
793
|
+
`Review ${values.contentFile}.`,
|
|
701
794
|
"Run your workspace build or dev command to verify the new pattern registration."
|
|
702
795
|
],
|
|
703
796
|
summaryLines: (values, projectDir) => [
|
|
704
797
|
`Pattern: ${values.patternSlug}`,
|
|
798
|
+
`Content file: ${values.contentFile}`,
|
|
705
799
|
`Project directory: ${projectDir}`
|
|
706
800
|
],
|
|
707
801
|
title: "Added workspace pattern"
|
|
708
802
|
},
|
|
709
803
|
description: "Add a PHP block pattern shell",
|
|
804
|
+
hiddenStringSubmitFields: [
|
|
805
|
+
"scope",
|
|
806
|
+
"section-role",
|
|
807
|
+
"tags",
|
|
808
|
+
"thumbnail-url"
|
|
809
|
+
],
|
|
710
810
|
nameLabel: "Pattern name",
|
|
711
811
|
async prepareExecution(context) {
|
|
712
|
-
|
|
713
|
-
|
|
812
|
+
const name = requireAddKindName(context, PATTERN_MISSING_NAME_MESSAGE);
|
|
813
|
+
const scope = typeof context.flags.scope === "string" ? context.flags.scope : undefined;
|
|
814
|
+
const sectionRole = typeof context.flags["section-role"] === "string" ? context.flags["section-role"] : undefined;
|
|
815
|
+
const tags = typeof context.flags.tags === "string" ? context.flags.tags : undefined;
|
|
816
|
+
const thumbnailUrl = typeof context.flags["thumbnail-url"] === "string" ? context.flags["thumbnail-url"] : undefined;
|
|
817
|
+
return {
|
|
818
|
+
execute: (cwd) => context.addRuntime.runAddPatternCommand({
|
|
714
819
|
cwd,
|
|
715
|
-
|
|
820
|
+
patternScope: scope,
|
|
821
|
+
patternName: name,
|
|
822
|
+
sectionRole,
|
|
823
|
+
tags,
|
|
824
|
+
thumbnailUrl
|
|
716
825
|
}),
|
|
717
826
|
getValues: (result) => ({
|
|
718
|
-
|
|
827
|
+
contentFile: result.contentFile,
|
|
828
|
+
patternSlug: result.patternSlug,
|
|
829
|
+
patternScope: result.patternScope,
|
|
830
|
+
...result.sectionRole ? { sectionRole: result.sectionRole } : {}
|
|
719
831
|
}),
|
|
720
|
-
missingNameMessage: PATTERN_MISSING_NAME_MESSAGE,
|
|
721
832
|
warnLine: context.warnLine
|
|
722
|
-
}
|
|
833
|
+
};
|
|
723
834
|
},
|
|
724
835
|
sortOrder: 60,
|
|
725
836
|
supportsDryRun: true,
|
|
726
|
-
usage: "wp-typia add pattern <name> [--dry-run]",
|
|
837
|
+
usage: "wp-typia add pattern <name> [--scope <full|section>] [--section-role <role>] [--tags <tag,...>] [--thumbnail-url <url>] [--dry-run]",
|
|
727
838
|
visibleFieldNames: () => NAME_ONLY_VISIBLE_FIELDS
|
|
728
839
|
});
|
|
729
840
|
|
|
@@ -789,9 +900,40 @@ var postMetaAddKindEntry = defineAddKindRegistryEntry({
|
|
|
789
900
|
});
|
|
790
901
|
|
|
791
902
|
// src/add-kinds/rest-resource.ts
|
|
792
|
-
var
|
|
793
|
-
|
|
794
|
-
|
|
903
|
+
var REST_RESOURCE_GENERATED_USAGE = "Generated: wp-typia add rest-resource <name> [--namespace <vendor/v1>] [--methods <list,read,create,update,delete>] [--route-pattern <route-pattern>] [--permission-callback <callback>] [--controller-class <ClassName>] [--controller-extends <BaseClass>] [--dry-run]";
|
|
904
|
+
var REST_RESOURCE_MANUAL_USAGE = "Manual: wp-typia add rest-resource <name> --manual [--namespace <vendor/v1>] [--method <GET|POST|PUT|PATCH|DELETE>] [--auth <public|authenticated|public-write-protected>] [--path <route-pattern>|--route-pattern <route-pattern>] [--permission-callback <callback>] [--controller-class <ClassName>] [--controller-extends <BaseClass>] [--query-type <Type>] [--body-type <Type>] [--response-type <Type>] [--secret-field <field>] [--secret-state-field|--secret-has-value-field <field>] [--secret-preserve-on-empty <true|false>] [--dry-run]";
|
|
905
|
+
var REST_RESOURCE_USAGE = `${REST_RESOURCE_GENERATED_USAGE}
|
|
906
|
+
${REST_RESOURCE_MANUAL_USAGE}`;
|
|
907
|
+
var REST_RESOURCE_MISSING_NAME_MESSAGE = [
|
|
908
|
+
"`wp-typia add rest-resource` requires <name>. Usage:",
|
|
909
|
+
` ${REST_RESOURCE_GENERATED_USAGE}`,
|
|
910
|
+
` ${REST_RESOURCE_MANUAL_USAGE}`
|
|
911
|
+
].join(`
|
|
912
|
+
`);
|
|
913
|
+
var SECRET_PRESERVE_ON_EMPTY_TRUE_VALUES = new Set(["1", "true", "yes"]);
|
|
914
|
+
var SECRET_PRESERVE_ON_EMPTY_FALSE_VALUES = new Set(["0", "false", "no"]);
|
|
915
|
+
function readOptionalSecretPreserveOnEmptyFlag(flags) {
|
|
916
|
+
const value = flags["secret-preserve-on-empty"] ?? flags.secretPreserveOnEmpty;
|
|
917
|
+
if (value === undefined || value === null) {
|
|
918
|
+
return;
|
|
919
|
+
}
|
|
920
|
+
if (typeof value === "boolean") {
|
|
921
|
+
return value;
|
|
922
|
+
}
|
|
923
|
+
if (typeof value !== "string") {
|
|
924
|
+
throw createCliDiagnosticCodeError(CLI_DIAGNOSTIC_CODES.MISSING_ARGUMENT, "`--secret-preserve-on-empty` requires a value.");
|
|
925
|
+
}
|
|
926
|
+
const normalized = value.trim().toLowerCase();
|
|
927
|
+
if (normalized.length === 0) {
|
|
928
|
+
throw createCliDiagnosticCodeError(CLI_DIAGNOSTIC_CODES.MISSING_ARGUMENT, "`--secret-preserve-on-empty` requires a value.");
|
|
929
|
+
}
|
|
930
|
+
if (SECRET_PRESERVE_ON_EMPTY_TRUE_VALUES.has(normalized)) {
|
|
931
|
+
return true;
|
|
932
|
+
}
|
|
933
|
+
if (SECRET_PRESERVE_ON_EMPTY_FALSE_VALUES.has(normalized)) {
|
|
934
|
+
return false;
|
|
935
|
+
}
|
|
936
|
+
throw createCliDiagnosticCodeError(CLI_DIAGNOSTIC_CODES.INVALID_ARGUMENT, "Manual REST contract --secret-preserve-on-empty must be true or false.");
|
|
795
937
|
}
|
|
796
938
|
var restResourceAddKindEntry = defineAddKindRegistryEntry({
|
|
797
939
|
completion: {
|
|
@@ -810,8 +952,12 @@ var restResourceAddKindEntry = defineAddKindRegistryEntry({
|
|
|
810
952
|
`Route: ${values.method} /${values.namespace}${values.pathPattern}`,
|
|
811
953
|
`Auth: ${values.auth}`,
|
|
812
954
|
...values.secretFieldName ? [
|
|
813
|
-
`Secret field: ${values.secretFieldName} -> ${values.secretStateFieldName}
|
|
814
|
-
|
|
955
|
+
`Secret field: ${values.secretFieldName} -> ${values.secretStateFieldName}`,
|
|
956
|
+
`Secret preserve on empty: ${values.secretPreserveOnEmpty}`
|
|
957
|
+
] : [],
|
|
958
|
+
...values.permissionCallback ? [`Declared permission callback: ${values.permissionCallback}`] : [],
|
|
959
|
+
...values.controllerClass ? [`Declared controller class: ${values.controllerClass}`] : [],
|
|
960
|
+
...values.controllerExtends ? [`Declared controller base: ${values.controllerExtends}`] : []
|
|
815
961
|
] : [
|
|
816
962
|
`Methods: ${values.methods}`,
|
|
817
963
|
...values.routePattern ? [`Item route: /${values.namespace}${values.routePattern}`] : [],
|
|
@@ -836,6 +982,9 @@ var restResourceAddKindEntry = defineAddKindRegistryEntry({
|
|
|
836
982
|
"response-type",
|
|
837
983
|
"route-pattern",
|
|
838
984
|
"secret-field",
|
|
985
|
+
"secret-has-value-field",
|
|
986
|
+
"secret-masked-response-field",
|
|
987
|
+
"secret-preserve-on-empty",
|
|
839
988
|
"secret-state-field"
|
|
840
989
|
],
|
|
841
990
|
nameLabel: "REST resource name",
|
|
@@ -843,19 +992,22 @@ var restResourceAddKindEntry = defineAddKindRegistryEntry({
|
|
|
843
992
|
const name = requireAddKindName(context, REST_RESOURCE_MISSING_NAME_MESSAGE);
|
|
844
993
|
const auth = readOptionalStrictStringFlag(context.flags, "auth");
|
|
845
994
|
const bodyTypeName = readOptionalStrictStringFlag(context.flags, "body-type");
|
|
846
|
-
const controllerClass =
|
|
847
|
-
const controllerExtends =
|
|
995
|
+
const controllerClass = readOptionalDashedOrCamelStringFlag(context.flags, "controller-class", "controllerClass");
|
|
996
|
+
const controllerExtends = readOptionalDashedOrCamelStringFlag(context.flags, "controller-extends", "controllerExtends");
|
|
848
997
|
const manual = Boolean(context.flags.manual);
|
|
849
998
|
const method = readOptionalStrictStringFlag(context.flags, "method");
|
|
850
999
|
const methods = readOptionalStrictStringFlag(context.flags, "methods");
|
|
851
1000
|
const namespace = readOptionalStrictStringFlag(context.flags, "namespace");
|
|
852
|
-
const permissionCallback =
|
|
1001
|
+
const permissionCallback = readOptionalDashedOrCamelStringFlag(context.flags, "permission-callback", "permissionCallback");
|
|
853
1002
|
const pathPattern = readOptionalStrictStringFlag(context.flags, "path");
|
|
854
1003
|
const queryTypeName = readOptionalStrictStringFlag(context.flags, "query-type");
|
|
855
1004
|
const responseTypeName = readOptionalStrictStringFlag(context.flags, "response-type");
|
|
856
|
-
const routePattern =
|
|
857
|
-
const secretFieldName =
|
|
858
|
-
const
|
|
1005
|
+
const routePattern = readOptionalDashedOrCamelStringFlag(context.flags, "route-pattern", "routePattern");
|
|
1006
|
+
const secretFieldName = readOptionalDashedOrCamelStringFlag(context.flags, "secret-field", "secretField");
|
|
1007
|
+
const secretHasValueFieldName = readOptionalDashedOrCamelStringFlag(context.flags, "secret-has-value-field", "secretHasValueField");
|
|
1008
|
+
const secretMaskedResponseFieldName = readOptionalDashedOrCamelStringFlag(context.flags, "secret-masked-response-field", "secretMaskedResponseField");
|
|
1009
|
+
const secretPreserveOnEmpty = readOptionalSecretPreserveOnEmptyFlag(context.flags);
|
|
1010
|
+
const secretStateFieldName = readOptionalDashedOrCamelStringFlag(context.flags, "secret-state-field", "secretStateField");
|
|
859
1011
|
return createNamedExecutionPlan(context, {
|
|
860
1012
|
execute: ({ cwd, name: name2 }) => context.addRuntime.runAddRestResourceCommand({
|
|
861
1013
|
auth,
|
|
@@ -874,11 +1026,15 @@ var restResourceAddKindEntry = defineAddKindRegistryEntry({
|
|
|
874
1026
|
responseTypeName,
|
|
875
1027
|
routePattern,
|
|
876
1028
|
secretFieldName,
|
|
1029
|
+
secretHasValueFieldName,
|
|
1030
|
+
secretMaskedResponseFieldName,
|
|
1031
|
+
secretPreserveOnEmpty,
|
|
877
1032
|
secretStateFieldName
|
|
878
1033
|
}),
|
|
879
1034
|
getValues: (result) => ({
|
|
880
1035
|
auth: result.auth ?? "",
|
|
881
1036
|
controllerClass: result.controllerClass ?? "",
|
|
1037
|
+
controllerExtends: result.controllerExtends ?? "",
|
|
882
1038
|
method: result.method ?? "",
|
|
883
1039
|
methods: result.methods.join(", "),
|
|
884
1040
|
mode: result.mode,
|
|
@@ -888,6 +1044,7 @@ var restResourceAddKindEntry = defineAddKindRegistryEntry({
|
|
|
888
1044
|
restResourceSlug: result.restResourceSlug,
|
|
889
1045
|
routePattern: result.routePattern ?? "",
|
|
890
1046
|
secretFieldName: result.secretFieldName ?? "",
|
|
1047
|
+
secretPreserveOnEmpty: result.secretPreserveOnEmpty === undefined ? "" : String(result.secretPreserveOnEmpty),
|
|
891
1048
|
secretStateFieldName: result.secretStateFieldName ?? ""
|
|
892
1049
|
}),
|
|
893
1050
|
missingNameMessage: REST_RESOURCE_MISSING_NAME_MESSAGE,
|
|
@@ -897,7 +1054,7 @@ var restResourceAddKindEntry = defineAddKindRegistryEntry({
|
|
|
897
1054
|
},
|
|
898
1055
|
sortOrder: 80,
|
|
899
1056
|
supportsDryRun: true,
|
|
900
|
-
usage:
|
|
1057
|
+
usage: REST_RESOURCE_USAGE,
|
|
901
1058
|
visibleFieldNames: () => NAME_NAMESPACE_METHODS_VISIBLE_FIELDS
|
|
902
1059
|
});
|
|
903
1060
|
|
|
@@ -1034,6 +1191,7 @@ var ADD_KIND_REGISTRY = {
|
|
|
1034
1191
|
"admin-view": adminViewAddKindEntry,
|
|
1035
1192
|
block: blockAddKindEntry,
|
|
1036
1193
|
"integration-env": integrationEnvAddKindEntry,
|
|
1194
|
+
"core-variation": coreVariationAddKindEntry,
|
|
1037
1195
|
variation: variationAddKindEntry,
|
|
1038
1196
|
style: styleAddKindEntry,
|
|
1039
1197
|
transform: transformAddKindEntry,
|
|
@@ -1230,7 +1388,7 @@ async function simulateWorkspaceAddDryRun({
|
|
|
1230
1388
|
cwd,
|
|
1231
1389
|
execute
|
|
1232
1390
|
}) {
|
|
1233
|
-
const { resolveWorkspaceProject } = await import("./workspace-project-
|
|
1391
|
+
const { resolveWorkspaceProject } = await import("./workspace-project-gmv2a71z.js");
|
|
1234
1392
|
const workspace = resolveWorkspaceProject(cwd);
|
|
1235
1393
|
const relativeCwd = path.relative(workspace.projectDir, path.resolve(cwd));
|
|
1236
1394
|
const { path: tempRoot, cleanup } = await createManagedTempRoot("wp-typia-add-plan-");
|
|
@@ -1598,7 +1756,7 @@ function supportsInteractiveTui(options = {}) {
|
|
|
1598
1756
|
}
|
|
1599
1757
|
|
|
1600
1758
|
// src/runtime-bridge-shared.ts
|
|
1601
|
-
var loadCliDiagnosticsRuntime = () => import("./cli-diagnostics-
|
|
1759
|
+
var loadCliDiagnosticsRuntime = () => import("./cli-diagnostics-10drxh34.js");
|
|
1602
1760
|
async function wrapCliCommandError(command, error) {
|
|
1603
1761
|
const { createCliCommandError } = await loadCliDiagnosticsRuntime();
|
|
1604
1762
|
return createCliCommandError({ command, error });
|
|
@@ -1633,8 +1791,8 @@ function pushFlag(argv, name, value) {
|
|
|
1633
1791
|
}
|
|
1634
1792
|
|
|
1635
1793
|
// src/runtime-bridge-add.ts
|
|
1636
|
-
var loadCliAddRuntime = () => import("./cli-add-
|
|
1637
|
-
var loadCliPromptRuntime = () => import("./cli-prompt-
|
|
1794
|
+
var loadCliAddRuntime = () => import("./cli-add-nmdraf20.js");
|
|
1795
|
+
var loadCliPromptRuntime = () => import("./cli-prompt-ncyg68rn.js");
|
|
1638
1796
|
async function executeWorkspaceAddWithOptionalDryRun(options) {
|
|
1639
1797
|
const simulated = options.dryRun ? await simulateWorkspaceAddDryRun({
|
|
1640
1798
|
cwd: options.cwd,
|
|
@@ -1685,6 +1843,7 @@ async function executeAddCommand({
|
|
|
1685
1843
|
interactive,
|
|
1686
1844
|
kind,
|
|
1687
1845
|
name,
|
|
1846
|
+
positionalArgs,
|
|
1688
1847
|
printLine = console.log,
|
|
1689
1848
|
prompt,
|
|
1690
1849
|
warnLine = console.warn
|
|
@@ -1720,6 +1879,7 @@ async function executeAddCommand({
|
|
|
1720
1879
|
},
|
|
1721
1880
|
isInteractiveSession,
|
|
1722
1881
|
name,
|
|
1882
|
+
positionalArgs,
|
|
1723
1883
|
warnLine
|
|
1724
1884
|
};
|
|
1725
1885
|
return await executePlannedAddKind(kind, executionContext, {
|
|
@@ -1740,10 +1900,10 @@ async function executeAddCommand({
|
|
|
1740
1900
|
}
|
|
1741
1901
|
}
|
|
1742
1902
|
// src/runtime-bridge-create.ts
|
|
1743
|
-
var loadCliPromptRuntime2 = () => import("./cli-prompt-
|
|
1744
|
-
var loadCliScaffoldRuntime = () => import("./cli-scaffold-
|
|
1745
|
-
var loadCliTemplatesRuntime = () => import("./cli-templates-
|
|
1746
|
-
var loadCreateTemplateValidationRuntime = () => import("./create-template-validation-
|
|
1903
|
+
var loadCliPromptRuntime2 = () => import("./cli-prompt-ncyg68rn.js");
|
|
1904
|
+
var loadCliScaffoldRuntime = () => import("./cli-scaffold-an2k0fnm.js");
|
|
1905
|
+
var loadCliTemplatesRuntime = () => import("./cli-templates-g8t4fm11.js");
|
|
1906
|
+
var loadCreateTemplateValidationRuntime = () => import("./create-template-validation-4fr851vg.js");
|
|
1747
1907
|
var PACKAGE_MANAGER_PROMPT_OPTIONS = [
|
|
1748
1908
|
{ label: "npm", value: "npm", hint: "Use npm" },
|
|
1749
1909
|
{ label: "pnpm", value: "pnpm", hint: "Use pnpm" },
|
|
@@ -1813,6 +1973,7 @@ async function executeCreateCommand({
|
|
|
1813
1973
|
packageManager: readOptionalLooseStringFlag(flags, "package-manager"),
|
|
1814
1974
|
persistencePolicy: readOptionalLooseStringFlag(flags, "persistence-policy"),
|
|
1815
1975
|
phpPrefix: readOptionalLooseStringFlag(flags, "php-prefix"),
|
|
1976
|
+
profile: readOptionalLooseStringFlag(flags, "profile"),
|
|
1816
1977
|
projectInput: projectDir,
|
|
1817
1978
|
onProgress: async (progress) => {
|
|
1818
1979
|
const payload2 = {
|
|
@@ -1861,18 +2022,18 @@ async function executeCreateCommand({
|
|
|
1861
2022
|
}
|
|
1862
2023
|
}
|
|
1863
2024
|
// src/runtime-bridge-doctor.ts
|
|
1864
|
-
var loadCliDoctorRuntime = () => import("./cli-doctor-
|
|
1865
|
-
async function executeDoctorCommand(cwd) {
|
|
2025
|
+
var loadCliDoctorRuntime = () => import("./cli-doctor-pcss6ecx.js");
|
|
2026
|
+
async function executeDoctorCommand(cwd, options = {}) {
|
|
1866
2027
|
try {
|
|
1867
2028
|
const { runDoctor } = await loadCliDoctorRuntime();
|
|
1868
|
-
await runDoctor(cwd);
|
|
2029
|
+
await runDoctor(cwd, { exitPolicy: options.exitPolicy });
|
|
1869
2030
|
} catch (error) {
|
|
1870
2031
|
throw await wrapCliCommandError("doctor", error);
|
|
1871
2032
|
}
|
|
1872
2033
|
}
|
|
1873
2034
|
// src/runtime-bridge-init.ts
|
|
1874
2035
|
import path2 from "path";
|
|
1875
|
-
var loadCliInitRuntime = () => import("./cli-init-
|
|
2036
|
+
var loadCliInitRuntime = () => import("./cli-init-he7vm7kc.js");
|
|
1876
2037
|
async function executeInitCommand({ apply, cwd, packageManager, projectDir }, options = {}) {
|
|
1877
2038
|
try {
|
|
1878
2039
|
const { runInitCommand } = await loadCliInitRuntime();
|
|
@@ -1898,7 +2059,7 @@ async function executeInitCommand({ apply, cwd, packageManager, projectDir }, op
|
|
|
1898
2059
|
}
|
|
1899
2060
|
}
|
|
1900
2061
|
// src/runtime-bridge-migrate.ts
|
|
1901
|
-
var loadMigrationsRuntime = () => import("./migrations-
|
|
2062
|
+
var loadMigrationsRuntime = () => import("./migrations-z7f4kxba.js");
|
|
1902
2063
|
var defaultPrintLine2 = (line) => {
|
|
1903
2064
|
process.stdout.write(`${line}
|
|
1904
2065
|
`);
|
|
@@ -1955,7 +2116,7 @@ async function executeMigrateCommand({
|
|
|
1955
2116
|
}
|
|
1956
2117
|
}
|
|
1957
2118
|
// src/runtime-bridge-templates.ts
|
|
1958
|
-
var loadCliTemplatesRuntime2 = () => import("./cli-templates-
|
|
2119
|
+
var loadCliTemplatesRuntime2 = () => import("./cli-templates-g8t4fm11.js");
|
|
1959
2120
|
async function executeTemplatesCommand({ flags }, printLine = console.log) {
|
|
1960
2121
|
const {
|
|
1961
2122
|
formatTemplateDetails,
|
|
@@ -2621,6 +2782,12 @@ function loadAddFlow() {
|
|
|
2621
2782
|
})).then((module) => ({ default: module.AddFlow }));
|
|
2622
2783
|
}
|
|
2623
2784
|
var addOptions = buildCommandOptions(ADD_OPTION_METADATA);
|
|
2785
|
+
function resolveAddCommandName(positional) {
|
|
2786
|
+
if (positional[0] === "core-variation" && positional[2]) {
|
|
2787
|
+
return positional[2];
|
|
2788
|
+
}
|
|
2789
|
+
return positional[1];
|
|
2790
|
+
}
|
|
2624
2791
|
var addCommand = defineCommand({
|
|
2625
2792
|
defaultFormat: "toon",
|
|
2626
2793
|
description: "Extend an official wp-typia workspace with blocks, integration envs, variations, block styles, transforms, patterns, binding sources, standalone contracts, plugin-level REST resources, post meta contracts, workflow abilities, server-only AI features, editor plugins, or hooked blocks.",
|
|
@@ -2635,14 +2802,15 @@ var addCommand = defineCommand({
|
|
|
2635
2802
|
flags: args.flags,
|
|
2636
2803
|
interactive: false,
|
|
2637
2804
|
kind: args.positional[0],
|
|
2638
|
-
name: args.positional
|
|
2805
|
+
name: resolveAddCommandName(args.positional),
|
|
2806
|
+
positionalArgs: args.positional,
|
|
2639
2807
|
printLine,
|
|
2640
2808
|
warnLine
|
|
2641
2809
|
});
|
|
2642
2810
|
args.output(buildStructuredCompletionSuccessPayload("add", completion, {
|
|
2643
2811
|
dryRun: Boolean(args.flags["dry-run"]),
|
|
2644
2812
|
kind: args.positional[0],
|
|
2645
|
-
name: args.positional
|
|
2813
|
+
name: resolveAddCommandName(args.positional),
|
|
2646
2814
|
projectDir: extractCompletionProjectDir(completion) ?? args.cwd
|
|
2647
2815
|
}));
|
|
2648
2816
|
return;
|
|
@@ -2651,7 +2819,8 @@ var addCommand = defineCommand({
|
|
|
2651
2819
|
cwd: args.cwd,
|
|
2652
2820
|
flags: args.flags,
|
|
2653
2821
|
kind: args.positional[0],
|
|
2654
|
-
name: args.positional
|
|
2822
|
+
name: resolveAddCommandName(args.positional),
|
|
2823
|
+
positionalArgs: args.positional,
|
|
2655
2824
|
printLine,
|
|
2656
2825
|
warnLine
|
|
2657
2826
|
});
|
|
@@ -2679,7 +2848,8 @@ var addCommand = defineCommand({
|
|
|
2679
2848
|
initialValues: {
|
|
2680
2849
|
...initialValues,
|
|
2681
2850
|
kind: args.positional[0] ?? "block",
|
|
2682
|
-
name: args.positional
|
|
2851
|
+
name: resolveAddCommandName(args.positional) ?? "",
|
|
2852
|
+
...args.positional[0] === "core-variation" && args.positional[2] ? { block: args.positional[1] } : {},
|
|
2683
2853
|
position: initialValues.position ?? "after",
|
|
2684
2854
|
slot: initialValues.slot ?? "sidebar"
|
|
2685
2855
|
}
|
|
@@ -2779,27 +2949,34 @@ var doctorCommand = defineCommand({
|
|
|
2779
2949
|
description: "Run repository and project diagnostics.",
|
|
2780
2950
|
handler: async (args) => {
|
|
2781
2951
|
const prefersStructuredOutput = prefersStructuredCliOutput(args);
|
|
2952
|
+
const doctorExitPolicy = args.flags["workspace-only"] ? "workspace-only" : "strict";
|
|
2782
2953
|
if (prefersStructuredOutput) {
|
|
2783
|
-
const
|
|
2784
|
-
|
|
2785
|
-
|
|
2786
|
-
|
|
2954
|
+
const {
|
|
2955
|
+
createDoctorRunSummary,
|
|
2956
|
+
getDoctorChecks,
|
|
2957
|
+
getDoctorExitFailureDetailLines
|
|
2958
|
+
} = await import("./cli-doctor-pcss6ecx.js");
|
|
2787
2959
|
const checks = await getDoctorChecks(args.cwd);
|
|
2788
|
-
|
|
2960
|
+
const summary = createDoctorRunSummary(checks, {
|
|
2961
|
+
exitPolicy: doctorExitPolicy
|
|
2962
|
+
});
|
|
2963
|
+
if (summary.exitCode === 1) {
|
|
2789
2964
|
emitCliDiagnosticFailure(args, {
|
|
2790
2965
|
code: CLI_DIAGNOSTIC_CODES.DOCTOR_CHECK_FAILED,
|
|
2791
2966
|
command: "doctor",
|
|
2792
|
-
detailLines:
|
|
2793
|
-
|
|
2967
|
+
detailLines: getDoctorExitFailureDetailLines(checks, {
|
|
2968
|
+
exitPolicy: doctorExitPolicy
|
|
2969
|
+
}),
|
|
2970
|
+
extraOutput: { checks, summary },
|
|
2794
2971
|
summary: "One or more doctor checks failed."
|
|
2795
2972
|
});
|
|
2796
2973
|
return;
|
|
2797
2974
|
}
|
|
2798
|
-
args.output({ checks });
|
|
2975
|
+
args.output({ checks, summary });
|
|
2799
2976
|
return;
|
|
2800
2977
|
}
|
|
2801
2978
|
try {
|
|
2802
|
-
await executeDoctorCommand(args.cwd);
|
|
2979
|
+
await executeDoctorCommand(args.cwd, { exitPolicy: doctorExitPolicy });
|
|
2803
2980
|
} catch (error) {
|
|
2804
2981
|
emitCliDiagnosticFailure(args, {
|
|
2805
2982
|
command: "doctor",
|
|
@@ -3623,7 +3800,7 @@ var templatesCommand = defineCommand({
|
|
|
3623
3800
|
return;
|
|
3624
3801
|
}
|
|
3625
3802
|
if (effectiveSubcommand === "inspect" && id) {
|
|
3626
|
-
const { getTemplateById } = await import("./cli-templates-
|
|
3803
|
+
const { getTemplateById } = await import("./cli-templates-g8t4fm11.js");
|
|
3627
3804
|
let template;
|
|
3628
3805
|
try {
|
|
3629
3806
|
template = getTemplateById(id);
|
|
@@ -3673,4 +3850,4 @@ export {
|
|
|
3673
3850
|
wpTypiaCommands
|
|
3674
3851
|
};
|
|
3675
3852
|
|
|
3676
|
-
//# debugId=
|
|
3853
|
+
//# debugId=57FDA4D19922070564756E2164756E21
|