shoud-cli 3.0.5 → 3.0.7

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/bin/shoud.js CHANGED
@@ -1,4 +1,13 @@
1
1
  #!/usr/bin/env node
2
+ // Force UTF-8 on Windows consoles so box-drawing chars render correctly
3
+ if (process.platform === 'win32') {
4
+ try {
5
+ require('child_process').execSync('chcp 65001 > nul', { stdio: 'ignore' });
6
+ } catch (_) {}
7
+ }
8
+ // Optional: ensure Node's stdout uses UTF-8
9
+ try { process.stdout.setDefaultEncoding('utf8'); } catch (_) {}
10
+
2
11
  const pkg = require('../package.json');
3
12
  const { program } = require('commander');
4
13
  const chalk = require('chalk');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shoud-cli",
3
- "version": "3.0.5",
3
+ "version": "3.0.7",
4
4
  "description": "SHOUD Terminal Agent: Give your computer a job.",
5
5
  "main": "bin/shoud.js",
6
6
  "bin": {
@@ -2,14 +2,13 @@ const { spawn } = require('child_process');
2
2
  const os = require('os');
3
3
 
4
4
  function getShell() {
5
- if (os.platform() === 'win32') return 'powershell.exe';
5
+ if (os.platform() === 'win32') return 'cmd.exe';
6
6
  return process.env.SHELL || '/bin/bash';
7
7
  }
8
8
 
9
9
  function getShellArgs(command) {
10
10
  if (os.platform() === 'win32') {
11
- const escaped = command.replace(/"/g, '`"');
12
- return ['-NoProfile', '-Command', `& { ${escaped} } | Out-String -Width 4096`];
11
+ return ['/d', '/s', '/c', command];
13
12
  }
14
13
  return ['-c', command];
15
14
  }