wp-typia 0.23.0 → 0.23.1
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 +2 -1
- package/bin/routing-metadata.generated.js +4 -0
- package/dist-bunli/.bunli/commands.gen.js +4103 -3086
- package/dist-bunli/{cli-hhp1d348.js → cli-1170yyve.js} +8 -7
- 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-xjaaa01x.js} +1560 -1525
- package/dist-bunli/{cli-52ke0ptp.js → cli-am5x7tb4.js} +8 -2
- package/dist-bunli/cli-ccax7s0s.js +34 -0
- package/dist-bunli/{cli-diagnostics-5dvztm7q.js → cli-diagnostics-10drxh34.js} +1 -1
- package/dist-bunli/{cli-doctor-wy2yjsge.js → cli-doctor-19e8313m.js} +602 -459
- package/dist-bunli/{cli-2rqf6t0b.js → cli-e4bwd81c.js} +8 -11
- package/dist-bunli/{cli-9npd9was.js → cli-epsczb1c.js} +12 -10
- package/dist-bunli/{cli-agywa5n6.js → cli-fp16mntv.js} +8 -4
- package/dist-bunli/{cli-init-xnsbxncv.js → cli-init-2b4yn2cc.js} +14 -10
- package/dist-bunli/{cli-ts9thts5.js → cli-k5q5v8g6.js} +184 -162
- package/dist-bunli/{cli-c2acv5dv.js → cli-nvs5atj1.js} +2 -2
- 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-4tjw4jk5.js} +27 -15
- 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-1meywwsy.js → cli-y7w3pybs.js} +848 -246
- package/dist-bunli/{cli-z5qkx2pn.js → cli-ymecd15q.js} +37 -10
- package/dist-bunli/cli.js +4 -4
- package/dist-bunli/{command-list-aqrkx021.js → command-list-vme7dr5v.js} +81 -45
- package/dist-bunli/{create-template-validation-rtec5sng.js → create-template-validation-4fr851vg.js} +5 -4
- package/dist-bunli/{migrations-bx0yvc2v.js → migrations-pb5vvtdp.js} +9 -8
- package/dist-bunli/node-cli.js +399 -317
- package/dist-bunli/{workspace-project-csnnggz6.js → workspace-project-gmv2a71z.js} +4 -3
- package/package.json +2 -2
|
@@ -10,11 +10,11 @@ import {
|
|
|
10
10
|
createCliCommandError,
|
|
11
11
|
createCliDiagnosticCodeError,
|
|
12
12
|
serializeCliDiagnosticError
|
|
13
|
-
} from "./cli-
|
|
13
|
+
} from "./cli-tq730sqt.js";
|
|
14
14
|
// package.json
|
|
15
15
|
var package_default = {
|
|
16
16
|
name: "wp-typia",
|
|
17
|
-
version: "0.23.
|
|
17
|
+
version: "0.23.1",
|
|
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.23.
|
|
87
|
+
"@wp-typia/project-tools": "0.23.1",
|
|
88
88
|
"better-result": "^2.7.0",
|
|
89
89
|
react: "^19.2.5",
|
|
90
90
|
"react-dom": "^19.2.5",
|
|
@@ -174,11 +174,11 @@ var ADD_OPTION_METADATA = {
|
|
|
174
174
|
type: "string"
|
|
175
175
|
},
|
|
176
176
|
"controller-class": {
|
|
177
|
-
description: "
|
|
177
|
+
description: "REST resource controller class used for generated route callbacks or declared manual/provider route ownership.",
|
|
178
178
|
type: "string"
|
|
179
179
|
},
|
|
180
180
|
"controller-extends": {
|
|
181
|
-
description: "Optional base class for generated REST resource controller wrappers.",
|
|
181
|
+
description: "Optional base class for generated REST resource controller wrappers or declared manual/provider controller ownership.",
|
|
182
182
|
type: "string"
|
|
183
183
|
},
|
|
184
184
|
"data-storage": {
|
|
@@ -233,7 +233,7 @@ var ADD_OPTION_METADATA = {
|
|
|
233
233
|
type: "string"
|
|
234
234
|
},
|
|
235
235
|
"permission-callback": {
|
|
236
|
-
description: "PHP permission callback for generated
|
|
236
|
+
description: "PHP permission callback for generated route registrations or declared manual/provider route ownership.",
|
|
237
237
|
type: "string"
|
|
238
238
|
},
|
|
239
239
|
"post-type": {
|
|
@@ -260,16 +260,33 @@ var ADD_OPTION_METADATA = {
|
|
|
260
260
|
description: "Exported TypeScript response type for manual REST contract workflows.",
|
|
261
261
|
type: "string"
|
|
262
262
|
},
|
|
263
|
+
"release-zip": {
|
|
264
|
+
argumentKind: "flag",
|
|
265
|
+
description: "Add release zip packaging scripts for integration-env plugin QA workflows.",
|
|
266
|
+
type: "boolean"
|
|
267
|
+
},
|
|
263
268
|
"route-pattern": {
|
|
264
|
-
description: "
|
|
269
|
+
description: "REST route pattern relative to the namespace; generated resources use it for item routes and manual/provider contracts may use it as an alias for --path.",
|
|
265
270
|
type: "string"
|
|
266
271
|
},
|
|
267
272
|
"secret-field": {
|
|
268
|
-
description: "Write-only request body field for manual settings REST contracts.",
|
|
273
|
+
description: "Write-only request body field for manual settings REST contracts; requires --manual and a request body, typically generated by POST, PUT, or PATCH.",
|
|
274
|
+
type: "string"
|
|
275
|
+
},
|
|
276
|
+
"secret-has-value-field": {
|
|
277
|
+
description: "Alias for --secret-state-field when the manual settings response exposes a safe has-value indicator.",
|
|
278
|
+
type: "string"
|
|
279
|
+
},
|
|
280
|
+
"secret-masked-response-field": {
|
|
281
|
+
description: "Alias for --secret-state-field when the manual settings response exposes masked secret state.",
|
|
282
|
+
type: "string"
|
|
283
|
+
},
|
|
284
|
+
"secret-preserve-on-empty": {
|
|
285
|
+
description: "Whether blank manual settings secret submissions should preserve the stored secret (true by default).",
|
|
269
286
|
type: "string"
|
|
270
287
|
},
|
|
271
288
|
"secret-state-field": {
|
|
272
|
-
description: "Masked response boolean field for --secret-field; defaults to has<SecretField
|
|
289
|
+
description: "Masked response boolean field for --secret-field; defaults to has<SecretField> and may also be provided as --secret-has-value-field.",
|
|
273
290
|
type: "string"
|
|
274
291
|
},
|
|
275
292
|
service: {
|
|
@@ -355,6 +372,10 @@ var CREATE_OPTION_METADATA = {
|
|
|
355
372
|
description: "Custom PHP symbol prefix.",
|
|
356
373
|
type: "string"
|
|
357
374
|
},
|
|
375
|
+
profile: {
|
|
376
|
+
description: "Opt-in scaffold profile; use plugin-qa with --template workspace for wp-env, smoke, and release zip starters.",
|
|
377
|
+
type: "string"
|
|
378
|
+
},
|
|
358
379
|
"query-post-type": {
|
|
359
380
|
description: "Default post type assigned to Query Loop variation scaffolds.",
|
|
360
381
|
type: "string"
|
|
@@ -399,6 +420,11 @@ var DOCTOR_OPTION_METADATA = {
|
|
|
399
420
|
format: {
|
|
400
421
|
description: "Use `json` for machine-readable doctor check output or `text` for human-readable output.",
|
|
401
422
|
type: "string"
|
|
423
|
+
},
|
|
424
|
+
"workspace-only": {
|
|
425
|
+
argumentKind: "flag",
|
|
426
|
+
description: "Fail only on workspace-scoped doctor checks; environment/runtime failures remain advisory in JSON summaries.",
|
|
427
|
+
type: "boolean"
|
|
402
428
|
}
|
|
403
429
|
};
|
|
404
430
|
// src/command-options/global.ts
|
|
@@ -965,6 +991,7 @@ var createConfigSchema = exports_external.object({
|
|
|
965
991
|
"package-manager": exports_external.string().optional(),
|
|
966
992
|
"persistence-policy": exports_external.string().optional(),
|
|
967
993
|
"php-prefix": exports_external.string().optional(),
|
|
994
|
+
profile: exports_external.string().optional(),
|
|
968
995
|
"query-post-type": exports_external.string().optional(),
|
|
969
996
|
template: exports_external.string().optional(),
|
|
970
997
|
"text-domain": exports_external.string().optional(),
|
|
@@ -1103,4 +1130,4 @@ function createPlugin(input) {
|
|
|
1103
1130
|
}
|
|
1104
1131
|
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 };
|
|
1105
1132
|
|
|
1106
|
-
//# debugId=
|
|
1133
|
+
//# debugId=B4E0791804C009A564756E2164756E21
|
package/dist-bunli/cli.js
CHANGED
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
package_default,
|
|
23
23
|
validateCliOutputFormatArgv,
|
|
24
24
|
writeStructuredCliDiagnosticError
|
|
25
|
-
} from "./cli-
|
|
25
|
+
} from "./cli-ymecd15q.js";
|
|
26
26
|
import"./cli-03j0axbt.js";
|
|
27
27
|
import {
|
|
28
28
|
GLOBAL_FLAGS,
|
|
@@ -41,7 +41,7 @@ import"./cli-43mx1vfb.js";
|
|
|
41
41
|
import {
|
|
42
42
|
CLI_DIAGNOSTIC_CODES,
|
|
43
43
|
createCliDiagnosticCodeError
|
|
44
|
-
} from "./cli-
|
|
44
|
+
} from "./cli-tq730sqt.js";
|
|
45
45
|
import {
|
|
46
46
|
__require
|
|
47
47
|
} from "./cli-xnn9xjcy.js";
|
|
@@ -2452,7 +2452,7 @@ function resolveGeneratedMetadataPath(moduleUrl) {
|
|
|
2452
2452
|
}
|
|
2453
2453
|
async function formatCliError(error) {
|
|
2454
2454
|
try {
|
|
2455
|
-
const { formatCliDiagnosticError } = await import("./cli-diagnostics-
|
|
2455
|
+
const { formatCliDiagnosticError } = await import("./cli-diagnostics-10drxh34.js");
|
|
2456
2456
|
return formatCliDiagnosticError(error);
|
|
2457
2457
|
} catch {
|
|
2458
2458
|
return error instanceof Error ? error.message : String(error);
|
|
@@ -2460,7 +2460,7 @@ async function formatCliError(error) {
|
|
|
2460
2460
|
}
|
|
2461
2461
|
async function createWpTypiaCli(options = {}) {
|
|
2462
2462
|
applyStandaloneSupportLayoutEnv();
|
|
2463
|
-
const { wpTypiaCommands } = await import("./command-list-
|
|
2463
|
+
const { wpTypiaCommands } = await import("./command-list-vme7dr5v.js");
|
|
2464
2464
|
const cli = await createCLI({
|
|
2465
2465
|
...bunliConfig,
|
|
2466
2466
|
description: package_default.description,
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
package_default,
|
|
20
20
|
prefersStructuredCliOutput,
|
|
21
21
|
resolveCommandOptionValues
|
|
22
|
-
} from "./cli-
|
|
22
|
+
} from "./cli-ymecd15q.js";
|
|
23
23
|
import {
|
|
24
24
|
Result,
|
|
25
25
|
TaggedError,
|
|
@@ -42,7 +42,7 @@ import {
|
|
|
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
|
|
@@ -648,17 +649,19 @@ var hookedBlockAddKindEntry = defineAddKindRegistryEntry({
|
|
|
648
649
|
});
|
|
649
650
|
|
|
650
651
|
// 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>].";
|
|
652
|
+
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
653
|
var integrationEnvAddKindEntry = defineAddKindRegistryEntry({
|
|
653
654
|
completion: {
|
|
654
655
|
nextSteps: (values) => [
|
|
655
656
|
`Review scripts/integration-smoke/${values.integrationEnvSlug}.mjs and docs/integration-env/${values.integrationEnvSlug}.md.`,
|
|
656
657
|
"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."] : []
|
|
658
|
+
...values.withWpEnv === "true" ? ["Run `npm run wp-env:start` before the smoke check when using the generated wp-env preset."] : [],
|
|
659
|
+
...values.withReleaseZip === "true" ? ["Run `npm run release:zip` after smoke checks pass to build a distributable plugin zip."] : []
|
|
658
660
|
],
|
|
659
661
|
summaryLines: (values, projectDir) => [
|
|
660
662
|
`Integration env: ${values.integrationEnvSlug}`,
|
|
661
663
|
`wp-env preset: ${values.withWpEnv}`,
|
|
664
|
+
`Release zip scripts: ${values.withReleaseZip}`,
|
|
662
665
|
`Service starter: ${values.service}`,
|
|
663
666
|
`Project directory: ${projectDir}`
|
|
664
667
|
],
|
|
@@ -668,17 +671,20 @@ var integrationEnvAddKindEntry = defineAddKindRegistryEntry({
|
|
|
668
671
|
nameLabel: "Integration env name",
|
|
669
672
|
async prepareExecution(context) {
|
|
670
673
|
const service = readOptionalStrictStringFlag(context.flags, "service");
|
|
674
|
+
const withReleaseZip = Boolean(context.flags["release-zip"]);
|
|
671
675
|
const withWpEnv = Boolean(context.flags["wp-env"]);
|
|
672
676
|
return createNamedExecutionPlan(context, {
|
|
673
677
|
execute: ({ cwd, name }) => context.addRuntime.runAddIntegrationEnvCommand({
|
|
674
678
|
cwd,
|
|
675
679
|
integrationEnvName: name,
|
|
676
680
|
service,
|
|
681
|
+
withReleaseZip,
|
|
677
682
|
withWpEnv
|
|
678
683
|
}),
|
|
679
684
|
getValues: (result) => ({
|
|
680
685
|
integrationEnvSlug: result.integrationEnvSlug,
|
|
681
686
|
service: result.service,
|
|
687
|
+
withReleaseZip: String(result.withReleaseZip),
|
|
682
688
|
withWpEnv: String(result.withWpEnv)
|
|
683
689
|
}),
|
|
684
690
|
getWarnings: (result) => result.warnings,
|
|
@@ -688,8 +694,9 @@ var integrationEnvAddKindEntry = defineAddKindRegistryEntry({
|
|
|
688
694
|
},
|
|
689
695
|
sortOrder: 25,
|
|
690
696
|
supportsDryRun: true,
|
|
691
|
-
usage: "wp-typia add integration-env <name> [--wp-env] [--service <none|docker-compose>] [--dry-run]",
|
|
692
|
-
visibleFieldNames: () => NAME_ONLY_VISIBLE_FIELDS
|
|
697
|
+
usage: "wp-typia add integration-env <name> [--wp-env] [--release-zip] [--service <none|docker-compose>] [--dry-run]",
|
|
698
|
+
visibleFieldNames: () => NAME_ONLY_VISIBLE_FIELDS,
|
|
699
|
+
hiddenBooleanSubmitFields: ["wp-env", "release-zip"]
|
|
693
700
|
});
|
|
694
701
|
|
|
695
702
|
// src/add-kinds/pattern.ts
|
|
@@ -789,10 +796,16 @@ var postMetaAddKindEntry = defineAddKindRegistryEntry({
|
|
|
789
796
|
});
|
|
790
797
|
|
|
791
798
|
// src/add-kinds/rest-resource.ts
|
|
792
|
-
var
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
}
|
|
799
|
+
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]";
|
|
800
|
+
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]";
|
|
801
|
+
var REST_RESOURCE_USAGE = `${REST_RESOURCE_GENERATED_USAGE}
|
|
802
|
+
${REST_RESOURCE_MANUAL_USAGE}`;
|
|
803
|
+
var REST_RESOURCE_MISSING_NAME_MESSAGE = [
|
|
804
|
+
"`wp-typia add rest-resource` requires <name>. Usage:",
|
|
805
|
+
` ${REST_RESOURCE_GENERATED_USAGE}`,
|
|
806
|
+
` ${REST_RESOURCE_MANUAL_USAGE}`
|
|
807
|
+
].join(`
|
|
808
|
+
`);
|
|
796
809
|
var restResourceAddKindEntry = defineAddKindRegistryEntry({
|
|
797
810
|
completion: {
|
|
798
811
|
nextSteps: (values) => values.mode === "manual" ? [
|
|
@@ -810,8 +823,12 @@ var restResourceAddKindEntry = defineAddKindRegistryEntry({
|
|
|
810
823
|
`Route: ${values.method} /${values.namespace}${values.pathPattern}`,
|
|
811
824
|
`Auth: ${values.auth}`,
|
|
812
825
|
...values.secretFieldName ? [
|
|
813
|
-
`Secret field: ${values.secretFieldName} -> ${values.secretStateFieldName}
|
|
814
|
-
|
|
826
|
+
`Secret field: ${values.secretFieldName} -> ${values.secretStateFieldName}`,
|
|
827
|
+
`Secret preserve on empty: ${values.secretPreserveOnEmpty}`
|
|
828
|
+
] : [],
|
|
829
|
+
...values.permissionCallback ? [`Declared permission callback: ${values.permissionCallback}`] : [],
|
|
830
|
+
...values.controllerClass ? [`Declared controller class: ${values.controllerClass}`] : [],
|
|
831
|
+
...values.controllerExtends ? [`Declared controller base: ${values.controllerExtends}`] : []
|
|
815
832
|
] : [
|
|
816
833
|
`Methods: ${values.methods}`,
|
|
817
834
|
...values.routePattern ? [`Item route: /${values.namespace}${values.routePattern}`] : [],
|
|
@@ -836,6 +853,9 @@ var restResourceAddKindEntry = defineAddKindRegistryEntry({
|
|
|
836
853
|
"response-type",
|
|
837
854
|
"route-pattern",
|
|
838
855
|
"secret-field",
|
|
856
|
+
"secret-has-value-field",
|
|
857
|
+
"secret-masked-response-field",
|
|
858
|
+
"secret-preserve-on-empty",
|
|
839
859
|
"secret-state-field"
|
|
840
860
|
],
|
|
841
861
|
nameLabel: "REST resource name",
|
|
@@ -843,19 +863,22 @@ var restResourceAddKindEntry = defineAddKindRegistryEntry({
|
|
|
843
863
|
const name = requireAddKindName(context, REST_RESOURCE_MISSING_NAME_MESSAGE);
|
|
844
864
|
const auth = readOptionalStrictStringFlag(context.flags, "auth");
|
|
845
865
|
const bodyTypeName = readOptionalStrictStringFlag(context.flags, "body-type");
|
|
846
|
-
const controllerClass =
|
|
847
|
-
const controllerExtends =
|
|
866
|
+
const controllerClass = readOptionalDashedOrCamelStringFlag(context.flags, "controller-class", "controllerClass");
|
|
867
|
+
const controllerExtends = readOptionalDashedOrCamelStringFlag(context.flags, "controller-extends", "controllerExtends");
|
|
848
868
|
const manual = Boolean(context.flags.manual);
|
|
849
869
|
const method = readOptionalStrictStringFlag(context.flags, "method");
|
|
850
870
|
const methods = readOptionalStrictStringFlag(context.flags, "methods");
|
|
851
871
|
const namespace = readOptionalStrictStringFlag(context.flags, "namespace");
|
|
852
|
-
const permissionCallback =
|
|
872
|
+
const permissionCallback = readOptionalDashedOrCamelStringFlag(context.flags, "permission-callback", "permissionCallback");
|
|
853
873
|
const pathPattern = readOptionalStrictStringFlag(context.flags, "path");
|
|
854
874
|
const queryTypeName = readOptionalStrictStringFlag(context.flags, "query-type");
|
|
855
875
|
const responseTypeName = readOptionalStrictStringFlag(context.flags, "response-type");
|
|
856
|
-
const routePattern =
|
|
857
|
-
const secretFieldName =
|
|
858
|
-
const
|
|
876
|
+
const routePattern = readOptionalDashedOrCamelStringFlag(context.flags, "route-pattern", "routePattern");
|
|
877
|
+
const secretFieldName = readOptionalDashedOrCamelStringFlag(context.flags, "secret-field", "secretField");
|
|
878
|
+
const secretHasValueFieldName = readOptionalDashedOrCamelStringFlag(context.flags, "secret-has-value-field", "secretHasValueField");
|
|
879
|
+
const secretMaskedResponseFieldName = readOptionalDashedOrCamelStringFlag(context.flags, "secret-masked-response-field", "secretMaskedResponseField");
|
|
880
|
+
const secretPreserveOnEmpty = readOptionalDashedOrCamelStringFlag(context.flags, "secret-preserve-on-empty", "secretPreserveOnEmpty");
|
|
881
|
+
const secretStateFieldName = readOptionalDashedOrCamelStringFlag(context.flags, "secret-state-field", "secretStateField");
|
|
859
882
|
return createNamedExecutionPlan(context, {
|
|
860
883
|
execute: ({ cwd, name: name2 }) => context.addRuntime.runAddRestResourceCommand({
|
|
861
884
|
auth,
|
|
@@ -874,11 +897,15 @@ var restResourceAddKindEntry = defineAddKindRegistryEntry({
|
|
|
874
897
|
responseTypeName,
|
|
875
898
|
routePattern,
|
|
876
899
|
secretFieldName,
|
|
900
|
+
secretHasValueFieldName,
|
|
901
|
+
secretMaskedResponseFieldName,
|
|
902
|
+
secretPreserveOnEmpty,
|
|
877
903
|
secretStateFieldName
|
|
878
904
|
}),
|
|
879
905
|
getValues: (result) => ({
|
|
880
906
|
auth: result.auth ?? "",
|
|
881
907
|
controllerClass: result.controllerClass ?? "",
|
|
908
|
+
controllerExtends: result.controllerExtends ?? "",
|
|
882
909
|
method: result.method ?? "",
|
|
883
910
|
methods: result.methods.join(", "),
|
|
884
911
|
mode: result.mode,
|
|
@@ -888,6 +915,7 @@ var restResourceAddKindEntry = defineAddKindRegistryEntry({
|
|
|
888
915
|
restResourceSlug: result.restResourceSlug,
|
|
889
916
|
routePattern: result.routePattern ?? "",
|
|
890
917
|
secretFieldName: result.secretFieldName ?? "",
|
|
918
|
+
secretPreserveOnEmpty: result.secretPreserveOnEmpty === undefined ? "" : String(result.secretPreserveOnEmpty),
|
|
891
919
|
secretStateFieldName: result.secretStateFieldName ?? ""
|
|
892
920
|
}),
|
|
893
921
|
missingNameMessage: REST_RESOURCE_MISSING_NAME_MESSAGE,
|
|
@@ -897,7 +925,7 @@ var restResourceAddKindEntry = defineAddKindRegistryEntry({
|
|
|
897
925
|
},
|
|
898
926
|
sortOrder: 80,
|
|
899
927
|
supportsDryRun: true,
|
|
900
|
-
usage:
|
|
928
|
+
usage: REST_RESOURCE_USAGE,
|
|
901
929
|
visibleFieldNames: () => NAME_NAMESPACE_METHODS_VISIBLE_FIELDS
|
|
902
930
|
});
|
|
903
931
|
|
|
@@ -1230,7 +1258,7 @@ async function simulateWorkspaceAddDryRun({
|
|
|
1230
1258
|
cwd,
|
|
1231
1259
|
execute
|
|
1232
1260
|
}) {
|
|
1233
|
-
const { resolveWorkspaceProject } = await import("./workspace-project-
|
|
1261
|
+
const { resolveWorkspaceProject } = await import("./workspace-project-gmv2a71z.js");
|
|
1234
1262
|
const workspace = resolveWorkspaceProject(cwd);
|
|
1235
1263
|
const relativeCwd = path.relative(workspace.projectDir, path.resolve(cwd));
|
|
1236
1264
|
const { path: tempRoot, cleanup } = await createManagedTempRoot("wp-typia-add-plan-");
|
|
@@ -1598,7 +1626,7 @@ function supportsInteractiveTui(options = {}) {
|
|
|
1598
1626
|
}
|
|
1599
1627
|
|
|
1600
1628
|
// src/runtime-bridge-shared.ts
|
|
1601
|
-
var loadCliDiagnosticsRuntime = () => import("./cli-diagnostics-
|
|
1629
|
+
var loadCliDiagnosticsRuntime = () => import("./cli-diagnostics-10drxh34.js");
|
|
1602
1630
|
async function wrapCliCommandError(command, error) {
|
|
1603
1631
|
const { createCliCommandError } = await loadCliDiagnosticsRuntime();
|
|
1604
1632
|
return createCliCommandError({ command, error });
|
|
@@ -1633,8 +1661,8 @@ function pushFlag(argv, name, value) {
|
|
|
1633
1661
|
}
|
|
1634
1662
|
|
|
1635
1663
|
// src/runtime-bridge-add.ts
|
|
1636
|
-
var loadCliAddRuntime = () => import("./cli-add-
|
|
1637
|
-
var loadCliPromptRuntime = () => import("./cli-prompt-
|
|
1664
|
+
var loadCliAddRuntime = () => import("./cli-add-xjaaa01x.js");
|
|
1665
|
+
var loadCliPromptRuntime = () => import("./cli-prompt-ncyg68rn.js");
|
|
1638
1666
|
async function executeWorkspaceAddWithOptionalDryRun(options) {
|
|
1639
1667
|
const simulated = options.dryRun ? await simulateWorkspaceAddDryRun({
|
|
1640
1668
|
cwd: options.cwd,
|
|
@@ -1740,10 +1768,10 @@ async function executeAddCommand({
|
|
|
1740
1768
|
}
|
|
1741
1769
|
}
|
|
1742
1770
|
// 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-
|
|
1771
|
+
var loadCliPromptRuntime2 = () => import("./cli-prompt-ncyg68rn.js");
|
|
1772
|
+
var loadCliScaffoldRuntime = () => import("./cli-scaffold-4tjw4jk5.js");
|
|
1773
|
+
var loadCliTemplatesRuntime = () => import("./cli-templates-g8t4fm11.js");
|
|
1774
|
+
var loadCreateTemplateValidationRuntime = () => import("./create-template-validation-4fr851vg.js");
|
|
1747
1775
|
var PACKAGE_MANAGER_PROMPT_OPTIONS = [
|
|
1748
1776
|
{ label: "npm", value: "npm", hint: "Use npm" },
|
|
1749
1777
|
{ label: "pnpm", value: "pnpm", hint: "Use pnpm" },
|
|
@@ -1813,6 +1841,7 @@ async function executeCreateCommand({
|
|
|
1813
1841
|
packageManager: readOptionalLooseStringFlag(flags, "package-manager"),
|
|
1814
1842
|
persistencePolicy: readOptionalLooseStringFlag(flags, "persistence-policy"),
|
|
1815
1843
|
phpPrefix: readOptionalLooseStringFlag(flags, "php-prefix"),
|
|
1844
|
+
profile: readOptionalLooseStringFlag(flags, "profile"),
|
|
1816
1845
|
projectInput: projectDir,
|
|
1817
1846
|
onProgress: async (progress) => {
|
|
1818
1847
|
const payload2 = {
|
|
@@ -1861,18 +1890,18 @@ async function executeCreateCommand({
|
|
|
1861
1890
|
}
|
|
1862
1891
|
}
|
|
1863
1892
|
// src/runtime-bridge-doctor.ts
|
|
1864
|
-
var loadCliDoctorRuntime = () => import("./cli-doctor-
|
|
1865
|
-
async function executeDoctorCommand(cwd) {
|
|
1893
|
+
var loadCliDoctorRuntime = () => import("./cli-doctor-19e8313m.js");
|
|
1894
|
+
async function executeDoctorCommand(cwd, options = {}) {
|
|
1866
1895
|
try {
|
|
1867
1896
|
const { runDoctor } = await loadCliDoctorRuntime();
|
|
1868
|
-
await runDoctor(cwd);
|
|
1897
|
+
await runDoctor(cwd, { exitPolicy: options.exitPolicy });
|
|
1869
1898
|
} catch (error) {
|
|
1870
1899
|
throw await wrapCliCommandError("doctor", error);
|
|
1871
1900
|
}
|
|
1872
1901
|
}
|
|
1873
1902
|
// src/runtime-bridge-init.ts
|
|
1874
1903
|
import path2 from "path";
|
|
1875
|
-
var loadCliInitRuntime = () => import("./cli-init-
|
|
1904
|
+
var loadCliInitRuntime = () => import("./cli-init-2b4yn2cc.js");
|
|
1876
1905
|
async function executeInitCommand({ apply, cwd, packageManager, projectDir }, options = {}) {
|
|
1877
1906
|
try {
|
|
1878
1907
|
const { runInitCommand } = await loadCliInitRuntime();
|
|
@@ -1898,7 +1927,7 @@ async function executeInitCommand({ apply, cwd, packageManager, projectDir }, op
|
|
|
1898
1927
|
}
|
|
1899
1928
|
}
|
|
1900
1929
|
// src/runtime-bridge-migrate.ts
|
|
1901
|
-
var loadMigrationsRuntime = () => import("./migrations-
|
|
1930
|
+
var loadMigrationsRuntime = () => import("./migrations-pb5vvtdp.js");
|
|
1902
1931
|
var defaultPrintLine2 = (line) => {
|
|
1903
1932
|
process.stdout.write(`${line}
|
|
1904
1933
|
`);
|
|
@@ -1955,7 +1984,7 @@ async function executeMigrateCommand({
|
|
|
1955
1984
|
}
|
|
1956
1985
|
}
|
|
1957
1986
|
// src/runtime-bridge-templates.ts
|
|
1958
|
-
var loadCliTemplatesRuntime2 = () => import("./cli-templates-
|
|
1987
|
+
var loadCliTemplatesRuntime2 = () => import("./cli-templates-g8t4fm11.js");
|
|
1959
1988
|
async function executeTemplatesCommand({ flags }, printLine = console.log) {
|
|
1960
1989
|
const {
|
|
1961
1990
|
formatTemplateDetails,
|
|
@@ -2779,27 +2808,34 @@ var doctorCommand = defineCommand({
|
|
|
2779
2808
|
description: "Run repository and project diagnostics.",
|
|
2780
2809
|
handler: async (args) => {
|
|
2781
2810
|
const prefersStructuredOutput = prefersStructuredCliOutput(args);
|
|
2811
|
+
const doctorExitPolicy = args.flags["workspace-only"] ? "workspace-only" : "strict";
|
|
2782
2812
|
if (prefersStructuredOutput) {
|
|
2783
|
-
const
|
|
2784
|
-
|
|
2785
|
-
|
|
2786
|
-
|
|
2813
|
+
const {
|
|
2814
|
+
createDoctorRunSummary,
|
|
2815
|
+
getDoctorChecks,
|
|
2816
|
+
getDoctorExitFailureDetailLines
|
|
2817
|
+
} = await import("./cli-doctor-19e8313m.js");
|
|
2787
2818
|
const checks = await getDoctorChecks(args.cwd);
|
|
2788
|
-
|
|
2819
|
+
const summary = createDoctorRunSummary(checks, {
|
|
2820
|
+
exitPolicy: doctorExitPolicy
|
|
2821
|
+
});
|
|
2822
|
+
if (summary.exitCode === 1) {
|
|
2789
2823
|
emitCliDiagnosticFailure(args, {
|
|
2790
2824
|
code: CLI_DIAGNOSTIC_CODES.DOCTOR_CHECK_FAILED,
|
|
2791
2825
|
command: "doctor",
|
|
2792
|
-
detailLines:
|
|
2793
|
-
|
|
2826
|
+
detailLines: getDoctorExitFailureDetailLines(checks, {
|
|
2827
|
+
exitPolicy: doctorExitPolicy
|
|
2828
|
+
}),
|
|
2829
|
+
extraOutput: { checks, summary },
|
|
2794
2830
|
summary: "One or more doctor checks failed."
|
|
2795
2831
|
});
|
|
2796
2832
|
return;
|
|
2797
2833
|
}
|
|
2798
|
-
args.output({ checks });
|
|
2834
|
+
args.output({ checks, summary });
|
|
2799
2835
|
return;
|
|
2800
2836
|
}
|
|
2801
2837
|
try {
|
|
2802
|
-
await executeDoctorCommand(args.cwd);
|
|
2838
|
+
await executeDoctorCommand(args.cwd, { exitPolicy: doctorExitPolicy });
|
|
2803
2839
|
} catch (error) {
|
|
2804
2840
|
emitCliDiagnosticFailure(args, {
|
|
2805
2841
|
command: "doctor",
|
|
@@ -3623,7 +3659,7 @@ var templatesCommand = defineCommand({
|
|
|
3623
3659
|
return;
|
|
3624
3660
|
}
|
|
3625
3661
|
if (effectiveSubcommand === "inspect" && id) {
|
|
3626
|
-
const { getTemplateById } = await import("./cli-templates-
|
|
3662
|
+
const { getTemplateById } = await import("./cli-templates-g8t4fm11.js");
|
|
3627
3663
|
let template;
|
|
3628
3664
|
try {
|
|
3629
3665
|
template = getTemplateById(id);
|
|
@@ -3673,4 +3709,4 @@ export {
|
|
|
3673
3709
|
wpTypiaCommands
|
|
3674
3710
|
};
|
|
3675
3711
|
|
|
3676
|
-
//# debugId=
|
|
3712
|
+
//# debugId=AB24C426F1FD01C264756E2164756E21
|
package/dist-bunli/{create-template-validation-rtec5sng.js → create-template-validation-4fr851vg.js}
RENAMED
|
@@ -2,14 +2,15 @@
|
|
|
2
2
|
import {
|
|
3
3
|
CREATE_TEMPLATE_SELECTION_HINT,
|
|
4
4
|
validateExplicitCreateTemplateId
|
|
5
|
-
} from "./cli-
|
|
6
|
-
import"./cli-
|
|
5
|
+
} from "./cli-9fx0qgb7.js";
|
|
6
|
+
import"./cli-8hxf9qw6.js";
|
|
7
7
|
import"./cli-cvxvcw7c.js";
|
|
8
|
-
import"./cli-
|
|
8
|
+
import"./cli-tq730sqt.js";
|
|
9
|
+
import"./cli-ccax7s0s.js";
|
|
9
10
|
import"./cli-xnn9xjcy.js";
|
|
10
11
|
export {
|
|
11
12
|
validateExplicitCreateTemplateId,
|
|
12
13
|
CREATE_TEMPLATE_SELECTION_HINT
|
|
13
14
|
};
|
|
14
15
|
|
|
15
|
-
//# debugId=
|
|
16
|
+
//# debugId=AA2A83976766C04064756E2164756E21
|
|
@@ -15,15 +15,16 @@ import {
|
|
|
15
15
|
snapshotProjectVersion,
|
|
16
16
|
verifyProjectMigrations,
|
|
17
17
|
wizardProjectMigrations
|
|
18
|
-
} from "./cli-
|
|
19
|
-
import"./cli-
|
|
20
|
-
import"./cli-
|
|
18
|
+
} from "./cli-epsczb1c.js";
|
|
19
|
+
import"./cli-e4bwd81c.js";
|
|
20
|
+
import"./cli-k5q5v8g6.js";
|
|
21
21
|
import"./cli-cvxvcw7c.js";
|
|
22
22
|
import"./cli-43mx1vfb.js";
|
|
23
|
-
import"./cli-
|
|
24
|
-
import"./cli-
|
|
25
|
-
import"./cli-
|
|
26
|
-
import"./cli-
|
|
23
|
+
import"./cli-tq730sqt.js";
|
|
24
|
+
import"./cli-1170yyve.js";
|
|
25
|
+
import"./cli-am5x7tb4.js";
|
|
26
|
+
import"./cli-ccax7s0s.js";
|
|
27
|
+
import"./cli-rdcga1bd.js";
|
|
27
28
|
import"./cli-xnn9xjcy.js";
|
|
28
29
|
export {
|
|
29
30
|
wizardProjectMigrations,
|
|
@@ -43,4 +44,4 @@ export {
|
|
|
43
44
|
diffProjectMigrations
|
|
44
45
|
};
|
|
45
46
|
|
|
46
|
-
//# debugId=
|
|
47
|
+
//# debugId=7A9538785578A7A464756E2164756E21
|