clavarium 0.2.30 → 0.2.31-next.1

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.
@@ -65,7 +65,10 @@ export const REPOS = { clavarium: 'https://github.com/clavarium/clavarium', 'cla
65
65
  export const VERSION = /^\d{1,4}\.\d{1,4}\.\d{1,6}(-[0-9A-Za-z.-]{1,40})?$/;
66
66
  export const LOCAL = /^local-\d{8}-\d{6}$/;
67
67
  export const MODES = ['auto', 'asap', 'ask', 'off'];
68
- export const CHANNELS = ['latest', 'next'];
68
+ /* The update channels, least stable to most: `next` (what I push and test on test-c), `beta` (an
69
+ infrastructure runs it: proven by the tests, a few small things left), `latest` (the public stable).
70
+ Code flows next -> beta -> latest. */
71
+ export const CHANNELS = ['next', 'beta', 'latest'];
69
72
  export const WINDOW = /^([01]\d|2[0-3]):[0-5]\d-([01]\d|2[0-3]):[0-5]\d$/;
70
73
  export const DEFAULTS = { MODE: 'auto', CHANNEL: 'latest', WINDOW: '02:00-05:00', PORT: '7717' };
71
74
  /* A conversation in one of these phases is in the middle of something the restart would cut. */
@@ -345,7 +348,10 @@ export class Updater {
345
348
  const p = await this.#packument(NAME);
346
349
  const tags = p['dist-tags'] ?? {};
347
350
  let candidate = tags.latest;
351
+ /* A channel also sees a newer stable (a jump forward is never a downgrade); it never
352
+ reaches for a less stable channel's tag. */
348
353
  if (conf.CHANNEL === 'next' && tags.next && (!candidate || compareVersions(tags.next, candidate) > 0)) candidate = tags.next;
354
+ if (conf.CHANNEL === 'beta' && tags.beta && (!candidate || compareVersions(tags.beta, candidate) > 0)) candidate = tags.beta;
349
355
  if (candidate && (!VERSION.test(candidate) || !p.versions?.[candidate])) candidate = undefined;
350
356
  const available = candidate && (!current || compareVersions(candidate, current.version) > 0) ? candidate : null;
351
357
  this.#save({ checkedAt: this.#o.now().toISOString(), available, checkError: null });
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "clavarium",
3
- "version": "0.2.30",
3
+ "version": "0.2.31-next.1",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "clavarium",
9
- "version": "0.2.30",
9
+ "version": "0.2.31-next.1",
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.30",
3
+ "version": "0.2.31-next.1",
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.",
@@ -25,7 +25,7 @@ import { compareVersions, inWindow } from '../deploy/updater.mjs';
25
25
  export const STATE_FILE = '/var/lib/clavarium/update/state.json';
26
26
  export const CONF_FILE = '/etc/clavarium/update.conf';
27
27
  export const MODES = ['auto', 'asap', 'ask', 'off'];
28
- export const CHANNELS = ['latest', 'next'];
28
+ export const CHANNELS = ['latest', 'beta', 'next'];
29
29
  const VERSION = /^\d{1,4}\.\d{1,4}\.\d{1,6}(-[0-9A-Za-z.-]{1,40})?$/;
30
30
  const LOCAL = /^local-\d{8}-\d{6}$/;
31
31
  const WINDOW = /^([01]\d|2[0-3]):[0-5]\d-([01]\d|2[0-3]):[0-5]\d$/;
package/web/index.html CHANGED
@@ -714,7 +714,7 @@
714
714
  <div id="updates-settings" class="set-rows">
715
715
  <div class="set-row"><div class="set-what"><label for="updates-mode">Mode</label><small>When updates are installed</small></div><div class="set-control"><select id="updates-mode"><option value="auto">Automatic, in a window</option><option value="asap">As soon as out</option><option value="ask">Ask me</option><option value="off">Off</option></select></div></div>
716
716
  <div class="set-row" id="updates-window-row"><div class="set-what"><label for="updates-from" id="updates-window-label">Window</label><small>Hours when it may restart</small></div><div class="set-control"><span id="updates-window" class="updates-window"><input type="time" id="updates-from" aria-label="From"><span aria-hidden="true">to</span><input type="time" id="updates-to" aria-label="To"></span></div></div>
717
- <div class="set-row"><div class="set-what"><label for="updates-channel">Channel</label><small>Stable, or test versions</small></div><div class="set-control"><select id="updates-channel"><option value="latest">Stable</option><option value="next">Next (test versions)</option></select></div></div>
717
+ <div class="set-row"><div class="set-what"><label for="updates-channel">Channel</label><small>Stable, or earlier builds</small></div><div class="set-control"><select id="updates-channel"><option value="next">Next (earliest tests)</option><option value="beta">Beta (nearly ready)</option><option value="latest">Stable</option></select></div></div>
718
718
  <!-- What the front serves to a browser (server/certificate.mjs). -->
719
719
  <div class="set-row" id="updates-certificate-row" hidden><div class="set-what"><span>Certificate</span><small id="updates-certificate" role="status"></small></div></div>
720
720
  </div>