clavarium 0.1.0-next.4 → 0.1.0-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/install.sh CHANGED
@@ -661,6 +661,12 @@ if [ -n "$RELAY" ]; then
661
661
  echo
662
662
  echo "ON THE RELAY ($RELAY), run this one command; the tunnel then comes up by itself:"
663
663
  echo " sudo deploy/relay.sh --key \"$TUNNEL_KEY\""
664
+ # A server with a screen and a keyboard only: the key, carried by a phone.
665
+ # It is a PUBLIC key: showing it is safe; it lets the relay know this machine.
666
+ if command -v qrencode >/dev/null 2>&1 || apt-get install -y -qq qrencode >/dev/null 2>&1; then
667
+ echo "The same key, to read with a phone or a tablet:"
668
+ qrencode -t ANSIUTF8 -m 2 -- "$TUNNEL_KEY" || true
669
+ fi
664
670
  echo "It will print this, and it must be the same: $RELAY_PRINT"
665
671
  echo "The name $DOMAIN must lead to the relay."
666
672
  else
@@ -480,7 +480,9 @@ export class Updater {
480
480
  if ((state.history ?? []).some((h) => h.to === available && h.action === 'update' && h.result !== 'done')) return `${available} failed here before: not tried again by itself`;
481
481
  if (this.busy()) return this.busy();
482
482
  await this.apply(available);
483
- return `updated to ${available}`;
483
+ /* What the history says, not what was hoped: a version that did not start was undone. */
484
+ const last = (this.#state().history ?? []).at(-1);
485
+ return last?.to === available && last.result !== 'done' ? `${available} did not work: back to ${last.from ?? 'nothing'} (${last.why ?? last.result})` : `updated to ${available}`;
484
486
  }
485
487
 
486
488
  /* What the host program asked (a request file), or the timer's turn. */
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "clavarium",
3
- "version": "0.1.0-next.4",
3
+ "version": "0.1.0-next.5",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "clavarium",
9
- "version": "0.1.0-next.4",
9
+ "version": "0.1.0-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.1.0-next.4",
3
+ "version": "0.1.0-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.",
package/server/main.mjs CHANGED
@@ -397,8 +397,6 @@ function hostSetting(key) {
397
397
  }
398
398
 
399
399
  if (process.argv[1] === fileURLToPath(import.meta.url)) {
400
- /* DELIBERATELY BROKEN, this version only: it proves an update that does not start is undone by itself. */
401
- console.error('0.1.0-next.4 refuses to start, on purpose: the updater must go back by itself.'); process.exit(70);
402
400
  const argv = process.argv.slice(2);
403
401
  const port = Number(option(argv, 'port', '7717'));
404
402
  const host = option(argv, 'host', '');