@macedon-technologies/batman 1.29.0 → 1.30.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 CHANGED
@@ -97,7 +97,7 @@
97
97
  },
98
98
  "name": "@macedon-technologies/batman",
99
99
  "readme": {
100
- "markdown": "# Platform Common Projen\n\nA baseline architecture template for new projects using Projen. This project provides a standardized foundation that includes both frontend and backend components with authentication.\n\n## Project Intention\n\nThis template serves as a starting point for new projects, providing:\n- Consistent project structure and configuration\n- Pre-configured development tooling\n- Integrated authentication system\n- Full-stack application foundation\n\n## Components Created\n\nThe BatmanProject generates:\n\n### Frontend\n- **React Application** - Modern React app with TypeScript\n- **Clerk Authentication** - Integrated user authentication and management\n- **Playwright e2e Testing** - `@playwright/test` + `@clerk/testing` devDeps, a `test:e2e` task, and a scaffolded `playwright.config.ts` + `e2e/` starter suite (see the generated `web/e2e/README.md`); disable with `e2eTesting: false`. The generated `pr-deploy.yml` workflow also runs this suite against each PR's deployed URL unless `e2eTesting: false` is set.\n\n### Backend/Infrastructure\n- **AWS Infrastructure** - CDK-based cloud resources\n- **API Gateway** - RESTful API endpoints\n- **Lambda Functions** - Serverless compute\n- **Database** - Persistent data storage\n\n## Usage Examples\n\n### Basic Project Creation\n\nCreate a `.projenrc.ts` file in your project root:\n\n```typescript\nimport { BatmanProject } from '@macedon-technologies/batman';\n\nconst project = new BatmanProject({\n name: 'my-new-app',\n defaultReleaseBranch: 'main',\n});\n\nproject.synth();\n```\n\nThen run:\n```bash\nnpx projen\n```\n\n### With Custom Configuration\n\nCreate a `.projenrc.ts` file with additional options:\n\n```typescript\nimport { BatmanProject } from '@macedon-technologies/batman';\n\nconst project = new BatmanProject({\n name: 'my-enterprise-app',\n defaultReleaseBranch: 'main',\n description: 'Enterprise application with authentication',\n authorName: 'Your Name',\n authorEmail: 'your.email@company.com',\n});\n\nproject.synth();\n```\n\nThen run:\n```bash\nnpx projen\n```\n\n### Development Workflow\n\n```bash\n# Install dependencies\nyarn install\n\n# Start development server\nyarn dev\n\n# Deploy infrastructure\nyarn deploy\n\n# Run tests\nyarn test\n```\n\n## SoftwareFactoryFiles (standalone, non-Batman projects)\n\n`SoftwareFactoryFiles` is independently exported and can be attached to any\n`projen` `NodeProject` — it does not require `BatmanProject` or\n`BootcampProject`. It generates the `@swamp/software-factory` state machine,\nthe architecture rule registry, the pre-PR attestation gate, the OpenSpec\ntask-completion gate, and the swamp workflows that wire them together.\n\n```typescript\nimport { javascript } from 'projen';\nimport { SoftwareFactoryFiles } from '@macedon-technologies/batman';\n\nconst project = new javascript.NodeProject({\n name: 'my-other-project',\n defaultReleaseBranch: 'main',\n});\n\nnew SoftwareFactoryFiles(project, {\n repoName: 'my-other-project',\n githubOwner: 'my-github-org', // defaults to 'macedon-technologies' if omitted\n baseBranch: 'main', // defaults to 'main'\n});\n\nproject.synth();\n```\n\nAfter running `npx projen`, follow the printed `swamp:bootstrap` task to pull\nthe required swamp extensions and create the project's secrets vault."
100
+ "markdown": "# Platform Common Projen\n\nA baseline architecture template for new projects using Projen. This project provides a standardized foundation that includes both frontend and backend components with authentication.\n\n## Project Intention\n\nThis template serves as a starting point for new projects, providing:\n- Consistent project structure and configuration\n- Pre-configured development tooling\n- Integrated authentication system\n- Full-stack application foundation\n\n## Components Created\n\nThe BatmanProject generates:\n\n### Frontend\n- **React Application** - Modern React app with TypeScript\n- **Clerk Authentication** - Integrated user authentication and management\n- **Playwright e2e Testing** - `@playwright/test` + `@clerk/testing` devDeps, a `test:e2e` task, and a scaffolded `playwright.config.ts` + `e2e/` starter suite (see the generated `web/e2e/README.md`); disable with `e2eTesting: false`. The generated `pr-deploy.yml` workflow also runs this suite against each PR's deployed URL unless `e2eTesting: false` is set.\n\n### Backend/Infrastructure\n- **AWS Infrastructure** - CDK-based cloud resources\n- **API Gateway** - RESTful API endpoints\n- **Lambda Functions** - Serverless compute\n- **Database** - Persistent data storage\n\n## Usage Examples\n\n### Basic Project Creation\n\nCreate a `.projenrc.ts` file in your project root:\n\n```typescript\nimport { BatmanProject } from '@macedon-technologies/batman';\n\nconst project = new BatmanProject({\n name: 'my-new-app',\n defaultReleaseBranch: 'main',\n});\n\nproject.synth();\n```\n\nThen run:\n```bash\nnpx projen\n```\n\n### With Custom Configuration\n\nCreate a `.projenrc.ts` file with additional options:\n\n```typescript\nimport { BatmanProject } from '@macedon-technologies/batman';\n\nconst project = new BatmanProject({\n name: 'my-enterprise-app',\n defaultReleaseBranch: 'main',\n description: 'Enterprise application with authentication',\n authorName: 'Your Name',\n authorEmail: 'your.email@company.com',\n});\n\nproject.synth();\n```\n\nThen run:\n```bash\nnpx projen\n```\n\n### Development Workflow\n\n```bash\n# Install dependencies\nyarn install\n\n# Start development server\nyarn dev\n\n# Deploy infrastructure\nyarn deploy\n\n# Run tests\nyarn test\n```\n\n## Upgrading\n\n### The base stack no longer creates a VPC\n\n`BaseApplicationStack` used to create a VPC with a NAT gateway and attach the API Lambda to it.\nIt now creates neither unless the stack props set `enableVpc: true`. A stack that upgrades\nwithout it deletes its VPC and NAT gateway on the next deploy.\n\nAdd `enableVpc: true` to every `ApplicationStack` in `src/main.ts` and `src/LocalDevApp.ts` (new projects: `additionalStackProps: { enableVpc: true }` on each environment) if any of these apply:\n\n- your `ApplicationStack` uses `this.vpc` or overrides `createVpc()`; the override is not called otherwise;\n- the Lambda reaches anything private, such as RDS or a VPC endpoint;\n- another stack imports this stack's VPC outputs; CloudFormation refuses to delete them.\n\n`this.vpc` is now typed `IVpc | undefined`, even with `enableVpc: true`, so code that passes it where an `IVpc` is required (such as `new SecurityGroup(this, 'Sg', { vpc: this.vpc })`) stops compiling. With `enableVpc: true` the VPC is created before your `ApplicationStack` constructor runs, so use `this.vpc!` there, or check it and throw if it's missing.\n\nOtherwise, make `vpc` optional in `src/constructs/Api.ts` (`readonly vpc?: IVpc;`) so the project compiles. Deleting the VPC can take a while as Lambda releases its network interfaces.\n\nWith `enableVpc: true`, the Lambda is attached only if your `Api.ts` still accepts a `vpc` prop and your stack doesn't override `createApi()` without passing it.\n\n### n8n support is removed\n\n`BatmanProject` and `BootcampProject` no longer generate any n8n wiring. The base stacks have no `n8nEndpoint` prop, `src/constructs/WorkflowProvider.ts` and a construct per `src/workflows/*.json` are no longer generated, and new projects get an `Api.ts`, `main.ts` and `LocalDevApp.ts` without n8n. The `n8nWorkflows` option, the `n8nEndpoint` environment config field and the exported `WorkflowAutoDiscover` class are gone, so every project removes `n8nWorkflows` and `n8nEndpoint` from its `.projenrc.ts`.\n\nA project that doesn't use n8n stops compiling until it also removes:\n\n- `n8nEndpoint` from every `ApplicationStack` in `src/main.ts` and `src/LocalDevApp.ts`;\n- the `n8nEndpoint` prop, the n8n JWT key secret and its `grantRead` from `src/constructs/Api.ts`;\n- any `n8nEndpoint: this.props.n8nEndpoint` in a `createApi()` override;\n- any generated `src/constructs/*Workflow.ts` files and `src/workflows/`, which import the now-deleted `WorkflowProvider`.\n\nA project that uses n8n takes ownership of it:\n\n1. Upgrading makes projen delete `src/constructs/WorkflowProvider.ts`. Restore it from the last commit that had it, which works whether or not the deletion is already committed:\n\n ```bash\n git checkout \"$(git log -n1 --format=%H --diff-filter=AM -- src/constructs/WorkflowProvider.ts)\" -- src/constructs/WorkflowProvider.ts\n ```\n\n Then delete the `~~ Generated by projen` header line from it and from your per-workflow constructs (such as `AlfredWorkflow.ts`). They're yours from now on, and a new workflow needs its construct written by hand.\n2. Move `n8nEndpoint` from `Api` to your `ApplicationStack`. Remove the `n8nEndpoint` prop and its `N8N_ENDPOINT` environment entry from `src/constructs/Api.ts`, add `readonly n8nEndpoint: string;` to `ApplicationStackProps` (your `main.ts` and `LocalDevApp.ts` already pass it), and set the variable after `super()`:\n\n ```typescript\n this.api.lambdaFunction.addEnvironment('N8N_ENDPOINT', props.n8nEndpoint);\n ```\n\n## SoftwareFactoryFiles (standalone, non-Batman projects)\n\n`SoftwareFactoryFiles` is independently exported and can be attached to any\n`projen` `NodeProject` — it does not require `BatmanProject` or\n`BootcampProject`. It generates the `@swamp/software-factory` state machine,\nthe architecture rule registry, the pre-PR attestation gate, the OpenSpec\ntask-completion gate, and the swamp workflows that wire them together.\n\n```typescript\nimport { javascript } from 'projen';\nimport { SoftwareFactoryFiles } from '@macedon-technologies/batman';\n\nconst project = new javascript.NodeProject({\n name: 'my-other-project',\n defaultReleaseBranch: 'main',\n});\n\nnew SoftwareFactoryFiles(project, {\n repoName: 'my-other-project',\n githubOwner: 'my-github-org', // defaults to 'macedon-technologies' if omitted\n baseBranch: 'main', // defaults to 'main'\n});\n\nproject.synth();\n```\n\nAfter running `npx projen`, follow the printed `swamp:bootstrap` task to pull\nthe required swamp extensions and create the project's secrets vault."
101
101
  },
102
102
  "repository": {
103
103
  "type": "git",
@@ -123,7 +123,7 @@
123
123
  "kind": "interface",
124
124
  "locationInModule": {
125
125
  "filename": "src/Application.ts",
126
- "line": 24
126
+ "line": 22
127
127
  },
128
128
  "name": "ApplicationEnvironmentConfig",
129
129
  "properties": [
@@ -135,7 +135,7 @@
135
135
  "immutable": true,
136
136
  "locationInModule": {
137
137
  "filename": "src/Application.ts",
138
- "line": 25
138
+ "line": 23
139
139
  },
140
140
  "name": "githubActionRoleArn",
141
141
  "type": {
@@ -158,7 +158,7 @@
158
158
  },
159
159
  "locationInModule": {
160
160
  "filename": "src/BatmanProject.ts",
161
- "line": 82
161
+ "line": 77
162
162
  },
163
163
  "parameters": [
164
164
  {
@@ -172,7 +172,7 @@
172
172
  "kind": "class",
173
173
  "locationInModule": {
174
174
  "filename": "src/BatmanProject.ts",
175
- "line": 81
175
+ "line": 76
176
176
  },
177
177
  "name": "BatmanProject",
178
178
  "symbolId": "src/BatmanProject:BatmanProject"
@@ -251,7 +251,7 @@
251
251
  "immutable": true,
252
252
  "locationInModule": {
253
253
  "filename": "src/BatmanProject.ts",
254
- "line": 52
254
+ "line": 47
255
255
  },
256
256
  "name": "actionVersions",
257
257
  "optional": true,
@@ -268,7 +268,7 @@
268
268
  "immutable": true,
269
269
  "locationInModule": {
270
270
  "filename": "src/BatmanProject.ts",
271
- "line": 42
271
+ "line": 37
272
272
  },
273
273
  "name": "additionalCodeOwners",
274
274
  "optional": true,
@@ -314,7 +314,7 @@
314
314
  "immutable": true,
315
315
  "locationInModule": {
316
316
  "filename": "src/BatmanProject.ts",
317
- "line": 77
317
+ "line": 72
318
318
  },
319
319
  "name": "attestationFiles",
320
320
  "optional": true,
@@ -337,7 +337,7 @@
337
337
  "immutable": true,
338
338
  "locationInModule": {
339
339
  "filename": "src/BatmanProject.ts",
340
- "line": 59
340
+ "line": 54
341
341
  },
342
342
  "name": "authorizerObjectVersion",
343
343
  "optional": true,
@@ -355,7 +355,7 @@
355
355
  "immutable": true,
356
356
  "locationInModule": {
357
357
  "filename": "src/BatmanProject.ts",
358
- "line": 66
358
+ "line": 61
359
359
  },
360
360
  "name": "e2eTesting",
361
361
  "optional": true,
@@ -363,23 +363,6 @@
363
363
  "primitive": "boolean"
364
364
  }
365
365
  },
366
- {
367
- "abstract": true,
368
- "docs": {
369
- "stability": "stable",
370
- "summary": "Enable n8n workflow auto-discovery and WorkflowProvider generation."
371
- },
372
- "immutable": true,
373
- "locationInModule": {
374
- "filename": "src/BatmanProject.ts",
375
- "line": 37
376
- },
377
- "name": "n8nWorkflows",
378
- "optional": true,
379
- "type": {
380
- "primitive": "boolean"
381
- }
382
- },
383
366
  {
384
367
  "abstract": true,
385
368
  "docs": {
@@ -389,7 +372,7 @@
389
372
  "immutable": true,
390
373
  "locationInModule": {
391
374
  "filename": "src/BatmanProject.ts",
392
- "line": 47
375
+ "line": 42
393
376
  },
394
377
  "name": "websiteDeps",
395
378
  "optional": true,
@@ -554,7 +537,7 @@
554
537
  "immutable": true,
555
538
  "locationInModule": {
556
539
  "filename": "src/MainFile.ts",
557
- "line": 11
540
+ "line": 10
558
541
  },
559
542
  "name": "account",
560
543
  "type": {
@@ -584,7 +567,7 @@
584
567
  "immutable": true,
585
568
  "locationInModule": {
586
569
  "filename": "src/MainFile.ts",
587
- "line": 13
570
+ "line": 12
588
571
  },
589
572
  "name": "clerkPublishableKey",
590
573
  "type": {
@@ -644,22 +627,7 @@
644
627
  "immutable": true,
645
628
  "locationInModule": {
646
629
  "filename": "src/MainFile.ts",
647
- "line": 10
648
- },
649
- "name": "n8nEndpoint",
650
- "type": {
651
- "primitive": "string"
652
- }
653
- },
654
- {
655
- "abstract": true,
656
- "docs": {
657
- "stability": "stable"
658
- },
659
- "immutable": true,
660
- "locationInModule": {
661
- "filename": "src/MainFile.ts",
662
- "line": 12
630
+ "line": 11
663
631
  },
664
632
  "name": "region",
665
633
  "type": {
@@ -674,7 +642,7 @@
674
642
  "immutable": true,
675
643
  "locationInModule": {
676
644
  "filename": "src/MainFile.ts",
677
- "line": 14
645
+ "line": 13
678
646
  },
679
647
  "name": "additionalStackProps",
680
648
  "optional": true,
@@ -1283,54 +1251,8 @@
1283
1251
  }
1284
1252
  ],
1285
1253
  "symbolId": "src/WorkflowActionVersions:WorkflowActionVersions"
1286
- },
1287
- "@macedon-technologies/batman.WorkflowAutoDiscover": {
1288
- "assembly": "@macedon-technologies/batman",
1289
- "base": "projen.Component",
1290
- "docs": {
1291
- "stability": "stable"
1292
- },
1293
- "fqn": "@macedon-technologies/batman.WorkflowAutoDiscover",
1294
- "initializer": {
1295
- "docs": {
1296
- "stability": "stable"
1297
- },
1298
- "locationInModule": {
1299
- "filename": "src/WorkflowAutoDiscover.ts",
1300
- "line": 7
1301
- },
1302
- "parameters": [
1303
- {
1304
- "name": "project",
1305
- "type": {
1306
- "fqn": "projen.awscdk.AwsCdkTypeScriptApp"
1307
- }
1308
- }
1309
- ]
1310
- },
1311
- "kind": "class",
1312
- "locationInModule": {
1313
- "filename": "src/WorkflowAutoDiscover.ts",
1314
- "line": 6
1315
- },
1316
- "methods": [
1317
- {
1318
- "docs": {
1319
- "stability": "stable",
1320
- "summary": "Synthesizes files to the project output directory."
1321
- },
1322
- "locationInModule": {
1323
- "filename": "src/WorkflowAutoDiscover.ts",
1324
- "line": 11
1325
- },
1326
- "name": "synthesize",
1327
- "overrides": "projen.Component"
1328
- }
1329
- ],
1330
- "name": "WorkflowAutoDiscover",
1331
- "symbolId": "src/WorkflowAutoDiscover:WorkflowAutoDiscover"
1332
1254
  }
1333
1255
  },
1334
- "version": "1.29.0",
1335
- "fingerprint": "dt1wlH22V+EIj+x/9WefgyfYIFcWaGRY6I39LcVxZNI="
1256
+ "version": "1.30.0",
1257
+ "fingerprint": "s/dl5clBZVfFrvF5mFAr7Cpl0D4/kwpHw19oB3oz3hI="
1336
1258
  }
package/API.md CHANGED
@@ -4391,226 +4391,6 @@ Maximum line width (set to 0 to disable folding).
4391
4391
  ---
4392
4392
 
4393
4393
 
4394
- ### WorkflowAutoDiscover <a name="WorkflowAutoDiscover" id="@macedon-technologies/batman.WorkflowAutoDiscover"></a>
4395
-
4396
- #### Initializers <a name="Initializers" id="@macedon-technologies/batman.WorkflowAutoDiscover.Initializer"></a>
4397
-
4398
- ```typescript
4399
- import { WorkflowAutoDiscover } from '@macedon-technologies/batman'
4400
-
4401
- new WorkflowAutoDiscover(project: AwsCdkTypeScriptApp)
4402
- ```
4403
-
4404
- | **Name** | **Type** | **Description** |
4405
- | --- | --- | --- |
4406
- | <code><a href="#@macedon-technologies/batman.WorkflowAutoDiscover.Initializer.parameter.project">project</a></code> | <code>projen.awscdk.AwsCdkTypeScriptApp</code> | *No description.* |
4407
-
4408
- ---
4409
-
4410
- ##### `project`<sup>Required</sup> <a name="project" id="@macedon-technologies/batman.WorkflowAutoDiscover.Initializer.parameter.project"></a>
4411
-
4412
- - *Type:* projen.awscdk.AwsCdkTypeScriptApp
4413
-
4414
- ---
4415
-
4416
- #### Methods <a name="Methods" id="Methods"></a>
4417
-
4418
- | **Name** | **Description** |
4419
- | --- | --- |
4420
- | <code><a href="#@macedon-technologies/batman.WorkflowAutoDiscover.toString">toString</a></code> | Returns a string representation of this construct. |
4421
- | <code><a href="#@macedon-technologies/batman.WorkflowAutoDiscover.with">with</a></code> | Applies one or more mixins to this construct. |
4422
- | <code><a href="#@macedon-technologies/batman.WorkflowAutoDiscover.postProjectCreation">postProjectCreation</a></code> | Called once, right after `postSynthesize()`, only when the project is created for the first time. |
4423
- | <code><a href="#@macedon-technologies/batman.WorkflowAutoDiscover.postSynthesize">postSynthesize</a></code> | Called after synthesis. |
4424
- | <code><a href="#@macedon-technologies/batman.WorkflowAutoDiscover.preSynthesize">preSynthesize</a></code> | Called before synthesis. |
4425
- | <code><a href="#@macedon-technologies/batman.WorkflowAutoDiscover.projectCreation">projectCreation</a></code> | Called once, right after `synthesize()`, only when the project is created for the first time. |
4426
- | <code><a href="#@macedon-technologies/batman.WorkflowAutoDiscover.synthesize">synthesize</a></code> | Synthesizes files to the project output directory. |
4427
-
4428
- ---
4429
-
4430
- ##### `toString` <a name="toString" id="@macedon-technologies/batman.WorkflowAutoDiscover.toString"></a>
4431
-
4432
- ```typescript
4433
- public toString(): string
4434
- ```
4435
-
4436
- Returns a string representation of this construct.
4437
-
4438
- ##### `with` <a name="with" id="@macedon-technologies/batman.WorkflowAutoDiscover.with"></a>
4439
-
4440
- ```typescript
4441
- public with(mixins: ...IMixin[]): IConstruct
4442
- ```
4443
-
4444
- Applies one or more mixins to this construct.
4445
-
4446
- Mixins are applied in order. The list of constructs is captured at the
4447
- start of the call, so constructs added by a mixin will not be visited.
4448
- Use multiple `with()` calls if subsequent mixins should apply to added
4449
- constructs.
4450
-
4451
- ###### `mixins`<sup>Required</sup> <a name="mixins" id="@macedon-technologies/batman.WorkflowAutoDiscover.with.parameter.mixins"></a>
4452
-
4453
- - *Type:* ...constructs.IMixin[]
4454
-
4455
- The mixins to apply.
4456
-
4457
- ---
4458
-
4459
- ##### `postProjectCreation` <a name="postProjectCreation" id="@macedon-technologies/batman.WorkflowAutoDiscover.postProjectCreation"></a>
4460
-
4461
- ```typescript
4462
- public postProjectCreation(initProject: InitProject): void
4463
- ```
4464
-
4465
- Called once, right after `postSynthesize()`, only when the project is created for the first time.
4466
-
4467
- It does not run on later `projen` invocations. It only fires for `projen new` (or `Projects.createProject`).
4468
- It is also skipped when post-synthesis steps are disabled, e.g. `--no-post` or `PROJEN_DISABLE_POST`.
4469
- Use it for one-off setup that can be turned off by the user, like running a task to give the user immediate
4470
- feedback on their new project. Order across components is not guaranteed.
4471
-
4472
- ###### `initProject`<sup>Required</sup> <a name="initProject" id="@macedon-technologies/batman.WorkflowAutoDiscover.postProjectCreation.parameter.initProject"></a>
4473
-
4474
- - *Type:* projen.InitProject
4475
-
4476
- Details about how the project was created, e.g. its type and the original CLI args.
4477
-
4478
- ---
4479
-
4480
- ##### `postSynthesize` <a name="postSynthesize" id="@macedon-technologies/batman.WorkflowAutoDiscover.postSynthesize"></a>
4481
-
4482
- ```typescript
4483
- public postSynthesize(): void
4484
- ```
4485
-
4486
- Called after synthesis.
4487
-
4488
- Order is *not* guaranteed.
4489
-
4490
- ##### `preSynthesize` <a name="preSynthesize" id="@macedon-technologies/batman.WorkflowAutoDiscover.preSynthesize"></a>
4491
-
4492
- ```typescript
4493
- public preSynthesize(): void
4494
- ```
4495
-
4496
- Called before synthesis.
4497
-
4498
- ##### `projectCreation` <a name="projectCreation" id="@macedon-technologies/batman.WorkflowAutoDiscover.projectCreation"></a>
4499
-
4500
- ```typescript
4501
- public projectCreation(initProject: InitProject): void
4502
- ```
4503
-
4504
- Called once, right after `synthesize()`, only when the project is created for the first time.
4505
-
4506
- It does not run on later `projen` invocations. It only fires for `projen new` (or `Projects.createProject`).
4507
- Use it for deterministic, one-off file generation. Order across components is not guaranteed.
4508
-
4509
- ###### `initProject`<sup>Required</sup> <a name="initProject" id="@macedon-technologies/batman.WorkflowAutoDiscover.projectCreation.parameter.initProject"></a>
4510
-
4511
- - *Type:* projen.InitProject
4512
-
4513
- Details about how the project was created, e.g. its type and the original CLI args.
4514
-
4515
- ---
4516
-
4517
- ##### `synthesize` <a name="synthesize" id="@macedon-technologies/batman.WorkflowAutoDiscover.synthesize"></a>
4518
-
4519
- ```typescript
4520
- public synthesize(): void
4521
- ```
4522
-
4523
- Synthesizes files to the project output directory.
4524
-
4525
- #### Static Functions <a name="Static Functions" id="Static Functions"></a>
4526
-
4527
- | **Name** | **Description** |
4528
- | --- | --- |
4529
- | <code><a href="#@macedon-technologies/batman.WorkflowAutoDiscover.isConstruct">isConstruct</a></code> | Checks if `x` is a construct. |
4530
- | <code><a href="#@macedon-technologies/batman.WorkflowAutoDiscover.isComponent">isComponent</a></code> | Test whether the given construct is a component. |
4531
-
4532
- ---
4533
-
4534
- ##### `isConstruct` <a name="isConstruct" id="@macedon-technologies/batman.WorkflowAutoDiscover.isConstruct"></a>
4535
-
4536
- ```typescript
4537
- import { WorkflowAutoDiscover } from '@macedon-technologies/batman'
4538
-
4539
- WorkflowAutoDiscover.isConstruct(x: any)
4540
- ```
4541
-
4542
- Checks if `x` is a construct.
4543
-
4544
- Use this method instead of `instanceof` to properly detect `Construct`
4545
- instances, even when the construct library is symlinked.
4546
-
4547
- Explanation: in JavaScript, multiple copies of the `constructs` library on
4548
- disk are seen as independent, completely different libraries. As a
4549
- consequence, the class `Construct` in each copy of the `constructs` library
4550
- is seen as a different class, and an instance of one class will not test as
4551
- `instanceof` the other class. `npm install` will not create installations
4552
- like this, but users may manually symlink construct libraries together or
4553
- use a monorepo tool: in those cases, multiple copies of the `constructs`
4554
- library can be accidentally installed, and `instanceof` will behave
4555
- unpredictably. It is safest to avoid using `instanceof`, and using
4556
- this type-testing method instead.
4557
-
4558
- ###### `x`<sup>Required</sup> <a name="x" id="@macedon-technologies/batman.WorkflowAutoDiscover.isConstruct.parameter.x"></a>
4559
-
4560
- - *Type:* any
4561
-
4562
- Any object.
4563
-
4564
- ---
4565
-
4566
- ##### `isComponent` <a name="isComponent" id="@macedon-technologies/batman.WorkflowAutoDiscover.isComponent"></a>
4567
-
4568
- ```typescript
4569
- import { WorkflowAutoDiscover } from '@macedon-technologies/batman'
4570
-
4571
- WorkflowAutoDiscover.isComponent(x: any)
4572
- ```
4573
-
4574
- Test whether the given construct is a component.
4575
-
4576
- ###### `x`<sup>Required</sup> <a name="x" id="@macedon-technologies/batman.WorkflowAutoDiscover.isComponent.parameter.x"></a>
4577
-
4578
- - *Type:* any
4579
-
4580
- ---
4581
-
4582
- #### Properties <a name="Properties" id="Properties"></a>
4583
-
4584
- | **Name** | **Type** | **Description** |
4585
- | --- | --- | --- |
4586
- | <code><a href="#@macedon-technologies/batman.WorkflowAutoDiscover.property.node">node</a></code> | <code>constructs.Node</code> | The tree node. |
4587
- | <code><a href="#@macedon-technologies/batman.WorkflowAutoDiscover.property.project">project</a></code> | <code>projen.Project</code> | *No description.* |
4588
-
4589
- ---
4590
-
4591
- ##### `node`<sup>Required</sup> <a name="node" id="@macedon-technologies/batman.WorkflowAutoDiscover.property.node"></a>
4592
-
4593
- ```typescript
4594
- public readonly node: Node;
4595
- ```
4596
-
4597
- - *Type:* constructs.Node
4598
-
4599
- The tree node.
4600
-
4601
- ---
4602
-
4603
- ##### `project`<sup>Required</sup> <a name="project" id="@macedon-technologies/batman.WorkflowAutoDiscover.property.project"></a>
4604
-
4605
- ```typescript
4606
- public readonly project: Project;
4607
- ```
4608
-
4609
- - *Type:* projen.Project
4610
-
4611
- ---
4612
-
4613
-
4614
4394
  ## Structs <a name="Structs" id="Structs"></a>
4615
4395
 
4616
4396
  ### ApplicationEnvironmentConfig <a name="ApplicationEnvironmentConfig" id="@macedon-technologies/batman.ApplicationEnvironmentConfig"></a>
@@ -4633,7 +4413,6 @@ const applicationEnvironmentConfig: ApplicationEnvironmentConfig = { ... }
4633
4413
  | <code><a href="#@macedon-technologies/batman.ApplicationEnvironmentConfig.property.datadogSecretArn">datadogSecretArn</a></code> | <code>string</code> | *No description.* |
4634
4414
  | <code><a href="#@macedon-technologies/batman.ApplicationEnvironmentConfig.property.hostedZoneDomainName">hostedZoneDomainName</a></code> | <code>string</code> | *No description.* |
4635
4415
  | <code><a href="#@macedon-technologies/batman.ApplicationEnvironmentConfig.property.hostname">hostname</a></code> | <code>string</code> | *No description.* |
4636
- | <code><a href="#@macedon-technologies/batman.ApplicationEnvironmentConfig.property.n8nEndpoint">n8nEndpoint</a></code> | <code>string</code> | *No description.* |
4637
4416
  | <code><a href="#@macedon-technologies/batman.ApplicationEnvironmentConfig.property.region">region</a></code> | <code>string</code> | *No description.* |
4638
4417
  | <code><a href="#@macedon-technologies/batman.ApplicationEnvironmentConfig.property.additionalStackProps">additionalStackProps</a></code> | <code>{[ key: string ]: any}</code> | *No description.* |
4639
4418
  | <code><a href="#@macedon-technologies/batman.ApplicationEnvironmentConfig.property.githubActionRoleArn">githubActionRoleArn</a></code> | <code>string</code> | *No description.* |
@@ -4700,16 +4479,6 @@ public readonly hostname: string;
4700
4479
 
4701
4480
  ---
4702
4481
 
4703
- ##### `n8nEndpoint`<sup>Required</sup> <a name="n8nEndpoint" id="@macedon-technologies/batman.ApplicationEnvironmentConfig.property.n8nEndpoint"></a>
4704
-
4705
- ```typescript
4706
- public readonly n8nEndpoint: string;
4707
- ```
4708
-
4709
- - *Type:* string
4710
-
4711
- ---
4712
-
4713
4482
  ##### `region`<sup>Required</sup> <a name="region" id="@macedon-technologies/batman.ApplicationEnvironmentConfig.property.region"></a>
4714
4483
 
4715
4484
  ```typescript
@@ -4934,7 +4703,6 @@ const batmanProjectOptions: BatmanProjectOptions = { ... }
4934
4703
  | <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. |
4935
4704
  | <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. |
4936
4705
  | <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. |
4937
- | <code><a href="#@macedon-technologies/batman.BatmanProjectOptions.property.n8nWorkflows">n8nWorkflows</a></code> | <code>boolean</code> | Enable n8n workflow auto-discovery and WorkflowProvider generation. |
4938
4706
  | <code><a href="#@macedon-technologies/batman.BatmanProjectOptions.property.websiteDeps">websiteDeps</a></code> | <code>string[]</code> | Website dependencies. |
4939
4707
 
4940
4708
  ---
@@ -7556,18 +7324,6 @@ Whether the generated `web` app and its `PrDeployWorkflow` CI step include Playw
7556
7324
 
7557
7325
  ---
7558
7326
 
7559
- ##### `n8nWorkflows`<sup>Optional</sup> <a name="n8nWorkflows" id="@macedon-technologies/batman.BatmanProjectOptions.property.n8nWorkflows"></a>
7560
-
7561
- ```typescript
7562
- public readonly n8nWorkflows: boolean;
7563
- ```
7564
-
7565
- - *Type:* boolean
7566
-
7567
- Enable n8n workflow auto-discovery and WorkflowProvider generation.
7568
-
7569
- ---
7570
-
7571
7327
  ##### `websiteDeps`<sup>Optional</sup> <a name="websiteDeps" id="@macedon-technologies/batman.BatmanProjectOptions.property.websiteDeps"></a>
7572
7328
 
7573
7329
  ```typescript
@@ -7774,7 +7530,6 @@ const bootcampProjectOptions: BootcampProjectOptions = { ... }
7774
7530
  | <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. |
7775
7531
  | <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. |
7776
7532
  | <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. |
7777
- | <code><a href="#@macedon-technologies/batman.BootcampProjectOptions.property.n8nWorkflows">n8nWorkflows</a></code> | <code>boolean</code> | Enable n8n workflow auto-discovery and WorkflowProvider generation. |
7778
7533
  | <code><a href="#@macedon-technologies/batman.BootcampProjectOptions.property.websiteDeps">websiteDeps</a></code> | <code>string[]</code> | Website dependencies. |
7779
7534
 
7780
7535
  ---
@@ -10396,18 +10151,6 @@ Whether the generated `web` app and its `PrDeployWorkflow` CI step include Playw
10396
10151
 
10397
10152
  ---
10398
10153
 
10399
- ##### `n8nWorkflows`<sup>Optional</sup> <a name="n8nWorkflows" id="@macedon-technologies/batman.BootcampProjectOptions.property.n8nWorkflows"></a>
10400
-
10401
- ```typescript
10402
- public readonly n8nWorkflows: boolean;
10403
- ```
10404
-
10405
- - *Type:* boolean
10406
-
10407
- Enable n8n workflow auto-discovery and WorkflowProvider generation.
10408
-
10409
- ---
10410
-
10411
10154
  ##### `websiteDeps`<sup>Optional</sup> <a name="websiteDeps" id="@macedon-technologies/batman.BootcampProjectOptions.property.websiteDeps"></a>
10412
10155
 
10413
10156
  ```typescript
@@ -10468,7 +10211,6 @@ const environmentConfig: EnvironmentConfig = { ... }
10468
10211
  | <code><a href="#@macedon-technologies/batman.EnvironmentConfig.property.datadogSecretArn">datadogSecretArn</a></code> | <code>string</code> | *No description.* |
10469
10212
  | <code><a href="#@macedon-technologies/batman.EnvironmentConfig.property.hostedZoneDomainName">hostedZoneDomainName</a></code> | <code>string</code> | *No description.* |
10470
10213
  | <code><a href="#@macedon-technologies/batman.EnvironmentConfig.property.hostname">hostname</a></code> | <code>string</code> | *No description.* |
10471
- | <code><a href="#@macedon-technologies/batman.EnvironmentConfig.property.n8nEndpoint">n8nEndpoint</a></code> | <code>string</code> | *No description.* |
10472
10214
  | <code><a href="#@macedon-technologies/batman.EnvironmentConfig.property.region">region</a></code> | <code>string</code> | *No description.* |
10473
10215
  | <code><a href="#@macedon-technologies/batman.EnvironmentConfig.property.additionalStackProps">additionalStackProps</a></code> | <code>{[ key: string ]: any}</code> | *No description.* |
10474
10216
 
@@ -10534,16 +10276,6 @@ public readonly hostname: string;
10534
10276
 
10535
10277
  ---
10536
10278
 
10537
- ##### `n8nEndpoint`<sup>Required</sup> <a name="n8nEndpoint" id="@macedon-technologies/batman.EnvironmentConfig.property.n8nEndpoint"></a>
10538
-
10539
- ```typescript
10540
- public readonly n8nEndpoint: string;
10541
- ```
10542
-
10543
- - *Type:* string
10544
-
10545
- ---
10546
-
10547
10279
  ##### `region`<sup>Required</sup> <a name="region" id="@macedon-technologies/batman.EnvironmentConfig.property.region"></a>
10548
10280
 
10549
10281
  ```typescript
package/README.md CHANGED
@@ -86,6 +86,52 @@ yarn deploy
86
86
  yarn test
87
87
  ```
88
88
 
89
+ ## Upgrading
90
+
91
+ ### The base stack no longer creates a VPC
92
+
93
+ `BaseApplicationStack` used to create a VPC with a NAT gateway and attach the API Lambda to it.
94
+ It now creates neither unless the stack props set `enableVpc: true`. A stack that upgrades
95
+ without it deletes its VPC and NAT gateway on the next deploy.
96
+
97
+ Add `enableVpc: true` to every `ApplicationStack` in `src/main.ts` and `src/LocalDevApp.ts` (new projects: `additionalStackProps: { enableVpc: true }` on each environment) if any of these apply:
98
+
99
+ - your `ApplicationStack` uses `this.vpc` or overrides `createVpc()`; the override is not called otherwise;
100
+ - the Lambda reaches anything private, such as RDS or a VPC endpoint;
101
+ - another stack imports this stack's VPC outputs; CloudFormation refuses to delete them.
102
+
103
+ `this.vpc` is now typed `IVpc | undefined`, even with `enableVpc: true`, so code that passes it where an `IVpc` is required (such as `new SecurityGroup(this, 'Sg', { vpc: this.vpc })`) stops compiling. With `enableVpc: true` the VPC is created before your `ApplicationStack` constructor runs, so use `this.vpc!` there, or check it and throw if it's missing.
104
+
105
+ Otherwise, make `vpc` optional in `src/constructs/Api.ts` (`readonly vpc?: IVpc;`) so the project compiles. Deleting the VPC can take a while as Lambda releases its network interfaces.
106
+
107
+ With `enableVpc: true`, the Lambda is attached only if your `Api.ts` still accepts a `vpc` prop and your stack doesn't override `createApi()` without passing it.
108
+
109
+ ### n8n support is removed
110
+
111
+ `BatmanProject` and `BootcampProject` no longer generate any n8n wiring. The base stacks have no `n8nEndpoint` prop, `src/constructs/WorkflowProvider.ts` and a construct per `src/workflows/*.json` are no longer generated, and new projects get an `Api.ts`, `main.ts` and `LocalDevApp.ts` without n8n. The `n8nWorkflows` option, the `n8nEndpoint` environment config field and the exported `WorkflowAutoDiscover` class are gone, so every project removes `n8nWorkflows` and `n8nEndpoint` from its `.projenrc.ts`.
112
+
113
+ A project that doesn't use n8n stops compiling until it also removes:
114
+
115
+ - `n8nEndpoint` from every `ApplicationStack` in `src/main.ts` and `src/LocalDevApp.ts`;
116
+ - the `n8nEndpoint` prop, the n8n JWT key secret and its `grantRead` from `src/constructs/Api.ts`;
117
+ - any `n8nEndpoint: this.props.n8nEndpoint` in a `createApi()` override;
118
+ - any generated `src/constructs/*Workflow.ts` files and `src/workflows/`, which import the now-deleted `WorkflowProvider`.
119
+
120
+ A project that uses n8n takes ownership of it:
121
+
122
+ 1. Upgrading makes projen delete `src/constructs/WorkflowProvider.ts`. Restore it from the last commit that had it, which works whether or not the deletion is already committed:
123
+
124
+ ```bash
125
+ git checkout "$(git log -n1 --format=%H --diff-filter=AM -- src/constructs/WorkflowProvider.ts)" -- src/constructs/WorkflowProvider.ts
126
+ ```
127
+
128
+ Then delete the `~~ Generated by projen` header line from it and from your per-workflow constructs (such as `AlfredWorkflow.ts`). They're yours from now on, and a new workflow needs its construct written by hand.
129
+ 2. Move `n8nEndpoint` from `Api` to your `ApplicationStack`. Remove the `n8nEndpoint` prop and its `N8N_ENDPOINT` environment entry from `src/constructs/Api.ts`, add `readonly n8nEndpoint: string;` to `ApplicationStackProps` (your `main.ts` and `LocalDevApp.ts` already pass it), and set the variable after `super()`:
130
+
131
+ ```typescript
132
+ this.api.lambdaFunction.addEnvironment('N8N_ENDPOINT', props.n8nEndpoint);
133
+ ```
134
+
89
135
  ## SoftwareFactoryFiles (standalone, non-Batman projects)
90
136
 
91
137
  `SoftwareFactoryFiles` is independently exported and can be attached to any
@@ -26,7 +26,6 @@ const ENV: import('../src').ApplicationEnvironmentConfig = {
26
26
  datadogSecretArn: 'arn:aws:secretsmanager:us-east-1:111111111111:secret:datadog',
27
27
  clerkJwksUrl: 'https://fixture.clerk.accounts.dev/.well-known/jwks.json',
28
28
  clerkPublishableKey: 'fakekey',
29
- n8nEndpoint: 'https://n8n.dev.example.com',
30
29
  };
31
30
 
32
31
  const outdir = mkdtempSync(join(tmpdir(), 'batman-zizmor-'));