@gakim-digital/dexter-bridge 0.5.11 → 0.5.12

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/package.json +5 -2
  2. package/src/agent.js +3 -15
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gakim-digital/dexter-bridge",
3
- "version": "0.5.11",
3
+ "version": "0.5.12",
4
4
  "description": "Local Companion bridge for the Dexter Framer plugin — runs Codex or Claude Code on your machine.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -29,5 +29,8 @@
29
29
  "publishConfig": {
30
30
  "access": "public"
31
31
  },
32
- "license": "SEE LICENSE IN LICENSE"
32
+ "license": "SEE LICENSE IN LICENSE",
33
+ "dependencies": {
34
+ "cross-spawn": "^7.0.6"
35
+ }
33
36
  }
package/src/agent.js CHANGED
@@ -1,7 +1,8 @@
1
- import { execFileSync, spawn } from 'node:child_process';
1
+ import { execFileSync } from 'node:child_process';
2
2
  import fs from 'node:fs';
3
3
  import os from 'node:os';
4
4
  import path from 'node:path';
5
+ import crossSpawn from 'cross-spawn';
5
6
  import { postRunEvent } from './api.js';
6
7
  import { createCompanionUsageAccumulator, parseAgentOutput } from './agentOutput.js';
7
8
  import {
@@ -643,21 +644,8 @@ export function selectAgentRuntime(inspections, definition, modelDefinition) {
643
644
  };
644
645
  }
645
646
 
646
- function quoteWindowsCommandArg(value) {
647
- return `"${String(value).replace(/%/g, '%%').replace(/(["^&|<>])/g, '^$1')}"`;
648
- }
649
-
650
647
  export function processInvocation(command, args, env = process.env, platform = process.platform) {
651
648
  const resolvedCommand = resolveExecutableCommand(command, env, platform);
652
- if (platform === 'win32' && /\.(cmd|bat)$/i.test(resolvedCommand)) {
653
- const commandLine = [resolvedCommand, ...args].map(quoteWindowsCommandArg).join(' ');
654
- return {
655
- command: env.ComSpec || env.COMSPEC || 'cmd.exe',
656
- args: ['/d', '/s', '/c', commandLine],
657
- resolvedCommand,
658
- windowsHide: true,
659
- };
660
- }
661
649
  return { command: resolvedCommand, args, resolvedCommand, windowsHide: platform === 'win32' };
662
650
  }
663
651
 
@@ -738,7 +726,7 @@ function runProcess(command, args, stdin, {
738
726
  timeoutMs,
739
727
  maxDurationMs: hardDeadlineMs,
740
728
  });
741
- const child = spawn(invocation.command, invocation.args, {
729
+ const child = crossSpawn(invocation.command, invocation.args, {
742
730
  stdio: ['pipe', 'pipe', 'pipe'],
743
731
  env: childEnv,
744
732
  cwd,