@profullstack/qryptchat 0.6.3 → 0.6.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.
package/bin/qc.js CHANGED
@@ -1,14 +1,14 @@
1
1
  #!/usr/bin/env node
2
2
  // qc: qrypt.chat in the terminal. `qc` opens the chat client; `qc --help` lists the rest.
3
3
  import { readFileSync } from 'node:fs';
4
- import { errorLine, main } from '../dist/commands.js';
4
+ import { errorLine, exitWhenFlushed, main } from '../dist/commands.js';
5
5
 
6
6
  const pkg = JSON.parse(readFileSync(new URL('../package.json', import.meta.url), 'utf8'));
7
7
 
8
8
  main(process.argv.slice(2), { version: pkg.version }).then(
9
- () => process.exit(0),
9
+ () => exitWhenFlushed(0),
10
10
  (err) => {
11
11
  process.stderr.write(`${errorLine(err)}\n`);
12
- process.exit(1);
12
+ exitWhenFlushed(1);
13
13
  },
14
14
  );
@@ -1157,6 +1157,12 @@ function who(user, { agent = false } = {}) {
1157
1157
  return `${face}${name}${handle}${pronouns}`;
1158
1158
  }
1159
1159
 
1160
+ // src/cli/exit.js
1161
+ function exitWhenFlushed2(code, { timeoutMs = 30000 } = {}) {
1162
+ setTimeout(() => process.exit(code), timeoutMs);
1163
+ process.stdout.end(() => process.stderr.end(() => process.exit(code)));
1164
+ }
1165
+
1160
1166
  // src/cli/commands.js
1161
1167
  var errorLine2 = (err) => `qc: ${fail(err?.message ?? String(err))}`;
1162
1168
  var HELP2 = `qc: qrypt.chat in your terminal (end-to-end encrypted, ML-KEM-1024)
@@ -1451,4 +1457,4 @@ ${HELP2}`);
1451
1457
  }
1452
1458
  }
1453
1459
 
1454
- export { errorLine2, HELP2, parseArgs2, findChat2, main2 };
1460
+ export { exitWhenFlushed2, errorLine2, HELP2, parseArgs2, findChat2, main2 };
package/dist/commands.js CHANGED
@@ -1,14 +1,16 @@
1
1
  import {
2
+ exitWhenFlushed2,
2
3
  errorLine2,
3
4
  HELP2,
4
5
  parseArgs2,
5
6
  findChat2,
6
7
  main2
7
- } from "./chunk-1htbyjhe.js";
8
+ } from "./chunk-7fw9y4pv.js";
8
9
  import"./chunk-g9xn5036.js";
9
10
  export {
10
11
  HELP2 as HELP,
11
12
  errorLine2 as errorLine,
13
+ exitWhenFlushed2 as exitWhenFlushed,
12
14
  findChat2 as findChat,
13
15
  main2 as main,
14
16
  parseArgs2 as parseArgs
package/dist/mcp.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import"./chunk-g9xn5036.js";
2
2
  import {
3
3
  findChat2
4
- } from "./chunk-1htbyjhe.js";
4
+ } from "./chunk-7fw9y4pv.js";
5
5
 
6
6
  // src/cli/mcp.js
7
7
  import { createInterface } from "node:readline";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@profullstack/qryptchat",
3
- "version": "0.6.3",
3
+ "version": "0.6.4",
4
4
  "description": "qc: qrypt.chat in your terminal. A full-screen end-to-end encrypted chat client (ML-KEM-1024), plus a scriptable CLI and an MCP server.",
5
5
  "type": "module",
6
6
  "bin": {