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.
Files changed (31) hide show
  1. package/README.md +2 -1
  2. package/bin/routing-metadata.generated.js +4 -0
  3. package/dist-bunli/.bunli/commands.gen.js +4103 -3086
  4. package/dist-bunli/{cli-hhp1d348.js → cli-1170yyve.js} +8 -7
  5. package/dist-bunli/{cli-qse6myha.js → cli-8hxf9qw6.js} +11 -3
  6. package/dist-bunli/{cli-8reep89s.js → cli-9fx0qgb7.js} +2 -2
  7. package/dist-bunli/{cli-add-21bvpfgw.js → cli-add-xjaaa01x.js} +1560 -1525
  8. package/dist-bunli/{cli-52ke0ptp.js → cli-am5x7tb4.js} +8 -2
  9. package/dist-bunli/cli-ccax7s0s.js +34 -0
  10. package/dist-bunli/{cli-diagnostics-5dvztm7q.js → cli-diagnostics-10drxh34.js} +1 -1
  11. package/dist-bunli/{cli-doctor-wy2yjsge.js → cli-doctor-19e8313m.js} +602 -459
  12. package/dist-bunli/{cli-2rqf6t0b.js → cli-e4bwd81c.js} +8 -11
  13. package/dist-bunli/{cli-9npd9was.js → cli-epsczb1c.js} +12 -10
  14. package/dist-bunli/{cli-agywa5n6.js → cli-fp16mntv.js} +8 -4
  15. package/dist-bunli/{cli-init-xnsbxncv.js → cli-init-2b4yn2cc.js} +14 -10
  16. package/dist-bunli/{cli-ts9thts5.js → cli-k5q5v8g6.js} +184 -162
  17. package/dist-bunli/{cli-c2acv5dv.js → cli-nvs5atj1.js} +2 -2
  18. package/dist-bunli/{cli-prompt-614tq57c.js → cli-prompt-ncyg68rn.js} +1 -1
  19. package/dist-bunli/{cli-bq2v559b.js → cli-rdcga1bd.js} +31 -13
  20. package/dist-bunli/{cli-scaffold-zhp2ym8z.js → cli-scaffold-4tjw4jk5.js} +27 -15
  21. package/dist-bunli/{cli-templates-hc71dfc2.js → cli-templates-g8t4fm11.js} +3 -2
  22. package/dist-bunli/{cli-p95wr1q8.js → cli-tq730sqt.js} +6 -3
  23. package/dist-bunli/{cli-1meywwsy.js → cli-y7w3pybs.js} +848 -246
  24. package/dist-bunli/{cli-z5qkx2pn.js → cli-ymecd15q.js} +37 -10
  25. package/dist-bunli/cli.js +4 -4
  26. package/dist-bunli/{command-list-aqrkx021.js → command-list-vme7dr5v.js} +81 -45
  27. package/dist-bunli/{create-template-validation-rtec5sng.js → create-template-validation-4fr851vg.js} +5 -4
  28. package/dist-bunli/{migrations-bx0yvc2v.js → migrations-pb5vvtdp.js} +9 -8
  29. package/dist-bunli/node-cli.js +399 -317
  30. package/dist-bunli/{workspace-project-csnnggz6.js → workspace-project-gmv2a71z.js} +4 -3
  31. package/package.json +2 -2
@@ -1,4 +1,8 @@
1
1
  // @bun
2
+ import {
3
+ readJsonFileSync
4
+ } from "./cli-ccax7s0s.js";
5
+
2
6
  // ../wp-typia-project-tools/src/runtime/package-managers.ts
3
7
  import fs from "fs";
4
8
  import path from "path";
@@ -68,7 +72,9 @@ function readPackageManagerField(projectDir) {
68
72
  if (!fs.existsSync(packageJsonPath)) {
69
73
  return;
70
74
  }
71
- const manifest = JSON.parse(fs.readFileSync(packageJsonPath, "utf8"));
75
+ const manifest = readJsonFileSync(packageJsonPath, {
76
+ context: "package manager manifest"
77
+ });
72
78
  return typeof manifest.packageManager === "string" ? manifest.packageManager : undefined;
73
79
  } catch {
74
80
  return;
@@ -183,4 +189,4 @@ function transformPackageManagerText(content, packageManagerId) {
183
189
 
184
190
  export { PACKAGE_MANAGER_IDS, getPackageManager, parsePackageManagerField, inferPackageManagerId, formatRunScript, formatInstallCommand, formatAddDevDependenciesCommand, formatPackageExecCommand, transformPackageManagerText };
185
191
 
186
- //# debugId=0DCB52DE9DB6EE9D64756E2164756E21
192
+ //# debugId=3287AD727A1EC20664756E2164756E21
@@ -0,0 +1,34 @@
1
+ // @bun
2
+ // ../wp-typia-project-tools/src/runtime/json-utils.ts
3
+ import fs from "fs";
4
+ import { promises as fsp } from "fs";
5
+ function cloneJsonValue(value) {
6
+ return JSON.parse(JSON.stringify(value));
7
+ }
8
+ function formatJsonParseTarget({ context, filePath }) {
9
+ const operation = context?.trim() || "JSON";
10
+ return filePath ? `${operation} at ${filePath}` : operation;
11
+ }
12
+ function safeJsonParse(source, options = {}) {
13
+ try {
14
+ return JSON.parse(source);
15
+ } catch (error) {
16
+ throw new Error(`Failed to parse ${formatJsonParseTarget(options)}: ${error instanceof Error ? error.message : String(error)}`);
17
+ }
18
+ }
19
+ function readJsonFileSync(filePath, options = {}) {
20
+ return safeJsonParse(fs.readFileSync(filePath, "utf8"), {
21
+ ...options,
22
+ filePath
23
+ });
24
+ }
25
+ async function readJsonFile(filePath, options = {}) {
26
+ return safeJsonParse(await fsp.readFile(filePath, "utf8"), {
27
+ ...options,
28
+ filePath
29
+ });
30
+ }
31
+
32
+ export { cloneJsonValue, safeJsonParse, readJsonFileSync, readJsonFile };
33
+
34
+ //# debugId=4CC2BF13AF5DC85A64756E2164756E21
@@ -13,7 +13,7 @@ import {
13
13
  getFailingDoctorChecks,
14
14
  isCliDiagnosticError,
15
15
  serializeCliDiagnosticError
16
- } from "./cli-p95wr1q8.js";
16
+ } from "./cli-tq730sqt.js";
17
17
  import"./cli-xnn9xjcy.js";
18
18
  export {
19
19
  serializeCliDiagnosticError,