@theappagency/valinor 8.6.0 → 8.8.0

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.
Files changed (2) hide show
  1. package/lib/launcher.js +28 -2
  2. package/package.json +1 -1
package/lib/launcher.js CHANGED
@@ -19,8 +19,32 @@ import { homedir } from "node:os";
19
19
  import { join } from "node:path";
20
20
  import { fileURLToPath } from "node:url";
21
21
 
22
+ /**
23
+ * THE DOWNLOAD HOST — MIRRORS src/launcherBundle/resolveSha.ts (the launcher is a zero-dependency
24
+ * standalone package published to a different registry and cannot import across the `src` boundary;
25
+ * `src/launcherBundle/downloadsHostMirror.test.ts` asserts the two sides byte-match, so the mirror is
26
+ * gate-enforced rather than remembered).
27
+ *
28
+ * CANONICAL is where the endpoint is moving; LEGACY is what already-published launcher versions — and
29
+ * every already-pinned consumer workflow — carry. A PUBLISHED launcher is immutable: an npm version
30
+ * already on disk in someone's CI keeps requesting whatever host it shipped with, forever. That is
31
+ * why LEGACY keeps resolving indefinitely, and why flipping DEFAULT only affects launcher versions
32
+ * published AFTER the flip.
33
+ */
34
+ export const CANONICAL_DOWNLOADS_HOST = "downloads.theappagency.com";
35
+
36
+ /** The host already-published launcher versions request. Kept serving indefinitely. */
37
+ export const LEGACY_DOWNLOADS_HOST = "downloads.valinorci.com";
38
+
39
+ /**
40
+ * The host THIS launcher version requests when VALINOR_DOWNLOADS_URL is unset.
41
+ * ⚠️ THE FLIP: change to `CANONICAL_DOWNLOADS_HOST` at cutover step 6, in lockstep with the CLI-side
42
+ * constant. It is LEGACY today because the canonical host does not resolve yet.
43
+ */
44
+ export const DEFAULT_DOWNLOADS_HOST = LEGACY_DOWNLOADS_HOST;
45
+
22
46
  /** The production downloads endpoint (override with VALINOR_DOWNLOADS_URL — staging/fixtures/tests). */
23
- export const DEFAULT_DOWNLOADS_URL = "https://downloads.valinorci.com";
47
+ export const DEFAULT_DOWNLOADS_URL = `https://${DEFAULT_DOWNLOADS_HOST}`;
24
48
 
25
49
  const SEMVER_RE = /^\d+\.\d+\.\d+(-[0-9A-Za-z.-]+)?$/;
26
50
 
@@ -253,5 +277,7 @@ function offlineHint(base, root) {
253
277
  cached.length > 0
254
278
  ? `Cached versions available OFFLINE at ${root}: ${cached.join(", ")} — pin one to run without the network (e.g. VALINOR_VERSION=${cached[cached.length - 1]} or npx @theappagency/valinor@${cached[cached.length - 1]}).`
255
279
  : `No versions are cached locally at ${root}, so nothing can run offline.`;
256
- return `The Valinor downloads endpoint (${base}) is unreachable or missing the requested artifact.\n${cacheLine}\nIf this persists, check https://downloads.valinorci.com and your network/proxy configuration.`;
280
+ // Name the base the run ACTUALLY used, not a second hard-coded host: if the endpoint moved and this
281
+ // launcher is pinned to the old one, the useful diagnostic is the host it just failed to reach.
282
+ return `The Valinor downloads endpoint (${base}) is unreachable or missing the requested artifact.\n${cacheLine}\nIf this persists, check ${base} and your network/proxy configuration.`;
257
283
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theappagency/valinor",
3
- "version": "8.6.0",
3
+ "version": "8.8.0",
4
4
  "description": "Public launcher for the Valinor CLI — fetches, SHA-256-verifies, caches, and runs the proprietary Valinor bundle from downloads.valinorci.com. Zero setup, zero secrets, zero npm auth.",
5
5
  "repository": {
6
6
  "type": "git",