@astrale-os/adapter-astrale 0.5.0-beta.176 → 0.5.0-beta.178

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/README.md CHANGED
@@ -61,6 +61,9 @@ as `service-owned-elsewhere`. Give a Service to another owner with its `transfer
61
61
  `admin` names the Admin bookmark of the astrale CLI to deploy through; by default the CLI's
62
62
  configured Admin target.
63
63
 
64
+ Set `ASTRALE_BIN` to an absolute executable path to pin the CLI used for deployments and Services calls. It takes precedence over the recorded installation and `PATH`; an invalid override fails
65
+ with an error. For example: `ASTRALE_BIN=/opt/astrale/bin/astrale astrale-domain deploy qa --as deployer`.
66
+
64
67
  `durable` declares what a Domain serving durable Workflows tells the workflow engine (run
65
68
  retention, retry before pausing, the deadline of each Step). The options are frozen into the
66
69
  deployment's configuration (`settings.durableOptions`), so another value is another deployment,
@@ -3,7 +3,12 @@ import { access, readFile, realpath } from 'node:fs/promises';
3
3
  import { homedir } from 'node:os';
4
4
  import { delimiter, isAbsolute, join } from 'node:path';
5
5
  /** Resolve the exact CLI executable once so a session cannot drift with PATH. */
6
- export async function resolveCliExecutable(input = 'astrale') {
6
+ export async function resolveCliExecutable(input) {
7
+ const override = input === undefined ? process.env.ASTRALE_BIN : undefined;
8
+ if (override !== undefined && !isAbsolute(override)) {
9
+ throw new TypeError('ASTRALE_BIN must name an absolute executable path.');
10
+ }
11
+ input ??= override ?? 'astrale';
7
12
  const candidates = isAbsolute(input) ? [input] : await executableCandidates(input);
8
13
  for (const candidate of candidates) {
9
14
  try {
@@ -14,7 +19,9 @@ export async function resolveCliExecutable(input = 'astrale') {
14
19
  // Continue through the bounded PATH candidate set.
15
20
  }
16
21
  }
17
- throw new TypeError('Astrale CLI is unavailable. Install it with the official Astrale installer.');
22
+ throw new TypeError(override === undefined
23
+ ? 'Astrale CLI is unavailable. Install it with the official Astrale installer.'
24
+ : 'The Astrale CLI configured by ASTRALE_BIN is unavailable or not executable.');
18
25
  }
19
26
  async function executableCandidates(input) {
20
27
  const path = (process.env.PATH ?? '')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astrale-os/adapter-astrale",
3
- "version": "0.5.0-beta.176",
3
+ "version": "0.5.0-beta.178",
4
4
  "description": "Deploy an Astrale domain, or any Cloudflare Worker, as managed deployments through the Astrale platform",
5
5
  "keywords": [
6
6
  "adapter",
@@ -41,8 +41,8 @@
41
41
  "registry": "https://registry.npmjs.org/"
42
42
  },
43
43
  "dependencies": {
44
- "@astrale-os/adapter-cloudflare": "0.5.0-beta.183",
45
- "@astrale-os/sdk": "0.6.0-beta.28"
44
+ "@astrale-os/adapter-cloudflare": "0.5.0-beta.185",
45
+ "@astrale-os/sdk": "0.6.0-beta.30"
46
46
  },
47
47
  "devDependencies": {
48
48
  "@astrale-os/ox": "0.1.4",