lapeh 2.4.0 → 2.4.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.
- package/bin/index.js +13 -1
- package/package.json +1 -1
package/bin/index.js
CHANGED
|
@@ -48,7 +48,19 @@ function runDev() {
|
|
|
48
48
|
|
|
49
49
|
// We execute a script that requires ts-node to run lib/bootstrap.ts
|
|
50
50
|
// Use JSON.stringify to properly escape paths for the shell command
|
|
51
|
-
const
|
|
51
|
+
const nodeArgs = `-r ${JSON.stringify(tsNodePath)} -r ${JSON.stringify(tsConfigPathsPath)} ${JSON.stringify(bootstrapPath)}`;
|
|
52
|
+
const isWin = process.platform === 'win32';
|
|
53
|
+
|
|
54
|
+
let cmd;
|
|
55
|
+
if (isWin) {
|
|
56
|
+
// On Windows, escape inner quotes
|
|
57
|
+
const escapedArgs = nodeArgs.replace(/"/g, '\\"');
|
|
58
|
+
cmd = `npx nodemon --watch src --watch lib --ext ts,json --exec "node ${escapedArgs}"`;
|
|
59
|
+
} else {
|
|
60
|
+
// On Linux/Mac, use single quotes for the outer wrapper
|
|
61
|
+
cmd = `npx nodemon --watch src --watch lib --ext ts,json --exec 'node ${nodeArgs}'`;
|
|
62
|
+
}
|
|
63
|
+
|
|
52
64
|
execSync(cmd, { stdio: 'inherit' });
|
|
53
65
|
} catch (error) {
|
|
54
66
|
// Ignore error
|