@or3/cloud 0.1.57 → 0.1.59

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 {
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.59";
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.59",
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:134cc0ca29ae709d6c578f492132256f338e33f5ff0e19d18d061f3cb05e21a8",
22
+ "operatorImageDigest": "sha256:342e7506eab2ff412aed713a0023470d6e95a1ce0927bfa52db857a2646c3f13",
23
+ "sourceRevision": "0c4a6afd44b7e55575be1ec44ffcc1d7d5090061"
24
24
  },
25
25
  "files": [
26
26
  "dist",