@xpertss/projen-types 0.0.0 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/.jsii +1083 -92
  2. package/API.md +7459 -4313
  3. package/README.md +103 -1
  4. package/lib/actions/action-build-workflow.d.ts +17 -0
  5. package/lib/actions/action-build-workflow.js +52 -0
  6. package/lib/actions/action-dogfood-workflow.d.ts +47 -0
  7. package/lib/actions/action-dogfood-workflow.js +84 -0
  8. package/lib/actions/action-sonar-workflow.d.ts +25 -0
  9. package/lib/actions/action-sonar-workflow.js +64 -0
  10. package/lib/actions/github-action-project.d.ts +60 -0
  11. package/lib/actions/github-action-project.js +155 -0
  12. package/lib/cdk/app-runtime-scaffold.js +1 -1
  13. package/lib/cdk/cdk-app-project.js +2 -4
  14. package/lib/cdk/cdk-infra-project.js +1 -1
  15. package/lib/cdk/cdk-typescript-base.js +16 -3
  16. package/lib/cdk/components/ecr-ecs-constructs.js +1 -1
  17. package/lib/cdk/components/edge-networking-constructs.js +1 -1
  18. package/lib/cdk/database-component.js +1 -1
  19. package/lib/cdk/options.d.ts +0 -2
  20. package/lib/cdk/options.js +1 -1
  21. package/lib/common/actions-allowlist-guard.d.ts +37 -0
  22. package/lib/common/actions-allowlist-guard.js +70 -0
  23. package/lib/common/internal-actions.d.ts +10 -0
  24. package/lib/common/internal-actions.js +33 -0
  25. package/lib/common/manual-deploy-workflow.d.ts +0 -2
  26. package/lib/common/manual-deploy-workflow.js +1 -12
  27. package/lib/common/projen-drift-check-workflow.d.ts +36 -0
  28. package/lib/common/projen-drift-check-workflow.js +73 -0
  29. package/lib/common/upgrade-workflow.js +6 -2
  30. package/lib/common/workflow-change-notice-workflow.d.ts +33 -0
  31. package/lib/common/workflow-change-notice-workflow.js +58 -0
  32. package/lib/index.d.ts +8 -0
  33. package/lib/index.js +9 -1
  34. package/lib/java/components/cdk-deploy-hook.js +1 -1
  35. package/lib/java/components/code-index-workflow.js +1 -1
  36. package/lib/java/components/docker-publish.js +1 -1
  37. package/lib/java/components/flyway-migration.js +1 -1
  38. package/lib/java/components/github-packages-publish.js +1 -1
  39. package/lib/java/components/maven-central-publish.js +1 -1
  40. package/lib/java/java-app-project.js +1 -1
  41. package/lib/java/java-library-project.js +1 -1
  42. package/lib/java/java-maven-base.js +13 -4
  43. package/lib/java/java-service-project.js +1 -1
  44. package/package.json +1 -1
  45. package/release-publishing.md +125 -0
  46. package/lib/common/drift-check.d.ts +0 -8
  47. package/lib/common/drift-check.js +0 -18
  48. package/spec/npm-publishing-setup.md +0 -150
  49. package/spec/projen-cdk-spec.md +0 -80
  50. package/spec/projen-java-spec.md +0 -96
@@ -1,18 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.driftCheckSteps = driftCheckSteps;
4
- /**
5
- * Steps that re-run projen and fail the job if the generated output no
6
- * longer matches what's committed - i.e. someone hand-edited a projen
7
- * managed file (package.json/pom.xml/.github/workflows/*.yml/...) without
8
- * going through .projenrc.
9
- */
10
- function driftCheckSteps(projenCommand = 'npx projen') {
11
- return [
12
- {
13
- name: 'Check for projen drift',
14
- run: `${projenCommand}\ngit diff --exit-code`,
15
- },
16
- ];
17
- }
18
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZHJpZnQtY2hlY2suanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvY29tbW9uL2RyaWZ0LWNoZWNrLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBUUEsMENBU0M7QUFmRDs7Ozs7R0FLRztBQUNILFNBQWdCLGVBQWUsQ0FDN0IsYUFBYSxHQUFHLFlBQVk7SUFFNUIsT0FBTztRQUNMO1lBQ0UsSUFBSSxFQUFFLHdCQUF3QjtZQUM5QixHQUFHLEVBQUUsR0FBRyxhQUFhLHdCQUF3QjtTQUM5QztLQUNGLENBQUM7QUFDSixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgZ2l0aHViIH0gZnJvbSAncHJvamVuJztcblxuLyoqXG4gKiBTdGVwcyB0aGF0IHJlLXJ1biBwcm9qZW4gYW5kIGZhaWwgdGhlIGpvYiBpZiB0aGUgZ2VuZXJhdGVkIG91dHB1dCBub1xuICogbG9uZ2VyIG1hdGNoZXMgd2hhdCdzIGNvbW1pdHRlZCAtIGkuZS4gc29tZW9uZSBoYW5kLWVkaXRlZCBhIHByb2plblxuICogbWFuYWdlZCBmaWxlIChwYWNrYWdlLmpzb24vcG9tLnhtbC8uZ2l0aHViL3dvcmtmbG93cy8qLnltbC8uLi4pIHdpdGhvdXRcbiAqIGdvaW5nIHRocm91Z2ggLnByb2plbnJjLlxuICovXG5leHBvcnQgZnVuY3Rpb24gZHJpZnRDaGVja1N0ZXBzKFxuICBwcm9qZW5Db21tYW5kID0gJ25weCBwcm9qZW4nLFxuKTogZ2l0aHViLndvcmtmbG93cy5Kb2JTdGVwW10ge1xuICByZXR1cm4gW1xuICAgIHtcbiAgICAgIG5hbWU6ICdDaGVjayBmb3IgcHJvamVuIGRyaWZ0JyxcbiAgICAgIHJ1bjogYCR7cHJvamVuQ29tbWFuZH1cXG5naXQgZGlmZiAtLWV4aXQtY29kZWAsXG4gICAgfSxcbiAgXTtcbn1cbiJdfQ==
@@ -1,150 +0,0 @@
1
- # npm Publishing Setup — `@xpertss/projen-types`
2
-
3
- ## Root cause (verified)
4
-
5
- The `release_npm` job in `.github/workflows/release.yml` (lines 108–157) publishes via projen's publib:
6
-
7
- ```yaml
8
- - name: Release
9
- env:
10
- NPM_DIST_TAG: latest
11
- NPM_REGISTRY: registry.npmjs.org
12
- NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
13
- PUBLIB_DRYRUN: ${{ inputs.dry_run }}
14
- run: npx '-p' 'publib@latest' 'publib-npm'
15
- ```
16
-
17
- The `publib-npm` script (publib@0.3.3, `bin/publib-npm` lines 43–46) exits with:
18
-
19
- ```
20
- NPM_TOKEN=<token> or NPM_TRUSTED_PUBLISHER=true is required
21
- ```
22
-
23
- when **both** are absent. Current state of the repo:
24
-
25
- - GitHub Actions secret `NPM_TOKEN` is **not set** on the repository → expands to empty string
26
- - `NPM_TRUSTED_PUBLISHER` is not set in the workflow
27
- - `release_npm` job has only `contents: read` permission — no `id-token: write`, so OIDC is not possible yet
28
-
29
- So the job has no credential at all. Exactly one of the two options below fixes it.
30
-
31
- ## npm's 2026 policy context (affects the choice)
32
-
33
- - **November 2025:** legacy (classic) access tokens removed — only **granular access tokens** exist now (mandatory expiry, scoping to package/scope).
34
- - **January 2027:** direct publishing of new versions **with granular tokens is being removed**. Bypass-2FA + direct-publish tokens are deprecated; npm's stated path for CI is trusted publishing (OIDC) or stage-only tokens + `npm stage publish`.
35
- - Therefore: the token option is a quick unblock today, but **trusted publishing is the only durable solution**.
36
-
37
- ---
38
-
39
- ## Option A — `NPM_TOKEN` GitHub secret (granular access token)
40
-
41
- Fastest to get working. No code changes — `release.yml` already reads `secrets.NPM_TOKEN`.
42
-
43
- ### Prerequisites
44
-
45
- - An npm user account.
46
- - For the scoped package `@xpertss/projen-types`: the `@xpertss` npm organization must exist and your account must be a member with rights to publish under that scope. (If the org doesn't exist yet: npmjs.com → Organizations → create it, free tier is fine for a *public* package; restricted/private packages require a paid plan.)
47
-
48
- ### 1. Create a granular access token (web UI recommended)
49
-
50
- 1. Log in to npmjs.com.
51
- 2. Avatar (top right) → **Access Tokens** → **Generate New Token**.
52
- 3. Configure:
53
- - **Access:** *Read and write (publish and stage)* — required for direct `npm publish`. (A *stage only* token cannot be used here: publib runs `npm publish`, which fails with `E_STAGE_REQUIRED`.)
54
- - **Scope:** restrict to the single package `@xpertss/projen-types`.
55
- - **Expiry:** mandatory — pick a date, remember to rotate.
56
- - **Bypass 2FA:** enable — CI publishing is non-interactive; without this, a 2FA-enabled account will make the publish hang/fail.
57
- 4. **Copy the token** — shown only once.
58
-
59
- ### 2. Store it in GitHub
60
-
61
- 1. GitHub → repo `xpertss/projen` → **Settings** → **Secrets and variables** → **Actions**.
62
- 2. **New repository secret** → Name: `NPM_TOKEN` → Value: the token.
63
- - Must be a *repository* secret (the workflow references it from the repo, not an environment/org).
64
-
65
- ### 3. Test
66
-
67
- - Actions tab → `release` workflow → **Run workflow** → `dry_run = true`. publib checks the token *before* the dry-run short-circuit, so a valid secret gets past the previous failure point and stops at "Dry run: skipping npm publish".
68
- - Then trigger a real release (push to `main`, or `Run workflow` without `dry_run`).
69
-
70
- ### Caveats
71
-
72
- - **Access level:** `NPM_ACCESS_LEVEL` is not set anywhere in the generated workflow, and `npm publish` defaults scoped packages to **restricted (private)** — which requires a paid npm plan. If the package is meant to be public, add to `.projenrc.ts`:
73
- ```ts
74
- project.addFields({ publishConfig: { access: 'public' } });
75
- ```
76
- and run `npx projen`. `npm publish` honors `publishConfig.access` from the tarball's `package.json`. (Only needed for the first publish of a version; access is fixed per package version.)
77
- - Tokens expire and must be rotated.
78
- - **Direct token publishing is removed January 2027** — migrate to Option B before then.
79
-
80
- ---
81
-
82
- ## Option B — npm Trusted Publishing (OIDC, recommended)
83
-
84
- No long-lived secret at all. npm exchanges a short-lived, workflow-scoped OIDC token for a publish credential. Provenance attestations are generated automatically (public repo + public package).
85
-
86
- ### Requirements
87
-
88
- - npm CLI ≥ 11.5.1 / Node ≥ 22.14. The workflow uses `actions/setup-node@v7` with `node-version: lts/*` (Node 24 LTS, npm 11.x) → satisfied. (If you ever pin a Node version in `workflowNodeVersion`, keep it ≥ 22.14.)
89
- - GitHub-hosted runners (the workflow uses `ubuntu-latest` → OK).
90
- - `package.json` `repository.url` must match the GitHub repo exactly — it does: `git@github.com:xpertss/projen`.
91
- - The package must **already exist** on the registry before a trusted publisher can be configured for it (create it via Option A's first publish or a one-off manual `npm publish`).
92
-
93
- ### 1. Enable it in projen
94
-
95
- `release.yml` is projen-generated, so change the source, not the file. In `.projenrc.ts`:
96
-
97
- ```ts
98
- const project = new cdk.JsiiProject({
99
- ...
100
- npmTrustedPublishing: true, // NEW
101
- });
102
- ```
103
-
104
- Then run `npx projen`. Verified against the installed projen 0.103.23 (`lib/cdk/jsii-build.js:162`, `lib/release/publisher.js:226,269`): this makes the `release_npm` job emit:
105
-
106
- - `env: NPM_TRUSTED_PUBLISHER: "true"` (publib then `unset`s `NPM_TOKEN` and skips the token check)
107
- - `permissions: id-token: write` (required for GitHub to mint OIDC tokens)
108
- - `NPM_TOKEN` is no longer referenced (it is mutually exclusive with a `npmTokenSecret` option)
109
-
110
- Commit `.projenrc.ts` and the regenerated `release.yml`.
111
-
112
- ### 2. Configure the trusted publisher on npmjs.com
113
-
114
- 1. npmjs.com → package `@xpertss/projen-types` → **Settings** → **Trusted Publisher** → **Add trusted publisher** → **GitHub Actions**.
115
- 2. Fill in:
116
- - **Organization or user:** `xpertss`
117
- - **Repository:** `projen`
118
- - **Workflow filename:** `release.yml` (filename only, exact case, must live in `.github/workflows/`)
119
- - **Environment name:** leave empty
120
- - **Allowed actions:** **also allow `npm publish`** — configurations created after 2026-09-03 default to *stage-only* (`npm stage publish`), but publib runs `npm publish`, so direct publish must be explicitly permitted.
121
- 3. npm does **not** validate the configuration when you save it — mismatches only surface at publish time as "Unable to authenticate" (ENEEDAUTH). Double-check the fields.
122
-
123
- ### 3. Verify
124
-
125
- - Push a commit to `main` (or run the workflow) so a real release occurs. The `release_npm` job should complete with "SUCCESS" — no secret involved.
126
- - Once it works, npm's recommended hardening: package **Settings** → **Publishing access** → *Require two-factor authentication and disallow tokens* → save. This kills token-based publishing entirely while trusted publishing keeps working.
127
-
128
- ### Failure-mode checklist
129
-
130
- | Symptom | Cause |
131
- |---|---|
132
- | `ENEEDAUTH` / "Unable to authenticate" | workflow filename or repo/owner field mismatch (case-sensitive); or missing `id-token: write` |
133
- | `E_STAGE_REQUIRED` | trusted publisher was created stage-only; allow `npm publish` in its allowed actions |
134
- | Provenance missing | package or repo not public — expected, not an error |
135
-
136
- ---
137
-
138
- ## Recommendation
139
-
140
- 1. If the package doesn't exist on npm yet and you need a release **now**: Option A (token) unblocks it in ~10 minutes, including the `publishConfig.access` fix for public visibility.
141
- 2. Do Option B in the same or next session, verify a real publish, then lock down with "disallow tokens" and revoke the token from Option A.
142
- 3. Option A alone must be retired before **January 2027** (direct token publishing removal).
143
-
144
- ## References
145
-
146
- - Workflow: `.github/workflows/release.yml` (job `release_npm`, lines 108–157)
147
- - publib source: https://github.com/cdklabs/publib — `bin/publib-npm` (v0.3.3)
148
- - npm token policy: https://docs.npmjs.com/about-access-tokens (granular-only since Nov 2025; direct token publishing removed Jan 2027)
149
- - npm trusted publishing: https://docs.npmjs.com/trusted-publishers
150
- - projen trusted publishing: https://projen.io/docs/publishing/trusted-publishing/
@@ -1,80 +0,0 @@
1
- # projen-cdk — Project Spec
2
-
3
- ## Overview
4
-
5
- `projen-cdk` is a projen project-type package (`@cai-projen/projen-cdk`) providing scaffolding for CoxAuto's two AWS CDK/TypeScript project types. Both share the CDK/TypeScript foundation and a manual-dispatch deploy workflow; `CdkAppProject` is `CdkInfraProject` plus a real running application and its data layer.
6
-
7
- ## Project Types
8
-
9
- ### 1. `CdkInfraProject`
10
- - **Purpose:** Pure infrastructure stacks — little or no application code. Reference example: SimulcastAVDelivery.
11
- - **Typical resources:** CloudFront, Route53, SQS, API Gateway, Cognito, ECR repos, ECS services/clusters standing up externally-built Docker images.
12
- - **Code:** Usually none, or a small Lambda/handful of Lambdas.
13
- - **Workflows:** PR-time checks (synth/diff, lint, unit tests on any Lambda code); manual-dispatch deploy per environment.
14
-
15
- ### 2. `CdkAppProject`
16
- - **Purpose:** Full TypeScript service applications running behind API Gateway (or similar), with the infra to support them.
17
- - **Adds on top of `CdkInfraProject`:**
18
- - Full TypeScript application source structure (handlers/business logic, not just infra).
19
- - Database provisioning + migration tooling.
20
- - Same API Gateway/ECS/ECR patterns as type 1, but application-owned rather than accepting arbitrary external images.
21
- - **Workflows:** Same PR checks as type 1, plus app-level build/test, plus manual-dispatch deploy.
22
-
23
- ## Shared Components
24
-
25
- | Component | Description | Used by |
26
- |---|---|---|
27
- | `CdkTypescriptBase` | Base CDK app structure, `cdk.json`, TypeScript config, standard stack layout | 1, 2 |
28
- | `PrCheckWorkflow` | `cdk synth`/`cdk diff`, lint, unit tests on PR. Also runs `npx projen` and `git diff --exit-code` against generated files (`cdk.json`, `package.json`, `tsconfig.json`, `.github/workflows/*.yml`) to fail the PR if a hand edit drifted from the projen-managed output | 1, 2 |
29
- | `ManualDeployWorkflow` | Manual-dispatch deploy workflow, environment-parameterized (dev/stage/prod) | 1, 2 |
30
- | `EcrEcsConstructs` | Reusable constructs for ECR repo + ECS cluster/service standing up a container image | 1, 2 (image source differs) |
31
- | `EdgeNetworkingConstructs` | CloudFront, Route53, API Gateway, Cognito construct helpers | 1, 2 |
32
- | `AppRuntimeScaffold` | TypeScript app source layout, handler patterns | 2 only |
33
- | `DatabaseComponent` | DB provisioning construct + migration tooling wiring | 2 only |
34
- | `UpgradeWorkflow` | Nightly dependency upgrade PRs | 1, 2 |
35
-
36
- ## Workflows Summary
37
-
38
- | Workflow | Trigger | Applies to |
39
- |---|---|---|
40
- | `pr-check.yml` (synth/diff/lint/test) | PR | 1, 2 |
41
- | `app-build.yml` | PR / manual | 2 only |
42
- | `deploy.yml` | Manual dispatch (per environment) | 1, 2 |
43
- | `upgrade.yml` | Nightly cron | 1, 2 |
44
-
45
- ## Options Schema (draft)
46
-
47
- ```typescript
48
- interface CdkInfraProjectOptions extends CommonCdkOptions {
49
- environments: string[]; // e.g. ["dev", "stage", "prod"]
50
- ecrEcs?: {
51
- enabled?: boolean;
52
- externalImageSource?: boolean; // default true for infra-only
53
- };
54
- edgeResources?: ("cloudfront" | "route53" | "apigateway" | "cognito" | "sqs")[];
55
- }
56
-
57
- interface CdkAppProjectOptions extends CdkInfraProjectOptions {
58
- database?: {
59
- engine?: "postgres" | "mysql" | "dynamodb";
60
- migrationTool?: string;
61
- };
62
- appEntryPoint?: string; // default handler entry
63
- }
64
-
65
- interface CommonCdkOptions {
66
- name: string;
67
- cdkVersion?: string;
68
- gheTokenSecret?: string; // default: PROJEN_GITHUB_TOKEN
69
- }
70
- ```
71
-
72
- ## Open Questions
73
- - For `CdkAppProject`, is there a single preferred DB engine/migration tool to default to, or should this stay fully pluggable per team?
74
- - Should `environments` be a fixed convention (dev/stage/prod) baked into the deploy workflow, or arbitrary per project?
75
- - Does `EcrEcsConstructs` need to support Fargate and EC2 launch types, or is one sufficient for v1?
76
- - Any need to share constructs between `projen-cdk` and `projen-java`'s `CdkDeployHook` (type 2 in the Java spec), e.g. a common "trigger downstream CDK deploy" contract?
77
-
78
- ## Out of Scope (v1)
79
- - Non-API-Gateway compute patterns (e.g., ALB-fronted apps) — revisit if a real use case appears.
80
- - Automatic production deploys — all deploys remain manual-dispatch per current practice.
@@ -1,96 +0,0 @@
1
- # projen-java — Project Spec
2
-
3
- ## Overview
4
-
5
- `projen-java` is a projen project-type package (`@cai-projen/projen-java`, following the existing `@cai-projen/projen-general` naming convention) that provides scaffolding for CoxAuto's three Maven-based Java project types. All three share a Maven build skeleton, PR-time build/verify checks, and SonarQube integration; they differ only in publish target and a small set of optional add-ons.
6
-
7
- Modeled on the existing `projen-general` pattern (one package, multiple exported project types), rather than one repo per type.
8
-
9
- ## Project Types
10
-
11
- ### 1. `JavaLibraryProject`
12
- - **Purpose:** Reusable Java libraries.
13
- - **Publish target:** Maven Central.
14
- - **Requires:** Maven Central credentials/signing secrets (org or repo level), GPG signing config.
15
- - **Extras:** Code-index generation workflow, publishing the index to the `.cai` directory.
16
-
17
- ### 2. `JavaServiceProject`
18
- - **Purpose:** Springboot service applications.
19
- - **Publish target:** Docker Hub (image build/push). Never published to Maven Central.
20
- - **Common bundled add-ons (opt-in, on by default):**
21
- - Flyway for DB migrations.
22
- - CDK deployment hook — a manual-dispatch GitHub Action that triggers/coordinates deployment (assumes a companion `CdkInfraProject`/`CdkAppProject` repo owns the actual infra).
23
- - **Publish + deploy are both manual-dispatch actions, not on every merge to main.**
24
-
25
- ### 3. `JavaAppProject`
26
- - **Purpose:** GUI/TUI/CLI Java applications.
27
- - **Publish target:** GitHub Packages.
28
- - **Explicitly excludes:** Maven Central, Docker, CDK deploy hooks.
29
-
30
- ## Shared Components
31
-
32
- These are implemented once as shared projen components/mixins and composed into each type:
33
-
34
- | Component | Description | Used by |
35
- |---|---|---|
36
- | `MavenBuildComponent` | Base Maven project structure, `pom.xml` management, standard directory layout | 1, 2, 5 |
37
- | `BuildVerifyWorkflow` | PR-triggered build + test + SonarQube scan. Also runs `npx projen` and `git diff --exit-code` against generated files (`pom.xml`, `.github/workflows/*.yml`) to fail the PR if a hand edit drifted from the projen-managed output | 1, 2, 5 |
38
- | `CodeIndexWorkflow` | Generates a code index, publishes to `.cai/` | 1 (default on), optional for others |
39
- | `MavenCentralPublish` | On-demand publish workflow w/ signing + Central credentials | 1 only |
40
- | `DockerPublish` | Build image, push to Docker Hub, on-demand | 2 only |
41
- | `GitHubPackagesPublish` | On-demand publish to GH Packages | 5 only |
42
- | `FlywayMigration` | Adds Flyway config/dependencies + migration directory | 2 (opt-in, default true) |
43
- | `CdkDeployHook` | Manual-dispatch workflow that invokes a downstream CDK deploy | 2 (opt-in, default true) |
44
-
45
- ## Workflows Summary
46
-
47
- | Workflow | Trigger | Applies to |
48
- |---|---|---|
49
- | `build.yml` | PR / manual | All three |
50
- | `sonar.yml` (or folded into build) | PR / on checkin | All three |
51
- | `codeindex.yml` | On checkin (or on-demand) | 1 (opt-in for others) |
52
- | `publish-maven-central.yml` | Manual dispatch | 1 |
53
- | `publish-docker.yml` | Manual dispatch | 2 |
54
- | `publish-ghpackages.yml` | Manual dispatch | 5 |
55
- | `deploy-cdk.yml` | Manual dispatch | 2 (opt-in) |
56
- | `upgrade.yml` | Nightly cron | All three (dependency upgrades) |
57
-
58
- ## Options Schema (draft)
59
-
60
- ```typescript
61
- interface JavaLibraryProjectOptions extends CommonJavaOptions {
62
- mavenCentralOidc?: boolean; // vs. secret-based signing
63
- publishCodeIndex?: boolean; // default: true
64
- }
65
-
66
- interface JavaServiceProjectOptions extends CommonJavaOptions {
67
- dockerRegistry?: string; // default: Docker Hub
68
- useFlyway?: boolean; // default: true
69
- cdkDeployHook?: {
70
- enabled?: boolean; // default: true
71
- targetRepo?: string; // companion CDK infra/app repo
72
- };
73
- }
74
-
75
- interface JavaAppProjectOptions extends CommonJavaOptions {
76
- ghPackagesRegistry?: string;
77
- }
78
-
79
- interface CommonJavaOptions {
80
- name: string;
81
- groupId: string;
82
- artifactId: string;
83
- sonarProjectKey?: string;
84
- gheTokenSecret?: string; // default: PROJEN_GITHUB_TOKEN
85
- }
86
- ```
87
-
88
- ## Out of Scope (v1)
89
- - Non-Maven Java build tools (Gradle).
90
- - Automatic (non-manual) production deploys for type 2.
91
- - Multi-module Maven project support (evaluate based on early adoption).
92
-
93
- ## Open Questions
94
- - Should `CdkDeployHook` in type 2 assume a specific companion repo naming convention, or take an arbitrary target?
95
- - Does the code-index format/consumer for `.cai` need to be standardized before generalizing beyond type 1?
96
- - Org-level vs. repo-level secrets for Maven Central signing — confirm current practice before hardcoding assumptions.