clavarium 0.2.18-next.4 → 0.2.18-next.5

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/deploy/online.mjs CHANGED
@@ -204,7 +204,8 @@ export async function keepRelayCurrent(sys, P = PATHS, { done, unit = TUNNEL_UNI
204
204
  if (last === version) return { state: 'current', version };
205
205
  const r = await keeper(sys, P, conf, ['update-relay', version]);
206
206
  if (r.code !== 0) {
207
- const said = `${r.stderr ?? ''}${r.stdout ?? ''}`;
207
+ /* sys.run says { code, out, err } (realSys). */
208
+ const said = `${r.err ?? ''}${r.out ?? ''}`;
208
209
  if (/Permission denied|Host key verification failed|REMOTE HOST IDENTIFICATION/i.test(said)) return { state: 'refused', version, why: 'the relay does not take this server\'s maintenance key' };
209
210
  return { state: 'failed', version, why: `the relay did not take ${version} (exit ${r.code})` };
210
211
  }
@@ -52,6 +52,9 @@ import { readFileSync, writeFileSync, renameSync, mkdirSync, rmSync, readdirSync
52
52
  import { dirname, join, basename } from 'node:path';
53
53
  import { fileURLToPath } from 'node:url';
54
54
  import { fetchParleyArchive, REGISTRY } from './parley-archive.mjs';
55
+ import { ensureTunnel, tunnelUnit, relayOfUnit, TUNNEL_UNIT, TUNNEL_PROGRAM } from './tunnel.mjs';
56
+ /* The updater's run keeps the tunnel up to date: the same functions, from here too. */
57
+ export { ensureTunnel, tunnelUnit, relayOfUnit, TUNNEL_UNIT, TUNNEL_PROGRAM };
55
58
 
56
59
  export const PATHS = { code: '/opt/clavarium', conf: '/etc/clavarium/update.conf', stateDir: '/var/lib/clavarium/update', data: '/home/clavarium', host: '/usr/local/sbin/clavarium-host', gitRead: '/usr/lib/clavarium/git-read', tunnel: '/usr/local/sbin/clavarium-tunnel' };
57
60
  export const NAME = 'clavarium';
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "clavarium",
3
- "version": "0.2.18-next.4",
3
+ "version": "0.2.18-next.5",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "clavarium",
9
- "version": "0.2.18-next.4",
9
+ "version": "0.2.18-next.5",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
12
  "@xterm/addon-fit": "^0.11.0",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clavarium",
3
- "version": "0.2.18-next.4",
3
+ "version": "0.2.18-next.5",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "description": "A conversation is a VM with a terminal in it. Everything else is a folder.",