@codedrifters/configulator 0.0.319 → 0.0.320

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
@@ -33987,8 +33987,67 @@ function addBuildCompleteJob(buildWorkflow) {
33987
33987
  });
33988
33988
  }
33989
33989
 
33990
- // src/workflows/pin-pnpm-action-setup.ts
33990
+ // src/workflows/include-hidden-files-in-build-artifact.ts
33991
33991
  import { GitHub as GitHub2 } from "projen/lib/github";
33992
+ var UPLOAD_ARTIFACT_STEP_NAME = "Upload artifact";
33993
+ var UPLOAD_ARTIFACT_PREFIX = "actions/upload-artifact@";
33994
+ var BUILD_ARTIFACT_WITH_NAME = "build-artifact";
33995
+ function includeHiddenFilesInBuildArtifact(project) {
33996
+ const github = GitHub2.of(project);
33997
+ if (!github) {
33998
+ return;
33999
+ }
34000
+ for (const workflow of github.workflows) {
34001
+ for (const job of Object.values(workflow.jobs)) {
34002
+ patchJobSteps(job);
34003
+ }
34004
+ }
34005
+ }
34006
+ function patchJobSteps(job) {
34007
+ if (typeof job !== "object" || job === null) {
34008
+ return;
34009
+ }
34010
+ const mutable = job;
34011
+ const steps = mutable.steps;
34012
+ if (Array.isArray(steps)) {
34013
+ patchStepArray(steps);
34014
+ return;
34015
+ }
34016
+ if (typeof steps === "function") {
34017
+ const original = steps;
34018
+ mutable.steps = () => {
34019
+ const rendered = original();
34020
+ patchStepArray(rendered);
34021
+ return rendered;
34022
+ };
34023
+ }
34024
+ }
34025
+ function patchStepArray(steps) {
34026
+ for (const step of steps) {
34027
+ if (isBuildArtifactUploadStep(step)) {
34028
+ if (!step.with || typeof step.with !== "object") {
34029
+ step.with = {};
34030
+ }
34031
+ step.with["include-hidden-files"] = true;
34032
+ }
34033
+ }
34034
+ }
34035
+ function isBuildArtifactUploadStep(step) {
34036
+ if (step.name !== UPLOAD_ARTIFACT_STEP_NAME) {
34037
+ return false;
34038
+ }
34039
+ if (typeof step.uses !== "string" || !step.uses.startsWith(UPLOAD_ARTIFACT_PREFIX)) {
34040
+ return false;
34041
+ }
34042
+ const withBlock = step.with;
34043
+ if (!withBlock || typeof withBlock !== "object") {
34044
+ return false;
34045
+ }
34046
+ return withBlock.name === BUILD_ARTIFACT_WITH_NAME;
34047
+ }
34048
+
34049
+ // src/workflows/pin-pnpm-action-setup.ts
34050
+ import { GitHub as GitHub3 } from "projen/lib/github";
33992
34051
  var PNPM_ACTION_SETUP_PREFIX = "pnpm/action-setup@";
33993
34052
  var STEP_ARRAY_FIELDS = ["preBuildSteps", "postBuildSteps"];
33994
34053
  function pinPnpmActionSetup(project) {
@@ -33997,13 +34056,13 @@ function pinPnpmActionSetup(project) {
33997
34056
  for (const sub of project.subprojects) {
33998
34057
  patchComponentStepArrays(sub, pinned);
33999
34058
  }
34000
- const github = GitHub2.of(project);
34059
+ const github = GitHub3.of(project);
34001
34060
  if (!github) {
34002
34061
  return;
34003
34062
  }
34004
34063
  for (const workflow of github.workflows) {
34005
34064
  for (const job of Object.values(workflow.jobs)) {
34006
- patchStepArray(getEagerSteps(job), pinned);
34065
+ patchStepArray2(getEagerSteps(job), pinned);
34007
34066
  }
34008
34067
  }
34009
34068
  }
@@ -34012,7 +34071,7 @@ function patchComponentStepArrays(project, pinned) {
34012
34071
  for (const field of STEP_ARRAY_FIELDS) {
34013
34072
  const steps = readStepArray(component, field);
34014
34073
  if (steps !== void 0) {
34015
- patchStepArray(steps, pinned);
34074
+ patchStepArray2(steps, pinned);
34016
34075
  }
34017
34076
  }
34018
34077
  }
@@ -34028,7 +34087,7 @@ function getEagerSteps(job) {
34028
34087
  const steps = job.steps;
34029
34088
  return Array.isArray(steps) ? steps : void 0;
34030
34089
  }
34031
- function patchStepArray(steps, pinned) {
34090
+ function patchStepArray2(steps, pinned) {
34032
34091
  if (!steps) {
34033
34092
  return;
34034
34093
  }
@@ -34040,7 +34099,7 @@ function patchStepArray(steps, pinned) {
34040
34099
  }
34041
34100
 
34042
34101
  // src/workflows/pin-setup-node-version.ts
34043
- import { GitHub as GitHub3 } from "projen/lib/github";
34102
+ import { GitHub as GitHub4 } from "projen/lib/github";
34044
34103
  var SETUP_NODE_PREFIX = "actions/setup-node@";
34045
34104
  var STEP_ARRAY_FIELDS2 = ["preBuildSteps", "postBuildSteps"];
34046
34105
  var NODE_VERSION_FIELDS = ["workflowNodeVersion"];
@@ -34052,14 +34111,14 @@ function pinSetupNodeVersion(project) {
34052
34111
  patchComponentNodeVersionFields(sub, pinned);
34053
34112
  patchComponentStepArrays2(sub, pinned);
34054
34113
  }
34055
- const github = GitHub3.of(project);
34114
+ const github = GitHub4.of(project);
34056
34115
  if (!github) {
34057
34116
  return;
34058
34117
  }
34059
34118
  for (const workflow of github.workflows) {
34060
34119
  for (const job of Object.values(workflow.jobs)) {
34061
34120
  patchJobToolsNode(job, pinned);
34062
- patchStepArray2(getEagerSteps2(job), pinned);
34121
+ patchStepArray3(getEagerSteps2(job), pinned);
34063
34122
  }
34064
34123
  }
34065
34124
  }
@@ -34079,7 +34138,7 @@ function patchComponentStepArrays2(project, pinned) {
34079
34138
  for (const field of STEP_ARRAY_FIELDS2) {
34080
34139
  const steps = readStepArray2(component, field);
34081
34140
  if (steps !== void 0) {
34082
- patchStepArray2(steps, pinned);
34141
+ patchStepArray3(steps, pinned);
34083
34142
  }
34084
34143
  }
34085
34144
  }
@@ -34111,7 +34170,7 @@ function patchJobToolsNode(job, pinned) {
34111
34170
  node.version = pinned;
34112
34171
  }
34113
34172
  }
34114
- function patchStepArray2(steps, pinned) {
34173
+ function patchStepArray3(steps, pinned) {
34115
34174
  if (!steps) {
34116
34175
  return;
34117
34176
  }
@@ -34680,6 +34739,7 @@ var MonorepoProject = class extends TypeScriptAppProject {
34680
34739
  super.preSynthesize();
34681
34740
  pinPnpmActionSetup(this);
34682
34741
  pinSetupNodeVersion(this);
34742
+ includeHiddenFilesInBuildArtifact(this);
34683
34743
  if (this.layoutEnforcement === LAYOUT_ENFORCEMENT.OFF) {
34684
34744
  return;
34685
34745
  }
@@ -35188,7 +35248,7 @@ import { merge as merge4 } from "ts-deepmerge";
35188
35248
  var import_utils11 = __toESM(require_lib());
35189
35249
  import { Component as Component21 } from "projen";
35190
35250
  import { BuildWorkflow } from "projen/lib/build";
35191
- import { GitHub as GitHub4, WorkflowSteps as WorkflowSteps2 } from "projen/lib/github";
35251
+ import { GitHub as GitHub5, WorkflowSteps as WorkflowSteps2 } from "projen/lib/github";
35192
35252
  import { JobPermission as JobPermission5 } from "projen/lib/github/workflows-model";
35193
35253
  var PROD_DEPLOY_NAME = "prod-deploy";
35194
35254
  var AwsDeployWorkflow = class _AwsDeployWorkflow extends Component21 {
@@ -35308,7 +35368,7 @@ var AwsDeployWorkflow = class _AwsDeployWorkflow extends Component21 {
35308
35368
  );
35309
35369
  }
35310
35370
  this.rootProject = project.root;
35311
- const github = GitHub4.of(this.rootProject);
35371
+ const github = GitHub5.of(this.rootProject);
35312
35372
  if (!github) {
35313
35373
  throw new Error(
35314
35374
  "AwsDeployWorkflow requires a GitHub component in the root project"
@@ -35460,7 +35520,7 @@ var AwsDeployWorkflow = class _AwsDeployWorkflow extends Component21 {
35460
35520
 
35461
35521
  // src/workflows/aws-teardown-workflow.ts
35462
35522
  import { Component as Component22 } from "projen";
35463
- import { GitHub as GitHub5, GithubWorkflow } from "projen/lib/github";
35523
+ import { GitHub as GitHub6, GithubWorkflow } from "projen/lib/github";
35464
35524
  import { JobPermission as JobPermission6 } from "projen/lib/github/workflows-model";
35465
35525
  var DEFAULT_TEARDOWN_BRANCH_PATTERNS = [
35466
35526
  "feat/*",
@@ -35510,7 +35570,7 @@ var AwsTeardownWorkflow = class extends Component22 {
35510
35570
  "AwsTeardownWorkflow requires the root project to be a MonorepoProject"
35511
35571
  );
35512
35572
  }
35513
- const github = GitHub5.of(this.rootProject);
35573
+ const github = GitHub6.of(this.rootProject);
35514
35574
  if (!github) {
35515
35575
  throw new Error(
35516
35576
  "AwsTeardownWorkflow requires a GitHub component in the root project"
@@ -36496,6 +36556,7 @@ export {
36496
36556
  githubWorkflowBundle,
36497
36557
  hasAnyDocsEmittingBundle,
36498
36558
  hasAnyDownstreamIssueKindBundle,
36559
+ includeHiddenFilesInBuildArtifact,
36499
36560
  industryDiscoveryBundle,
36500
36561
  isPhaseLabelOwnedByExcluded,
36501
36562
  isScheduledTaskOwnedByExcluded,