projen-pipelines 0.3.17 → 0.3.19

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.
Files changed (119) hide show
  1. package/.jsii +148 -92
  2. package/API.md +164 -0
  3. package/README.md +65 -0
  4. package/lib/assign-approver/base.js +1 -1
  5. package/lib/assign-approver/github.js +1 -1
  6. package/lib/awscdk/base.d.ts +34 -0
  7. package/lib/awscdk/base.js +35 -2
  8. package/lib/awscdk/bash.js +28 -2
  9. package/lib/awscdk/github.d.ts +12 -0
  10. package/lib/awscdk/github.js +53 -14
  11. package/lib/awscdk/gitlab.d.ts +4 -0
  12. package/lib/awscdk/gitlab.js +20 -9
  13. package/lib/drift/base.js +1 -1
  14. package/lib/drift/bash.js +1 -1
  15. package/lib/drift/github.js +1 -1
  16. package/lib/drift/gitlab.js +1 -1
  17. package/lib/drift/step.js +1 -1
  18. package/lib/steps/amplify-deploy.step.js +1 -1
  19. package/lib/steps/artifact-steps.js +2 -2
  20. package/lib/steps/aws-assume-role.step.js +1 -1
  21. package/lib/steps/github-summary.step.js +1 -1
  22. package/lib/steps/package-manager-setup.step.js +2 -2
  23. package/lib/steps/registries.js +3 -3
  24. package/lib/steps/step.js +4 -4
  25. package/lib/versioning/computation.js +3 -3
  26. package/lib/versioning/config.js +2 -2
  27. package/lib/versioning/outputs.js +5 -5
  28. package/lib/versioning/setup.js +1 -1
  29. package/lib/versioning/strategy.js +1 -1
  30. package/lib/versioning/version-info.js +2 -2
  31. package/llm.md +64 -0
  32. package/node_modules/@nodable/entities/README.md +23 -417
  33. package/node_modules/@nodable/entities/package.json +8 -3
  34. package/node_modules/@nodable/entities/src/EntityDecoder.js +543 -0
  35. package/node_modules/@nodable/entities/src/EntityEncoder.js +194 -0
  36. package/node_modules/@nodable/entities/src/entities.js +1177 -0
  37. package/node_modules/@nodable/entities/src/entityTries.js +49 -0
  38. package/node_modules/@nodable/entities/src/index.d.ts +176 -218
  39. package/node_modules/@nodable/entities/src/index.js +20 -17
  40. package/node_modules/commit-and-tag-version/.github/workflows/ci.yaml +2 -2
  41. package/node_modules/commit-and-tag-version/.github/workflows/release-please.yml +6 -4
  42. package/node_modules/commit-and-tag-version/CHANGELOG.md +14 -0
  43. package/node_modules/commit-and-tag-version/lib/updaters/types/maven.js +15 -2
  44. package/node_modules/commit-and-tag-version/package.json +8 -3
  45. package/node_modules/commit-and-tag-version/test/core.spec.js +34 -0
  46. package/node_modules/commit-and-tag-version/test/mocks/pom-6.3.1-attrs-lf.xml +27 -0
  47. package/node_modules/commit-and-tag-version/test/mocks/pom-6.4.0-attrs-lf.xml +28 -0
  48. package/node_modules/fast-xml-builder/CHANGELOG.md +24 -0
  49. package/node_modules/fast-xml-builder/README.md +53 -2
  50. package/node_modules/fast-xml-builder/lib/fxb.cjs +1 -1
  51. package/node_modules/fast-xml-builder/lib/fxb.d.cts +91 -1
  52. package/node_modules/fast-xml-builder/lib/fxb.min.js +1 -1
  53. package/node_modules/fast-xml-builder/lib/fxb.min.js.map +1 -1
  54. package/node_modules/fast-xml-builder/package.json +3 -2
  55. package/node_modules/fast-xml-builder/src/fxb.d.ts +93 -3
  56. package/node_modules/fast-xml-builder/src/fxb.js +108 -38
  57. package/node_modules/fast-xml-builder/src/orderedJs2Xml.js +97 -30
  58. package/node_modules/fast-xml-builder/src/util.js +16 -0
  59. package/node_modules/fast-xml-parser/CHANGELOG.md +41 -0
  60. package/node_modules/fast-xml-parser/README.md +2 -7
  61. package/node_modules/fast-xml-parser/lib/fxbuilder.min.js +1 -1
  62. package/node_modules/fast-xml-parser/lib/fxbuilder.min.js.map +1 -1
  63. package/node_modules/fast-xml-parser/lib/fxp.cjs +1 -1
  64. package/node_modules/fast-xml-parser/lib/fxp.d.cts +18 -1
  65. package/node_modules/fast-xml-parser/lib/fxp.min.js +1 -1
  66. package/node_modules/fast-xml-parser/lib/fxp.min.js.map +1 -1
  67. package/node_modules/fast-xml-parser/lib/fxparser.min.js +1 -1
  68. package/node_modules/fast-xml-parser/lib/fxparser.min.js.map +1 -1
  69. package/node_modules/fast-xml-parser/package.json +6 -6
  70. package/node_modules/fast-xml-parser/src/fxp.d.ts +29 -1
  71. package/node_modules/fast-xml-parser/src/xmlparser/DocTypeReader.js +16 -15
  72. package/node_modules/fast-xml-parser/src/xmlparser/OptionsBuilder.js +11 -7
  73. package/node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js +48 -31
  74. package/node_modules/fast-xml-parser/src/xmlparser/XMLParser.js +2 -2
  75. package/node_modules/fast-xml-parser/src/xmlparser/node2json.js +4 -0
  76. package/node_modules/hasown/CHANGELOG.md +11 -0
  77. package/node_modules/hasown/eslint.config.mjs +6 -0
  78. package/node_modules/hasown/index.d.ts +1 -0
  79. package/node_modules/hasown/package.json +14 -14
  80. package/node_modules/is-core-module/CHANGELOG.md +244 -113
  81. package/node_modules/is-core-module/README.md +1 -1
  82. package/node_modules/is-core-module/core.json +12 -12
  83. package/node_modules/is-core-module/package.json +5 -5
  84. package/node_modules/is-core-module/test/index.js +101 -0
  85. package/node_modules/semver/README.md +19 -4
  86. package/node_modules/semver/bin/semver.js +14 -10
  87. package/node_modules/semver/functions/truncate.js +48 -0
  88. package/node_modules/semver/index.js +2 -0
  89. package/node_modules/semver/internal/re.js +1 -1
  90. package/node_modules/semver/package.json +3 -3
  91. package/node_modules/semver/range.bnf +5 -4
  92. package/node_modules/strnum/CHANGELOG.md +3 -0
  93. package/node_modules/strnum/package.json +3 -2
  94. package/node_modules/strnum/strnum.js +12 -10
  95. package/node_modules/xml-naming/README.md +189 -0
  96. package/node_modules/xml-naming/package.json +54 -0
  97. package/node_modules/xml-naming/src/index.d.ts +74 -0
  98. package/node_modules/xml-naming/src/index.js +270 -0
  99. package/node_modules/yaml/browser/dist/compose/composer.js +4 -2
  100. package/node_modules/yaml/browser/dist/compose/resolve-flow-scalar.js +5 -3
  101. package/node_modules/yaml/browser/dist/nodes/Alias.js +2 -0
  102. package/node_modules/yaml/browser/dist/parse/lexer.js +28 -24
  103. package/node_modules/yaml/browser/dist/parse/parser.js +12 -4
  104. package/node_modules/yaml/browser/dist/schema/yaml-1.1/merge.js +11 -8
  105. package/node_modules/yaml/browser/dist/stringify/stringifyNumber.js +2 -1
  106. package/node_modules/yaml/dist/compose/composer.js +4 -2
  107. package/node_modules/yaml/dist/compose/resolve-flow-scalar.js +5 -3
  108. package/node_modules/yaml/dist/nodes/Alias.js +2 -0
  109. package/node_modules/yaml/dist/nodes/Scalar.d.ts +5 -1
  110. package/node_modules/yaml/dist/parse/lexer.js +28 -24
  111. package/node_modules/yaml/dist/parse/parser.js +12 -4
  112. package/node_modules/yaml/dist/schema/yaml-1.1/merge.js +10 -7
  113. package/node_modules/yaml/dist/stringify/stringifyNumber.js +2 -1
  114. package/node_modules/yaml/package.json +1 -1
  115. package/package.json +8 -8
  116. package/node_modules/@nodable/entities/src/EntityReplacer.js +0 -385
  117. package/node_modules/@nodable/entities/src/groups.js +0 -110
  118. package/node_modules/fast-xml-parser/src/fast-xml-parser.zip +0 -0
  119. package/node_modules/hasown/.eslintrc +0 -5
package/API.md CHANGED
@@ -2630,12 +2630,14 @@ const bashCDKPipelineOptions: BashCDKPipelineOptions = { ... }
2630
2630
  | <code><a href="#projen-pipelines.BashCDKPipelineOptions.property.pkgNamespace">pkgNamespace</a></code> | <code>string</code> | This field determines the NPM namespace to be used when packaging CDK cloud assemblies. |
2631
2631
  | <code><a href="#projen-pipelines.BashCDKPipelineOptions.property.postSynthCommands">postSynthCommands</a></code> | <code>string[]</code> | *No description.* |
2632
2632
  | <code><a href="#projen-pipelines.BashCDKPipelineOptions.property.postSynthSteps">postSynthSteps</a></code> | <code><a href="#projen-pipelines.PipelineStep">PipelineStep</a>[]</code> | *No description.* |
2633
+ | <code><a href="#projen-pipelines.BashCDKPipelineOptions.property.preBuildCommand">preBuildCommand</a></code> | <code>string</code> | A command to run before the build step, executed from the repository root. |
2633
2634
  | <code><a href="#projen-pipelines.BashCDKPipelineOptions.property.preInstallCommands">preInstallCommands</a></code> | <code>string[]</code> | *No description.* |
2634
2635
  | <code><a href="#projen-pipelines.BashCDKPipelineOptions.property.preInstallSteps">preInstallSteps</a></code> | <code><a href="#projen-pipelines.PipelineStep">PipelineStep</a>[]</code> | *No description.* |
2635
2636
  | <code><a href="#projen-pipelines.BashCDKPipelineOptions.property.preSynthCommands">preSynthCommands</a></code> | <code>string[]</code> | *No description.* |
2636
2637
  | <code><a href="#projen-pipelines.BashCDKPipelineOptions.property.preSynthSteps">preSynthSteps</a></code> | <code><a href="#projen-pipelines.PipelineStep">PipelineStep</a>[]</code> | *No description.* |
2637
2638
  | <code><a href="#projen-pipelines.BashCDKPipelineOptions.property.stackPrefix">stackPrefix</a></code> | <code>string</code> | This field is used to define a prefix for the AWS Stack resources created during the pipeline's operation. |
2638
2639
  | <code><a href="#projen-pipelines.BashCDKPipelineOptions.property.versioning">versioning</a></code> | <code><a href="#projen-pipelines.VersioningConfig">VersioningConfig</a></code> | Versioning configuration. |
2640
+ | <code><a href="#projen-pipelines.BashCDKPipelineOptions.property.workingDirectory">workingDirectory</a></code> | <code>string</code> | The working directory for the pipeline relative to the repository root. |
2639
2641
 
2640
2642
  ---
2641
2643
 
@@ -2804,6 +2806,27 @@ public readonly postSynthSteps: PipelineStep[];
2804
2806
 
2805
2807
  ---
2806
2808
 
2809
+ ##### `preBuildCommand`<sup>Optional</sup> <a name="preBuildCommand" id="projen-pipelines.BashCDKPipelineOptions.property.preBuildCommand"></a>
2810
+
2811
+ ```typescript
2812
+ public readonly preBuildCommand: string;
2813
+ ```
2814
+
2815
+ - *Type:* string
2816
+ - *Default:* no pre-build command
2817
+
2818
+ A command to run before the build step, executed from the repository root.
2819
+
2820
+ When a workingDirectory is set (monorepo subproject), the command is
2821
+ automatically wrapped to execute from the repository root regardless of
2822
+ the job's working directory setting.
2823
+
2824
+ For pnpm workspaces: `pnpm -r --filter <appname>^... run build`
2825
+ For npm workspaces: `npm run build --workspaces --if-present`
2826
+ For yarn workspaces: `yarn workspaces foreach -Rt run build`
2827
+
2828
+ ---
2829
+
2807
2830
  ##### `preInstallCommands`<sup>Optional</sup> <a name="preInstallCommands" id="projen-pipelines.BashCDKPipelineOptions.property.preInstallCommands"></a>
2808
2831
 
2809
2832
  ```typescript
@@ -2869,6 +2892,24 @@ Versioning configuration.
2869
2892
 
2870
2893
  ---
2871
2894
 
2895
+ ##### `workingDirectory`<sup>Optional</sup> <a name="workingDirectory" id="projen-pipelines.BashCDKPipelineOptions.property.workingDirectory"></a>
2896
+
2897
+ ```typescript
2898
+ public readonly workingDirectory: string;
2899
+ ```
2900
+
2901
+ - *Type:* string
2902
+ - *Default:* automatically computed from the project's position in the monorepo (empty string for root projects)
2903
+
2904
+ The working directory for the pipeline relative to the repository root.
2905
+
2906
+ This is automatically computed for subprojects but can be explicitly set.
2907
+
2908
+ When set, CI jobs will run commands in this directory, and artifact paths
2909
+ will be prefixed accordingly.
2910
+
2911
+ ---
2912
+
2872
2913
  ### BashDriftDetectionWorkflowOptions <a name="BashDriftDetectionWorkflowOptions" id="projen-pipelines.BashDriftDetectionWorkflowOptions"></a>
2873
2914
 
2874
2915
  #### Initializer <a name="Initializer" id="projen-pipelines.BashDriftDetectionWorkflowOptions.Initializer"></a>
@@ -3090,12 +3131,14 @@ const cDKPipelineOptions: CDKPipelineOptions = { ... }
3090
3131
  | <code><a href="#projen-pipelines.CDKPipelineOptions.property.pkgNamespace">pkgNamespace</a></code> | <code>string</code> | This field determines the NPM namespace to be used when packaging CDK cloud assemblies. |
3091
3132
  | <code><a href="#projen-pipelines.CDKPipelineOptions.property.postSynthCommands">postSynthCommands</a></code> | <code>string[]</code> | *No description.* |
3092
3133
  | <code><a href="#projen-pipelines.CDKPipelineOptions.property.postSynthSteps">postSynthSteps</a></code> | <code><a href="#projen-pipelines.PipelineStep">PipelineStep</a>[]</code> | *No description.* |
3134
+ | <code><a href="#projen-pipelines.CDKPipelineOptions.property.preBuildCommand">preBuildCommand</a></code> | <code>string</code> | A command to run before the build step, executed from the repository root. |
3093
3135
  | <code><a href="#projen-pipelines.CDKPipelineOptions.property.preInstallCommands">preInstallCommands</a></code> | <code>string[]</code> | *No description.* |
3094
3136
  | <code><a href="#projen-pipelines.CDKPipelineOptions.property.preInstallSteps">preInstallSteps</a></code> | <code><a href="#projen-pipelines.PipelineStep">PipelineStep</a>[]</code> | *No description.* |
3095
3137
  | <code><a href="#projen-pipelines.CDKPipelineOptions.property.preSynthCommands">preSynthCommands</a></code> | <code>string[]</code> | *No description.* |
3096
3138
  | <code><a href="#projen-pipelines.CDKPipelineOptions.property.preSynthSteps">preSynthSteps</a></code> | <code><a href="#projen-pipelines.PipelineStep">PipelineStep</a>[]</code> | *No description.* |
3097
3139
  | <code><a href="#projen-pipelines.CDKPipelineOptions.property.stackPrefix">stackPrefix</a></code> | <code>string</code> | This field is used to define a prefix for the AWS Stack resources created during the pipeline's operation. |
3098
3140
  | <code><a href="#projen-pipelines.CDKPipelineOptions.property.versioning">versioning</a></code> | <code><a href="#projen-pipelines.VersioningConfig">VersioningConfig</a></code> | Versioning configuration. |
3141
+ | <code><a href="#projen-pipelines.CDKPipelineOptions.property.workingDirectory">workingDirectory</a></code> | <code>string</code> | The working directory for the pipeline relative to the repository root. |
3099
3142
 
3100
3143
  ---
3101
3144
 
@@ -3264,6 +3307,27 @@ public readonly postSynthSteps: PipelineStep[];
3264
3307
 
3265
3308
  ---
3266
3309
 
3310
+ ##### `preBuildCommand`<sup>Optional</sup> <a name="preBuildCommand" id="projen-pipelines.CDKPipelineOptions.property.preBuildCommand"></a>
3311
+
3312
+ ```typescript
3313
+ public readonly preBuildCommand: string;
3314
+ ```
3315
+
3316
+ - *Type:* string
3317
+ - *Default:* no pre-build command
3318
+
3319
+ A command to run before the build step, executed from the repository root.
3320
+
3321
+ When a workingDirectory is set (monorepo subproject), the command is
3322
+ automatically wrapped to execute from the repository root regardless of
3323
+ the job's working directory setting.
3324
+
3325
+ For pnpm workspaces: `pnpm -r --filter <appname>^... run build`
3326
+ For npm workspaces: `npm run build --workspaces --if-present`
3327
+ For yarn workspaces: `yarn workspaces foreach -Rt run build`
3328
+
3329
+ ---
3330
+
3267
3331
  ##### `preInstallCommands`<sup>Optional</sup> <a name="preInstallCommands" id="projen-pipelines.CDKPipelineOptions.property.preInstallCommands"></a>
3268
3332
 
3269
3333
  ```typescript
@@ -3329,6 +3393,24 @@ Versioning configuration.
3329
3393
 
3330
3394
  ---
3331
3395
 
3396
+ ##### `workingDirectory`<sup>Optional</sup> <a name="workingDirectory" id="projen-pipelines.CDKPipelineOptions.property.workingDirectory"></a>
3397
+
3398
+ ```typescript
3399
+ public readonly workingDirectory: string;
3400
+ ```
3401
+
3402
+ - *Type:* string
3403
+ - *Default:* automatically computed from the project's position in the monorepo (empty string for root projects)
3404
+
3405
+ The working directory for the pipeline relative to the repository root.
3406
+
3407
+ This is automatically computed for subprojects but can be explicitly set.
3408
+
3409
+ When set, CI jobs will run commands in this directory, and artifact paths
3410
+ will be prefixed accordingly.
3411
+
3412
+ ---
3413
+
3332
3414
  ### CloudFormationOnlyOptions <a name="CloudFormationOnlyOptions" id="projen-pipelines.CloudFormationOnlyOptions"></a>
3333
3415
 
3334
3416
  #### Initializer <a name="Initializer" id="projen-pipelines.CloudFormationOnlyOptions.Initializer"></a>
@@ -4411,12 +4493,14 @@ const githubCDKPipelineOptions: GithubCDKPipelineOptions = { ... }
4411
4493
  | <code><a href="#projen-pipelines.GithubCDKPipelineOptions.property.pkgNamespace">pkgNamespace</a></code> | <code>string</code> | This field determines the NPM namespace to be used when packaging CDK cloud assemblies. |
4412
4494
  | <code><a href="#projen-pipelines.GithubCDKPipelineOptions.property.postSynthCommands">postSynthCommands</a></code> | <code>string[]</code> | *No description.* |
4413
4495
  | <code><a href="#projen-pipelines.GithubCDKPipelineOptions.property.postSynthSteps">postSynthSteps</a></code> | <code><a href="#projen-pipelines.PipelineStep">PipelineStep</a>[]</code> | *No description.* |
4496
+ | <code><a href="#projen-pipelines.GithubCDKPipelineOptions.property.preBuildCommand">preBuildCommand</a></code> | <code>string</code> | A command to run before the build step, executed from the repository root. |
4414
4497
  | <code><a href="#projen-pipelines.GithubCDKPipelineOptions.property.preInstallCommands">preInstallCommands</a></code> | <code>string[]</code> | *No description.* |
4415
4498
  | <code><a href="#projen-pipelines.GithubCDKPipelineOptions.property.preInstallSteps">preInstallSteps</a></code> | <code><a href="#projen-pipelines.PipelineStep">PipelineStep</a>[]</code> | *No description.* |
4416
4499
  | <code><a href="#projen-pipelines.GithubCDKPipelineOptions.property.preSynthCommands">preSynthCommands</a></code> | <code>string[]</code> | *No description.* |
4417
4500
  | <code><a href="#projen-pipelines.GithubCDKPipelineOptions.property.preSynthSteps">preSynthSteps</a></code> | <code><a href="#projen-pipelines.PipelineStep">PipelineStep</a>[]</code> | *No description.* |
4418
4501
  | <code><a href="#projen-pipelines.GithubCDKPipelineOptions.property.stackPrefix">stackPrefix</a></code> | <code>string</code> | This field is used to define a prefix for the AWS Stack resources created during the pipeline's operation. |
4419
4502
  | <code><a href="#projen-pipelines.GithubCDKPipelineOptions.property.versioning">versioning</a></code> | <code><a href="#projen-pipelines.VersioningConfig">VersioningConfig</a></code> | Versioning configuration. |
4503
+ | <code><a href="#projen-pipelines.GithubCDKPipelineOptions.property.workingDirectory">workingDirectory</a></code> | <code>string</code> | The working directory for the pipeline relative to the repository root. |
4420
4504
  | <code><a href="#projen-pipelines.GithubCDKPipelineOptions.property.runnerTags">runnerTags</a></code> | <code>string[]</code> | runner tags to use to select runners. |
4421
4505
  | <code><a href="#projen-pipelines.GithubCDKPipelineOptions.property.useGithubEnvironments">useGithubEnvironments</a></code> | <code>boolean</code> | whether to use GitHub environments for deployment stages. |
4422
4506
  | <code><a href="#projen-pipelines.GithubCDKPipelineOptions.property.useGithubEnvironmentsForAssetUpload">useGithubEnvironmentsForAssetUpload</a></code> | <code>boolean</code> | whether to use GitHub environments for asset upload step Create separate, parallel jobs for asset upload since GitHub Environments require unique environment names per job. |
@@ -4589,6 +4673,27 @@ public readonly postSynthSteps: PipelineStep[];
4589
4673
 
4590
4674
  ---
4591
4675
 
4676
+ ##### `preBuildCommand`<sup>Optional</sup> <a name="preBuildCommand" id="projen-pipelines.GithubCDKPipelineOptions.property.preBuildCommand"></a>
4677
+
4678
+ ```typescript
4679
+ public readonly preBuildCommand: string;
4680
+ ```
4681
+
4682
+ - *Type:* string
4683
+ - *Default:* no pre-build command
4684
+
4685
+ A command to run before the build step, executed from the repository root.
4686
+
4687
+ When a workingDirectory is set (monorepo subproject), the command is
4688
+ automatically wrapped to execute from the repository root regardless of
4689
+ the job's working directory setting.
4690
+
4691
+ For pnpm workspaces: `pnpm -r --filter <appname>^... run build`
4692
+ For npm workspaces: `npm run build --workspaces --if-present`
4693
+ For yarn workspaces: `yarn workspaces foreach -Rt run build`
4694
+
4695
+ ---
4696
+
4592
4697
  ##### `preInstallCommands`<sup>Optional</sup> <a name="preInstallCommands" id="projen-pipelines.GithubCDKPipelineOptions.property.preInstallCommands"></a>
4593
4698
 
4594
4699
  ```typescript
@@ -4654,6 +4759,24 @@ Versioning configuration.
4654
4759
 
4655
4760
  ---
4656
4761
 
4762
+ ##### `workingDirectory`<sup>Optional</sup> <a name="workingDirectory" id="projen-pipelines.GithubCDKPipelineOptions.property.workingDirectory"></a>
4763
+
4764
+ ```typescript
4765
+ public readonly workingDirectory: string;
4766
+ ```
4767
+
4768
+ - *Type:* string
4769
+ - *Default:* automatically computed from the project's position in the monorepo (empty string for root projects)
4770
+
4771
+ The working directory for the pipeline relative to the repository root.
4772
+
4773
+ This is automatically computed for subprojects but can be explicitly set.
4774
+
4775
+ When set, CI jobs will run commands in this directory, and artifact paths
4776
+ will be prefixed accordingly.
4777
+
4778
+ ---
4779
+
4657
4780
  ##### `runnerTags`<sup>Optional</sup> <a name="runnerTags" id="projen-pipelines.GithubCDKPipelineOptions.property.runnerTags"></a>
4658
4781
 
4659
4782
  ```typescript
@@ -5109,12 +5232,14 @@ const gitlabCDKPipelineOptions: GitlabCDKPipelineOptions = { ... }
5109
5232
  | <code><a href="#projen-pipelines.GitlabCDKPipelineOptions.property.pkgNamespace">pkgNamespace</a></code> | <code>string</code> | This field determines the NPM namespace to be used when packaging CDK cloud assemblies. |
5110
5233
  | <code><a href="#projen-pipelines.GitlabCDKPipelineOptions.property.postSynthCommands">postSynthCommands</a></code> | <code>string[]</code> | *No description.* |
5111
5234
  | <code><a href="#projen-pipelines.GitlabCDKPipelineOptions.property.postSynthSteps">postSynthSteps</a></code> | <code><a href="#projen-pipelines.PipelineStep">PipelineStep</a>[]</code> | *No description.* |
5235
+ | <code><a href="#projen-pipelines.GitlabCDKPipelineOptions.property.preBuildCommand">preBuildCommand</a></code> | <code>string</code> | A command to run before the build step, executed from the repository root. |
5112
5236
  | <code><a href="#projen-pipelines.GitlabCDKPipelineOptions.property.preInstallCommands">preInstallCommands</a></code> | <code>string[]</code> | *No description.* |
5113
5237
  | <code><a href="#projen-pipelines.GitlabCDKPipelineOptions.property.preInstallSteps">preInstallSteps</a></code> | <code><a href="#projen-pipelines.PipelineStep">PipelineStep</a>[]</code> | *No description.* |
5114
5238
  | <code><a href="#projen-pipelines.GitlabCDKPipelineOptions.property.preSynthCommands">preSynthCommands</a></code> | <code>string[]</code> | *No description.* |
5115
5239
  | <code><a href="#projen-pipelines.GitlabCDKPipelineOptions.property.preSynthSteps">preSynthSteps</a></code> | <code><a href="#projen-pipelines.PipelineStep">PipelineStep</a>[]</code> | *No description.* |
5116
5240
  | <code><a href="#projen-pipelines.GitlabCDKPipelineOptions.property.stackPrefix">stackPrefix</a></code> | <code>string</code> | This field is used to define a prefix for the AWS Stack resources created during the pipeline's operation. |
5117
5241
  | <code><a href="#projen-pipelines.GitlabCDKPipelineOptions.property.versioning">versioning</a></code> | <code><a href="#projen-pipelines.VersioningConfig">VersioningConfig</a></code> | Versioning configuration. |
5242
+ | <code><a href="#projen-pipelines.GitlabCDKPipelineOptions.property.workingDirectory">workingDirectory</a></code> | <code>string</code> | The working directory for the pipeline relative to the repository root. |
5118
5243
  | <code><a href="#projen-pipelines.GitlabCDKPipelineOptions.property.image">image</a></code> | <code>string</code> | The Docker image to use for running the pipeline jobs. |
5119
5244
  | <code><a href="#projen-pipelines.GitlabCDKPipelineOptions.property.runnerTags">runnerTags</a></code> | <code><a href="#projen-pipelines.GitlabRunnerTags">GitlabRunnerTags</a></code> | Runner tags configuration for the pipeline. |
5120
5245
 
@@ -5285,6 +5410,27 @@ public readonly postSynthSteps: PipelineStep[];
5285
5410
 
5286
5411
  ---
5287
5412
 
5413
+ ##### `preBuildCommand`<sup>Optional</sup> <a name="preBuildCommand" id="projen-pipelines.GitlabCDKPipelineOptions.property.preBuildCommand"></a>
5414
+
5415
+ ```typescript
5416
+ public readonly preBuildCommand: string;
5417
+ ```
5418
+
5419
+ - *Type:* string
5420
+ - *Default:* no pre-build command
5421
+
5422
+ A command to run before the build step, executed from the repository root.
5423
+
5424
+ When a workingDirectory is set (monorepo subproject), the command is
5425
+ automatically wrapped to execute from the repository root regardless of
5426
+ the job's working directory setting.
5427
+
5428
+ For pnpm workspaces: `pnpm -r --filter <appname>^... run build`
5429
+ For npm workspaces: `npm run build --workspaces --if-present`
5430
+ For yarn workspaces: `yarn workspaces foreach -Rt run build`
5431
+
5432
+ ---
5433
+
5288
5434
  ##### `preInstallCommands`<sup>Optional</sup> <a name="preInstallCommands" id="projen-pipelines.GitlabCDKPipelineOptions.property.preInstallCommands"></a>
5289
5435
 
5290
5436
  ```typescript
@@ -5350,6 +5496,24 @@ Versioning configuration.
5350
5496
 
5351
5497
  ---
5352
5498
 
5499
+ ##### `workingDirectory`<sup>Optional</sup> <a name="workingDirectory" id="projen-pipelines.GitlabCDKPipelineOptions.property.workingDirectory"></a>
5500
+
5501
+ ```typescript
5502
+ public readonly workingDirectory: string;
5503
+ ```
5504
+
5505
+ - *Type:* string
5506
+ - *Default:* automatically computed from the project's position in the monorepo (empty string for root projects)
5507
+
5508
+ The working directory for the pipeline relative to the repository root.
5509
+
5510
+ This is automatically computed for subprojects but can be explicitly set.
5511
+
5512
+ When set, CI jobs will run commands in this directory, and artifact paths
5513
+ will be prefixed accordingly.
5514
+
5515
+ ---
5516
+
5353
5517
  ##### `image`<sup>Optional</sup> <a name="image" id="projen-pipelines.GitlabCDKPipelineOptions.property.image"></a>
5354
5518
 
5355
5519
  ```typescript
package/README.md CHANGED
@@ -524,6 +524,71 @@ When `paths` is specified:
524
524
 
525
525
  This allows you to have multiple pipelines in the same repository, each responsible for a different subproject, without triggering unnecessary deployments.
526
526
 
527
+ ### Monorepo Subproject Pipelines
528
+
529
+ For monorepos using projen subprojects, you can attach a pipeline directly to a subproject. The library automatically detects that the project is a subproject and configures CI to run commands in the correct subdirectory.
530
+
531
+ ```typescript
532
+ import { awscdk } from 'projen';
533
+ import { GithubCDKPipeline } from 'projen-pipelines';
534
+
535
+ // Root monorepo project
536
+ const root = new awscdk.AwsCdkTypeScriptApp({
537
+ cdkVersion: '2.150.0',
538
+ name: 'my-monorepo',
539
+ defaultReleaseBranch: 'main',
540
+ });
541
+
542
+ // Subproject at packages/backend
543
+ const backend = new awscdk.AwsCdkTypeScriptApp({
544
+ cdkVersion: '2.150.0',
545
+ name: 'backend',
546
+ defaultReleaseBranch: 'main',
547
+ parent: root,
548
+ outdir: 'packages/backend',
549
+ devDeps: ['projen-pipelines'],
550
+ });
551
+
552
+ // Pipeline for the subproject - automatically sets working directory
553
+ new GithubCDKPipeline(backend, {
554
+ iamRoleArns: {
555
+ default: 'arn:aws:iam::123456789012:role/DeployRole',
556
+ },
557
+ // Optional: build workspace dependencies first
558
+ preBuildCommand: 'pnpm -r --filter backend^... run build',
559
+ stages: [
560
+ { name: 'dev', env: { account: '123456789012', region: 'eu-central-1' } },
561
+ { name: 'prod', env: { account: '123456789013', region: 'eu-central-1' } },
562
+ ],
563
+ });
564
+ ```
565
+
566
+ When the pipeline is attached to a subproject:
567
+ - **GitHub Actions**: Every job gets `defaults.run.working-directory: packages/backend`, and artifact paths are prefixed with `packages/backend/`. Workflows are placed in the root `.github/workflows/` directory (since GitHub only discovers workflows there).
568
+ - **GitLab CI**: Job scripts are prefixed with `cd packages/backend`, and artifact paths are adjusted.
569
+ - **Bash**: The pipeline.md instructions include `cd packages/backend` before each command block.
570
+
571
+ #### preBuildCommand
572
+
573
+ In monorepos, workspace sibling packages may need to be built before the app can compile. Use `preBuildCommand` to inject a build step that runs from the repository root before the synth/build:
574
+
575
+ | Package Manager | preBuildCommand |
576
+ |-----------------|-----------------|
577
+ | pnpm | `pnpm -r --filter <appname>^... run build` |
578
+ | npm | `npm run build --workspaces --if-present` |
579
+ | yarn | `yarn workspaces foreach -Rt run build` |
580
+
581
+ #### workingDirectory
582
+
583
+ The working directory is automatically computed from the project hierarchy. You can also set it explicitly via the `workingDirectory` option if needed (for example, when the pipeline project is not a projen subproject):
584
+
585
+ ```typescript
586
+ new GithubCDKPipeline(app, {
587
+ workingDirectory: 'packages/backend',
588
+ // ...
589
+ });
590
+ ```
591
+
527
592
  ### AWS Amplify Deployment
528
593
 
529
594
  Projen Pipelines includes support for deploying static websites and single-page applications to AWS Amplify Hosting. This feature provides automated deployment of build artifacts to Amplify, with built-in support for multiple environments and branch-based deployments.
@@ -12,5 +12,5 @@ class AssignApprover extends projen_1.Component {
12
12
  }
13
13
  exports.AssignApprover = AssignApprover;
14
14
  _a = JSII_RTTI_SYMBOL_1;
15
- AssignApprover[_a] = { fqn: "projen-pipelines.AssignApprover", version: "0.3.17" };
15
+ AssignApprover[_a] = { fqn: "projen-pipelines.AssignApprover", version: "0.3.19" };
16
16
  //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmFzZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9hc3NpZ24tYXBwcm92ZXIvYmFzZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7OztBQUFBLG1DQUE0QztBQXVCNUMsTUFBc0IsY0FBZSxTQUFRLGtCQUFTO0lBR3BELFlBQVksS0FBYyxFQUFxQixXQUFrQztRQUMvRSxLQUFLLENBQUMsS0FBSyxDQUFDLENBQUM7UUFEZ0MsZ0JBQVcsR0FBWCxXQUFXLENBQXVCO0lBRWpGLENBQUM7O0FBTEgsd0NBT0MiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBDb21wb25lbnQsIFByb2plY3QgfSBmcm9tICdwcm9qZW4nO1xuXG5leHBvcnQgaW50ZXJmYWNlIEFwcHJvdmVyTWFwcGluZyB7XG5cbiAgcmVhZG9ubHkgYXV0aG9yOiBzdHJpbmc7XG4gIHJlYWRvbmx5IGFwcHJvdmVyczogc3RyaW5nW107XG5cbn1cblxuZXhwb3J0IGludGVyZmFjZSBBc3NpZ25BcHByb3Zlck9wdGlvbnMge1xuXG4gIC8qKlxuICAgKiBUaGUgbWFwcGluZyBvZiBhdXRob3JzIHRvIGFwcHJvdmVycy5cbiAgICovXG4gIHJlYWRvbmx5IGFwcHJvdmVyTWFwcGluZzogQXBwcm92ZXJNYXBwaW5nW107XG5cbiAgLyoqXG4gICAqIFRoZSBHaXRIdWIgdG9rZW4gdG8gdXNlIGZvciB0aGUgQVBJIGNhbGxzLlxuICAgKi9cbiAgcmVhZG9ubHkgZGVmYXVsdEFwcHJvdmVyczogc3RyaW5nW107XG5cbn1cblxuZXhwb3J0IGFic3RyYWN0IGNsYXNzIEFzc2lnbkFwcHJvdmVyIGV4dGVuZHMgQ29tcG9uZW50IHtcblxuXG4gIGNvbnN0cnVjdG9yKHNjb3BlOiBQcm9qZWN0LCBwcm90ZWN0ZWQgcmVhZG9ubHkgYmFzZU9wdGlvbnM6IEFzc2lnbkFwcHJvdmVyT3B0aW9ucykge1xuICAgIHN1cGVyKHNjb3BlKTtcbiAgfVxuXG59Il19
@@ -81,5 +81,5 @@ if (filteredApprovers.length > 0) {
81
81
  }
82
82
  exports.GitHubAssignApprover = GitHubAssignApprover;
83
83
  _a = JSII_RTTI_SYMBOL_1;
84
- GitHubAssignApprover[_a] = { fqn: "projen-pipelines.GitHubAssignApprover", version: "0.3.17" };
84
+ GitHubAssignApprover[_a] = { fqn: "projen-pipelines.GitHubAssignApprover", version: "0.3.19" };
85
85
  //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2l0aHViLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2Fzc2lnbi1hcHByb3Zlci9naXRodWIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7QUFDQSx1RUFBa0Y7QUFDbEYsaUNBQStEO0FBYS9ELE1BQWEsb0JBQXFCLFNBQVEscUJBQWM7SUFJdEQsWUFBWSxLQUFvQixFQUFFLE9BQW9DO1FBQ3BFLEtBQUssQ0FBQyxLQUFLLEVBQUUsT0FBTyxDQUFDLENBQUM7UUFDdEIsSUFBSSxDQUFDLE9BQU8sR0FBRyxPQUFPLENBQUM7UUFFdkIsZ0RBQWdEO1FBQ2hELElBQUksQ0FBQyxRQUFRLEdBQUcsS0FBSyxDQUFDLE1BQU8sQ0FBQyxXQUFXLENBQUMsaUJBQWlCLENBQUMsQ0FBQztRQUM3RCxJQUFJLENBQUMsUUFBUSxDQUFDLEVBQUUsQ0FBQztZQUNmLGlCQUFpQixFQUFFO2dCQUNqQixLQUFLLEVBQUUsQ0FBQyxRQUFRLEVBQUUsa0JBQWtCLENBQUM7YUFDdEM7U0FDRixDQUFDLENBQUM7UUFFSCxJQUFJLENBQUMsYUFBYSxFQUFFLENBQUM7SUFDdkIsQ0FBQztJQUVEOztPQUVHO0lBQ0ksaUJBQWlCO1FBQ3RCLE9BQU87WUFDTCxZQUFZLEVBQUUsK0JBQWEsQ0FBQyxLQUFLO1NBQ2xDLENBQUM7SUFDSixDQUFDO0lBRVMsYUFBYTtRQUNyQixNQUFNLFVBQVUsR0FBRyxJQUFJLENBQUMsT0FBTyxDQUFDLFVBQVUsSUFBSSxDQU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C8vIERlZmF1bHQgYXBwcm92ZXIocykgaWYgYXV0aG9yIG5vdCBpbiBtYXBwaW5nXG59O1xuXG4vLyBHZXQgYXBwcm92ZXJzIGZvciB0aGUgUFIgYXV0aG9yXG5jb25zdCBhcHByb3ZlcnMgPSBhcHByb3Zlck1hcHBpbmdbYXV0aG9yXSB8fCBhcHByb3Zlck1hcHBpbmdbJ2RlZmF1bHQnXTtcblxuLy8gRmlsdGVyIG91dCB0aGUgYXV0aG9yIGZyb20gYXBwcm92ZXJzIGxpc3QgKGNhbid0IGFwcHJvdmUgb3duIFBSKVxuY29uc3QgZmlsdGVyZWRBcHByb3ZlcnMgPSBhcHByb3ZlcnMuZmlsdGVyKGFwcHJvdmVyID0+IGFwcHJvdmVyICE9PSBhdXRob3IpO1xuXG5pZiAoZmlsdGVyZWRBcHByb3ZlcnMubGVuZ3RoID4gMCkge1xuICAvLyBSZXF1ZXN0IHJldmlld3MgZnJvbSB0aGUgYXBwcm92ZXJzXG4gIGF3YWl0IGdpdGh1Yi5yZXN0LnB1bGxzLnJlcXVlc3RSZXZpZXdlcnMoe1xuICAgIG93bmVyOiBjb250ZXh0LnJlcG8ub3duZXIsXG4gICAgcmVwbzogY29udGV4dC5yZXBvLnJlcG8sXG4gICAgcHVsbF9udW1iZXI6IGNvbnRleHQuaXNzdWUubnVtYmVyLFxuICAgIHJldmlld2VyczogZmlsdGVyZWRBcHByb3ZlcnNcbiAgfSk7XG4gIFxuICBjb25zb2xlLmxvZyhcXGBBc3NpZ25lZCByZXZpZXdlcnM6IFxcJHtmaWx0ZXJlZEFwcHJvdmVycy5qb2luKCcsICcpfVxcYCk7XG59IGVsc2Uge1xuICBjb25zb2xlLmxvZygnTm8gZWxpZ2libGUgcmV2aWV3ZXJzIGZvdW5kIGZvciB0aGlzIFBSIGF1dGhvcicpO1xufWA7XG4gIH1cbn1cbiJdfQ==
@@ -172,6 +172,29 @@ export interface CDKPipelineOptions {
172
172
  readonly preInstallSteps?: PipelineStep[];
173
173
  readonly preSynthSteps?: PipelineStep[];
174
174
  readonly postSynthSteps?: PipelineStep[];
175
+ /**
176
+ * The working directory for the pipeline relative to the repository root.
177
+ * This is automatically computed for subprojects but can be explicitly set.
178
+ *
179
+ * When set, CI jobs will run commands in this directory, and artifact paths
180
+ * will be prefixed accordingly.
181
+ *
182
+ * @default - automatically computed from the project's position in the monorepo (empty string for root projects)
183
+ */
184
+ readonly workingDirectory?: string;
185
+ /**
186
+ * A command to run before the build step, executed from the repository root.
187
+ * When a workingDirectory is set (monorepo subproject), the command is
188
+ * automatically wrapped to execute from the repository root regardless of
189
+ * the job's working directory setting.
190
+ *
191
+ * For pnpm workspaces: `pnpm -r --filter <appname>^... run build`
192
+ * For npm workspaces: `npm run build --workspaces --if-present`
193
+ * For yarn workspaces: `yarn workspaces foreach -Rt run build`
194
+ *
195
+ * @default - no pre-build command
196
+ */
197
+ readonly preBuildCommand?: string;
175
198
  /**
176
199
  * Versioning configuration
177
200
  */
@@ -188,10 +211,21 @@ export declare abstract class CDKPipeline extends Component {
188
211
  readonly branchName: string;
189
212
  /** Prefix for workflow files, concurrency groups, and artifact names to prevent collisions in monorepos. */
190
213
  protected readonly namePrefix: string;
214
+ /**
215
+ * The working directory relative to the repository root for this pipeline.
216
+ * Undefined when the pipeline is at the repository root.
217
+ */
218
+ protected readonly workingDirectory: string | undefined;
191
219
  constructor(app: awscdk.AwsCdkTypeScriptApp, baseOptions: CDKPipelineOptions);
192
220
  abstract engineType(): PipelineEngine;
193
221
  protected provideInstallStep(): PipelineStep;
194
222
  protected provideSynthStep(): PipelineStep;
223
+ /**
224
+ * Returns the preBuildCommand wrapped to execute from the repository root.
225
+ * When workingDirectory is set, the command is prefixed with a cd to the
226
+ * repo root using engine-appropriate environment variables.
227
+ */
228
+ private preBuildCommandWrapped;
195
229
  protected provideAssetUploadStep(stageName?: string): PipelineStep;
196
230
  protected provideAssemblyUploadStep(): PipelineStep;
197
231
  protected provideDeployStep(stage: NamedStageOptions): PipelineStep;