4bnode 4.0.2 → 4.0.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/add-serialport.js CHANGED
@@ -18,7 +18,7 @@ async function main() {
18
18
 
19
19
  const serialPortPath = await input({
20
20
  message: "Serial port path:",
21
- default: "/dev/tty-usbserial1",
21
+ default: process.platform === "win32" ? "COM3" : "/dev/tty-usbserial1",
22
22
  });
23
23
 
24
24
  const baudRate = await input({
package/index.js CHANGED
@@ -107,7 +107,7 @@ async function createSkeletonApp(projectName) {
107
107
 
108
108
  const installSpinner = createSpinner("Installing dependencies...");
109
109
  installSpinner.start();
110
- execFileSync("npm", ["install"], { stdio: "pipe", cwd: targetPath });
110
+ execFileSync("npm", ["install"], { stdio: "pipe", cwd: targetPath, shell: true });
111
111
  installSpinner.succeed(chalk.hex("#00f260").bold("Dependencies installed"));
112
112
 
113
113
  showSuccess([
@@ -125,6 +125,7 @@ async function createSkeletonApp(projectName) {
125
125
  function runCommand(script, args = []) {
126
126
  execFileSync("node", [path.join(__dirname, script), ...args], {
127
127
  stdio: "inherit",
128
+ shell: true,
128
129
  });
129
130
  }
130
131
 
@@ -371,6 +372,7 @@ async function main() {
371
372
  execFileSync("npm", ["run", "dev"], {
372
373
  stdio: "inherit",
373
374
  cwd: projectRoot,
375
+ shell: true,
374
376
  });
375
377
  }
376
378
  // Legacy commands → route through handleAdd
package/lib/ui.js CHANGED
@@ -140,6 +140,7 @@ export async function installDeps(packages, opts = {}) {
140
140
  execSync(`npm install ${names.join(" ")}`, {
141
141
  stdio: "pipe",
142
142
  ...opts,
143
+ shell: true,
143
144
  });
144
145
  spinner.succeed(success(`Installed ${label}`));
145
146
  } catch (e) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "4bnode",
3
- "version": "4.0.2",
3
+ "version": "4.0.3",
4
4
  "description": "A professional tool to generate a Node.js app by 4Brains Technologies",
5
5
  "main": "index.js",
6
6
  "type": "module",