@astrale-os/adapter-astrale 0.5.0-beta.183 → 0.5.0-beta.185

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
@@ -74,7 +74,7 @@ The adapter calls the static Methods of `CloudflareService` on Admin's Services
74
74
  `astrale call --admin` (astrale CLI 1.0.0-beta.126 or newer): `CloudflareService.hosting` to read
75
75
  the routing domain, then `CloudflareService.deploy`, a non-durable Action, with the request on
76
76
  stdin; `list` calls `CloudflareService.list` for the project of the Domain's origin. It never calls an instance and never installs the
77
- Domain: install the URL the deploy prints with `astrale domain install <url> --direct -i <instance>`.
77
+ Domain: install the URL the deploy prints with `astrale domain install <url> -i <instance>`.
78
78
 
79
79
  Secrets come from the file `secrets` names. A new deployment binds the file's current values. A
80
80
  redeploy of the same release (same label) reuses its deployment and rewrites that deployment's
@@ -111,8 +111,8 @@ the deployment and may follow effects: a creation that lost its lease after uplo
111
111
  in-place secret rewrite that wrote part of the values. Rerunning the same deploy converges on the
112
112
  same deployment.
113
113
 
114
- The removed instance mode (`instance`, `serviceKey`, `name`, `signingIdentity`) is refused with the
115
- configuration to write instead. A Project Environment that declares `installation` is refused before
114
+ The removed instance mode (`instance`, `serviceKey`, `name`, `signingIdentity`) is refused when the
115
+ Project loads, as unknown parameters. A Project Environment that declares `installation` is refused before
116
116
  any effect, naming the commands that replace it. Iterate with `astrale-domain deploy development`,
117
117
  then install the URL it prints.
118
118
 
@@ -24,8 +24,9 @@ export function runCliProcess(input) {
24
24
  reject(new CliProcessError('spawn', command, undefined, { cause }));
25
25
  return;
26
26
  }
27
- let stdout = '';
28
- let stderr = '';
27
+ // Chunks are decoded once complete: a chunk can end inside a multi-byte UTF-8 character.
28
+ const stdout = [];
29
+ const stderr = [];
29
30
  let stdoutBytes = 0;
30
31
  let stderrBytes = 0;
31
32
  let settled = false;
@@ -61,14 +62,14 @@ export function runCliProcess(input) {
61
62
  if (stdoutBytes > (input.stdoutLimit ?? DEFAULT_LIMIT))
62
63
  terminate('output-limit');
63
64
  else
64
- stdout += chunk.toString('utf8');
65
+ stdout.push(chunk);
65
66
  });
66
67
  child.stderr.on('data', (chunk) => {
67
68
  stderrBytes += chunk.byteLength;
68
69
  if (stderrBytes > (input.stderrLimit ?? DEFAULT_LIMIT))
69
70
  terminate('output-limit');
70
71
  else
71
- stderr += chunk.toString('utf8');
72
+ stderr.push(chunk);
72
73
  });
73
74
  child.once('error', (cause) => fail(terminationKind === undefined
74
75
  ? new CliProcessError('spawn', command, undefined, { cause })
@@ -80,8 +81,8 @@ export function runCliProcess(input) {
80
81
  fail(new CliProcessError(terminationKind, command));
81
82
  return;
82
83
  }
83
- const out = stdout;
84
- const error = stderr;
84
+ const out = Buffer.concat(stdout).toString('utf8');
85
+ const error = Buffer.concat(stderr).toString('utf8');
85
86
  if (code === 0) {
86
87
  finish(() => resolve(Object.freeze({ ok: true, stdout: out })));
87
88
  return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astrale-os/adapter-astrale",
3
- "version": "0.5.0-beta.183",
3
+ "version": "0.5.0-beta.185",
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.190",
45
- "@astrale-os/sdk": "0.6.0-beta.35"
44
+ "@astrale-os/adapter-cloudflare": "0.5.0-beta.192",
45
+ "@astrale-os/sdk": "0.6.0-beta.37"
46
46
  },
47
47
  "devDependencies": {
48
48
  "@astrale-os/ox": "0.1.4",