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
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
formatRunScript,
|
|
4
4
|
inferPackageManagerId,
|
|
5
5
|
parsePackageManagerField
|
|
6
|
-
} from "./cli-
|
|
6
|
+
} from "./cli-am5x7tb4.js";
|
|
7
7
|
import {
|
|
8
|
-
|
|
9
|
-
} from "./cli-
|
|
8
|
+
readJsonFileSync
|
|
9
|
+
} from "./cli-ccax7s0s.js";
|
|
10
10
|
|
|
11
11
|
// ../wp-typia-project-tools/src/runtime/migration-utils.ts
|
|
12
12
|
import fs from "fs";
|
|
@@ -31,11 +31,6 @@ function stableJsonStringify(value) {
|
|
|
31
31
|
return JSON.stringify(toStableJsonValue(value));
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
// ../wp-typia-project-tools/src/runtime/json-utils.ts
|
|
35
|
-
var exports_json_utils = {};
|
|
36
|
-
__reExport(exports_json_utils, json_utils);
|
|
37
|
-
import"@wp-typia/block-runtime/json-utils";
|
|
38
|
-
|
|
39
34
|
// ../wp-typia-project-tools/src/runtime/migration-utils.ts
|
|
40
35
|
var MIGRATION_VERSION_LABEL_PATTERN = /^v([1-9]\d*)$/;
|
|
41
36
|
var LEGACY_SEMVER_MIGRATION_VERSION_PATTERN = /^\d+\.\d+\.\d+$/;
|
|
@@ -97,7 +92,9 @@ function createTransformFixtureValue(attribute, pathLabel) {
|
|
|
97
92
|
}
|
|
98
93
|
}
|
|
99
94
|
function readJson(filePath) {
|
|
100
|
-
return
|
|
95
|
+
return readJsonFileSync(filePath, {
|
|
96
|
+
context: "migration JSON file"
|
|
97
|
+
});
|
|
101
98
|
}
|
|
102
99
|
function renderPhpValue(value, indentLevel) {
|
|
103
100
|
const indent = "\t".repeat(indentLevel);
|
|
@@ -1258,6 +1255,6 @@ ${blocksSource}
|
|
|
1258
1255
|
export default migrationConfig;
|
|
1259
1256
|
`, "utf8");
|
|
1260
1257
|
}
|
|
1261
|
-
export { isPlainObject, stableJsonStringify,
|
|
1258
|
+
export { isPlainObject, stableJsonStringify, getValueAtPath, setValueAtPath, deleteValueAtPath, createFixtureScalarValue, createTransformFixtureValue, readJson, renderPhpValue, copyFile, sanitizeSaveSnapshotSource, sanitizeSnapshotBlockJson, runProjectScriptIfPresent, detectPackageManagerId, getLocalTsxBinary, isInteractiveTerminal, resolveTargetMigrationVersion, assertMigrationVersionLabel, compareMigrationVersionLabels, formatLegacyMigrationWorkspaceResetGuidance, escapeForCode, renderObjectKey, isNumber, parseMigrationConfig, ROOT_PHP_MIGRATION_REGISTRY, SNAPSHOT_DIR, MIGRATION_TODO_PREFIX, ensureAdvancedMigrationProject, discoverMigrationInitLayout, getProjectPaths, getSnapshotRoot, getSnapshotBlockJsonPath, getSnapshotManifestPath, getAvailableSnapshotVersionsForBlock, createMissingBlockSnapshotMessage, getSnapshotSavePath, getGeneratedDirForBlock, getRuleFilePath, getFixtureFilePath, ensureMigrationDirectories, discoverMigrationEntries, assertRuleHasNoTodos, readRuleMetadata, writeInitialMigrationScaffold, assertNoLegacySemverMigrationWorkspace, loadMigrationProject, writeMigrationConfig };
|
|
1262
1259
|
|
|
1263
|
-
//# debugId=
|
|
1260
|
+
//# debugId=595C3CACBE984E6464756E2164756E21
|
|
@@ -18,7 +18,6 @@ import {
|
|
|
18
18
|
ensureAdvancedMigrationProject,
|
|
19
19
|
ensureMigrationDirectories,
|
|
20
20
|
escapeForCode,
|
|
21
|
-
exports_json_utils,
|
|
22
21
|
formatLegacyMigrationWorkspaceResetGuidance,
|
|
23
22
|
getAvailableSnapshotVersionsForBlock,
|
|
24
23
|
getFixtureFilePath,
|
|
@@ -45,20 +44,23 @@ import {
|
|
|
45
44
|
setValueAtPath,
|
|
46
45
|
writeInitialMigrationScaffold,
|
|
47
46
|
writeMigrationConfig
|
|
48
|
-
} from "./cli-
|
|
47
|
+
} from "./cli-e4bwd81c.js";
|
|
49
48
|
import {
|
|
50
49
|
readWorkspaceInventory
|
|
51
|
-
} from "./cli-
|
|
50
|
+
} from "./cli-k5q5v8g6.js";
|
|
52
51
|
import {
|
|
53
52
|
getInvalidWorkspaceProjectReason,
|
|
54
53
|
tryResolveWorkspaceProject
|
|
55
|
-
} from "./cli-
|
|
54
|
+
} from "./cli-1170yyve.js";
|
|
56
55
|
import {
|
|
57
56
|
formatRunScript
|
|
58
|
-
} from "./cli-
|
|
57
|
+
} from "./cli-am5x7tb4.js";
|
|
58
|
+
import {
|
|
59
|
+
cloneJsonValue
|
|
60
|
+
} from "./cli-ccax7s0s.js";
|
|
59
61
|
import {
|
|
60
62
|
createReadlinePrompt
|
|
61
|
-
} from "./cli-
|
|
63
|
+
} from "./cli-rdcga1bd.js";
|
|
62
64
|
|
|
63
65
|
// ../wp-typia-project-tools/src/runtime/migrations.ts
|
|
64
66
|
import fs8 from "fs";
|
|
@@ -895,7 +897,7 @@ function createEdgeFixtureDocument(projectDir, block, fromVersion, toVersion, di
|
|
|
895
897
|
}
|
|
896
898
|
function createRenameFixtureCases(baseAttributes, renameCandidates) {
|
|
897
899
|
return renameCandidates.filter((candidate) => candidate.autoApply).map((candidate) => {
|
|
898
|
-
const nextInput =
|
|
900
|
+
const nextInput = cloneJsonValue(baseAttributes);
|
|
899
901
|
const legacyValue = getValueAtPath(nextInput, candidate.legacyPath);
|
|
900
902
|
deleteValueAtPath(nextInput, candidate.currentPath);
|
|
901
903
|
if (legacyValue === undefined) {
|
|
@@ -909,7 +911,7 @@ function createRenameFixtureCases(baseAttributes, renameCandidates) {
|
|
|
909
911
|
}
|
|
910
912
|
function createTransformFixtureCases(baseAttributes, transformSuggestions) {
|
|
911
913
|
return transformSuggestions.map((suggestion) => {
|
|
912
|
-
const nextInput =
|
|
914
|
+
const nextInput = cloneJsonValue(baseAttributes);
|
|
913
915
|
const legacyPath = suggestion.legacyPath ?? suggestion.currentPath;
|
|
914
916
|
setValueAtPath(nextInput, legacyPath, createTransformFixtureValue(suggestion.attribute, suggestion.currentPath));
|
|
915
917
|
return {
|
|
@@ -925,7 +927,7 @@ function createUnionFixtureCases(baseAttributes, manifestAttributes, renameCandi
|
|
|
925
927
|
continue;
|
|
926
928
|
}
|
|
927
929
|
for (const [branchKey, branch] of Object.entries(attribute.ts.union.branches ?? {})) {
|
|
928
|
-
const nextInput =
|
|
930
|
+
const nextInput = cloneJsonValue(baseAttributes);
|
|
929
931
|
const legacyPath = renameCandidates.find((candidate) => candidate.autoApply && candidate.currentPath === key)?.legacyPath ?? key;
|
|
930
932
|
setValueAtPath(nextInput, legacyPath, createUnionBranchFixtureValue(attribute.ts.union.discriminator, branchKey, branch));
|
|
931
933
|
cases.push({
|
|
@@ -2607,4 +2609,4 @@ function seedProjectMigrations(projectDir, currentMigrationVersion, blocks, { re
|
|
|
2607
2609
|
|
|
2608
2610
|
export { formatMigrationHelpText, parseMigrationArgs, formatDiffReport, verifyProjectMigrations, doctorProjectMigrations, fixturesProjectMigrations, fuzzProjectMigrations, runMigrationCommand, planProjectMigrations, wizardProjectMigrations, initProjectMigrations, snapshotProjectVersion, diffProjectMigrations, scaffoldProjectMigrations, seedProjectMigrations };
|
|
2609
2611
|
|
|
2610
|
-
//# debugId=
|
|
2612
|
+
//# debugId=A37691396E12D94E64756E2164756E21
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
PROJECT_TOOLS_PACKAGE_ROOT
|
|
4
|
-
} from "./cli-
|
|
4
|
+
} from "./cli-8hxf9qw6.js";
|
|
5
5
|
import {
|
|
6
6
|
getOptionalNodeErrorCode
|
|
7
|
-
} from "./cli-
|
|
7
|
+
} from "./cli-k5q5v8g6.js";
|
|
8
8
|
|
|
9
9
|
// ../wp-typia-project-tools/src/runtime/package-versions.ts
|
|
10
10
|
import fs from "fs";
|
|
@@ -87,7 +87,11 @@ function readPackageManifest(location) {
|
|
|
87
87
|
if (!location.packageJsonPath || location.source === null) {
|
|
88
88
|
return null;
|
|
89
89
|
}
|
|
90
|
-
|
|
90
|
+
try {
|
|
91
|
+
return JSON.parse(location.source);
|
|
92
|
+
} catch (error) {
|
|
93
|
+
throw new Error(`Failed to parse package version manifest at ${location.packageJsonPath}: ${error instanceof Error ? error.message : String(error)}`);
|
|
94
|
+
}
|
|
91
95
|
}
|
|
92
96
|
function tryReadPackageManifest(location) {
|
|
93
97
|
if (!location) {
|
|
@@ -184,4 +188,4 @@ function getPackageVersions() {
|
|
|
184
188
|
|
|
185
189
|
export { DEFAULT_WORDPRESS_ABILITIES_VERSION, DEFAULT_WORDPRESS_CORE_ABILITIES_VERSION, DEFAULT_WORDPRESS_CORE_DATA_VERSION, DEFAULT_WORDPRESS_DATA_VERSION, DEFAULT_WORDPRESS_DATAVIEWS_VERSION, DEFAULT_WP_TYPIA_DATAVIEWS_VERSION, resolveManagedPackageVersionRange, getPackageVersions };
|
|
186
190
|
|
|
187
|
-
//# debugId=
|
|
191
|
+
//# debugId=807B1242BD906C4E64756E2164756E21
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
getPackageVersions
|
|
4
|
-
} from "./cli-
|
|
5
|
-
import"./cli-
|
|
4
|
+
} from "./cli-fp16mntv.js";
|
|
5
|
+
import"./cli-8hxf9qw6.js";
|
|
6
6
|
import {
|
|
7
7
|
discoverMigrationInitLayout
|
|
8
|
-
} from "./cli-
|
|
8
|
+
} from "./cli-e4bwd81c.js";
|
|
9
9
|
import {
|
|
10
10
|
quoteTsString,
|
|
11
11
|
require_typescript,
|
|
@@ -13,24 +13,27 @@ import {
|
|
|
13
13
|
snapshotWorkspaceFiles,
|
|
14
14
|
toPascalCase,
|
|
15
15
|
updateWorkspaceInventorySource
|
|
16
|
-
} from "./cli-
|
|
16
|
+
} from "./cli-k5q5v8g6.js";
|
|
17
17
|
import"./cli-cvxvcw7c.js";
|
|
18
18
|
import"./cli-43mx1vfb.js";
|
|
19
19
|
import {
|
|
20
20
|
CLI_DIAGNOSTIC_CODES,
|
|
21
21
|
createCliDiagnosticCodeError
|
|
22
|
-
} from "./cli-
|
|
22
|
+
} from "./cli-tq730sqt.js";
|
|
23
23
|
import {
|
|
24
24
|
parseWorkspacePackageManagerId,
|
|
25
25
|
tryResolveWorkspaceProject
|
|
26
|
-
} from "./cli-
|
|
26
|
+
} from "./cli-1170yyve.js";
|
|
27
27
|
import {
|
|
28
28
|
formatAddDevDependenciesCommand,
|
|
29
29
|
formatPackageExecCommand,
|
|
30
30
|
formatRunScript,
|
|
31
31
|
getPackageManager,
|
|
32
32
|
transformPackageManagerText
|
|
33
|
-
} from "./cli-
|
|
33
|
+
} from "./cli-am5x7tb4.js";
|
|
34
|
+
import {
|
|
35
|
+
readJsonFileSync
|
|
36
|
+
} from "./cli-ccax7s0s.js";
|
|
34
37
|
import {
|
|
35
38
|
__toESM
|
|
36
39
|
} from "./cli-xnn9xjcy.js";
|
|
@@ -61,9 +64,10 @@ function readProjectPackageJson(projectDir) {
|
|
|
61
64
|
if (!fs.existsSync(packageJsonPath)) {
|
|
62
65
|
return null;
|
|
63
66
|
}
|
|
64
|
-
const source = fs.readFileSync(packageJsonPath, "utf8");
|
|
65
67
|
try {
|
|
66
|
-
return
|
|
68
|
+
return readJsonFileSync(packageJsonPath, {
|
|
69
|
+
context: "project package manifest"
|
|
70
|
+
});
|
|
67
71
|
} catch (error) {
|
|
68
72
|
const message = error instanceof Error ? error.message : String(error);
|
|
69
73
|
throw createCliDiagnosticCodeError(CLI_DIAGNOSTIC_CODES.INVALID_ARGUMENT, `Unable to parse ${packageJsonPath}: ${message}`, error instanceof Error ? { cause: error } : undefined);
|
|
@@ -873,4 +877,4 @@ export {
|
|
|
873
877
|
applyInitPlan
|
|
874
878
|
};
|
|
875
879
|
|
|
876
|
-
//# debugId=
|
|
880
|
+
//# debugId=DC4EACE5C620361164756E2164756E21
|
|
@@ -5,10 +5,13 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
CLI_DIAGNOSTIC_CODES,
|
|
7
7
|
createCliDiagnosticCodeError
|
|
8
|
-
} from "./cli-
|
|
8
|
+
} from "./cli-tq730sqt.js";
|
|
9
9
|
import {
|
|
10
10
|
WORKSPACE_TEMPLATE_PACKAGE
|
|
11
|
-
} from "./cli-
|
|
11
|
+
} from "./cli-1170yyve.js";
|
|
12
|
+
import {
|
|
13
|
+
safeJsonParse
|
|
14
|
+
} from "./cli-ccax7s0s.js";
|
|
12
15
|
import {
|
|
13
16
|
__commonJS,
|
|
14
17
|
__require,
|
|
@@ -171284,6 +171287,9 @@ function isGeneratedRestResourceRoutePatternCompatible(routePattern) {
|
|
|
171284
171287
|
const hasUnsupportedCapture = REST_ROUTE_UNSUPPORTED_CAPTURE_PATTERN.test(routePattern);
|
|
171285
171288
|
return !hasUnsupportedCapture && (!hasRegexGroup || namedCaptures.length === 1 && namedCaptures[0] === "id");
|
|
171286
171289
|
}
|
|
171290
|
+
function collectRestRouteNamedCaptureNames(routePattern) {
|
|
171291
|
+
return Array.from(new Set(Array.from(routePattern.matchAll(REST_ROUTE_NAMED_CAPTURE_PATTERN), (match) => match[1])));
|
|
171292
|
+
}
|
|
171287
171293
|
function resolveManualRestContractPathPattern(slug, pathPattern) {
|
|
171288
171294
|
return resolveRestRoutePathPattern({
|
|
171289
171295
|
defaultPath: `/${slug}`,
|
|
@@ -171380,7 +171386,7 @@ function formatAddHelpText() {
|
|
|
171380
171386
|
return `Usage:
|
|
171381
171387
|
wp-typia add admin-view <name> [--source <rest-resource:slug|core-data:kind/name>] [--dry-run]
|
|
171382
171388
|
wp-typia add block <name> [--template <${ADD_BLOCK_TEMPLATE_IDS.join("|")}>] [--external-layer-source <./path|github:owner/repo/path[#ref]|npm-package>] [--external-layer-id <layer-id>] [--inner-blocks-preset <freeform|ordered|horizontal|locked-structure>] [--alternate-render-targets <email,mjml,plain-text>] [--data-storage <post-meta|custom-table>] [--persistence-policy <authenticated|public>] [--dry-run]
|
|
171383
|
-
wp-typia add integration-env <name> [--wp-env] [--service <none|docker-compose>] [--dry-run]
|
|
171389
|
+
wp-typia add integration-env <name> [--wp-env] [--release-zip] [--service <none|docker-compose>] [--dry-run]
|
|
171384
171390
|
wp-typia add variation <name> --block <block-slug> [--dry-run]
|
|
171385
171391
|
wp-typia add style <name> --block <block-slug> [--dry-run]
|
|
171386
171392
|
wp-typia add transform <name> --from <namespace/block> --to <block-slug|namespace/block-slug> [--dry-run]
|
|
@@ -171388,7 +171394,7 @@ function formatAddHelpText() {
|
|
|
171388
171394
|
wp-typia add binding-source <name> [--block <block-slug|namespace/block-slug> --attribute <attribute>] [--dry-run]
|
|
171389
171395
|
wp-typia add contract <name> [--type <ExportedTypeName>] [--dry-run]
|
|
171390
171396
|
wp-typia add rest-resource <name> [--namespace <vendor/v1>] [--methods <${REST_RESOURCE_METHOD_IDS.join(",")}>] [--route-pattern <route-pattern>] [--permission-callback <callback>] [--controller-class <ClassName>] [--controller-extends <BaseClass>] [--dry-run]
|
|
171391
|
-
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>] [--query-type <Type>] [--body-type <Type>] [--response-type <Type>] [--dry-run]
|
|
171397
|
+
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]
|
|
171392
171398
|
wp-typia add post-meta <name> --post-type <post-type> [--type <ExportedTypeName>] [--meta-key <meta-key>] [--hide-from-rest] [--dry-run]
|
|
171393
171399
|
wp-typia add ability <name> [--dry-run]
|
|
171394
171400
|
wp-typia add ai-feature <name> [--namespace <vendor/v1>] [--dry-run]
|
|
@@ -171404,6 +171410,7 @@ Notes:
|
|
|
171404
171410
|
Pass \`--source core-data:postType/post\` or \`--source core-data:taxonomy/category\` to bind a WordPress-owned entity collection.
|
|
171405
171411
|
Generated admin-view workspaces add \`@wp-typia/dataviews\` and the needed WordPress DataViews packages as opt-in dependencies.
|
|
171406
171412
|
\`add integration-env\` generates an opt-in local smoke starter under \`scripts/integration-smoke/\`, updates \`.env.example\`, and can add \`@wordpress/env\` plus \`.wp-env.json\` when \`--wp-env\` is passed.
|
|
171413
|
+
Pass \`--release-zip\` to add \`release:zip\`, \`release:zip:check\`, and \`qa:check\` scripts for plugin QA packaging.
|
|
171407
171414
|
Pass \`--service docker-compose\` to include a placeholder local service stack that can be adapted to project-specific dependencies.
|
|
171408
171415
|
\`query-loop\` is a create-time scaffold family. Use \`wp-typia create <project-dir> --template query-loop\` instead of \`wp-typia add block\`.
|
|
171409
171416
|
\`add variation\` targets an existing block slug from \`scripts/block-config.ts\`.
|
|
@@ -171413,7 +171420,7 @@ Notes:
|
|
|
171413
171420
|
\`add binding-source\` scaffolds shared PHP and editor registration under \`src/bindings/\`; pass \`--block\` and \`--attribute\` together to declare an end-to-end bindable attribute on an existing generated block.
|
|
171414
171421
|
\`add contract\` registers a standalone TypeScript wire contract under \`src/contracts/\` and generates a stable JSON Schema artifact without creating PHP route glue.
|
|
171415
171422
|
\`add rest-resource\` scaffolds plugin-level TypeScript REST contracts under \`src/rest/\` and PHP route glue under \`inc/rest/\`. Use \`--route-pattern\`, \`--permission-callback\`, \`--controller-class\`, and \`--controller-extends\` when an existing WordPress controller or permission model needs to own part of the generated route surface.
|
|
171416
|
-
Pass \`--manual\` with \`add rest-resource\` to track an external REST route with typed schemas, OpenAPI, clients, and drift checks without generating PHP route/controller files.
|
|
171423
|
+
Pass \`--manual\` with \`add rest-resource\` to track an external/provider REST route with typed schemas, OpenAPI, clients, and drift checks without generating PHP route/controller files. Manual routes may still declare \`--permission-callback\`, \`--controller-class\`, and \`--controller-extends\` as metadata for the route owner. Settings contracts can add \`--secret-field\` with \`--secret-preserve-on-empty\` metadata so generated schemas, clients, and admin forms treat blank secret submissions as preserve-by-default.
|
|
171417
171424
|
\`add post-meta\` scaffolds a typed post meta contract under \`src/post-meta/\`, generates a schema artifact, and wires \`register_post_meta()\` helpers under \`inc/post-meta/\`.
|
|
171418
171425
|
\`add ability\` scaffolds typed workflow abilities under \`src/abilities/\` and server registration under \`inc/abilities/\`.
|
|
171419
171426
|
\`add ai-feature\` scaffolds server-owned AI feature endpoints under \`src/ai-features/\` and PHP route glue under \`inc/ai-features/\`.
|
|
@@ -171559,7 +171566,10 @@ async function readWorkspaceBlockJson(projectDir, blockSlug) {
|
|
|
171559
171566
|
}
|
|
171560
171567
|
let blockJson;
|
|
171561
171568
|
try {
|
|
171562
|
-
blockJson = parseScaffoldBlockMetadata(
|
|
171569
|
+
blockJson = parseScaffoldBlockMetadata(safeJsonParse(source, {
|
|
171570
|
+
context: "workspace block metadata",
|
|
171571
|
+
filePath: blockJsonPath
|
|
171572
|
+
}));
|
|
171563
171573
|
} catch (error) {
|
|
171564
171574
|
throw new Error(error instanceof Error ? `Failed to parse ${path2.relative(projectDir, blockJsonPath)}: ${error.message}` : `Failed to parse ${path2.relative(projectDir, blockJsonPath)}.`);
|
|
171565
171575
|
}
|
|
@@ -171894,6 +171904,9 @@ import path4 from "path";
|
|
|
171894
171904
|
import { readFile } from "fs/promises";
|
|
171895
171905
|
|
|
171896
171906
|
// ../wp-typia-project-tools/src/runtime/workspace-inventory-parser.ts
|
|
171907
|
+
var import_typescript3 = __toESM(require_typescript(), 1);
|
|
171908
|
+
|
|
171909
|
+
// ../wp-typia-project-tools/src/runtime/workspace-inventory-parser-entries.ts
|
|
171897
171910
|
var import_typescript2 = __toESM(require_typescript(), 1);
|
|
171898
171911
|
|
|
171899
171912
|
// ../wp-typia-project-tools/src/runtime/ts-property-names.ts
|
|
@@ -171905,6 +171918,162 @@ function getPropertyNameText(name) {
|
|
|
171905
171918
|
return null;
|
|
171906
171919
|
}
|
|
171907
171920
|
|
|
171921
|
+
// ../wp-typia-project-tools/src/runtime/workspace-inventory-parser-validation.ts
|
|
171922
|
+
function defineInventoryEntryParser() {
|
|
171923
|
+
return (descriptor) => descriptor;
|
|
171924
|
+
}
|
|
171925
|
+
function isMissingRequiredInventoryValue(value) {
|
|
171926
|
+
return value === undefined || typeof value === "string" && value.length === 0;
|
|
171927
|
+
}
|
|
171928
|
+
function formatMissingRequiredInventoryFields(keys) {
|
|
171929
|
+
return keys.length === 1 ? `required "${keys[0]}"` : `required fields ${keys.map((key) => `"${key}"`).join(", ")}`;
|
|
171930
|
+
}
|
|
171931
|
+
function assertParsedInventoryEntry(entry, descriptor, elementIndex) {
|
|
171932
|
+
const missingRequiredKeys = descriptor.fields.filter((field) => field.required === true && isMissingRequiredInventoryValue(entry[field.key])).map((field) => field.key);
|
|
171933
|
+
if (missingRequiredKeys.length > 0) {
|
|
171934
|
+
throw new Error(`${descriptor.entryName}[${elementIndex}] is missing ${formatMissingRequiredInventoryFields(missingRequiredKeys)} in scripts/block-config.ts.`);
|
|
171935
|
+
}
|
|
171936
|
+
}
|
|
171937
|
+
|
|
171938
|
+
// ../wp-typia-project-tools/src/runtime/workspace-inventory-parser-entries.ts
|
|
171939
|
+
function findExportedArrayLiteral(sourceFile, exportName) {
|
|
171940
|
+
for (const statement of sourceFile.statements) {
|
|
171941
|
+
if (!import_typescript2.default.isVariableStatement(statement)) {
|
|
171942
|
+
continue;
|
|
171943
|
+
}
|
|
171944
|
+
if (!statement.modifiers?.some((modifier) => modifier.kind === import_typescript2.default.SyntaxKind.ExportKeyword)) {
|
|
171945
|
+
continue;
|
|
171946
|
+
}
|
|
171947
|
+
for (const declaration of statement.declarationList.declarations) {
|
|
171948
|
+
if (!import_typescript2.default.isIdentifier(declaration.name) || declaration.name.text !== exportName) {
|
|
171949
|
+
continue;
|
|
171950
|
+
}
|
|
171951
|
+
if (declaration.initializer && import_typescript2.default.isArrayLiteralExpression(declaration.initializer)) {
|
|
171952
|
+
return {
|
|
171953
|
+
array: declaration.initializer,
|
|
171954
|
+
found: true
|
|
171955
|
+
};
|
|
171956
|
+
}
|
|
171957
|
+
return {
|
|
171958
|
+
array: null,
|
|
171959
|
+
found: true
|
|
171960
|
+
};
|
|
171961
|
+
}
|
|
171962
|
+
}
|
|
171963
|
+
return {
|
|
171964
|
+
array: null,
|
|
171965
|
+
found: false
|
|
171966
|
+
};
|
|
171967
|
+
}
|
|
171968
|
+
function getOptionalStringProperty(entryName, elementIndex, objectLiteral, key) {
|
|
171969
|
+
for (const property of objectLiteral.properties) {
|
|
171970
|
+
if (!import_typescript2.default.isPropertyAssignment(property)) {
|
|
171971
|
+
continue;
|
|
171972
|
+
}
|
|
171973
|
+
const propertyName = getPropertyNameText(property.name);
|
|
171974
|
+
if (propertyName !== key) {
|
|
171975
|
+
continue;
|
|
171976
|
+
}
|
|
171977
|
+
if (import_typescript2.default.isStringLiteralLike(property.initializer)) {
|
|
171978
|
+
return property.initializer.text;
|
|
171979
|
+
}
|
|
171980
|
+
throw new Error(`${entryName}[${elementIndex}] must use a string literal for "${key}" in scripts/block-config.ts.`);
|
|
171981
|
+
}
|
|
171982
|
+
return;
|
|
171983
|
+
}
|
|
171984
|
+
function getOptionalStringArrayProperty(entryName, elementIndex, objectLiteral, key) {
|
|
171985
|
+
for (const property of objectLiteral.properties) {
|
|
171986
|
+
if (!import_typescript2.default.isPropertyAssignment(property)) {
|
|
171987
|
+
continue;
|
|
171988
|
+
}
|
|
171989
|
+
const propertyName = getPropertyNameText(property.name);
|
|
171990
|
+
if (propertyName !== key) {
|
|
171991
|
+
continue;
|
|
171992
|
+
}
|
|
171993
|
+
if (!import_typescript2.default.isArrayLiteralExpression(property.initializer)) {
|
|
171994
|
+
throw new Error(`${entryName}[${elementIndex}] must use an array literal for "${key}" in scripts/block-config.ts.`);
|
|
171995
|
+
}
|
|
171996
|
+
return property.initializer.elements.map((element, itemIndex) => {
|
|
171997
|
+
if (!import_typescript2.default.isStringLiteralLike(element)) {
|
|
171998
|
+
throw new Error(`${entryName}[${elementIndex}].${key}[${itemIndex}] must use a string literal in scripts/block-config.ts.`);
|
|
171999
|
+
}
|
|
172000
|
+
return element.text;
|
|
172001
|
+
});
|
|
172002
|
+
}
|
|
172003
|
+
return;
|
|
172004
|
+
}
|
|
172005
|
+
function getOptionalBooleanProperty(entryName, elementIndex, objectLiteral, key) {
|
|
172006
|
+
for (const property of objectLiteral.properties) {
|
|
172007
|
+
if (!import_typescript2.default.isPropertyAssignment(property)) {
|
|
172008
|
+
continue;
|
|
172009
|
+
}
|
|
172010
|
+
const propertyName = getPropertyNameText(property.name);
|
|
172011
|
+
if (propertyName !== key) {
|
|
172012
|
+
continue;
|
|
172013
|
+
}
|
|
172014
|
+
if (property.initializer.kind === import_typescript2.default.SyntaxKind.TrueKeyword) {
|
|
172015
|
+
return true;
|
|
172016
|
+
}
|
|
172017
|
+
if (property.initializer.kind === import_typescript2.default.SyntaxKind.FalseKeyword) {
|
|
172018
|
+
return false;
|
|
172019
|
+
}
|
|
172020
|
+
throw new Error(`${entryName}[${elementIndex}] must use a boolean literal for "${key}" in scripts/block-config.ts.`);
|
|
172021
|
+
}
|
|
172022
|
+
return;
|
|
172023
|
+
}
|
|
172024
|
+
function parseInventoryEntries(arrayLiteral, descriptor) {
|
|
172025
|
+
return arrayLiteral.elements.map((element, elementIndex) => {
|
|
172026
|
+
if (!import_typescript2.default.isObjectLiteralExpression(element)) {
|
|
172027
|
+
throw new Error(`${descriptor.entryName}[${elementIndex}] must be an object literal in scripts/block-config.ts.`);
|
|
172028
|
+
}
|
|
172029
|
+
const entry = {};
|
|
172030
|
+
for (const field of descriptor.fields) {
|
|
172031
|
+
const kind = field.kind ?? "string";
|
|
172032
|
+
const value = kind === "stringArray" ? getOptionalStringArrayProperty(descriptor.entryName, elementIndex, element, field.key) : kind === "boolean" ? getOptionalBooleanProperty(descriptor.entryName, elementIndex, element, field.key) : getOptionalStringProperty(descriptor.entryName, elementIndex, element, field.key);
|
|
172033
|
+
field.validate?.(value, {
|
|
172034
|
+
elementIndex,
|
|
172035
|
+
entryName: descriptor.entryName,
|
|
172036
|
+
key: field.key
|
|
172037
|
+
});
|
|
172038
|
+
entry[field.key] = value;
|
|
172039
|
+
}
|
|
172040
|
+
assertParsedInventoryEntry(entry, descriptor, elementIndex);
|
|
172041
|
+
return entry;
|
|
172042
|
+
});
|
|
172043
|
+
}
|
|
172044
|
+
function parseInventorySection(sourceFile, descriptor) {
|
|
172045
|
+
if (!descriptor.parse) {
|
|
172046
|
+
return {
|
|
172047
|
+
entries: [],
|
|
172048
|
+
found: false
|
|
172049
|
+
};
|
|
172050
|
+
}
|
|
172051
|
+
const exportName = descriptor.parse.exportName ?? descriptor.value?.name;
|
|
172052
|
+
if (!exportName) {
|
|
172053
|
+
throw new Error("Inventory parser descriptor is missing an export name.");
|
|
172054
|
+
}
|
|
172055
|
+
const exportedArray = findExportedArrayLiteral(sourceFile, exportName);
|
|
172056
|
+
if (!exportedArray.found) {
|
|
172057
|
+
if (descriptor.parse.required) {
|
|
172058
|
+
throw new Error(`scripts/block-config.ts must export a ${exportName} array.`);
|
|
172059
|
+
}
|
|
172060
|
+
return {
|
|
172061
|
+
entries: [],
|
|
172062
|
+
found: false
|
|
172063
|
+
};
|
|
172064
|
+
}
|
|
172065
|
+
if (!exportedArray.array) {
|
|
172066
|
+
if (descriptor.parse.required) {
|
|
172067
|
+
throw new Error(`scripts/block-config.ts must export a ${exportName} array.`);
|
|
172068
|
+
}
|
|
172069
|
+
throw new Error(`scripts/block-config.ts must export ${exportName} as an array literal.`);
|
|
172070
|
+
}
|
|
172071
|
+
return {
|
|
172072
|
+
entries: parseInventoryEntries(exportedArray.array, descriptor.parse.entry),
|
|
172073
|
+
found: true
|
|
172074
|
+
};
|
|
172075
|
+
}
|
|
172076
|
+
|
|
171908
172077
|
// ../wp-typia-project-tools/src/runtime/workspace-inventory-templates.ts
|
|
171909
172078
|
var BLOCK_CONFIG_ENTRY_MARKER = "\t// wp-typia add block entries";
|
|
171910
172079
|
var VARIATION_CONFIG_ENTRY_MARKER = "\t// wp-typia add variation entries";
|
|
@@ -172023,6 +172192,7 @@ export interface WorkspaceRestResourceBaseConfig {
|
|
|
172023
172192
|
typeof import( '@wp-typia/block-runtime/metadata-core' ).defineEndpointManifest
|
|
172024
172193
|
>;
|
|
172025
172194
|
secretFieldName?: string;
|
|
172195
|
+
secretPreserveOnEmpty?: boolean;
|
|
172026
172196
|
secretStateFieldName?: string;
|
|
172027
172197
|
slug: string;
|
|
172028
172198
|
typesFile: string;
|
|
@@ -172163,10 +172333,7 @@ export const EDITOR_PLUGINS: WorkspaceEditorPluginConfig[] = [
|
|
|
172163
172333
|
];
|
|
172164
172334
|
`;
|
|
172165
172335
|
|
|
172166
|
-
// ../wp-typia-project-tools/src/runtime/workspace-inventory-
|
|
172167
|
-
function defineInventoryEntryParser() {
|
|
172168
|
-
return (descriptor) => descriptor;
|
|
172169
|
-
}
|
|
172336
|
+
// ../wp-typia-project-tools/src/runtime/workspace-inventory-section-descriptors.ts
|
|
172170
172337
|
var BLOCK_INVENTORY_SECTION = {
|
|
172171
172338
|
append: {
|
|
172172
172339
|
marker: BLOCK_CONFIG_ENTRY_MARKER,
|
|
@@ -172414,6 +172581,7 @@ var INVENTORY_SECTIONS = [
|
|
|
172414
172581
|
{ key: "responseTypeName" },
|
|
172415
172582
|
{ key: "routePattern" },
|
|
172416
172583
|
{ key: "secretFieldName" },
|
|
172584
|
+
{ key: "secretPreserveOnEmpty", kind: "boolean" },
|
|
172417
172585
|
{ key: "secretStateFieldName" },
|
|
172418
172586
|
{ key: "slug", required: true },
|
|
172419
172587
|
{ key: "typesFile", required: true },
|
|
@@ -172578,157 +172746,10 @@ var INVENTORY_SECTIONS = [
|
|
|
172578
172746
|
}
|
|
172579
172747
|
}
|
|
172580
172748
|
];
|
|
172581
|
-
|
|
172582
|
-
|
|
172583
|
-
if (!import_typescript2.default.isVariableStatement(statement)) {
|
|
172584
|
-
continue;
|
|
172585
|
-
}
|
|
172586
|
-
if (!statement.modifiers?.some((modifier) => modifier.kind === import_typescript2.default.SyntaxKind.ExportKeyword)) {
|
|
172587
|
-
continue;
|
|
172588
|
-
}
|
|
172589
|
-
for (const declaration of statement.declarationList.declarations) {
|
|
172590
|
-
if (!import_typescript2.default.isIdentifier(declaration.name) || declaration.name.text !== exportName) {
|
|
172591
|
-
continue;
|
|
172592
|
-
}
|
|
172593
|
-
if (declaration.initializer && import_typescript2.default.isArrayLiteralExpression(declaration.initializer)) {
|
|
172594
|
-
return {
|
|
172595
|
-
array: declaration.initializer,
|
|
172596
|
-
found: true
|
|
172597
|
-
};
|
|
172598
|
-
}
|
|
172599
|
-
return {
|
|
172600
|
-
array: null,
|
|
172601
|
-
found: true
|
|
172602
|
-
};
|
|
172603
|
-
}
|
|
172604
|
-
}
|
|
172605
|
-
return {
|
|
172606
|
-
array: null,
|
|
172607
|
-
found: false
|
|
172608
|
-
};
|
|
172609
|
-
}
|
|
172610
|
-
function getOptionalStringProperty(entryName, elementIndex, objectLiteral, key) {
|
|
172611
|
-
for (const property of objectLiteral.properties) {
|
|
172612
|
-
if (!import_typescript2.default.isPropertyAssignment(property)) {
|
|
172613
|
-
continue;
|
|
172614
|
-
}
|
|
172615
|
-
const propertyName = getPropertyNameText(property.name);
|
|
172616
|
-
if (propertyName !== key) {
|
|
172617
|
-
continue;
|
|
172618
|
-
}
|
|
172619
|
-
if (import_typescript2.default.isStringLiteralLike(property.initializer)) {
|
|
172620
|
-
return property.initializer.text;
|
|
172621
|
-
}
|
|
172622
|
-
throw new Error(`${entryName}[${elementIndex}] must use a string literal for "${key}" in scripts/block-config.ts.`);
|
|
172623
|
-
}
|
|
172624
|
-
return;
|
|
172625
|
-
}
|
|
172626
|
-
function getOptionalStringArrayProperty(entryName, elementIndex, objectLiteral, key) {
|
|
172627
|
-
for (const property of objectLiteral.properties) {
|
|
172628
|
-
if (!import_typescript2.default.isPropertyAssignment(property)) {
|
|
172629
|
-
continue;
|
|
172630
|
-
}
|
|
172631
|
-
const propertyName = getPropertyNameText(property.name);
|
|
172632
|
-
if (propertyName !== key) {
|
|
172633
|
-
continue;
|
|
172634
|
-
}
|
|
172635
|
-
if (!import_typescript2.default.isArrayLiteralExpression(property.initializer)) {
|
|
172636
|
-
throw new Error(`${entryName}[${elementIndex}] must use an array literal for "${key}" in scripts/block-config.ts.`);
|
|
172637
|
-
}
|
|
172638
|
-
return property.initializer.elements.map((element, itemIndex) => {
|
|
172639
|
-
if (!import_typescript2.default.isStringLiteralLike(element)) {
|
|
172640
|
-
throw new Error(`${entryName}[${elementIndex}].${key}[${itemIndex}] must use a string literal in scripts/block-config.ts.`);
|
|
172641
|
-
}
|
|
172642
|
-
return element.text;
|
|
172643
|
-
});
|
|
172644
|
-
}
|
|
172645
|
-
return;
|
|
172646
|
-
}
|
|
172647
|
-
function getOptionalBooleanProperty(entryName, elementIndex, objectLiteral, key) {
|
|
172648
|
-
for (const property of objectLiteral.properties) {
|
|
172649
|
-
if (!import_typescript2.default.isPropertyAssignment(property)) {
|
|
172650
|
-
continue;
|
|
172651
|
-
}
|
|
172652
|
-
const propertyName = getPropertyNameText(property.name);
|
|
172653
|
-
if (propertyName !== key) {
|
|
172654
|
-
continue;
|
|
172655
|
-
}
|
|
172656
|
-
if (property.initializer.kind === import_typescript2.default.SyntaxKind.TrueKeyword) {
|
|
172657
|
-
return true;
|
|
172658
|
-
}
|
|
172659
|
-
if (property.initializer.kind === import_typescript2.default.SyntaxKind.FalseKeyword) {
|
|
172660
|
-
return false;
|
|
172661
|
-
}
|
|
172662
|
-
throw new Error(`${entryName}[${elementIndex}] must use a boolean literal for "${key}" in scripts/block-config.ts.`);
|
|
172663
|
-
}
|
|
172664
|
-
return;
|
|
172665
|
-
}
|
|
172666
|
-
function isMissingRequiredInventoryValue(value) {
|
|
172667
|
-
return value === undefined || typeof value === "string" && value.length === 0;
|
|
172668
|
-
}
|
|
172669
|
-
function formatMissingRequiredInventoryFields(keys) {
|
|
172670
|
-
return keys.length === 1 ? `required "${keys[0]}"` : `required fields ${keys.map((key) => `"${key}"`).join(", ")}`;
|
|
172671
|
-
}
|
|
172672
|
-
function assertParsedInventoryEntry(entry, descriptor, elementIndex) {
|
|
172673
|
-
const missingRequiredKeys = descriptor.fields.filter((field) => field.required === true && isMissingRequiredInventoryValue(entry[field.key])).map((field) => field.key);
|
|
172674
|
-
if (missingRequiredKeys.length > 0) {
|
|
172675
|
-
throw new Error(`${descriptor.entryName}[${elementIndex}] is missing ${formatMissingRequiredInventoryFields(missingRequiredKeys)} in scripts/block-config.ts.`);
|
|
172676
|
-
}
|
|
172677
|
-
}
|
|
172678
|
-
function parseInventoryEntries(arrayLiteral, descriptor) {
|
|
172679
|
-
return arrayLiteral.elements.map((element, elementIndex) => {
|
|
172680
|
-
if (!import_typescript2.default.isObjectLiteralExpression(element)) {
|
|
172681
|
-
throw new Error(`${descriptor.entryName}[${elementIndex}] must be an object literal in scripts/block-config.ts.`);
|
|
172682
|
-
}
|
|
172683
|
-
const entry = {};
|
|
172684
|
-
for (const field of descriptor.fields) {
|
|
172685
|
-
const kind = field.kind ?? "string";
|
|
172686
|
-
const value = kind === "stringArray" ? getOptionalStringArrayProperty(descriptor.entryName, elementIndex, element, field.key) : kind === "boolean" ? getOptionalBooleanProperty(descriptor.entryName, elementIndex, element, field.key) : getOptionalStringProperty(descriptor.entryName, elementIndex, element, field.key);
|
|
172687
|
-
field.validate?.(value, {
|
|
172688
|
-
elementIndex,
|
|
172689
|
-
entryName: descriptor.entryName,
|
|
172690
|
-
key: field.key
|
|
172691
|
-
});
|
|
172692
|
-
entry[field.key] = value;
|
|
172693
|
-
}
|
|
172694
|
-
assertParsedInventoryEntry(entry, descriptor, elementIndex);
|
|
172695
|
-
return entry;
|
|
172696
|
-
});
|
|
172697
|
-
}
|
|
172698
|
-
function parseInventorySection(sourceFile, descriptor) {
|
|
172699
|
-
if (!descriptor.parse) {
|
|
172700
|
-
return {
|
|
172701
|
-
entries: [],
|
|
172702
|
-
found: false
|
|
172703
|
-
};
|
|
172704
|
-
}
|
|
172705
|
-
const exportName = descriptor.parse.exportName ?? descriptor.value?.name;
|
|
172706
|
-
if (!exportName) {
|
|
172707
|
-
throw new Error("Inventory parser descriptor is missing an export name.");
|
|
172708
|
-
}
|
|
172709
|
-
const exportedArray = findExportedArrayLiteral(sourceFile, exportName);
|
|
172710
|
-
if (!exportedArray.found) {
|
|
172711
|
-
if (descriptor.parse.required) {
|
|
172712
|
-
throw new Error(`scripts/block-config.ts must export a ${exportName} array.`);
|
|
172713
|
-
}
|
|
172714
|
-
return {
|
|
172715
|
-
entries: [],
|
|
172716
|
-
found: false
|
|
172717
|
-
};
|
|
172718
|
-
}
|
|
172719
|
-
if (!exportedArray.array) {
|
|
172720
|
-
if (descriptor.parse.required) {
|
|
172721
|
-
throw new Error(`scripts/block-config.ts must export a ${exportName} array.`);
|
|
172722
|
-
}
|
|
172723
|
-
throw new Error(`scripts/block-config.ts must export ${exportName} as an array literal.`);
|
|
172724
|
-
}
|
|
172725
|
-
return {
|
|
172726
|
-
entries: parseInventoryEntries(exportedArray.array, descriptor.parse.entry),
|
|
172727
|
-
found: true
|
|
172728
|
-
};
|
|
172729
|
-
}
|
|
172749
|
+
|
|
172750
|
+
// ../wp-typia-project-tools/src/runtime/workspace-inventory-parser.ts
|
|
172730
172751
|
function parseWorkspaceInventorySource(source) {
|
|
172731
|
-
const sourceFile =
|
|
172752
|
+
const sourceFile = import_typescript3.default.createSourceFile("block-config.ts", source, import_typescript3.default.ScriptTarget.Latest, true, import_typescript3.default.ScriptKind.TS);
|
|
172732
172753
|
const parsedInventory = {
|
|
172733
172754
|
abilities: [],
|
|
172734
172755
|
adminViews: [],
|
|
@@ -173337,6 +173358,7 @@ function updateWorkspaceInventorySource(source, options = {}) {
|
|
|
173337
173358
|
["responseTypeName", "\tresponseTypeName?: string;"],
|
|
173338
173359
|
["routePattern", "\troutePattern?: string;"],
|
|
173339
173360
|
["secretFieldName", "\tsecretFieldName?: string;"],
|
|
173361
|
+
["secretPreserveOnEmpty", "\tsecretPreserveOnEmpty?: boolean;"],
|
|
173340
173362
|
["secretStateFieldName", "\tsecretStateFieldName?: string;"]
|
|
173341
173363
|
]) {
|
|
173342
173364
|
nextSource = upsertInterfaceField(nextSource, "WorkspaceRestResourceConfig", fieldName, fieldSource);
|
|
@@ -173351,6 +173373,6 @@ async function appendWorkspaceInventoryEntries(projectDir, options) {
|
|
|
173351
173373
|
await writeFile(blockConfigPath, nextSource, "utf8");
|
|
173352
173374
|
}
|
|
173353
173375
|
}
|
|
173354
|
-
export { toKebabCase, toSnakeCase, toPascalCase, toCamelCase, toSegmentPascalCase, toTitleCase, validateBlockSlug, validateNamespace, normalizeBlockSlug, resolveNonEmptyNormalizedBlockSlug, buildBlockCssClassName, buildFrontendCssClassName, resolveScaffoldIdentifiers, REST_RESOURCE_METHOD_IDS, MANUAL_REST_CONTRACT_HTTP_METHOD_IDS, MANUAL_REST_CONTRACT_AUTH_IDS, EDITOR_PLUGIN_SLOT_IDS, resolveEditorPluginSlotAlias, ADD_BLOCK_TEMPLATE_IDS, suggestAddBlockTemplateId, HOOKED_BLOCK_POSITION_SET, HOOKED_BLOCK_ANCHOR_PATTERN, REST_RESOURCE_NAMESPACE_PATTERN, assertValidGeneratedSlug, assertValidTypeScriptIdentifier, resolveRestResourceNamespace, assertValidPostMetaPostType, resolvePostMetaKey, assertValidRestResourceMethods, resolveOptionalPhpCallbackReference, resolveOptionalPhpClassReference, assertValidManualRestContractHttpMethod, assertValidManualRestContractAuth, isGeneratedRestResourceRoutePatternCompatible, resolveManualRestContractPathPattern, resolveGeneratedRestResourceRoutePattern, assertValidHookedBlockPosition, buildWorkspacePhpPrefix, isAddBlockTemplateId, quoteTsString, assertValidHookAnchor, assertValidEditorPluginSlot, assertValidIntegrationEnvService, pathExists, readOptionalUtf8File, getNodeErrorCode, getOptionalNodeErrorCode, isFileNotFoundError, getWorkspaceBootstrapPath, patchFile, readOptionalFile, snapshotWorkspaceFiles, rollbackWorkspaceMutation, resolveWorkspaceBlock, readWorkspaceBlockJson, getMutableBlockHooks, assertVariationDoesNotExist, assertBlockStyleDoesNotExist, assertBlockTransformDoesNotExist, assertPatternDoesNotExist, assertBindingSourceDoesNotExist, assertRestResourceDoesNotExist, assertPostMetaDoesNotExist, assertContractDoesNotExist, assertAdminViewDoesNotExist, assertAbilityDoesNotExist, assertAiFeatureDoesNotExist, assertEditorPluginDoesNotExist, formatAddHelpText, require_typescript, getPropertyNameText, readWorkspaceInventory, readWorkspaceInventoryAsync, getWorkspaceBlockSelectOptions, getWorkspaceBlockSelectOptionsAsync, escapeRegex, quotePhpString, hasPhpFunctionDefinition, hasPhpFunctionCall, findPhpFunctionRange, replacePhpFunctionDefinition, updateWorkspaceInventorySource, appendWorkspaceInventoryEntries };
|
|
173376
|
+
export { toKebabCase, toSnakeCase, toPascalCase, toCamelCase, toSegmentPascalCase, toTitleCase, validateBlockSlug, validateNamespace, normalizeBlockSlug, resolveNonEmptyNormalizedBlockSlug, buildBlockCssClassName, buildFrontendCssClassName, resolveScaffoldIdentifiers, REST_RESOURCE_METHOD_IDS, MANUAL_REST_CONTRACT_HTTP_METHOD_IDS, MANUAL_REST_CONTRACT_AUTH_IDS, EDITOR_PLUGIN_SLOT_IDS, resolveEditorPluginSlotAlias, ADD_BLOCK_TEMPLATE_IDS, suggestAddBlockTemplateId, HOOKED_BLOCK_POSITION_SET, HOOKED_BLOCK_ANCHOR_PATTERN, REST_RESOURCE_NAMESPACE_PATTERN, assertValidGeneratedSlug, assertValidTypeScriptIdentifier, resolveRestResourceNamespace, assertValidPostMetaPostType, resolvePostMetaKey, assertValidRestResourceMethods, resolveOptionalPhpCallbackReference, resolveOptionalPhpClassReference, assertValidManualRestContractHttpMethod, assertValidManualRestContractAuth, isGeneratedRestResourceRoutePatternCompatible, collectRestRouteNamedCaptureNames, resolveManualRestContractPathPattern, resolveGeneratedRestResourceRoutePattern, assertValidHookedBlockPosition, buildWorkspacePhpPrefix, isAddBlockTemplateId, quoteTsString, assertValidHookAnchor, assertValidEditorPluginSlot, assertValidIntegrationEnvService, pathExists, readOptionalUtf8File, getNodeErrorCode, getOptionalNodeErrorCode, isFileNotFoundError, getWorkspaceBootstrapPath, patchFile, readOptionalFile, snapshotWorkspaceFiles, rollbackWorkspaceMutation, resolveWorkspaceBlock, readWorkspaceBlockJson, getMutableBlockHooks, assertVariationDoesNotExist, assertBlockStyleDoesNotExist, assertBlockTransformDoesNotExist, assertPatternDoesNotExist, assertBindingSourceDoesNotExist, assertRestResourceDoesNotExist, assertPostMetaDoesNotExist, assertContractDoesNotExist, assertAdminViewDoesNotExist, assertAbilityDoesNotExist, assertAiFeatureDoesNotExist, assertEditorPluginDoesNotExist, formatAddHelpText, require_typescript, getPropertyNameText, readWorkspaceInventory, readWorkspaceInventoryAsync, getWorkspaceBlockSelectOptions, getWorkspaceBlockSelectOptionsAsync, escapeRegex, quotePhpString, hasPhpFunctionDefinition, hasPhpFunctionCall, findPhpFunctionRange, replacePhpFunctionDefinition, updateWorkspaceInventorySource, appendWorkspaceInventoryEntries };
|
|
173355
173377
|
|
|
173356
|
-
//# debugId=
|
|
173378
|
+
//# debugId=8DE6D8AE337ABB4664756E2164756E21
|