wp-typia 0.24.3 → 0.24.5

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.
Files changed (58) hide show
  1. package/README.md +7 -5
  2. package/bin/wp-typia.js +24 -103
  3. package/{dist-bunli/node-cli.js → dist/cli.js} +5079 -3656
  4. package/package.json +9 -36
  5. package/bin/routing-metadata.generated.d.ts +0 -8
  6. package/bin/routing-metadata.generated.js +0 -93
  7. package/bin/runtime-routing.d.ts +0 -34
  8. package/bin/runtime-routing.js +0 -124
  9. package/dist-bunli/.bunli/commands.gen.js +0 -304333
  10. package/dist-bunli/.bunli/highlights-eq9cgrbb.scm +0 -604
  11. package/dist-bunli/.bunli/highlights-ghv9g403.scm +0 -205
  12. package/dist-bunli/.bunli/highlights-hk7bwhj4.scm +0 -284
  13. package/dist-bunli/.bunli/highlights-r812a2qc.scm +0 -150
  14. package/dist-bunli/.bunli/highlights-x6tmsnaa.scm +0 -115
  15. package/dist-bunli/.bunli/injections-73j83es3.scm +0 -27
  16. package/dist-bunli/.bunli/tree-sitter-javascript-nd0q4pe9.wasm +0 -0
  17. package/dist-bunli/.bunli/tree-sitter-markdown-411r6y9b.wasm +0 -0
  18. package/dist-bunli/.bunli/tree-sitter-markdown_inline-j5349f42.wasm +0 -0
  19. package/dist-bunli/.bunli/tree-sitter-typescript-zxjzwt75.wasm +0 -0
  20. package/dist-bunli/.bunli/tree-sitter-zig-e78zbjpm.wasm +0 -0
  21. package/dist-bunli/agents-91fpdyyt.js +0 -12
  22. package/dist-bunli/chunk-bdqvmfwv-f5qmzmxg.js +0 -16825
  23. package/dist-bunli/cli-03j0axbt.js +0 -163
  24. package/dist-bunli/cli-1170yyve.js +0 -106
  25. package/dist-bunli/cli-377p86mf.js +0 -191
  26. package/dist-bunli/cli-4pzxbk4s.js +0 -1231
  27. package/dist-bunli/cli-6v0pcxw6.js +0 -314
  28. package/dist-bunli/cli-84c7wff4.js +0 -198
  29. package/dist-bunli/cli-8hxf9qw6.js +0 -198
  30. package/dist-bunli/cli-9fx0qgb7.js +0 -3680
  31. package/dist-bunli/cli-ac2ebaf8.js +0 -3
  32. package/dist-bunli/cli-add-mxxk5rep.js +0 -10660
  33. package/dist-bunli/cli-am5x7tb4.js +0 -192
  34. package/dist-bunli/cli-bajwv85z.js +0 -24
  35. package/dist-bunli/cli-ccax7s0s.js +0 -34
  36. package/dist-bunli/cli-cvxvcw7c.js +0 -46
  37. package/dist-bunli/cli-diagnostics-10drxh34.js +0 -34
  38. package/dist-bunli/cli-doctor-6fyxq940.js +0 -1446
  39. package/dist-bunli/cli-e4bwd81c.js +0 -1260
  40. package/dist-bunli/cli-fv4h3ydt.js +0 -173823
  41. package/dist-bunli/cli-hv2yedw2.js +0 -74591
  42. package/dist-bunli/cli-init-7avk42dh.js +0 -880
  43. package/dist-bunli/cli-kfm9mm68.js +0 -14679
  44. package/dist-bunli/cli-prompt-ncyg68rn.js +0 -12
  45. package/dist-bunli/cli-rdcga1bd.js +0 -135
  46. package/dist-bunli/cli-scaffold-0bb6pr3w.js +0 -538
  47. package/dist-bunli/cli-t73q5aqz.js +0 -103
  48. package/dist-bunli/cli-templates-g8t4fm11.js +0 -167
  49. package/dist-bunli/cli-tj7ajdvf.js +0 -2612
  50. package/dist-bunli/cli-tq730sqt.js +0 -344
  51. package/dist-bunli/cli-xnn9xjcy.js +0 -68
  52. package/dist-bunli/cli-z48frc8t.js +0 -229
  53. package/dist-bunli/cli.js +0 -2523
  54. package/dist-bunli/command-list-bgwaa2f4.js +0 -3920
  55. package/dist-bunli/create-template-validation-4fr851vg.js +0 -16
  56. package/dist-bunli/migrations-3vngdy51.js +0 -47
  57. package/dist-bunli/sync-k2k8svyc.js +0 -13
  58. package/dist-bunli/workspace-project-gmv2a71z.js +0 -22
@@ -1,314 +0,0 @@
1
- // @bun
2
- // ../../node_modules/.bun/@bunli+plugin-skills@0.1.0+44deef6f8e4a2f18/node_modules/@bunli/plugin-skills/src/agents.ts
3
- import * as fs from "fs";
4
- import * as os from "os";
5
- import * as path from "path";
6
- var home = os.homedir();
7
- var configHome = process.env.XDG_CONFIG_HOME || path.join(home, ".config");
8
- var claudeHome = process.env.CLAUDE_CONFIG_DIR?.trim() || path.join(home, ".claude");
9
- var codexHome = process.env.CODEX_HOME?.trim() || path.join(home, ".codex");
10
- function openclawGlobalSkillsDir() {
11
- if (fs.existsSync(path.join(home, ".openclaw")))
12
- return path.join(home, ".openclaw/skills");
13
- if (fs.existsSync(path.join(home, ".clawdbot")))
14
- return path.join(home, ".clawdbot/skills");
15
- if (fs.existsSync(path.join(home, ".moltbot")))
16
- return path.join(home, ".moltbot/skills");
17
- return path.join(home, ".openclaw/skills");
18
- }
19
- var builtinAgents = [
20
- {
21
- name: "Amp",
22
- globalSkillsDir: path.join(configHome, "agents", "skills"),
23
- projectSkillsDir: ".agents/skills",
24
- universal: true,
25
- detect: () => fs.existsSync(path.join(configHome, "amp"))
26
- },
27
- {
28
- name: "Antigravity",
29
- globalSkillsDir: path.join(home, ".gemini/antigravity/skills"),
30
- projectSkillsDir: ".agents/skills",
31
- universal: true,
32
- detect: () => fs.existsSync(path.join(home, ".gemini/antigravity"))
33
- },
34
- {
35
- name: "Cline",
36
- globalSkillsDir: path.join(home, ".agents", "skills"),
37
- projectSkillsDir: ".agents/skills",
38
- universal: true,
39
- detect: () => fs.existsSync(path.join(home, ".cline"))
40
- },
41
- {
42
- name: "Codex",
43
- globalSkillsDir: path.join(codexHome, "skills"),
44
- projectSkillsDir: ".agents/skills",
45
- universal: true,
46
- detect: () => fs.existsSync(codexHome)
47
- },
48
- {
49
- name: "Cursor",
50
- globalSkillsDir: path.join(home, ".cursor", "skills"),
51
- projectSkillsDir: ".agents/skills",
52
- universal: true,
53
- detect: () => fs.existsSync(path.join(home, ".cursor"))
54
- },
55
- {
56
- name: "Deep Agents",
57
- globalSkillsDir: path.join(home, ".deepagents/agent/skills"),
58
- projectSkillsDir: ".agents/skills",
59
- universal: true,
60
- detect: () => fs.existsSync(path.join(home, ".deepagents"))
61
- },
62
- {
63
- name: "Gemini CLI",
64
- globalSkillsDir: path.join(home, ".gemini", "skills"),
65
- projectSkillsDir: ".agents/skills",
66
- universal: true,
67
- detect: () => fs.existsSync(path.join(home, ".gemini"))
68
- },
69
- {
70
- name: "GitHub Copilot",
71
- globalSkillsDir: path.join(home, ".copilot", "skills"),
72
- projectSkillsDir: ".agents/skills",
73
- universal: true,
74
- detect: () => fs.existsSync(path.join(home, ".copilot"))
75
- },
76
- {
77
- name: "Kimi Code CLI",
78
- globalSkillsDir: path.join(configHome, "agents", "skills"),
79
- projectSkillsDir: ".agents/skills",
80
- universal: true,
81
- detect: () => fs.existsSync(path.join(home, ".kimi"))
82
- },
83
- {
84
- name: "OpenCode",
85
- globalSkillsDir: path.join(configHome, "opencode", "skills"),
86
- projectSkillsDir: ".agents/skills",
87
- universal: true,
88
- detect: () => fs.existsSync(path.join(configHome, "opencode"))
89
- },
90
- {
91
- name: "Warp",
92
- globalSkillsDir: path.join(home, ".agents/skills"),
93
- projectSkillsDir: ".agents/skills",
94
- universal: true,
95
- detect: () => fs.existsSync(path.join(home, ".warp"))
96
- },
97
- {
98
- name: "AdaL",
99
- globalSkillsDir: path.join(home, ".adal/skills"),
100
- projectSkillsDir: ".adal/skills",
101
- universal: false,
102
- detect: () => fs.existsSync(path.join(home, ".adal"))
103
- },
104
- {
105
- name: "Augment",
106
- globalSkillsDir: path.join(home, ".augment/skills"),
107
- projectSkillsDir: ".augment/skills",
108
- universal: false,
109
- detect: () => fs.existsSync(path.join(home, ".augment"))
110
- },
111
- {
112
- name: "Claude Code",
113
- globalSkillsDir: path.join(claudeHome, "skills"),
114
- projectSkillsDir: ".claude/skills",
115
- universal: false,
116
- detect: () => fs.existsSync(claudeHome)
117
- },
118
- {
119
- name: "CodeBuddy",
120
- globalSkillsDir: path.join(home, ".codebuddy/skills"),
121
- projectSkillsDir: ".codebuddy/skills",
122
- universal: false,
123
- detect: () => fs.existsSync(path.join(home, ".codebuddy"))
124
- },
125
- {
126
- name: "Command Code",
127
- globalSkillsDir: path.join(home, ".commandcode/skills"),
128
- projectSkillsDir: ".commandcode/skills",
129
- universal: false,
130
- detect: () => fs.existsSync(path.join(home, ".commandcode"))
131
- },
132
- {
133
- name: "Continue",
134
- globalSkillsDir: path.join(home, ".continue/skills"),
135
- projectSkillsDir: ".continue/skills",
136
- universal: false,
137
- detect: () => fs.existsSync(path.join(home, ".continue"))
138
- },
139
- {
140
- name: "Cortex Code",
141
- globalSkillsDir: path.join(home, ".snowflake/cortex/skills"),
142
- projectSkillsDir: ".cortex/skills",
143
- universal: false,
144
- detect: () => fs.existsSync(path.join(home, ".snowflake/cortex"))
145
- },
146
- {
147
- name: "Crush",
148
- globalSkillsDir: path.join(configHome, "crush", "skills"),
149
- projectSkillsDir: ".crush/skills",
150
- universal: false,
151
- detect: () => fs.existsSync(path.join(configHome, "crush"))
152
- },
153
- {
154
- name: "Droid",
155
- globalSkillsDir: path.join(home, ".factory/skills"),
156
- projectSkillsDir: ".factory/skills",
157
- universal: false,
158
- detect: () => fs.existsSync(path.join(home, ".factory"))
159
- },
160
- {
161
- name: "Goose",
162
- globalSkillsDir: path.join(configHome, "goose", "skills"),
163
- projectSkillsDir: ".goose/skills",
164
- universal: false,
165
- detect: () => fs.existsSync(path.join(configHome, "goose"))
166
- },
167
- {
168
- name: "iFlow CLI",
169
- globalSkillsDir: path.join(home, ".iflow/skills"),
170
- projectSkillsDir: ".iflow/skills",
171
- universal: false,
172
- detect: () => fs.existsSync(path.join(home, ".iflow"))
173
- },
174
- {
175
- name: "Junie",
176
- globalSkillsDir: path.join(home, ".junie/skills"),
177
- projectSkillsDir: ".junie/skills",
178
- universal: false,
179
- detect: () => fs.existsSync(path.join(home, ".junie"))
180
- },
181
- {
182
- name: "Kilo Code",
183
- globalSkillsDir: path.join(home, ".kilocode/skills"),
184
- projectSkillsDir: ".kilocode/skills",
185
- universal: false,
186
- detect: () => fs.existsSync(path.join(home, ".kilocode"))
187
- },
188
- {
189
- name: "Kiro CLI",
190
- globalSkillsDir: path.join(home, ".kiro/skills"),
191
- projectSkillsDir: ".kiro/skills",
192
- universal: false,
193
- detect: () => fs.existsSync(path.join(home, ".kiro"))
194
- },
195
- {
196
- name: "Kode",
197
- globalSkillsDir: path.join(home, ".kode/skills"),
198
- projectSkillsDir: ".kode/skills",
199
- universal: false,
200
- detect: () => fs.existsSync(path.join(home, ".kode"))
201
- },
202
- {
203
- name: "MCPJam",
204
- globalSkillsDir: path.join(home, ".mcpjam/skills"),
205
- projectSkillsDir: ".mcpjam/skills",
206
- universal: false,
207
- detect: () => fs.existsSync(path.join(home, ".mcpjam"))
208
- },
209
- {
210
- name: "Mistral Vibe",
211
- globalSkillsDir: path.join(home, ".vibe/skills"),
212
- projectSkillsDir: ".vibe/skills",
213
- universal: false,
214
- detect: () => fs.existsSync(path.join(home, ".vibe"))
215
- },
216
- {
217
- name: "Mux",
218
- globalSkillsDir: path.join(home, ".mux/skills"),
219
- projectSkillsDir: ".mux/skills",
220
- universal: false,
221
- detect: () => fs.existsSync(path.join(home, ".mux"))
222
- },
223
- {
224
- name: "Neovate",
225
- globalSkillsDir: path.join(home, ".neovate/skills"),
226
- projectSkillsDir: ".neovate/skills",
227
- universal: false,
228
- detect: () => fs.existsSync(path.join(home, ".neovate"))
229
- },
230
- {
231
- name: "OpenClaw",
232
- globalSkillsDir: openclawGlobalSkillsDir(),
233
- projectSkillsDir: "skills",
234
- universal: false,
235
- detect: () => fs.existsSync(path.join(home, ".openclaw")) || fs.existsSync(path.join(home, ".clawdbot")) || fs.existsSync(path.join(home, ".moltbot"))
236
- },
237
- {
238
- name: "OpenHands",
239
- globalSkillsDir: path.join(home, ".openhands/skills"),
240
- projectSkillsDir: ".openhands/skills",
241
- universal: false,
242
- detect: () => fs.existsSync(path.join(home, ".openhands"))
243
- },
244
- {
245
- name: "Pi",
246
- globalSkillsDir: path.join(home, ".pi/agent/skills"),
247
- projectSkillsDir: ".pi/skills",
248
- universal: false,
249
- detect: () => fs.existsSync(path.join(home, ".pi/agent"))
250
- },
251
- {
252
- name: "Pochi",
253
- globalSkillsDir: path.join(home, ".pochi/skills"),
254
- projectSkillsDir: ".pochi/skills",
255
- universal: false,
256
- detect: () => fs.existsSync(path.join(home, ".pochi"))
257
- },
258
- {
259
- name: "Qoder",
260
- globalSkillsDir: path.join(home, ".qoder/skills"),
261
- projectSkillsDir: ".qoder/skills",
262
- universal: false,
263
- detect: () => fs.existsSync(path.join(home, ".qoder"))
264
- },
265
- {
266
- name: "Qwen Code",
267
- globalSkillsDir: path.join(home, ".qwen/skills"),
268
- projectSkillsDir: ".qwen/skills",
269
- universal: false,
270
- detect: () => fs.existsSync(path.join(home, ".qwen"))
271
- },
272
- {
273
- name: "Roo Code",
274
- globalSkillsDir: path.join(home, ".roo/skills"),
275
- projectSkillsDir: ".roo/skills",
276
- universal: false,
277
- detect: () => fs.existsSync(path.join(home, ".roo"))
278
- },
279
- {
280
- name: "Trae",
281
- globalSkillsDir: path.join(home, ".trae/skills"),
282
- projectSkillsDir: ".trae/skills",
283
- universal: false,
284
- detect: () => fs.existsSync(path.join(home, ".trae"))
285
- },
286
- {
287
- name: "Trae CN",
288
- globalSkillsDir: path.join(home, ".trae-cn/skills"),
289
- projectSkillsDir: ".trae/skills",
290
- universal: false,
291
- detect: () => fs.existsSync(path.join(home, ".trae-cn"))
292
- },
293
- {
294
- name: "Windsurf",
295
- globalSkillsDir: path.join(home, ".codeium/windsurf/skills"),
296
- projectSkillsDir: ".windsurf/skills",
297
- universal: false,
298
- detect: () => fs.existsSync(path.join(home, ".codeium", "windsurf"))
299
- },
300
- {
301
- name: "Zencoder",
302
- globalSkillsDir: path.join(home, ".zencoder/skills"),
303
- projectSkillsDir: ".zencoder/skills",
304
- universal: false,
305
- detect: () => fs.existsSync(path.join(home, ".zencoder"))
306
- }
307
- ];
308
- function detectAgents(agents = builtinAgents) {
309
- return agents.filter((a) => a.detect());
310
- }
311
-
312
- export { builtinAgents, detectAgents };
313
-
314
- //# debugId=79F9B938FC861D9764756E2164756E21
@@ -1,198 +0,0 @@
1
- // @bun
2
- import {
3
- PROJECT_TOOLS_PACKAGE_ROOT
4
- } from "./cli-8hxf9qw6.js";
5
- import {
6
- getOptionalNodeErrorCode
7
- } from "./cli-fv4h3ydt.js";
8
- import {
9
- safeJsonParse
10
- } from "./cli-ccax7s0s.js";
11
-
12
- // ../wp-typia-project-tools/src/runtime/package-versions.ts
13
- import fs from "fs";
14
- import { createRequire } from "module";
15
- import path from "path";
16
- var require2 = createRequire(import.meta.url);
17
- var DEFAULT_VERSION_RANGE = "^0.0.0";
18
- var DEFAULT_EXACT_VERSION = "0.0.0";
19
- var DEFAULT_TSX_PACKAGE_VERSION = "^4.20.5";
20
- var DEFAULT_TYPIA_UNPLUGIN_PACKAGE_VERSION = "^12.0.1";
21
- var DEFAULT_WORDPRESS_ABILITIES_VERSION = "^0.10.0";
22
- var DEFAULT_WORDPRESS_CORE_ABILITIES_VERSION = "^0.9.0";
23
- var DEFAULT_WORDPRESS_CORE_DATA_VERSION = "^7.44.0";
24
- var DEFAULT_WORDPRESS_DATA_VERSION = "^9.28.0";
25
- var DEFAULT_WORDPRESS_DATAVIEWS_VERSION = "^14.1.0";
26
- var DEFAULT_WORDPRESS_ENV_VERSION = "^11.2.0";
27
- var DEFAULT_WP_TYPIA_DATAVIEWS_VERSION = "^0.1.1";
28
- var cachedPackageVersions = null;
29
- function normalizeVersionRange(value) {
30
- const trimmed = value?.trim();
31
- if (!trimmed) {
32
- return DEFAULT_VERSION_RANGE;
33
- }
34
- if (trimmed.startsWith("workspace:")) {
35
- return DEFAULT_VERSION_RANGE;
36
- }
37
- return /^[~^<>=]/.test(trimmed) ? trimmed : `^${trimmed}`;
38
- }
39
- function normalizeExactVersion(value) {
40
- const trimmed = value?.trim();
41
- if (!trimmed) {
42
- return DEFAULT_EXACT_VERSION;
43
- }
44
- if (trimmed.startsWith("workspace:")) {
45
- return DEFAULT_EXACT_VERSION;
46
- }
47
- return trimmed.replace(/^[~^<>=]+/, "");
48
- }
49
- function normalizeVersionRangeWithFallback(value, fallback) {
50
- const normalized = normalizeVersionRange(value);
51
- return normalized === DEFAULT_VERSION_RANGE ? fallback : normalized;
52
- }
53
- function createContentFingerprint(source) {
54
- let hash = 2166136261;
55
- for (let index = 0;index < source.length; index += 1) {
56
- hash ^= source.charCodeAt(index);
57
- hash = Math.imul(hash, 16777619);
58
- }
59
- return (hash >>> 0).toString(16);
60
- }
61
- function readPackageManifestFile(packageJsonPath) {
62
- const fileDescriptor = fs.openSync(packageJsonPath, "r");
63
- try {
64
- const stats = fs.fstatSync(fileDescriptor);
65
- const source = fs.readFileSync(fileDescriptor, "utf8");
66
- return { source, stats };
67
- } finally {
68
- fs.closeSync(fileDescriptor);
69
- }
70
- }
71
- function resolvePackageManifestLocation(packageJsonPath) {
72
- try {
73
- const { source, stats } = readPackageManifestFile(packageJsonPath);
74
- return {
75
- cacheKey: `file:${packageJsonPath}:${stats.ino}:${stats.mtimeMs}:${stats.ctimeMs}:${stats.size}:${createContentFingerprint(source)}`,
76
- packageJsonPath,
77
- source
78
- };
79
- } catch (error) {
80
- if (getOptionalNodeErrorCode(error) === "ENOENT") {
81
- return {
82
- cacheKey: `missing-file:${packageJsonPath}`,
83
- packageJsonPath: null,
84
- source: null
85
- };
86
- }
87
- throw error;
88
- }
89
- }
90
- function readPackageManifest(location) {
91
- if (!location.packageJsonPath || location.source === null) {
92
- return null;
93
- }
94
- return safeJsonParse(location.source, {
95
- context: "package version manifest",
96
- filePath: location.packageJsonPath
97
- });
98
- }
99
- function tryReadPackageManifest(location) {
100
- if (!location) {
101
- return null;
102
- }
103
- try {
104
- return readPackageManifest(location);
105
- } catch {
106
- return null;
107
- }
108
- }
109
- function resolveInstalledPackageManifestLocation(packageName) {
110
- try {
111
- return resolvePackageManifestLocation(require2.resolve(`${packageName}/package.json`));
112
- } catch (error) {
113
- if (getOptionalNodeErrorCode(error) === "MODULE_NOT_FOUND") {
114
- return {
115
- cacheKey: `missing-module:${packageName}`,
116
- packageJsonPath: null,
117
- source: null
118
- };
119
- }
120
- throw error;
121
- }
122
- }
123
- function composePackageVersionsCacheKey(locations) {
124
- return locations.map((location) => location.cacheKey).join("|");
125
- }
126
- function resolveManagedPackageVersionRange(options) {
127
- const workspaceManifestLocation = options.workspacePackageDirName ? resolvePackageManifestLocation(path.join(PROJECT_TOOLS_PACKAGE_ROOT, "..", options.workspacePackageDirName, "package.json")) : null;
128
- const installedManifestLocation = resolveInstalledPackageManifestLocation(options.packageName);
129
- const workspaceManifest = tryReadPackageManifest(workspaceManifestLocation);
130
- const installedManifest = tryReadPackageManifest(installedManifestLocation);
131
- return normalizeVersionRangeWithFallback(workspaceManifest?.version ?? installedManifest?.version, options.fallback);
132
- }
133
- function getPackageVersions() {
134
- const createManifestLocation = resolvePackageManifestLocation(path.join(PROJECT_TOOLS_PACKAGE_ROOT, "package.json"));
135
- const monorepoManifestLocation = resolvePackageManifestLocation(path.join(PROJECT_TOOLS_PACKAGE_ROOT, "..", "..", "package.json"));
136
- const blockRuntimeManifestLocation = resolvePackageManifestLocation(path.join(PROJECT_TOOLS_PACKAGE_ROOT, "..", "wp-typia-block-runtime", "package.json"));
137
- const blockTypesManifestLocation = resolvePackageManifestLocation(path.join(PROJECT_TOOLS_PACKAGE_ROOT, "..", "wp-typia-block-types", "package.json"));
138
- const wpTypiaManifestLocation = resolvePackageManifestLocation(path.join(PROJECT_TOOLS_PACKAGE_ROOT, "..", "wp-typia", "package.json"));
139
- const installedProjectToolsManifestLocation = resolveInstalledPackageManifestLocation("@wp-typia/project-tools");
140
- const installedApiClientManifestLocation = resolveInstalledPackageManifestLocation("@wp-typia/api-client");
141
- const installedBlockRuntimeManifestLocation = resolveInstalledPackageManifestLocation("@wp-typia/block-runtime");
142
- const installedBlockTypesManifestLocation = resolveInstalledPackageManifestLocation("@wp-typia/block-types");
143
- const installedRestManifestLocation = resolveInstalledPackageManifestLocation("@wp-typia/rest");
144
- const installedTsxManifestLocation = resolveInstalledPackageManifestLocation("tsx");
145
- const installedTypiaManifestLocation = resolveInstalledPackageManifestLocation("typia");
146
- const installedTypiaUnpluginManifestLocation = resolveInstalledPackageManifestLocation("@typia/unplugin");
147
- const installedTypescriptManifestLocation = resolveInstalledPackageManifestLocation("typescript");
148
- const installedWpTypiaManifestLocation = resolveInstalledPackageManifestLocation("wp-typia");
149
- const cacheKey = composePackageVersionsCacheKey([
150
- createManifestLocation,
151
- monorepoManifestLocation,
152
- blockRuntimeManifestLocation,
153
- blockTypesManifestLocation,
154
- wpTypiaManifestLocation,
155
- installedProjectToolsManifestLocation,
156
- installedApiClientManifestLocation,
157
- installedBlockRuntimeManifestLocation,
158
- installedBlockTypesManifestLocation,
159
- installedRestManifestLocation,
160
- installedTsxManifestLocation,
161
- installedTypiaManifestLocation,
162
- installedTypiaUnpluginManifestLocation,
163
- installedTypescriptManifestLocation,
164
- installedWpTypiaManifestLocation
165
- ]);
166
- if (cachedPackageVersions?.cacheKey === cacheKey) {
167
- return cachedPackageVersions.versions;
168
- }
169
- const createManifest = readPackageManifest(createManifestLocation) ?? readPackageManifest(installedProjectToolsManifestLocation) ?? {};
170
- const monorepoManifest = readPackageManifest(monorepoManifestLocation) ?? {};
171
- const blockRuntimeManifest = readPackageManifest(blockRuntimeManifestLocation) ?? readPackageManifest(installedBlockRuntimeManifestLocation) ?? {};
172
- const blockTypesManifest = readPackageManifest(blockTypesManifestLocation) ?? readPackageManifest(installedBlockTypesManifestLocation) ?? {};
173
- const wpTypiaManifest = readPackageManifest(wpTypiaManifestLocation) ?? readPackageManifest(installedWpTypiaManifestLocation) ?? {};
174
- const blockRuntimeDependencyVersion = normalizeVersionRange(createManifest.dependencies?.["@wp-typia/block-runtime"]);
175
- const blockTypesDependencyVersion = normalizeVersionRange(createManifest.dependencies?.["@wp-typia/block-types"]);
176
- const versions = {
177
- apiClientPackageVersion: normalizeVersionRange(createManifest.dependencies?.["@wp-typia/api-client"] ?? readPackageManifest(installedApiClientManifestLocation)?.version),
178
- blockRuntimePackageVersion: blockRuntimeDependencyVersion !== DEFAULT_VERSION_RANGE ? blockRuntimeDependencyVersion : normalizeVersionRange(blockRuntimeManifest.version),
179
- blockTypesPackageVersion: blockTypesDependencyVersion !== DEFAULT_VERSION_RANGE ? blockTypesDependencyVersion : normalizeVersionRange(blockTypesManifest.version),
180
- projectToolsPackageVersion: normalizeVersionRange(createManifest.version),
181
- restPackageVersion: normalizeVersionRange(createManifest.dependencies?.["@wp-typia/rest"] ?? readPackageManifest(installedRestManifestLocation)?.version),
182
- tsxPackageVersion: normalizeVersionRangeWithFallback(monorepoManifest.dependencies?.tsx ?? monorepoManifest.devDependencies?.tsx ?? readPackageManifest(installedTsxManifestLocation)?.version, DEFAULT_TSX_PACKAGE_VERSION),
183
- typiaPackageVersion: normalizeVersionRangeWithFallback(monorepoManifest.dependencies?.typia ?? monorepoManifest.devDependencies?.typia ?? createManifest.dependencies?.typia ?? readPackageManifest(installedTypiaManifestLocation)?.version, DEFAULT_VERSION_RANGE),
184
- typiaUnpluginPackageVersion: normalizeVersionRangeWithFallback(monorepoManifest.dependencies?.["@typia/unplugin"] ?? monorepoManifest.devDependencies?.["@typia/unplugin"] ?? readPackageManifest(installedTypiaUnpluginManifestLocation)?.version, DEFAULT_TYPIA_UNPLUGIN_PACKAGE_VERSION),
185
- typescriptPackageVersion: normalizeVersionRangeWithFallback(monorepoManifest.dependencies?.typescript ?? monorepoManifest.devDependencies?.typescript ?? createManifest.dependencies?.typescript ?? readPackageManifest(installedTypescriptManifestLocation)?.version, DEFAULT_VERSION_RANGE),
186
- wpTypiaPackageExactVersion: normalizeExactVersion(wpTypiaManifest.version),
187
- wpTypiaPackageVersion: normalizeVersionRange(wpTypiaManifest.version)
188
- };
189
- cachedPackageVersions = {
190
- cacheKey,
191
- versions
192
- };
193
- return versions;
194
- }
195
-
196
- 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 };
197
-
198
- //# debugId=8B55C11F64E194C164756E2164756E21