@codedrifters/configulator 0.0.463 → 0.0.465
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/lib/index.d.mts +67 -2
- package/lib/index.d.ts +67 -2
- package/lib/index.js +28 -2
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +27 -2
- package/lib/index.mjs.map +1 -1
- package/package.json +1 -1
package/lib/index.mjs
CHANGED
|
@@ -42672,6 +42672,22 @@ var resolveEnvironmentGate = (gate, environmentName, componentName) => {
|
|
|
42672
42672
|
}
|
|
42673
42673
|
return trimmed;
|
|
42674
42674
|
};
|
|
42675
|
+
var resolveDiffEnvironment = (gate, diffEnvironment, diffEnabled, componentName) => {
|
|
42676
|
+
if (!diffEnvironment) {
|
|
42677
|
+
return false;
|
|
42678
|
+
}
|
|
42679
|
+
if (gate !== DEPLOY_GATE.ENVIRONMENT) {
|
|
42680
|
+
throw new Error(
|
|
42681
|
+
`${componentName} requires \`gate\` to be "${DEPLOY_GATE.ENVIRONMENT}" when \`diff.environment\` is set, got ${gate ? `"${gate}"` : "no gate"}`
|
|
42682
|
+
);
|
|
42683
|
+
}
|
|
42684
|
+
if (!diffEnabled) {
|
|
42685
|
+
throw new Error(
|
|
42686
|
+
`${componentName} requires \`diff.enabled\` when \`diff.environment\` is set \u2014 there are no diff jobs to put the environment on`
|
|
42687
|
+
);
|
|
42688
|
+
}
|
|
42689
|
+
return true;
|
|
42690
|
+
};
|
|
42675
42691
|
|
|
42676
42692
|
// src/workflows/diff-report-job.ts
|
|
42677
42693
|
import { Component as Component23 } from "projen";
|
|
@@ -43600,10 +43616,17 @@ var AwsDeployWorkflow = class _AwsDeployWorkflow extends Component25 {
|
|
|
43600
43616
|
"AwsDeployWorkflow cannot disable `diff` under the `plan-apply` gate: the diff jobs are what keep the plan workflow publishing the build artifact the apply workflow deploys."
|
|
43601
43617
|
);
|
|
43602
43618
|
}
|
|
43619
|
+
const diffEnabled = options.diff?.enabled ?? isPlanApply;
|
|
43603
43620
|
this.diffOptions = {
|
|
43604
|
-
enabled:
|
|
43621
|
+
enabled: diffEnabled,
|
|
43605
43622
|
artifact: options.diff?.artifact ?? true,
|
|
43606
|
-
summary: options.diff?.summary ?? true
|
|
43623
|
+
summary: options.diff?.summary ?? true,
|
|
43624
|
+
environment: resolveDiffEnvironment(
|
|
43625
|
+
options.gate,
|
|
43626
|
+
options.diff?.environment,
|
|
43627
|
+
diffEnabled,
|
|
43628
|
+
"AwsDeployWorkflow"
|
|
43629
|
+
)
|
|
43607
43630
|
};
|
|
43608
43631
|
this.branchScopedConcurrency = options.branchScopedConcurrency ?? false;
|
|
43609
43632
|
this.environmentName = resolveEnvironmentGate(
|
|
@@ -43783,6 +43806,7 @@ var AwsDeployWorkflow = class _AwsDeployWorkflow extends Component25 {
|
|
|
43783
43806
|
contents: JobPermission7.READ,
|
|
43784
43807
|
idToken: JobPermission7.WRITE
|
|
43785
43808
|
},
|
|
43809
|
+
...this.diffOptions.environment && this.environmentName ? { environment: this.environmentName } : void 0,
|
|
43786
43810
|
concurrency: this.buildDiffConcurrency(diffJobName),
|
|
43787
43811
|
if: jobCondition,
|
|
43788
43812
|
steps: [...this.diffSteps(target)]
|
|
@@ -45145,6 +45169,7 @@ export {
|
|
|
45145
45169
|
resolveBuildPolicy,
|
|
45146
45170
|
resolveBundleAgentTiers,
|
|
45147
45171
|
resolveDefaultAgentTier,
|
|
45172
|
+
resolveDiffEnvironment,
|
|
45148
45173
|
resolveEnvironmentGate,
|
|
45149
45174
|
resolveIssueDefaults,
|
|
45150
45175
|
resolveIssueTemplates,
|