extension-create 3.3.3-next.18 → 3.3.3-next.19

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/dist/module.js +28 -1
  2. package/package.json +1 -1
package/dist/module.js CHANGED
@@ -463,6 +463,32 @@ function getInstallArgs() {
463
463
  '--silent'
464
464
  ];
465
465
  }
466
+ function resolveWindowsCmdExe() {
467
+ const comspec = process.env.ComSpec;
468
+ if (comspec) return comspec;
469
+ const systemRoot = process.env.SystemRoot || 'C:\\Windows';
470
+ return external_path_namespaceObject.join(systemRoot, 'System32', 'cmd.exe');
471
+ }
472
+ function formatCmdArgs(command, args) {
473
+ const quotedCommand = command.includes(' ') ? `"${command}"` : command;
474
+ const quotedArgs = args.map((arg)=>arg.includes(' ') ? `"${arg}"` : arg);
475
+ return `${quotedCommand} ${quotedArgs.join(' ')}`.trim();
476
+ }
477
+ function resolveInstallInvocation(command, args) {
478
+ if ('win32' !== process.platform) return {
479
+ command,
480
+ args
481
+ };
482
+ return {
483
+ command: resolveWindowsCmdExe(),
484
+ args: [
485
+ '/d',
486
+ '/s',
487
+ '/c',
488
+ formatCmdArgs(command, args)
489
+ ]
490
+ };
491
+ }
466
492
  function getTagFallback(version) {
467
493
  if ('*' === version || 'latest' === version || 'next' === version) return null;
468
494
  const cleaned = version.replace(/^[~^]/, '');
@@ -493,7 +519,8 @@ function shouldRetryWithTagFallback(output) {
493
519
  return text.includes('no matching version found for extension@') || text.includes('notarget') || text.includes('etarget');
494
520
  }
495
521
  async function runInstall(command, args, cwd, stdio) {
496
- const child = (0, external_cross_spawn_namespaceObject.spawn)(command, args, {
522
+ const invocation = resolveInstallInvocation(command, args);
523
+ const child = (0, external_cross_spawn_namespaceObject.spawn)(invocation.command, invocation.args, {
497
524
  stdio,
498
525
  cwd
499
526
  });
package/package.json CHANGED
@@ -22,7 +22,7 @@
22
22
  "dist"
23
23
  ],
24
24
  "name": "extension-create",
25
- "version": "3.3.3-next.18",
25
+ "version": "3.3.3-next.19",
26
26
  "description": "The standalone extension creation engine for Extension.js",
27
27
  "author": {
28
28
  "name": "Cezar Augusto",