projen-modules 4.0.0__tar.gz → 4.2.0__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: projen_modules
3
- Version: 4.0.0
3
+ Version: 4.2.0
4
4
  Summary: A collection of projen modules
5
5
  Home-page: https://github.com/daveshepherd/projen-modules.git
6
6
  Author: Dave Shepherd<dave.shepherd@endor.me.uk>
@@ -122,3 +122,11 @@ All source is located in `src` and is grouped by:
122
122
  * `utils` - these are helper functions that are often reused
123
123
 
124
124
  `test` contains tests, and mirrors the `src` directory structure. Within here there are `__snapshots__` which contain snapshots of project tests (see #section).
125
+
126
+ ## Known Issues
127
+
128
+ `cdk-typescript-app` defaults to Jest 30, which hoists `@sinonjs/fake-timers` 15 whose bundled types conflict with the `@types/sinon` used by `aws-sdk-client-mock`. Projects using `aws-sdk-client-mock` can set `compilerOptions.skipLibCheck` on the test tsconfig:
129
+
130
+ ```python
131
+ project.tryFindObjectFile('test/tsconfig.json')?.addOverride('compilerOptions.skipLibCheck', true);
132
+ ```
@@ -94,3 +94,11 @@ All source is located in `src` and is grouped by:
94
94
  * `utils` - these are helper functions that are often reused
95
95
 
96
96
  `test` contains tests, and mirrors the `src` directory structure. Within here there are `__snapshots__` which contain snapshots of project tests (see #section).
97
+
98
+ ## Known Issues
99
+
100
+ `cdk-typescript-app` defaults to Jest 30, which hoists `@sinonjs/fake-timers` 15 whose bundled types conflict with the `@types/sinon` used by `aws-sdk-client-mock`. Projects using `aws-sdk-client-mock` can set `compilerOptions.skipLibCheck` on the test tsconfig:
101
+
102
+ ```python
103
+ project.tryFindObjectFile('test/tsconfig.json')?.addOverride('compilerOptions.skipLibCheck', true);
104
+ ```
@@ -5,7 +5,7 @@ kwargs = json.loads(
5
5
  """
6
6
  {
7
7
  "name": "projen_modules",
8
- "version": "4.0.0",
8
+ "version": "4.2.0",
9
9
  "description": "A collection of projen modules",
10
10
  "license": "Apache-2.0",
11
11
  "url": "https://github.com/daveshepherd/projen-modules.git",
@@ -26,7 +26,7 @@ kwargs = json.loads(
26
26
  ],
27
27
  "package_data": {
28
28
  "projen_modules._jsii": [
29
- "projen-modules@4.0.0.jsii.tgz"
29
+ "projen-modules@4.2.0.jsii.tgz"
30
30
  ],
31
31
  "projen_modules": [
32
32
  "py.typed"
@@ -95,6 +95,14 @@ All source is located in `src` and is grouped by:
95
95
  * `utils` - these are helper functions that are often reused
96
96
 
97
97
  `test` contains tests, and mirrors the `src` directory structure. Within here there are `__snapshots__` which contain snapshots of project tests (see #section).
98
+
99
+ ## Known Issues
100
+
101
+ `cdk-typescript-app` defaults to Jest 30, which hoists `@sinonjs/fake-timers` 15 whose bundled types conflict with the `@types/sinon` used by `aws-sdk-client-mock`. Projects using `aws-sdk-client-mock` can set `compilerOptions.skipLibCheck` on the test tsconfig:
102
+
103
+ ```python
104
+ project.tryFindObjectFile('test/tsconfig.json')?.addOverride('compilerOptions.skipLibCheck', true);
105
+ ```
98
106
  '''
99
107
  from __future__ import annotations
100
108
 
@@ -157,6 +165,9 @@ class CdkTypeScriptApp(
157
165
  ):
158
166
  '''A CDK application in TypeScript.
159
167
 
168
+ Defaults to the Node.js 24 Lambda runtime (``lambdaOptions.runtime``) with
169
+ matching ``@types/node``, and Jest 30 (``jestOptions.jestVersion``).
170
+
160
171
  :pjid: cdk-typescript-app
161
172
  '''
162
173
 
@@ -215,6 +226,7 @@ class CdkTypeScriptApp(
215
226
  delete_orphaned_lock_files: typing.Optional[builtins.bool] = None,
216
227
  dependabot: typing.Optional[builtins.bool] = None,
217
228
  dependabot_options: typing.Optional[typing.Union["_projen_github_04054675.DependabotOptions", typing.Dict[builtins.str, typing.Any]]] = None,
229
+ deployments: typing.Optional[typing.Sequence[typing.Union["DeploymentEnvironment", typing.Dict[builtins.str, typing.Any]]]] = None,
218
230
  deps: typing.Optional[typing.Sequence[builtins.str]] = None,
219
231
  deps_upgrade: typing.Optional[builtins.bool] = None,
220
232
  deps_upgrade_options: typing.Optional[typing.Union["_projen_javascript_04054675.UpgradeDependenciesOptions", typing.Dict[builtins.str, typing.Any]]] = None,
@@ -394,6 +406,7 @@ class CdkTypeScriptApp(
394
406
  :param delete_orphaned_lock_files: (experimental) Automatically delete lockfiles from package managers that are not the active one. Only triggered when the lockfile for the configured package manager already exists. This is useful when migrating between package managers to avoid conflicts. Default: true
395
407
  :param dependabot: (experimental) Use dependabot to handle dependency upgrades. Cannot be used in conjunction with ``depsUpgrade``. Default: false
396
408
  :param dependabot_options: (experimental) Options for dependabot. Default: - default options
409
+ :param deployments: Environments to deploy to from the release workflow, one job each, chained in array order. Default: []
397
410
  :param deps: (experimental) Runtime dependencies of this module. The recommendation is to only specify the module name here (e.g. ``express``). This will behave similar to ``pnpm add`` or ``npm install`` in the sense that it will add the module as a dependency to your ``package.json`` file with the latest version (``^``). You can specify semver requirements in the same syntax passed to ``pnpm add`` or ``npm i`` (e.g. ``express@^2``) and this will be what your ``package.json`` will eventually include. Default: []
398
411
  :param deps_upgrade: (experimental) Use tasks and github workflows to handle dependency upgrades. Cannot be used in conjunction with ``dependabot``. Default: - ``true`` for root projects, ``false`` for subprojects
399
412
  :param deps_upgrade_options: (experimental) Options for ``UpgradeDependencies``. Default: - default options
@@ -573,6 +586,7 @@ class CdkTypeScriptApp(
573
586
  delete_orphaned_lock_files=delete_orphaned_lock_files,
574
587
  dependabot=dependabot,
575
588
  dependabot_options=dependabot_options,
589
+ deployments=deployments,
576
590
  deps=deps,
577
591
  deps_upgrade=deps_upgrade,
578
592
  deps_upgrade_options=deps_upgrade_options,
@@ -771,6 +785,7 @@ class CdkTypeScriptApp(
771
785
  "delete_orphaned_lock_files": "deleteOrphanedLockFiles",
772
786
  "dependabot": "dependabot",
773
787
  "dependabot_options": "dependabotOptions",
788
+ "deployments": "deployments",
774
789
  "deps": "deps",
775
790
  "deps_upgrade": "depsUpgrade",
776
791
  "deps_upgrade_options": "depsUpgradeOptions",
@@ -954,6 +969,7 @@ class CdkTypeScriptAppOptions:
954
969
  delete_orphaned_lock_files: typing.Optional[builtins.bool] = None,
955
970
  dependabot: typing.Optional[builtins.bool] = None,
956
971
  dependabot_options: typing.Optional[typing.Union["_projen_github_04054675.DependabotOptions", typing.Dict[builtins.str, typing.Any]]] = None,
972
+ deployments: typing.Optional[typing.Sequence[typing.Union["DeploymentEnvironment", typing.Dict[builtins.str, typing.Any]]]] = None,
957
973
  deps: typing.Optional[typing.Sequence[builtins.str]] = None,
958
974
  deps_upgrade: typing.Optional[builtins.bool] = None,
959
975
  deps_upgrade_options: typing.Optional[typing.Union["_projen_javascript_04054675.UpgradeDependenciesOptions", typing.Dict[builtins.str, typing.Any]]] = None,
@@ -1134,6 +1150,7 @@ class CdkTypeScriptAppOptions:
1134
1150
  :param delete_orphaned_lock_files: (experimental) Automatically delete lockfiles from package managers that are not the active one. Only triggered when the lockfile for the configured package manager already exists. This is useful when migrating between package managers to avoid conflicts. Default: true
1135
1151
  :param dependabot: (experimental) Use dependabot to handle dependency upgrades. Cannot be used in conjunction with ``depsUpgrade``. Default: false
1136
1152
  :param dependabot_options: (experimental) Options for dependabot. Default: - default options
1153
+ :param deployments: Environments to deploy to from the release workflow, one job each, chained in array order. Default: []
1137
1154
  :param deps: (experimental) Runtime dependencies of this module. The recommendation is to only specify the module name here (e.g. ``express``). This will behave similar to ``pnpm add`` or ``npm install`` in the sense that it will add the module as a dependency to your ``package.json`` file with the latest version (``^``). You can specify semver requirements in the same syntax passed to ``pnpm add`` or ``npm i`` (e.g. ``express@^2``) and this will be what your ``package.json`` will eventually include. Default: []
1138
1155
  :param deps_upgrade: (experimental) Use tasks and github workflows to handle dependency upgrades. Cannot be used in conjunction with ``dependabot``. Default: - ``true`` for root projects, ``false`` for subprojects
1139
1156
  :param deps_upgrade_options: (experimental) Options for ``UpgradeDependencies``. Default: - default options
@@ -1382,6 +1399,7 @@ class CdkTypeScriptAppOptions:
1382
1399
  check_type(argname="argument delete_orphaned_lock_files", value=delete_orphaned_lock_files, expected_type=type_hints["delete_orphaned_lock_files"])
1383
1400
  check_type(argname="argument dependabot", value=dependabot, expected_type=type_hints["dependabot"])
1384
1401
  check_type(argname="argument dependabot_options", value=dependabot_options, expected_type=type_hints["dependabot_options"])
1402
+ check_type(argname="argument deployments", value=deployments, expected_type=type_hints["deployments"])
1385
1403
  check_type(argname="argument deps", value=deps, expected_type=type_hints["deps"])
1386
1404
  check_type(argname="argument deps_upgrade", value=deps_upgrade, expected_type=type_hints["deps_upgrade"])
1387
1405
  check_type(argname="argument deps_upgrade_options", value=deps_upgrade_options, expected_type=type_hints["deps_upgrade_options"])
@@ -1610,6 +1628,8 @@ class CdkTypeScriptAppOptions:
1610
1628
  self._values["dependabot"] = dependabot
1611
1629
  if dependabot_options is not None:
1612
1630
  self._values["dependabot_options"] = dependabot_options
1631
+ if deployments is not None:
1632
+ self._values["deployments"] = deployments
1613
1633
  if deps is not None:
1614
1634
  self._values["deps"] = deps
1615
1635
  if deps_upgrade is not None:
@@ -2538,6 +2558,15 @@ class CdkTypeScriptAppOptions:
2538
2558
  result = self._values.get("dependabot_options")
2539
2559
  return typing.cast(typing.Optional["_projen_github_04054675.DependabotOptions"], result)
2540
2560
 
2561
+ @builtins.property
2562
+ def deployments(self) -> typing.Optional[typing.List["DeploymentEnvironment"]]:
2563
+ '''Environments to deploy to from the release workflow, one job each, chained in array order.
2564
+
2565
+ :default: []
2566
+ '''
2567
+ result = self._values.get("deployments")
2568
+ return typing.cast(typing.Optional[typing.List["DeploymentEnvironment"]], result)
2569
+
2541
2570
  @builtins.property
2542
2571
  def deps(self) -> typing.Optional[typing.List[builtins.str]]:
2543
2572
  '''(experimental) Runtime dependencies of this module.
@@ -4138,6 +4167,124 @@ class CdkTypeScriptAppOptions:
4138
4167
  )
4139
4168
 
4140
4169
 
4170
+ @jsii.data_type(
4171
+ jsii_type="projen-modules.DeploymentEnvironment",
4172
+ jsii_struct_bases=[],
4173
+ name_mapping={
4174
+ "environment": "environment",
4175
+ "region": "region",
4176
+ "env": "env",
4177
+ "name": "name",
4178
+ "require_approval": "requireApproval",
4179
+ "role_secret": "roleSecret",
4180
+ },
4181
+ )
4182
+ class DeploymentEnvironment:
4183
+ def __init__(
4184
+ self,
4185
+ *,
4186
+ environment: builtins.str,
4187
+ region: builtins.str,
4188
+ env: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
4189
+ name: typing.Optional[builtins.str] = None,
4190
+ require_approval: typing.Optional[builtins.str] = None,
4191
+ role_secret: typing.Optional[builtins.str] = None,
4192
+ ) -> None:
4193
+ '''An environment that the release workflow deploys the CDK app to.
4194
+
4195
+ :param environment: The GitHub environment the deploy job runs in, which also names the job ``deploy_<environment>``. Only letters, digits, ``_`` and ``-`` are allowed, so that it makes a valid job id.
4196
+ :param region: The AWS region to deploy to.
4197
+ :param env: Environment variables for the deploy step, whose values may reference secrets, e.g. ``${{ secrets.ALERT_EMAIL }}``. Default: {}
4198
+ :param name: The display name of the deploy job. Default: 'Deploy to '
4199
+ :param require_approval: The ``--require-approval`` level passed to ``cdk deploy``. Default: 'never'
4200
+ :param role_secret: The secret holding the ARN of the IAM role that the deploy job assumes, through GitHub's OIDC provider. Default: 'AWS_DEPLOYMENT_ROLE_ARN'
4201
+ '''
4202
+ if __debug__:
4203
+ type_hints = cached_type_hints(_typecheckingstub__f5257b3c401aa630c66c9d760ce443a2d4d1537904e174ec2032497d8304de2e)
4204
+ check_type(argname="argument environment", value=environment, expected_type=type_hints["environment"])
4205
+ check_type(argname="argument region", value=region, expected_type=type_hints["region"])
4206
+ check_type(argname="argument env", value=env, expected_type=type_hints["env"])
4207
+ check_type(argname="argument name", value=name, expected_type=type_hints["name"])
4208
+ check_type(argname="argument require_approval", value=require_approval, expected_type=type_hints["require_approval"])
4209
+ check_type(argname="argument role_secret", value=role_secret, expected_type=type_hints["role_secret"])
4210
+ self._values: typing.Dict[builtins.str, typing.Any] = {
4211
+ "environment": environment,
4212
+ "region": region,
4213
+ }
4214
+ if env is not None:
4215
+ self._values["env"] = env
4216
+ if name is not None:
4217
+ self._values["name"] = name
4218
+ if require_approval is not None:
4219
+ self._values["require_approval"] = require_approval
4220
+ if role_secret is not None:
4221
+ self._values["role_secret"] = role_secret
4222
+
4223
+ @builtins.property
4224
+ def environment(self) -> builtins.str:
4225
+ '''The GitHub environment the deploy job runs in, which also names the job ``deploy_<environment>``.
4226
+
4227
+ Only letters, digits, ``_`` and ``-`` are allowed, so that it makes a valid job id.
4228
+ '''
4229
+ result = self._values.get("environment")
4230
+ assert result is not None, "Required property 'environment' is missing"
4231
+ return typing.cast(builtins.str, result)
4232
+
4233
+ @builtins.property
4234
+ def region(self) -> builtins.str:
4235
+ '''The AWS region to deploy to.'''
4236
+ result = self._values.get("region")
4237
+ assert result is not None, "Required property 'region' is missing"
4238
+ return typing.cast(builtins.str, result)
4239
+
4240
+ @builtins.property
4241
+ def env(self) -> typing.Optional[typing.Mapping[builtins.str, builtins.str]]:
4242
+ '''Environment variables for the deploy step, whose values may reference secrets, e.g. ``${{ secrets.ALERT_EMAIL }}``.
4243
+
4244
+ :default: {}
4245
+ '''
4246
+ result = self._values.get("env")
4247
+ return typing.cast(typing.Optional[typing.Mapping[builtins.str, builtins.str]], result)
4248
+
4249
+ @builtins.property
4250
+ def name(self) -> typing.Optional[builtins.str]:
4251
+ '''The display name of the deploy job.
4252
+
4253
+ :default: 'Deploy to '
4254
+ '''
4255
+ result = self._values.get("name")
4256
+ return typing.cast(typing.Optional[builtins.str], result)
4257
+
4258
+ @builtins.property
4259
+ def require_approval(self) -> typing.Optional[builtins.str]:
4260
+ '''The ``--require-approval`` level passed to ``cdk deploy``.
4261
+
4262
+ :default: 'never'
4263
+ '''
4264
+ result = self._values.get("require_approval")
4265
+ return typing.cast(typing.Optional[builtins.str], result)
4266
+
4267
+ @builtins.property
4268
+ def role_secret(self) -> typing.Optional[builtins.str]:
4269
+ '''The secret holding the ARN of the IAM role that the deploy job assumes, through GitHub's OIDC provider.
4270
+
4271
+ :default: 'AWS_DEPLOYMENT_ROLE_ARN'
4272
+ '''
4273
+ result = self._values.get("role_secret")
4274
+ return typing.cast(typing.Optional[builtins.str], result)
4275
+
4276
+ def __eq__(self, rhs: typing.Any) -> builtins.bool:
4277
+ return isinstance(rhs, self.__class__) and rhs._values == self._values
4278
+
4279
+ def __ne__(self, rhs: typing.Any) -> builtins.bool:
4280
+ return not (rhs == self)
4281
+
4282
+ def __repr__(self) -> str:
4283
+ return "DeploymentEnvironment(%s)" % ", ".join(
4284
+ k + "=" + repr(v) for k, v in self._values.items()
4285
+ )
4286
+
4287
+
4141
4288
  @jsii.interface(jsii_type="projen-modules.ISectionOptions")
4142
4289
  class ISectionOptions(typing_extensions.Protocol):
4143
4290
  @builtins.property
@@ -13149,6 +13296,7 @@ class Section(metaclass=jsii.JSIIMeta, jsii_type="projen-modules.Section"):
13149
13296
  __all__ = [
13150
13297
  "CdkTypeScriptApp",
13151
13298
  "CdkTypeScriptAppOptions",
13299
+ "DeploymentEnvironment",
13152
13300
  "ISectionOptions",
13153
13301
  "JsiiProject",
13154
13302
  "JsiiProjectOptions",
@@ -13223,6 +13371,7 @@ def _typecheckingstub__3a6354f4c0532263f309ca59025d89b070b95588f76bd5815340cc71a
13223
13371
  delete_orphaned_lock_files: typing.Optional[builtins.bool] = None,
13224
13372
  dependabot: typing.Optional[builtins.bool] = None,
13225
13373
  dependabot_options: typing.Optional[typing.Union[_projen_github_04054675.DependabotOptions, typing.Dict[builtins.str, typing.Any]]] = None,
13374
+ deployments: typing.Optional[typing.Sequence[typing.Union[DeploymentEnvironment, typing.Dict[builtins.str, typing.Any]]]] = None,
13226
13375
  deps: typing.Optional[typing.Sequence[builtins.str]] = None,
13227
13376
  deps_upgrade: typing.Optional[builtins.bool] = None,
13228
13377
  deps_upgrade_options: typing.Optional[typing.Union[_projen_javascript_04054675.UpgradeDependenciesOptions, typing.Dict[builtins.str, typing.Any]]] = None,
@@ -13352,6 +13501,18 @@ def _typecheckingstub__3a6354f4c0532263f309ca59025d89b070b95588f76bd5815340cc71a
13352
13501
  """Type checking stubs"""
13353
13502
  pass
13354
13503
 
13504
+ def _typecheckingstub__f5257b3c401aa630c66c9d760ce443a2d4d1537904e174ec2032497d8304de2e(
13505
+ *,
13506
+ environment: builtins.str,
13507
+ region: builtins.str,
13508
+ env: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
13509
+ name: typing.Optional[builtins.str] = None,
13510
+ require_approval: typing.Optional[builtins.str] = None,
13511
+ role_secret: typing.Optional[builtins.str] = None,
13512
+ ) -> None:
13513
+ """Type checking stubs"""
13514
+ pass
13515
+
13355
13516
  def _typecheckingstub__23029d204b6d2d942365c98cdf1ae37497306087c242e282bc4760de997efd13(
13356
13517
  value: builtins.str,
13357
13518
  ) -> None:
@@ -18,7 +18,7 @@ import constructs._jsii
18
18
  import projen._jsii
19
19
 
20
20
  __jsii_assembly__ = jsii.JSIIAssembly.load(
21
- "projen-modules", "4.0.0", __name__[0:-6], "projen-modules@4.0.0.jsii.tgz"
21
+ "projen-modules", "4.2.0", __name__[0:-6], "projen-modules@4.2.0.jsii.tgz"
22
22
  )
23
23
 
24
24
  __all__ = [
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: projen_modules
3
- Version: 4.0.0
3
+ Version: 4.2.0
4
4
  Summary: A collection of projen modules
5
5
  Home-page: https://github.com/daveshepherd/projen-modules.git
6
6
  Author: Dave Shepherd<dave.shepherd@endor.me.uk>
@@ -122,3 +122,11 @@ All source is located in `src` and is grouped by:
122
122
  * `utils` - these are helper functions that are often reused
123
123
 
124
124
  `test` contains tests, and mirrors the `src` directory structure. Within here there are `__snapshots__` which contain snapshots of project tests (see #section).
125
+
126
+ ## Known Issues
127
+
128
+ `cdk-typescript-app` defaults to Jest 30, which hoists `@sinonjs/fake-timers` 15 whose bundled types conflict with the `@types/sinon` used by `aws-sdk-client-mock`. Projects using `aws-sdk-client-mock` can set `compilerOptions.skipLibCheck` on the test tsconfig:
129
+
130
+ ```python
131
+ project.tryFindObjectFile('test/tsconfig.json')?.addOverride('compilerOptions.skipLibCheck', true);
132
+ ```
@@ -11,4 +11,4 @@ src/projen_modules.egg-info/dependency_links.txt
11
11
  src/projen_modules.egg-info/requires.txt
12
12
  src/projen_modules.egg-info/top_level.txt
13
13
  src/projen_modules/_jsii/__init__.py
14
- src/projen_modules/_jsii/projen-modules@4.0.0.jsii.tgz
14
+ src/projen_modules/_jsii/projen-modules@4.2.0.jsii.tgz
File without changes
File without changes