wp-typia 0.23.1 → 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 +1 -0
- package/bin/routing-metadata.generated.js +7 -0
- package/dist-bunli/.bunli/commands.gen.js +9465 -7615
- package/dist-bunli/{cli-epsczb1c.js → cli-0v407aag.js} +1 -1
- package/dist-bunli/{cli-y7w3pybs.js → cli-74y6z3yx.js} +978 -944
- package/dist-bunli/{cli-add-xjaaa01x.js → cli-add-nmdraf20.js} +8694 -7854
- package/dist-bunli/{cli-43mx1vfb.js → cli-bajwv85z.js} +2 -1
- package/dist-bunli/{cli-ymecd15q.js → cli-cwjdzq6n.js} +45 -6
- package/dist-bunli/{cli-doctor-19e8313m.js → cli-doctor-pcss6ecx.js} +98 -12
- package/dist-bunli/{cli-init-2b4yn2cc.js → cli-init-he7vm7kc.js} +3 -3
- package/dist-bunli/{cli-scaffold-4tjw4jk5.js → cli-scaffold-an2k0fnm.js} +6 -6
- package/dist-bunli/{cli-nvs5atj1.js → cli-sw06c521.js} +1 -1
- package/dist-bunli/{cli-k5q5v8g6.js → cli-v0nnagb3.js} +1331 -893
- package/dist-bunli/{cli-fp16mntv.js → cli-y0a8nztv.js} +9 -4
- package/dist-bunli/cli-z48frc8t.js +229 -0
- package/dist-bunli/cli.js +3 -3
- package/dist-bunli/{command-list-vme7dr5v.js → command-list-xaw5agks.js} +170 -29
- package/dist-bunli/{migrations-pb5vvtdp.js → migrations-z7f4kxba.js} +3 -3
- package/dist-bunli/node-cli.js +259 -69
- package/package.json +2 -2
- package/dist-bunli/cli-j8et6jvr.js +0 -123
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wp-typia",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.24.0",
|
|
4
4
|
"description": "Canonical CLI package for wp-typia scaffolding and project workflows",
|
|
5
5
|
"packageManager": "bun@1.3.11",
|
|
6
6
|
"type": "module",
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"@bunli/tui": "0.6.0",
|
|
71
71
|
"@bunli/utils": "0.6.0",
|
|
72
72
|
"@wp-typia/api-client": "^0.4.5",
|
|
73
|
-
"@wp-typia/project-tools": "0.
|
|
73
|
+
"@wp-typia/project-tools": "0.24.0",
|
|
74
74
|
"better-result": "^2.7.0",
|
|
75
75
|
"react": "^19.2.5",
|
|
76
76
|
"react-dom": "^19.2.5",
|
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
// ../wp-typia-project-tools/src/runtime/ts-source-masking.ts
|
|
3
|
-
function maskSourceSegment(segment) {
|
|
4
|
-
return segment.replace(/[^\n\r]/gu, " ");
|
|
5
|
-
}
|
|
6
|
-
function testPattern(source, pattern) {
|
|
7
|
-
pattern.lastIndex = 0;
|
|
8
|
-
const matched = pattern.test(source);
|
|
9
|
-
pattern.lastIndex = 0;
|
|
10
|
-
return matched;
|
|
11
|
-
}
|
|
12
|
-
function maskTypeScriptComments(source) {
|
|
13
|
-
return source.replace(/\/\*[\s\S]*?\*\//gu, maskSourceSegment).replace(/\/\/[^\n\r]*/gu, maskSourceSegment);
|
|
14
|
-
}
|
|
15
|
-
function maskTypeScriptCommentsAndLiterals(source) {
|
|
16
|
-
let maskedSource = "";
|
|
17
|
-
let index = 0;
|
|
18
|
-
while (index < source.length) {
|
|
19
|
-
const current = source[index];
|
|
20
|
-
const next = source[index + 1];
|
|
21
|
-
if (current === "/" && next === "/") {
|
|
22
|
-
const start = index;
|
|
23
|
-
index += 2;
|
|
24
|
-
while (index < source.length && source[index] !== `
|
|
25
|
-
` && source[index] !== "\r") {
|
|
26
|
-
index += 1;
|
|
27
|
-
}
|
|
28
|
-
maskedSource += maskSourceSegment(source.slice(start, index));
|
|
29
|
-
continue;
|
|
30
|
-
}
|
|
31
|
-
if (current === "/" && next === "*") {
|
|
32
|
-
const start = index;
|
|
33
|
-
index += 2;
|
|
34
|
-
while (index < source.length && !(source[index] === "*" && source[index + 1] === "/")) {
|
|
35
|
-
index += 1;
|
|
36
|
-
}
|
|
37
|
-
index = Math.min(index + 2, source.length);
|
|
38
|
-
maskedSource += maskSourceSegment(source.slice(start, index));
|
|
39
|
-
continue;
|
|
40
|
-
}
|
|
41
|
-
if (current === "'" || current === '"' || current === "`") {
|
|
42
|
-
const start = index;
|
|
43
|
-
const quote = current;
|
|
44
|
-
index += 1;
|
|
45
|
-
while (index < source.length) {
|
|
46
|
-
const char = source[index];
|
|
47
|
-
if (char === "\\") {
|
|
48
|
-
index += 2;
|
|
49
|
-
continue;
|
|
50
|
-
}
|
|
51
|
-
index += 1;
|
|
52
|
-
if (char === quote) {
|
|
53
|
-
break;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
maskedSource += maskSourceSegment(source.slice(start, index));
|
|
57
|
-
continue;
|
|
58
|
-
}
|
|
59
|
-
maskedSource += current;
|
|
60
|
-
index += 1;
|
|
61
|
-
}
|
|
62
|
-
return maskedSource;
|
|
63
|
-
}
|
|
64
|
-
function hasExecutablePattern(source, pattern) {
|
|
65
|
-
return testPattern(maskTypeScriptCommentsAndLiterals(source), pattern);
|
|
66
|
-
}
|
|
67
|
-
function hasUncommentedPattern(source, pattern) {
|
|
68
|
-
return testPattern(maskTypeScriptComments(source), pattern);
|
|
69
|
-
}
|
|
70
|
-
function findExecutablePatternMatch(source, patterns) {
|
|
71
|
-
const maskedSource = maskTypeScriptCommentsAndLiterals(source);
|
|
72
|
-
for (const pattern of patterns) {
|
|
73
|
-
pattern.lastIndex = 0;
|
|
74
|
-
const match = pattern.exec(maskedSource);
|
|
75
|
-
pattern.lastIndex = 0;
|
|
76
|
-
if (match && match.index !== undefined) {
|
|
77
|
-
return {
|
|
78
|
-
end: match.index + match[0].length,
|
|
79
|
-
start: match.index
|
|
80
|
-
};
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
return;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
// ../wp-typia-project-tools/src/runtime/cli-add-workspace-admin-view-types.ts
|
|
87
|
-
var ADMIN_VIEW_REST_SOURCE_KIND = "rest-resource";
|
|
88
|
-
var ADMIN_VIEW_CORE_DATA_SOURCE_KIND = "core-data";
|
|
89
|
-
var ADMIN_VIEW_CORE_DATA_ENTITY_KIND_IDS = [
|
|
90
|
-
"postType",
|
|
91
|
-
"taxonomy"
|
|
92
|
-
];
|
|
93
|
-
var ADMIN_VIEW_CORE_DATA_ENTITY_SEGMENT_PATTERN = /^[A-Za-z][A-Za-z0-9_-]*$/u;
|
|
94
|
-
var ADMIN_VIEW_CORE_DATA_ENTITY_NAME_PATTERN = /^[a-z0-9][a-z0-9_-]*$/u;
|
|
95
|
-
var ADMIN_VIEW_SOURCE_USAGE = "wp-typia add admin-view <name> --source <rest-resource:slug|core-data:kind/name>";
|
|
96
|
-
var ADMIN_VIEWS_SCRIPT = "build/admin-views/index.js";
|
|
97
|
-
var ADMIN_VIEWS_ASSET = "build/admin-views/index.asset.php";
|
|
98
|
-
var ADMIN_VIEWS_STYLE = "build/admin-views/style-index.css";
|
|
99
|
-
var ADMIN_VIEWS_STYLE_RTL = "build/admin-views/style-index-rtl.css";
|
|
100
|
-
var ADMIN_VIEWS_PHP_GLOB = "/inc/admin-views/*.php";
|
|
101
|
-
var ADMIN_VIEW_MANUAL_REST_ROUTE_PARAMETER_PATTERN = /(?:^|[^\\])\(/u;
|
|
102
|
-
function isAdminViewCoreDataSource(source) {
|
|
103
|
-
return source?.kind === ADMIN_VIEW_CORE_DATA_SOURCE_KIND;
|
|
104
|
-
}
|
|
105
|
-
function isAdminViewRestResourceSource(source) {
|
|
106
|
-
return source?.kind === ADMIN_VIEW_REST_SOURCE_KIND;
|
|
107
|
-
}
|
|
108
|
-
function isAdminViewManualSettingsRestResource(restResource) {
|
|
109
|
-
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;
|
|
110
|
-
}
|
|
111
|
-
function hasAdminViewManualSettingsRouteParameters(restResource) {
|
|
112
|
-
return [restResource?.pathPattern, restResource?.routePattern].some((pattern) => typeof pattern === "string" && ADMIN_VIEW_MANUAL_REST_ROUTE_PARAMETER_PATTERN.test(pattern));
|
|
113
|
-
}
|
|
114
|
-
function formatAdminViewSourceLocator(source) {
|
|
115
|
-
if (isAdminViewCoreDataSource(source)) {
|
|
116
|
-
return `${source.kind}:${source.entityKind}/${source.entityName}`;
|
|
117
|
-
}
|
|
118
|
-
return `${source.kind}:${source.slug}`;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
export { maskTypeScriptCommentsAndLiterals, hasExecutablePattern, hasUncommentedPattern, findExecutablePatternMatch, 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 };
|
|
122
|
-
|
|
123
|
-
//# debugId=E5187560087C2C2F64756E2164756E21
|