@korajs/cli 0.1.2 → 0.1.3
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/dist/bin.cjs +13 -8
- package/dist/bin.cjs.map +1 -1
- package/dist/bin.js +11 -9
- package/dist/bin.js.map +1 -1
- package/dist/{chunk-2YBUSQ7D.js → chunk-BVPZDTYV.js} +10 -7
- package/dist/chunk-BVPZDTYV.js.map +1 -0
- package/dist/chunk-N36PFOSA.js +0 -0
- package/dist/chunk-ZVB4HAB3.js +0 -0
- package/dist/create.cjs.map +1 -1
- package/dist/create.js +1 -1
- package/dist/index.js +0 -0
- package/package.json +13 -13
- package/dist/chunk-2YBUSQ7D.js.map +0 -1
package/dist/bin.cjs
CHANGED
|
@@ -147,13 +147,16 @@ async function findSchemaFile(projectRoot) {
|
|
|
147
147
|
return null;
|
|
148
148
|
}
|
|
149
149
|
async function resolveProjectBinary(projectRoot, binaryName) {
|
|
150
|
-
const
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
150
|
+
const binDir = (0, import_node_path.join)(projectRoot, "node_modules", ".bin");
|
|
151
|
+
const candidates = process.platform === "win32" ? [(0, import_node_path.join)(binDir, `${binaryName}.cmd`), (0, import_node_path.join)(binDir, binaryName)] : [(0, import_node_path.join)(binDir, binaryName)];
|
|
152
|
+
for (const candidate of candidates) {
|
|
153
|
+
try {
|
|
154
|
+
await (0, import_promises.access)(candidate);
|
|
155
|
+
return candidate;
|
|
156
|
+
} catch {
|
|
157
|
+
}
|
|
156
158
|
}
|
|
159
|
+
return null;
|
|
157
160
|
}
|
|
158
161
|
function isKoraProject(pkg) {
|
|
159
162
|
if (typeof pkg !== "object" || pkg === null) return false;
|
|
@@ -574,7 +577,9 @@ var ProcessManager = class {
|
|
|
574
577
|
const options = {
|
|
575
578
|
cwd: config.cwd,
|
|
576
579
|
env: { ...process.env, ...config.env },
|
|
577
|
-
stdio: ["ignore", "pipe", "pipe"]
|
|
580
|
+
stdio: ["ignore", "pipe", "pipe"],
|
|
581
|
+
// On Windows, .cmd shims require shell to execute
|
|
582
|
+
shell: process.platform === "win32"
|
|
578
583
|
};
|
|
579
584
|
const child = (0, import_node_child_process4.spawn)(config.command, config.args, options);
|
|
580
585
|
let resolveExit;
|
|
@@ -804,7 +809,7 @@ var devCommand = (0, import_citty2.defineCommand)({
|
|
|
804
809
|
}
|
|
805
810
|
if (shouldStartSync && syncServerFile === null && managedSyncStore) {
|
|
806
811
|
const hasServerPackage = await fileExists(
|
|
807
|
-
(0, import_node_path5.join)(projectRoot, "node_modules", "@
|
|
812
|
+
(0, import_node_path5.join)(projectRoot, "node_modules", "@korajs", "server", "package.json")
|
|
808
813
|
);
|
|
809
814
|
if (!hasServerPackage) {
|
|
810
815
|
logger.warn(
|