lapeh 2.3.4 → 2.3.5

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.
Files changed (2) hide show
  1. package/bin/index.js +13 -1
  2. package/package.json +1 -1
package/bin/index.js CHANGED
@@ -54,7 +54,19 @@ function runDev() {
54
54
  // The path contains spaces "TESTING LAPEH". When passed to `exec`, it might be splitting.
55
55
  // We should quote the paths properly.
56
56
 
57
- const cmd = `npx nodemon --watch src --watch lib --ext ts,json --exec "node -r \\"${tsNodePath}\\" -r \\"${tsConfigPathsPath}\\" \\"${bootstrapPath}\\""`;
57
+ // Windows paths with spaces are tricky.
58
+ // We need to use slightly different quoting strategy or use spawn instead of execSync for better argument handling.
59
+ // However, execSync is simpler for now.
60
+
61
+ // Using simple double quotes around the whole argument for node -r might work better if we escape backslashes?
62
+ // Or just ensure paths are quoted.
63
+
64
+ // Let's try to escape backslashes in paths for the string interpolation
65
+ const safeTsNodePath = tsNodePath.replace(/\\/g, '\\\\');
66
+ const safeTsConfigPathsPath = tsConfigPathsPath.replace(/\\/g, '\\\\');
67
+ const safeBootstrapPath = bootstrapPath.replace(/\\/g, '\\\\');
68
+
69
+ const cmd = `npx nodemon --watch src --watch lib --ext ts,json --exec "node -r \\"${safeTsNodePath}\\" -r \\"${safeTsConfigPathsPath}\\" \\"${safeBootstrapPath}\\""`;
58
70
 
59
71
  execSync(cmd, { stdio: 'inherit' });
60
72
  } catch (error) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lapeh",
3
- "version": "2.3.4",
3
+ "version": "2.3.5",
4
4
  "description": "Framework API Express yang siap pakai (Standardized)",
5
5
  "main": "index.js",
6
6
  "bin": {