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
|
@@ -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-v0nnagb3.js";
|
|
8
8
|
|
|
9
9
|
// ../wp-typia-project-tools/src/runtime/package-versions.ts
|
|
10
10
|
import fs from "fs";
|
|
@@ -20,6 +20,7 @@ var DEFAULT_WORDPRESS_CORE_ABILITIES_VERSION = "^0.9.0";
|
|
|
20
20
|
var DEFAULT_WORDPRESS_CORE_DATA_VERSION = "^7.44.0";
|
|
21
21
|
var DEFAULT_WORDPRESS_DATA_VERSION = "^9.28.0";
|
|
22
22
|
var DEFAULT_WORDPRESS_DATAVIEWS_VERSION = "^14.1.0";
|
|
23
|
+
var DEFAULT_WORDPRESS_ENV_VERSION = "^11.2.0";
|
|
23
24
|
var DEFAULT_WP_TYPIA_DATAVIEWS_VERSION = "^0.1.1";
|
|
24
25
|
var cachedPackageVersions = null;
|
|
25
26
|
function normalizeVersionRange(value) {
|
|
@@ -87,7 +88,11 @@ function readPackageManifest(location) {
|
|
|
87
88
|
if (!location.packageJsonPath || location.source === null) {
|
|
88
89
|
return null;
|
|
89
90
|
}
|
|
90
|
-
|
|
91
|
+
try {
|
|
92
|
+
return JSON.parse(location.source);
|
|
93
|
+
} catch (error) {
|
|
94
|
+
throw new Error(`Failed to parse package version manifest at ${location.packageJsonPath}: ${error instanceof Error ? error.message : String(error)}`);
|
|
95
|
+
}
|
|
91
96
|
}
|
|
92
97
|
function tryReadPackageManifest(location) {
|
|
93
98
|
if (!location) {
|
|
@@ -127,6 +132,7 @@ function getPackageVersions() {
|
|
|
127
132
|
const createManifestLocation = resolvePackageManifestLocation(path.join(PROJECT_TOOLS_PACKAGE_ROOT, "package.json"));
|
|
128
133
|
const monorepoManifestLocation = resolvePackageManifestLocation(path.join(PROJECT_TOOLS_PACKAGE_ROOT, "..", "..", "package.json"));
|
|
129
134
|
const blockRuntimeManifestLocation = resolvePackageManifestLocation(path.join(PROJECT_TOOLS_PACKAGE_ROOT, "..", "wp-typia-block-runtime", "package.json"));
|
|
135
|
+
const blockTypesManifestLocation = resolvePackageManifestLocation(path.join(PROJECT_TOOLS_PACKAGE_ROOT, "..", "wp-typia-block-types", "package.json"));
|
|
130
136
|
const wpTypiaManifestLocation = resolvePackageManifestLocation(path.join(PROJECT_TOOLS_PACKAGE_ROOT, "..", "wp-typia", "package.json"));
|
|
131
137
|
const installedProjectToolsManifestLocation = resolveInstalledPackageManifestLocation("@wp-typia/project-tools");
|
|
132
138
|
const installedApiClientManifestLocation = resolveInstalledPackageManifestLocation("@wp-typia/api-client");
|
|
@@ -142,6 +148,7 @@ function getPackageVersions() {
|
|
|
142
148
|
createManifestLocation,
|
|
143
149
|
monorepoManifestLocation,
|
|
144
150
|
blockRuntimeManifestLocation,
|
|
151
|
+
blockTypesManifestLocation,
|
|
145
152
|
wpTypiaManifestLocation,
|
|
146
153
|
installedProjectToolsManifestLocation,
|
|
147
154
|
installedApiClientManifestLocation,
|
|
@@ -160,12 +167,14 @@ function getPackageVersions() {
|
|
|
160
167
|
const createManifest = readPackageManifest(createManifestLocation) ?? readPackageManifest(installedProjectToolsManifestLocation) ?? {};
|
|
161
168
|
const monorepoManifest = readPackageManifest(monorepoManifestLocation) ?? {};
|
|
162
169
|
const blockRuntimeManifest = readPackageManifest(blockRuntimeManifestLocation) ?? readPackageManifest(installedBlockRuntimeManifestLocation) ?? {};
|
|
170
|
+
const blockTypesManifest = readPackageManifest(blockTypesManifestLocation) ?? readPackageManifest(installedBlockTypesManifestLocation) ?? {};
|
|
163
171
|
const wpTypiaManifest = readPackageManifest(wpTypiaManifestLocation) ?? readPackageManifest(installedWpTypiaManifestLocation) ?? {};
|
|
164
172
|
const blockRuntimeDependencyVersion = normalizeVersionRange(createManifest.dependencies?.["@wp-typia/block-runtime"]);
|
|
173
|
+
const blockTypesDependencyVersion = normalizeVersionRange(createManifest.dependencies?.["@wp-typia/block-types"]);
|
|
165
174
|
const versions = {
|
|
166
175
|
apiClientPackageVersion: normalizeVersionRange(createManifest.dependencies?.["@wp-typia/api-client"] ?? readPackageManifest(installedApiClientManifestLocation)?.version),
|
|
167
176
|
blockRuntimePackageVersion: blockRuntimeDependencyVersion !== DEFAULT_VERSION_RANGE ? blockRuntimeDependencyVersion : normalizeVersionRange(blockRuntimeManifest.version),
|
|
168
|
-
blockTypesPackageVersion: normalizeVersionRange(
|
|
177
|
+
blockTypesPackageVersion: blockTypesDependencyVersion !== DEFAULT_VERSION_RANGE ? blockTypesDependencyVersion : normalizeVersionRange(blockTypesManifest.version),
|
|
169
178
|
projectToolsPackageVersion: normalizeVersionRange(createManifest.version),
|
|
170
179
|
restPackageVersion: normalizeVersionRange(createManifest.dependencies?.["@wp-typia/rest"] ?? readPackageManifest(installedRestManifestLocation)?.version),
|
|
171
180
|
tsxPackageVersion: normalizeVersionRangeWithFallback(monorepoManifest.dependencies?.tsx ?? monorepoManifest.devDependencies?.tsx ?? readPackageManifest(installedTsxManifestLocation)?.version, DEFAULT_TSX_PACKAGE_VERSION),
|
|
@@ -182,6 +191,6 @@ function getPackageVersions() {
|
|
|
182
191
|
return versions;
|
|
183
192
|
}
|
|
184
193
|
|
|
185
|
-
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 };
|
|
194
|
+
export { DEFAULT_WORDPRESS_ABILITIES_VERSION, DEFAULT_WORDPRESS_CORE_ABILITIES_VERSION, DEFAULT_WORDPRESS_CORE_DATA_VERSION, DEFAULT_WORDPRESS_DATA_VERSION, DEFAULT_WORDPRESS_DATAVIEWS_VERSION, DEFAULT_WORDPRESS_ENV_VERSION, DEFAULT_WP_TYPIA_DATAVIEWS_VERSION, resolveManagedPackageVersionRange, getPackageVersions };
|
|
186
195
|
|
|
187
|
-
//# debugId=
|
|
196
|
+
//# debugId=5C44FE33F29175BD64756E2164756E21
|
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
readJsonFile,
|
|
4
|
+
readJsonFileSync
|
|
5
|
+
} from "./cli-ccax7s0s.js";
|
|
6
|
+
|
|
7
|
+
// ../wp-typia-project-tools/src/runtime/cli-add-workspace-admin-view-types.ts
|
|
8
|
+
var ADMIN_VIEW_REST_SOURCE_KIND = "rest-resource";
|
|
9
|
+
var ADMIN_VIEW_CORE_DATA_SOURCE_KIND = "core-data";
|
|
10
|
+
var ADMIN_VIEW_CORE_DATA_ENTITY_KIND_IDS = [
|
|
11
|
+
"postType",
|
|
12
|
+
"taxonomy"
|
|
13
|
+
];
|
|
14
|
+
var ADMIN_VIEW_CORE_DATA_ENTITY_SEGMENT_PATTERN = /^[A-Za-z][A-Za-z0-9_-]*$/u;
|
|
15
|
+
var ADMIN_VIEW_CORE_DATA_ENTITY_NAME_PATTERN = /^[a-z0-9][a-z0-9_-]*$/u;
|
|
16
|
+
var ADMIN_VIEW_SOURCE_USAGE = "wp-typia add admin-view <name> --source <rest-resource:slug|core-data:kind/name>";
|
|
17
|
+
var ADMIN_VIEWS_SCRIPT = "build/admin-views/index.js";
|
|
18
|
+
var ADMIN_VIEWS_ASSET = "build/admin-views/index.asset.php";
|
|
19
|
+
var ADMIN_VIEWS_STYLE = "build/admin-views/style-index.css";
|
|
20
|
+
var ADMIN_VIEWS_STYLE_RTL = "build/admin-views/style-index-rtl.css";
|
|
21
|
+
var ADMIN_VIEWS_PHP_GLOB = "/inc/admin-views/*.php";
|
|
22
|
+
var ADMIN_VIEW_MANUAL_REST_ROUTE_PARAMETER_PATTERN = /(?:^|[^\\])\(/u;
|
|
23
|
+
function isAdminViewCoreDataSource(source) {
|
|
24
|
+
return source?.kind === ADMIN_VIEW_CORE_DATA_SOURCE_KIND;
|
|
25
|
+
}
|
|
26
|
+
function isAdminViewRestResourceSource(source) {
|
|
27
|
+
return source?.kind === ADMIN_VIEW_REST_SOURCE_KIND;
|
|
28
|
+
}
|
|
29
|
+
function isAdminViewManualSettingsRestResource(restResource) {
|
|
30
|
+
return restResource?.mode === "manual" && typeof restResource.bodyTypeName === "string" && restResource.bodyTypeName.trim().length > 0 && typeof restResource.queryTypeName === "string" && restResource.queryTypeName.trim().length > 0 && typeof restResource.responseTypeName === "string" && restResource.responseTypeName.trim().length > 0;
|
|
31
|
+
}
|
|
32
|
+
function hasAdminViewManualSettingsRouteParameters(restResource) {
|
|
33
|
+
return [restResource?.pathPattern, restResource?.routePattern].some((pattern) => typeof pattern === "string" && ADMIN_VIEW_MANUAL_REST_ROUTE_PARAMETER_PATTERN.test(pattern));
|
|
34
|
+
}
|
|
35
|
+
function formatAdminViewSourceLocator(source) {
|
|
36
|
+
if (isAdminViewCoreDataSource(source)) {
|
|
37
|
+
return `${source.kind}:${source.entityKind}/${source.entityName}`;
|
|
38
|
+
}
|
|
39
|
+
return `${source.kind}:${source.slug}`;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
// ../wp-typia-project-tools/src/runtime/post-meta-binding-fields.ts
|
|
43
|
+
import path from "path";
|
|
44
|
+
var SUPPORTED_SCHEMA_TYPES = new Set([
|
|
45
|
+
"array",
|
|
46
|
+
"boolean",
|
|
47
|
+
"integer",
|
|
48
|
+
"number",
|
|
49
|
+
"object",
|
|
50
|
+
"string"
|
|
51
|
+
]);
|
|
52
|
+
function isJsonRecord(value) {
|
|
53
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
54
|
+
}
|
|
55
|
+
function resolveSchemaType(schema) {
|
|
56
|
+
const type = schema.type;
|
|
57
|
+
if (typeof type === "string" && SUPPORTED_SCHEMA_TYPES.has(type)) {
|
|
58
|
+
return type;
|
|
59
|
+
}
|
|
60
|
+
if (Array.isArray(type) && type.every((entry) => typeof entry === "string")) {
|
|
61
|
+
const nonNullType = type.find((entry) => entry !== "null" && SUPPORTED_SCHEMA_TYPES.has(entry));
|
|
62
|
+
if (nonNullType) {
|
|
63
|
+
return nonNullType;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
if (Array.isArray(schema.enum) && schema.enum.length > 0) {
|
|
67
|
+
return "string";
|
|
68
|
+
}
|
|
69
|
+
return "unknown";
|
|
70
|
+
}
|
|
71
|
+
function resolveFallbackValue(name, schema, schemaType) {
|
|
72
|
+
const enumValue = Array.isArray(schema.enum) ? schema.enum.find((entry) => typeof entry === "string") : undefined;
|
|
73
|
+
if (typeof enumValue === "string") {
|
|
74
|
+
return enumValue;
|
|
75
|
+
}
|
|
76
|
+
switch (schemaType) {
|
|
77
|
+
case "array":
|
|
78
|
+
return "[]";
|
|
79
|
+
case "boolean":
|
|
80
|
+
return "false";
|
|
81
|
+
case "integer":
|
|
82
|
+
case "number":
|
|
83
|
+
return "0";
|
|
84
|
+
case "object":
|
|
85
|
+
return "{}";
|
|
86
|
+
default:
|
|
87
|
+
return `${name} preview`;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
function resolveFieldLabel(name) {
|
|
91
|
+
return name.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]+/g, " ").replace(/\s+/g, " ").trim().replace(/\b\w/g, (match) => match.toUpperCase());
|
|
92
|
+
}
|
|
93
|
+
function extractPostMetaBindingFields(schema, context) {
|
|
94
|
+
if (!isJsonRecord(schema) || !isJsonRecord(schema.properties)) {
|
|
95
|
+
throw new Error(`${context} must expose an object schema with top-level properties before it can back a binding source.`);
|
|
96
|
+
}
|
|
97
|
+
const required = Array.isArray(schema.required) ? new Set(schema.required.filter((entry) => typeof entry === "string")) : new Set;
|
|
98
|
+
const fields = Object.entries(schema.properties).map(([name, propertySchema]) => {
|
|
99
|
+
const property = isJsonRecord(propertySchema) ? propertySchema : {};
|
|
100
|
+
const schemaType = resolveSchemaType(property);
|
|
101
|
+
return {
|
|
102
|
+
fallbackValue: resolveFallbackValue(name, property, schemaType),
|
|
103
|
+
label: resolveFieldLabel(name),
|
|
104
|
+
name,
|
|
105
|
+
required: required.has(name),
|
|
106
|
+
schemaType
|
|
107
|
+
};
|
|
108
|
+
});
|
|
109
|
+
if (fields.length === 0) {
|
|
110
|
+
throw new Error(`${context} does not expose any top-level properties that can back binding fields.`);
|
|
111
|
+
}
|
|
112
|
+
return fields;
|
|
113
|
+
}
|
|
114
|
+
async function loadPostMetaBindingFields(projectDir, postMeta) {
|
|
115
|
+
const schemaPath = path.join(projectDir, postMeta.schemaFile);
|
|
116
|
+
const schema = await readJsonFile(schemaPath, {
|
|
117
|
+
context: `post meta schema for ${postMeta.slug}`
|
|
118
|
+
});
|
|
119
|
+
return extractPostMetaBindingFields(schema, postMeta.schemaFile);
|
|
120
|
+
}
|
|
121
|
+
function loadPostMetaBindingFieldsSync(projectDir, postMeta) {
|
|
122
|
+
const schemaPath = path.join(projectDir, postMeta.schemaFile);
|
|
123
|
+
const schema = readJsonFileSync(schemaPath, {
|
|
124
|
+
context: `post meta schema for ${postMeta.slug}`
|
|
125
|
+
});
|
|
126
|
+
return extractPostMetaBindingFields(schema, postMeta.schemaFile);
|
|
127
|
+
}
|
|
128
|
+
function assertPostMetaBindingPath(fields, postMetaSlug, metaPath) {
|
|
129
|
+
const trimmed = metaPath.trim();
|
|
130
|
+
if (!trimmed) {
|
|
131
|
+
throw new Error("Post meta binding path must include a value.");
|
|
132
|
+
}
|
|
133
|
+
if (trimmed.includes(".")) {
|
|
134
|
+
throw new Error(`Nested post meta path "${trimmed}" for "${postMetaSlug}" is not supported yet. Use one of the top-level fields: ${fields.map((field2) => field2.name).join(", ")}.`);
|
|
135
|
+
}
|
|
136
|
+
const field = fields.find((candidate) => candidate.name === trimmed);
|
|
137
|
+
if (!field) {
|
|
138
|
+
throw new Error(`Post meta path "${trimmed}" does not exist in the "${postMetaSlug}" schema. Expected one of: ${fields.map((candidate) => candidate.name).join(", ")}.`);
|
|
139
|
+
}
|
|
140
|
+
return field;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
// ../wp-typia-project-tools/src/runtime/ts-source-masking.ts
|
|
144
|
+
function maskSourceSegment(segment) {
|
|
145
|
+
return segment.replace(/[^\n\r]/gu, " ");
|
|
146
|
+
}
|
|
147
|
+
function testPattern(source, pattern) {
|
|
148
|
+
pattern.lastIndex = 0;
|
|
149
|
+
const matched = pattern.test(source);
|
|
150
|
+
pattern.lastIndex = 0;
|
|
151
|
+
return matched;
|
|
152
|
+
}
|
|
153
|
+
function maskTypeScriptComments(source) {
|
|
154
|
+
return source.replace(/\/\*[\s\S]*?\*\//gu, maskSourceSegment).replace(/\/\/[^\n\r]*/gu, maskSourceSegment);
|
|
155
|
+
}
|
|
156
|
+
function maskTypeScriptCommentsAndLiterals(source) {
|
|
157
|
+
let maskedSource = "";
|
|
158
|
+
let index = 0;
|
|
159
|
+
while (index < source.length) {
|
|
160
|
+
const current = source[index];
|
|
161
|
+
const next = source[index + 1];
|
|
162
|
+
if (current === "/" && next === "/") {
|
|
163
|
+
const start = index;
|
|
164
|
+
index += 2;
|
|
165
|
+
while (index < source.length && source[index] !== `
|
|
166
|
+
` && source[index] !== "\r") {
|
|
167
|
+
index += 1;
|
|
168
|
+
}
|
|
169
|
+
maskedSource += maskSourceSegment(source.slice(start, index));
|
|
170
|
+
continue;
|
|
171
|
+
}
|
|
172
|
+
if (current === "/" && next === "*") {
|
|
173
|
+
const start = index;
|
|
174
|
+
index += 2;
|
|
175
|
+
while (index < source.length && !(source[index] === "*" && source[index + 1] === "/")) {
|
|
176
|
+
index += 1;
|
|
177
|
+
}
|
|
178
|
+
index = Math.min(index + 2, source.length);
|
|
179
|
+
maskedSource += maskSourceSegment(source.slice(start, index));
|
|
180
|
+
continue;
|
|
181
|
+
}
|
|
182
|
+
if (current === "'" || current === '"' || current === "`") {
|
|
183
|
+
const start = index;
|
|
184
|
+
const quote = current;
|
|
185
|
+
index += 1;
|
|
186
|
+
while (index < source.length) {
|
|
187
|
+
const char = source[index];
|
|
188
|
+
if (char === "\\") {
|
|
189
|
+
index += 2;
|
|
190
|
+
continue;
|
|
191
|
+
}
|
|
192
|
+
index += 1;
|
|
193
|
+
if (char === quote) {
|
|
194
|
+
break;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
maskedSource += maskSourceSegment(source.slice(start, index));
|
|
198
|
+
continue;
|
|
199
|
+
}
|
|
200
|
+
maskedSource += current;
|
|
201
|
+
index += 1;
|
|
202
|
+
}
|
|
203
|
+
return maskedSource;
|
|
204
|
+
}
|
|
205
|
+
function hasExecutablePattern(source, pattern) {
|
|
206
|
+
return testPattern(maskTypeScriptCommentsAndLiterals(source), pattern);
|
|
207
|
+
}
|
|
208
|
+
function hasUncommentedPattern(source, pattern) {
|
|
209
|
+
return testPattern(maskTypeScriptComments(source), pattern);
|
|
210
|
+
}
|
|
211
|
+
function findExecutablePatternMatch(source, patterns) {
|
|
212
|
+
const maskedSource = maskTypeScriptCommentsAndLiterals(source);
|
|
213
|
+
for (const pattern of patterns) {
|
|
214
|
+
pattern.lastIndex = 0;
|
|
215
|
+
const match = pattern.exec(maskedSource);
|
|
216
|
+
pattern.lastIndex = 0;
|
|
217
|
+
if (match && match.index !== undefined) {
|
|
218
|
+
return {
|
|
219
|
+
end: match.index + match[0].length,
|
|
220
|
+
start: match.index
|
|
221
|
+
};
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
return;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
export { ADMIN_VIEW_REST_SOURCE_KIND, ADMIN_VIEW_CORE_DATA_SOURCE_KIND, ADMIN_VIEW_CORE_DATA_ENTITY_KIND_IDS, ADMIN_VIEW_CORE_DATA_ENTITY_SEGMENT_PATTERN, ADMIN_VIEW_CORE_DATA_ENTITY_NAME_PATTERN, ADMIN_VIEW_SOURCE_USAGE, ADMIN_VIEWS_SCRIPT, ADMIN_VIEWS_ASSET, ADMIN_VIEWS_STYLE, ADMIN_VIEWS_STYLE_RTL, ADMIN_VIEWS_PHP_GLOB, isAdminViewCoreDataSource, isAdminViewRestResourceSource, isAdminViewManualSettingsRestResource, hasAdminViewManualSettingsRouteParameters, formatAdminViewSourceLocator, loadPostMetaBindingFields, loadPostMetaBindingFieldsSync, assertPostMetaBindingPath, maskTypeScriptCommentsAndLiterals, hasExecutablePattern, hasUncommentedPattern, findExecutablePatternMatch };
|
|
228
|
+
|
|
229
|
+
//# debugId=088B083477FD04FF64756E2164756E21
|
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-cwjdzq6n.js";
|
|
26
26
|
import"./cli-03j0axbt.js";
|
|
27
27
|
import {
|
|
28
28
|
GLOBAL_FLAGS,
|
|
@@ -37,11 +37,11 @@ import {
|
|
|
37
37
|
} from "./cli-hv2yedw2.js";
|
|
38
38
|
import"./cli-ac2ebaf8.js";
|
|
39
39
|
import"./cli-6v0pcxw6.js";
|
|
40
|
-
import"./cli-
|
|
40
|
+
import"./cli-bajwv85z.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-xaw5agks.js");
|
|
2464
2464
|
const cli = await createCLI({
|
|
2465
2465
|
...bunliConfig,
|
|
2466
2466
|
description: package_default.description,
|