@intentius/terragucci 0.4.40 → 0.4.41
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/report.schema.json +11 -2
- package/dist/terragucci.mjs +824 -782
- package/dist/terragucci.mjs.map +4 -4
- package/dist/terragucci.schema.json +0 -174
- package/dist/types.d.ts +6 -35
- package/package.json +6 -6
|
@@ -251,93 +251,6 @@
|
|
|
251
251
|
"pattern": "\\S",
|
|
252
252
|
"description": "The command that writes the roots before any job reads them."
|
|
253
253
|
},
|
|
254
|
-
"steps": {
|
|
255
|
-
"type": "array",
|
|
256
|
-
"items": {
|
|
257
|
-
"type": "object",
|
|
258
|
-
"properties": {
|
|
259
|
-
"name": {
|
|
260
|
-
"type": "string",
|
|
261
|
-
"pattern": "\\S"
|
|
262
|
-
},
|
|
263
|
-
"run": {
|
|
264
|
-
"type": "string",
|
|
265
|
-
"pattern": "\\S"
|
|
266
|
-
},
|
|
267
|
-
"before": {
|
|
268
|
-
"enum": [
|
|
269
|
-
"init",
|
|
270
|
-
"plan",
|
|
271
|
-
"apply",
|
|
272
|
-
"drift"
|
|
273
|
-
]
|
|
274
|
-
},
|
|
275
|
-
"after": {
|
|
276
|
-
"enum": [
|
|
277
|
-
"init",
|
|
278
|
-
"plan",
|
|
279
|
-
"apply",
|
|
280
|
-
"drift"
|
|
281
|
-
]
|
|
282
|
-
},
|
|
283
|
-
"roots": {
|
|
284
|
-
"type": "array",
|
|
285
|
-
"items": {
|
|
286
|
-
"type": "string"
|
|
287
|
-
}
|
|
288
|
-
},
|
|
289
|
-
"on_failure": {
|
|
290
|
-
"enum": [
|
|
291
|
-
"fail",
|
|
292
|
-
"approve"
|
|
293
|
-
]
|
|
294
|
-
}
|
|
295
|
-
},
|
|
296
|
-
"additionalProperties": false,
|
|
297
|
-
"required": [
|
|
298
|
-
"run"
|
|
299
|
-
],
|
|
300
|
-
"oneOf": [
|
|
301
|
-
{
|
|
302
|
-
"required": [
|
|
303
|
-
"before"
|
|
304
|
-
]
|
|
305
|
-
},
|
|
306
|
-
{
|
|
307
|
-
"required": [
|
|
308
|
-
"after"
|
|
309
|
-
]
|
|
310
|
-
}
|
|
311
|
-
],
|
|
312
|
-
"if": {
|
|
313
|
-
"properties": {
|
|
314
|
-
"on_failure": {
|
|
315
|
-
"const": "approve"
|
|
316
|
-
}
|
|
317
|
-
},
|
|
318
|
-
"required": [
|
|
319
|
-
"on_failure"
|
|
320
|
-
]
|
|
321
|
-
},
|
|
322
|
-
"then": {
|
|
323
|
-
"properties": {
|
|
324
|
-
"before": {
|
|
325
|
-
"enum": [
|
|
326
|
-
"init",
|
|
327
|
-
"plan"
|
|
328
|
-
]
|
|
329
|
-
},
|
|
330
|
-
"after": {
|
|
331
|
-
"enum": [
|
|
332
|
-
"init",
|
|
333
|
-
"plan"
|
|
334
|
-
]
|
|
335
|
-
}
|
|
336
|
-
}
|
|
337
|
-
}
|
|
338
|
-
},
|
|
339
|
-
"description": "Commands run before or after a root's init, plan, apply and drift."
|
|
340
|
-
},
|
|
341
254
|
"image": {
|
|
342
255
|
"type": "string",
|
|
343
256
|
"pattern": "^[^\\s]+$",
|
|
@@ -2084,93 +1997,6 @@
|
|
|
2084
1997
|
"pattern": "\\S",
|
|
2085
1998
|
"description": "The command that writes the roots before any job reads them."
|
|
2086
1999
|
},
|
|
2087
|
-
"steps": {
|
|
2088
|
-
"type": "array",
|
|
2089
|
-
"items": {
|
|
2090
|
-
"type": "object",
|
|
2091
|
-
"properties": {
|
|
2092
|
-
"name": {
|
|
2093
|
-
"type": "string",
|
|
2094
|
-
"pattern": "\\S"
|
|
2095
|
-
},
|
|
2096
|
-
"run": {
|
|
2097
|
-
"type": "string",
|
|
2098
|
-
"pattern": "\\S"
|
|
2099
|
-
},
|
|
2100
|
-
"before": {
|
|
2101
|
-
"enum": [
|
|
2102
|
-
"init",
|
|
2103
|
-
"plan",
|
|
2104
|
-
"apply",
|
|
2105
|
-
"drift"
|
|
2106
|
-
]
|
|
2107
|
-
},
|
|
2108
|
-
"after": {
|
|
2109
|
-
"enum": [
|
|
2110
|
-
"init",
|
|
2111
|
-
"plan",
|
|
2112
|
-
"apply",
|
|
2113
|
-
"drift"
|
|
2114
|
-
]
|
|
2115
|
-
},
|
|
2116
|
-
"roots": {
|
|
2117
|
-
"type": "array",
|
|
2118
|
-
"items": {
|
|
2119
|
-
"type": "string"
|
|
2120
|
-
}
|
|
2121
|
-
},
|
|
2122
|
-
"on_failure": {
|
|
2123
|
-
"enum": [
|
|
2124
|
-
"fail",
|
|
2125
|
-
"approve"
|
|
2126
|
-
]
|
|
2127
|
-
}
|
|
2128
|
-
},
|
|
2129
|
-
"additionalProperties": false,
|
|
2130
|
-
"required": [
|
|
2131
|
-
"run"
|
|
2132
|
-
],
|
|
2133
|
-
"oneOf": [
|
|
2134
|
-
{
|
|
2135
|
-
"required": [
|
|
2136
|
-
"before"
|
|
2137
|
-
]
|
|
2138
|
-
},
|
|
2139
|
-
{
|
|
2140
|
-
"required": [
|
|
2141
|
-
"after"
|
|
2142
|
-
]
|
|
2143
|
-
}
|
|
2144
|
-
],
|
|
2145
|
-
"if": {
|
|
2146
|
-
"properties": {
|
|
2147
|
-
"on_failure": {
|
|
2148
|
-
"const": "approve"
|
|
2149
|
-
}
|
|
2150
|
-
},
|
|
2151
|
-
"required": [
|
|
2152
|
-
"on_failure"
|
|
2153
|
-
]
|
|
2154
|
-
},
|
|
2155
|
-
"then": {
|
|
2156
|
-
"properties": {
|
|
2157
|
-
"before": {
|
|
2158
|
-
"enum": [
|
|
2159
|
-
"init",
|
|
2160
|
-
"plan"
|
|
2161
|
-
]
|
|
2162
|
-
},
|
|
2163
|
-
"after": {
|
|
2164
|
-
"enum": [
|
|
2165
|
-
"init",
|
|
2166
|
-
"plan"
|
|
2167
|
-
]
|
|
2168
|
-
}
|
|
2169
|
-
}
|
|
2170
|
-
}
|
|
2171
|
-
},
|
|
2172
|
-
"description": "Commands run before or after a root's init, plan, apply and drift."
|
|
2173
|
-
},
|
|
2174
2000
|
"image": {
|
|
2175
2001
|
"type": "string",
|
|
2176
2002
|
"pattern": "^[^\\s]+$",
|
package/dist/types.d.ts
CHANGED
|
@@ -53,7 +53,7 @@ export interface OverrideEntry {
|
|
|
53
53
|
/** The keys of one `approval_rules` entry. */
|
|
54
54
|
export declare const APPROVAL_RULE_KEYS: readonly ["roots", "count", "roles", "not_author"];
|
|
55
55
|
/**
|
|
56
|
-
* One `approval_rules` entry (
|
|
56
|
+
* One `approval_rules` entry, judged as chant's `approvals.quorum` rule (../approval.ts quorumOf): a wave with a root a glob
|
|
57
57
|
* of `roots` matches waits for `count` distinct approvers of its set digest
|
|
58
58
|
* (default 1), each holding one of `roles` in `.chant/trust.json` at base when
|
|
59
59
|
* `roles` is set, and with `not_author` at least one who is not the change's
|
|
@@ -124,30 +124,6 @@ export type ApplyWhen = (typeof APPLY_WHEN)[number];
|
|
|
124
124
|
export type Locks = (typeof LOCKS)[number];
|
|
125
125
|
export type ApplyMerge = (typeof APPLY_MERGE)[number];
|
|
126
126
|
export type ApplyRequire = (typeof APPLY_REQUIRES)[number];
|
|
127
|
-
/** The stages a step runs before or after (`steps:`). `drift` is the drift job's refresh-only plan. */
|
|
128
|
-
export declare const STEP_STAGES: readonly ["init", "plan", "apply", "drift"];
|
|
129
|
-
export type StepStage = (typeof STEP_STAGES)[number];
|
|
130
|
-
/** What a step's non-zero exit does: fail the root (the default), or hold its wave for an approval. */
|
|
131
|
-
export declare const STEP_FAILURES: readonly ["fail", "approve"];
|
|
132
|
-
export type StepFailure = (typeof STEP_FAILURES)[number];
|
|
133
|
-
export declare const STEP_KEYS: readonly ["name", "run", "before", "after", "roots", "on_failure"];
|
|
134
|
-
/**
|
|
135
|
-
* One entry of `steps:`. `run` is a shell command, run in the root's
|
|
136
|
-
* directory. Exactly one of `before` and `after` names the stage. `roots`
|
|
137
|
-
* are globs of the roots it runs for (every root when unset).
|
|
138
|
-
* `on_failure: approve` turns a non-zero exit into a hold: the root's wave
|
|
139
|
-
* waits for an approval of its set digest, whatever `gate` says. Only a step
|
|
140
|
-
* that runs before the gate is decided can hold it: one before or after
|
|
141
|
-
* init or plan.
|
|
142
|
-
*/
|
|
143
|
-
export interface StepSettings {
|
|
144
|
-
run: string;
|
|
145
|
-
name?: string;
|
|
146
|
-
before?: StepStage;
|
|
147
|
-
after?: StepStage;
|
|
148
|
-
roots?: string[];
|
|
149
|
-
on_failure?: StepFailure;
|
|
150
|
-
}
|
|
151
127
|
/**
|
|
152
128
|
* `apply:`: when a change applies. `when: merge` (the default) applies the
|
|
153
129
|
* default branch after a merge. `when: pull-request` applies an open pull
|
|
@@ -409,7 +385,7 @@ export declare const AGENT_DRIFT_RESPOND = "agent.drift opens the drift pull req
|
|
|
409
385
|
export interface ReviewSettings {
|
|
410
386
|
/** Turns the review on. */
|
|
411
387
|
agent?: boolean;
|
|
412
|
-
/** The command line, run with the prompt on stdin; it prints the review. Default: Claude Code in print mode with no tools (REVIEW_COMMAND in review-agent.ts). */
|
|
388
|
+
/** The command line, run with the prompt on stdin; it prints the review. Default: Claude Code in print mode with no tools (REVIEW_COMMAND in chant's op/activities/review-agent.ts). */
|
|
413
389
|
command?: string;
|
|
414
390
|
/** The secret holding the model's API key, mapped into the review command's step alone. Default `ANTHROPIC_API_KEY`. */
|
|
415
391
|
key_secret?: string;
|
|
@@ -467,17 +443,10 @@ export interface ProjectSettings {
|
|
|
467
443
|
* plan, apply and drift jobs, on their own checkout.
|
|
468
444
|
*/
|
|
469
445
|
synth?: string;
|
|
470
|
-
/**
|
|
471
|
-
* Commands run before and after a root's init, plan, apply and drift, in
|
|
472
|
-
* the stage's own job, on its checkout, with its environment less the forge
|
|
473
|
-
* tokens. Read from terragucci.yml at base, never from the change under
|
|
474
|
-
* review (./steps.ts).
|
|
475
|
-
*/
|
|
476
|
-
steps?: StepSettings[];
|
|
477
446
|
/**
|
|
478
447
|
* The image every job runs in, in place of terragucci's: one built FROM
|
|
479
448
|
* the terragucci image for the binary, so the job still has terragucci and
|
|
480
|
-
* the binary, plus what the
|
|
449
|
+
* the binary, plus what the `ci.hooks` need.
|
|
481
450
|
*/
|
|
482
451
|
image?: string;
|
|
483
452
|
/**
|
|
@@ -804,7 +773,7 @@ export declare const BUILT_IN: ResolvedSettings;
|
|
|
804
773
|
* own clone URL and `rollouts` belongs to a single repo, so `defaults`
|
|
805
774
|
* refuses both.
|
|
806
775
|
*/
|
|
807
|
-
export declare const PROJECT_FILE_KEYS: readonly ["policy", "sources", "reports", "approval", "approval_rules", "gate", "roots", "waves", "parallelism", "synth", "
|
|
776
|
+
export declare const PROJECT_FILE_KEYS: readonly ["policy", "sources", "reports", "approval", "approval_rules", "gate", "roots", "waves", "parallelism", "synth", "drift", "cost", "tips", "runtime", "telemetry", "respond", "review", "decide", "audit_region", "modules", "terragrunt", "token_env", "generate", "ephemeral", "environments", "secrets"];
|
|
808
777
|
export declare class ConfigError extends Error {
|
|
809
778
|
/** Every problem found, when the error is a validation failure. */
|
|
810
779
|
readonly problems?: string[];
|
|
@@ -844,6 +813,8 @@ export declare function agentLoginWarning(agent: {
|
|
|
844
813
|
token_env?: unknown;
|
|
845
814
|
login?: unknown;
|
|
846
815
|
} | undefined): string | undefined;
|
|
816
|
+
/** Why terragucci.yml takes no `steps:`: chant runs them, from chant.workspace.json. */
|
|
817
|
+
export declare const STEPS_MOVED = "steps are ci.hooks in chant.workspace.json now, each with a command list and perRun: true (before: init or drift is before.observe, after: init is before.plan, after: drift is after.plan, roots is targets, on_failure is onFailure); see https://intentius.io/terragucci/guides/run-steps/";
|
|
847
818
|
export declare const MODULES_KEYS: Set<string>;
|
|
848
819
|
export declare const REGISTRY_KEYS: string[];
|
|
849
820
|
/** A registry namespace or module name, as the Terraform module registry protocol allows them. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intentius/terragucci",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.41",
|
|
4
4
|
"description": "The whole Terraform lifecycle, handled: one config file, generated pipelines for GitHub, GitLab and Forgejo.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"build": "node ../../scripts/build-cli.mjs"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@intentius/chant": "0.124.
|
|
37
|
+
"@intentius/chant": "0.124.42"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
40
40
|
"@intentius/tsad-reference": "2.x",
|
|
@@ -50,10 +50,10 @@
|
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"@cdktn/hcl2json": "0.24.0",
|
|
53
|
-
"@intentius/chant-lexicon-forgejo": "0.124.
|
|
54
|
-
"@intentius/chant-lexicon-github": "0.124.
|
|
55
|
-
"@intentius/chant-lexicon-gitlab": "0.124.
|
|
56
|
-
"@intentius/chant-lexicon-terraform": "0.124.
|
|
53
|
+
"@intentius/chant-lexicon-forgejo": "0.124.42",
|
|
54
|
+
"@intentius/chant-lexicon-github": "0.124.42",
|
|
55
|
+
"@intentius/chant-lexicon-gitlab": "0.124.42",
|
|
56
|
+
"@intentius/chant-lexicon-terraform": "0.124.42",
|
|
57
57
|
"@intentius/tsad-reference": "2.1.0",
|
|
58
58
|
"@modelcontextprotocol/sdk": "1.30.1"
|
|
59
59
|
}
|