@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.js CHANGED
@@ -6,7 +6,7 @@ import {
6
6
  findSchemaFile,
7
7
  promptConfirm,
8
8
  resolveProjectBinary
9
- } from "./chunk-2YBUSQ7D.js";
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 spawn2 } from "child_process";
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 = spawn2(config.command, config.args, options);
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 spawn3 } from "child_process";
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 = spawn3(command, args, {
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", "@kora", "server", "package.json")
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 spawn4 } from "child_process";
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 = spawn4(command, args, {
1281
+ const child = spawn3(command, args, {
1280
1282
  cwd,
1281
1283
  stdio: ["ignore", "pipe", "pipe"],
1282
1284
  env: process.env