@intentius/sql-yodeler 0.11.0 → 0.12.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 (55) hide show
  1. package/dist/chant/gated-request.d.ts +31 -1
  2. package/dist/chant/gated-request.js +57 -1
  3. package/dist/chant/gated-request.js.map +1 -1
  4. package/dist/chant-floor-version.d.ts +1 -1
  5. package/dist/chant-floor-version.js +1 -1
  6. package/dist/chant-floor.d.ts +14 -12
  7. package/dist/chant-floor.js +33 -19
  8. package/dist/chant-floor.js.map +1 -1
  9. package/dist/ci/login.d.ts +22 -47
  10. package/dist/ci/login.js +35 -82
  11. package/dist/ci/login.js.map +1 -1
  12. package/dist/ci/render.d.ts +42 -73
  13. package/dist/ci/render.js +69 -133
  14. package/dist/ci/render.js.map +1 -1
  15. package/dist/ci-words.d.ts +3 -3
  16. package/dist/ci-words.js +3 -3
  17. package/dist/commands/apply.d.ts +6 -0
  18. package/dist/commands/apply.js +34 -12
  19. package/dist/commands/apply.js.map +1 -1
  20. package/dist/commands/mcp.js +15 -20
  21. package/dist/commands/mcp.js.map +1 -1
  22. package/dist/commands/plan.js +52 -8
  23. package/dist/commands/plan.js.map +1 -1
  24. package/dist/commands/revert.js +5 -1
  25. package/dist/commands/revert.js.map +1 -1
  26. package/dist/config/define.d.ts +1 -1
  27. package/dist/config/settings.d.ts +23 -3
  28. package/dist/config/settings.js +32 -9
  29. package/dist/config/settings.js.map +1 -1
  30. package/dist/exit.d.ts +5 -2
  31. package/dist/exit.js +9 -4
  32. package/dist/exit.js.map +1 -1
  33. package/dist/mcp/chant-hook.d.ts +7 -5
  34. package/dist/mcp/chant-hook.js +19 -22
  35. package/dist/mcp/chant-hook.js.map +1 -1
  36. package/dist/pr/note.d.ts +26 -23
  37. package/dist/pr/note.js +59 -49
  38. package/dist/pr/note.js.map +1 -1
  39. package/dist/pr/part.d.ts +11 -0
  40. package/dist/pr/part.js +35 -1
  41. package/dist/pr/part.js.map +1 -1
  42. package/dist/pr/render.d.ts +0 -4
  43. package/dist/pr/render.js +5 -62
  44. package/dist/pr/render.js.map +1 -1
  45. package/dist/pr/tenants.d.ts +7 -0
  46. package/dist/pr/tenants.js +25 -0
  47. package/dist/pr/tenants.js.map +1 -1
  48. package/dist/versioned/engine.d.ts +1 -1
  49. package/package.json +8 -7
  50. package/dist/mcp/server.d.ts +0 -40
  51. package/dist/mcp/server.js +0 -106
  52. package/dist/mcp/server.js.map +0 -1
  53. package/dist/versioned/stand-down.d.ts +0 -44
  54. package/dist/versioned/stand-down.js +0 -84
  55. package/dist/versioned/stand-down.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"login.js","sourceRoot":"","sources":["../../src/ci/login.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAgCH,IAAI,KAA6B,CAAC;AAElC,uHAAuH;AACvH,MAAM,UAAU,aAAa,CAAC,CAAyB;IACrD,KAAK,GAAG,CAAC,CAAC;AACZ,CAAC;AAED,mDAAmD;AACnD,MAAM,CAAC,MAAM,kBAAkB,GAAG,GAAY,EAAE,CAAC,KAAK,KAAK,SAAS,CAAC;AAErE;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,UAAU;IAC9B,MAAM,QAAQ,GAAG,8BAA8B,CAAC;IAChD,MAAM,MAAM,GAAG,2CAA2C,CAAC;IAC3D,IAAI,CAAC;QACH,MAAM,CAAC,GAAG,CAAC,MAAM,MAAM,CAAC,QAAQ,CAAC,CAAiE,CAAC;QACnG,MAAM,CAAC,GAAG,CAAC,MAAM,MAAM,CAAC,MAAM,CAAC,CAA8B,CAAC;QAC9D,MAAM,EAAE,GAAG,OAAO,CAAC,CAAC,SAAS,KAAK,UAAU,IAAI,OAAO,CAAC,CAAC,gBAAgB,KAAK,UAAU,IAAI,OAAO,CAAC,CAAC,mBAAmB,KAAK,UAAU,IAAI,OAAO,CAAC,CAAC,cAAc,KAAK,QAAQ,IAAI,OA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,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC;QAC9I,KAAK,MAAM,CAAC,CAAC,EAAE,IAAI,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;YAC/C,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;YACf,IAAI,CAAC,KAAK,SAAS,IAAI,CAAC,IAAI,CAAC,QAAQ;gBAAE,SAAS;YAChD,IAAI,OAAO,CAAC,KAAK,QAAQ,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC;gBAAE,OAAO,GAAG,KAAK,IAAI,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC,IAAI,EAAE,CAAC;QAC3F,CAAC;IACH,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,kEAAkE;AAClE,MAAM,UAAU,YAAY,CAAC,KAAc,EAAE,KAAa;IACxD,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC;QAAE,OAAO,GAAG,KAAK,kDAAkD,CAAC;IACxF,OAAO,aAAa,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;AAC3C,CAAC"}
@@ -37,20 +37,17 @@
37
37
  * migrations and the digest to approve. One job per environment, holding
38
38
  * that environment's reader credentials and nothing else.
39
39
  * - yodel-apply: on a push to main, one job per wave, each needing the one
40
- * before, running `chant run wave`: it plans the environment (`yodel apply
41
- * <env> --wave-plan`), reads the wave's gate policy from yodel-waves.json
42
- * as the commit before the push has it, waits for an approval when that
43
- * policy asks for one (exit 3, and the waves after it do not run), and
44
- * applies (`yodel apply <env> --wave-apply`). The only jobs that hold a
45
- * writer's credentials, one environment's each, with
46
- * YODEL_CREDENTIALS=writer. Two merges in quick succession do not fail the
47
- * second apply: it waits for the first's lock (YODEL_LOCK_WAIT), and an
48
- * apply whose commit is no longer main's tip stands down
49
- * (YODEL_STAND_DOWN), since the newer commit's waves apply the same
50
- * environments. With a chant that has the lock grain and stand-down
51
- * (#293), chant does both: its lease on the environment exits 5 for the
52
- * apply that finds it held, and `standDown` in the spec exits 6 for one
53
- * a newer commit supersedes; the jobs carry neither variable.
40
+ * before, running `yodel chant run wave`: through the sql lexicon's
41
+ * `sql-migrate` capability it plans the environment (`yodel apply <env>
42
+ * --wave-plan`), reads the wave's gate policy from yodel-waves.json as the
43
+ * commit before the push has it, waits for an approval when that policy
44
+ * asks for one (exit 3, and the waves after it do not run), and applies
45
+ * (`yodel apply <env> --wave-apply`). The only jobs that hold a writer's
46
+ * credentials, one environment's each, with YODEL_CREDENTIALS=writer. Two
47
+ * merges in quick succession do not fail the second apply: chant's lease
48
+ * on the environment exits 5 for the apply that finds it held, and
49
+ * `standDown` in the spec exits 6 for one a newer commit supersedes
50
+ * (#293).
54
51
  * - watch-<env>: the environment's WatchOp on its own schedule, rendered by
55
52
  * chant's generateOpsPipeline, with the reader's credentials. After the
56
53
  * Op, `yodel drift <env> --issue` compares the server with the schema the
@@ -75,9 +72,8 @@
75
72
  * in that image instead, which carries node, yodel, chant and the lexicons
76
73
  * on PATH, and no job runs `npm ci` ({@link Toolchain}).
77
74
  *
78
- * With a chant that has `@intentius/chant/ci-product` (chant#4550), yodel ci
79
- * renders through chant's product pipeline with yodel's words (#289,
80
- * ../ci-words.ts): {@link productWaves}.
75
+ * yodel ci renders through chant's product pipeline (chant#4550) with
76
+ * yodel's words (#289, ../ci-words.ts): {@link productWaves}.
81
77
  */
82
78
  import { type ApplySteps, type ApprovalMode, type CiLogin, type WaveGate } from "../config/define.js";
83
79
  import type { OpWaveHooks } from "@intentius/chant/op";
@@ -180,7 +176,7 @@ export declare const variablePrefix: (env: string, dialect: Dialect) => string;
180
176
  export declare const readerVariables: (env: string, dialect: Dialect, creds?: EnvCredentials) => string[];
181
177
  /** The variables the apply job for `env` holds: the URL and the writer. */
182
178
  export declare const writerVariables: (env: string, dialect: Dialect, creds?: EnvCredentials) => string[];
183
- /** The GitLab ID token per cloud: its variable and its audience. */
179
+ /** The GitLab ID token per cloud, for a job that holds a cloud-minted role and names no login for it: its variable and its audience. */
184
180
  export declare const ID_TOKENS: Record<CloudToken, {
185
181
  variable: string;
186
182
  aud: string;
@@ -193,8 +189,6 @@ export declare const writeProbe: (envs: readonly string[]) => string;
193
189
  * The remote-tracking ref is what chant's push lease reads.
194
190
  */
195
191
  export declare const FETCH_APPROVALS = "git fetch --no-tags origin '+refs/heads/chant/lifecycle:refs/remotes/origin/chant/lifecycle' && git branch -f chant/lifecycle origin/chant/lifecycle || echo 'no chant/lifecycle branch yet, so nothing is approved'";
196
- /** The apply jobs' lock settings: wait for another apply's lock, and stand down for a newer commit on main. */
197
- export declare const APPLY_LOCK: Record<string, string>;
198
192
  /** The watch reads; it never pushes. See the comment at the top. */
199
193
  export declare const NO_PUSH = "git remote set-url --push origin no-push://the-drift-watch-only-reads";
200
194
  /** After the watch's `chant run`: drift against the history, the environment's tracking issue, and exit 2 on drift. */
@@ -311,17 +305,14 @@ interface WavesSpec {
311
305
  op: string;
312
306
  /** The wave gate pattern, under chant's product pipeline (#289): `yodel-apply-wave-{k}`, the names chant gives the gates without it. */
313
307
  gateName?: string;
314
- /** yodel's callbacks, `yodel apply {target} --wave-plan|--wave-apply`; absent when the sql capability plans and applies (#291). */
315
- plan?: string[];
316
- apply?: string[];
317
- /** The sql lexicon's capability (chant#4569), in place of `plan` and `apply` (#291). */
318
- step?: {
308
+ /** The sql lexicon's capability (chant#4569), which plans and applies each run (#291). */
309
+ step: {
319
310
  kind: "sql-migrate";
320
311
  environment: string;
321
312
  spec: string;
322
313
  };
323
314
  /** chant stands an apply down for a newer commit on the branch (#293, chant#4581), exit 6. */
324
- standDown?: true;
315
+ standDown: true;
325
316
  branches: string[];
326
317
  waves: Array<{
327
318
  name: string;
@@ -347,13 +338,14 @@ interface WavesSpec {
347
338
  * The waves spec. What the file holds is the same for every forge; each
348
339
  * forge's jobs get their own variables on top (`variables`).
349
340
  *
350
- * With `step` (#291), a chant whose sql lexicon has the `sql-migrate`
351
- * capability (chant#4569): the spec names the capability, and chant plans
352
- * and applies each run through it, which calls the same engine entry points
353
- * (`yodel apply <env> --wave-plan` and `--wave-apply`) by a fixed argv. The
354
- * spec then has no `plan` or `apply` callback. Without it, the callbacks.
341
+ * The spec names the sql lexicon's `sql-migrate` capability (#291,
342
+ * chant#4569), and chant plans and applies each run through it, which calls
343
+ * the engine's entry points (`yodel apply <env> --wave-plan` and
344
+ * `--wave-apply`) by a fixed argv. yodel's own `plan` and `apply` callbacks,
345
+ * which a 0.10.1 spec has, left in 0.12 (#303). chant locks each run's
346
+ * environment and stands a superseded run down (`standDown`, #293).
355
347
  *
356
- * The steps around apply (#64) under `step`: chant refuses `hooks.apply.runBy:
348
+ * The steps around apply (#64): chant refuses `hooks.apply.runBy:
357
349
  * "apply"` with a capability step, and it would run apply-stage hooks
358
350
  * around the step itself, outside the engine's lock, while `--wave-apply`
359
351
  * with no CHANT_HOOKS runs the steps at base under its lock as well. So the
@@ -365,39 +357,15 @@ interface WavesSpec {
365
357
  */
366
358
  export declare function wavesSpec(waves: readonly Wave[], variables?: (env: string) => Record<string, string>, resume?: {
367
359
  schedule: string;
368
- }, options?: {
369
- step?: boolean;
370
- chantLocks?: boolean;
371
360
  }): WavesSpec;
372
- /**
373
- * Whether the installed chant locks and stands down the waves itself (#293):
374
- * `@intentius/chant/op` exports `OP_WAVE_STAND_DOWN_FLOOR` and
375
- * `newerCommitOnBranch` (chant#4581), and the sql lexicon gives SQL members
376
- * their lock grain, the environment (`sqlDefaultLockGrain`, chant#4571, on
377
- * chant#4552's grain). Then the apply jobs carry no lock settings of their
378
- * own: chant's lease on the target keeps two applies of one environment
379
- * apart and exits 5 (`held`) for the one that finds it taken, the engine's
380
- * own lock still guards the history under it, and a superseded apply exits
381
- * 6 (`superseded`). Lazy imports, with the specifiers in variables, so a
382
- * published chant keeps YODEL_LOCK_WAIT and YODEL_STAND_DOWN.
383
- */
384
- export declare function chantLocksWaves(): Promise<boolean>;
385
361
  /** The sql lexicon's capability for a versioned environment (chant#4569). */
386
362
  export declare const SQL_MIGRATE = "sql-migrate";
387
363
  /**
388
- * Whether the installed sql lexicon plans and applies through chant (#291):
389
- * it exports `sqlCapabilityPlugin` (chant#4569), and the chant that ships
390
- * with it runs an op wave's `step`. A lazy import, with the specifier in a
391
- * variable, so a published lexicon without it keeps the callbacks.
392
- */
393
- export declare function hasSqlCapability(): Promise<boolean>;
394
- /**
395
- * The waves spec file and the apply pipeline on each forge. With `product`
396
- * (chant's product pipeline, #289), the spec comes from chant's
397
- * productPipelineJobs under yodel's words, and each job runs `yodel chant`
398
- * where chant's own runs `chant` ({@link productWaves}).
364
+ * The waves spec file and the apply pipeline on each forge. The spec comes
365
+ * from chant's productPipelineJobs under yodel's words (#289), and each job
366
+ * runs `yodel chant` where chant's own runs `chant` ({@link productWaves}).
399
367
  */
400
- export declare function applyPipelines(dir: string, envs: Environments, product?: ChantProduct): Promise<RenderedFile[]>;
368
+ export declare function applyPipelines(dir: string, envs: Environments, product: ChantProduct): Promise<RenderedFile[]>;
401
369
  /**
402
370
  * The wave jobs' report: chant's generateOpWavesPipeline takes run lines
403
371
  * after the wave's command but no step that runs when it fails (a wave that
@@ -431,8 +399,8 @@ export declare function productWaves(product: ChantProduct, forge: Forge, spec:
431
399
  spec: WavesSpec;
432
400
  jobs: ProductWaveJob[];
433
401
  };
434
- /** `yaml` with yodel's bin in each chant command line (#289), through chant's own productCommand; unchanged without `product`. */
435
- export declare function withBin(product: ChantProduct | undefined, yaml: string): string;
402
+ /** `yaml` with yodel's bin in each chant command line (#289), through chant's own productCommand. */
403
+ export declare function withBin(product: ChantProduct, yaml: string): string;
436
404
  /**
437
405
  * The watch's spec for one environment: the Op, and on GitHub and Forgejo the
438
406
  * reader's secrets. A GitLab job already has the project's variables (a
@@ -445,9 +413,9 @@ export declare function watchSpec(env: string, dialect: Dialect, forge: Forge, c
445
413
  permissions?: Record<string, string>;
446
414
  };
447
415
  /**
448
- * The drift watches. With `product` (#289) each job runs `yodel chant run
449
- * watch-<env>` where chant's runs `chant run watch-<env>`, so the Op's
450
- * statuses and notices say yodel.
416
+ * The drift watches, through chant's product pipeline (#289): each job runs
417
+ * `yodel chant run watch-<env>` where chant's runs `chant run watch-<env>`,
418
+ * so the Op's statuses and notices say yodel.
451
419
  *
452
420
  * The job stays chant's generateOpsPipeline and its last line stays `yodel
453
421
  * drift <env> --issue`, which plans the build for ClickHouse grant drift
@@ -456,7 +424,7 @@ export declare function watchSpec(env: string, dialect: Dialect, forge: Forge, c
456
424
  * sql lexicon's live diff, the watch moves onto chant's drift job with
457
425
  * `stages.drift` and the workaround goes.
458
426
  */
459
- export declare function watchPipelines(dir: string, envs_: Environments, product?: ChantProduct): Promise<RenderedFile[]>;
427
+ export declare function watchPipelines(dir: string, envs_: Environments, product: ChantProduct): Promise<RenderedFile[]>;
460
428
  /** The dialect and the environments chant.config.ts declares, in order. */
461
429
  export declare function environments(dir: string): Promise<Environments>;
462
430
  /** The roles of each environment whose profile is made with credentials(). */
@@ -496,16 +464,17 @@ export declare function review(envs: Environments): RenderedFile[];
496
464
  export declare function checkHooksDeclaration(dir: string, envs_: Environments, declaration?: RenderedFile): Promise<RenderedFile | undefined>;
497
465
  /** The forge a rendered file is for; undefined for the waves spec, which every forge's apply reads. */
498
466
  export declare function forgeOf(path: string): Forge | undefined;
467
+ /** chant's product pipeline (#289), which every pipeline renders through; refused, naming the install line, on a chant without it. */
468
+ export declare function requireProduct(): Promise<ChantProduct>;
499
469
  /**
500
- * Every file `yodel ci` writes. Through chant's product pipeline when the
501
- * installed chant has it (#289), unless `options.product` is false, which
502
- * renders with yodel's own generator as a chant before chant#4550 does.
503
- * `options.declaration` is a workspace declaration to render the check
504
- * hooks into when the project has none on disk: the one `yodel upgrade`
505
- * adds (#298).
470
+ * Every file `yodel ci` writes, through chant's product pipeline (#289).
471
+ * Yodel's own generator, for a chant before chant#4550, left in 0.12
472
+ * (#303). `options.declaration` is a workspace declaration to render the
473
+ * check hooks into when the project has none on disk: the one `yodel
474
+ * upgrade` adds (#298). A project with no declaration, in its directory or
475
+ * given here, keeps the lint job's own steps ({@link checkHooksDeclaration}).
506
476
  */
507
477
  export declare function render(dir: string, options?: {
508
- product?: boolean;
509
478
  declaration?: RenderedFile;
510
479
  }): Promise<RenderedFile[]>;
511
480
  export {};
package/dist/ci/render.js CHANGED
@@ -37,20 +37,17 @@
37
37
  * migrations and the digest to approve. One job per environment, holding
38
38
  * that environment's reader credentials and nothing else.
39
39
  * - yodel-apply: on a push to main, one job per wave, each needing the one
40
- * before, running `chant run wave`: it plans the environment (`yodel apply
41
- * <env> --wave-plan`), reads the wave's gate policy from yodel-waves.json
42
- * as the commit before the push has it, waits for an approval when that
43
- * policy asks for one (exit 3, and the waves after it do not run), and
44
- * applies (`yodel apply <env> --wave-apply`). The only jobs that hold a
45
- * writer's credentials, one environment's each, with
46
- * YODEL_CREDENTIALS=writer. Two merges in quick succession do not fail the
47
- * second apply: it waits for the first's lock (YODEL_LOCK_WAIT), and an
48
- * apply whose commit is no longer main's tip stands down
49
- * (YODEL_STAND_DOWN), since the newer commit's waves apply the same
50
- * environments. With a chant that has the lock grain and stand-down
51
- * (#293), chant does both: its lease on the environment exits 5 for the
52
- * apply that finds it held, and `standDown` in the spec exits 6 for one
53
- * a newer commit supersedes; the jobs carry neither variable.
40
+ * before, running `yodel chant run wave`: through the sql lexicon's
41
+ * `sql-migrate` capability it plans the environment (`yodel apply <env>
42
+ * --wave-plan`), reads the wave's gate policy from yodel-waves.json as the
43
+ * commit before the push has it, waits for an approval when that policy
44
+ * asks for one (exit 3, and the waves after it do not run), and applies
45
+ * (`yodel apply <env> --wave-apply`). The only jobs that hold a writer's
46
+ * credentials, one environment's each, with YODEL_CREDENTIALS=writer. Two
47
+ * merges in quick succession do not fail the second apply: chant's lease
48
+ * on the environment exits 5 for the apply that finds it held, and
49
+ * `standDown` in the spec exits 6 for one a newer commit supersedes
50
+ * (#293).
54
51
  * - watch-<env>: the environment's WatchOp on its own schedule, rendered by
55
52
  * chant's generateOpsPipeline, with the reader's credentials. After the
56
53
  * Op, `yodel drift <env> --issue` compares the server with the schema the
@@ -75,16 +72,15 @@
75
72
  * in that image instead, which carries node, yodel, chant and the lexicons
76
73
  * on PATH, and no job runs `npm ci` ({@link Toolchain}).
77
74
  *
78
- * With a chant that has `@intentius/chant/ci-product` (chant#4550), yodel ci
79
- * renders through chant's product pipeline with yodel's words (#289,
80
- * ../ci-words.ts): {@link productWaves}.
75
+ * yodel ci renders through chant's product pipeline (chant#4550) with
76
+ * yodel's words (#289, ../ci-words.ts): {@link productWaves}.
81
77
  */
82
78
  import { existsSync } from "node:fs";
83
79
  import { join, resolve } from "node:path";
84
80
  import { pathToFileURL } from "node:url";
85
81
  import { APPROVAL_MODES, WAVE_GATES, waveGateHint } from "../config/define.js";
86
82
  import { stepHooks } from "../apply-steps/index.js";
87
- import { audience, chantTrade, CLOUD_OF, jobLogins, loginSteps, tradeIdTokens, tradesThroughChant, useChantTrade } from "./login.js";
83
+ import { CLOUD_OF, jobLogins, loginSteps, tradeIdTokens } from "./login.js";
88
84
  import { RECORD_PLANS_ENV } from "../approval-mode/index.js";
89
85
  import { cloudToken, credentialsOf, roleVariables } from "../credentials.js";
90
86
  import { loadYodelConfig } from "../config/load.js";
@@ -98,6 +94,7 @@ import { forgejoSerializer } from "@intentius/chant-lexicon-forgejo/serializer";
98
94
  import { Artifacts as GitLabArtifacts, Image, Job as GitLabJob, Pipeline as GitLabPipeline, Rule, Service as GitLabService, Workflow as GitLabWorkflow, WorkflowRule, } from "@intentius/chant-lexicon-gitlab";
99
95
  import { gitlabSerializer } from "@intentius/chant-lexicon-gitlab/serializer";
100
96
  import { chantProduct, YODEL_WORDS } from "../ci-words.js";
97
+ import { CHANT_CI_FLOOR, installLine } from "../chant-floor-version.js";
101
98
  export const FORGES = ["github", "gitlab", "forgejo"];
102
99
  /** The image every job runs in, where the forge runs jobs in a container. It needs git, so not -slim. */
103
100
  export const IMAGE = "node:22-bookworm";
@@ -145,13 +142,13 @@ export const writerVariables = (env, dialect, creds) => {
145
142
  // ── Cloud identity (#50) ────────────────────────────────────────────────────
146
143
  //
147
144
  // A role whose password is minted by a cloud token source (rds-iam,
148
- // cloud-sql-iam, entra) mints it with the cloud's command line, from the
149
- // job's identity. A job holding one gets an OIDC token from the forge: on
150
- // GitHub the workflow grants `id-token: write`; on GitLab the job declares
151
- // an ID token for the cloud's audience. Forgejo issues no OIDC token to a
152
- // job (its dialect drops `permissions:`), so there the runner's own cloud
153
- // identity mints.
154
- /** The GitLab ID token per cloud: its variable and its audience. */
145
+ // cloud-sql-iam, entra) mints it from the job's identity. A job holding one
146
+ // gets an OIDC token from the forge: on GitHub the workflow grants
147
+ // `id-token: write`; on GitLab the job declares an ID token, chant's for a
148
+ // cloud the job logs in to through chant's trade (./login.ts), else one for
149
+ // the cloud's audience. Forgejo issues no OIDC token to a job (its dialect
150
+ // drops `permissions:`), so there the runner's own cloud identity mints.
151
+ /** The GitLab ID token per cloud, for a job that holds a cloud-minted role and names no login for it: its variable and its audience. */
155
152
  export const ID_TOKENS = {
156
153
  "rds-iam": { variable: "AWS_ID_TOKEN", aud: "sts.amazonaws.com" },
157
154
  "cloud-sql-iam": { variable: "GCP_ID_TOKEN", aud: "https://iam.googleapis.com/" },
@@ -161,16 +158,11 @@ export const ID_TOKENS = {
161
158
  const cloudsOf = (envs, held) => [
162
159
  ...new Set(held.map(([env, role]) => envs.credentials?.[env]?.[role].cloud).filter((c) => c !== undefined)),
163
160
  ];
164
- /** A GitLab job's `id_tokens` for `clouds`, each for its login's audience when the job logs in (#132): GCP's is the workload identity provider's own. */
161
+ /** A GitLab job's `id_tokens` for `clouds`: chant's for the clouds the job logs in to through the trade (#296), yodel's for the rest. */
165
162
  const idTokens = (clouds, logins = []) => ({
166
- ...ownIdTokens(clouds.filter((c) => !(tradesThroughChant() && logins.some((l) => l.cloud === CLOUD_OF[c]))), logins),
167
- // Through chant's trade (#296), the logins' tokens come in chant's variables.
163
+ ...Object.fromEntries(clouds.filter((c) => !logins.some((l) => l.cloud === CLOUD_OF[c])).map((c) => [ID_TOKENS[c].variable, { aud: ID_TOKENS[c].aud }])),
168
164
  ...(tradeIdTokens(logins) ?? {}),
169
165
  });
170
- const ownIdTokens = (clouds, logins) => Object.fromEntries(clouds.map((c) => {
171
- const login = logins.find((l) => l.cloud === CLOUD_OF[c]);
172
- return [ID_TOKENS[c].variable, { aud: login ? audience(login) : ID_TOKENS[c].aud }];
173
- }));
174
166
  /** The cloud logins (#132) of a job holding the roles `held`, from yodel.config.ts `ci.login`. */
175
167
  const loginsOf = (envs, held) => jobLogins(envs.login, held, (env, role) => envs.credentials?.[env]?.[role].cloud);
176
168
  /** A job's login steps as the github lexicon's Steps. */
@@ -226,8 +218,6 @@ const secrets = (names) => Object.fromEntries(names.map((n) => [n, secret(n)]));
226
218
  * The remote-tracking ref is what chant's push lease reads.
227
219
  */
228
220
  export const FETCH_APPROVALS = "git fetch --no-tags origin '+refs/heads/chant/lifecycle:refs/remotes/origin/chant/lifecycle' && git branch -f chant/lifecycle origin/chant/lifecycle || echo 'no chant/lifecycle branch yet, so nothing is approved'";
229
- /** The apply jobs' lock settings: wait for another apply's lock, and stand down for a newer commit on main. */
230
- export const APPLY_LOCK = { YODEL_LOCK_WAIT: "10m", YODEL_STAND_DOWN: "1" };
231
221
  /** The watch reads; it never pushes. See the comment at the top. */
232
222
  export const NO_PUSH = "git remote set-url --push origin no-push://the-drift-watch-only-reads";
233
223
  /** After the watch's `chant run`: drift against the history, the environment's tracking issue, and exit 2 on drift. */
@@ -685,13 +675,14 @@ export const APPLY_PIPELINE = "yodel-apply";
685
675
  * The waves spec. What the file holds is the same for every forge; each
686
676
  * forge's jobs get their own variables on top (`variables`).
687
677
  *
688
- * With `step` (#291), a chant whose sql lexicon has the `sql-migrate`
689
- * capability (chant#4569): the spec names the capability, and chant plans
690
- * and applies each run through it, which calls the same engine entry points
691
- * (`yodel apply <env> --wave-plan` and `--wave-apply`) by a fixed argv. The
692
- * spec then has no `plan` or `apply` callback. Without it, the callbacks.
678
+ * The spec names the sql lexicon's `sql-migrate` capability (#291,
679
+ * chant#4569), and chant plans and applies each run through it, which calls
680
+ * the engine's entry points (`yodel apply <env> --wave-plan` and
681
+ * `--wave-apply`) by a fixed argv. yodel's own `plan` and `apply` callbacks,
682
+ * which a 0.10.1 spec has, left in 0.12 (#303). chant locks each run's
683
+ * environment and stands a superseded run down (`standDown`, #293).
693
684
  *
694
- * The steps around apply (#64) under `step`: chant refuses `hooks.apply.runBy:
685
+ * The steps around apply (#64): chant refuses `hooks.apply.runBy:
695
686
  * "apply"` with a capability step, and it would run apply-stage hooks
696
687
  * around the step itself, outside the engine's lock, while `--wave-apply`
697
688
  * with no CHANT_HOOKS runs the steps at base under its lock as well. So the
@@ -701,21 +692,16 @@ export const APPLY_PIPELINE = "yodel-apply";
701
692
  * the base commit, as it does run by hand. A step runs once, under the
702
693
  * lock, as #107 asks.
703
694
  */
704
- export function wavesSpec(waves, variables, resume, options = {}) {
695
+ export function wavesSpec(waves, variables, resume) {
705
696
  const first = waves[0];
706
697
  if (!first)
707
698
  throw new Error("no waves to render");
708
699
  return {
709
700
  name: APPLY_PIPELINE,
710
701
  op: `migrate-${first.env}`,
711
- ...(options.step
712
- ? { step: { kind: SQL_MIGRATE, environment: "{target}", spec: WAVES_SPEC } }
713
- : {
714
- plan: ["yodel", "apply", "{target}", "--wave-plan", "{plan}", "--spec", WAVES_SPEC],
715
- apply: ["yodel", "apply", "{target}", "--wave-apply", "{plan}", "--spec", WAVES_SPEC],
716
- }),
702
+ step: { kind: SQL_MIGRATE, environment: "{target}", spec: WAVES_SPEC },
717
703
  // chant's stand-down (#293): the job applies nothing and exits 6 when a newer commit on main will apply the same environments.
718
- ...(options.step && options.chantLocks ? { standDown: true } : {}),
704
+ standDown: true,
719
705
  branches: [MAIN],
720
706
  waves: waves.map((w) => ({
721
707
  name: w.env,
@@ -725,86 +711,35 @@ export function wavesSpec(waves, variables, resume, options = {}) {
725
711
  ...(w.approval !== undefined && w.approval !== "ledger" ? { approval: w.approval } : {}),
726
712
  ...(variables ? { environment: { name: w.env }, variables: variables(w.env) } : {}),
727
713
  // The steps around apply (#64) as chant's stage hooks, which the apply runs under its lock (#206).
728
- ...hooksOf(w.steps, options.step === true),
714
+ ...hooksOf(w.steps),
729
715
  })),
730
716
  ...(resume ? { resume } : {}),
731
717
  };
732
718
  }
733
- /**
734
- * Whether the installed chant locks and stands down the waves itself (#293):
735
- * `@intentius/chant/op` exports `OP_WAVE_STAND_DOWN_FLOOR` and
736
- * `newerCommitOnBranch` (chant#4581), and the sql lexicon gives SQL members
737
- * their lock grain, the environment (`sqlDefaultLockGrain`, chant#4571, on
738
- * chant#4552's grain). Then the apply jobs carry no lock settings of their
739
- * own: chant's lease on the target keeps two applies of one environment
740
- * apart and exits 5 (`held`) for the one that finds it taken, the engine's
741
- * own lock still guards the history under it, and a superseded apply exits
742
- * 6 (`superseded`). Lazy imports, with the specifiers in variables, so a
743
- * published chant keeps YODEL_LOCK_WAIT and YODEL_STAND_DOWN.
744
- */
745
- export async function chantLocksWaves() {
746
- const op = "@intentius/chant/op";
747
- const grain = "@intentius/chant-lexicon-sql/lock-grain";
748
- try {
749
- const m = (await import(op));
750
- const g = (await import(grain));
751
- return typeof m.OP_WAVE_STAND_DOWN_FLOOR === "string" && typeof m.newerCommitOnBranch === "function" && typeof g.sqlDefaultLockGrain === "function";
752
- }
753
- catch {
754
- return false;
755
- }
756
- }
757
719
  /** The sql lexicon's capability for a versioned environment (chant#4569). */
758
720
  export const SQL_MIGRATE = "sql-migrate";
759
- /**
760
- * Whether the installed sql lexicon plans and applies through chant (#291):
761
- * it exports `sqlCapabilityPlugin` (chant#4569), and the chant that ships
762
- * with it runs an op wave's `step`. A lazy import, with the specifier in a
763
- * variable, so a published lexicon without it keeps the callbacks.
764
- */
765
- export async function hasSqlCapability() {
766
- const specifier = "@intentius/chant-lexicon-sql/capability-plugin";
767
- try {
768
- const m = (await import(specifier));
769
- return m.sqlCapabilityPlugin !== undefined && m.sqlCapabilityPlugin !== null;
770
- }
771
- catch {
772
- return false;
773
- }
774
- }
775
- /** A wave's stage hooks from its steps, when it has any; under a capability `step`, the `before.plan` checks only ({@link wavesSpec}). */
776
- function hooksOf(steps, step = false) {
777
- const hooks = stepHooks(steps);
778
- if (!hooks)
779
- return {};
780
- if (!step)
781
- return { hooks };
782
- const plan = hooks.before?.plan;
721
+ /** A wave's stage hooks from its steps, when it has any: the `before.plan` checks only, under the capability `step` ({@link wavesSpec}). */
722
+ function hooksOf(steps) {
723
+ const plan = stepHooks(steps)?.before?.plan;
783
724
  return plan && plan.length > 0 ? { hooks: { before: { plan } } } : {};
784
725
  }
785
726
  /**
786
- * The waves spec file and the apply pipeline on each forge. With `product`
787
- * (chant's product pipeline, #289), the spec comes from chant's
788
- * productPipelineJobs under yodel's words, and each job runs `yodel chant`
789
- * where chant's own runs `chant` ({@link productWaves}).
727
+ * The waves spec file and the apply pipeline on each forge. The spec comes
728
+ * from chant's productPipelineJobs under yodel's words (#289), and each job
729
+ * runs `yodel chant` where chant's own runs `chant` ({@link productWaves}).
790
730
  */
791
731
  export async function applyPipelines(dir, envs, product) {
792
732
  const { dialect, waves } = envs;
793
733
  const tc = toolchainOf(envs);
794
734
  const { generateOpWavesPipeline } = (await import("@intentius/chant/op"));
795
- const named = (forge, spec) => (product ? productWaves(product, forge, spec) : { spec, jobs: [] });
796
- // Through chant's product pipeline, the sql capability plans and applies (#291) when the installed lexicon has it.
797
- const capable = product !== undefined && (await hasSqlCapability());
798
- // chant's lock grain and stand-down (#293), under the capability, when chant has them.
799
- const step = { step: capable, chantLocks: capable && (await chantLocksWaves()) };
800
- const out = [{ path: WAVES_SPEC, content: `${JSON.stringify(named("github", wavesSpec(waves, undefined, undefined, step)).spec, null, 2)}\n` }];
735
+ const named = (forge, spec) => productWaves(product, forge, spec);
736
+ const out = [{ path: WAVES_SPEC, content: `${JSON.stringify(named("github", wavesSpec(waves)).spec, null, 2)}\n` }];
801
737
  // A GitLab job already has the project's variables, a writer's only under its environment.
802
738
  const variables = (forge) => (env) => {
803
739
  const wave = waves.find((w) => w.env === env);
804
740
  const required = wave?.requires;
805
741
  return {
806
742
  YODEL_CREDENTIALS: `writer:${env}`,
807
- ...(step.chantLocks ? {} : APPLY_LOCK),
808
743
  ...(forge === "gitlab"
809
744
  ? {}
810
745
  : {
@@ -851,7 +786,7 @@ export async function applyPipelines(dir, envs, product) {
851
786
  "# holds no writer's credentials: it plans with each environment's reader.",
852
787
  ];
853
788
  for (const forge of FORGES) {
854
- const { spec, jobs } = named(forge, wavesSpec(waves, variables(forge), envs.resume, step));
789
+ const { spec, jobs } = named(forge, wavesSpec(waves, variables(forge), envs.resume));
855
790
  const result = await generateOpWavesPipeline(spec, forge, {
856
791
  specFile: WAVES_SPEC,
857
792
  image: tc.image,
@@ -1050,14 +985,12 @@ export async function withTenants(dir, waves) {
1050
985
  // recorded keep counting), and each job running `yodel chant` where chant's
1051
986
  // own runs `chant`, so the job writes yodel's statuses and approve lines.
1052
987
  // The forge lexicons serialize the jobs as before, and yodel adds its
1053
- // reports, logins and readers to them as before. A chant without the entry
1054
- // leaves every file as yodel rendered it before, so main stays green on its
1055
- // published chant.
988
+ // reports, logins and readers to them as before.
1056
989
  //
1057
- // Still yodel's own until chant can run them: the plan jobs (`yodel plan
1058
- // <env> --comment` with the write probe) wait for the sql lexicon's
1059
- // capability (chant#4569) and the note through chant's renderer (#290); the
1060
- // lint job for the check hook (#294); the watch for chant#4582
990
+ // Still yodel's own: the plan jobs (`yodel plan <env> --comment` with the
991
+ // write probe), which post chant's note (../pr/note.ts, #290); the lint
992
+ // job's own steps for a project with no workspace declaration, which has
993
+ // no check hooks to run (#294); the watch until chant#4582
1061
994
  // ({@link watchPipelines}).
1062
995
  /** The spec under yodel's words, and the wave jobs chant's product pipeline names for `forge`. */
1063
996
  export function productWaves(product, forge, spec) {
@@ -1073,10 +1006,8 @@ export function productWaves(product, forge, spec) {
1073
1006
  }
1074
1007
  /** A `chant` command line in a rendered file: a step's `run:` or a GitLab script line, never a comment. */
1075
1008
  const CHANT_LINE = /^(\s*(?:- )?(?:run: )?)(chant [a-z].*)$/gm;
1076
- /** `yaml` with yodel's bin in each chant command line (#289), through chant's own productCommand; unchanged without `product`. */
1009
+ /** `yaml` with yodel's bin in each chant command line (#289), through chant's own productCommand. */
1077
1010
  export function withBin(product, yaml) {
1078
- if (!product)
1079
- return yaml;
1080
1011
  const words = product.assertProductWords(YODEL_WORDS);
1081
1012
  return yaml.replace(CHANT_LINE, (_m, lead, line) => `${lead}${product.productCommand(words, line)}`);
1082
1013
  }
@@ -1163,9 +1094,9 @@ function withWatchIdTokens(yaml, envs) {
1163
1094
  return emit(doc);
1164
1095
  }
1165
1096
  /**
1166
- * The drift watches. With `product` (#289) each job runs `yodel chant run
1167
- * watch-<env>` where chant's runs `chant run watch-<env>`, so the Op's
1168
- * statuses and notices say yodel.
1097
+ * The drift watches, through chant's product pipeline (#289): each job runs
1098
+ * `yodel chant run watch-<env>` where chant's runs `chant run watch-<env>`,
1099
+ * so the Op's statuses and notices say yodel.
1169
1100
  *
1170
1101
  * The job stays chant's generateOpsPipeline and its last line stays `yodel
1171
1102
  * drift <env> --issue`, which plans the build for ClickHouse grant drift
@@ -1354,24 +1285,29 @@ export function forgeOf(path) {
1354
1285
  return "gitlab";
1355
1286
  return undefined;
1356
1287
  }
1288
+ /** chant's product pipeline (#289), which every pipeline renders through; refused, naming the install line, on a chant without it. */
1289
+ export async function requireProduct() {
1290
+ const product = await chantProduct();
1291
+ if (!product)
1292
+ throw new Error(`the installed chant has no product pipeline (@intentius/chant/ci-product), and yodel ci renders every pipeline on it from chant ${CHANT_CI_FLOOR}. Install it, then run yodel upgrade:\n ${installLine()}`);
1293
+ return product;
1294
+ }
1357
1295
  /**
1358
- * Every file `yodel ci` writes. Through chant's product pipeline when the
1359
- * installed chant has it (#289), unless `options.product` is false, which
1360
- * renders with yodel's own generator as a chant before chant#4550 does.
1361
- * `options.declaration` is a workspace declaration to render the check
1362
- * hooks into when the project has none on disk: the one `yodel upgrade`
1363
- * adds (#298).
1296
+ * Every file `yodel ci` writes, through chant's product pipeline (#289).
1297
+ * Yodel's own generator, for a chant before chant#4550, left in 0.12
1298
+ * (#303). `options.declaration` is a workspace declaration to render the
1299
+ * check hooks into when the project has none on disk: the one `yodel
1300
+ * upgrade` adds (#298). A project with no declaration, in its directory or
1301
+ * given here, keeps the lint job's own steps ({@link checkHooksDeclaration}).
1364
1302
  */
1365
1303
  export async function render(dir, options = {}) {
1366
1304
  const envs = await environments(dir);
1367
1305
  const forges = envs.forges ?? FORGES;
1368
1306
  if (envs.checkOnly)
1369
1307
  return review(envs).filter((f) => forges.includes(forgeOf(f.path)));
1370
- const product = options.product === false ? undefined : await chantProduct();
1371
- // The cloud login through chant's ci-identity (#296), with the product pipeline, when chant and the sql lexicon have it.
1372
- useChantTrade(product ? await chantTrade() : undefined);
1373
- // The check on chant's check moment (#294), with the product pipeline, when chant has the moment and the project a declaration.
1374
- const hooks = product ? await checkHooksDeclaration(dir, envs, options.declaration) : undefined;
1308
+ const product = await requireProduct();
1309
+ // The check on chant's check moment (#294), when the project has a declaration.
1310
+ const hooks = await checkHooksDeclaration(dir, envs, options.declaration);
1375
1311
  const reviewed = hooks ? { ...envs, checkHooks: true } : envs;
1376
1312
  // ci.apply: false (#175): no waves spec and no apply pipeline on any forge.
1377
1313
  const files = [...review(reviewed), ...(hooks ? [hooks] : []), ...(rendersApply(envs) ? await applyPipelines(dir, envs, product) : []), ...(await watchPipelines(dir, envs, product))];