@nikovirtala/projen-constructs 0.0.8 → 0.0.10

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.
@@ -0,0 +1,1143 @@
1
+ import type { awscdk, cdk, github, GitOptions, GroupRunnerOptions, IgnoreFileOptions, javascript, LoggerOptions, Project, ProjenrcJsonOptions, ReleasableCommits, release, RenovatebotOptions, SampleReadmeProps, typescript } from 'projen';
2
+ import type { VitestOptions } from '../';
3
+ /**
4
+ * AwsCdkConstructProjectOptions
5
+ */
6
+ export interface AwsCdkConstructProjectOptions {
7
+ /**
8
+ * Common options for all AWS Lambda functions.
9
+ * @default - default options
10
+ * @stability experimental
11
+ */
12
+ readonly lambdaOptions?: awscdk.LambdaFunctionCommonOptions;
13
+ /**
14
+ * Automatically adds an `awscdk.LambdaExtension` for each `.lambda-extension.ts` entrypoint in your source tree. If this is disabled, you can manually add an `awscdk.AutoDiscover` component to your project.
15
+ * @default true
16
+ * @stability experimental
17
+ */
18
+ readonly lambdaExtensionAutoDiscover?: boolean;
19
+ /**
20
+ * Automatically adds an `aws_lambda.Function` for each `.lambda.ts` handler in your source tree. If this is disabled, you either need to explicitly call `aws_lambda.Function.autoDiscover()` or define a `new aws_lambda.Function()` for each handler.
21
+ * @default true
22
+ * @stability experimental
23
+ */
24
+ readonly lambdaAutoDiscover?: boolean;
25
+ /**
26
+ * Automatically discovers and creates integration tests for each `.integ.ts` file under your test directory.
27
+ * @default true
28
+ * @stability experimental
29
+ */
30
+ readonly integrationTestAutoDiscover?: boolean;
31
+ /**
32
+ * Enable experimental support for the AWS CDK integ-runner.
33
+ * @default false
34
+ * @stability experimental
35
+ */
36
+ readonly experimentalIntegRunner?: boolean;
37
+ /**
38
+ * Automatically adds an `cloudfront.experimental.EdgeFunction` for each `.edge-lambda.ts` handler in your source tree. If this is disabled, you can manually add an `awscdk.AutoDiscover` component to your project.
39
+ * @default true
40
+ * @stability experimental
41
+ */
42
+ readonly edgeLambdaAutoDiscover?: boolean;
43
+ /**
44
+ * Minimum version of the `constructs` library to depend on.
45
+ * @default - for CDK 1.x the default is "3.2.27", for CDK 2.x the default is
46
+ "10.0.5".
47
+ * @stability experimental
48
+ */
49
+ readonly constructsVersion?: string;
50
+ /**
51
+ * Use pinned version instead of caret version for CDK.
52
+ * You can use this to prevent mixed versions for your CDK dependencies and to prevent auto-updates.
53
+ * If you use experimental features this will let you define the moment you include breaking changes.
54
+ * @stability experimental
55
+ */
56
+ readonly cdkVersionPinning?: boolean;
57
+ /**
58
+ * Version range of the AWS CDK CLI to depend on.
59
+ * Can be either a specific version, or an NPM version range.
60
+ *
61
+ * By default, the latest 2.x version will be installed; you can use this
62
+ * option to restrict it to a specific version or version range.
63
+ * @default "^2"
64
+ * @stability experimental
65
+ */
66
+ readonly cdkCliVersion?: string;
67
+ /**
68
+ * Install the assertions library?
69
+ * Only needed for CDK 1.x. If using CDK 2.x then
70
+ * assertions is already included in 'aws-cdk-lib'
71
+ * @default - will be included by default for AWS CDK >= 1.111.0 < 2.0.0
72
+ * @stability experimental
73
+ */
74
+ readonly cdkAssertions?: boolean;
75
+ /**
76
+ * Minimum version of the AWS CDK to depend on.
77
+ * @default "2.1.0"
78
+ * @stability experimental
79
+ */
80
+ readonly cdkVersion: string;
81
+ /**
82
+ * Libraries will be picked up by the construct catalog when they are published to npm as jsii modules and will be published under:.
83
+ * https://awscdk.io/packages/[@SCOPE/]PACKAGE@VERSION
84
+ *
85
+ * The catalog will also post a tweet to https://twitter.com/awscdkio with the
86
+ * package name, description and the above link. You can disable these tweets
87
+ * through `{ announce: false }`.
88
+ *
89
+ * You can also add a Twitter handle through `{ twitter: 'xx' }` which will be
90
+ * mentioned in the tweet.
91
+ * @default - new version will be announced
92
+ * @stability experimental
93
+ */
94
+ readonly catalog?: cdk.Catalog;
95
+ /**
96
+ * @default "."
97
+ * @stability experimental
98
+ */
99
+ readonly rootdir?: string;
100
+ /**
101
+ * Publish to pypi.
102
+ * @default - no publishing
103
+ * @stability experimental
104
+ */
105
+ readonly publishToPypi?: cdk.JsiiPythonTarget;
106
+ /**
107
+ * Publish to NuGet.
108
+ * @default - no publishing
109
+ * @stability experimental
110
+ */
111
+ readonly publishToNuget?: cdk.JsiiDotNetTarget;
112
+ /**
113
+ * Publish to maven.
114
+ * @default - no publishing
115
+ * @stability experimental
116
+ */
117
+ readonly publishToMaven?: cdk.JsiiJavaTarget;
118
+ /**
119
+ * Publish Go bindings to a git repository.
120
+ * @default - no publishing
121
+ * @stability experimental
122
+ */
123
+ readonly publishToGo?: cdk.JsiiGoTarget;
124
+ /**
125
+ * Version of the jsii compiler to use.
126
+ * Set to "*" if you want to manually manage the version of jsii in your
127
+ * project by managing updates to `package.json` on your own.
128
+ *
129
+ * NOTE: The jsii compiler releases since 5.0.0 are not semantically versioned
130
+ * and should remain on the same minor, so we recommend using a `~` dependency
131
+ * (e.g. `~5.0.0`).
132
+ * @default "~5.8.0"
133
+ * @stability experimental
134
+ * @pjnew "~5.9.0"
135
+ */
136
+ readonly jsiiVersion?: string;
137
+ /**
138
+ * Accepts a list of glob patterns.
139
+ * Files matching any of those patterns will be excluded from the TypeScript compiler input.
140
+ *
141
+ * By default, jsii will include all *.ts files (except .d.ts files) in the TypeScript compiler input.
142
+ * This can be problematic for example when the package's build or test procedure generates .ts files
143
+ * that cannot be compiled with jsii's compiler settings.
144
+ * @stability experimental
145
+ */
146
+ readonly excludeTypescript?: Array<string>;
147
+ /**
148
+ * File path for generated docs.
149
+ * @default "API.md"
150
+ * @stability experimental
151
+ */
152
+ readonly docgenFilePath?: string;
153
+ /**
154
+ * Emit a compressed version of the assembly.
155
+ * @default false
156
+ * @stability experimental
157
+ */
158
+ readonly compressAssembly?: boolean;
159
+ /**
160
+ * Name of the ignore file for API compatibility tests.
161
+ * @default ".compatignore"
162
+ * @stability experimental
163
+ */
164
+ readonly compatIgnore?: string;
165
+ /**
166
+ * Automatically run API compatibility test against the latest version published to npm after compilation.
167
+ * - You can manually run compatibility tests using `yarn compat` if this feature is disabled.
168
+ * - You can ignore compatibility failures by adding lines to a ".compatignore" file.
169
+ * @default false
170
+ * @stability experimental
171
+ */
172
+ readonly compat?: boolean;
173
+ /**
174
+ * Git repository URL.
175
+ * @default $GIT_REMOTE
176
+ * @stability experimental
177
+ */
178
+ readonly repositoryUrl: string;
179
+ /**
180
+ * Email or URL of the library author.
181
+ * @default $GIT_USER_EMAIL
182
+ * @stability experimental
183
+ */
184
+ readonly authorAddress: string;
185
+ /**
186
+ * The name of the library author.
187
+ * @default $GIT_USER_NAME
188
+ * @stability experimental
189
+ */
190
+ readonly author: string;
191
+ /**
192
+ * TypeScript version to use.
193
+ * NOTE: Typescript is not semantically versioned and should remain on the
194
+ * same minor, so we recommend using a `~` dependency (e.g. `~1.2.3`).
195
+ * @default "latest"
196
+ * @stability experimental
197
+ */
198
+ readonly typescriptVersion?: string;
199
+ /**
200
+ * The name of the development tsconfig.json file.
201
+ * @default "tsconfig.dev.json"
202
+ * @stability experimental
203
+ */
204
+ readonly tsconfigDevFile?: string;
205
+ /**
206
+ * Custom tsconfig options for the development tsconfig.json file (used for testing).
207
+ * @default - use the production tsconfig options
208
+ * @stability experimental
209
+ */
210
+ readonly tsconfigDev?: javascript.TypescriptConfigOptions;
211
+ /**
212
+ * Custom TSConfig.
213
+ * @default - default options
214
+ * @stability experimental
215
+ */
216
+ readonly tsconfig?: javascript.TypescriptConfigOptions;
217
+ /**
218
+ * Jest tests directory. Tests files should be named `xxx.test.ts`.
219
+ * If this directory is under `srcdir` (e.g. `src/test`, `src/__tests__`),
220
+ * then tests are going to be compiled into `lib/` and executed as javascript.
221
+ * If the test directory is outside of `src`, then we configure jest to
222
+ * compile the code in-memory.
223
+ * @default "test"
224
+ * @stability experimental
225
+ */
226
+ readonly testdir?: string;
227
+ /**
228
+ * Typescript sources directory.
229
+ * @default "src"
230
+ * @stability experimental
231
+ */
232
+ readonly srcdir?: string;
233
+ /**
234
+ * Options for .projenrc.ts.
235
+ * @stability experimental
236
+ */
237
+ readonly projenrcTsOptions?: typescript.ProjenrcOptions;
238
+ /**
239
+ * Use TypeScript for your projenrc file (`.projenrc.ts`).
240
+ * @default false
241
+ * @stability experimental
242
+ * @pjnew true
243
+ */
244
+ readonly projenrcTs?: boolean;
245
+ /**
246
+ * Typescript artifacts output directory.
247
+ * @default "lib"
248
+ * @stability experimental
249
+ */
250
+ readonly libdir?: string;
251
+ /**
252
+ * The .d.ts file that includes the type declarations for this module.
253
+ * @default - .d.ts file derived from the project's entrypoint (usually lib/index.d.ts)
254
+ * @stability experimental
255
+ */
256
+ readonly entrypointTypes?: string;
257
+ /**
258
+ * Docs directory.
259
+ * @default "docs"
260
+ * @stability experimental
261
+ */
262
+ readonly docsDirectory?: string;
263
+ /**
264
+ * Docgen by Typedoc.
265
+ * @default false
266
+ * @stability experimental
267
+ */
268
+ readonly docgen?: boolean;
269
+ /**
270
+ * Do not generate a `tsconfig.dev.json` file.
271
+ * @default false
272
+ * @stability experimental
273
+ */
274
+ readonly disableTsconfigDev?: boolean;
275
+ /**
276
+ * Do not generate a `tsconfig.json` file (used by jsii projects since tsconfig.json is generated by the jsii compiler).
277
+ * @default false
278
+ * @stability experimental
279
+ */
280
+ readonly disableTsconfig?: boolean;
281
+ /**
282
+ * Enable Node.js package cache in GitHub workflows.
283
+ * @default false
284
+ * @stability experimental
285
+ */
286
+ readonly workflowPackageCache?: boolean;
287
+ /**
288
+ * The node version used in GitHub Actions workflows.
289
+ * Always use this option if your GitHub Actions workflows require a specific to run.
290
+ * @default - `minNodeVersion` if set, otherwise `lts/*`.
291
+ * @stability experimental
292
+ */
293
+ readonly workflowNodeVersion?: string;
294
+ /**
295
+ * The git identity to use in workflows.
296
+ * @default - default GitHub Actions user
297
+ * @stability experimental
298
+ */
299
+ readonly workflowGitIdentity?: github.GitIdentity;
300
+ /**
301
+ * Workflow steps to use in order to bootstrap this repo.
302
+ * @default "yarn install --frozen-lockfile && yarn projen"
303
+ * @stability experimental
304
+ */
305
+ readonly workflowBootstrapSteps?: Array<github.workflows.JobStep>;
306
+ /**
307
+ * Automatically release to npm when new versions are introduced.
308
+ * @default false
309
+ * @stability experimental
310
+ */
311
+ readonly releaseToNpm?: boolean;
312
+ /**
313
+ * Add release management to this project.
314
+ * @default - true (false for subprojects)
315
+ * @stability experimental
316
+ */
317
+ readonly release?: boolean;
318
+ /**
319
+ * The contents of the pull request template.
320
+ * @default - default content
321
+ * @stability experimental
322
+ */
323
+ readonly pullRequestTemplateContents?: Array<string>;
324
+ /**
325
+ * Include a GitHub pull request template.
326
+ * @default true
327
+ * @stability experimental
328
+ */
329
+ readonly pullRequestTemplate?: boolean;
330
+ /**
331
+ * Version of projen to install.
332
+ * @default - Defaults to the latest version.
333
+ * @stability experimental
334
+ */
335
+ readonly projenVersion?: string;
336
+ /**
337
+ * Options for .projenrc.js.
338
+ * @default - default options
339
+ * @stability experimental
340
+ */
341
+ readonly projenrcJsOptions?: javascript.ProjenrcOptions;
342
+ /**
343
+ * Generate (once) .projenrc.js (in JavaScript). Set to `false` in order to disable .projenrc.js generation.
344
+ * @default - true if projenrcJson is false
345
+ * @stability experimental
346
+ */
347
+ readonly projenrcJs?: boolean;
348
+ /**
349
+ * Indicates of "projen" should be installed as a devDependency.
350
+ * @default - true if not a subproject
351
+ * @stability experimental
352
+ */
353
+ readonly projenDevDependency?: boolean;
354
+ /**
355
+ * Defines a `package` task that will produce an npm tarball under the artifacts directory (e.g. `dist`).
356
+ * @default true
357
+ * @stability experimental
358
+ */
359
+ readonly package?: boolean;
360
+ /**
361
+ * Configuration options for .npmignore file.
362
+ * @stability experimental
363
+ */
364
+ readonly npmIgnoreOptions?: IgnoreFileOptions;
365
+ /**
366
+ * Defines an .npmignore file. Normally this is only needed for libraries that are packaged as tarballs.
367
+ * @default true
368
+ * @stability experimental
369
+ */
370
+ readonly npmignoreEnabled?: boolean;
371
+ /**
372
+ * Additional entries to .gitignore.
373
+ * @stability experimental
374
+ */
375
+ readonly gitignore?: Array<string>;
376
+ /**
377
+ * Options for `UpgradeDependencies`.
378
+ * @default - default options
379
+ * @stability experimental
380
+ */
381
+ readonly depsUpgradeOptions?: javascript.UpgradeDependenciesOptions;
382
+ /**
383
+ * Use tasks and github workflows to handle dependency upgrades.
384
+ * Cannot be used in conjunction with `dependabot`.
385
+ * @default true
386
+ * @stability experimental
387
+ */
388
+ readonly depsUpgrade?: boolean;
389
+ /**
390
+ * Options for dependabot.
391
+ * @default - default options
392
+ * @stability experimental
393
+ */
394
+ readonly dependabotOptions?: github.DependabotOptions;
395
+ /**
396
+ * Use dependabot to handle dependency upgrades.
397
+ * Cannot be used in conjunction with `depsUpgrade`.
398
+ * @default false
399
+ * @stability experimental
400
+ */
401
+ readonly dependabot?: boolean;
402
+ /**
403
+ * The copyright years to put in the LICENSE file.
404
+ * @default - current year
405
+ * @stability experimental
406
+ */
407
+ readonly copyrightPeriod?: string;
408
+ /**
409
+ * License copyright owner.
410
+ * @default - defaults to the value of authorName or "" if `authorName` is undefined.
411
+ * @stability experimental
412
+ */
413
+ readonly copyrightOwner?: string;
414
+ /**
415
+ * Define the secret name for a specified https://codecov.io/ token.
416
+ * @default - OIDC auth is used
417
+ * @stability experimental
418
+ */
419
+ readonly codeCovTokenSecret?: string;
420
+ /**
421
+ * Define a GitHub workflow step for sending code coverage metrics to https://codecov.io/ Uses codecov/codecov-action@v5 By default, OIDC auth is used. Alternatively a token can be provided via `codeCovTokenSecret`.
422
+ * @default false
423
+ * @stability experimental
424
+ */
425
+ readonly codeCov?: boolean;
426
+ /**
427
+ * Configure which licenses should be deemed acceptable for use by dependencies.
428
+ * This setting will cause the build to fail, if any prohibited or not allowed licenses ares encountered.
429
+ * @default - no license checks are run during the build and all licenses will be accepted
430
+ * @stability experimental
431
+ */
432
+ readonly checkLicenses?: javascript.LicenseCheckerOptions;
433
+ /**
434
+ * Options for `Bundler`.
435
+ * @stability experimental
436
+ */
437
+ readonly bundlerOptions?: javascript.BundlerOptions;
438
+ /**
439
+ * Options for PR build workflow.
440
+ * @stability experimental
441
+ */
442
+ readonly buildWorkflowOptions?: javascript.BuildWorkflowOptions;
443
+ /**
444
+ * Define a GitHub workflow for building PRs.
445
+ * @default - true if not a subproject
446
+ * @stability experimental
447
+ */
448
+ readonly buildWorkflow?: boolean;
449
+ /**
450
+ * Biome options.
451
+ * @default - default options
452
+ * @stability experimental
453
+ */
454
+ readonly biomeOptions?: javascript.BiomeOptions;
455
+ /**
456
+ * Automatically approve deps upgrade PRs, allowing them to be merged by mergify (if configued).
457
+ * Throw if set to true but `autoApproveOptions` are not defined.
458
+ * @default - true
459
+ * @stability experimental
460
+ */
461
+ readonly autoApproveUpgrades?: boolean;
462
+ /**
463
+ * Security audit options.
464
+ * @default - default options
465
+ * @stability experimental
466
+ */
467
+ readonly auditDepsOptions?: javascript.AuditOptions;
468
+ /**
469
+ * Run security audit on dependencies.
470
+ * When enabled, creates an "audit" task that checks for known security vulnerabilities
471
+ * in dependencies. By default, runs during every build and checks for "high" severity
472
+ * vulnerabilities or above in all dependencies (including dev dependencies).
473
+ * @default false
474
+ * @stability experimental
475
+ */
476
+ readonly auditDeps?: boolean;
477
+ /**
478
+ * A directory which will contain build artifacts.
479
+ * @default "dist"
480
+ * @stability experimental
481
+ */
482
+ readonly artifactsDirectory?: string;
483
+ /**
484
+ * The name of the main release branch.
485
+ * @default "main"
486
+ * @stability experimental
487
+ */
488
+ readonly defaultReleaseBranch: string;
489
+ /**
490
+ * Github Runner Group selection options.
491
+ * @stability experimental
492
+ * @description Defines a target Runner Group by name and/or labels
493
+ * @throws {Error} if both `runsOn` and `runsOnGroup` are specified
494
+ */
495
+ readonly workflowRunsOnGroup?: GroupRunnerOptions;
496
+ /**
497
+ * Github Runner selection labels.
498
+ * @default ["ubuntu-latest"]
499
+ * @stability experimental
500
+ * @description Defines a target Runner by labels
501
+ * @throws {Error} if both `runsOn` and `runsOnGroup` are specified
502
+ */
503
+ readonly workflowRunsOn?: Array<string>;
504
+ /**
505
+ * Container image to use for GitHub workflows.
506
+ * @default - default image
507
+ * @stability experimental
508
+ */
509
+ readonly workflowContainerImage?: string;
510
+ /**
511
+ * Custom configuration used when creating changelog with commit-and-tag-version package.
512
+ * Given values either append to default configuration or overwrite values in it.
513
+ * @default - standard configuration applicable for GitHub repositories
514
+ * @stability experimental
515
+ */
516
+ readonly versionrcOptions?: Record<string, any>;
517
+ /**
518
+ * A set of workflow steps to execute in order to setup the workflow container.
519
+ * @stability experimental
520
+ */
521
+ readonly releaseWorkflowSetupSteps?: Array<github.workflows.JobStep>;
522
+ /**
523
+ * The name of the default release workflow.
524
+ * @default "release"
525
+ * @stability experimental
526
+ */
527
+ readonly releaseWorkflowName?: string;
528
+ /**
529
+ * Build environment variables for release workflows.
530
+ * @default {}
531
+ * @stability experimental
532
+ */
533
+ readonly releaseWorkflowEnv?: Record<string, string>;
534
+ /**
535
+ * The release trigger to use.
536
+ * @default - Continuous releases (`ReleaseTrigger.continuous()`)
537
+ * @stability experimental
538
+ */
539
+ readonly releaseTrigger?: release.ReleaseTrigger;
540
+ /**
541
+ * Automatically add the given prefix to release tags. Useful if you are releasing on multiple branches with overlapping version numbers.
542
+ * Note: this prefix is used to detect the latest tagged version
543
+ * when bumping, so if you change this on a project with an existing version
544
+ * history, you may need to manually tag your latest release
545
+ * with the new prefix.
546
+ * @default "v"
547
+ * @stability experimental
548
+ */
549
+ readonly releaseTagPrefix?: string;
550
+ /**
551
+ * The label to apply to issues indicating publish failures.
552
+ * Only applies if `releaseFailureIssue` is true.
553
+ * @default "failed-release"
554
+ * @stability experimental
555
+ */
556
+ readonly releaseFailureIssueLabel?: string;
557
+ /**
558
+ * Create a github issue on every failed publishing task.
559
+ * @default false
560
+ * @stability experimental
561
+ */
562
+ readonly releaseFailureIssue?: boolean;
563
+ /**
564
+ * The GitHub Actions environment used for the release.
565
+ * This can be used to add an explicit approval step to the release
566
+ * or limit who can initiate a release through environment protection rules.
567
+ *
568
+ * When multiple artifacts are released, the environment can be overwritten
569
+ * on a per artifact basis.
570
+ * @default - no environment used, unless set at the artifact level
571
+ * @stability experimental
572
+ */
573
+ readonly releaseEnvironment?: string;
574
+ /**
575
+ * Defines additional release branches.
576
+ * A workflow will be created for each
577
+ * release branch which will publish releases from commits in this branch.
578
+ * Each release branch _must_ be assigned a major version number which is used
579
+ * to enforce that versions published from that branch always use that major
580
+ * version. If multiple branches are used, the `majorVersion` field must also
581
+ * be provided for the default branch.
582
+ * @default - no additional branches are used for release. you can use
583
+ `addBranch()` to add additional branches.
584
+ * @stability experimental
585
+ */
586
+ readonly releaseBranches?: Record<string, release.BranchOptions>;
587
+ /**
588
+ * Find commits that should be considered releasable Used to decide if a release is required.
589
+ * @default ReleasableCommits.everyCommit()
590
+ * @stability experimental
591
+ */
592
+ readonly releasableCommits?: ReleasableCommits;
593
+ /**
594
+ * Define publishing tasks that can be executed manually as well as workflows.
595
+ * Normally, publishing only happens within automated workflows. Enable this
596
+ * in order to create a publishing task for each publishing activity.
597
+ * @default false
598
+ * @stability experimental
599
+ */
600
+ readonly publishTasks?: boolean;
601
+ /**
602
+ * Instead of actually publishing to package managers, just print the publishing command.
603
+ * @default false
604
+ * @stability experimental
605
+ */
606
+ readonly publishDryRun?: boolean;
607
+ /**
608
+ * Bump versions from the default branch as pre-releases (e.g. "beta", "alpha", "pre").
609
+ * @default - normal semantic versions
610
+ * @stability experimental
611
+ */
612
+ readonly prerelease?: string;
613
+ /**
614
+ * Steps to execute after build as part of the release workflow.
615
+ * @default []
616
+ * @stability experimental
617
+ */
618
+ readonly postBuildSteps?: Array<github.workflows.JobStep>;
619
+ /**
620
+ * The npmDistTag to use when publishing from the default branch.
621
+ * To set the npm dist-tag for release branches, set the `npmDistTag` property
622
+ * for each branch.
623
+ * @default "latest"
624
+ * @stability experimental
625
+ */
626
+ readonly npmDistTag?: string;
627
+ /**
628
+ * A shell command to control the next version to release.
629
+ * If present, this shell command will be run before the bump is executed, and
630
+ * it determines what version to release. It will be executed in the following
631
+ * environment:
632
+ *
633
+ * - Working directory: the project directory.
634
+ * - `$VERSION`: the current version. Looks like `1.2.3`.
635
+ * - `$LATEST_TAG`: the most recent tag. Looks like `prefix-v1.2.3`, or may be unset.
636
+ * - `$SUGGESTED_BUMP`: the suggested bump action based on commits. One of `major|minor|patch|none`.
637
+ *
638
+ * The command should print one of the following to `stdout`:
639
+ *
640
+ * - Nothing: the next version number will be determined based on commit history.
641
+ * - `x.y.z`: the next version number will be `x.y.z`.
642
+ * - `major|minor|patch`: the next version number will be the current version number
643
+ * with the indicated component bumped.
644
+ *
645
+ * This setting cannot be specified together with `minMajorVersion`; the invoked
646
+ * script can be used to achieve the effects of `minMajorVersion`.
647
+ * @default - The next version will be determined based on the commit history and project settings.
648
+ * @stability experimental
649
+ */
650
+ readonly nextVersionCommand?: string;
651
+ /**
652
+ * Minimal Major version to release.
653
+ * This can be useful to set to 1, as breaking changes before the 1.x major
654
+ * release are not incrementing the major version number.
655
+ *
656
+ * Can not be set together with `majorVersion`.
657
+ * @default - No minimum version is being enforced
658
+ * @stability experimental
659
+ */
660
+ readonly minMajorVersion?: number;
661
+ /**
662
+ * Major version to release from the default branch.
663
+ * If this is specified, we bump the latest version of this major version line.
664
+ * If not specified, we bump the global latest version.
665
+ * @default - Major version is not enforced.
666
+ * @stability experimental
667
+ */
668
+ readonly majorVersion?: number;
669
+ /**
670
+ * Version requirement of `publib` which is used to publish modules to npm.
671
+ * @default "latest"
672
+ * @stability experimental
673
+ */
674
+ readonly jsiiReleaseVersion?: string;
675
+ /**
676
+ * The `commit-and-tag-version` compatible package used to bump the package version, as a dependency string.
677
+ * This can be any compatible package version, including the deprecated `standard-version@9`.
678
+ * @default - A recent version of "commit-and-tag-version"
679
+ * @stability experimental
680
+ */
681
+ readonly bumpPackage?: string;
682
+ /**
683
+ * Options for Yarn Berry.
684
+ * @default - Yarn Berry v4 with all default options
685
+ * @stability experimental
686
+ */
687
+ readonly yarnBerryOptions?: javascript.YarnBerryOptions;
688
+ /**
689
+ * Package's Stability.
690
+ * @stability experimental
691
+ */
692
+ readonly stability?: string;
693
+ /**
694
+ * Options for privately hosted scoped packages.
695
+ * @default - fetch all scoped packages from the public npm registry
696
+ * @stability experimental
697
+ */
698
+ readonly scopedPackagesOptions?: Array<javascript.ScopedPackagesOptions>;
699
+ /**
700
+ * If the package.json for your package is not in the root directory (for example if it is part of a monorepo), you can specify the directory in which it lives.
701
+ * @stability experimental
702
+ */
703
+ readonly repositoryDirectory?: string;
704
+ /**
705
+ * The repository is the location where the actual code for your package lives.
706
+ * See https://classic.yarnpkg.com/en/docs/package-json/#toc-repository
707
+ * @stability experimental
708
+ */
709
+ readonly repository?: string;
710
+ /**
711
+ * The version of PNPM to use if using PNPM as a package manager.
712
+ * @default "9"
713
+ * @stability experimental
714
+ */
715
+ readonly pnpmVersion?: string;
716
+ /**
717
+ * Peer dependencies for this module.
718
+ * Dependencies listed here are required to
719
+ * be installed (and satisfied) by the _consumer_ of this library. Using peer
720
+ * dependencies allows you to ensure that only a single module of a certain
721
+ * library exists in the `node_modules` tree of your consumers.
722
+ *
723
+ * Note that prior to npm@7, peer dependencies are _not_ automatically
724
+ * installed, which means that adding peer dependencies to a library will be a
725
+ * breaking change for your customers.
726
+ *
727
+ * Unless `peerDependencyOptions.pinnedDevDependency` is disabled (it is
728
+ * enabled by default), projen will automatically add a dev dependency with a
729
+ * pinned version for each peer dependency. This will ensure that you build &
730
+ * test your module against the lowest peer version required.
731
+ * @default []
732
+ * @stability experimental
733
+ */
734
+ readonly peerDeps?: Array<string>;
735
+ /**
736
+ * Options for `peerDeps`.
737
+ * @stability experimental
738
+ */
739
+ readonly peerDependencyOptions?: javascript.PeerDependencyOptions;
740
+ /**
741
+ * The "name" in package.json.
742
+ * @default - defaults to project name
743
+ * @stability experimental
744
+ * @featured true
745
+ */
746
+ readonly packageName?: string;
747
+ /**
748
+ * The Node Package Manager used to execute scripts.
749
+ * @default NodePackageManager.YARN_CLASSIC
750
+ * @stability experimental
751
+ */
752
+ readonly packageManager?: javascript.NodePackageManager;
753
+ /**
754
+ * Use trusted publishing for publishing to npmjs.com Needs to be pre-configured on npm.js to work.
755
+ * @default - false
756
+ * @stability experimental
757
+ */
758
+ readonly npmTrustedPublishing?: boolean;
759
+ /**
760
+ * GitHub secret which contains the NPM token to use when publishing packages.
761
+ * @default "NPM_TOKEN"
762
+ * @stability experimental
763
+ */
764
+ readonly npmTokenSecret?: string;
765
+ /**
766
+ * The base URL of the npm package registry.
767
+ * Must be a URL (e.g. start with "https://" or "http://")
768
+ * @default "https://registry.npmjs.org"
769
+ * @stability experimental
770
+ */
771
+ readonly npmRegistryUrl?: string;
772
+ /**
773
+ * Should provenance statements be generated when the package is published.
774
+ * A supported package manager is required to publish a package with npm provenance statements and
775
+ * you will need to use a supported CI/CD provider.
776
+ *
777
+ * Note that the projen `Release` and `Publisher` components are using `publib` to publish packages,
778
+ * which is using npm internally and supports provenance statements independently of the package manager used.
779
+ * @default - true for public packages, false otherwise
780
+ * @stability experimental
781
+ */
782
+ readonly npmProvenance?: boolean;
783
+ /**
784
+ * Access level of the npm package.
785
+ * @default - for scoped packages (e.g. `foo@bar`), the default is
786
+ `NpmAccess.RESTRICTED`, for non-scoped packages, the default is
787
+ `NpmAccess.PUBLIC`.
788
+ * @stability experimental
789
+ */
790
+ readonly npmAccess?: javascript.NpmAccess;
791
+ /**
792
+ * The minimum node version required by this package to function. Most projects should not use this option.
793
+ * The value indicates that the package is incompatible with any older versions of node.
794
+ * This requirement is enforced via the engines field.
795
+ *
796
+ * You will normally not need to set this option, even if your package is incompatible with EOL versions of node.
797
+ * Consider this option only if your package depends on a specific feature, that is not available in other LTS versions.
798
+ * Setting this option has very high impact on the consumers of your package,
799
+ * as package managers will actively prevent usage with node versions you have marked as incompatible.
800
+ *
801
+ * To change the node version of your CI/CD workflows, use `workflowNodeVersion`.
802
+ * @default - no minimum version is enforced
803
+ * @stability experimental
804
+ */
805
+ readonly minNodeVersion?: string;
806
+ /**
807
+ * The maximum node version supported by this package. Most projects should not use this option.
808
+ * The value indicates that the package is incompatible with any newer versions of node.
809
+ * This requirement is enforced via the engines field.
810
+ *
811
+ * You will normally not need to set this option.
812
+ * Consider this option only if your package is known to not function with newer versions of node.
813
+ * @default - no maximum version is enforced
814
+ * @stability experimental
815
+ */
816
+ readonly maxNodeVersion?: string;
817
+ /**
818
+ * Indicates if a license should be added.
819
+ * @default true
820
+ * @stability experimental
821
+ */
822
+ readonly licensed?: boolean;
823
+ /**
824
+ * License's SPDX identifier.
825
+ * See https://github.com/projen/projen/tree/main/license-text for a list of supported licenses.
826
+ * Use the `licensed` option if you want to no license to be specified.
827
+ * @default "Apache-2.0"
828
+ * @stability experimental
829
+ */
830
+ readonly license?: string;
831
+ /**
832
+ * Keywords to include in `package.json`.
833
+ * @stability experimental
834
+ */
835
+ readonly keywords?: Array<string>;
836
+ /**
837
+ * Package's Homepage / Website.
838
+ * @stability experimental
839
+ */
840
+ readonly homepage?: string;
841
+ /**
842
+ * Module entrypoint (`main` in `package.json`).
843
+ * Set to an empty string to not include `main` in your package.json
844
+ * @default "lib/index.js"
845
+ * @stability experimental
846
+ */
847
+ readonly entrypoint?: string;
848
+ /**
849
+ * Build dependencies for this module.
850
+ * These dependencies will only be
851
+ * available in your build environment but will not be fetched when this
852
+ * module is consumed.
853
+ *
854
+ * The recommendation is to only specify the module name here (e.g.
855
+ * `express`). This will behave similar to `yarn add` or `npm install` in the
856
+ * sense that it will add the module as a dependency to your `package.json`
857
+ * file with the latest version (`^`). You can specify semver requirements in
858
+ * the same syntax passed to `npm i` or `yarn add` (e.g. `express@^2`) and
859
+ * this will be what you `package.json` will eventually include.
860
+ * @default []
861
+ * @stability experimental
862
+ * @featured true
863
+ */
864
+ readonly devDeps?: Array<string>;
865
+ /**
866
+ * The description is just a string that helps people understand the purpose of the package.
867
+ * It can be used when searching for packages in a package manager as well.
868
+ * See https://classic.yarnpkg.com/en/docs/package-json/#toc-description
869
+ * @stability experimental
870
+ * @featured true
871
+ */
872
+ readonly description?: string;
873
+ /**
874
+ * Runtime dependencies of this module.
875
+ * The recommendation is to only specify the module name here (e.g.
876
+ * `express`). This will behave similar to `yarn add` or `npm install` in the
877
+ * sense that it will add the module as a dependency to your `package.json`
878
+ * file with the latest version (`^`). You can specify semver requirements in
879
+ * the same syntax passed to `npm i` or `yarn add` (e.g. `express@^2`) and
880
+ * this will be what you `package.json` will eventually include.
881
+ * @default []
882
+ * @stability experimental
883
+ * @featured true
884
+ */
885
+ readonly deps?: Array<string>;
886
+ /**
887
+ * Options for npm packages using AWS CodeArtifact.
888
+ * This is required if publishing packages to, or installing scoped packages from AWS CodeArtifact
889
+ * @default - undefined
890
+ * @stability experimental
891
+ */
892
+ readonly codeArtifactOptions?: javascript.CodeArtifactOptions;
893
+ /**
894
+ * The version of Bun to use if using Bun as a package manager.
895
+ * @default "latest"
896
+ * @stability experimental
897
+ */
898
+ readonly bunVersion?: string;
899
+ /**
900
+ * List of dependencies to bundle into this module.
901
+ * These modules will be
902
+ * added both to the `dependencies` section and `bundledDependencies` section of
903
+ * your `package.json`.
904
+ *
905
+ * The recommendation is to only specify the module name here (e.g.
906
+ * `express`). This will behave similar to `yarn add` or `npm install` in the
907
+ * sense that it will add the module as a dependency to your `package.json`
908
+ * file with the latest version (`^`). You can specify semver requirements in
909
+ * the same syntax passed to `npm i` or `yarn add` (e.g. `express@^2`) and
910
+ * this will be what you `package.json` will eventually include.
911
+ * @stability experimental
912
+ */
913
+ readonly bundledDeps?: Array<string>;
914
+ /**
915
+ * The url to your project's issue tracker.
916
+ * @stability experimental
917
+ */
918
+ readonly bugsUrl?: string;
919
+ /**
920
+ * The email address to which issues should be reported.
921
+ * @stability experimental
922
+ */
923
+ readonly bugsEmail?: string;
924
+ /**
925
+ * Binary programs vended with your module.
926
+ * You can use this option to add/customize how binaries are represented in
927
+ * your `package.json`, but unless `autoDetectBin` is `false`, every
928
+ * executable file under `bin` will automatically be added to this section.
929
+ * @stability experimental
930
+ */
931
+ readonly bin?: Record<string, string>;
932
+ /**
933
+ * Automatically add all executables under the `bin` directory to your `package.json` file under the `bin` section.
934
+ * @default true
935
+ * @stability experimental
936
+ */
937
+ readonly autoDetectBin?: boolean;
938
+ /**
939
+ * Author's URL / Website.
940
+ * @stability experimental
941
+ */
942
+ readonly authorUrl?: string;
943
+ /**
944
+ * Is the author an organization.
945
+ * @stability experimental
946
+ */
947
+ readonly authorOrganization?: boolean;
948
+ /**
949
+ * Author's name.
950
+ * @stability experimental
951
+ */
952
+ readonly authorName?: string;
953
+ /**
954
+ * Author's e-mail.
955
+ * @stability experimental
956
+ */
957
+ readonly authorEmail?: string;
958
+ /**
959
+ * Allow the project to include `peerDependencies` and `bundledDependencies`.
960
+ * This is normally only allowed for libraries. For apps, there's no meaning
961
+ * for specifying these.
962
+ * @default true
963
+ * @stability experimental
964
+ */
965
+ readonly allowLibraryDependencies?: boolean;
966
+ /**
967
+ * Enable VSCode integration.
968
+ * Enabled by default for root projects. Disabled for non-root projects.
969
+ * @default true
970
+ * @stability experimental
971
+ */
972
+ readonly vscode?: boolean;
973
+ /**
974
+ * Auto-close stale issues and pull requests.
975
+ * To disable set `stale` to `false`.
976
+ * @default - see defaults in `StaleOptions`
977
+ * @stability experimental
978
+ */
979
+ readonly staleOptions?: github.StaleOptions;
980
+ /**
981
+ * Auto-close of stale issues and pull request.
982
+ * See `staleOptions` for options.
983
+ * @default false
984
+ * @stability experimental
985
+ */
986
+ readonly stale?: boolean;
987
+ /**
988
+ * The README setup.
989
+ * @default - { filename: 'README.md', contents: '# replace this' }
990
+ * @stability experimental
991
+ */
992
+ readonly readme?: SampleReadmeProps;
993
+ /**
994
+ * Choose a method of providing GitHub API access for projen workflows.
995
+ * @default - use a personal access token named PROJEN_GITHUB_TOKEN
996
+ * @stability experimental
997
+ */
998
+ readonly projenCredentials?: github.GithubCredentials;
999
+ /**
1000
+ * Add a Gitpod development environment.
1001
+ * @default false
1002
+ * @stability experimental
1003
+ */
1004
+ readonly gitpod?: boolean;
1005
+ /**
1006
+ * Options for GitHub integration.
1007
+ * @default - see GitHubOptions
1008
+ * @stability experimental
1009
+ */
1010
+ readonly githubOptions?: github.GitHubOptions;
1011
+ /**
1012
+ * Enable GitHub integration.
1013
+ * Enabled by default for root projects. Disabled for non-root projects.
1014
+ * @default true
1015
+ * @stability experimental
1016
+ */
1017
+ readonly github?: boolean;
1018
+ /**
1019
+ * Add a VSCode development environment (used for GitHub Codespaces).
1020
+ * @default false
1021
+ * @stability experimental
1022
+ */
1023
+ readonly devContainer?: boolean;
1024
+ /**
1025
+ * Add a `clobber` task which resets the repo to origin.
1026
+ * @default - true, but false for subprojects
1027
+ * @stability experimental
1028
+ */
1029
+ readonly clobber?: boolean;
1030
+ /**
1031
+ * Configure options for automatic merging on GitHub.
1032
+ * Has no effect if
1033
+ * `github.mergify` or `autoMerge` is set to false.
1034
+ * @default - see defaults in `AutoMergeOptions`
1035
+ * @stability experimental
1036
+ */
1037
+ readonly autoMergeOptions?: github.AutoMergeOptions;
1038
+ /**
1039
+ * Enable automatic merging on GitHub.
1040
+ * Has no effect if `github.mergify`
1041
+ * is set to false.
1042
+ * @default true
1043
+ * @stability experimental
1044
+ */
1045
+ readonly autoMerge?: boolean;
1046
+ /**
1047
+ * Enable and configure the 'auto approve' workflow.
1048
+ * @default - auto approve is disabled
1049
+ * @stability experimental
1050
+ */
1051
+ readonly autoApproveOptions?: github.AutoApproveOptions;
1052
+ /**
1053
+ * Options for renovatebot.
1054
+ * @default - default options
1055
+ * @stability experimental
1056
+ */
1057
+ readonly renovatebotOptions?: RenovatebotOptions;
1058
+ /**
1059
+ * Use renovatebot to handle dependency upgrades.
1060
+ * @default false
1061
+ * @stability experimental
1062
+ */
1063
+ readonly renovatebot?: boolean;
1064
+ /**
1065
+ * Options for .projenrc.json.
1066
+ * @default - default options
1067
+ * @stability experimental
1068
+ */
1069
+ readonly projenrcJsonOptions?: ProjenrcJsonOptions;
1070
+ /**
1071
+ * Generate (once) .projenrc.json (in JSON). Set to `false` in order to disable .projenrc.json generation.
1072
+ * @default false
1073
+ * @stability experimental
1074
+ */
1075
+ readonly projenrcJson?: boolean;
1076
+ /**
1077
+ * The shell command to use in order to run the projen CLI.
1078
+ * Can be used to customize in special environments.
1079
+ * @default "npx projen"
1080
+ * @stability experimental
1081
+ */
1082
+ readonly projenCommand?: string;
1083
+ /**
1084
+ * The parent project, if this project is part of a bigger project.
1085
+ * @stability experimental
1086
+ */
1087
+ readonly parent?: Project;
1088
+ /**
1089
+ * The root directory of the project.
1090
+ * Relative to this directory, all files are synthesized.
1091
+ *
1092
+ * If this project has a parent, this directory is relative to the parent
1093
+ * directory and it cannot be the same as the parent or any of it's other
1094
+ * subprojects.
1095
+ * @default "."
1096
+ * @stability experimental
1097
+ */
1098
+ readonly outdir?: string;
1099
+ /**
1100
+ * Configure logging options such as verbosity.
1101
+ * @default {}
1102
+ * @stability experimental
1103
+ */
1104
+ readonly logging?: LoggerOptions;
1105
+ /**
1106
+ * Configuration options for git.
1107
+ * @stability experimental
1108
+ */
1109
+ readonly gitOptions?: GitOptions;
1110
+ /**
1111
+ * Configuration options for .gitignore file.
1112
+ * @stability experimental
1113
+ */
1114
+ readonly gitIgnoreOptions?: IgnoreFileOptions;
1115
+ /**
1116
+ * Whether to commit the managed files by default.
1117
+ * @default true
1118
+ * @stability experimental
1119
+ */
1120
+ readonly commitGenerated?: boolean;
1121
+ /**
1122
+ * This is the name of your project.
1123
+ * @default $BASEDIR
1124
+ * @stability experimental
1125
+ * @featured true
1126
+ */
1127
+ readonly name: string;
1128
+ /**
1129
+ * The Vitest configuration (when enabled).
1130
+ * @default - default Vitest configuration
1131
+ */
1132
+ readonly vitestOptions?: VitestOptions;
1133
+ /**
1134
+ * Enable testing with Vitest.
1135
+ * @default true
1136
+ */
1137
+ readonly vitest?: boolean;
1138
+ /**
1139
+ * Create mise.toml with project Node.js version
1140
+ * @default true
1141
+ */
1142
+ readonly mise?: boolean;
1143
+ }