@korajs/cli 0.1.2 → 0.1.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.
- 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/create.cjs.map +1 -1
- package/dist/create.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-2YBUSQ7D.js.map +0 -1
package/dist/bin.js
CHANGED
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
findSchemaFile,
|
|
7
7
|
promptConfirm,
|
|
8
8
|
resolveProjectBinary
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-BVPZDTYV.js";
|
|
10
10
|
import {
|
|
11
11
|
generateTypes
|
|
12
12
|
} from "./chunk-N36PFOSA.js";
|
|
@@ -120,16 +120,18 @@ function toConfigObject(mod) {
|
|
|
120
120
|
}
|
|
121
121
|
|
|
122
122
|
// src/commands/dev/process-manager.ts
|
|
123
|
-
import { spawn as
|
|
123
|
+
import { spawn as spawnChild } from "child_process";
|
|
124
124
|
var ProcessManager = class {
|
|
125
125
|
processes = /* @__PURE__ */ new Map();
|
|
126
126
|
spawn(config) {
|
|
127
127
|
const options = {
|
|
128
128
|
cwd: config.cwd,
|
|
129
129
|
env: { ...process.env, ...config.env },
|
|
130
|
-
stdio: ["ignore", "pipe", "pipe"]
|
|
130
|
+
stdio: ["ignore", "pipe", "pipe"],
|
|
131
|
+
// On Windows, .cmd shims require shell to execute
|
|
132
|
+
shell: process.platform === "win32"
|
|
131
133
|
};
|
|
132
|
-
const child =
|
|
134
|
+
const child = spawnChild(config.command, config.args, options);
|
|
133
135
|
let resolveExit;
|
|
134
136
|
const runningProcess = {
|
|
135
137
|
child,
|
|
@@ -207,7 +209,7 @@ function delay(ms) {
|
|
|
207
209
|
}
|
|
208
210
|
|
|
209
211
|
// src/commands/dev/schema-watcher.ts
|
|
210
|
-
import { spawn as
|
|
212
|
+
import { spawn as spawn2 } from "child_process";
|
|
211
213
|
import { watch } from "fs";
|
|
212
214
|
var SchemaWatcher = class {
|
|
213
215
|
constructor(config) {
|
|
@@ -263,7 +265,7 @@ var SchemaWatcher = class {
|
|
|
263
265
|
};
|
|
264
266
|
async function spawnCommand(command, args, cwd) {
|
|
265
267
|
await new Promise((resolve4, reject) => {
|
|
266
|
-
const child =
|
|
268
|
+
const child = spawn2(command, args, {
|
|
267
269
|
cwd,
|
|
268
270
|
stdio: ["ignore", "pipe", "pipe"],
|
|
269
271
|
env: process.env
|
|
@@ -357,7 +359,7 @@ var devCommand = defineCommand({
|
|
|
357
359
|
}
|
|
358
360
|
if (shouldStartSync && syncServerFile === null && managedSyncStore) {
|
|
359
361
|
const hasServerPackage = await fileExists(
|
|
360
|
-
join2(projectRoot, "node_modules", "@
|
|
362
|
+
join2(projectRoot, "node_modules", "@korajs", "server", "package.json")
|
|
361
363
|
);
|
|
362
364
|
if (!hasServerPackage) {
|
|
363
365
|
logger.warn(
|
|
@@ -1229,7 +1231,7 @@ async function loadPostgresModule() {
|
|
|
1229
1231
|
}
|
|
1230
1232
|
|
|
1231
1233
|
// src/commands/migrate/schema-loader.ts
|
|
1232
|
-
import { spawn as
|
|
1234
|
+
import { spawn as spawn3 } from "child_process";
|
|
1233
1235
|
import { extname as extname2 } from "path";
|
|
1234
1236
|
import { pathToFileURL as pathToFileURL2 } from "url";
|
|
1235
1237
|
async function loadSchemaDefinition(schemaPath, projectRoot) {
|
|
@@ -1276,7 +1278,7 @@ async function loadTypeScriptModule(schemaPath, projectRoot) {
|
|
|
1276
1278
|
}
|
|
1277
1279
|
async function runCommand2(command, args, cwd) {
|
|
1278
1280
|
return await new Promise((resolve4, reject) => {
|
|
1279
|
-
const child =
|
|
1281
|
+
const child = spawn3(command, args, {
|
|
1280
1282
|
cwd,
|
|
1281
1283
|
stdio: ["ignore", "pipe", "pipe"],
|
|
1282
1284
|
env: process.env
|