@or3/cloud 0.1.57 → 0.1.60

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.
@@ -417,6 +417,14 @@ function runProcess(file, args, options) {
417
417
  });
418
418
  }
419
419
 
420
+ function processDiagnostic(result) {
421
+ const output = String(result?.output || '')
422
+ .replaceAll(/(\/\/[^:\s]+:_authToken=)[^\s]+/gi, '$1[redacted]')
423
+ .replaceAll(/https?:\/\/[^@\s]+@/gi, 'https://[redacted]@')
424
+ .trim();
425
+ return output ? output.slice(-2048) : `exit code ${result?.code ?? 'unknown'}`;
426
+ }
427
+
420
428
  export function provenanceStatement(payload, expectedRelease) {
421
429
  if (typeof payload !== 'string' || payload.length > maxAttestationBytes) throw new Error('The OR3 provenance payload is invalid.');
422
430
  let statement;
@@ -567,7 +575,9 @@ async function withVerifiedUpdater(expectedRelease, job, action) {
567
575
  env: updaterEnvironment(installDirectory, job),
568
576
  timeoutMs: 120_000,
569
577
  });
570
- if (installed.code !== 0) throw new Error('The verified updater package could not be installed.');
578
+ if (installed.code !== 0) {
579
+ throw new Error(`The verified updater package could not be installed: ${processDiagnostic(installed)}`);
580
+ }
571
581
  const updater = await verifyInstalledUpdater(installDirectory, expectedRelease, job, provenanceFingerprint);
572
582
  return await action(updater, installDirectory);
573
583
  } finally {
@@ -587,7 +597,9 @@ async function runUpdate(job) {
587
597
  maxOutputBytes: 256 * 1024,
588
598
  timeoutMs: maxUpdateDurationMs,
589
599
  });
590
- if (updated.code !== 0) throw new Error('The managed updater did not complete successfully.');
600
+ if (updated.code !== 0) {
601
+ throw new Error(`The managed updater did not complete successfully: ${processDiagnostic(updated)}`);
602
+ }
591
603
  });
592
604
  }
593
605
 
@@ -600,7 +612,9 @@ async function runRecovery(job) {
600
612
  maxOutputBytes: 256 * 1024,
601
613
  timeoutMs: maxUpdateDurationMs,
602
614
  });
603
- if (recovered.code !== 0) throw new Error('The exact dashboard updater could not recover the interrupted operation.');
615
+ if (recovered.code !== 0) {
616
+ throw new Error(`The exact dashboard updater could not recover the interrupted operation: ${processDiagnostic(recovered)}`);
617
+ }
604
618
  });
605
619
  }
606
620
 
package/dist/cli.mjs CHANGED
@@ -30,7 +30,7 @@ import { fileURLToPath } from "node:url";
30
30
  import { createGunzip } from "node:zlib";
31
31
  var execFile = promisify(execFileCallback);
32
32
  var PACKAGE_ROOT = resolve(fileURLToPath(new URL("../", import.meta.url)));
33
- var PACKAGE_VERSION = "0.1.57";
33
+ var PACKAGE_VERSION = "0.1.60";
34
34
  var IMAGE_REPOSITORY = "ghcr.io/saluana/or3-chat";
35
35
  var ASSET_ROOT = resolve(fileURLToPath(new URL("../assets/", import.meta.url)));
36
36
  var STATE_SCHEMA_VERSION = 1;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@or3/cloud",
3
- "version": "0.1.57",
3
+ "version": "0.1.60",
4
4
  "description": "Install and operate the OR3 Cloud container distribution",
5
5
  "type": "module",
6
6
  "license": "GPL-3.0",
@@ -18,9 +18,9 @@
18
18
  "or3Cloud": {
19
19
  "dashboardUpdateProtocol": 1,
20
20
  "dashboardUpdateMinimumSourceVersion": "0.1.40",
21
- "imageDigest": "sha256:0f493438a906cec53442991a7b63d77166708cb506a37dac10022a0f15dd57d3",
22
- "operatorImageDigest": "sha256:8937743e7fa9648bcae7d4565198a515db67899bfe077c092a4affb6fa2bc75b",
23
- "sourceRevision": "4d3bb9ef8b826a78345a3ceb02ce31157190496d"
21
+ "imageDigest": "sha256:40bfcdc049679d52f7ff82a61253b4f8698816ef85422e114f254a0235a4a1a4",
22
+ "operatorImageDigest": "sha256:b10dc01b6bc37aefffa356d14deb07ed15d76c9fb4befcbe737872dd96464cbe",
23
+ "sourceRevision": "b04a5ff0bf7cdeb7e72f39e191ba8c633a53a789"
24
24
  },
25
25
  "files": [
26
26
  "dist",