@streamapp/stream 0.0.3 → 0.0.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.
@@ -218711,9 +218711,15 @@ function envWithBundledNode(env = process.env, execPath = process.execPath, sep4
218711
218711
  const current = env.PATH ?? env.Path ?? "";
218712
218712
  return { ...env, PATH: current ? `${dir}${sep4}${current}` : dir };
218713
218713
  }
218714
- function resolveNpmCommand(baseDir = dirname28(fileURLToPath2(import.meta.url)), exists = existsSync18, execPath = process.execPath) {
218714
+ function resolveNpmCommand(baseDir = dirname28(fileURLToPath2(import.meta.url)), exists = existsSync18, execPath = process.execPath, platform = process.platform) {
218715
218715
  const cli = join36(baseDir, "npm", "bin", "npm-cli.js");
218716
218716
  if (exists(cli)) return { cmd: execPath, prefixArgs: [cli], bundled: true };
218717
+ if (platform === "win32") {
218718
+ const cut = Math.max(execPath.lastIndexOf("/"), execPath.lastIndexOf("\\"));
218719
+ const nodeDir = cut > 0 ? execPath.slice(0, cut) : dirname28(execPath);
218720
+ const cli2 = join36(nodeDir, "node_modules", "npm", "bin", "npm-cli.js");
218721
+ if (exists(cli2)) return { cmd: execPath, prefixArgs: [cli2], bundled: false };
218722
+ }
218717
218723
  return { cmd: "npm", prefixArgs: [], bundled: false };
218718
218724
  }
218719
218725
 
@@ -219173,6 +219179,10 @@ var DshWorkbench = class {
219173
219179
  child.stdout?.on("data", (chunk) => {
219174
219180
  tail2 = `${tail2}${String(chunk)}`.slice(-4e3);
219175
219181
  });
219182
+ child.on("error", (e) => {
219183
+ const msg2 = e instanceof Error ? e.message : String(e);
219184
+ reject2(new Error(`\u8D77\u4E0D\u6765 ${cmd}\uFF08${msg2}\uFF09\u2014\u2014\u8FD9\u53F0\u673A\u5668\u4E0A\u627E\u4E0D\u5230\u5B83\u3002${tail2.trim()}`));
219185
+ });
219176
219186
  child.on("exit", (code) => {
219177
219187
  if (code === 0) resolve9();
219178
219188
  else reject2(new Error(`${cmd} ${args.join(" ")} exited with ${code}