@xpertss/projen-types 0.0.2 → 0.0.4

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 (37) hide show
  1. package/.jsii +118 -103
  2. package/API.md +101 -61
  3. package/README.md +35 -13
  4. package/lib/actions/action-build-workflow.js +1 -1
  5. package/lib/actions/action-dogfood-workflow.d.ts +5 -1
  6. package/lib/actions/action-dogfood-workflow.js +49 -19
  7. package/lib/actions/action-sonar-workflow.js +1 -1
  8. package/lib/actions/github-action-project.d.ts +15 -6
  9. package/lib/actions/github-action-project.js +16 -24
  10. package/lib/cdk/app-runtime-scaffold.js +1 -1
  11. package/lib/cdk/cdk-app-project.js +1 -1
  12. package/lib/cdk/cdk-infra-project.js +1 -1
  13. package/lib/cdk/cdk-typescript-base.js +38 -2
  14. package/lib/cdk/components/ecr-ecs-constructs.js +1 -1
  15. package/lib/cdk/components/edge-networking-constructs.js +1 -1
  16. package/lib/cdk/database-component.js +1 -1
  17. package/lib/cdk/options.d.ts +14 -2
  18. package/lib/cdk/options.js +1 -1
  19. package/lib/common/actions-allowlist-guard.js +1 -1
  20. package/lib/common/projen-drift-check-workflow.js +7 -3
  21. package/lib/common/projenrc-ts.d.ts +22 -0
  22. package/lib/common/projenrc-ts.js +43 -0
  23. package/lib/common/workflow-change-notice-workflow.js +1 -1
  24. package/lib/java/components/cdk-deploy-hook.d.ts +7 -0
  25. package/lib/java/components/cdk-deploy-hook.js +26 -5
  26. package/lib/java/components/code-index-workflow.js +1 -1
  27. package/lib/java/components/docker-publish.js +1 -1
  28. package/lib/java/components/flyway-migration.js +1 -1
  29. package/lib/java/components/github-packages-publish.js +1 -1
  30. package/lib/java/components/maven-central-publish.js +1 -1
  31. package/lib/java/java-app-project.js +1 -1
  32. package/lib/java/java-library-project.js +1 -1
  33. package/lib/java/java-maven-base.js +21 -2
  34. package/lib/java/java-service-project.js +6 -5
  35. package/lib/java/options.d.ts +27 -5
  36. package/lib/java/options.js +1 -1
  37. package/package.json +2 -2
package/.jsii CHANGED
@@ -106,7 +106,7 @@
106
106
  },
107
107
  "name": "@xpertss/projen-types",
108
108
  "readme": {
109
- "markdown": "# @xpertss/projen-types\n\nProjen project types for CDK/TypeScript and Java/Maven projects.\n\nInstead of hand-maintaining `pom.xml`, `cdk.json`, and GitHub workflows, you declare a project type in a `.projenrc.ts` file and let [projen](https://github.com/projen/projen) generate (and keep up to date) the whole scaffold: build files, source skeletons, CI workflows, and deploy pipelines.\n\n## Project types at a glance\n\n| Type | What it is | Publishes to | Generated workflows |\n| --- | --- | --- | --- |\n| `CdkInfraProject` | Pure-infrastructure CDK stacks (CloudFront, Route53, SQS, API Gateway, Cognito, ECR/ECS for externally-built images) | - | `build` (PR checks), `deploy` (manual dispatch) |\n| `CdkAppProject` | Full TypeScript service behind API Gateway: infra + app source + database | - | `build`, `deploy`, `app-build` (PR checks) |\n| `JavaLibraryProject` | Reusable Java library | Maven Central | `build`, `upgrade` (nightly), `publish-maven-central`, `codeindex` |\n| `JavaServiceProject` | Spring Boot service | Docker Hub | `build`, `upgrade` (nightly), `publish-docker`, `deploy-cdk` |\n| `JavaAppProject` | GUI/TUI/CLI Java application | GitHub Packages | `build`, `upgrade` (nightly), `publish-ghpackages` |\n| `GitHubActionProject` | Reusable GitHub Action or Workflow | GitHub Releases | `build`, `test-dogfood`, `sonar`, `release` |\n\nTwo foundation classes are also exported for advanced use: `CdkTypescriptProject` (shared CDK + TypeScript base for the CDK types) and `JavaMavenProject` (shared Maven base for the Java types).\n\nAll project types:\n\n- run a **drift check** in PR builds - a job that re-runs projen and fails if generated files were hand-edited. Edit `.projenrc.ts`, then run `npx projen`; never edit generated files directly.\n- use the GitHub secret `PROJEN_GITHUB_TOKEN` (a fine-grained PAT) for projen's automation. Override with `gheTokenSecret`.\n- make all publishing/deploying **manual** (workflow_dispatch) rather than on every merge.\n\n## Getting started\n\nCreate a new git repository and install the dependencies:\n\n```bash\nmkdir my-project && cd my-project\ngit init\nnpm install -D projen constructs @xpertss/projen-types\n```\n\nWrite a `.projenrc.ts` (see examples below), then generate the project:\n\n```bash\nnpx projen\n```\n\nCommit the result. From then on, every change to the scaffold goes through `.projenrc.ts` followed by `npx projen`.\n\nThe `name` option must match the `name` field in the project's `package.json` (for the CDK types) or the project name used by projen's `java.JavaProject` (for the Java types).\n\n## Examples\n\n### CdkInfraProject\n\nPure infrastructure stacks with optional ECR/ECS and edge-networking constructs.\n\n```typescript\n// .projenrc.ts\nimport { CdkInfraProject } from '@xpertss/projen-types';\n\nconst project = new CdkInfraProject({\n name: 'media-edge-infra',\n environments: [\n 'dev',\n { name: 'stage', accountId: '111111111111', region: 'eu-central-1' },\n { name: 'prod', accountId: '222222222222', region: 'eu-central-1', requiresApproval: true },\n ],\n edgeResources: ['cloudfront', 'route53', 'sqs'],\n ecrEcs: { enabled: true, externalImageSource: true },\n slackWebhookSecret: 'SLACK_DEPLOY_WEBHOOK',\n});\n\nproject.synth();\n```\n\nYou get:\n\n- `cdk.json`, `cdk synth` / `cdk diff` / `cdk deploy` tasks, and the standard `AwsCdkTypeScriptApp` layout (CDK 2.189.1 by default).\n- `.github/workflows/build.yml` - PR build that hard-fails on projen drift.\n- `.github/workflows/deploy.yml` - manual dispatch with one `deploy-<env>` job per environment (runs `cdk deploy --all` with `--context environment=<env>`); `requiresApproval` environments get a GitHub Environment approval gate; a Slack notification step is added when `slackWebhookSecret` is set.\n- `src/constructs/edge-networking.ts` - helper constructs only for the requested `edgeResources` (`cloudfront`, `route53`, `apigateway`, `cognito`, `sqs`).\n- `src/constructs/ecr-ecs.ts` when `ecrEcs.enabled` - ECR repo + Fargate service; `externalImageSource: true` (default) means the service pulls an image built outside this repo.\n\n### CdkAppProject\n\n`CdkInfraProject` plus application source, a database construct, and an app-level build workflow.\n\n```typescript\n// .projenrc.ts\nimport { CdkAppProject } from '@xpertss/projen-types';\n\nconst project = new CdkAppProject({\n name: 'video-api',\n environments: ['dev', 'prod'],\n edgeResources: ['apigateway'],\n database: { engine: 'postgres', migrationTool: 'flyway' },\n appEntryPoint: 'src/app.ts',\n});\n\nproject.synth();\n```\n\nEverything from `CdkInfraProject`, plus:\n\n- `src/app.ts` - application entrypoint stub (`export function handler()`).\n- `src/handlers/example.ts` - API Gateway proxy handler stub, with `@types/aws-lambda` added as a dev dependency.\n- `src/constructs/database.ts` - a `Database` construct stub for the chosen engine (`postgres`/`mysql` -> RDS, `dynamodb` -> DynamoDB). `migrationTool` (no default, intentionally) is added as a dev dependency and referenced in the stub - wiring it up is left to you.\n- `.github/workflows/app-build.yml` - runs the project's test task on every PR, then checks for projen drift.\n\n### JavaLibraryProject\n\nA reusable Java library published to Maven Central.\n\n```typescript\n// .projenrc.ts\nimport { JavaLibraryProject } from '@xpertss/projen-types';\n\nconst project = new JavaLibraryProject({\n name: 'common-utils',\n groupId: 'org.xpertss',\n artifactId: 'common-utils',\n version: '1.0.0',\n sonarProjectKey: 'org.xpertss:common-utils',\n mavenCentralOidc: true,\n});\n\nproject.synth();\n```\n\nYou get:\n\n- `pom.xml` (via projen's `java.JavaProject`) with the given GAV coordinates.\n- `.github/workflows/build.yml` - PR build + projen drift check, plus a SonarQube scan step when `sonarProjectKey` is set (needs a `SONAR_TOKEN` secret).\n- `.github/workflows/upgrade.yml` - nightly (03:00 UTC) PR running `mvn versions:use-latest-releases versions:update-properties`.\n- `.github/workflows/publish-maven-central.yml` - manual dispatch running `mvn -B deploy -P release`. With `mavenCentralOidc: true` it uses Maven Central's OIDC trusted publishing (no GPG secrets needed); otherwise it expects the secrets `MAVEN_GPG_PRIVATE_KEY`, `MAVEN_GPG_PASSPHRASE`, `MAVEN_CENTRAL_USERNAME`, `MAVEN_CENTRAL_PASSWORD`.\n- `.github/workflows/codeindex.yml` - on push to `main`, generates a Java source index under `.cai/` (disable with `publishCodeIndex: false`).\n\n### JavaServiceProject\n\nA Spring Boot service that publishes a Docker image and can trigger deploys in a companion CDK repo.\n\n```typescript\n// .projenrc.ts\nimport { JavaServiceProject } from '@xpertss/projen-types';\n\nconst project = new JavaServiceProject({\n name: 'stream-processor',\n groupId: 'org.xpertss',\n artifactId: 'stream-processor',\n dockerRegistry: 'docker.io/xpertss',\n cdkDeployHook: { targetRepo: 'xpertss/stream-infra' },\n environments: ['dev', { name: 'prod', requiresApproval: true }],\n});\n\nproject.synth();\n```\n\nYou get (everything from `JavaMavenProject` - `pom.xml`, `build` + drift check, nightly `upgrade` - plus):\n\n- `spring-boot-starter-web` added to the pom.\n- `.github/workflows/publish-docker.yml` - manual dispatch: `mvn -B package && docker build -t <registry>/<name>:<sha>`, logged in with the `DOCKER_USERNAME` / `DOCKER_PASSWORD` secrets. `dockerRegistry` defaults to `docker.io`.\n- Flyway wiring when `useFlyway` (default `true`): `flyway-maven-plugin` ^10 + `flyway-core` ^10 in the pom, and `src/main/resources/db/migration/V1__init.sql`.\n- `.github/workflows/deploy-cdk.yml` (the `CdkDeployHook`, enabled by default) - manual dispatch with an environment selector; each job sends a `workflow_dispatch` to `deploy.yml` in the companion `targetRepo` (a `CdkInfraProject`/`CdkAppProject` repo). `targetRepo` is required when the hook is enabled; disable it with `cdkDeployHook: { enabled: false }`. `environments` defaults to `['prod']`.\n\n### JavaAppProject\n\nA GUI/TUI/CLI Java application published to GitHub Packages only - no Maven Central, no Docker, no CDK deploy hook.\n\n```typescript\n// .projenrc.ts\nimport { JavaAppProject } from '@xpertss/projen-types';\n\nconst project = new JavaAppProject({\n name: 'studio-cli',\n groupId: 'org.xpertss',\n artifactId: 'studio-cli',\n ghPackagesRegistry: 'https://maven.pkg.github.com/xpertss/studio-cli',\n});\n\nproject.synth();\n```\n\nYou get everything from `JavaMavenProject`, plus `.github/workflows/publish-ghpackages.yml` - manual dispatch running `mvn -B deploy -DaltDeploymentRepository=github::<registry>`, authenticated with `GITHUB_TOKEN`. `ghPackagesRegistry` defaults to `https://maven.pkg.github.com/<repo>` derived from the repository URL.\n\n### GitHubActionProject\n\nA reusable GitHub Action or Workflow. This example scaffolds an action that stages a folder and, only if it changed, commits and pushes it.\n\n```typescript\n// .projenrc.ts\nimport { GitHubActionProject } from '@xpertss/projen-types';\n\nconst project = new GitHubActionProject({\n name: 'auto-commit',\n description: 'Stage a folder and, only if it changed, commit and push it',\n sonarHostUrl: 'https://sonar.xpertss.org', // required, no default - your self-hosted SonarQube\n dogfood: {\n // Two scenario steps: the \"changed\" path and the \"no-op\" path are both\n // load-bearing behavior for this action (a double-commit or a\n // push-when-empty bug is the failure mode a hand-rolled inline-shell\n // alternative is most likely to introduce).\n scenario: [\n {\n name: 'Changed path',\n fixtureSteps: [\n 'echo \"$(date -u +%Y%m%dT%H%M%SZ)\" >> test/fixtures/dogfood-state.txt',\n ],\n inputs: {\n commit_message: 'test: dogfood',\n branches: 'test/dogfood',\n },\n assertions: [\n // step id defaults to a slug of `name` - here \"changed-path-0\"\n '[ \"${{ steps.changed-path-0.outputs.committed }}\" = \"true\" ]',\n ],\n },\n {\n // No fixture change this time - nothing new to commit.\n name: 'No-op path',\n id: 'no-op-check', // pin an explicit id instead of relying on the default slug\n inputs: {\n commit_message: 'test: dogfood',\n branches: 'test/dogfood',\n },\n assertions: [\n '[ \"${{ steps.no-op-check.outputs.committed }}\" = \"false\" ]',\n ],\n },\n ],\n cleanup: [\n 'git push origin --delete test/dogfood || true',\n ],\n },\n});\n\nproject.synth();\n```\n\nYou get:\n\n- `action.yml` and `auto-commit.sh` are hand-written - this type only lints their content via `build.yml`'s shellcheck/yamllint/actionlint checks.\n- `.github/workflows/build.yml` - lint gate: `apt`-installed shellcheck/yamllint plus a pinned, SHA-256-verified `actionlint` release binary. Gates `main` alongside `sonar.yml`.\n- `.github/workflows/test-dogfood.yml` - runs the `dogfood.scenario` steps above against this repo's own `action.yml` (via `uses: .`), then the shared `cleanup`, on `workflow_dispatch`, every `pull_request`, and nightly.\n- `.github/workflows/sonar.yml` - self-hosted SonarQube via the Scanner CLI, scanning `action.yml`/`.github/workflows/**`/`**/*.sh` explicitly.\n- `.github/workflows/release.yml` - `feat:`/`fix:` commits on `main` bump the version, tag `vX.Y.Z`, and create a GitHub Release.\n- `.github/workflows/projen-drift-check.yml`, `workflow-change-notice.yml`, `actions-allowlist-guard.yml` - drift detection, a change notice, and an action allow-list guard, always included.\n- `package.json` (**private**, version source only), `tsconfig.json`, `.yamllint`, `LICENSE` (MIT by default), and a `README.md` template - all regenerated by `npx projen`.\n\nNeeds the same two secrets as everything else in this package: `PROJEN_GITHUB_TOKEN` (used for automated PR comments) and `SONAR_TOKEN` (the Sonar scan). Onboarding a brand-new action repo from scratch: `npm init -y && npm install -D projen constructs @xpertss/projen-types`, write the `.projenrc.ts` above, `npx projen && npm install`, then hand-write `action.yml`/`auto-commit.sh`/`test/fixtures/`.\n\n## Common options\n\nCDK project types (`CdkInfraProjectOptions` / `CdkAppProjectOptions`):\n\n| Option | Default | Description |\n| --- | --- | --- |\n| `name` | - (required) | Project name; must match `package.json` |\n| `cdkVersion` | `2.189.1` | AWS CDK version |\n| `gheTokenSecret` | `PROJEN_GITHUB_TOKEN` | GitHub secret holding projen's PAT |\n| `slackWebhookSecret` | - | GitHub secret with a Slack webhook URL for deploy notifications |\n| `environments` | - (required) | Deploy targets for the `deploy` workflow; strings or `EnvironmentOptions` |\n| `ecrEcs` | - | `EcrEcsOptions` - `enabled`, `externalImageSource` (default `true`) |\n| `edgeResources` | - | Subset of `cloudfront`, `route53`, `apigateway`, `cognito`, `sqs` |\n| `database` | - (app only) | `DatabaseOptions` - `engine` (`postgres`/`mysql`/`dynamodb`, default `postgres`), `migrationTool` |\n| `appEntryPoint` | `src/app.ts` (app only) | Path of the generated application entrypoint |\n\nJava project types (`JavaLibraryProjectOptions` / `JavaServiceProjectOptions` / `JavaAppProjectOptions`):\n\n| Option | Default | Description |\n| --- | --- | --- |\n| `name` | - (required) | Project name |\n| `groupId` | - (required) | Maven group id |\n| `artifactId` | - (required) | Maven artifact id |\n| `version` | `0.1.0` | Maven version |\n| `sonarProjectKey` | - | SonarQube project key; the sonar step is skipped when unset |\n| `gheTokenSecret` | `PROJEN_GITHUB_TOKEN` | GitHub secret holding projen's PAT |\n\n`EnvironmentOptions` for deploy targets:\n\n```typescript\ninterface EnvironmentOptions {\n readonly name: string; // e.g. \"dev\", \"stage\", \"prod\"\n readonly accountId?: string; // AWS account id (CDK deploys)\n readonly region?: string; // AWS region (CDK deploys)\n readonly requiresApproval?: boolean; // GitHub Environment approval gate (default false)\n}\n```\n\nPlain strings (`'dev'`) are shorthand for `{ name: 'dev' }`.\n\n`GitHubActionProjectOptions`:\n\n| Option | Default | Description |\n| --- | --- | --- |\n| `name` | - (required) | Project name |\n| `description` | - | One-line description; used in the default README template and recorded in the private `package.json` |\n| `sonarHostUrl` | - (required) | URL of your self-hosted SonarQube instance; must be reachable from github.com-hosted runners |\n| `sonarTokenSecret` | `SONAR_TOKEN` | GitHub secret holding the Sonar token |\n| `sonarPullRequestGate` | `true` | Whether `sonar.yml` also runs on `pull_request` as a pass/fail gate |\n| `dogfood` | - (required) | `ActionDogfoodOptions` - the scenario that exercises the action end-to-end via `uses: .` |\n| `license` | `MIT` | SPDX identifier for the generated `LICENSE` |\n| `gheTokenSecret` | `PROJEN_GITHUB_TOKEN` | GitHub secret holding projen's PAT |\n\n`ActionDogfoodOptions`/`ActionDogfoodStep` - the dogfood scenario (`test-dogfood.yml`):\n\n```typescript\ninterface ActionDogfoodOptions {\n readonly scenario: ActionDogfoodStep[]; // one or more, run in order - required\n readonly cleanup: string[]; // shared, run once at the end with `if: always()` - required\n}\n\ninterface ActionDogfoodStep {\n readonly name: string; // labels this step-group's generated workflow steps\n readonly id?: string; // step id for the `uses: .` call; default: a slug of `name`\n readonly fixtureSteps?: string[]; // shell, before the invocation (default: none)\n readonly inputs?: Record<string, string>; // `with:` for this invocation (default: none)\n readonly assertions: string[]; // shell, after the invocation - required, job fails unless all exit 0\n}\n```\n\nMost actions need exactly one `scenario` step. Actions with a re-run/no-op/idempotency behavior to verify (e.g. `auto-commit`'s no-op-on-no-change path, `create-pull-request`'s reuse-the-PR path) declare two - the second typically omits `fixtureSteps` so its invocation sees no new state, and its assertion checks the opposite outcome of the first. Reference an invocation's own outputs from a later assertion via `${{ steps.<id>.outputs.<name> }}`, using either the default slug or an explicit `id`.\n\n## Required GitHub secrets\n\n| Secret | Used by | Notes |\n| --- | --- | --- |\n| `PROJEN_GITHUB_TOKEN` | all types | PAT for projen's self-mutation/automation; override via `gheTokenSecret` |\n| `SONAR_TOKEN` | Java types with `sonarProjectKey`; `GitHubActionProject` | SonarQube scan step in `build.yml` / `sonar.yml`; override via `sonarTokenSecret` on `GitHubActionProject` |\n| `DOCKER_USERNAME` / `DOCKER_PASSWORD` | `JavaServiceProject` | Docker image push |\n| `MAVEN_GPG_PRIVATE_KEY`, `MAVEN_GPG_PASSPHRASE`, `MAVEN_CENTRAL_USERNAME`, `MAVEN_CENTRAL_PASSWORD` | `JavaLibraryProject` without `mavenCentralOidc` | Not needed with OIDC trusted publishing |\n| (your Slack webhook secret) | CDK types with `slackWebhookSecret` | Deploy notifications |\n\n## Going further\n\nThe project types are composed from smaller components you can also attach to your own projects:\n\n| Component | Applies to | Purpose |\n| --- | --- | --- |\n| `AppRuntimeScaffold` | `NodeProject` | App source skeleton (`app.ts` + handlers) |\n| `DatabaseComponent` | `NodeProject` | Database construct stub + migration tool wiring |\n| `EcrEcsConstructs` | `Project` | ECR + Fargate ECS construct helper |\n| `EdgeNetworkingConstructs` | `Project` | Per-resource edge networking construct helpers |\n| `MavenCentralPublish` | `JavaProject` | Manual-dispatch Maven Central publish workflow |\n| `DockerPublish` | `JavaProject` | Manual-dispatch Docker build+push workflow |\n| `GitHubPackagesPublish` | `JavaProject` | Manual-dispatch GitHub Packages publish workflow |\n| `FlywayMigration` | `JavaProject` | Flyway plugin/dependency + migrations directory |\n| `CdkDeployHook` | `JavaProject` | Manual-dispatch workflow that triggers `deploy.yml` in a companion CDK repo |\n| `CodeIndexWorkflow` | `JavaProject` | Code index generation on push to `main` |\n| `ActionBuildWorkflow` | `GitHubProject` | The `lint` task (shellcheck/yamllint/pinned actionlint) + `build.yml` |\n| `ActionDogfoodWorkflow` | `GitHubProject` | `test-dogfood.yml` from an `ActionDogfoodOptions` scenario |\n| `ActionSonarWorkflow` | `GitHubProject` | `sonar.yml` (self-hosted SonarQube via the Scanner CLI) |\n\nExample - adding a Docker publish to a plain projen `JavaProject`:\n\n```typescript\nimport { java } from 'projen';\nimport { DockerPublish } from '@xpertss/projen-types';\n\nconst project = new java.JavaProject({\n name: 'my-service',\n groupId: 'org.xpertss',\n artifactId: 'my-service',\n});\n\nnew DockerPublish(project, { dockerRegistry: 'ghcr.io' });\n\nproject.synth();\n```\n\nThe full API reference, including every option and property, is in [API.md](./API.md).\n"
109
+ "markdown": "# @xpertss/projen-types\n\nProjen project types for CDK/TypeScript and Java/Maven projects.\n\nInstead of hand-maintaining `pom.xml`, `cdk.json`, and GitHub workflows, you declare a project type in a `.projenrc.ts` file and let [projen](https://github.com/projen/projen) generate (and keep up to date) the whole scaffold: build files, source skeletons, CI workflows, and deploy pipelines.\n\n## Project types at a glance\n\n| Type | What it is | Publishes to | Generated workflows |\n| --- | --- | --- | --- |\n| `CdkInfraProject` | Pure-infrastructure CDK stacks (CloudFront, Route53, SQS, API Gateway, Cognito, ECR/ECS for externally-built images) | - | `build` (PR checks), `deploy` (manual dispatch) |\n| `CdkAppProject` | Full TypeScript service behind API Gateway: infra + app source + database | - | `build`, `deploy`, `app-build` (PR checks) |\n| `JavaLibraryProject` | Reusable Java library | Maven Central | `build`, `upgrade` (nightly), `publish-maven-central`, `codeindex` |\n| `JavaServiceProject` | Spring Boot service | Docker Hub | `build`, `upgrade` (nightly), `publish-docker`, `deploy-cdk` |\n| `JavaAppProject` | GUI/TUI/CLI Java application | GitHub Packages | `build`, `upgrade` (nightly), `publish-ghpackages` |\n| `GitHubActionProject` | Reusable GitHub Action or Workflow | GitHub Releases | `build`, `test-dogfood`, `sonar`, `release` |\n\nTwo foundation classes are also exported for advanced use: `CdkTypescriptProject` (shared CDK + TypeScript base for the CDK types) and `JavaMavenProject` (shared Maven base for the Java types).\n\nAll project types:\n\n- run a **drift check** in PR builds - a job that re-runs projen and fails if generated files were hand-edited. Edit `.projenrc.ts`, then run `npx projen`; never edit generated files directly.\n- use the GitHub secret `PROJEN_GITHUB_TOKEN` (a fine-grained PAT) for projen's automation. Override with `gheTokenSecret`.\n- make all publishing/deploying **manual** (workflow_dispatch) rather than on every merge.\n\n## Getting started\n\nScaffold the repo with projen's own bootstrap, pointed at this package:\n\n```bash\nmkdir my-project && cd my-project\ngit init\nnpx projen new --from @xpertss/projen-types cdk_infra --name my-project\n```\n\nThat writes a starter `.projenrc.ts`, synthesizes the whole scaffold and\ninstalls dependencies. The type names `projen new` accepts are `cdk_infra`,\n`cdk_app`, `java_library`, `java_service`, `java_app` and\n`git_hub_action`; pass a bogus one to have it list them. Required options\nbecome flags: `--name` for every type, plus `--group-id`/`--artifact-id`\n(Java) and `--sonar-host-url` (`git_hub_action`). Any other plainly-typed\noption can be passed the same way - `--cdk-deploy-target-repo owner/repo`,\n`--docker-registry ghcr.io`, `--no-use-flyway`, and so on.\n\nCommit the result. From then on, every change to the scaffold goes through\n`.projenrc.ts` followed by `npx projen`:\n\n```bash\nnpx projen\n```\n\nEvery type scaffolds from that one command; no option is *required* that\n`projen new` cannot pass. The structured options - `environments` and\n`GitHubActionProject`'s `dogfood` - are ones projen's CLI cannot render\ninto a projenrc, so they are added afterwards by editing `.projenrc.ts` and\nre-running `npx projen`. Leaving `environments` out simply generates no\ndeploy workflow; leaving `dogfood` out (or a service's\n`cdkDeployTargetRepo`) still generates the workflow, with one step that\nfails and tells you what to add - a gate this package considers load-bearing\nis allowed to be missing loudly, never silently.\n\nThe `name` option must match the `name` field in the project's `package.json` (for the CDK types) or the project name used by projen's `java.JavaProject` (for the Java types).\n\n## Examples\n\n### CdkInfraProject\n\nPure infrastructure stacks with optional ECR/ECS and edge-networking constructs.\n\n```typescript\n// .projenrc.ts\nimport { CdkInfraProject } from '@xpertss/projen-types';\n\nconst project = new CdkInfraProject({\n name: 'media-edge-infra',\n environments: [\n 'dev',\n { name: 'stage', accountId: '111111111111', region: 'eu-central-1' },\n { name: 'prod', accountId: '222222222222', region: 'eu-central-1', requiresApproval: true },\n ],\n edgeResources: ['cloudfront', 'route53', 'sqs'],\n ecrEcs: { enabled: true, externalImageSource: true },\n slackWebhookSecret: 'SLACK_DEPLOY_WEBHOOK',\n});\n\nproject.synth();\n```\n\nYou get:\n\n- `cdk.json`, `cdk synth` / `cdk diff` / `cdk deploy` tasks, and the standard `AwsCdkTypeScriptApp` layout (CDK 2.189.1 by default).\n- `.github/workflows/build.yml` - PR build that hard-fails on projen drift.\n- `.github/workflows/deploy.yml` - manual dispatch with one `deploy-<env>` job per environment (runs `cdk deploy --all` with `--context environment=<env>`); `requiresApproval` environments get a GitHub Environment approval gate; a Slack notification step is added when `slackWebhookSecret` is set.\n- `src/constructs/edge-networking.ts` - helper constructs only for the requested `edgeResources` (`cloudfront`, `route53`, `apigateway`, `cognito`, `sqs`).\n- `src/constructs/ecr-ecs.ts` when `ecrEcs.enabled` - ECR repo + Fargate service; `externalImageSource: true` (default) means the service pulls an image built outside this repo.\n\n### CdkAppProject\n\n`CdkInfraProject` plus application source, a database construct, and an app-level build workflow.\n\n```typescript\n// .projenrc.ts\nimport { CdkAppProject } from '@xpertss/projen-types';\n\nconst project = new CdkAppProject({\n name: 'video-api',\n environments: ['dev', 'prod'],\n edgeResources: ['apigateway'],\n database: { engine: 'postgres', migrationTool: 'flyway' },\n appEntryPoint: 'src/app.ts',\n});\n\nproject.synth();\n```\n\nEverything from `CdkInfraProject`, plus:\n\n- `src/app.ts` - application entrypoint stub (`export function handler()`).\n- `src/handlers/example.ts` - API Gateway proxy handler stub, with `@types/aws-lambda` added as a dev dependency.\n- `src/constructs/database.ts` - a `Database` construct stub for the chosen engine (`postgres`/`mysql` -> RDS, `dynamodb` -> DynamoDB). `migrationTool` (no default, intentionally) is added as a dev dependency and referenced in the stub - wiring it up is left to you.\n- `.github/workflows/app-build.yml` - runs the project's test task on every PR, then checks for projen drift.\n\n### JavaLibraryProject\n\nA reusable Java library published to Maven Central.\n\n```typescript\n// .projenrc.ts\nimport { JavaLibraryProject } from '@xpertss/projen-types';\n\nconst project = new JavaLibraryProject({\n name: 'common-utils',\n groupId: 'org.xpertss',\n artifactId: 'common-utils',\n version: '1.0.0',\n sonarProjectKey: 'org.xpertss:common-utils',\n mavenCentralOidc: true,\n});\n\nproject.synth();\n```\n\nYou get:\n\n- `pom.xml` (via projen's `java.JavaProject`) with the given GAV coordinates.\n- `.github/workflows/build.yml` - PR build + projen drift check, plus a SonarQube scan step when `sonarProjectKey` is set (needs a `SONAR_TOKEN` secret).\n- `.github/workflows/upgrade.yml` - nightly (03:00 UTC) PR running `mvn versions:use-latest-releases versions:update-properties`.\n- `.github/workflows/publish-maven-central.yml` - manual dispatch running `mvn -B deploy -P release`. With `mavenCentralOidc: true` it uses Maven Central's OIDC trusted publishing (no GPG secrets needed); otherwise it expects the secrets `MAVEN_GPG_PRIVATE_KEY`, `MAVEN_GPG_PASSPHRASE`, `MAVEN_CENTRAL_USERNAME`, `MAVEN_CENTRAL_PASSWORD`.\n- `.github/workflows/codeindex.yml` - on push to `main`, generates a Java source index under `.cai/` (disable with `publishCodeIndex: false`).\n\n### JavaServiceProject\n\nA Spring Boot service that publishes a Docker image and can trigger deploys in a companion CDK repo.\n\n```typescript\n// .projenrc.ts\nimport { JavaServiceProject } from '@xpertss/projen-types';\n\nconst project = new JavaServiceProject({\n name: 'stream-processor',\n groupId: 'org.xpertss',\n artifactId: 'stream-processor',\n dockerRegistry: 'docker.io/xpertss',\n cdkDeployTargetRepo: 'xpertss/stream-infra',\n environments: ['dev', { name: 'prod', requiresApproval: true }],\n});\n\nproject.synth();\n```\n\nYou get (everything from `JavaMavenProject` - `pom.xml`, `build` + drift check, nightly `upgrade` - plus):\n\n- `spring-boot-starter-web` added to the pom.\n- `.github/workflows/publish-docker.yml` - manual dispatch: `mvn -B package && docker build -t <registry>/<name>:<sha>`, logged in with the `DOCKER_USERNAME` / `DOCKER_PASSWORD` secrets. `dockerRegistry` defaults to `docker.io`.\n- Flyway wiring when `useFlyway` (default `true`): `flyway-maven-plugin` ^10 + `flyway-core` ^10 in the pom, and `src/main/resources/db/migration/V1__init.sql`.\n- `.github/workflows/deploy-cdk.yml` (the `CdkDeployHook`, generated by default) - manual dispatch with an environment selector; each job sends a `workflow_dispatch` to `deploy.yml` in the companion `cdkDeployTargetRepo` (a `CdkInfraProject`/`CdkAppProject` repo). With no `cdkDeployTargetRepo` set, the workflow is still generated but each job's only step fails with instructions - it is dispatch-only, so that lands on whoever tries to deploy rather than on every PR. Turn the workflow off entirely with `cdkDeployHook: false`. `environments` defaults to `['prod']`.\n\n### JavaAppProject\n\nA GUI/TUI/CLI Java application published to GitHub Packages only - no Maven Central, no Docker, no CDK deploy hook.\n\n```typescript\n// .projenrc.ts\nimport { JavaAppProject } from '@xpertss/projen-types';\n\nconst project = new JavaAppProject({\n name: 'studio-cli',\n groupId: 'org.xpertss',\n artifactId: 'studio-cli',\n ghPackagesRegistry: 'https://maven.pkg.github.com/xpertss/studio-cli',\n});\n\nproject.synth();\n```\n\nYou get everything from `JavaMavenProject`, plus `.github/workflows/publish-ghpackages.yml` - manual dispatch running `mvn -B deploy -DaltDeploymentRepository=github::<registry>`, authenticated with `GITHUB_TOKEN`. `ghPackagesRegistry` defaults to `https://maven.pkg.github.com/<repo>` derived from the repository URL.\n\n### GitHubActionProject\n\nA reusable GitHub Action or Workflow. This example scaffolds an action that stages a folder and, only if it changed, commits and pushes it.\n\n```typescript\n// .projenrc.ts\nimport { GitHubActionProject } from '@xpertss/projen-types';\n\nconst project = new GitHubActionProject({\n name: 'auto-commit',\n description: 'Stage a folder and, only if it changed, commit and push it',\n sonarHostUrl: 'https://sonar.xpertss.org', // required, no default - your self-hosted SonarQube\n dogfood: {\n // Two scenario steps: the \"changed\" path and the \"no-op\" path are both\n // load-bearing behavior for this action (a double-commit or a\n // push-when-empty bug is the failure mode a hand-rolled inline-shell\n // alternative is most likely to introduce).\n scenario: [\n {\n name: 'Changed path',\n fixtureSteps: [\n 'echo \"$(date -u +%Y%m%dT%H%M%SZ)\" >> test/fixtures/dogfood-state.txt',\n ],\n inputs: {\n commit_message: 'test: dogfood',\n branches: 'test/dogfood',\n },\n assertions: [\n // step id defaults to a slug of `name` - here \"changed-path-0\"\n '[ \"${{ steps.changed-path-0.outputs.committed }}\" = \"true\" ]',\n ],\n },\n {\n // No fixture change this time - nothing new to commit.\n name: 'No-op path',\n id: 'no-op-check', // pin an explicit id instead of relying on the default slug\n inputs: {\n commit_message: 'test: dogfood',\n branches: 'test/dogfood',\n },\n assertions: [\n '[ \"${{ steps.no-op-check.outputs.committed }}\" = \"false\" ]',\n ],\n },\n ],\n cleanup: [\n 'git push origin --delete test/dogfood || true',\n ],\n },\n});\n\nproject.synth();\n```\n\nYou get:\n\n- `action.yml` and `auto-commit.sh` are hand-written - this type only lints their content via `build.yml`'s shellcheck/yamllint/actionlint checks.\n- `.github/workflows/build.yml` - lint gate: `apt`-installed shellcheck/yamllint plus a pinned, SHA-256-verified `actionlint` release binary. Gates `main` alongside `sonar.yml`.\n- `.github/workflows/test-dogfood.yml` - runs the `dogfood.scenario` steps above against this repo's own `action.yml` (via `uses: .`), then the shared `cleanup`, on `workflow_dispatch`, every `pull_request`, and nightly. Omit `dogfood` and the workflow still exists, with one step that fails on every PR until you declare a scenario - AD-001 allows a dogfood to be missing loudly, never silently. A *partial* `dogfood` (a scenario with no cleanup) is a synth error.\n- `.github/workflows/sonar.yml` - self-hosted SonarQube via the Scanner CLI, scanning `action.yml`/`.github/workflows/**`/`**/*.sh` explicitly.\n- `.github/workflows/release.yml` - `feat:`/`fix:` commits on `main` bump the version, tag `vX.Y.Z`, and create a GitHub Release.\n- `.github/workflows/projen-drift-check.yml`, `workflow-change-notice.yml`, `actions-allowlist-guard.yml` - drift detection, a change notice, and an action allow-list guard, always included.\n- `package.json` (**private**, version source only), `.yamllint`, `LICENSE` (MIT by default), and a `README.md` template - all regenerated by `npx projen`.\n\nNeeds the same two secrets as everything else in this package: `PROJEN_GITHUB_TOKEN` (used for automated PR comments) and `SONAR_TOKEN` (the Sonar scan). Onboard a brand-new action repo following [Getting started](#getting-started), write the `.projenrc.ts` above, then hand-write `action.yml`/`auto-commit.sh`/`test/fixtures/`.\n\n## Common options\n\nCDK project types (`CdkInfraProjectOptions` / `CdkAppProjectOptions`):\n\n| Option | Default | Description |\n| --- | --- | --- |\n| `name` | - (required) | Project name; must match `package.json` |\n| `cdkVersion` | `2.189.1` | AWS CDK version |\n| `gheTokenSecret` | `PROJEN_GITHUB_TOKEN` | GitHub secret holding projen's PAT |\n| `slackWebhookSecret` | - | GitHub secret with a Slack webhook URL for deploy notifications |\n| `environments` | - (no `deploy` workflow) | Deploy targets for the `deploy` workflow; strings or `EnvironmentOptions` |\n| `ecrEcs` | - | `EcrEcsOptions` - `enabled`, `externalImageSource` (default `true`) |\n| `edgeResources` | - | Subset of `cloudfront`, `route53`, `apigateway`, `cognito`, `sqs` |\n| `database` | - (app only) | `DatabaseOptions` - `engine` (`postgres`/`mysql`/`dynamodb`, default `postgres`), `migrationTool` |\n| `appEntryPoint` | `src/app.ts` (app only) | Path of the generated application entrypoint |\n\nJava project types (`JavaLibraryProjectOptions` / `JavaServiceProjectOptions` / `JavaAppProjectOptions`):\n\n| Option | Default | Description |\n| --- | --- | --- |\n| `name` | - (required) | Project name |\n| `groupId` | - (required) | Maven group id |\n| `artifactId` | - (required) | Maven artifact id |\n| `version` | `0.1.0` | Maven version |\n| `sonarProjectKey` | - | SonarQube project key; the sonar step is skipped when unset |\n| `gheTokenSecret` | `PROJEN_GITHUB_TOKEN` | GitHub secret holding projen's PAT |\n| `cdkDeployTargetRepo` | - (service only; `deploy-cdk.yml` fails until set) | Companion CDK repo (`owner/repo`) whose `deploy.yml` the deploy hook dispatches |\n| `cdkDeployHook` | `true` (service only) | Whether to generate `deploy-cdk.yml` at all |\n| `dockerRegistry` | `docker.io` (service only) | Registry the Docker image is pushed to |\n| `useFlyway` | `true` (service only) | Flyway plugin/dependency + `V1__init.sql` |\n\n`EnvironmentOptions` for deploy targets:\n\n```text\ninterface EnvironmentOptions {\n readonly name: string; // e.g. \"dev\", \"stage\", \"prod\"\n readonly accountId?: string; // AWS account id (CDK deploys)\n readonly region?: string; // AWS region (CDK deploys)\n readonly requiresApproval?: boolean; // GitHub Environment approval gate (default false)\n}\n```\n\nPlain strings (`'dev'`) are shorthand for `{ name: 'dev' }`.\n\n`GitHubActionProjectOptions`:\n\n| Option | Default | Description |\n| --- | --- | --- |\n| `name` | - (required) | Project name |\n| `description` | - | One-line description; used in the default README template and recorded in the private `package.json` |\n| `sonarHostUrl` | - (required) | URL of your self-hosted SonarQube instance; must be reachable from github.com-hosted runners |\n| `sonarTokenSecret` | `SONAR_TOKEN` | GitHub secret holding the Sonar token |\n| `sonarPullRequestGate` | `true` | Whether `sonar.yml` also runs on `pull_request` as a pass/fail gate |\n| `dogfood` | - (a `test-dogfood.yml` that fails until you declare one) | `ActionDogfoodOptions` - the scenario that exercises the action end-to-end via `uses: .` |\n| `license` | `MIT` | SPDX identifier for the generated `LICENSE` |\n| `gheTokenSecret` | `PROJEN_GITHUB_TOKEN` | GitHub secret holding projen's PAT |\n\n`ActionDogfoodOptions`/`ActionDogfoodStep` - the dogfood scenario (`test-dogfood.yml`):\n\n```text\ninterface ActionDogfoodOptions {\n readonly scenario: ActionDogfoodStep[]; // one or more, run in order - required\n readonly cleanup: string[]; // shared, run once at the end with `if: always()` - required\n}\n\ninterface ActionDogfoodStep {\n readonly name: string; // labels this step-group's generated workflow steps\n readonly id?: string; // step id for the `uses: .` call; default: a slug of `name`\n readonly fixtureSteps?: string[]; // shell, before the invocation (default: none)\n readonly inputs?: Record<string, string>; // `with:` for this invocation (default: none)\n readonly assertions: string[]; // shell, after the invocation - required, job fails unless all exit 0\n}\n```\n\nMost actions need exactly one `scenario` step. Actions with a re-run/no-op/idempotency behavior to verify (e.g. `auto-commit`'s no-op-on-no-change path, `create-pull-request`'s reuse-the-PR path) declare two - the second typically omits `fixtureSteps` so its invocation sees no new state, and its assertion checks the opposite outcome of the first. Reference an invocation's own outputs from a later assertion via `${{ steps.<id>.outputs.<name> }}`, using either the default slug or an explicit `id`.\n\n## Required GitHub secrets\n\n| Secret | Used by | Notes |\n| --- | --- | --- |\n| `PROJEN_GITHUB_TOKEN` | all types | PAT for projen's self-mutation/automation; override via `gheTokenSecret` |\n| `SONAR_TOKEN` | Java types with `sonarProjectKey`; `GitHubActionProject` | SonarQube scan step in `build.yml` / `sonar.yml`; override via `sonarTokenSecret` on `GitHubActionProject` |\n| `DOCKER_USERNAME` / `DOCKER_PASSWORD` | `JavaServiceProject` | Docker image push |\n| `MAVEN_GPG_PRIVATE_KEY`, `MAVEN_GPG_PASSPHRASE`, `MAVEN_CENTRAL_USERNAME`, `MAVEN_CENTRAL_PASSWORD` | `JavaLibraryProject` without `mavenCentralOidc` | Not needed with OIDC trusted publishing |\n| (your Slack webhook secret) | CDK types with `slackWebhookSecret` | Deploy notifications |\n\n## Going further\n\nThe project types are composed from smaller components you can also attach to your own projects:\n\n| Component | Applies to | Purpose |\n| --- | --- | --- |\n| `AppRuntimeScaffold` | `NodeProject` | App source skeleton (`app.ts` + handlers) |\n| `DatabaseComponent` | `NodeProject` | Database construct stub + migration tool wiring |\n| `EcrEcsConstructs` | `Project` | ECR + Fargate ECS construct helper |\n| `EdgeNetworkingConstructs` | `Project` | Per-resource edge networking construct helpers |\n| `MavenCentralPublish` | `JavaProject` | Manual-dispatch Maven Central publish workflow |\n| `DockerPublish` | `JavaProject` | Manual-dispatch Docker build+push workflow |\n| `GitHubPackagesPublish` | `JavaProject` | Manual-dispatch GitHub Packages publish workflow |\n| `FlywayMigration` | `JavaProject` | Flyway plugin/dependency + migrations directory |\n| `CdkDeployHook` | `JavaProject` | Manual-dispatch workflow that triggers `deploy.yml` in a companion CDK repo |\n| `CodeIndexWorkflow` | `JavaProject` | Code index generation on push to `main` |\n| `ActionBuildWorkflow` | `GitHubProject` | The `lint` task (shellcheck/yamllint/pinned actionlint) + `build.yml` |\n| `ActionDogfoodWorkflow` | `GitHubProject` | `test-dogfood.yml` from an `ActionDogfoodOptions` scenario |\n| `ActionSonarWorkflow` | `GitHubProject` | `sonar.yml` (self-hosted SonarQube via the Scanner CLI) |\n\nExample - adding a Docker publish to a plain projen `JavaProject`:\n\n```typescript\nimport { java } from 'projen';\nimport { DockerPublish } from '@xpertss/projen-types';\n\nconst project = new java.JavaProject({\n name: 'my-service',\n groupId: 'org.xpertss',\n artifactId: 'my-service',\n});\n\nnew DockerPublish(project, { dockerRegistry: 'ghcr.io' });\n\nproject.synth();\n```\n\nThe full API reference, including every option and property, is in [API.md](./API.md).\n"
110
110
  },
111
111
  "repository": {
112
112
  "type": "git",
@@ -365,6 +365,7 @@
365
365
  "assembly": "@xpertss/projen-types",
366
366
  "base": "projen.Component",
367
367
  "docs": {
368
+ "remarks": "Omitting `options` generates the workflow with a single failing step (see\n`UNCONFIGURED_STEPS`). A *partially* declared dogfood is still a synth\nerror: if you wrote a scenario by hand, you can write its cleanup too.",
368
369
  "stability": "experimental",
369
370
  "summary": "Per AD-001's dogfood test: the composite action is run **against this repo**, end-to-end, via a local `uses: .` reference - no external harness. Builds `test-dogfood.yml` from an ordered `scenario` of invocation steps (see `ActionDogfoodStep`) followed by a shared cleanup step."
370
371
  },
@@ -375,7 +376,7 @@
375
376
  },
376
377
  "locationInModule": {
377
378
  "filename": "src/actions/action-dogfood-workflow.ts",
378
- "line": 72
379
+ "line": 88
379
380
  },
380
381
  "parameters": [
381
382
  {
@@ -386,6 +387,7 @@
386
387
  },
387
388
  {
388
389
  "name": "options",
390
+ "optional": true,
389
391
  "type": {
390
392
  "fqn": "@xpertss/projen-types.ActionDogfoodOptions"
391
393
  }
@@ -395,7 +397,7 @@
395
397
  "kind": "class",
396
398
  "locationInModule": {
397
399
  "filename": "src/actions/action-dogfood-workflow.ts",
398
- "line": 69
400
+ "line": 85
399
401
  },
400
402
  "name": "ActionDogfoodWorkflow",
401
403
  "properties": [
@@ -406,7 +408,7 @@
406
408
  "immutable": true,
407
409
  "locationInModule": {
408
410
  "filename": "src/actions/action-dogfood-workflow.ts",
409
- "line": 70
411
+ "line": 86
410
412
  },
411
413
  "name": "workflow",
412
414
  "type": {
@@ -737,7 +739,7 @@
737
739
  "kind": "interface",
738
740
  "locationInModule": {
739
741
  "filename": "src/cdk/options.ts",
740
- "line": 50
742
+ "line": 62
741
743
  },
742
744
  "name": "CdkAppProjectOptions",
743
745
  "properties": [
@@ -750,7 +752,7 @@
750
752
  "immutable": true,
751
753
  "locationInModule": {
752
754
  "filename": "src/cdk/options.ts",
753
- "line": 54
755
+ "line": 66
754
756
  },
755
757
  "name": "appEntryPoint",
756
758
  "optional": true,
@@ -766,7 +768,7 @@
766
768
  "immutable": true,
767
769
  "locationInModule": {
768
770
  "filename": "src/cdk/options.ts",
769
- "line": 51
771
+ "line": 63
770
772
  },
771
773
  "name": "database",
772
774
  "optional": true,
@@ -781,6 +783,7 @@
781
783
  "assembly": "@xpertss/projen-types",
782
784
  "base": "projen.Component",
783
785
  "docs": {
786
+ "remarks": "With no `targetRepo` the workflow is still generated, but every job's\nonly step fails with instructions. Synthesizing is not the place to\nenforce this: it would make the project type unscaffoldable by\n`projen new` (which cannot supply the value), and it is a dispatch-only\nworkflow - nobody hits the failure until they actually try to deploy,\nwhich is exactly when \"this repo has no deploy target\" needs saying.",
784
787
  "stability": "experimental",
785
788
  "summary": "Manual-dispatch workflow that invokes a downstream CDK deploy in a companion `CdkInfraProject`/`CdkAppProject` repo, using the same `ManualDeployWorkflow` contract those project types use for their own deploys - see the CDK spec's open question about sharing this contract."
786
789
  },
@@ -791,7 +794,7 @@
791
794
  },
792
795
  "locationInModule": {
793
796
  "filename": "src/java/components/cdk-deploy-hook.ts",
794
- "line": 14
797
+ "line": 21
795
798
  },
796
799
  "parameters": [
797
800
  {
@@ -832,7 +835,7 @@
832
835
  "kind": "class",
833
836
  "locationInModule": {
834
837
  "filename": "src/java/components/cdk-deploy-hook.ts",
835
- "line": 13
838
+ "line": 20
836
839
  },
837
840
  "name": "CdkDeployHook",
838
841
  "symbolId": "src/java/components/cdk-deploy-hook:CdkDeployHook"
@@ -854,30 +857,14 @@
854
857
  {
855
858
  "abstract": true,
856
859
  "docs": {
857
- "default": "true",
858
- "stability": "experimental"
859
- },
860
- "immutable": true,
861
- "locationInModule": {
862
- "filename": "src/java/options.ts",
863
- "line": 28
864
- },
865
- "name": "enabled",
866
- "optional": true,
867
- "type": {
868
- "primitive": "boolean"
869
- }
870
- },
871
- {
872
- "abstract": true,
873
- "docs": {
860
+ "default": "- the workflow is still generated, but its only step fails with\ninstructions (see `CdkDeployHook`)",
874
861
  "stability": "experimental",
875
862
  "summary": "The companion CDK infra/app repo (owner/repo) that owns the actual infrastructure."
876
863
  },
877
864
  "immutable": true,
878
865
  "locationInModule": {
879
866
  "filename": "src/java/options.ts",
880
- "line": 31
867
+ "line": 34
881
868
  },
882
869
  "name": "targetRepo",
883
870
  "optional": true,
@@ -942,31 +929,17 @@
942
929
  {
943
930
  "abstract": true,
944
931
  "docs": {
945
- "stability": "experimental",
946
- "summary": "Deploy targets for the manual-dispatch deploy workflow, e.g. [\"dev\", \"stage\", \"prod\"]."
932
+ "stability": "experimental"
947
933
  },
948
934
  "immutable": true,
949
935
  "locationInModule": {
950
936
  "filename": "src/cdk/options.ts",
951
- "line": 35
937
+ "line": 49
952
938
  },
953
- "name": "environments",
939
+ "name": "ecrEcs",
940
+ "optional": true,
954
941
  "type": {
955
- "collection": {
956
- "elementtype": {
957
- "union": {
958
- "types": [
959
- {
960
- "primitive": "string"
961
- },
962
- {
963
- "fqn": "@xpertss/projen-types.EnvironmentOptions"
964
- }
965
- ]
966
- }
967
- },
968
- "kind": "array"
969
- }
942
+ "fqn": "@xpertss/projen-types.EcrEcsOptions"
970
943
  }
971
944
  },
972
945
  {
@@ -977,30 +950,47 @@
977
950
  "immutable": true,
978
951
  "locationInModule": {
979
952
  "filename": "src/cdk/options.ts",
980
- "line": 37
953
+ "line": 51
981
954
  },
982
- "name": "ecrEcs",
955
+ "name": "edgeResources",
983
956
  "optional": true,
984
957
  "type": {
985
- "fqn": "@xpertss/projen-types.EcrEcsOptions"
958
+ "collection": {
959
+ "elementtype": {
960
+ "primitive": "string"
961
+ },
962
+ "kind": "array"
963
+ }
986
964
  }
987
965
  },
988
966
  {
989
967
  "abstract": true,
990
968
  "docs": {
991
- "stability": "experimental"
969
+ "default": "- no deploy workflow",
970
+ "remarks": "Optional rather than required so that `projen new --from` can scaffold\nthe repo: its union type (`string | EnvironmentOptions`) is not\n\"JSON-like\", so projen's CLI cannot render a value for it into the\ninitial `.projenrc.ts` - and a *required* option it cannot render leaves\nbehind a projenrc that does not type-check.",
971
+ "stability": "experimental",
972
+ "summary": "Deploy targets for the manual-dispatch deploy workflow, e.g. [\"dev\", \"stage\", \"prod\"]. No `deploy` workflow is generated when this is empty or omitted."
992
973
  },
993
974
  "immutable": true,
994
975
  "locationInModule": {
995
976
  "filename": "src/cdk/options.ts",
996
- "line": 39
977
+ "line": 47
997
978
  },
998
- "name": "edgeResources",
979
+ "name": "environments",
999
980
  "optional": true,
1000
981
  "type": {
1001
982
  "collection": {
1002
983
  "elementtype": {
1003
- "primitive": "string"
984
+ "union": {
985
+ "types": [
986
+ {
987
+ "primitive": "string"
988
+ },
989
+ {
990
+ "fqn": "@xpertss/projen-types.EnvironmentOptions"
991
+ }
992
+ ]
993
+ }
1004
994
  },
1005
995
  "kind": "array"
1006
996
  }
@@ -1023,7 +1013,7 @@
1023
1013
  },
1024
1014
  "locationInModule": {
1025
1015
  "filename": "src/cdk/cdk-typescript-base.ts",
1026
- "line": 23
1016
+ "line": 29
1027
1017
  },
1028
1018
  "parameters": [
1029
1019
  {
@@ -1037,7 +1027,7 @@
1037
1027
  "kind": "class",
1038
1028
  "locationInModule": {
1039
1029
  "filename": "src/cdk/cdk-typescript-base.ts",
1040
- "line": 22
1030
+ "line": 28
1041
1031
  },
1042
1032
  "name": "CdkTypescriptProject",
1043
1033
  "symbolId": "src/cdk/cdk-typescript-base:CdkTypescriptProject"
@@ -1055,7 +1045,7 @@
1055
1045
  "kind": "interface",
1056
1046
  "locationInModule": {
1057
1047
  "filename": "src/cdk/cdk-typescript-base.ts",
1058
- "line": 11
1048
+ "line": 17
1059
1049
  },
1060
1050
  "name": "CdkTypescriptProjectOptions",
1061
1051
  "properties": [
@@ -1067,7 +1057,7 @@
1067
1057
  "immutable": true,
1068
1058
  "locationInModule": {
1069
1059
  "filename": "src/cdk/cdk-typescript-base.ts",
1070
- "line": 12
1060
+ "line": 18
1071
1061
  },
1072
1062
  "name": "environments",
1073
1063
  "optional": true,
@@ -1356,7 +1346,7 @@
1356
1346
  "kind": "interface",
1357
1347
  "locationInModule": {
1358
1348
  "filename": "src/cdk/options.ts",
1359
- "line": 42
1349
+ "line": 54
1360
1350
  },
1361
1351
  "name": "DatabaseOptions",
1362
1352
  "properties": [
@@ -1369,7 +1359,7 @@
1369
1359
  "immutable": true,
1370
1360
  "locationInModule": {
1371
1361
  "filename": "src/cdk/options.ts",
1372
- "line": 44
1362
+ "line": 56
1373
1363
  },
1374
1364
  "name": "engine",
1375
1365
  "optional": true,
@@ -1386,7 +1376,7 @@
1386
1376
  "immutable": true,
1387
1377
  "locationInModule": {
1388
1378
  "filename": "src/cdk/options.ts",
1389
- "line": 47
1379
+ "line": 59
1390
1380
  },
1391
1381
  "name": "migrationTool",
1392
1382
  "optional": true,
@@ -1732,7 +1722,7 @@
1732
1722
  "base": "projen.github.GitHubProject",
1733
1723
  "docs": {
1734
1724
  "stability": "experimental",
1735
- "summary": "Scaffolds the repo lifecycle (AD-001) around a hand-committed, composite (shell) GitHub Action: the `build`/`test-dogfood`/`sonar`/`release` workflows, versioning and release discipline, the F003 verify components, the F009 allowlist guard, and repo boilerplate (`tsconfig.json` for `.projenrc.ts`, a private version-source `package.json`, `.yamllint`, `LICENSE`, and a `README.md` template). The action's own content (`action.yml`, its shell scripts, `test/` fixtures) is authored by hand per the action's own F### spec - this type only lints it."
1725
+ "summary": "Scaffolds the repo lifecycle (AD-001) around a hand-committed, composite (shell) GitHub Action: the `build`/`test-dogfood`/`sonar`/`release` workflows, versioning and release discipline, the F003 verify components, the F009 allowlist guard, and repo boilerplate (a private version-source `package.json`, `.yamllint`, `LICENSE`, and a `README.md` template). The action's own content (`action.yml`, its shell scripts, `test/` fixtures) is authored by hand per the action's own F### spec - this type only lints it."
1736
1726
  },
1737
1727
  "fqn": "@xpertss/projen-types.GitHubActionProject",
1738
1728
  "initializer": {
@@ -1741,7 +1731,7 @@
1741
1731
  },
1742
1732
  "locationInModule": {
1743
1733
  "filename": "src/actions/github-action-project.ts",
1744
- "line": 126
1734
+ "line": 133
1745
1735
  },
1746
1736
  "parameters": [
1747
1737
  {
@@ -1755,7 +1745,7 @@
1755
1745
  "kind": "class",
1756
1746
  "locationInModule": {
1757
1747
  "filename": "src/actions/github-action-project.ts",
1758
- "line": 120
1748
+ "line": 127
1759
1749
  },
1760
1750
  "name": "GitHubActionProject",
1761
1751
  "properties": [
@@ -1766,7 +1756,7 @@
1766
1756
  "immutable": true,
1767
1757
  "locationInModule": {
1768
1758
  "filename": "src/actions/github-action-project.ts",
1769
- "line": 121
1759
+ "line": 128
1770
1760
  },
1771
1761
  "name": "buildWorkflow",
1772
1762
  "type": {
@@ -1780,7 +1770,7 @@
1780
1770
  "immutable": true,
1781
1771
  "locationInModule": {
1782
1772
  "filename": "src/actions/github-action-project.ts",
1783
- "line": 122
1773
+ "line": 129
1784
1774
  },
1785
1775
  "name": "dogfoodWorkflow",
1786
1776
  "type": {
@@ -1794,7 +1784,7 @@
1794
1784
  "immutable": true,
1795
1785
  "locationInModule": {
1796
1786
  "filename": "src/actions/github-action-project.ts",
1797
- "line": 124
1787
+ "line": 131
1798
1788
  },
1799
1789
  "name": "release",
1800
1790
  "type": {
@@ -1808,7 +1798,7 @@
1808
1798
  "immutable": true,
1809
1799
  "locationInModule": {
1810
1800
  "filename": "src/actions/github-action-project.ts",
1811
- "line": 123
1801
+ "line": 130
1812
1802
  },
1813
1803
  "name": "sonarWorkflow",
1814
1804
  "type": {
@@ -1831,40 +1821,41 @@
1831
1821
  "kind": "interface",
1832
1822
  "locationInModule": {
1833
1823
  "filename": "src/actions/github-action-project.ts",
1834
- "line": 37
1824
+ "line": 35
1835
1825
  },
1836
1826
  "name": "GitHubActionProjectOptions",
1837
1827
  "properties": [
1838
1828
  {
1839
1829
  "abstract": true,
1840
1830
  "docs": {
1841
- "remarks": "What fixture state, what to assert, and\nhow to clean up are specified by the action's own F### spec - the\nhighest-risk behavior of that action. Required: a default no-op\ndogfood would silently hollow out a load-bearing AD-001 workflow.",
1831
+ "remarks": "MUST be reachable from\ngithub.com-hosted (public) runners (AD-001). Required, no default: a\nguessed server is worse than a loud failure.",
1842
1832
  "stability": "experimental",
1843
- "summary": "The dogfood scenario (AD-001)."
1833
+ "summary": "URL of the org's self-hosted SonarQube instance."
1844
1834
  },
1845
1835
  "immutable": true,
1846
1836
  "locationInModule": {
1847
1837
  "filename": "src/actions/github-action-project.ts",
1848
- "line": 75
1838
+ "line": 56
1849
1839
  },
1850
- "name": "dogfood",
1840
+ "name": "sonarHostUrl",
1851
1841
  "type": {
1852
- "fqn": "@xpertss/projen-types.ActionDogfoodOptions"
1842
+ "primitive": "string"
1853
1843
  }
1854
1844
  },
1855
1845
  {
1856
1846
  "abstract": true,
1857
1847
  "docs": {
1858
- "remarks": "MUST be reachable from\ngithub.com-hosted (public) runners (AD-001). Required, no default: a\nguessed server is worse than a loud failure.",
1848
+ "remarks": "Used in the default README\ntemplate and recorded in the private `package.json`.",
1859
1849
  "stability": "experimental",
1860
- "summary": "URL of the org's self-hosted SonarQube instance."
1850
+ "summary": "One-line description of the action."
1861
1851
  },
1862
1852
  "immutable": true,
1863
1853
  "locationInModule": {
1864
1854
  "filename": "src/actions/github-action-project.ts",
1865
- "line": 58
1855
+ "line": 41
1866
1856
  },
1867
- "name": "sonarHostUrl",
1857
+ "name": "description",
1858
+ "optional": true,
1868
1859
  "type": {
1869
1860
  "primitive": "string"
1870
1861
  }
@@ -1872,19 +1863,20 @@
1872
1863
  {
1873
1864
  "abstract": true,
1874
1865
  "docs": {
1875
- "remarks": "Used in the default README\ntemplate and recorded in the private `package.json`.",
1866
+ "default": "- `test-dogfood.yml` runs one failing step that tells you to\ndeclare a scenario",
1867
+ "remarks": "What fixture state, what to assert, and\nhow to clean up are specified by the action's own F### spec - the\nhighest-risk behavior of that action.\n\nIts type is a struct, which projen's CLI cannot render into a projenrc,\nso it can only be written by hand - it is therefore optional, because a\n*required* option `projen new` cannot supply would make this project\ntype impossible to scaffold. AD-001's \"never a silent no-op dogfood\"\nrule is enforced instead by the workflow it generates in that case: a\nsingle step that fails on every PR until a scenario is declared.",
1876
1868
  "stability": "experimental",
1877
- "summary": "One-line description of the action."
1869
+ "summary": "The dogfood scenario (AD-001)."
1878
1870
  },
1879
1871
  "immutable": true,
1880
1872
  "locationInModule": {
1881
1873
  "filename": "src/actions/github-action-project.ts",
1882
- "line": 43
1874
+ "line": 82
1883
1875
  },
1884
- "name": "description",
1876
+ "name": "dogfood",
1885
1877
  "optional": true,
1886
1878
  "type": {
1887
- "primitive": "string"
1879
+ "fqn": "@xpertss/projen-types.ActionDogfoodOptions"
1888
1880
  }
1889
1881
  },
1890
1882
  {
@@ -1897,7 +1889,7 @@
1897
1889
  "immutable": true,
1898
1890
  "locationInModule": {
1899
1891
  "filename": "src/actions/github-action-project.ts",
1900
- "line": 51
1892
+ "line": 49
1901
1893
  },
1902
1894
  "name": "gheTokenSecret",
1903
1895
  "optional": true,
@@ -1915,7 +1907,7 @@
1915
1907
  "immutable": true,
1916
1908
  "locationInModule": {
1917
1909
  "filename": "src/actions/github-action-project.ts",
1918
- "line": 81
1910
+ "line": 88
1919
1911
  },
1920
1912
  "name": "license",
1921
1913
  "optional": true,
@@ -1933,7 +1925,7 @@
1933
1925
  "immutable": true,
1934
1926
  "locationInModule": {
1935
1927
  "filename": "src/actions/github-action-project.ts",
1936
- "line": 67
1928
+ "line": 65
1937
1929
  },
1938
1930
  "name": "sonarPullRequestGate",
1939
1931
  "optional": true,
@@ -1950,7 +1942,7 @@
1950
1942
  "immutable": true,
1951
1943
  "locationInModule": {
1952
1944
  "filename": "src/actions/github-action-project.ts",
1953
- "line": 61
1945
+ "line": 59
1954
1946
  },
1955
1947
  "name": "sonarTokenSecret",
1956
1948
  "optional": true,
@@ -2082,7 +2074,7 @@
2082
2074
  "kind": "interface",
2083
2075
  "locationInModule": {
2084
2076
  "filename": "src/java/options.ts",
2085
- "line": 53
2077
+ "line": 75
2086
2078
  },
2087
2079
  "name": "JavaAppProjectOptions",
2088
2080
  "properties": [
@@ -2095,7 +2087,7 @@
2095
2087
  "immutable": true,
2096
2088
  "locationInModule": {
2097
2089
  "filename": "src/java/options.ts",
2098
- "line": 55
2090
+ "line": 77
2099
2091
  },
2100
2092
  "name": "ghPackagesRegistry",
2101
2093
  "optional": true,
@@ -2207,7 +2199,7 @@
2207
2199
  },
2208
2200
  "locationInModule": {
2209
2201
  "filename": "src/java/java-maven-base.ts",
2210
- "line": 22
2202
+ "line": 23
2211
2203
  },
2212
2204
  "parameters": [
2213
2205
  {
@@ -2221,7 +2213,7 @@
2221
2213
  "kind": "class",
2222
2214
  "locationInModule": {
2223
2215
  "filename": "src/java/java-maven-base.ts",
2224
- "line": 18
2216
+ "line": 19
2225
2217
  },
2226
2218
  "name": "JavaMavenProject",
2227
2219
  "properties": [
@@ -2232,7 +2224,7 @@
2232
2224
  "immutable": true,
2233
2225
  "locationInModule": {
2234
2226
  "filename": "src/java/java-maven-base.ts",
2235
- "line": 20
2227
+ "line": 21
2236
2228
  },
2237
2229
  "name": "buildVerifyWorkflow",
2238
2230
  "type": {
@@ -2246,7 +2238,7 @@
2246
2238
  "immutable": true,
2247
2239
  "locationInModule": {
2248
2240
  "filename": "src/java/java-maven-base.ts",
2249
- "line": 19
2241
+ "line": 20
2250
2242
  },
2251
2243
  "name": "upgradeTask",
2252
2244
  "type": {
@@ -2269,7 +2261,7 @@
2269
2261
  "kind": "interface",
2270
2262
  "locationInModule": {
2271
2263
  "filename": "src/java/java-maven-base.ts",
2272
- "line": 10
2264
+ "line": 11
2273
2265
  },
2274
2266
  "name": "JavaMavenProjectOptions",
2275
2267
  "symbolId": "src/java/java-maven-base:JavaMavenProjectOptions"
@@ -2321,25 +2313,48 @@
2321
2313
  "kind": "interface",
2322
2314
  "locationInModule": {
2323
2315
  "filename": "src/java/options.ts",
2324
- "line": 34
2316
+ "line": 37
2325
2317
  },
2326
2318
  "name": "JavaServiceProjectOptions",
2327
2319
  "properties": [
2328
2320
  {
2329
2321
  "abstract": true,
2330
2322
  "docs": {
2331
- "default": "{ enabled: true }",
2332
- "stability": "experimental"
2323
+ "default": "true",
2324
+ "stability": "experimental",
2325
+ "summary": "Whether to generate the `deploy-cdk` workflow at all."
2333
2326
  },
2334
2327
  "immutable": true,
2335
2328
  "locationInModule": {
2336
2329
  "filename": "src/java/options.ts",
2337
- "line": 42
2330
+ "line": 64
2338
2331
  },
2339
2332
  "name": "cdkDeployHook",
2340
2333
  "optional": true,
2341
2334
  "type": {
2342
- "fqn": "@xpertss/projen-types.CdkDeployHookOptions"
2335
+ "primitive": "boolean"
2336
+ }
2337
+ },
2338
+ {
2339
+ "abstract": true,
2340
+ "docs": {
2341
+ "custom": {
2342
+ "xpertss": "/projen-types java_service` can pass it\n(`--cdk-deploy-target-repo owner/repo`): projen's CLI can only render\noptions whose type is a string/number/boolean/array/enum, so a\nstruct-typed option is invisible to it."
2343
+ },
2344
+ "default": "- `deploy-cdk.yml` is generated with a single failing step that\ntells you to set this",
2345
+ "remarks": "A plain string rather than a nested struct so that\n`projen new --from",
2346
+ "stability": "experimental",
2347
+ "summary": "The companion CDK infra/app repo (`owner/repo`) whose `deploy.yml` the `deploy-cdk` workflow dispatches."
2348
+ },
2349
+ "immutable": true,
2350
+ "locationInModule": {
2351
+ "filename": "src/java/options.ts",
2352
+ "line": 57
2353
+ },
2354
+ "name": "cdkDeployTargetRepo",
2355
+ "optional": true,
2356
+ "type": {
2357
+ "primitive": "string"
2343
2358
  }
2344
2359
  },
2345
2360
  {
@@ -2351,7 +2366,7 @@
2351
2366
  "immutable": true,
2352
2367
  "locationInModule": {
2353
2368
  "filename": "src/java/options.ts",
2354
- "line": 36
2369
+ "line": 39
2355
2370
  },
2356
2371
  "name": "dockerRegistry",
2357
2372
  "optional": true,
@@ -2369,7 +2384,7 @@
2369
2384
  "immutable": true,
2370
2385
  "locationInModule": {
2371
2386
  "filename": "src/java/options.ts",
2372
- "line": 50
2387
+ "line": 72
2373
2388
  },
2374
2389
  "name": "environments",
2375
2390
  "optional": true,
@@ -2400,7 +2415,7 @@
2400
2415
  "immutable": true,
2401
2416
  "locationInModule": {
2402
2417
  "filename": "src/java/options.ts",
2403
- "line": 39
2418
+ "line": 42
2404
2419
  },
2405
2420
  "name": "useFlyway",
2406
2421
  "optional": true,
@@ -2728,6 +2743,6 @@
2728
2743
  "symbolId": "src/common/workflow-change-notice-workflow:WorkflowChangeNoticeWorkflowOptions"
2729
2744
  }
2730
2745
  },
2731
- "version": "0.0.2",
2732
- "fingerprint": "SOREw4FllfwWFwxt950SKH0rCoRLyBQ4OrDsDR7T0SI="
2746
+ "version": "0.0.4",
2747
+ "fingerprint": "upjKAzwpYLVGzTXQERWb0kwu21837IMVW3dlmjdoEFk="
2733
2748
  }