wp-typia 0.22.2 → 0.22.4

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.
@@ -1,4 +1,8 @@
1
1
  // @bun
2
+ import {
3
+ parsePackageManagerField
4
+ } from "./cli-6bhfzq5e.js";
5
+
2
6
  // ../wp-typia-project-tools/src/runtime/workspace-project.ts
3
7
  import fs from "fs";
4
8
  import path from "path";
@@ -56,16 +60,7 @@ function getInvalidWorkspaceProjectReason(startDir) {
56
60
  return null;
57
61
  }
58
62
  function parseWorkspacePackageManagerId(packageManagerField) {
59
- const packageManagerId = packageManagerField?.split("@", 1)[0];
60
- switch (packageManagerId) {
61
- case "bun":
62
- case "npm":
63
- case "pnpm":
64
- case "yarn":
65
- return packageManagerId;
66
- default:
67
- return "npm";
68
- }
63
+ return parsePackageManagerField(packageManagerField) ?? "npm";
69
64
  }
70
65
  function tryResolveWorkspaceProject(startDir) {
71
66
  let currentDir = path.resolve(startDir);
@@ -107,4 +102,4 @@ function resolveWorkspaceProject(startDir) {
107
102
 
108
103
  export { WORKSPACE_TEMPLATE_PACKAGE, parseWorkspacePackageJson, getInvalidWorkspaceProjectReason, parseWorkspacePackageManagerId, tryResolveWorkspaceProject, resolveWorkspaceProject };
109
104
 
110
- //# debugId=399A269701638C0F64756E2164756E21
105
+ //# debugId=79A99E0E108D7B5E64756E2164756E21