@intentius/terragucci 0.4.7 → 0.4.9
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/dist/estate.schema.json +1 -0
- package/dist/inventory.schema.json +1 -0
- package/dist/notify.schema.json +62 -56
- package/dist/report.schema.json +25 -3
- package/dist/run.schema.json +1 -1
- package/dist/terragucci.mjs +763 -668
- package/dist/terragucci.mjs.map +4 -4
- package/dist/terragucci.schema.json +527 -8
- package/dist/types.d.ts +126 -6
- package/package.json +6 -6
package/dist/estate.schema.json
CHANGED
|
@@ -293,6 +293,7 @@
|
|
|
293
293
|
"finished": { "type": "string" },
|
|
294
294
|
"wave": { "type": "integer" },
|
|
295
295
|
"report": { "type": "string", "description": "The wave's report.html, when the page can link it." },
|
|
296
|
+
"environment": { "type": "string", "description": "The environment of environments: in terragucci.yml the root was in when the wave applied. Absent when it was in none." },
|
|
296
297
|
"resources": { "type": "array", "items": { "$ref": "#/$defs/resource" } }
|
|
297
298
|
}
|
|
298
299
|
}
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
"finished": { "type": "string", "description": "When the wave that recorded the list finished." },
|
|
20
20
|
"wave": { "type": "integer" },
|
|
21
21
|
"path": { "type": "string", "description": "The wave's run directory, relative to the project's index.json." },
|
|
22
|
+
"environment": { "type": "string", "description": "The environment of environments: in terragucci.yml the root was in when the wave applied. Absent when it was in none." },
|
|
22
23
|
"resources": {
|
|
23
24
|
"type": "array",
|
|
24
25
|
"items": {
|
package/dist/notify.schema.json
CHANGED
|
@@ -1,66 +1,72 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "https://intentius.io/
|
|
4
|
-
"title": "
|
|
5
|
-
"description": "The event
|
|
3
|
+
"$id": "https://intentius.io/chant/schemas/notify/v1/notify.schema.json",
|
|
4
|
+
"title": "chant.notify/v1",
|
|
5
|
+
"description": "The event a notify webhook receives (#3761): a wave or environment waits for an approval, a run was refused or failed, or drift was found. Sent by chant's Op waves and by products built on chant (terragucci, SQL Yodeler) through @intentius/chant/notify, signed with HMAC-SHA256 over <timestamp>.<body>. Readers ignore fields they do not know; a field is only ever added within a version.",
|
|
6
6
|
"type": "object",
|
|
7
|
-
"required": ["schema", "id", "event", "
|
|
7
|
+
"required": ["schema", "id", "event", "at", "source", "project", "summary", "targets"],
|
|
8
8
|
"properties": {
|
|
9
|
-
"schema": { "const": "
|
|
10
|
-
"id": { "type": "string", "description": "
|
|
11
|
-
"event": { "enum": ["waiting", "refused", "failed"] },
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"pr": { "type": "integer", "description": "The pull or merge request the job applied, when a comment started it." },
|
|
18
|
-
"wave": { "type": "integer" },
|
|
19
|
-
"roots": { "type": "array", "items": { "type": "string" }, "description": "The wave's roots; for a refused or denied wave, the roots that moved or were denied; for a failed one, the roots that failed." },
|
|
20
|
-
"run_url": { "type": "string" },
|
|
21
|
-
"report_url": { "type": "string" },
|
|
22
|
-
"outcome": { "$ref": "#/$defs/outcome" }
|
|
23
|
-
},
|
|
24
|
-
"$defs": {
|
|
25
|
-
"outcome": {
|
|
9
|
+
"schema": { "const": "chant.notify/v1" },
|
|
10
|
+
"id": { "type": "string", "minLength": 1, "description": "The same for every send of one event about one digest (else drift fingerprint, else commit), so a receiver can drop a repeat; random when there is none. The delivery header carries it too." },
|
|
11
|
+
"event": { "enum": ["waiting", "refused", "failed", "drift"] },
|
|
12
|
+
"at": { "type": "string", "description": "When it was sent, ISO 8601 UTC." },
|
|
13
|
+
"source": { "type": "string", "minLength": 1, "description": "The product that sent it: chant, terragucci, sql-yodeler." },
|
|
14
|
+
"project": { "type": "string", "description": "What the run belongs to: the repository, or a name the product gives." },
|
|
15
|
+
"summary": { "type": "string", "description": "One line a person can read." },
|
|
16
|
+
"wave": {
|
|
26
17
|
"type": "object",
|
|
27
|
-
"
|
|
28
|
-
"required": ["schema", "status", "exit", "wave", "roots"],
|
|
18
|
+
"required": ["number"],
|
|
29
19
|
"properties": {
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"waiting_since": { "type": "string" },
|
|
20
|
+
"number": { "type": "integer", "minimum": 1 },
|
|
21
|
+
"name": { "type": "string" },
|
|
22
|
+
"gate": { "type": "string", "description": "The gate the wave waits on." }
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"environment": { "type": "string" },
|
|
26
|
+
"targets": { "type": "array", "items": { "type": "string" }, "description": "What the event concerns: a wave's roots or runs, an environment's pending migrations. For refused and failed, the ones refused or failed when the product knows them." },
|
|
27
|
+
"digest": { "type": "string", "description": "The plan digest an approval binds." },
|
|
28
|
+
"approve": {
|
|
29
|
+
"type": "object",
|
|
30
|
+
"description": "On waiting: how a person approves it.",
|
|
31
|
+
"required": ["command"],
|
|
32
|
+
"properties": {
|
|
33
|
+
"command": { "type": "string", "description": "The command to run, as the product prints it." },
|
|
34
|
+
"chant": { "type": "string", "description": "chant's own command for the same approval, when the product's differs." },
|
|
46
35
|
"review": {
|
|
47
36
|
"type": "object",
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
"type": "object",
|
|
53
|
-
"required": ["reason", "roots"],
|
|
54
|
-
"properties": {
|
|
55
|
-
"reason": { "enum": ["approval", "review", "override", "policy"] },
|
|
56
|
-
"approved": { "type": "string" },
|
|
57
|
-
"by": { "type": "string" },
|
|
58
|
-
"roots": { "type": "array", "items": { "type": "string" } }
|
|
59
|
-
}
|
|
60
|
-
},
|
|
61
|
-
"policy_denied": { "type": "array", "items": { "type": "string" } },
|
|
62
|
-
"failed_roots": { "type": "array", "items": { "type": "string" } }
|
|
37
|
+
"description": "Under pr-review: the pull request whose approving review would approve it.",
|
|
38
|
+
"required": ["pr", "url"],
|
|
39
|
+
"properties": { "pr": { "type": "integer" }, "url": { "type": "string" } }
|
|
40
|
+
}
|
|
63
41
|
}
|
|
64
|
-
}
|
|
65
|
-
|
|
42
|
+
},
|
|
43
|
+
"status": { "type": "string", "description": "The product's own word for the outcome." },
|
|
44
|
+
"reason": { "type": "string", "description": "On refused and failed: why." },
|
|
45
|
+
"exitCode": { "type": "integer" },
|
|
46
|
+
"drift": {
|
|
47
|
+
"type": "object",
|
|
48
|
+
"required": ["changed"],
|
|
49
|
+
"properties": {
|
|
50
|
+
"changed": { "type": "array", "items": { "type": "string" } },
|
|
51
|
+
"missing": { "type": "array", "items": { "type": "string" } },
|
|
52
|
+
"failed": { "type": "array", "items": { "type": "string" }, "description": "What could not be checked." },
|
|
53
|
+
"fingerprint": { "type": "string", "description": "The same drift has the same fingerprint, run after run." }
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
"run": {
|
|
57
|
+
"type": "object",
|
|
58
|
+
"properties": {
|
|
59
|
+
"url": { "type": "string", "description": "The CI run's page (GitHub, Forgejo) or job's page (GitLab)." },
|
|
60
|
+
"forge": { "enum": ["github", "gitlab", "forgejo"] },
|
|
61
|
+
"repository": { "type": "string" },
|
|
62
|
+
"commit": { "type": "string" },
|
|
63
|
+
"pr": { "type": "integer" }
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
"reportUrl": { "type": "string" },
|
|
67
|
+
"detail": { "type": "object", "description": "The product's own record of the outcome, carried whole (terragucci.outcome/v1)." }
|
|
68
|
+
},
|
|
69
|
+
"allOf": [
|
|
70
|
+
{ "if": { "required": ["event"], "properties": { "event": { "const": "drift" } } }, "then": { "required": ["drift"], "properties": { "drift": { "type": "object" } } } }
|
|
71
|
+
]
|
|
66
72
|
}
|
package/dist/report.schema.json
CHANGED
|
@@ -71,6 +71,7 @@
|
|
|
71
71
|
"required": ["path", "status", "plan_digest", "counts", "plan", "changes", "highlights", "fold", "why"],
|
|
72
72
|
"properties": {
|
|
73
73
|
"path": { "type": "string" },
|
|
74
|
+
"environment": { "type": "string", "description": "The environment of environments: in terragucci.yml the root is in (minor 33). Absent when the config names no environments or the root is in none." },
|
|
74
75
|
"binary": {
|
|
75
76
|
"description": "The binary the root ran, its version, and where the root pinned that version when it did (minor 18).",
|
|
76
77
|
"type": "object",
|
|
@@ -245,7 +246,7 @@
|
|
|
245
246
|
}
|
|
246
247
|
},
|
|
247
248
|
"reads": {
|
|
248
|
-
"description": "The roots whose state the root reads through terraform_remote_state, and which outputs it planned on: planned, the upstream's plan in this run, with the outputs known only once it applies under unknown; applied, its state as it stands (minor 21).",
|
|
249
|
+
"description": "The roots whose state the root reads through terraform_remote_state, or under choudoufu whose estate's outputs it reads through terraform_estate_outputs, and which outputs it planned on: planned, the upstream's plan in this run, with the outputs known only once it applies under unknown; applied, its state as it stands (minor 21).",
|
|
249
250
|
"type": "array",
|
|
250
251
|
"items": {
|
|
251
252
|
"type": "object",
|
|
@@ -271,7 +272,27 @@
|
|
|
271
272
|
}
|
|
272
273
|
}
|
|
273
274
|
},
|
|
274
|
-
"unaddressed": { "type": "string", "description": "Why the code does not address the root's own state, when a root of the run reads state through terraform_remote_state: a reader of it is not ordered after it (minor 30)." }
|
|
275
|
+
"unaddressed": { "type": "string", "description": "Why the code does not address the root's own state, when a root of the run reads state through terraform_remote_state: a reader of it is not ordered after it (minor 30)." },
|
|
276
|
+
"cone": {
|
|
277
|
+
"type": "object",
|
|
278
|
+
"description": "A choudoufu plan of a pull request's root under a live block, run with -cone=<base>: the cone it planned, or why choudoufu's guard planned the whole estate (minor 34). Absent on every other plan.",
|
|
279
|
+
"required": ["base"],
|
|
280
|
+
"properties": {
|
|
281
|
+
"base": { "type": "string", "description": "The revision the change is measured from: the pull request's base." },
|
|
282
|
+
"blocks": { "type": "integer", "description": "With a cone: the blocks it holds, when choudoufu said." },
|
|
283
|
+
"of": { "type": "integer", "description": "With a cone: the estate's blocks, when choudoufu said." },
|
|
284
|
+
"targets": { "type": "integer", "description": "With a cone: how many addresses it targets. Its targets join the root's plan digest." },
|
|
285
|
+
"fallback": {
|
|
286
|
+
"type": "object",
|
|
287
|
+
"description": "The guard planned the whole estate: its kind and why.",
|
|
288
|
+
"required": ["kind", "reason"],
|
|
289
|
+
"properties": {
|
|
290
|
+
"kind": { "type": "string" },
|
|
291
|
+
"reason": { "type": "string" }
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
}
|
|
275
296
|
}
|
|
276
297
|
}
|
|
277
298
|
},
|
|
@@ -353,7 +374,8 @@
|
|
|
353
374
|
}
|
|
354
375
|
}
|
|
355
376
|
}
|
|
356
|
-
}
|
|
377
|
+
},
|
|
378
|
+
"environments": { "type": "array", "items": { "type": "string" }, "description": "The environments of environments: in terragucci.yml its roots are in, sorted (minor 33). Absent when none of its roots is in one." }
|
|
357
379
|
}
|
|
358
380
|
}
|
|
359
381
|
},
|
package/dist/run.schema.json
CHANGED
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"reads": { "type": "array", "items": { "type": "integer" }, "description": "The waves whose roots' state its roots read." },
|
|
59
59
|
"state": { "enum": ["not-started", "planned", "waiting", "applying", "applied", "refused", "failed"] },
|
|
60
60
|
"gate": { "type": "string", "description": "Its gate on the ledger, wave-<n>." },
|
|
61
|
-
"policy": { "type": "string", "description": "The gate policy it ran under: always, on-
|
|
61
|
+
"policy": { "type": "string", "description": "The gate policy it ran under: always, on-destructive or never." },
|
|
62
62
|
"approval": { "enum": ["not-requested", "waiting", "approved", "not-required"] },
|
|
63
63
|
"digest": { "type": ["string", "null"], "description": "The set digest its gate decided on." },
|
|
64
64
|
"command": { "type": "string", "description": "The command that approves it, while it waits." },
|