redkite 0.1.10 → 0.1.12

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
@@ -185,6 +185,9 @@ Selected on the command line and threaded into every derived name.
185
185
  | `host.bastion` | `user@address` of the deploy host. Absent means this machine |
186
186
  | `extraHosts` | Hostname to address, added to every container beside the derived ones |
187
187
  | `buildOn` | `"host"` by default. `"local"` compiles here and ships the image |
188
+ | `secrets` | App name to the items this environment reads, after the app's own |
189
+ | `files` | App name to container path to item, laid over the app's own files |
190
+ | `steps` | Steps for this environment alone, replacing the deployment's at the same point |
188
191
 
189
192
  Images are built on the deploy host, which is where they are needed and costs
190
193
  nothing to move them. A host too small to compile on can be told otherwise:
@@ -204,6 +207,70 @@ since there would be nothing to move.
204
207
  a managed database, a legacy service, anything whose address is the thing that
205
208
  differs between staging and production.
206
209
 
210
+ #### Secrets that differ between environments
211
+
212
+ Staging and production usually read the same variables from different items. The
213
+ item is named in the environment's file, beside everything else that differs,
214
+ keyed by the app it belongs to:
215
+
216
+ ```ts
217
+ // redkite.production.config.ts
218
+ export default defineEnvironment({
219
+ branch: "main",
220
+ subnet: "10.20.0",
221
+ publicPort: 80,
222
+ host: { bastion: "deploy@acme.example" },
223
+
224
+ secrets: {
225
+ frontend: bitwarden.item("..."),
226
+ backend: bitwarden.item("..."),
227
+ },
228
+
229
+ files: {
230
+ backend: { "/app/service-account.json": bitwarden.item("...") },
231
+ },
232
+ });
233
+ ```
234
+
235
+ An environment's refs are read after the app's own, and refs merge in order with
236
+ the later key winning. So the deployment can hold what every environment shares,
237
+ or nothing at all, and each environment lays its own item over it. `files` merge
238
+ by path: a path the environment names replaces the app's, and every other file
239
+ stays.
240
+
241
+ An environment file does not import the deployment, so an app name in it cannot
242
+ be checked when it compiles. One that names no app is refused when the run
243
+ starts, before a connection or a vault is opened, and `plan` refuses it too.
244
+
245
+ The ids are pointers, not credentials. What keeps staging from reading
246
+ production is the token: give each environment its own `BW_KEY` in
247
+ `.env.<environment>.deploy`, or its own GitHub environment in CI, scoped in
248
+ Secrets Manager to that environment's project.
249
+
250
+ #### Steps that differ between environments
251
+
252
+ A migration that reaches a managed database from the host in production and a
253
+ service on the deployment network in staging is the same step with different
254
+ settings. The deployment holds the one most environments share, and an
255
+ environment that differs puts its own at the same point:
256
+
257
+ ```ts
258
+ // redkite.config.ts
259
+ steps: [migrate({ app: "backend", command: "yarn db:migrate" })],
260
+
261
+ // redkite.staging.config.ts
262
+ steps: [migrate({ app: "backend", command: "yarn db:migrate", network: "deployment" })],
263
+ ```
264
+
265
+ A step at a point the deployment already fills replaces it for that environment,
266
+ where it stood. It is the rule redkite's own four already follow, applied one
267
+ level down. A step only the environment has runs ahead of the deployment's at
268
+ the same slot, the way a plugin's does.
269
+
270
+ Two steps at one point in one environment file are refused when the file is
271
+ defined, and so is a step landing on a point a plugin already fills. `plan`
272
+ prints the pipeline the environment will actually run.
273
+
207
274
  ```ts
208
275
  extraHosts: { "db.internal": "10.55.0.250" },
209
276
  ```
@@ -264,7 +331,7 @@ sits beside the deployment is refused too: it comes from one place or the other.
264
331
  | `build` | How the repository becomes an image. See presets below |
265
332
  | `dir` | Where the app sits in the repository, when it is not the whole of it |
266
333
  | `health` | Probed on the container itself, not through the proxy |
267
- | `secrets` | One ref or several, merged in order, written to `.env` in the image |
334
+ | `secrets` | One ref or several, merged in order, handed to the container as its environment |
268
335
  | `files` | Container path to the item whose contents land there |
269
336
  | `volumes` | Volume name to container path, for state that outlives a deploy |
270
337
 
@@ -290,6 +357,21 @@ failure says which kind was missing: *"acme/backend has no tag v9"*.
290
357
  An environment can only say `branch`. A tag or a commit is a claim about one
291
358
  repository, and an environment spans every app in the deployment.
292
359
 
360
+ Each app is cloned as a step of its own, ahead of its build. It says the
361
+ repository and the branch, tag or commit as it starts, and says them again with
362
+ the commit it landed on when it ends, so the row keeps them after the step's
363
+ progress has moved on:
364
+
365
+ ```
366
+ ✔ Cloning backend: git@github.com:acme/backend.git, branch staging at 64ae9f1 (2s)
367
+ ✔ Building backend: 64ae9f1 (1m12s)
368
+ ```
369
+
370
+ A repository that cannot be reached, or a branch it does not have, fails that
371
+ step rather than the build, and gets a file of its own in the crash log. An app
372
+ built from a directory is read where it is rather than cloned, so it has no
373
+ such step.
374
+
293
375
  ### Building from a directory
294
376
 
295
377
  An app names either a repository to clone or a directory already on this
@@ -546,12 +628,13 @@ registered before `bitwarden.item()` resolves to anything. A deployment that
546
628
  names a provider nothing registers is refused before it builds, rather than
547
629
  reaching for a vault by name.
548
630
 
549
- It unlocks with `BW_KEY`, a session obtained elsewhere, and falls back to
550
- `BW_CLIENT_ID`, `BW_CLIENT_SECRET` and `BW_PASSWORD` when that is not set. A
551
- config that would rather name its own variable passes the session in:
552
- `bitwarden({ secrets: process.env.MY_VAULT_SESSION })`. One that reads no
553
- secrets at all needs none of them: redkite only opens the stores your config
554
- actually names.
631
+ By default it reads Bitwarden Secrets Manager, and `BW_KEY` is the access
632
+ token. A config that would rather name its own variable passes the token in:
633
+ `bitwarden({ secrets: process.env.MY_ACCESS_TOKEN })`. The password manager is
634
+ `bitwarden({ secrets: false })`, where `BW_KEY` is a session from
635
+ `bw unlock --raw`, with `BW_CLIENT_ID`, `BW_CLIENT_SECRET` and `BW_PASSWORD`
636
+ used to obtain one when it is not set. One that reads no secrets at all needs
637
+ none of them: redkite only opens the stores your config actually names.
555
638
 
556
639
  #### Where a secret is, and where it is not
557
640
 
@@ -702,24 +785,6 @@ there is nothing to set before a step can use it.
702
785
  A step naming an app the deployment does not have fails before the run starts
703
786
  rather than half way through it.
704
787
 
705
- #### Saying which machine the migration goes through
706
-
707
- A migration reaches its database through one particular machine, and the step
708
- runs on whatever host the environment deploys to. Naming that machine turns a
709
- move nobody rechecked into a refusal:
710
-
711
- ```ts
712
- migrate({
713
- app: "backend",
714
- command: "yarn db:migrate",
715
- through: "deploy@staging.acme.example",
716
- })
717
- ```
718
-
719
- Deploy that environment to any other host and the run stops before it touches
720
- anything. It is optional, and a deployment that leaves it out simply runs the
721
- migration wherever it deploys.
722
-
723
788
  #### The network a step runs on
724
789
 
725
790
  A migration defaults to `host`: the deploy host's own network stack, which is
@@ -763,11 +828,9 @@ first, and they sit at `swap:before` so they run while the old containers are
763
828
  still serving.
764
829
 
765
830
  ```ts
766
- steps: [
767
- // Above the migrate, because steps run in the order they are listed
768
- rdsSnapshot({ instance: "acme-production", region: "eu-west-1" }),
769
- migrate({ app: "backend", command: "yarn db:migrate" }),
770
- ]
831
+ // A plugin's steps run ahead of the deployment's, so this lands above the migrate
832
+ plugins: [rdsSnapshot({ instance: "acme-production", region: "eu-west-1" })],
833
+ steps: [migrate({ app: "backend", command: "yarn db:migrate" })],
771
834
  ```
772
835
 
773
836
  `rdsSnapshot` goes through the AWS CLI, which every runner already has with the
@@ -1124,6 +1187,58 @@ the CPU and disk it is using. Nothing will clean up after it but you.
1124
1187
 
1125
1188
  The sixth press leaves.
1126
1189
 
1190
+ ### When a run fails
1191
+
1192
+ A run that throws, or a deploy that reverts, leaves everything it said on disk:
1193
+
1194
+ ```
1195
+ /tmp/<project>/<environment>/crash-2026-09-14T10-22-05.123Z/
1196
+ run.log
1197
+ 01-reading-the-bitwarden-vault.log
1198
+ 02-setup.log
1199
+ 03-building-frontend.log
1200
+ 04-building-backend.log
1201
+ 05-swap-before-migrate-backend.log
1202
+ ```
1203
+
1204
+ `run.log` holds what happened around the steps: the command, the version, the
1205
+ whole error chain with every stack in it, an index of the step files with how
1206
+ each ended, and every message and host command in the order they came. Host
1207
+ commands are kept whether or not `--verbose` showed them, since they are what a
1208
+ crash log is read for.
1209
+
1210
+ Each step is a file of its own, numbered in the order the steps started, with
1211
+ what it was doing as it went and every line its commands printed. Every app
1212
+ builds as its own step, so one app's output is never read through another's.
1213
+ The view keeps only each step's tail and the terminal gets only the end of the
1214
+ error; these keep all of it. Every line is stamped from the start of the run,
1215
+ the same clock in every file.
1216
+
1217
+ A health check that fails adds a step for each app, `Logs of <app>`, holding the
1218
+ last 200 lines its new container printed, both streams, with docker's own
1219
+ timestamps. They are read before the revert, because the revert gives the live
1220
+ name back to the previous release and anything asked after it would be that
1221
+ release's output. Every new container is read rather than only the one that
1222
+ failed, since a backend that never came up is often explained by what another
1223
+ app says it could not reach. The one that failed its check is marked failed,
1224
+ which puts its last lines on the screen when the run ends, and each has a file
1225
+ of its own here.
1226
+
1227
+ The path is `/tmp` itself rather than `TMPDIR`, so it is where a person is told
1228
+ to look. The directories are `700` and the files `600`, because `/tmp` is shared
1229
+ and a build's output can say more than it meant to. A run somebody stopped is
1230
+ not a crash and writes nothing.
1231
+
1232
+ A deployment that wants none of it says so:
1233
+
1234
+ ```ts
1235
+ export default defineDeployment({
1236
+ project: "acme",
1237
+ options: { crashLog: false },
1238
+ // ...
1239
+ });
1240
+ ```
1241
+
1127
1242
  ## GitHub Actions
1128
1243
 
1129
1244
  There is a composite action in this repository. `verify` on a pull request,
@@ -1223,7 +1338,8 @@ with the agent forwarded.
1223
1338
  6. **Swap.** The running container moves to the retired address without being
1224
1339
  stopped and is renamed, and only then does the live address belong to the new
1225
1340
  one. Nginx keeps the retired container as a backup upstream.
1226
- 7. **Check.** Each app is probed on itself. One failure reverts all of them.
1341
+ 7. **Check.** Each app is probed on itself. One failure reverts all of them,
1342
+ after writing out the last 200 lines every new container printed.
1227
1343
  8. **Cleanup.** Retired containers removed, superseded images reclaimed.
1228
1344
 
1229
1345
  A `verify` run walks the same list without steps 5 to 7. In their place it runs
package/dist/build.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import type { Docker } from "./docker.js";
2
- import type { Ref } from "./source.js";
2
+ import type { Ref, Source } from "./source.js";
3
3
  import type { Host } from "./host.js";
4
4
  import type { AppTopology } from "./topology.js";
5
5
  import type { AppSpec } from "./types.js";
@@ -26,5 +26,6 @@ export type BuildResult = {
26
26
  cached: boolean;
27
27
  };
28
28
  export declare function refOf(app: AppSpec, branch: string): Ref;
29
- export declare function build(app: AppSpec, topology: AppTopology, context: BuildContext): Promise<BuildResult>;
29
+ export declare function sourceOf(app: AppSpec, topology: AppTopology, context: Pick<BuildContext, "host" | "branch" | "detail" | "output">): Promise<Source>;
30
+ export declare function build(app: AppSpec, topology: AppTopology, context: BuildContext, checkedOut?: Source): Promise<BuildResult>;
30
31
  //# sourceMappingURL=build.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../src/build.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAE1C,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEtC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAM1C,MAAM,MAAM,YAAY,GAAG;IACzB,IAAI,EAAE,IAAI,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IAGf,OAAO,CAAC,EAAE;QAAE,IAAI,EAAE,IAAI,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IAEzC,GAAG,EAAE,MAAM,CAAC;IAEZ,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IAGpB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAEnC,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CACjC,CAAC;AAOF,MAAM,MAAM,WAAW,GAAG;IACxB,OAAO,EAAE,MAAM,CAAC;IAEhB,WAAW,EAAE,MAAM,CAAC;IAEpB,GAAG,EAAE,MAAM,CAAC;IAIZ,UAAU,EAAE,MAAM,CAAC;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EpB,GAAG,EAAE,MAAM,CAAC;IAIZ,UAAU,EAAE,MAAM,CAAC;IAEnB,MAAM,EAAE,OAAO,CAAC;CACjB,CAAC;AAKF,wBAAgB,KAAK,CAAC,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,GAAG,GAAG,CAKvD;AAID,wBAAsB,QAAQ,CAC5B,GAAG,EAAE,OAAO,EACZ,QAAQ,EAAE,WAAW,EACrB,OAAO,EAAE,IAAI,CAAC,YAAY,EAAE,MAAM,GAAG,QAAQ,GAAG,QAAQ,GAAG,QAAQ,CAAC,GACnE,OAAO,CAAC,MAAM,CAAC,CAajB;AAED,wBAAsB,KAAK,CACzB,GAAG,EAAE,OAAO,EACZ,QAAQ,EAAE,WAAW,EACrB,OAAO,EAAE,YAAY,EAErB,UAAU,CAAC,EAAE,MAAM,GAClB,OAAO,CAAC,WAAW,CAAC,CA+EtB"}
package/dist/build.js CHANGED
@@ -16,11 +16,10 @@ export function refOf(app, branch) {
16
16
  return { kind: "commit", name: app.commit };
17
17
  return { kind: "branch", name: app.branch ?? branch };
18
18
  }
19
- export async function build(app, topology, context) {
20
- const { host, docker } = context;
21
- const spec = app.build;
22
- const detail = context.detail ?? (() => { });
23
- const source = await prepareSource(host, {
19
+ // Where the app's source comes from, cloned or read. Its own call, so a run can
20
+ // make the clone a step of its own ahead of the build that reads it
21
+ export async function sourceOf(app, topology, context) {
22
+ return await prepareSource(context.host, {
24
23
  name: topology.container,
25
24
  repo: app.repo,
26
25
  // Already absolute when the CLI loaded the config, because a path is read
@@ -29,9 +28,17 @@ export async function build(app, topology, context) {
29
28
  include: app.include,
30
29
  ref: refOf(app, context.branch),
31
30
  output: context.output,
32
- submodules: spec.submodules,
33
- detail,
31
+ submodules: app.build.submodules,
32
+ detail: context.detail,
34
33
  });
34
+ }
35
+ export async function build(app, topology, context,
36
+ // Already checked out by a step of its own. Absent, the build fetches it
37
+ checkedOut) {
38
+ const { host, docker } = context;
39
+ const spec = app.build;
40
+ const detail = context.detail ?? (() => { });
41
+ const source = checkedOut ?? (await sourceOf(app, topology, { ...context, detail }));
35
42
  const release = source.release;
36
43
  const fingerprint = fingerprintOf(app, context, release);
37
44
  const tag = `${topology.container}:${release}-${fingerprint}`;
package/dist/build.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"build.js","sourceRoot":"","sources":["../src/build.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAGpC,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAGtF,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AA4B5C,8EAA8E;AAC9E,+EAA+E;AAC/E,6DAA6D;AAC7D,MAAM,QAAQ,GAAG,GAAG,CAAC;AAgBrB,6EAA6E;AAC7E,8EAA8E;AAC9E,0DAA0D;AAC1D,MAAM,UAAU,KAAK,CAAC,GAAY,EAAE,MAAc;IAChD,IAAI,GAAG,CAAC,GAAG;QAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,CAAC,GAAG,EAAE,CAAC;IACnD,IAAI,GAAG,CAAC,MAAM;QAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,CAAC,MAAM,EAAE,CAAC;IAE5D,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,CAAC,MAAM,IAAI,MAAM,EAAE,CAAC;AACxD,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,KAAK,CACzB,GAAY,EACZ,QAAqB,EACrB,OAAqB;IAErB,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC;IACjC,MAAM,IAAI,GAAG,GAAG,CAAC,KAAK,CAAC;IACvB,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,IAAI,CAAC,GAAG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AM,CAAC,OAAO,CAAC,KAAK,IAAI,KAAK,CAAC,CAAC;SACtC,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;SACjC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC;SACnB,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;SAC5D,MAAM,CAAC,KAAK,CAAC;SACb,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;AAClB,CAAC"}
@@ -0,0 +1,46 @@
1
+ import type { Deployment } from "../types.js";
2
+ import type { Viewer } from "./viewer.js";
3
+ type Kind = "info" | "warn" | "fail" | "done" | "plan" | "step" | "command";
4
+ type Entry = {
5
+ at: number;
6
+ kind: Kind;
7
+ text: string;
8
+ };
9
+ type Said = {
10
+ at: number;
11
+ kind: "detail" | "line";
12
+ text: string;
13
+ };
14
+ type StepRecord = {
15
+ label: string;
16
+ started: number;
17
+ ended?: number;
18
+ state: "running" | "done" | "failed";
19
+ note?: string;
20
+ said: Said[];
21
+ };
22
+ export type Transcript = {
23
+ started: number;
24
+ entries: Entry[];
25
+ steps: StepRecord[];
26
+ };
27
+ export type Crash = {
28
+ project: string;
29
+ environment: string;
30
+ command: string;
31
+ version: string;
32
+ argv: string[];
33
+ outcome: string;
34
+ at: number;
35
+ error?: unknown;
36
+ };
37
+ export declare function recording(log: Viewer, now?: () => number): {
38
+ log: Viewer;
39
+ transcript: Transcript;
40
+ command: (text: string) => number;
41
+ };
42
+ export declare function crashDirectory(project: string, environment: string, at: Date, root?: string): string;
43
+ export declare function crashFiles(transcript: Transcript, crash: Crash): Record<string, string>;
44
+ export declare function dumpCrash(config: Deployment, transcript: Transcript, crash: Crash, root?: string): Promise<string | undefined>;
45
+ export {};
46
+ //# sourceMappingURL=crash.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"crash.d.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,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,GAAE,MAAM,MAAiB;;;oBAqE1C,MAAM;EAG9B;AAID,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,SAAO,UAGzF;AAMD,wBAAgB,UAAU,CAAC,UAAU,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAcvF;AAKD,wBAAsB,SAAS,CAC7B,MAAM,EAAE,UAAU,EAClB,UAAU,EAAE,UAAU,EACtB,KAAK,EAAE,KAAK,EACZ,IAAI,SAAO,+BAgBZ"}
@@ -0,0 +1,202 @@
1
+ import { mkdir, writeFile } from "node:fs/promises";
2
+ import { dirname, join } from "node:path";
3
+ import { elapsed } from "./screen.js";
4
+ import { causes } from "./log.js";
5
+ // What a failed run said, kept whole. The view trims a step to its last lines
6
+ // and the alternate screen takes the rest with it, so the only complete record
7
+ // of a run that went wrong is one written down while it happened.
8
+ // Named rather than read from TMPDIR: the path is the one a person is told to
9
+ // look in, and a runner that points TMPDIR somewhere else would hide it
10
+ const ROOT = "/tmp";
11
+ // Every call reaches the wrapped log unchanged, so the view behaves as it did.
12
+ // The transcript is a copy kept beside it, never a replacement for it
13
+ export function recording(log, now = Date.now) {
14
+ const transcript = { started: now(), entries: [], steps: [] };
15
+ const note = (kind, text) => transcript.entries.push({ at: now(), kind, text });
16
+ const step = (label) => {
17
+ const record = { label, started: now(), state: "running", said: [] };
18
+ const task = log.step(label);
19
+ transcript.steps.push(record);
20
+ note("step", `${label} started`);
21
+ const settle = (state, message) => {
22
+ record.state = state;
23
+ record.ended = now();
24
+ record.note = message;
25
+ const said = message ? `: ${message}` : "";
26
+ note("step", `${label} ${state}${said} (${elapsed(record.ended, record.started)})`);
27
+ };
28
+ return {
29
+ detail: (message) => {
30
+ record.said.push({ at: now(), kind: "detail", text: message });
31
+ task.detail(message);
32
+ },
33
+ line: (message) => {
34
+ record.said.push({ at: now(), kind: "line", text: message });
35
+ task.line(message);
36
+ },
37
+ done: (message) => {
38
+ settle("done", message);
39
+ task.done(message);
40
+ },
41
+ fail: (message) => {
42
+ settle("failed", message);
43
+ task.fail(message);
44
+ },
45
+ };
46
+ };
47
+ const recorded = Object.assign((message) => {
48
+ note("info", message);
49
+ log(message);
50
+ }, {
51
+ plan: (points) => {
52
+ note("plan", points.join(", "));
53
+ log.plan?.(points);
54
+ },
55
+ warn: (message) => {
56
+ note("warn", message);
57
+ log.warn(message);
58
+ },
59
+ fail: (message) => {
60
+ note("fail", message);
61
+ log.fail(message);
62
+ },
63
+ done: (message) => {
64
+ note("done", message);
65
+ log.done(message);
66
+ },
67
+ step,
68
+ close: () => log.close(),
69
+ });
70
+ // A host command is only shown with --verbose, and is exactly what a crash log
71
+ // is read for, so it is kept whether it was shown or not
72
+ const command = (text) => note("command", text);
73
+ return { log: recorded, transcript, command };
74
+ }
75
+ // One directory per failed run, under the environment it failed in. Named from
76
+ // the command line, so both segments are made safe to be a path first
77
+ export function crashDirectory(project, environment, at, root = ROOT) {
78
+ const moment = at.toISOString().replaceAll(":", "-");
79
+ return join(root, slug(project), slug(environment), `crash-${moment}`);
80
+ }
81
+ // The run's own log, and one file per step. A build's thousands of lines would
82
+ // bury everything else in a single file, and a step's file is what gets opened
83
+ // first. Numbered in the order they started, which also keeps two steps that
84
+ // share a label from sharing a file
85
+ export function crashFiles(transcript, crash) {
86
+ const width = Math.max(2, String(transcript.steps.length).length);
87
+ const named = transcript.steps.map((step, index) => ({
88
+ step,
89
+ file: `${pad(index + 1, width)}-${slug(step.label)}.log`,
90
+ }));
91
+ return {
92
+ "run.log": runLog(transcript, crash, named),
93
+ ...Object.fromEntries(named.map(({ step, file }) => [file, stepLog(transcript, crash, step)])),
94
+ };
95
+ }
96
+ // Nothing is written for a deployment that turned it off. Otherwise private to
97
+ // whoever ran it: /tmp is shared by everyone on the machine, and a build's output
98
+ // can say more than it meant to
99
+ export async function dumpCrash(config, transcript, crash, root = ROOT) {
100
+ if (config.options?.crashLog === false)
101
+ return undefined;
102
+ const directory = crashDirectory(config.project, crash.environment, new Date(crash.at), root);
103
+ await mkdir(dirname(directory), { recursive: true, mode: 0o700 });
104
+ // Not recursive: a directory already there belongs to another run, and nothing
105
+ // of this one is written into it
106
+ await mkdir(directory, { mode: 0o700 });
107
+ for (const [name, contents] of Object.entries(crashFiles(transcript, crash))) {
108
+ await writeFile(join(directory, name), contents, { mode: 0o600, flag: "wx" });
109
+ }
110
+ return directory;
111
+ }
112
+ const MARK = {
113
+ info: "",
114
+ warn: "warn ",
115
+ fail: "fail ",
116
+ done: "done ",
117
+ plan: "plan ",
118
+ step: "step ",
119
+ command: "",
120
+ };
121
+ function runLog(transcript, crash, named) {
122
+ const since = sinceStart(transcript);
123
+ const index = named.map(({ step, file }) => {
124
+ const took = elapsed(step.ended ?? crash.at, step.started);
125
+ return `${file.padEnd(40)} ${step.state.padEnd(8)} ${took}`;
126
+ });
127
+ return lines([
128
+ "redkite crash log",
129
+ "",
130
+ `project ${crash.project}`,
131
+ `environment ${crash.environment}`,
132
+ `command ${crash.command}`,
133
+ `outcome ${crash.outcome}`,
134
+ `version ${crash.version}`,
135
+ `argv ${crash.argv.join(" ")}`,
136
+ `started ${new Date(transcript.started).toISOString()}`,
137
+ `ended ${new Date(crash.at).toISOString()}`,
138
+ "",
139
+ "== error",
140
+ ...errorLines(crash.error),
141
+ "",
142
+ "== steps, each in its own file beside this one",
143
+ ...(index.length > 0 ? index : ["none started"]),
144
+ "",
145
+ "== log",
146
+ ...transcript.entries.map((entry) => `${since(entry.at)} ${MARK[entry.kind]}${indent(entry.text)}`),
147
+ ]);
148
+ }
149
+ // Stamped from the start of the run, the same as run.log, so a line here can be
150
+ // found among what the run said around it
151
+ function stepLog(transcript, crash, step) {
152
+ const since = sinceStart(transcript);
153
+ const note = step.note ? `: ${step.note}` : "";
154
+ return lines([
155
+ `step ${step.label}`,
156
+ `state ${step.state}${indent(note)}`,
157
+ `started ${new Date(step.started).toISOString()}`,
158
+ `ended ${step.ended ? new Date(step.ended).toISOString() : "still running when the run ended"}`,
159
+ `took ${elapsed(step.ended ?? crash.at, step.started)}`,
160
+ "",
161
+ ...step.said.map((said) => `${since(said.at)} ${said.kind === "detail" ? "· " : "| "}${indent(said.text)}`),
162
+ ]);
163
+ }
164
+ // Whole, where the terminal gets the tail: the stack of every error in the
165
+ // chain, since the step that threw is usually two causes down
166
+ function errorLines(error) {
167
+ if (error === undefined)
168
+ return ["none thrown"];
169
+ if (!(error instanceof Error))
170
+ return [String(error)];
171
+ return causes(error).flatMap((link, index) => [
172
+ ...(index > 0 ? ["", "caused by"] : []),
173
+ link.stack ?? link.message,
174
+ ]);
175
+ }
176
+ function sinceStart(transcript) {
177
+ return (at) => `+${clock(at - transcript.started)}`;
178
+ }
179
+ function lines(rows) {
180
+ return `${rows.join("\n")}\n`;
181
+ }
182
+ // Continuation lines line up under the text rather than under the timestamp
183
+ function indent(text) {
184
+ return text.replaceAll("\n", "\n ");
185
+ }
186
+ function slug(text) {
187
+ const slugged = text
188
+ .toLowerCase()
189
+ .replace(/[^a-z0-9]+/g, "-")
190
+ .replace(/^-+|-+$/g, "");
191
+ return slugged || "unnamed";
192
+ }
193
+ function clock(ms) {
194
+ const minutes = Math.floor(ms / 60_000);
195
+ const seconds = Math.floor(ms / 1000) % 60;
196
+ const millis = ms % 1000;
197
+ return `${pad(minutes, 2)}:${pad(seconds, 2)}.${pad(millis, 3)}`;
198
+ }
199
+ function pad(value, width) {
200
+ return String(value).padStart(width, "0");
201
+ }
202
+ //# sourceMappingURL=crash.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"crash.js","sourceRoot":"","sources":["../../src/cli/crash.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,IAAI,EAA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ourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,UAAU,EAAc,MAAM,aAAa,CAAC;AA+F1D,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,YAgBxC;AAED,wBAAsB,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,2BASxC;AA4QD,wBAAgB,OAAO,CAAC,EAAE,EAAE;IAC1B,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,GAAG,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/B,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,KAAK,IAAI,CAAC;IACxC,KAAK,EAAE,MAAM,IAAI,CAAC;CACnB,cAwBA;AAkCD,wBAAgB,YAAY,CAAC,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,GAAG,UAAU,CAehF"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,UAAU,EAAc,MAAM,aAAa,CAAC;AAgG1D,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,YAgBxC;AAED,wBAAsB,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,2BASxC;AA4QD,wBAAgB,OAAO,CAAC,EAAE,EAAE;IAC1B,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,GAAG,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/B,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,KAAK,IAAI,CAAC;IACxC,KAAK,EAAE,MAAM,IAAI,CAAC;CACnB,cAwBA;AAkCD,wBAAgB,YAAY,CAAC,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,GAAG,UAAU,CAehF"}