wp-typia 0.20.5 → 0.22.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 +5 -0
- package/bin/argv-walker.d.ts +19 -0
- package/bin/argv-walker.js +53 -0
- package/bin/routing-metadata.generated.d.ts +3 -1
- package/bin/routing-metadata.generated.js +57 -37
- package/bin/runtime-routing.d.ts +34 -0
- package/bin/runtime-routing.js +124 -0
- package/bin/wp-typia.js +97 -90
- package/dist-bunli/.bunli/commands.gen.js +5705 -1385
- package/dist-bunli/{cli-j1tyw390.js → cli-1w5vkye4.js} +989 -266
- package/dist-bunli/{cli-tesygdnr.js → cli-39er8888.js} +29 -2
- package/dist-bunli/{cli-add-6byyahb8.js → cli-add-kjhghdqq.js} +2488 -479
- package/dist-bunli/{cli-diagnostics-zecc6w1f.js → cli-diagnostics-5dvztm7q.js} +8 -2
- package/dist-bunli/{cli-doctor-2bc4sq7v.js → cli-doctor-p3jxvn0k.js} +493 -20
- package/dist-bunli/{cli-2rev5hqm.js → cli-e623rs7g.js} +1 -1
- package/dist-bunli/cli-init-djhwr245.js +844 -0
- package/dist-bunli/{cli-3w3qxq9w.js → cli-j180bk07.js} +260 -25
- package/dist-bunli/{cli-xnh2s5kz.js → cli-ktp869eh.js} +350 -41
- package/dist-bunli/{cli-xxzpb58s.js → cli-p95wr1q8.js} +72 -4
- package/dist-bunli/{cli-scaffold-19gyvxxt.js → cli-scaffold-376yw891.js} +6 -5
- package/dist-bunli/cli.js +31 -117
- package/dist-bunli/{command-list-pztcgga5.js → command-list-jt1a1w7r.js} +587 -320
- package/dist-bunli/{migrations-1p6mbkyw.js → migrations-nwas5bwt.js} +2 -2
- package/dist-bunli/node-cli.js +1063 -556
- package/package.json +5 -3
- package/dist-bunli/cli-init-gdyp9enw.js +0 -341
|
@@ -10,6 +10,14 @@ import path from "path";
|
|
|
10
10
|
var require2 = createRequire(import.meta.url);
|
|
11
11
|
var DEFAULT_VERSION_RANGE = "^0.0.0";
|
|
12
12
|
var DEFAULT_EXACT_VERSION = "0.0.0";
|
|
13
|
+
var DEFAULT_TSX_PACKAGE_VERSION = "^4.20.5";
|
|
14
|
+
var DEFAULT_TYPIA_UNPLUGIN_PACKAGE_VERSION = "^12.0.1";
|
|
15
|
+
var DEFAULT_WORDPRESS_ABILITIES_VERSION = "^0.10.0";
|
|
16
|
+
var DEFAULT_WORDPRESS_CORE_ABILITIES_VERSION = "^0.9.0";
|
|
17
|
+
var DEFAULT_WORDPRESS_CORE_DATA_VERSION = "^7.44.0";
|
|
18
|
+
var DEFAULT_WORDPRESS_DATA_VERSION = "^9.28.0";
|
|
19
|
+
var DEFAULT_WORDPRESS_DATAVIEWS_VERSION = "^14.1.0";
|
|
20
|
+
var DEFAULT_WP_TYPIA_DATAVIEWS_VERSION = "^0.1.0";
|
|
13
21
|
var cachedPackageVersions = null;
|
|
14
22
|
function getErrorCode(error) {
|
|
15
23
|
return typeof error === "object" && error !== null && "code" in error ? String(error.code) : undefined;
|
|
@@ -34,6 +42,10 @@ function normalizeExactVersion(value) {
|
|
|
34
42
|
}
|
|
35
43
|
return trimmed.replace(/^[~^<>=]+/, "");
|
|
36
44
|
}
|
|
45
|
+
function normalizeVersionRangeWithFallback(value, fallback) {
|
|
46
|
+
const normalized = normalizeVersionRange(value);
|
|
47
|
+
return normalized === DEFAULT_VERSION_RANGE ? fallback : normalized;
|
|
48
|
+
}
|
|
37
49
|
function createContentFingerprint(source) {
|
|
38
50
|
let hash = 2166136261;
|
|
39
51
|
for (let index = 0;index < source.length; index += 1) {
|
|
@@ -87,6 +99,7 @@ function composePackageVersionsCacheKey(locations) {
|
|
|
87
99
|
}
|
|
88
100
|
function getPackageVersions() {
|
|
89
101
|
const createManifestLocation = resolvePackageManifestLocation(path.join(PROJECT_TOOLS_PACKAGE_ROOT, "package.json"));
|
|
102
|
+
const monorepoManifestLocation = resolvePackageManifestLocation(path.join(PROJECT_TOOLS_PACKAGE_ROOT, "..", "..", "package.json"));
|
|
90
103
|
const blockRuntimeManifestLocation = resolvePackageManifestLocation(path.join(PROJECT_TOOLS_PACKAGE_ROOT, "..", "wp-typia-block-runtime", "package.json"));
|
|
91
104
|
const wpTypiaManifestLocation = resolvePackageManifestLocation(path.join(PROJECT_TOOLS_PACKAGE_ROOT, "..", "wp-typia", "package.json"));
|
|
92
105
|
const installedProjectToolsManifestLocation = resolveInstalledPackageManifestLocation("@wp-typia/project-tools");
|
|
@@ -94,9 +107,14 @@ function getPackageVersions() {
|
|
|
94
107
|
const installedBlockRuntimeManifestLocation = resolveInstalledPackageManifestLocation("@wp-typia/block-runtime");
|
|
95
108
|
const installedBlockTypesManifestLocation = resolveInstalledPackageManifestLocation("@wp-typia/block-types");
|
|
96
109
|
const installedRestManifestLocation = resolveInstalledPackageManifestLocation("@wp-typia/rest");
|
|
110
|
+
const installedTsxManifestLocation = resolveInstalledPackageManifestLocation("tsx");
|
|
111
|
+
const installedTypiaManifestLocation = resolveInstalledPackageManifestLocation("typia");
|
|
112
|
+
const installedTypiaUnpluginManifestLocation = resolveInstalledPackageManifestLocation("@typia/unplugin");
|
|
113
|
+
const installedTypescriptManifestLocation = resolveInstalledPackageManifestLocation("typescript");
|
|
97
114
|
const installedWpTypiaManifestLocation = resolveInstalledPackageManifestLocation("wp-typia");
|
|
98
115
|
const cacheKey = composePackageVersionsCacheKey([
|
|
99
116
|
createManifestLocation,
|
|
117
|
+
monorepoManifestLocation,
|
|
100
118
|
blockRuntimeManifestLocation,
|
|
101
119
|
wpTypiaManifestLocation,
|
|
102
120
|
installedProjectToolsManifestLocation,
|
|
@@ -104,12 +122,17 @@ function getPackageVersions() {
|
|
|
104
122
|
installedBlockRuntimeManifestLocation,
|
|
105
123
|
installedBlockTypesManifestLocation,
|
|
106
124
|
installedRestManifestLocation,
|
|
125
|
+
installedTsxManifestLocation,
|
|
126
|
+
installedTypiaManifestLocation,
|
|
127
|
+
installedTypiaUnpluginManifestLocation,
|
|
128
|
+
installedTypescriptManifestLocation,
|
|
107
129
|
installedWpTypiaManifestLocation
|
|
108
130
|
]);
|
|
109
131
|
if (cachedPackageVersions?.cacheKey === cacheKey) {
|
|
110
132
|
return cachedPackageVersions.versions;
|
|
111
133
|
}
|
|
112
134
|
const createManifest = readPackageManifest(createManifestLocation) ?? readPackageManifest(installedProjectToolsManifestLocation) ?? {};
|
|
135
|
+
const monorepoManifest = readPackageManifest(monorepoManifestLocation) ?? {};
|
|
113
136
|
const blockRuntimeManifest = readPackageManifest(blockRuntimeManifestLocation) ?? readPackageManifest(installedBlockRuntimeManifestLocation) ?? {};
|
|
114
137
|
const wpTypiaManifest = readPackageManifest(wpTypiaManifestLocation) ?? readPackageManifest(installedWpTypiaManifestLocation) ?? {};
|
|
115
138
|
const blockRuntimeDependencyVersion = normalizeVersionRange(createManifest.dependencies?.["@wp-typia/block-runtime"]);
|
|
@@ -119,6 +142,10 @@ function getPackageVersions() {
|
|
|
119
142
|
blockTypesPackageVersion: normalizeVersionRange(createManifest.dependencies?.["@wp-typia/block-types"] ?? readPackageManifest(installedBlockTypesManifestLocation)?.version),
|
|
120
143
|
projectToolsPackageVersion: normalizeVersionRange(createManifest.version),
|
|
121
144
|
restPackageVersion: normalizeVersionRange(createManifest.dependencies?.["@wp-typia/rest"] ?? readPackageManifest(installedRestManifestLocation)?.version),
|
|
145
|
+
tsxPackageVersion: normalizeVersionRangeWithFallback(monorepoManifest.dependencies?.tsx ?? monorepoManifest.devDependencies?.tsx ?? readPackageManifest(installedTsxManifestLocation)?.version, DEFAULT_TSX_PACKAGE_VERSION),
|
|
146
|
+
typiaPackageVersion: normalizeVersionRangeWithFallback(monorepoManifest.dependencies?.typia ?? monorepoManifest.devDependencies?.typia ?? createManifest.dependencies?.typia ?? readPackageManifest(installedTypiaManifestLocation)?.version, DEFAULT_VERSION_RANGE),
|
|
147
|
+
typiaUnpluginPackageVersion: normalizeVersionRangeWithFallback(monorepoManifest.dependencies?.["@typia/unplugin"] ?? monorepoManifest.devDependencies?.["@typia/unplugin"] ?? readPackageManifest(installedTypiaUnpluginManifestLocation)?.version, DEFAULT_TYPIA_UNPLUGIN_PACKAGE_VERSION),
|
|
148
|
+
typescriptPackageVersion: normalizeVersionRangeWithFallback(monorepoManifest.dependencies?.typescript ?? monorepoManifest.devDependencies?.typescript ?? createManifest.dependencies?.typescript ?? readPackageManifest(installedTypescriptManifestLocation)?.version, DEFAULT_VERSION_RANGE),
|
|
122
149
|
wpTypiaPackageExactVersion: normalizeExactVersion(wpTypiaManifest.version),
|
|
123
150
|
wpTypiaPackageVersion: normalizeVersionRange(wpTypiaManifest.version)
|
|
124
151
|
};
|
|
@@ -129,6 +156,6 @@ function getPackageVersions() {
|
|
|
129
156
|
return versions;
|
|
130
157
|
}
|
|
131
158
|
|
|
132
|
-
export { getPackageVersions };
|
|
159
|
+
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, getPackageVersions };
|
|
133
160
|
|
|
134
|
-
//# debugId=
|
|
161
|
+
//# debugId=010FDB9C3FA1ADA964756E2164756E21
|