@macedon-technologies/batman 1.30.0 → 1.31.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.jsii +147 -7
- package/API.md +639 -0
- package/README.md +28 -0
- package/build-tools/scan-generated-workflows.ts +2 -0
- package/lib/Application.d.ts +9 -0
- package/lib/Application.js +7 -1
- package/lib/BatmanProject.d.ts +9 -0
- package/lib/BatmanProject.js +4 -3
- package/lib/BootcampApplication.d.ts +9 -0
- package/lib/BootcampApplication.js +7 -1
- package/lib/BootcampProject.js +4 -3
- package/lib/CodeOwnersFile.js +1 -1
- package/lib/PrAutoMergeWorkflow.d.ts +19 -0
- package/lib/PrAutoMergeWorkflow.js +84 -0
- package/lib/ProductionDeployWorkflow.js +1 -1
- package/lib/SoftwareFactoryFiles.js +1 -1
- package/lib/StagingDeployWorkflow.js +3 -2
- package/lib/WorkflowActionVersions.d.ts +7 -0
- package/lib/WorkflowActionVersions.js +2 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.js +2 -1
- package/lib/utils.d.ts +1 -1
- package/lib/utils.js +6 -3
- package/package.json +1 -1
package/API.md
CHANGED
|
@@ -3281,6 +3281,563 @@ Indicates if the file should be read-only or read-write.
|
|
|
3281
3281
|
---
|
|
3282
3282
|
|
|
3283
3283
|
|
|
3284
|
+
### PrAutoMergeWorkflow <a name="PrAutoMergeWorkflow" id="@macedon-technologies/batman.PrAutoMergeWorkflow"></a>
|
|
3285
|
+
|
|
3286
|
+
Generates `.github/workflows/pr-auto-merge.yml`, which arms GitHub's native squash auto-merge on every ready pull request into the default branch using a GitHub App installation token. It runs on `pull_request_target` in the `auto-merge` environment, which holds the `AUTO_MERGE_APP_CLIENT_ID` variable and the `AUTO_MERGE_APP_PRIVATE_KEY` secret, so workflows from pull request branches can't read the key. The job never checks out pull request code.
|
|
3287
|
+
|
|
3288
|
+
#### Initializers <a name="Initializers" id="@macedon-technologies/batman.PrAutoMergeWorkflow.Initializer"></a>
|
|
3289
|
+
|
|
3290
|
+
```typescript
|
|
3291
|
+
import { PrAutoMergeWorkflow } from '@macedon-technologies/batman'
|
|
3292
|
+
|
|
3293
|
+
new PrAutoMergeWorkflow(project: Project, options?: PrAutoMergeWorkflowOptions)
|
|
3294
|
+
```
|
|
3295
|
+
|
|
3296
|
+
| **Name** | **Type** | **Description** |
|
|
3297
|
+
| --- | --- | --- |
|
|
3298
|
+
| <code><a href="#@macedon-technologies/batman.PrAutoMergeWorkflow.Initializer.parameter.project">project</a></code> | <code>projen.Project</code> | *No description.* |
|
|
3299
|
+
| <code><a href="#@macedon-technologies/batman.PrAutoMergeWorkflow.Initializer.parameter.options">options</a></code> | <code><a href="#@macedon-technologies/batman.PrAutoMergeWorkflowOptions">PrAutoMergeWorkflowOptions</a></code> | *No description.* |
|
|
3300
|
+
|
|
3301
|
+
---
|
|
3302
|
+
|
|
3303
|
+
##### `project`<sup>Required</sup> <a name="project" id="@macedon-technologies/batman.PrAutoMergeWorkflow.Initializer.parameter.project"></a>
|
|
3304
|
+
|
|
3305
|
+
- *Type:* projen.Project
|
|
3306
|
+
|
|
3307
|
+
---
|
|
3308
|
+
|
|
3309
|
+
##### `options`<sup>Optional</sup> <a name="options" id="@macedon-technologies/batman.PrAutoMergeWorkflow.Initializer.parameter.options"></a>
|
|
3310
|
+
|
|
3311
|
+
- *Type:* <a href="#@macedon-technologies/batman.PrAutoMergeWorkflowOptions">PrAutoMergeWorkflowOptions</a>
|
|
3312
|
+
|
|
3313
|
+
---
|
|
3314
|
+
|
|
3315
|
+
#### Methods <a name="Methods" id="Methods"></a>
|
|
3316
|
+
|
|
3317
|
+
| **Name** | **Description** |
|
|
3318
|
+
| --- | --- |
|
|
3319
|
+
| <code><a href="#@macedon-technologies/batman.PrAutoMergeWorkflow.toString">toString</a></code> | Returns a string representation of this construct. |
|
|
3320
|
+
| <code><a href="#@macedon-technologies/batman.PrAutoMergeWorkflow.with">with</a></code> | Applies one or more mixins to this construct. |
|
|
3321
|
+
| <code><a href="#@macedon-technologies/batman.PrAutoMergeWorkflow.postProjectCreation">postProjectCreation</a></code> | Called once, right after `postSynthesize()`, only when the project is created for the first time. |
|
|
3322
|
+
| <code><a href="#@macedon-technologies/batman.PrAutoMergeWorkflow.postSynthesize">postSynthesize</a></code> | Called after synthesis. |
|
|
3323
|
+
| <code><a href="#@macedon-technologies/batman.PrAutoMergeWorkflow.preSynthesize">preSynthesize</a></code> | Called before synthesis. |
|
|
3324
|
+
| <code><a href="#@macedon-technologies/batman.PrAutoMergeWorkflow.projectCreation">projectCreation</a></code> | Called once, right after `synthesize()`, only when the project is created for the first time. |
|
|
3325
|
+
| <code><a href="#@macedon-technologies/batman.PrAutoMergeWorkflow.synthesize">synthesize</a></code> | Writes the file to the project's output directory. |
|
|
3326
|
+
| <code><a href="#@macedon-technologies/batman.PrAutoMergeWorkflow.diff">diff</a></code> | Returns a unified diff of the old and new file contents with context lines and hunk headers. |
|
|
3327
|
+
| <code><a href="#@macedon-technologies/batman.PrAutoMergeWorkflow.addDeletionOverride">addDeletionOverride</a></code> | Syntactic sugar for `addOverride(path, undefined)`. |
|
|
3328
|
+
| <code><a href="#@macedon-technologies/batman.PrAutoMergeWorkflow.addOverride">addOverride</a></code> | Adds an override to the synthesized object file. |
|
|
3329
|
+
| <code><a href="#@macedon-technologies/batman.PrAutoMergeWorkflow.addToArray">addToArray</a></code> | Adds to an array in the synthesized object file. |
|
|
3330
|
+
| <code><a href="#@macedon-technologies/batman.PrAutoMergeWorkflow.patch">patch</a></code> | Applies an RFC 6902 JSON-patch to the synthesized object file. See https://datatracker.ietf.org/doc/html/rfc6902 for more information. |
|
|
3331
|
+
|
|
3332
|
+
---
|
|
3333
|
+
|
|
3334
|
+
##### `toString` <a name="toString" id="@macedon-technologies/batman.PrAutoMergeWorkflow.toString"></a>
|
|
3335
|
+
|
|
3336
|
+
```typescript
|
|
3337
|
+
public toString(): string
|
|
3338
|
+
```
|
|
3339
|
+
|
|
3340
|
+
Returns a string representation of this construct.
|
|
3341
|
+
|
|
3342
|
+
##### `with` <a name="with" id="@macedon-technologies/batman.PrAutoMergeWorkflow.with"></a>
|
|
3343
|
+
|
|
3344
|
+
```typescript
|
|
3345
|
+
public with(mixins: ...IMixin[]): IConstruct
|
|
3346
|
+
```
|
|
3347
|
+
|
|
3348
|
+
Applies one or more mixins to this construct.
|
|
3349
|
+
|
|
3350
|
+
Mixins are applied in order. The list of constructs is captured at the
|
|
3351
|
+
start of the call, so constructs added by a mixin will not be visited.
|
|
3352
|
+
Use multiple `with()` calls if subsequent mixins should apply to added
|
|
3353
|
+
constructs.
|
|
3354
|
+
|
|
3355
|
+
###### `mixins`<sup>Required</sup> <a name="mixins" id="@macedon-technologies/batman.PrAutoMergeWorkflow.with.parameter.mixins"></a>
|
|
3356
|
+
|
|
3357
|
+
- *Type:* ...constructs.IMixin[]
|
|
3358
|
+
|
|
3359
|
+
The mixins to apply.
|
|
3360
|
+
|
|
3361
|
+
---
|
|
3362
|
+
|
|
3363
|
+
##### `postProjectCreation` <a name="postProjectCreation" id="@macedon-technologies/batman.PrAutoMergeWorkflow.postProjectCreation"></a>
|
|
3364
|
+
|
|
3365
|
+
```typescript
|
|
3366
|
+
public postProjectCreation(initProject: InitProject): void
|
|
3367
|
+
```
|
|
3368
|
+
|
|
3369
|
+
Called once, right after `postSynthesize()`, only when the project is created for the first time.
|
|
3370
|
+
|
|
3371
|
+
It does not run on later `projen` invocations. It only fires for `projen new` (or `Projects.createProject`).
|
|
3372
|
+
It is also skipped when post-synthesis steps are disabled, e.g. `--no-post` or `PROJEN_DISABLE_POST`.
|
|
3373
|
+
Use it for one-off setup that can be turned off by the user, like running a task to give the user immediate
|
|
3374
|
+
feedback on their new project. Order across components is not guaranteed.
|
|
3375
|
+
|
|
3376
|
+
###### `initProject`<sup>Required</sup> <a name="initProject" id="@macedon-technologies/batman.PrAutoMergeWorkflow.postProjectCreation.parameter.initProject"></a>
|
|
3377
|
+
|
|
3378
|
+
- *Type:* projen.InitProject
|
|
3379
|
+
|
|
3380
|
+
Details about how the project was created, e.g. its type and the original CLI args.
|
|
3381
|
+
|
|
3382
|
+
---
|
|
3383
|
+
|
|
3384
|
+
##### `postSynthesize` <a name="postSynthesize" id="@macedon-technologies/batman.PrAutoMergeWorkflow.postSynthesize"></a>
|
|
3385
|
+
|
|
3386
|
+
```typescript
|
|
3387
|
+
public postSynthesize(): void
|
|
3388
|
+
```
|
|
3389
|
+
|
|
3390
|
+
Called after synthesis.
|
|
3391
|
+
|
|
3392
|
+
Order is *not* guaranteed.
|
|
3393
|
+
|
|
3394
|
+
##### `preSynthesize` <a name="preSynthesize" id="@macedon-technologies/batman.PrAutoMergeWorkflow.preSynthesize"></a>
|
|
3395
|
+
|
|
3396
|
+
```typescript
|
|
3397
|
+
public preSynthesize(): void
|
|
3398
|
+
```
|
|
3399
|
+
|
|
3400
|
+
Called before synthesis.
|
|
3401
|
+
|
|
3402
|
+
##### `projectCreation` <a name="projectCreation" id="@macedon-technologies/batman.PrAutoMergeWorkflow.projectCreation"></a>
|
|
3403
|
+
|
|
3404
|
+
```typescript
|
|
3405
|
+
public projectCreation(initProject: InitProject): void
|
|
3406
|
+
```
|
|
3407
|
+
|
|
3408
|
+
Called once, right after `synthesize()`, only when the project is created for the first time.
|
|
3409
|
+
|
|
3410
|
+
It does not run on later `projen` invocations. It only fires for `projen new` (or `Projects.createProject`).
|
|
3411
|
+
Use it for deterministic, one-off file generation. Order across components is not guaranteed.
|
|
3412
|
+
|
|
3413
|
+
###### `initProject`<sup>Required</sup> <a name="initProject" id="@macedon-technologies/batman.PrAutoMergeWorkflow.projectCreation.parameter.initProject"></a>
|
|
3414
|
+
|
|
3415
|
+
- *Type:* projen.InitProject
|
|
3416
|
+
|
|
3417
|
+
Details about how the project was created, e.g. its type and the original CLI args.
|
|
3418
|
+
|
|
3419
|
+
---
|
|
3420
|
+
|
|
3421
|
+
##### `synthesize` <a name="synthesize" id="@macedon-technologies/batman.PrAutoMergeWorkflow.synthesize"></a>
|
|
3422
|
+
|
|
3423
|
+
```typescript
|
|
3424
|
+
public synthesize(): void
|
|
3425
|
+
```
|
|
3426
|
+
|
|
3427
|
+
Writes the file to the project's output directory.
|
|
3428
|
+
|
|
3429
|
+
##### `diff` <a name="diff" id="@macedon-technologies/batman.PrAutoMergeWorkflow.diff"></a>
|
|
3430
|
+
|
|
3431
|
+
```typescript
|
|
3432
|
+
public diff(colorize?: boolean, contextLines?: number): string[]
|
|
3433
|
+
```
|
|
3434
|
+
|
|
3435
|
+
Returns a unified diff of the old and new file contents with context lines and hunk headers.
|
|
3436
|
+
|
|
3437
|
+
Only available after synthesis.
|
|
3438
|
+
|
|
3439
|
+
This is an expensive operation and should only be used on non time-critical
|
|
3440
|
+
code paths, like debug output.
|
|
3441
|
+
|
|
3442
|
+
###### `colorize`<sup>Optional</sup> <a name="colorize" id="@macedon-technologies/batman.PrAutoMergeWorkflow.diff.parameter.colorize"></a>
|
|
3443
|
+
|
|
3444
|
+
- *Type:* boolean
|
|
3445
|
+
|
|
3446
|
+
Whether to colorize the diff output.
|
|
3447
|
+
|
|
3448
|
+
---
|
|
3449
|
+
|
|
3450
|
+
###### `contextLines`<sup>Optional</sup> <a name="contextLines" id="@macedon-technologies/batman.PrAutoMergeWorkflow.diff.parameter.contextLines"></a>
|
|
3451
|
+
|
|
3452
|
+
- *Type:* number
|
|
3453
|
+
|
|
3454
|
+
Number of context lines around changes.
|
|
3455
|
+
|
|
3456
|
+
---
|
|
3457
|
+
|
|
3458
|
+
##### `addDeletionOverride` <a name="addDeletionOverride" id="@macedon-technologies/batman.PrAutoMergeWorkflow.addDeletionOverride"></a>
|
|
3459
|
+
|
|
3460
|
+
```typescript
|
|
3461
|
+
public addDeletionOverride(path: string): void
|
|
3462
|
+
```
|
|
3463
|
+
|
|
3464
|
+
Syntactic sugar for `addOverride(path, undefined)`.
|
|
3465
|
+
|
|
3466
|
+
###### `path`<sup>Required</sup> <a name="path" id="@macedon-technologies/batman.PrAutoMergeWorkflow.addDeletionOverride.parameter.path"></a>
|
|
3467
|
+
|
|
3468
|
+
- *Type:* string
|
|
3469
|
+
|
|
3470
|
+
The path of the value to delete.
|
|
3471
|
+
|
|
3472
|
+
---
|
|
3473
|
+
|
|
3474
|
+
##### `addOverride` <a name="addOverride" id="@macedon-technologies/batman.PrAutoMergeWorkflow.addOverride"></a>
|
|
3475
|
+
|
|
3476
|
+
```typescript
|
|
3477
|
+
public addOverride(path: string, value: any): void
|
|
3478
|
+
```
|
|
3479
|
+
|
|
3480
|
+
Adds an override to the synthesized object file.
|
|
3481
|
+
|
|
3482
|
+
If the override is nested, separate each nested level using a dot (.) in the path parameter.
|
|
3483
|
+
If there is an array as part of the nesting, specify the index in the path.
|
|
3484
|
+
|
|
3485
|
+
To include a literal `.` in the property name, prefix with a `\`. In most
|
|
3486
|
+
programming languages you will need to write this as `"\\."` because the
|
|
3487
|
+
`\` itself will need to be escaped.
|
|
3488
|
+
|
|
3489
|
+
For example,
|
|
3490
|
+
```typescript
|
|
3491
|
+
project.tsconfig.file.addOverride('compilerOptions.alwaysStrict', true);
|
|
3492
|
+
project.tsconfig.file.addOverride('compilerOptions.lib', ['dom', 'dom.iterable', 'esnext']);
|
|
3493
|
+
```
|
|
3494
|
+
would add the overrides
|
|
3495
|
+
```json
|
|
3496
|
+
"compilerOptions": {
|
|
3497
|
+
"alwaysStrict": true,
|
|
3498
|
+
"lib": [
|
|
3499
|
+
"dom",
|
|
3500
|
+
"dom.iterable",
|
|
3501
|
+
"esnext"
|
|
3502
|
+
]
|
|
3503
|
+
...
|
|
3504
|
+
}
|
|
3505
|
+
...
|
|
3506
|
+
```
|
|
3507
|
+
|
|
3508
|
+
###### `path`<sup>Required</sup> <a name="path" id="@macedon-technologies/batman.PrAutoMergeWorkflow.addOverride.parameter.path"></a>
|
|
3509
|
+
|
|
3510
|
+
- *Type:* string
|
|
3511
|
+
|
|
3512
|
+
The path of the property, you can use dot notation to override values in complex types.
|
|
3513
|
+
|
|
3514
|
+
Any intermediate keys
|
|
3515
|
+
will be created as needed.
|
|
3516
|
+
|
|
3517
|
+
---
|
|
3518
|
+
|
|
3519
|
+
###### `value`<sup>Required</sup> <a name="value" id="@macedon-technologies/batman.PrAutoMergeWorkflow.addOverride.parameter.value"></a>
|
|
3520
|
+
|
|
3521
|
+
- *Type:* any
|
|
3522
|
+
|
|
3523
|
+
The value.
|
|
3524
|
+
|
|
3525
|
+
Could be primitive or complex.
|
|
3526
|
+
|
|
3527
|
+
---
|
|
3528
|
+
|
|
3529
|
+
##### `addToArray` <a name="addToArray" id="@macedon-technologies/batman.PrAutoMergeWorkflow.addToArray"></a>
|
|
3530
|
+
|
|
3531
|
+
```typescript
|
|
3532
|
+
public addToArray(path: string, values: ...any[]): void
|
|
3533
|
+
```
|
|
3534
|
+
|
|
3535
|
+
Adds to an array in the synthesized object file.
|
|
3536
|
+
|
|
3537
|
+
If the array is nested, separate each nested level using a dot (.) in the path parameter.
|
|
3538
|
+
If there is an array as part of the nesting, specify the index in the path.
|
|
3539
|
+
|
|
3540
|
+
To include a literal `.` in the property name, prefix with a `\`. In most
|
|
3541
|
+
programming languages you will need to write this as `"\\."` because the
|
|
3542
|
+
`\` itself will need to be escaped.
|
|
3543
|
+
|
|
3544
|
+
For example, with the following object file
|
|
3545
|
+
```json
|
|
3546
|
+
"compilerOptions": {
|
|
3547
|
+
"exclude": ["node_modules"],
|
|
3548
|
+
"lib": ["es2020"]
|
|
3549
|
+
...
|
|
3550
|
+
}
|
|
3551
|
+
...
|
|
3552
|
+
```
|
|
3553
|
+
|
|
3554
|
+
```typescript
|
|
3555
|
+
project.tsconfig.file.addToArray('compilerOptions.exclude', 'coverage');
|
|
3556
|
+
project.tsconfig.file.addToArray('compilerOptions.lib', 'dom', 'dom.iterable', 'esnext');
|
|
3557
|
+
```
|
|
3558
|
+
would result in the following object file
|
|
3559
|
+
```json
|
|
3560
|
+
"compilerOptions": {
|
|
3561
|
+
"exclude": ["node_modules", "coverage"],
|
|
3562
|
+
"lib": ["es2020", "dom", "dom.iterable", "esnext"]
|
|
3563
|
+
...
|
|
3564
|
+
}
|
|
3565
|
+
...
|
|
3566
|
+
```
|
|
3567
|
+
|
|
3568
|
+
###### `path`<sup>Required</sup> <a name="path" id="@macedon-technologies/batman.PrAutoMergeWorkflow.addToArray.parameter.path"></a>
|
|
3569
|
+
|
|
3570
|
+
- *Type:* string
|
|
3571
|
+
|
|
3572
|
+
The path of the property, you can use dot notation to att to arrays in complex types.
|
|
3573
|
+
|
|
3574
|
+
Any intermediate keys
|
|
3575
|
+
will be created as needed.
|
|
3576
|
+
|
|
3577
|
+
---
|
|
3578
|
+
|
|
3579
|
+
###### `values`<sup>Required</sup> <a name="values" id="@macedon-technologies/batman.PrAutoMergeWorkflow.addToArray.parameter.values"></a>
|
|
3580
|
+
|
|
3581
|
+
- *Type:* ...any[]
|
|
3582
|
+
|
|
3583
|
+
The values to add.
|
|
3584
|
+
|
|
3585
|
+
Could be primitive or complex.
|
|
3586
|
+
|
|
3587
|
+
---
|
|
3588
|
+
|
|
3589
|
+
##### `patch` <a name="patch" id="@macedon-technologies/batman.PrAutoMergeWorkflow.patch"></a>
|
|
3590
|
+
|
|
3591
|
+
```typescript
|
|
3592
|
+
public patch(patches: ...JsonPatch[]): void
|
|
3593
|
+
```
|
|
3594
|
+
|
|
3595
|
+
Applies an RFC 6902 JSON-patch to the synthesized object file. See https://datatracker.ietf.org/doc/html/rfc6902 for more information.
|
|
3596
|
+
|
|
3597
|
+
For example, with the following object file
|
|
3598
|
+
```json
|
|
3599
|
+
"compilerOptions": {
|
|
3600
|
+
"exclude": ["node_modules"],
|
|
3601
|
+
"lib": ["es2020"]
|
|
3602
|
+
...
|
|
3603
|
+
}
|
|
3604
|
+
...
|
|
3605
|
+
```
|
|
3606
|
+
|
|
3607
|
+
```typescript
|
|
3608
|
+
project.tsconfig.file.patch(JsonPatch.add("/compilerOptions/exclude/-", "coverage"));
|
|
3609
|
+
project.tsconfig.file.patch(JsonPatch.replace("/compilerOptions/lib", ["dom", "dom.iterable", "esnext"]));
|
|
3610
|
+
```
|
|
3611
|
+
would result in the following object file
|
|
3612
|
+
```json
|
|
3613
|
+
"compilerOptions": {
|
|
3614
|
+
"exclude": ["node_modules", "coverage"],
|
|
3615
|
+
"lib": ["dom", "dom.iterable", "esnext"]
|
|
3616
|
+
...
|
|
3617
|
+
}
|
|
3618
|
+
...
|
|
3619
|
+
```
|
|
3620
|
+
|
|
3621
|
+
###### `patches`<sup>Required</sup> <a name="patches" id="@macedon-technologies/batman.PrAutoMergeWorkflow.patch.parameter.patches"></a>
|
|
3622
|
+
|
|
3623
|
+
- *Type:* ...projen.JsonPatch[]
|
|
3624
|
+
|
|
3625
|
+
The patch operations to apply.
|
|
3626
|
+
|
|
3627
|
+
---
|
|
3628
|
+
|
|
3629
|
+
#### Static Functions <a name="Static Functions" id="Static Functions"></a>
|
|
3630
|
+
|
|
3631
|
+
| **Name** | **Description** |
|
|
3632
|
+
| --- | --- |
|
|
3633
|
+
| <code><a href="#@macedon-technologies/batman.PrAutoMergeWorkflow.isConstruct">isConstruct</a></code> | Checks if `x` is a construct. |
|
|
3634
|
+
| <code><a href="#@macedon-technologies/batman.PrAutoMergeWorkflow.isComponent">isComponent</a></code> | Test whether the given construct is a component. |
|
|
3635
|
+
|
|
3636
|
+
---
|
|
3637
|
+
|
|
3638
|
+
##### `isConstruct` <a name="isConstruct" id="@macedon-technologies/batman.PrAutoMergeWorkflow.isConstruct"></a>
|
|
3639
|
+
|
|
3640
|
+
```typescript
|
|
3641
|
+
import { PrAutoMergeWorkflow } from '@macedon-technologies/batman'
|
|
3642
|
+
|
|
3643
|
+
PrAutoMergeWorkflow.isConstruct(x: any)
|
|
3644
|
+
```
|
|
3645
|
+
|
|
3646
|
+
Checks if `x` is a construct.
|
|
3647
|
+
|
|
3648
|
+
Use this method instead of `instanceof` to properly detect `Construct`
|
|
3649
|
+
instances, even when the construct library is symlinked.
|
|
3650
|
+
|
|
3651
|
+
Explanation: in JavaScript, multiple copies of the `constructs` library on
|
|
3652
|
+
disk are seen as independent, completely different libraries. As a
|
|
3653
|
+
consequence, the class `Construct` in each copy of the `constructs` library
|
|
3654
|
+
is seen as a different class, and an instance of one class will not test as
|
|
3655
|
+
`instanceof` the other class. `npm install` will not create installations
|
|
3656
|
+
like this, but users may manually symlink construct libraries together or
|
|
3657
|
+
use a monorepo tool: in those cases, multiple copies of the `constructs`
|
|
3658
|
+
library can be accidentally installed, and `instanceof` will behave
|
|
3659
|
+
unpredictably. It is safest to avoid using `instanceof`, and using
|
|
3660
|
+
this type-testing method instead.
|
|
3661
|
+
|
|
3662
|
+
###### `x`<sup>Required</sup> <a name="x" id="@macedon-technologies/batman.PrAutoMergeWorkflow.isConstruct.parameter.x"></a>
|
|
3663
|
+
|
|
3664
|
+
- *Type:* any
|
|
3665
|
+
|
|
3666
|
+
Any object.
|
|
3667
|
+
|
|
3668
|
+
---
|
|
3669
|
+
|
|
3670
|
+
##### `isComponent` <a name="isComponent" id="@macedon-technologies/batman.PrAutoMergeWorkflow.isComponent"></a>
|
|
3671
|
+
|
|
3672
|
+
```typescript
|
|
3673
|
+
import { PrAutoMergeWorkflow } from '@macedon-technologies/batman'
|
|
3674
|
+
|
|
3675
|
+
PrAutoMergeWorkflow.isComponent(x: any)
|
|
3676
|
+
```
|
|
3677
|
+
|
|
3678
|
+
Test whether the given construct is a component.
|
|
3679
|
+
|
|
3680
|
+
###### `x`<sup>Required</sup> <a name="x" id="@macedon-technologies/batman.PrAutoMergeWorkflow.isComponent.parameter.x"></a>
|
|
3681
|
+
|
|
3682
|
+
- *Type:* any
|
|
3683
|
+
|
|
3684
|
+
---
|
|
3685
|
+
|
|
3686
|
+
#### Properties <a name="Properties" id="Properties"></a>
|
|
3687
|
+
|
|
3688
|
+
| **Name** | **Type** | **Description** |
|
|
3689
|
+
| --- | --- | --- |
|
|
3690
|
+
| <code><a href="#@macedon-technologies/batman.PrAutoMergeWorkflow.property.node">node</a></code> | <code>constructs.Node</code> | The tree node. |
|
|
3691
|
+
| <code><a href="#@macedon-technologies/batman.PrAutoMergeWorkflow.property.project">project</a></code> | <code>projen.Project</code> | *No description.* |
|
|
3692
|
+
| <code><a href="#@macedon-technologies/batman.PrAutoMergeWorkflow.property.absolutePath">absolutePath</a></code> | <code>string</code> | The absolute path of this file. |
|
|
3693
|
+
| <code><a href="#@macedon-technologies/batman.PrAutoMergeWorkflow.property.committed">committed</a></code> | <code>boolean</code> | Indicates if the file will be committed. |
|
|
3694
|
+
| <code><a href="#@macedon-technologies/batman.PrAutoMergeWorkflow.property.path">path</a></code> | <code>string</code> | The file path, relative to the project's outdir. |
|
|
3695
|
+
| <code><a href="#@macedon-technologies/batman.PrAutoMergeWorkflow.property.changed">changed</a></code> | <code>boolean</code> | Indicates if the file has been changed during synthesis. |
|
|
3696
|
+
| <code><a href="#@macedon-technologies/batman.PrAutoMergeWorkflow.property.marker">marker</a></code> | <code>string</code> | The projen marker, used to identify files as projen-generated. |
|
|
3697
|
+
| <code><a href="#@macedon-technologies/batman.PrAutoMergeWorkflow.property.executable">executable</a></code> | <code>boolean</code> | Indicates if the file should be marked as executable. |
|
|
3698
|
+
| <code><a href="#@macedon-technologies/batman.PrAutoMergeWorkflow.property.readonly">readonly</a></code> | <code>boolean</code> | Indicates if the file should be read-only or read-write. |
|
|
3699
|
+
| <code><a href="#@macedon-technologies/batman.PrAutoMergeWorkflow.property.omitEmpty">omitEmpty</a></code> | <code>boolean</code> | Indicates if empty objects and arrays are omitted from the output object. |
|
|
3700
|
+
| <code><a href="#@macedon-technologies/batman.PrAutoMergeWorkflow.property.lineWidth">lineWidth</a></code> | <code>number</code> | Maximum line width (set to 0 to disable folding). |
|
|
3701
|
+
|
|
3702
|
+
---
|
|
3703
|
+
|
|
3704
|
+
##### `node`<sup>Required</sup> <a name="node" id="@macedon-technologies/batman.PrAutoMergeWorkflow.property.node"></a>
|
|
3705
|
+
|
|
3706
|
+
```typescript
|
|
3707
|
+
public readonly node: Node;
|
|
3708
|
+
```
|
|
3709
|
+
|
|
3710
|
+
- *Type:* constructs.Node
|
|
3711
|
+
|
|
3712
|
+
The tree node.
|
|
3713
|
+
|
|
3714
|
+
---
|
|
3715
|
+
|
|
3716
|
+
##### `project`<sup>Required</sup> <a name="project" id="@macedon-technologies/batman.PrAutoMergeWorkflow.property.project"></a>
|
|
3717
|
+
|
|
3718
|
+
```typescript
|
|
3719
|
+
public readonly project: Project;
|
|
3720
|
+
```
|
|
3721
|
+
|
|
3722
|
+
- *Type:* projen.Project
|
|
3723
|
+
|
|
3724
|
+
---
|
|
3725
|
+
|
|
3726
|
+
##### `absolutePath`<sup>Required</sup> <a name="absolutePath" id="@macedon-technologies/batman.PrAutoMergeWorkflow.property.absolutePath"></a>
|
|
3727
|
+
|
|
3728
|
+
```typescript
|
|
3729
|
+
public readonly absolutePath: string;
|
|
3730
|
+
```
|
|
3731
|
+
|
|
3732
|
+
- *Type:* string
|
|
3733
|
+
|
|
3734
|
+
The absolute path of this file.
|
|
3735
|
+
|
|
3736
|
+
---
|
|
3737
|
+
|
|
3738
|
+
##### `committed`<sup>Required</sup> <a name="committed" id="@macedon-technologies/batman.PrAutoMergeWorkflow.property.committed"></a>
|
|
3739
|
+
|
|
3740
|
+
```typescript
|
|
3741
|
+
public readonly committed: boolean;
|
|
3742
|
+
```
|
|
3743
|
+
|
|
3744
|
+
- *Type:* boolean
|
|
3745
|
+
|
|
3746
|
+
Indicates if the file will be committed.
|
|
3747
|
+
|
|
3748
|
+
---
|
|
3749
|
+
|
|
3750
|
+
##### `path`<sup>Required</sup> <a name="path" id="@macedon-technologies/batman.PrAutoMergeWorkflow.property.path"></a>
|
|
3751
|
+
|
|
3752
|
+
```typescript
|
|
3753
|
+
public readonly path: string;
|
|
3754
|
+
```
|
|
3755
|
+
|
|
3756
|
+
- *Type:* string
|
|
3757
|
+
|
|
3758
|
+
The file path, relative to the project's outdir.
|
|
3759
|
+
|
|
3760
|
+
---
|
|
3761
|
+
|
|
3762
|
+
##### `changed`<sup>Optional</sup> <a name="changed" id="@macedon-technologies/batman.PrAutoMergeWorkflow.property.changed"></a>
|
|
3763
|
+
|
|
3764
|
+
```typescript
|
|
3765
|
+
public readonly changed: boolean;
|
|
3766
|
+
```
|
|
3767
|
+
|
|
3768
|
+
- *Type:* boolean
|
|
3769
|
+
|
|
3770
|
+
Indicates if the file has been changed during synthesis.
|
|
3771
|
+
|
|
3772
|
+
This property is
|
|
3773
|
+
only available in `postSynthesize()` hooks. If this is `undefined`, the
|
|
3774
|
+
file has not been synthesized yet.
|
|
3775
|
+
|
|
3776
|
+
---
|
|
3777
|
+
|
|
3778
|
+
##### `marker`<sup>Optional</sup> <a name="marker" id="@macedon-technologies/batman.PrAutoMergeWorkflow.property.marker"></a>
|
|
3779
|
+
|
|
3780
|
+
```typescript
|
|
3781
|
+
public readonly marker: string;
|
|
3782
|
+
```
|
|
3783
|
+
|
|
3784
|
+
- *Type:* string
|
|
3785
|
+
|
|
3786
|
+
The projen marker, used to identify files as projen-generated.
|
|
3787
|
+
|
|
3788
|
+
Value is undefined if the project is being ejected.
|
|
3789
|
+
|
|
3790
|
+
---
|
|
3791
|
+
|
|
3792
|
+
##### `executable`<sup>Required</sup> <a name="executable" id="@macedon-technologies/batman.PrAutoMergeWorkflow.property.executable"></a>
|
|
3793
|
+
|
|
3794
|
+
```typescript
|
|
3795
|
+
public readonly executable: boolean;
|
|
3796
|
+
```
|
|
3797
|
+
|
|
3798
|
+
- *Type:* boolean
|
|
3799
|
+
|
|
3800
|
+
Indicates if the file should be marked as executable.
|
|
3801
|
+
|
|
3802
|
+
---
|
|
3803
|
+
|
|
3804
|
+
##### `readonly`<sup>Required</sup> <a name="readonly" id="@macedon-technologies/batman.PrAutoMergeWorkflow.property.readonly"></a>
|
|
3805
|
+
|
|
3806
|
+
```typescript
|
|
3807
|
+
public readonly readonly: boolean;
|
|
3808
|
+
```
|
|
3809
|
+
|
|
3810
|
+
- *Type:* boolean
|
|
3811
|
+
|
|
3812
|
+
Indicates if the file should be read-only or read-write.
|
|
3813
|
+
|
|
3814
|
+
---
|
|
3815
|
+
|
|
3816
|
+
##### `omitEmpty`<sup>Required</sup> <a name="omitEmpty" id="@macedon-technologies/batman.PrAutoMergeWorkflow.property.omitEmpty"></a>
|
|
3817
|
+
|
|
3818
|
+
```typescript
|
|
3819
|
+
public readonly omitEmpty: boolean;
|
|
3820
|
+
```
|
|
3821
|
+
|
|
3822
|
+
- *Type:* boolean
|
|
3823
|
+
|
|
3824
|
+
Indicates if empty objects and arrays are omitted from the output object.
|
|
3825
|
+
|
|
3826
|
+
---
|
|
3827
|
+
|
|
3828
|
+
##### `lineWidth`<sup>Required</sup> <a name="lineWidth" id="@macedon-technologies/batman.PrAutoMergeWorkflow.property.lineWidth"></a>
|
|
3829
|
+
|
|
3830
|
+
```typescript
|
|
3831
|
+
public readonly lineWidth: number;
|
|
3832
|
+
```
|
|
3833
|
+
|
|
3834
|
+
- *Type:* number
|
|
3835
|
+
|
|
3836
|
+
Maximum line width (set to 0 to disable folding).
|
|
3837
|
+
|
|
3838
|
+
---
|
|
3839
|
+
|
|
3840
|
+
|
|
3284
3841
|
### ProductionDeployWorkflow <a name="ProductionDeployWorkflow" id="@macedon-technologies/batman.ProductionDeployWorkflow"></a>
|
|
3285
3842
|
|
|
3286
3843
|
#### Initializers <a name="Initializers" id="@macedon-technologies/batman.ProductionDeployWorkflow.Initializer"></a>
|
|
@@ -4703,6 +5260,7 @@ const batmanProjectOptions: BatmanProjectOptions = { ... }
|
|
|
4703
5260
|
| <code><a href="#@macedon-technologies/batman.BatmanProjectOptions.property.attestationFiles">attestationFiles</a></code> | <code>string[]</code> | Extra files that the PR attestation manifest also hashes, such as the project's own verification checks. |
|
|
4704
5261
|
| <code><a href="#@macedon-technologies/batman.BatmanProjectOptions.property.authorizerObjectVersion">authorizerObjectVersion</a></code> | <code>string</code> | Overrides the pinned S3 object version of the clerk-authorizer Lambda deployment package. |
|
|
4705
5262
|
| <code><a href="#@macedon-technologies/batman.BatmanProjectOptions.property.e2eTesting">e2eTesting</a></code> | <code>boolean</code> | Whether the generated `web` app and its `PrDeployWorkflow` CI step include Playwright e2e testing support. |
|
|
5263
|
+
| <code><a href="#@macedon-technologies/batman.BatmanProjectOptions.property.prAutoMerge">prAutoMerge</a></code> | <code>boolean</code> | Generates the pr-auto-merge workflow, which arms squash auto-merge on ready pull requests into the default branch with a GitHub App token. |
|
|
4706
5264
|
| <code><a href="#@macedon-technologies/batman.BatmanProjectOptions.property.websiteDeps">websiteDeps</a></code> | <code>string[]</code> | Website dependencies. |
|
|
4707
5265
|
|
|
4708
5266
|
---
|
|
@@ -7324,6 +7882,24 @@ Whether the generated `web` app and its `PrDeployWorkflow` CI step include Playw
|
|
|
7324
7882
|
|
|
7325
7883
|
---
|
|
7326
7884
|
|
|
7885
|
+
##### `prAutoMerge`<sup>Optional</sup> <a name="prAutoMerge" id="@macedon-technologies/batman.BatmanProjectOptions.property.prAutoMerge"></a>
|
|
7886
|
+
|
|
7887
|
+
```typescript
|
|
7888
|
+
public readonly prAutoMerge: boolean;
|
|
7889
|
+
```
|
|
7890
|
+
|
|
7891
|
+
- *Type:* boolean
|
|
7892
|
+
- *Default:* false
|
|
7893
|
+
|
|
7894
|
+
Generates the pr-auto-merge workflow, which arms squash auto-merge on ready pull requests into the default branch with a GitHub App token.
|
|
7895
|
+
|
|
7896
|
+
Requires the
|
|
7897
|
+
`AUTO_MERGE_APP_CLIENT_ID` variable and the
|
|
7898
|
+
`AUTO_MERGE_APP_PRIVATE_KEY` secret in an `auto-merge` environment; see the README section
|
|
7899
|
+
"Auto-merging pull requests with a GitHub App".
|
|
7900
|
+
|
|
7901
|
+
---
|
|
7902
|
+
|
|
7327
7903
|
##### `websiteDeps`<sup>Optional</sup> <a name="websiteDeps" id="@macedon-technologies/batman.BatmanProjectOptions.property.websiteDeps"></a>
|
|
7328
7904
|
|
|
7329
7905
|
```typescript
|
|
@@ -7530,6 +8106,7 @@ const bootcampProjectOptions: BootcampProjectOptions = { ... }
|
|
|
7530
8106
|
| <code><a href="#@macedon-technologies/batman.BootcampProjectOptions.property.attestationFiles">attestationFiles</a></code> | <code>string[]</code> | Extra files that the PR attestation manifest also hashes, such as the project's own verification checks. |
|
|
7531
8107
|
| <code><a href="#@macedon-technologies/batman.BootcampProjectOptions.property.authorizerObjectVersion">authorizerObjectVersion</a></code> | <code>string</code> | Overrides the pinned S3 object version of the clerk-authorizer Lambda deployment package. |
|
|
7532
8108
|
| <code><a href="#@macedon-technologies/batman.BootcampProjectOptions.property.e2eTesting">e2eTesting</a></code> | <code>boolean</code> | Whether the generated `web` app and its `PrDeployWorkflow` CI step include Playwright e2e testing support. |
|
|
8109
|
+
| <code><a href="#@macedon-technologies/batman.BootcampProjectOptions.property.prAutoMerge">prAutoMerge</a></code> | <code>boolean</code> | Generates the pr-auto-merge workflow, which arms squash auto-merge on ready pull requests into the default branch with a GitHub App token. |
|
|
7533
8110
|
| <code><a href="#@macedon-technologies/batman.BootcampProjectOptions.property.websiteDeps">websiteDeps</a></code> | <code>string[]</code> | Website dependencies. |
|
|
7534
8111
|
|
|
7535
8112
|
---
|
|
@@ -10151,6 +10728,24 @@ Whether the generated `web` app and its `PrDeployWorkflow` CI step include Playw
|
|
|
10151
10728
|
|
|
10152
10729
|
---
|
|
10153
10730
|
|
|
10731
|
+
##### `prAutoMerge`<sup>Optional</sup> <a name="prAutoMerge" id="@macedon-technologies/batman.BootcampProjectOptions.property.prAutoMerge"></a>
|
|
10732
|
+
|
|
10733
|
+
```typescript
|
|
10734
|
+
public readonly prAutoMerge: boolean;
|
|
10735
|
+
```
|
|
10736
|
+
|
|
10737
|
+
- *Type:* boolean
|
|
10738
|
+
- *Default:* false
|
|
10739
|
+
|
|
10740
|
+
Generates the pr-auto-merge workflow, which arms squash auto-merge on ready pull requests into the default branch with a GitHub App token.
|
|
10741
|
+
|
|
10742
|
+
Requires the
|
|
10743
|
+
`AUTO_MERGE_APP_CLIENT_ID` variable and the
|
|
10744
|
+
`AUTO_MERGE_APP_PRIVATE_KEY` secret in an `auto-merge` environment; see the README section
|
|
10745
|
+
"Auto-merging pull requests with a GitHub App".
|
|
10746
|
+
|
|
10747
|
+
---
|
|
10748
|
+
|
|
10154
10749
|
##### `websiteDeps`<sup>Optional</sup> <a name="websiteDeps" id="@macedon-technologies/batman.BootcampProjectOptions.property.websiteDeps"></a>
|
|
10155
10750
|
|
|
10156
10751
|
```typescript
|
|
@@ -10296,6 +10891,36 @@ public readonly additionalStackProps: {[ key: string ]: any};
|
|
|
10296
10891
|
|
|
10297
10892
|
---
|
|
10298
10893
|
|
|
10894
|
+
### PrAutoMergeWorkflowOptions <a name="PrAutoMergeWorkflowOptions" id="@macedon-technologies/batman.PrAutoMergeWorkflowOptions"></a>
|
|
10895
|
+
|
|
10896
|
+
#### Initializer <a name="Initializer" id="@macedon-technologies/batman.PrAutoMergeWorkflowOptions.Initializer"></a>
|
|
10897
|
+
|
|
10898
|
+
```typescript
|
|
10899
|
+
import { PrAutoMergeWorkflowOptions } from '@macedon-technologies/batman'
|
|
10900
|
+
|
|
10901
|
+
const prAutoMergeWorkflowOptions: PrAutoMergeWorkflowOptions = { ... }
|
|
10902
|
+
```
|
|
10903
|
+
|
|
10904
|
+
#### Properties <a name="Properties" id="Properties"></a>
|
|
10905
|
+
|
|
10906
|
+
| **Name** | **Type** | **Description** |
|
|
10907
|
+
| --- | --- | --- |
|
|
10908
|
+
| <code><a href="#@macedon-technologies/batman.PrAutoMergeWorkflowOptions.property.actionVersions">actionVersions</a></code> | <code><a href="#@macedon-technologies/batman.WorkflowActionVersions">WorkflowActionVersions</a></code> | Overrides for the pinned action versions used by this workflow. |
|
|
10909
|
+
|
|
10910
|
+
---
|
|
10911
|
+
|
|
10912
|
+
##### `actionVersions`<sup>Optional</sup> <a name="actionVersions" id="@macedon-technologies/batman.PrAutoMergeWorkflowOptions.property.actionVersions"></a>
|
|
10913
|
+
|
|
10914
|
+
```typescript
|
|
10915
|
+
public readonly actionVersions: WorkflowActionVersions;
|
|
10916
|
+
```
|
|
10917
|
+
|
|
10918
|
+
- *Type:* <a href="#@macedon-technologies/batman.WorkflowActionVersions">WorkflowActionVersions</a>
|
|
10919
|
+
|
|
10920
|
+
Overrides for the pinned action versions used by this workflow.
|
|
10921
|
+
|
|
10922
|
+
---
|
|
10923
|
+
|
|
10299
10924
|
### ProductionDeployWorkflowOptions <a name="ProductionDeployWorkflowOptions" id="@macedon-technologies/batman.ProductionDeployWorkflowOptions"></a>
|
|
10300
10925
|
|
|
10301
10926
|
#### Initializer <a name="Initializer" id="@macedon-technologies/batman.ProductionDeployWorkflowOptions.Initializer"></a>
|
|
@@ -10558,6 +11183,7 @@ const workflowActionVersions: WorkflowActionVersions = { ... }
|
|
|
10558
11183
|
| --- | --- | --- |
|
|
10559
11184
|
| <code><a href="#@macedon-technologies/batman.WorkflowActionVersions.property.checkout">checkout</a></code> | <code>string</code> | The `actions/checkout` action reference. |
|
|
10560
11185
|
| <code><a href="#@macedon-technologies/batman.WorkflowActionVersions.property.configureAwsCredentials">configureAwsCredentials</a></code> | <code>string</code> | The `aws-actions/configure-aws-credentials` action reference. |
|
|
11186
|
+
| <code><a href="#@macedon-technologies/batman.WorkflowActionVersions.property.createGithubAppToken">createGithubAppToken</a></code> | <code>string</code> | The `actions/create-github-app-token` action reference, used by the opt-in pr-auto-merge workflow to mint a GitHub App installation token. |
|
|
10561
11187
|
| <code><a href="#@macedon-technologies/batman.WorkflowActionVersions.property.createPullRequest">createPullRequest</a></code> | <code>string</code> | The `peter-evans/create-pull-request` action reference, used by projen's built-in dependency-upgrade workflow to open the upgrade PR. |
|
|
10562
11188
|
| <code><a href="#@macedon-technologies/batman.WorkflowActionVersions.property.downloadArtifact">downloadArtifact</a></code> | <code>string</code> | The `actions/download-artifact` action reference, used by projen's built-in dependency-upgrade workflow to pass the upgrade patch between jobs. |
|
|
10563
11189
|
| <code><a href="#@macedon-technologies/batman.WorkflowActionVersions.property.githubScript">githubScript</a></code> | <code>string</code> | The `actions/github-script` action reference. |
|
|
@@ -10594,6 +11220,19 @@ The `aws-actions/configure-aws-credentials` action reference.
|
|
|
10594
11220
|
|
|
10595
11221
|
---
|
|
10596
11222
|
|
|
11223
|
+
##### `createGithubAppToken`<sup>Optional</sup> <a name="createGithubAppToken" id="@macedon-technologies/batman.WorkflowActionVersions.property.createGithubAppToken"></a>
|
|
11224
|
+
|
|
11225
|
+
```typescript
|
|
11226
|
+
public readonly createGithubAppToken: string;
|
|
11227
|
+
```
|
|
11228
|
+
|
|
11229
|
+
- *Type:* string
|
|
11230
|
+
- *Default:* 'actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1' // v3.2.0
|
|
11231
|
+
|
|
11232
|
+
The `actions/create-github-app-token` action reference, used by the opt-in pr-auto-merge workflow to mint a GitHub App installation token.
|
|
11233
|
+
|
|
11234
|
+
---
|
|
11235
|
+
|
|
10597
11236
|
##### `createPullRequest`<sup>Optional</sup> <a name="createPullRequest" id="@macedon-technologies/batman.WorkflowActionVersions.property.createPullRequest"></a>
|
|
10598
11237
|
|
|
10599
11238
|
```typescript
|