@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.mjs CHANGED
@@ -765,7 +765,7 @@ var VERSION = {
765
765
  *
766
766
  * CLI and lib are versioned separately, so this is the CLI version.
767
767
  */
768
- AWS_CDK_CLI_VERSION: "2.1109.0",
768
+ AWS_CDK_CLI_VERSION: "2.1110.0",
769
769
  /**
770
770
  * CDK Version to use for construct projects.
771
771
  *
@@ -783,7 +783,7 @@ var VERSION = {
783
783
  /**
784
784
  * Version of PNPM to use in workflows at github actions.
785
785
  */
786
- PNPM_VERSION: "10.31.0",
786
+ PNPM_VERSION: "10.32.0",
787
787
  /**
788
788
  * Version of Projen to use.
789
789
  */
@@ -791,7 +791,7 @@ var VERSION = {
791
791
  /**
792
792
  * What version of the turborepo library should we use?
793
793
  */
794
- TURBO_VERSION: "2.8.14",
794
+ TURBO_VERSION: "2.8.15",
795
795
  /**
796
796
  * What version of Vite to use (pnpm override). Pinned to 5.x so Vitest 4.x
797
797
  * can load config (Vite 6+/7+ are ESM-only; see issue #142). Remove override
@@ -1387,6 +1387,53 @@ function addApproveMergeUpgradeWorkflow(project, options) {
1387
1387
  });
1388
1388
  }
1389
1389
 
1390
+ // src/workflows/build-complete-job.ts
1391
+ import { JobPermission as JobPermission3 } from "projen/lib/github/workflows-model";
1392
+ var BUILD_JOB_ID = "build";
1393
+ var COMPLETE_JOB_ID = "complete";
1394
+ function buildCompleteJobRunScript(jobIds) {
1395
+ const lines = [];
1396
+ for (const id of jobIds) {
1397
+ const expr = "${{ needs." + id + ".result }}";
1398
+ if (id === BUILD_JOB_ID) {
1399
+ lines.push(
1400
+ `if [ "${expr}" != "success" ]; then echo "Job ${id} must succeed"; exit 1; fi`
1401
+ );
1402
+ } else {
1403
+ lines.push(
1404
+ `if [ "${expr}" != "success" ] && [ "${expr}" != "skipped" ]; then echo "Job ${id} must succeed or be skipped"; exit 1; fi`
1405
+ );
1406
+ }
1407
+ }
1408
+ return lines.join("\n");
1409
+ }
1410
+ function addBuildCompleteJob(buildWorkflow) {
1411
+ const w = buildWorkflow.workflow;
1412
+ if (!w?.jobs || typeof w.addJob !== "function") {
1413
+ return;
1414
+ }
1415
+ const jobIds = Object.keys(w.jobs).filter((id) => id !== COMPLETE_JOB_ID);
1416
+ if (jobIds.length === 0) {
1417
+ return;
1418
+ }
1419
+ const runScript = buildCompleteJobRunScript(jobIds);
1420
+ w.addJob(COMPLETE_JOB_ID, {
1421
+ name: "Complete",
1422
+ needs: jobIds,
1423
+ if: "always()",
1424
+ runsOn: ["ubuntu-latest"],
1425
+ permissions: {
1426
+ contents: JobPermission3.NONE
1427
+ },
1428
+ steps: [
1429
+ {
1430
+ name: "Verify all jobs succeeded or were skipped",
1431
+ run: runScript
1432
+ }
1433
+ ]
1434
+ });
1435
+ }
1436
+
1390
1437
  // src/projects/monorepo-project.ts
1391
1438
  var postInstallDependenciesMap = /* @__PURE__ */ new WeakMap();
1392
1439
  var MonorepoProject = class extends TypeScriptAppProject {
@@ -1624,6 +1671,9 @@ var MonorepoProject = class extends TypeScriptAppProject {
1624
1671
  if (options.approveMergeUpgradeOptions) {
1625
1672
  addApproveMergeUpgradeWorkflow(this, options.approveMergeUpgradeOptions);
1626
1673
  }
1674
+ if (this.buildWorkflow) {
1675
+ addBuildCompleteJob(this.buildWorkflow);
1676
+ }
1627
1677
  this.tasks.tryFind("post-upgrade")?.exec("pnpm upgrade -r");
1628
1678
  this.tasks.tryFind("post-upgrade")?.spawn(this.defaultTask);
1629
1679
  }
@@ -1690,7 +1740,7 @@ var import_utils3 = __toESM(require_lib());
1690
1740
  import { Component as Component11 } from "projen";
1691
1741
  import { BuildWorkflow } from "projen/lib/build";
1692
1742
  import { GitHub } from "projen/lib/github";
1693
- import { JobPermission as JobPermission3 } from "projen/lib/github/workflows-model";
1743
+ import { JobPermission as JobPermission4 } from "projen/lib/github/workflows-model";
1694
1744
  var PROD_DEPLOY_NAME = "prod-deploy";
1695
1745
  var AwsDeployWorkflow = class _AwsDeployWorkflow extends Component11 {
1696
1746
  constructor(project, options = {}) {
@@ -1919,14 +1969,15 @@ var AwsDeployWorkflow = class _AwsDeployWorkflow extends Component11 {
1919
1969
  ],
1920
1970
  runsOn: ["ubuntu-latest"],
1921
1971
  permissions: {
1922
- contents: JobPermission3.READ,
1923
- idToken: JobPermission3.WRITE
1972
+ contents: JobPermission4.READ,
1973
+ idToken: JobPermission4.WRITE
1924
1974
  },
1925
1975
  concurrency: deployJobName,
1926
1976
  if: jobCondition,
1927
1977
  steps: [...this.deploySteps(target)]
1928
1978
  });
1929
1979
  });
1980
+ addBuildCompleteJob(this.buildWorkflow);
1930
1981
  }
1931
1982
  static of(project, buildWorkflow) {
1932
1983
  const isDefined = (c) => c instanceof _AwsDeployWorkflow && c.buildWorkflow === buildWorkflow;
@@ -1958,6 +2009,7 @@ export {
1958
2009
  AwsDeployWorkflow,
1959
2010
  AwsDeploymentConfig,
1960
2011
  AwsDeploymentTarget,
2012
+ COMPLETE_JOB_ID,
1961
2013
  JsiiFaker,
1962
2014
  MERGE_METHODS,
1963
2015
  MIMIMUM_RELEASE_AGE,
@@ -1978,6 +2030,7 @@ export {
1978
2030
  VSCodeConfig,
1979
2031
  Vitest,
1980
2032
  addApproveMergeUpgradeWorkflow,
2033
+ addBuildCompleteJob,
1981
2034
  getLatestEligibleVersion
1982
2035
  };
1983
2036
  //# sourceMappingURL=index.mjs.map