@codedrifters/configulator 0.0.126 → 0.0.128

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 CHANGED
@@ -372,7 +372,7 @@ declare const VERSION: {
372
372
  *
373
373
  * CLI and lib are versioned separately, so this is the CLI version.
374
374
  */
375
- readonly AWS_CDK_CLI_VERSION: "2.1109.0";
375
+ readonly AWS_CDK_CLI_VERSION: "2.1110.0";
376
376
  /**
377
377
  * CDK Version to use for construct projects.
378
378
  *
@@ -390,7 +390,7 @@ declare const VERSION: {
390
390
  /**
391
391
  * Version of PNPM to use in workflows at github actions.
392
392
  */
393
- readonly PNPM_VERSION: "10.31.0";
393
+ readonly PNPM_VERSION: "10.32.0";
394
394
  /**
395
395
  * Version of Projen to use.
396
396
  */
@@ -398,7 +398,7 @@ declare const VERSION: {
398
398
  /**
399
399
  * What version of the turborepo library should we use?
400
400
  */
401
- readonly TURBO_VERSION: "2.8.14";
401
+ readonly TURBO_VERSION: "2.8.15";
402
402
  /**
403
403
  * What version of Vite to use (pnpm override). Pinned to 5.x so Vitest 4.x
404
404
  * can load config (Vite 6+/7+ are ESM-only; see issue #142). Remove override
@@ -1586,4 +1586,17 @@ declare class AwsDeployWorkflow extends Component {
1586
1586
  preSynthesize(): void;
1587
1587
  }
1588
1588
 
1589
- export { type ApproveMergeUpgradeOptions, type AwsAccount, AwsDeployWorkflow, AwsDeploymentConfig, AwsDeploymentTarget, type AwsDeploymentTargetOptions, type AwsLocalDeploymentConfig, type AwsOrganization, type AwsRegion, type CiDeploymentConfig, type ClassTypeOptions, type DeployWorkflowOptions, type GitBranch, type IDependencyResolver, JsiiFaker, MERGE_METHODS, MIMIMUM_RELEASE_AGE, type MergeMethod, MonorepoProject, type MonorepoProjectOptions, PROD_DEPLOY_NAME, PnpmWorkspace, type PnpmWorkspaceOptions, ROOT_CI_TASK_NAME, ROOT_TURBO_TASK_NAME, type RemoteCacheOptions, ResetTask, type ResetTaskOptions, TestRunner, TurboRepo, type TurboRepoOptions, TurboRepoTask, type TurboRepoTaskOptions, TypeScriptConfig, TypeScriptProject, type TypeScriptProjectOptions, VERSION, VERSION_KEYS_SKIP, VERSION_NPM_PACKAGES, VSCodeConfig, type VersionKey, Vitest, type VitestConfigOptions, type VitestOptions, addApproveMergeUpgradeWorkflow, getLatestEligibleVersion };
1589
+ /** Name of the gate job appended to build workflows (ADR 0004). */
1590
+ declare const COMPLETE_JOB_ID = "complete";
1591
+ /**
1592
+ * Appends the "complete" gate job to a build workflow (ADR 0004, issue #165).
1593
+ * The job runs after all other jobs, uses {@code if: always()}, and succeeds
1594
+ * only when the build job succeeded and every other job succeeded or was skipped.
1595
+ * Call this for the default build workflow and for any build workflow created
1596
+ * by Configulator (e.g. AwsDeployWorkflow).
1597
+ *
1598
+ * @param buildWorkflow The Projen BuildWorkflow to append the complete job to.
1599
+ */
1600
+ declare function addBuildCompleteJob(buildWorkflow: BuildWorkflow): void;
1601
+
1602
+ export { type ApproveMergeUpgradeOptions, type AwsAccount, AwsDeployWorkflow, AwsDeploymentConfig, AwsDeploymentTarget, type AwsDeploymentTargetOptions, type AwsLocalDeploymentConfig, type AwsOrganization, type AwsRegion, COMPLETE_JOB_ID, type CiDeploymentConfig, type ClassTypeOptions, type DeployWorkflowOptions, type GitBranch, type IDependencyResolver, JsiiFaker, MERGE_METHODS, MIMIMUM_RELEASE_AGE, type MergeMethod, MonorepoProject, type MonorepoProjectOptions, PROD_DEPLOY_NAME, PnpmWorkspace, type PnpmWorkspaceOptions, ROOT_CI_TASK_NAME, ROOT_TURBO_TASK_NAME, type RemoteCacheOptions, ResetTask, type ResetTaskOptions, TestRunner, TurboRepo, type TurboRepoOptions, TurboRepoTask, type TurboRepoTaskOptions, TypeScriptConfig, TypeScriptProject, type TypeScriptProjectOptions, VERSION, VERSION_KEYS_SKIP, VERSION_NPM_PACKAGES, VSCodeConfig, type VersionKey, Vitest, type VitestConfigOptions, type VitestOptions, addApproveMergeUpgradeWorkflow, addBuildCompleteJob, getLatestEligibleVersion };
package/lib/index.d.ts CHANGED
@@ -421,7 +421,7 @@ declare const VERSION: {
421
421
  *
422
422
  * CLI and lib are versioned separately, so this is the CLI version.
423
423
  */
424
- readonly AWS_CDK_CLI_VERSION: "2.1109.0";
424
+ readonly AWS_CDK_CLI_VERSION: "2.1110.0";
425
425
  /**
426
426
  * CDK Version to use for construct projects.
427
427
  *
@@ -439,7 +439,7 @@ declare const VERSION: {
439
439
  /**
440
440
  * Version of PNPM to use in workflows at github actions.
441
441
  */
442
- readonly PNPM_VERSION: "10.31.0";
442
+ readonly PNPM_VERSION: "10.32.0";
443
443
  /**
444
444
  * Version of Projen to use.
445
445
  */
@@ -447,7 +447,7 @@ declare const VERSION: {
447
447
  /**
448
448
  * What version of the turborepo library should we use?
449
449
  */
450
- readonly TURBO_VERSION: "2.8.14";
450
+ readonly TURBO_VERSION: "2.8.15";
451
451
  /**
452
452
  * What version of Vite to use (pnpm override). Pinned to 5.x so Vitest 4.x
453
453
  * can load config (Vite 6+/7+ are ESM-only; see issue #142). Remove override
@@ -1635,5 +1635,18 @@ declare class AwsDeployWorkflow extends Component {
1635
1635
  preSynthesize(): void;
1636
1636
  }
1637
1637
 
1638
- export { AwsDeployWorkflow, AwsDeploymentConfig, AwsDeploymentTarget, JsiiFaker, MERGE_METHODS, MIMIMUM_RELEASE_AGE, MonorepoProject, PROD_DEPLOY_NAME, PnpmWorkspace, ROOT_CI_TASK_NAME, ROOT_TURBO_TASK_NAME, ResetTask, TestRunner, TurboRepo, TurboRepoTask, TypeScriptConfig, TypeScriptProject, VERSION, VERSION_KEYS_SKIP, VERSION_NPM_PACKAGES, VSCodeConfig, Vitest, addApproveMergeUpgradeWorkflow, getLatestEligibleVersion };
1638
+ /** Name of the gate job appended to build workflows (ADR 0004). */
1639
+ declare const COMPLETE_JOB_ID = "complete";
1640
+ /**
1641
+ * Appends the "complete" gate job to a build workflow (ADR 0004, issue #165).
1642
+ * The job runs after all other jobs, uses {@code if: always()}, and succeeds
1643
+ * only when the build job succeeded and every other job succeeded or was skipped.
1644
+ * Call this for the default build workflow and for any build workflow created
1645
+ * by Configulator (e.g. AwsDeployWorkflow).
1646
+ *
1647
+ * @param buildWorkflow The Projen BuildWorkflow to append the complete job to.
1648
+ */
1649
+ declare function addBuildCompleteJob(buildWorkflow: BuildWorkflow): void;
1650
+
1651
+ export { AwsDeployWorkflow, AwsDeploymentConfig, AwsDeploymentTarget, COMPLETE_JOB_ID, JsiiFaker, MERGE_METHODS, MIMIMUM_RELEASE_AGE, MonorepoProject, PROD_DEPLOY_NAME, PnpmWorkspace, ROOT_CI_TASK_NAME, ROOT_TURBO_TASK_NAME, ResetTask, TestRunner, TurboRepo, TurboRepoTask, TypeScriptConfig, TypeScriptProject, VERSION, VERSION_KEYS_SKIP, VERSION_NPM_PACKAGES, VSCodeConfig, Vitest, addApproveMergeUpgradeWorkflow, addBuildCompleteJob, getLatestEligibleVersion };
1639
1652
  export type { ApproveMergeUpgradeOptions, AwsAccount, AwsDeploymentTargetOptions, AwsLocalDeploymentConfig, AwsOrganization, AwsRegion, CiDeploymentConfig, ClassTypeOptions, DeployWorkflowOptions, GitBranch, IDependencyResolver, MergeMethod, MonorepoProjectOptions, PnpmWorkspaceOptions, RemoteCacheOptions, ResetTaskOptions, TurboRepoOptions, TurboRepoTaskOptions, TypeScriptProjectOptions, VersionKey, VitestConfigOptions, VitestOptions };
package/lib/index.js CHANGED
@@ -178,6 +178,7 @@ __export(index_exports, {
178
178
  AwsDeployWorkflow: () => AwsDeployWorkflow,
179
179
  AwsDeploymentConfig: () => AwsDeploymentConfig,
180
180
  AwsDeploymentTarget: () => AwsDeploymentTarget,
181
+ COMPLETE_JOB_ID: () => COMPLETE_JOB_ID,
181
182
  JsiiFaker: () => JsiiFaker,
182
183
  MERGE_METHODS: () => MERGE_METHODS,
183
184
  MIMIMUM_RELEASE_AGE: () => MIMIMUM_RELEASE_AGE,
@@ -198,6 +199,7 @@ __export(index_exports, {
198
199
  VSCodeConfig: () => VSCodeConfig,
199
200
  Vitest: () => Vitest,
200
201
  addApproveMergeUpgradeWorkflow: () => addApproveMergeUpgradeWorkflow,
202
+ addBuildCompleteJob: () => addBuildCompleteJob,
201
203
  getLatestEligibleVersion: () => getLatestEligibleVersion
202
204
  });
203
205
  module.exports = __toCommonJS(index_exports);
@@ -795,7 +797,7 @@ var VERSION = {
795
797
  *
796
798
  * CLI and lib are versioned separately, so this is the CLI version.
797
799
  */
798
- AWS_CDK_CLI_VERSION: "2.1109.0",
800
+ AWS_CDK_CLI_VERSION: "2.1110.0",
799
801
  /**
800
802
  * CDK Version to use for construct projects.
801
803
  *
@@ -813,7 +815,7 @@ var VERSION = {
813
815
  /**
814
816
  * Version of PNPM to use in workflows at github actions.
815
817
  */
816
- PNPM_VERSION: "10.31.0",
818
+ PNPM_VERSION: "10.32.0",
817
819
  /**
818
820
  * Version of Projen to use.
819
821
  */
@@ -821,7 +823,7 @@ var VERSION = {
821
823
  /**
822
824
  * What version of the turborepo library should we use?
823
825
  */
824
- TURBO_VERSION: "2.8.14",
826
+ TURBO_VERSION: "2.8.15",
825
827
  /**
826
828
  * What version of Vite to use (pnpm override). Pinned to 5.x so Vitest 4.x
827
829
  * can load config (Vite 6+/7+ are ESM-only; see issue #142). Remove override
@@ -1407,6 +1409,53 @@ function addApproveMergeUpgradeWorkflow(project, options) {
1407
1409
  });
1408
1410
  }
1409
1411
 
1412
+ // src/workflows/build-complete-job.ts
1413
+ var import_workflows_model3 = require("projen/lib/github/workflows-model");
1414
+ var BUILD_JOB_ID = "build";
1415
+ var COMPLETE_JOB_ID = "complete";
1416
+ function buildCompleteJobRunScript(jobIds) {
1417
+ const lines = [];
1418
+ for (const id of jobIds) {
1419
+ const expr = "${{ needs." + id + ".result }}";
1420
+ if (id === BUILD_JOB_ID) {
1421
+ lines.push(
1422
+ `if [ "${expr}" != "success" ]; then echo "Job ${id} must succeed"; exit 1; fi`
1423
+ );
1424
+ } else {
1425
+ lines.push(
1426
+ `if [ "${expr}" != "success" ] && [ "${expr}" != "skipped" ]; then echo "Job ${id} must succeed or be skipped"; exit 1; fi`
1427
+ );
1428
+ }
1429
+ }
1430
+ return lines.join("\n");
1431
+ }
1432
+ function addBuildCompleteJob(buildWorkflow) {
1433
+ const w = buildWorkflow.workflow;
1434
+ if (!w?.jobs || typeof w.addJob !== "function") {
1435
+ return;
1436
+ }
1437
+ const jobIds = Object.keys(w.jobs).filter((id) => id !== COMPLETE_JOB_ID);
1438
+ if (jobIds.length === 0) {
1439
+ return;
1440
+ }
1441
+ const runScript = buildCompleteJobRunScript(jobIds);
1442
+ w.addJob(COMPLETE_JOB_ID, {
1443
+ name: "Complete",
1444
+ needs: jobIds,
1445
+ if: "always()",
1446
+ runsOn: ["ubuntu-latest"],
1447
+ permissions: {
1448
+ contents: import_workflows_model3.JobPermission.NONE
1449
+ },
1450
+ steps: [
1451
+ {
1452
+ name: "Verify all jobs succeeded or were skipped",
1453
+ run: runScript
1454
+ }
1455
+ ]
1456
+ });
1457
+ }
1458
+
1410
1459
  // src/projects/monorepo-project.ts
1411
1460
  var postInstallDependenciesMap = /* @__PURE__ */ new WeakMap();
1412
1461
  var MonorepoProject = class extends import_typescript.TypeScriptAppProject {
@@ -1644,6 +1693,9 @@ var MonorepoProject = class extends import_typescript.TypeScriptAppProject {
1644
1693
  if (options.approveMergeUpgradeOptions) {
1645
1694
  addApproveMergeUpgradeWorkflow(this, options.approveMergeUpgradeOptions);
1646
1695
  }
1696
+ if (this.buildWorkflow) {
1697
+ addBuildCompleteJob(this.buildWorkflow);
1698
+ }
1647
1699
  this.tasks.tryFind("post-upgrade")?.exec("pnpm upgrade -r");
1648
1700
  this.tasks.tryFind("post-upgrade")?.spawn(this.defaultTask);
1649
1701
  }
@@ -1710,7 +1762,7 @@ var import_utils3 = __toESM(require_lib());
1710
1762
  var import_projen10 = require("projen");
1711
1763
  var import_build = require("projen/lib/build");
1712
1764
  var import_github = require("projen/lib/github");
1713
- var import_workflows_model3 = require("projen/lib/github/workflows-model");
1765
+ var import_workflows_model4 = require("projen/lib/github/workflows-model");
1714
1766
  var PROD_DEPLOY_NAME = "prod-deploy";
1715
1767
  var AwsDeployWorkflow = class _AwsDeployWorkflow extends import_projen10.Component {
1716
1768
  constructor(project, options = {}) {
@@ -1939,14 +1991,15 @@ var AwsDeployWorkflow = class _AwsDeployWorkflow extends import_projen10.Compone
1939
1991
  ],
1940
1992
  runsOn: ["ubuntu-latest"],
1941
1993
  permissions: {
1942
- contents: import_workflows_model3.JobPermission.READ,
1943
- idToken: import_workflows_model3.JobPermission.WRITE
1994
+ contents: import_workflows_model4.JobPermission.READ,
1995
+ idToken: import_workflows_model4.JobPermission.WRITE
1944
1996
  },
1945
1997
  concurrency: deployJobName,
1946
1998
  if: jobCondition,
1947
1999
  steps: [...this.deploySteps(target)]
1948
2000
  });
1949
2001
  });
2002
+ addBuildCompleteJob(this.buildWorkflow);
1950
2003
  }
1951
2004
  static of(project, buildWorkflow) {
1952
2005
  const isDefined = (c) => c instanceof _AwsDeployWorkflow && c.buildWorkflow === buildWorkflow;
@@ -1979,6 +2032,7 @@ var AwsDeployWorkflow = class _AwsDeployWorkflow extends import_projen10.Compone
1979
2032
  AwsDeployWorkflow,
1980
2033
  AwsDeploymentConfig,
1981
2034
  AwsDeploymentTarget,
2035
+ COMPLETE_JOB_ID,
1982
2036
  JsiiFaker,
1983
2037
  MERGE_METHODS,
1984
2038
  MIMIMUM_RELEASE_AGE,
@@ -1999,6 +2053,7 @@ var AwsDeployWorkflow = class _AwsDeployWorkflow extends import_projen10.Compone
1999
2053
  VSCodeConfig,
2000
2054
  Vitest,
2001
2055
  addApproveMergeUpgradeWorkflow,
2056
+ addBuildCompleteJob,
2002
2057
  getLatestEligibleVersion
2003
2058
  });
2004
2059
  //# sourceMappingURL=index.js.map