@intentius/sql-yodeler 0.13.2 → 0.13.4

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 (57) hide show
  1. package/dist/chant/build.d.ts +1 -0
  2. package/dist/chant/build.js +2 -0
  3. package/dist/chant/build.js.map +1 -1
  4. package/dist/chant/drift.d.ts +13 -41
  5. package/dist/chant/drift.js +21 -117
  6. package/dist/chant/drift.js.map +1 -1
  7. package/dist/ci/check-hooks.js +4 -2
  8. package/dist/ci/check-hooks.js.map +1 -1
  9. package/dist/ci/render.d.ts +57 -20
  10. package/dist/ci/render.js +215 -138
  11. package/dist/ci/render.js.map +1 -1
  12. package/dist/ci-words.d.ts +10 -0
  13. package/dist/ci-words.js +10 -0
  14. package/dist/ci-words.js.map +1 -1
  15. package/dist/commands/ci.js +20 -42
  16. package/dist/commands/ci.js.map +1 -1
  17. package/dist/commands/drift.d.ts +1 -1
  18. package/dist/commands/drift.js +5 -41
  19. package/dist/commands/drift.js.map +1 -1
  20. package/dist/commands/new.js +6 -4
  21. package/dist/commands/new.js.map +1 -1
  22. package/dist/commands/plan.js +79 -80
  23. package/dist/commands/plan.js.map +1 -1
  24. package/dist/config/define.d.ts +29 -0
  25. package/dist/config/define.js.map +1 -1
  26. package/dist/config/load.js +20 -3
  27. package/dist/config/load.js.map +1 -1
  28. package/dist/declarative/plan.d.ts +2 -2
  29. package/dist/declarative/plan.js +2 -2
  30. package/dist/mcp/tools.js +2 -2
  31. package/dist/mcp/tools.js.map +1 -1
  32. package/dist/notify/index.d.ts +4 -0
  33. package/dist/notify/index.js +3 -1
  34. package/dist/notify/index.js.map +1 -1
  35. package/dist/pr/forge.d.ts +1 -1
  36. package/dist/pr/forge.js +1 -1
  37. package/dist/pr/issue.d.ts +7 -5
  38. package/dist/pr/issue.js +16 -9
  39. package/dist/pr/issue.js.map +1 -1
  40. package/dist/pr/model.d.ts +1 -5
  41. package/dist/pr/model.js +2 -7
  42. package/dist/pr/model.js.map +1 -1
  43. package/dist/pr/note.d.ts +25 -9
  44. package/dist/pr/note.js +56 -21
  45. package/dist/pr/note.js.map +1 -1
  46. package/dist/pr/render.d.ts +4 -6
  47. package/dist/pr/render.js +4 -10
  48. package/dist/pr/render.js.map +1 -1
  49. package/dist/versioned/explain.d.ts +1 -9
  50. package/dist/versioned/explain.js +1 -20
  51. package/dist/versioned/explain.js.map +1 -1
  52. package/package.json +7 -7
  53. package/schemas/drift.schema.json +9 -5
  54. package/schemas/plan.schema.json +1 -1
  55. package/dist/pr/overdue.d.ts +0 -41
  56. package/dist/pr/overdue.js +0 -46
  57. package/dist/pr/overdue.js.map +0 -1
@@ -1,41 +0,0 @@
1
- /**
2
- * The plan comment's warning that an environment's drift watch stopped
3
- * running (chant#4289). A scheduled job can stop with no error anywhere:
4
- * GitHub turns a scheduled workflow off after 60 days with no activity in
5
- * the repository, and on GitLab the job runs only from a pipeline schedule
6
- * someone created. The watch cannot report its own absence, so `yodel plan
7
- * --comment` asks the forge when the environment's WatchOp job last ran and
8
- * warns when its cron has fired at least twice since.
9
- *
10
- * chant decides and finds the file (`checkOverdueOps` in
11
- * `op/schedule-overdue.ts`, chant issue 4789): it reads every workflow and
12
- * pipeline file, `.gitlab/yodel-watch.gitlab-ci.yml` included, so yodel says
13
- * only which Ops. The Op is the WatchOp whose `Env` label is the environment
14
- * (chant's `WatchOp` sets `Watch` and `Env`).
15
- *
16
- * Nothing here fails the plan. A forge that does not answer is a line in
17
- * the job log and no warning.
18
- */
19
- import type { OpConfig } from "@intentius/chant/op/types";
20
- import type { OverdueOp } from "@intentius/chant/op/schedule-overdue";
21
- import type { PrForge } from "@intentius/chant/pr-forge";
22
- /** The environment's scheduled WatchOps, by name. */
23
- export declare function envWatches(ops: Iterable<OpConfig>, env: string): Promise<{
24
- op: string;
25
- cron: string;
26
- }[]>;
27
- /**
28
- * The environment's overdue watches, each logged with `log`. `ops` are the
29
- * project's discovered Op configs; `dir` is the project, where `yodel ci`
30
- * writes its files.
31
- */
32
- export declare function overdueWatches(input: {
33
- ops: Iterable<OpConfig>;
34
- env: string;
35
- dir: string;
36
- forge: Pick<PrForge, "kind" | "scheduledRuns">;
37
- now: Date;
38
- log: (line: string) => void;
39
- }): Promise<OverdueOp[]>;
40
- /** The notes `yodel plan --comment` adds for the environment's overdue watches: discovers the Ops, never throws. */
41
- export declare function overdueNotes(dir: string, env: string, forge: Pick<PrForge, "kind" | "scheduledRuns">, log: (line: string) => void, now?: Date): Promise<string[]>;
@@ -1,46 +0,0 @@
1
- /**
2
- * The plan comment's warning that an environment's drift watch stopped
3
- * running (chant#4289). A scheduled job can stop with no error anywhere:
4
- * GitHub turns a scheduled workflow off after 60 days with no activity in
5
- * the repository, and on GitLab the job runs only from a pipeline schedule
6
- * someone created. The watch cannot report its own absence, so `yodel plan
7
- * --comment` asks the forge when the environment's WatchOp job last ran and
8
- * warns when its cron has fired at least twice since.
9
- *
10
- * chant decides and finds the file (`checkOverdueOps` in
11
- * `op/schedule-overdue.ts`, chant issue 4789): it reads every workflow and
12
- * pipeline file, `.gitlab/yodel-watch.gitlab-ci.yml` included, so yodel says
13
- * only which Ops. The Op is the WatchOp whose `Env` label is the environment
14
- * (chant's `WatchOp` sets `Watch` and `Env`).
15
- *
16
- * Nothing here fails the plan. A forge that does not answer is a line in
17
- * the job log and no warning.
18
- */
19
- /** The environment's scheduled WatchOps, by name. */
20
- export async function envWatches(ops, env) {
21
- const { scheduledWatches } = await import("@intentius/chant/op/schedule-overdue");
22
- return scheduledWatches([...ops].filter((o) => o.labels?.Watch === "true" && o.labels.Env === env));
23
- }
24
- /**
25
- * The environment's overdue watches, each logged with `log`. `ops` are the
26
- * project's discovered Op configs; `dir` is the project, where `yodel ci`
27
- * writes its files.
28
- */
29
- export async function overdueWatches(input) {
30
- const { checkOverdueOps } = await import("@intentius/chant/op/schedule-overdue");
31
- return checkOverdueOps({ watches: await envWatches(input.ops, input.env), forge: input.forge, repoRoot: input.dir, now: input.now, log: (line) => { input.log(`yodel plan: ${line}`); } });
32
- }
33
- /** The notes `yodel plan --comment` adds for the environment's overdue watches: discovers the Ops, never throws. */
34
- export async function overdueNotes(dir, env, forge, log, now = new Date()) {
35
- try {
36
- const { discoverOps } = await import("@intentius/chant/op/discover");
37
- const found = await discoverOps({ cwd: dir });
38
- const overdue = await overdueWatches({ ops: [...found.ops.values()].map((o) => o.config), env, dir, forge, now, log });
39
- return overdue.map((o) => `Warning: ${o.message}`);
40
- }
41
- catch (e) {
42
- log(`yodel plan: the watch schedule was not checked: ${(e instanceof Error ? e.message : String(e)).split("\n")[0] ?? ""}`);
43
- return [];
44
- }
45
- }
46
- //# sourceMappingURL=overdue.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"overdue.js","sourceRoot":"","sources":["../../src/pr/overdue.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAMH,qDAAqD;AACrD,MAAM,CAAC,KAAK,UAAU,UAAU,CAAC,GAAuB,EAAE,GAAW;IACnE,MAAM,EAAE,gBAAgB,EAAE,GAAG,MAAM,MAAM,CAAC,sCAAsC,CAAC,CAAC;IAClF,OAAO,gBAAgB,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,EAAE,KAAK,KAAK,MAAM,IAAI,CAAC,CAAC,MAAM,CAAC,GAAG,KAAK,GAAG,CAAC,CAAC,CAAC;AACtG,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,KAOpC;IACC,MAAM,EAAE,eAAe,EAAE,GAAG,MAAM,MAAM,CAAC,sCAAsC,CAAC,CAAC;IACjF,OAAO,eAAe,CAAC,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC,KAAK,CAAC,GAAG,EAAE,KAAK,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,QAAQ,EAAE,KAAK,CAAC,GAAG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