flowcollab 0.1.5 → 0.1.8

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/_client.mjs CHANGED
@@ -4,11 +4,25 @@
4
4
  - All CLI scripts import from here
5
5
  */
6
6
 
7
+ import { spawnSync } from 'child_process';
7
8
  import 'dotenv/config';
8
9
  import { homedir } from 'os';
9
10
  import { readFileSync } from 'fs';
10
11
  import { join } from 'path';
11
12
 
13
+ // On Windows, Node's bundled CA store doesn't include certs added by corporate/AV
14
+ // TLS inspection software, causing fetch() to throw "fetch failed". Re-spawn with
15
+ // --use-system-ca so Node trusts the Windows certificate store instead.
16
+ // Requires Node 22+; on older Node the child exits with "bad option" which tells
17
+ // the user to upgrade.
18
+ if (process.platform === 'win32' && !process.execArgv.includes('--use-system-ca')) {
19
+ const r = spawnSync(process.execPath, ['--use-system-ca', ...process.argv.slice(1)], {
20
+ stdio: 'inherit',
21
+ env: process.env,
22
+ });
23
+ process.exit(r.status ?? 1);
24
+ }
25
+
12
26
  function loadGlobalConfig() {
13
27
  try { return JSON.parse(readFileSync(join(homedir(), '.flow', 'config.json'), 'utf8')); }
14
28
  catch { return {}; }
package/bin/login.mjs CHANGED
@@ -57,6 +57,10 @@ async function main() {
57
57
  );
58
58
  }
59
59
  if (poll.status === 202) continue;
60
+ if (!poll.ok) {
61
+ process.stdout.write('\n');
62
+ throw new Error(`Unexpected server response: ${poll.status}. Run flow-login again.`);
63
+ }
60
64
  if (poll.ok) {
61
65
  const { token, actor_id, org_id, api_base } = await poll.json();
62
66
  const dir = join(homedir(), '.flow');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flowcollab",
3
- "version": "0.1.5",
3
+ "version": "0.1.8",
4
4
  "description": "Multi-Claude coordination layer — shared task board + CLI for teams running Claude Code",
5
5
  "type": "module",
6
6
  "files": [