clavarium 0.1.3 → 0.1.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/deploy/doctor.mjs +1 -0
- package/deploy/install.sh +10 -0
- package/deploy/updater.mjs +5 -1
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
package/deploy/doctor.mjs
CHANGED
package/deploy/install.sh
CHANGED
|
@@ -705,6 +705,16 @@ TUNNEL
|
|
|
705
705
|
systemctl daemon-reload
|
|
706
706
|
systemctl enable --quiet clavarium-tunnel.service
|
|
707
707
|
systemctl restart clavarium-tunnel.service
|
|
708
|
+
# Caddy asked Let's Encrypt as it started, BEFORE the tunnel was up: it could not
|
|
709
|
+
# be reached, and fell back to a certificate of its own. Asked again once the
|
|
710
|
+
# tunnel holds (ExitOnForwardFailure: an ssh still running after 10 s has its forwards).
|
|
711
|
+
if [ "$RELAY_INSTALLED" = "yes" ]; then
|
|
712
|
+
sleep 10
|
|
713
|
+
if systemctl is-active --quiet clavarium-tunnel.service; then
|
|
714
|
+
rm -rf -- "/var/lib/caddy/caddy/certificates/local/$DOMAIN"
|
|
715
|
+
systemctl restart caddy.service
|
|
716
|
+
fi
|
|
717
|
+
fi
|
|
708
718
|
TUNNEL_KEY="$(cat /var/lib/clavarium-tunnel/key.pub)"
|
|
709
719
|
RELAY_PRINT="$(ssh-keygen -l -f /var/lib/clavarium-tunnel/known_hosts | cut -d' ' -f2 | head -1)"
|
|
710
720
|
fi
|
package/deploy/updater.mjs
CHANGED
|
@@ -595,7 +595,11 @@ async function main(argv) {
|
|
|
595
595
|
switch (verb) {
|
|
596
596
|
case 'check': await u.check().catch(() => {}); return print(u.about());
|
|
597
597
|
case 'status': return print(u.about());
|
|
598
|
-
case 'run': {
|
|
598
|
+
case 'run': {
|
|
599
|
+
/* What this release sets up beside itself (the certificate timer), at its first turn: the
|
|
600
|
+
update that brought it ran the PREVIOUS release's code. Idempotent; never stops the turn. */
|
|
601
|
+
try { const [{ installWatch }, { realSys }] = await Promise.all([import('./doctor.mjs'), import('./online.mjs')]); if (await installWatch(realSys())) console.error('updater: the certificate timer set up'); } catch (error) { console.error(`updater: the certificate timer could not be set up: ${error.message}`); }
|
|
602
|
+
const r = await u.runOnce(); console.log(typeof r === 'string' ? r : 'done'); return; }
|
|
599
603
|
case 'set': if (rest.length !== 2) throw new Refused('set <mode|channel|window|port> <value>'); return print(u.set(rest[0], rest[1]));
|
|
600
604
|
case 'prepare': { const r = await u.prepare({ version: value('--version'), fromDir: value('--from-dir') }); console.log(r.id); return; }
|
|
601
605
|
case 'switch': if (!VERSION.test(rest[0] ?? '') && !LOCAL.test(rest[0] ?? '')) throw new Refused('switch <release>'); u.switchTo(rest[0]); return;
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "clavarium",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "clavarium",
|
|
9
|
-
"version": "0.1.
|
|
9
|
+
"version": "0.1.4",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@xterm/addon-fit": "^0.11.0",
|