@nikovirtala/projen-constructs 0.3.82 → 0.3.84
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 +15 -11
- package/README.md +4 -0
- package/docs/api/index.html +3 -0
- package/docs/api/interfaces/HomebrewOptions.html +15 -1
- package/lib/components/bundle-lambda-function-code.js +3 -3
- package/lib/components/colima.js +1 -1
- package/lib/components/homebrew.d.ts +10 -0
- package/lib/components/homebrew.js +17 -6
- package/lib/components/lambda-function-construct-generator.js +1 -1
- package/lib/components/localstack.js +1 -1
- package/lib/components/mise.js +1 -1
- package/lib/components/typedoc.js +1 -1
- package/lib/components/vitest.js +1 -1
- package/lib/project-generator.js +1 -1
- package/lib/projects/awscdk-construct-library.generated.js +1 -1
- package/lib/projects/awscdk-typescript-app.generated.js +1 -1
- package/lib/projects/jsii.generated.js +1 -1
- package/lib/projects/typescript.generated.js +1 -1
- package/package.json +1 -1
package/.jsii
CHANGED
|
@@ -4183,7 +4183,7 @@
|
|
|
4183
4183
|
"stability": "stable"
|
|
4184
4184
|
},
|
|
4185
4185
|
"homepage": "https://github.com/nikovirtala/projen-constructs.git",
|
|
4186
|
-
"jsiiVersion": "6.0.
|
|
4186
|
+
"jsiiVersion": "6.0.20 (build 338bb97)",
|
|
4187
4187
|
"license": "Apache-2.0",
|
|
4188
4188
|
"metadata": {
|
|
4189
4189
|
"jsii": {
|
|
@@ -4196,7 +4196,7 @@
|
|
|
4196
4196
|
},
|
|
4197
4197
|
"name": "@nikovirtala/projen-constructs",
|
|
4198
4198
|
"readme": {
|
|
4199
|
-
"markdown": "# @nikovirtala/projen-constructs\n\nProjen project types with standard configuration for consistent project setup across all repositories.\n\n## Installation\n\n```bash\npnpm add -D @nikovirtala/projen-constructs projen constructs\n```\n\nRequires pnpm 11 and `projen` >= 0.101.27. `@mrgrain/cdk-esbuild` and `constructs` are peer\ndependencies as well.\n\nTo create a project from scratch:\n\n```bash\npnpm dlx projen new --from @nikovirtala/projen-constructs aws_cdk_construct_library\n```\n\n## Features\n\n- **Standard Configuration**: Opinionated defaults for author, release branch, package manager, Node.js, TypeScript, and tooling\n- **Automatic Project Type Discovery**: Generates the `ProjectType` enum from Projen's JSII manifest (19 project types)\n- **Component System**: Reusable components (Vitest, TypeDoc, Mise, Homebrew, Colima, LocalStack, Lambda bundling)\n- **Code Generation**: `ProjectGenerator` creates project classes with standard configuration\n- **ES Modules**: TypeScript and CDK App projects use ES modules (JSII uses CommonJS)\n- **Code Quality**: Biome for formatting and linting\n- **Testing**: Vitest with coverage\n- **Auto-merge**: Enabled with auto-approve\n- **VSCode**: Recommended extensions and settings\n- **mise**: Node version management\n\n## Standard Configuration\n\n- **Author**: Niko Virtala (niko.virtala@hey.com)\n- **Default Release Branch**: main\n- **Package Manager**: pnpm 11.20.0\n- **Node Version**: 24.19.0\n- **TypeScript**: 6.0.3\n- **CDK Version**: 2.263.0 (for CDK projects)\n- **JSII Version**: ~6.0.3 (for JSII projects)\n\nThe AWS CDK, Node.js and TypeScript versions live in `src/versions.json` and are refreshed by the\n`update-versions` task, which the dependency upgrade workflow runs.\n\n### pnpm\n\npnpm reads its settings from `pnpm-workspace.yaml`, not `.npmrc`, since pnpm 11. Generated projects\nget:\n\n| Setting | Value | Reason |\n| ---------------------- | ----------------- | ------------------------------------------------------------------------------------------------------------ |\n| `nodeLinker` | `hoisted` | jsii tooling resolves dependencies from a flat `node_modules` |\n| `allowBuilds` | `esbuild: true` | esbuild links its platform binary in a postinstall script, and pnpm 11 fails an install with ignored builds |\n| `verifyDepsBeforeRun` | `false` | projen resolves the task `PATH` with `$(pnpm -c exec ...)`, which otherwise re-enters `pnpm install` and deadlocks |\n| `minimumReleaseAge` | `0` | the pnpm 11 default of 1440 minutes makes pnpm write `minimumReleaseAgeExclude` entries into this generated file |\n\n### TypeScript configuration\n\nProjen renders three configs, and none of them should be edited directly:\n\n- `tsconfig.json` compiles `src` to `lib`. For JSII projects, jsii validates it against its `strict`\n rule set, so it only carries compiler options jsii accepts.\n- `test/tsconfig.json` extends it and is type-check only. This is the config Vitest type checking and\n the editor use, and the one `tsconfigDev` points at.\n- `projenrc/tsconfig.json` covers `.projenrc.ts`.\n\n## Customization\n\nOverride any option by passing it to the constructor:\n\n```typescript\nconst project = new JsiiProject({\n name: \"my-project\",\n repositoryUrl: \"https://github.com/nikovirtala/my-project.git\",\n minNodeVersion: \"24.0.0\",\n author: \"Custom Author\",\n authorAddress: \"custom@example.com\",\n mise: false,\n vitest: false,\n tsconfig: {\n compilerOptions: {\n noUnusedLocals: false,\n },\n },\n biomeOptions: {\n biomeConfig: {\n formatter: {\n lineWidth: 100,\n },\n },\n },\n});\n```\n\nEvery component is exposed as an enable flag (`mise`, `vitest`, ...) plus an options property\n(`miseOptions`, `vitestOptions`, ...).\n\n## Usage\n\n### Projects\n\n#### AWS CDK Construct Library Project\n\n```typescript\nimport { AwsCdkConstructLibraryProject } from \"@nikovirtala/projen-constructs\";\n\nconst project = new AwsCdkConstructLibraryProject({\n name: \"my-cdk-construct\",\n repositoryUrl: \"https://github.com/nikovirtala/my-cdk-construct.git\",\n});\n\nproject.synth();\n```\n\n#### AWS CDK TypeScript App Project\n\n```typescript\nimport { AwsCdkTypeScriptAppProject } from \"@nikovirtala/projen-constructs\";\n\nconst project = new AwsCdkTypeScriptAppProject({\n name: \"my-cdk-app\",\n repositoryUrl: \"https://github.com/nikovirtala/my-cdk-app.git\",\n});\n\nproject.synth();\n```\n\n#### JSII Project\n\n```typescript\nimport { JsiiProject } from \"@nikovirtala/projen-constructs\";\n\nconst project = new JsiiProject({\n name: \"my-jsii-project\",\n repositoryUrl: \"https://github.com/nikovirtala/my-jsii-project.git\",\n});\n\nproject.synth();\n```\n\n#### TypeScript Project\n\n```typescript\nimport { TypeScriptProject } from \"@nikovirtala/projen-constructs\";\n\nconst project = new TypeScriptProject({\n name: \"my-typescript-project\",\n repositoryUrl: \"https://github.com/nikovirtala/my-typescript-project.git\",\n});\n\nproject.synth();\n```\n\n### Components\n\nThe package includes reusable components for common development tasks:\n\n#### Vitest\n\n[Vitest](https://vitest.dev) testing framework component.\n\n```typescript\nimport { Vitest } from \"@nikovirtala/projen-constructs\";\n\nnew Vitest(project, {\n vitestVersion: \"^4\",\n config: {\n coverageProvider: CoverageProvider.V8,\n coverageReporters: [CoverageReporter.TEXT, CoverageReporter.LCOV],\n },\n});\n```\n\nType checking runs against the project's development tsconfig (`test/tsconfig.json`) unless\n`config.typecheckTsconfig` says otherwise.\n\nFor Vitest settings that `config` doesn't cover, use `extraTestConfig` (merged into `test`) and\n`extraConfig` (top-level options next to `test`):\n\n```typescript\nnew Vitest(project, {\n extraTestConfig: {\n setupFiles: [\"test/setup.ts\"],\n },\n extraConfig: {\n resolve: { alias: { \"@\": \"/src\" } },\n },\n});\n```\n\n`extraTestConfig` is deep-merged over the generated `test` options: objects merge, and other values\n(including arrays) replace the generated value. Both options are rendered as JSON, so their values\ncan't contain functions or regular expressions, which rules out plugins.\n\n#### TypeDoc\n\n[TypeDoc](https://typedoc.org) documentation generation component.\n\n```typescript\nimport { TypeDoc, EntryPointStrategy } from \"@nikovirtala/projen-constructs\";\n\nnew TypeDoc(project, {\n version: \"^0.28\",\n typeDocConfig: {\n entryPointStrategy: EntryPointStrategy.EXPAND,\n out: \"docs/api\",\n exclude: [\"**/*.test.ts\"],\n },\n});\n```\n\n#### Mise\n\n[Mise](https://mise.jdx.dev) dev tools/runtimes management component.\n\n```typescript\nimport { Mise } from \"@nikovirtala/projen-constructs\";\n\nnew Mise(project, {\n nodeVersion: \"24.19.0\",\n});\n```\n\n#### Homebrew\n\n[Homebrew](https://brew.sh) package management component. Writes a `Brewfile` and adds an\n`install:homebrew` task that bootstraps Homebrew and runs `brew bundle`.\n\n```typescript\nimport { Homebrew } from \"@nikovirtala/projen-constructs\";\n\nconst homebrew = new Homebrew(project, {\n packages: [\"jq\", \"yq\"],\n});\n\nhomebrew.addPackage(\"gh\");\n```\n\n#### Colima\n\n[Colima](https://github.com/abiosoft/colima) container runtime component. Alternative for Docker.\n\n```typescript\nimport { Colima } from \"@nikovirtala/projen-constructs\";\n\nnew Colima(project);\n```\n\n#### LocalStack\n\n[LocalStack](https://www.localstack.cloud) AWS emulation component.\n\n```typescript\nimport { LocalStack } from \"@nikovirtala/projen-constructs\";\n\nnew LocalStack(project, {\n services: [\"s3\", \"lambda\", \"dynamodb\"],\n port: 4566,\n debug: true,\n});\n```\n\n#### LambdaFunctionConstructGenerator\n\nGenerates AWS CDK Lambda Function constructs and bundles their code.\n\n```typescript\nimport { LambdaFunctionConstructGenerator } from \"@nikovirtala/projen-constructs\";\n\nnew LambdaFunctionConstructGenerator(project, {\n sourceDir: \"src/handlers\",\n outputDir: \"src/constructs/lambda\",\n filePattern: \"*.lambda.ts\",\n esbuildOptions: {\n minify: true,\n sourcemap: true,\n },\n});\n```\n\n#### Bundler\n\nLow-level bundling utilities for Lambda functions.\n\n```typescript\nimport {\n Bundler,\n LambdaFunctionCodeBundle,\n} from \"@nikovirtala/projen-constructs\";\n\nconst bundler = new Bundler(project, {\n assetsDir: \"assets\",\n esbuildVersion: \"^0.25\",\n});\n\nnew LambdaFunctionCodeBundle(project, {\n entrypoint: \"src/my-function.lambda.ts\",\n extension: \".lambda.ts\",\n});\n```\n\n#### ProjectGenerator\n\nGenerates TypeScript project classes with standard configuration.\n\n```typescript\nimport { ProjectGenerator, ProjectType } from \"@nikovirtala/projen-constructs\";\n\nnew ProjectGenerator(project, {\n name: \"TypeScriptProject\",\n projectType: ProjectType.TYPE_SCRIPT_PROJECT,\n filePath: \"./src/projects/typescript.generated.ts\",\n components: [\n { componentClass: Mise },\n { componentClass: Vitest }, // Auto-detects VitestOptions from JSII manifest\n ],\n});\n```\n\nFeatures:\n\n- Automatically generates the `ProjectType` enum from Projen's JSII manifest\n- Auto-detects component options types from JSII manifests\n- Strips Projen's `@pjnew` annotation from `packageManager`, which `projen new` would otherwise\n render into a generated `.projenrc.ts` as the package manager that ran the command\n- Validates paths to prevent directory traversal attacks\n- Structured error handling with custom error classes\n\n## Migrating from the standalone packages\n\nThe components used to be published as separate packages. Those packages are deprecated and won't\nget new features or fixes. Every class, interface, enum and function they exported is exported from\n`@nikovirtala/projen-constructs` under the same name, except `AwsCdkApp` (see below).\n\n| Deprecated package | Replacement in `@nikovirtala/projen-constructs` |\n| --- | --- |\n| `@nikovirtala/projen-vitest` | `Vitest`, `VitestOptions`, `VitestConfigOptions`, `Environment`, `Pool`, `CoverageProvider`, `CoverageReporter` |\n| `@nikovirtala/projen-typedoc` | `TypeDoc`, `TypeDocOptions`, `TypeDocConfiguration` and its enums |\n| `@nikovirtala/projen-homebrew` | `Homebrew`, `HomebrewOptions` |\n| `@nikovirtala/projen-colima` | `Colima` |\n| `@nikovirtala/projen-localstack` | `LocalStack`, `LocalStackOptions` |\n| `@nikovirtala/projen-bundle-lambda-function-code` | `Bundler`, `LambdaFunctionCodeBundle`, `LambdaFunctionCodeBundler` and their options |\n| `@nikovirtala/projen-lambda-function-construct-generator` | `LambdaFunctionConstructGenerator`, `LambdaFunctionConstructGeneratorOptions` |\n| `@nikovirtala/projen-aws-cdk-app` | `AwsCdkTypeScriptAppProject`, `AwsCdkTypeScriptAppProjectOptions` |\n\n### Steps\n\n1. In `.projenrc.ts`, replace the old package in `devDeps` with `@nikovirtala/projen-constructs`, and\n change the imports:\n\n ```typescript\n // before\n import { Vitest } from \"@nikovirtala/projen-vitest\";\n // after\n import { Vitest } from \"@nikovirtala/projen-constructs\";\n ```\n\n2. Check the peer dependencies. `@nikovirtala/projen-constructs` needs `projen` ^0.104, `constructs`\n ^10 and `@mrgrain/cdk-esbuild` ^5. The standalone packages accepted older projen versions, so you\n may have to upgrade projen in the same change.\n3. Install the new package, run `npx projen` and review the changes to the generated files.\n\n### Changes to expect\n\nThese are the differences in behaviour or generated files between the standalone packages and this\nlibrary.\n\n**Vitest**\n\n- `vitest.config.ts` imports `defineConfig` from\n `@nikovirtala/projen-constructs/lib/vitest-define-config` instead of\n `@nikovirtala/projen-vitest/lib/bundled-define-config`. Projen rewrites the file, so there's\n nothing to change by hand.\n- The config is rendered as JSON, so its keys are quoted. The settings are the same.\n- `config.typecheckTsconfig` defaults to the project's development tsconfig (`test/tsconfig.json`\n in current projen) instead of `tsconfig.dev.json`.\n- JSII and construct library projects exclude `vitest.config.ts` from the published package.\n- New: `extraTestConfig` and `extraConfig` for Vitest settings that `config` doesn't cover.\n\n**Homebrew and Colima**\n\n- Packages from a tap (`owner/tap/formula`) also add a `tap` line to the `Brewfile`, and the\n `Brewfile` is sorted.\n- The `install:homebrew`, `homebrew:bundle` and `colima` tasks run in bash. `homebrew:bundle` also\n finds a freshly installed `brew` that isn't on the `PATH` yet.\n\n**LocalStack**\n\n- `imageTag` is applied: LocalStack starts with `localstack/localstack:<imageTag>`. It used to be\n ignored.\n\n**Bundler / LambdaFunctionCodeBundler**\n\n- `LambdaFunctionCodeBundler.bundleOptions` applies to every discovered entrypoint. Its `entrypoint`\n used to replace them all.\n\n**LambdaFunctionConstructGenerator**\n\n- The bundle task runs `tsx` with the project's development tsconfig instead of `tsconfig.dev.json`.\n\n**TypeDoc**: no changes.\n\n### From `AwsCdkApp` to `AwsCdkTypeScriptAppProject`\n\n```typescript\n// before\nimport { AwsCdkApp } from \"@nikovirtala/projen-aws-cdk-app\";\nconst project = new AwsCdkApp({ name: \"my-app\", cdkVersion: \"2.221.0\" });\n\n// after\nimport { AwsCdkTypeScriptAppProject } from \"@nikovirtala/projen-constructs\";\nconst project = new AwsCdkTypeScriptAppProject({ name: \"my-app\", cdkVersion: \"2.221.0\" });\n```\n\nBoth are ES module apps run with `tsx`, using pnpm, Biome, Vitest and mise. The differences:\n\n- **`nvm` is removed.** Use mise (on by default), which pins the Node.js version in `mise.toml`.\n- **Homebrew is on by default.** The project gets a `Brewfile`, and `npx projen` runs\n `install:homebrew` (installs Homebrew if `brew` is missing) and `homebrew:bundle`. Set\n `homebrew: false` to turn it off.\n- **cdk.json `app`** is `npx tsx src/main.ts` instead of `tsx --tsconfig tsconfig.json src/main.ts`.\n- **Defaults** come from this library: Node.js, TypeScript, CDK and pnpm versions (pnpm 11 instead\n of 10), Dependabot off, auto-merge on, `auto-approve` and `auto-merge` labels on dependency\n upgrade PRs, and auto-approval of PRs by `nikovirtala`. Any option you set explicitly still wins,\n so set `autoApproveOptions` if you aren't `nikovirtala`.\n- **tsconfig**: `noImplicitOverride` and `allowSyntheticDefaultImports` move from `tsconfig.json`\n to the development tsconfig (`test/tsconfig.json`).\n- **Options removed from the interface**: `eslint`, `jest`, `prettier` (and their options),\n `sampleCode` and `tsJestOptions`.\n- `vitestOptions` takes the `VitestOptions` of this library, and now also `homebrewOptions` and\n `miseOptions`.\n\n## Development\n\nThis project is managed by Projen and generates itself: `.projenrc.ts` defines the project using the\n`JsiiProject` type from `src/`. Configuration changes belong in `.projenrc.ts`, never in the\ngenerated files.\n\n```bash\npnpm projen # synthesize project files\npnpm build # synthesize, compile, test and package\npnpm test # biome, vitest, typedoc\npnpm test:watch # vitest in watch mode\npnpm test:update # update snapshots\npnpm biome # format and lint\npnpm docgen # regenerate API.md from the .jsii manifest\npnpm update-versions # refresh src/versions.json\npnpm upgrade # upgrade dependencies\n```\n\n### Build process\n\n```mermaid\nflowchart TD\n projenrc[\".projenrc.ts\"]\n\n subgraph synthesize[\"default (synthesize)\"]\n direction TB\n synth[\"tsx .projenrc.ts\"]\n generator[\"ProjectGenerator\"]\n generated[\"src/project-type.ts<br/>src/projects/*.generated.ts<br/>src/projects/*-options.generated.ts\"]\n projenfiles[\"package.json, tsconfig.json,<br/>pnpm-workspace.yaml, workflows, ...\"]\n brew[\"install:homebrew<br/>brew bundle\"]\n definecfg[\"bundle-vitest-define-config<br/>esbuild → lib/vitest-define-config.js\"]\n\n synth --> generator --> generated\n synth --> projenfiles\n synth --> brew\n synth --> definecfg\n end\n\n subgraph compile[\"compile\"]\n direction TB\n jsii[\"jsii<br/>validates tsconfig.json against the strict rule set\"]\n lib[\"lib/**\"]\n manifest[\".jsii manifest\"]\n\n jsii --> lib\n jsii --> manifest\n end\n\n subgraph test[\"test\"]\n direction TB\n biome[\"biome check --write\"]\n vitest[\"vitest run<br/>+ type checking\"]\n typedoc[\"typedoc → docs/api\"]\n\n biome --> vitest --> typedoc\n end\n\n subgraph package[\"package\"]\n direction TB\n pacmak[\"jsii-pacmak<br/>--pack-command 'pnpm pack'\"]\n dist[\"dist/js/*.tgz\"]\n\n pacmak --> dist\n end\n\n projenrc --> synthesize\n synthesize --> compile\n compile --> test\n test --> package\n\n manifest -. \"component options FQNs<br/>read on the next synthesis\" .-> generator\n docgen[\"docgen<br/>jsii-docgen → API.md\"]\n manifest --> docgen\n\n classDef artifact fill:#eef,stroke:#88a\n class generated,projenfiles,lib,manifest,dist artifact\n```\n\nThe dashed edge is the part worth knowing about: `ProjectGenerator` reads the committed `.jsii`\nmanifest to resolve component options types, so the manifest produced by `compile` feeds the *next*\nsynthesis. This is why `.jsii` is committed rather than ignored. A component options type that is\nmissing from the manifest is reported as a warning and its options property is left out of the\ngenerated interface, which is expected only while a new component is being introduced: compile once,\nthen synthesize again.\n\n`package` runs `package:js` on CI and `package-all` locally; both end up in `jsii-pacmak`.\n`docgen` is not part of `build` and has to be run explicitly after the manifest changes.\n"
|
|
4199
|
+
"markdown": "# @nikovirtala/projen-constructs\n\nProjen project types with standard configuration for consistent project setup across all repositories.\n\n## Installation\n\n```bash\npnpm add -D @nikovirtala/projen-constructs projen constructs\n```\n\nRequires pnpm 11 and `projen` >= 0.101.27. `@mrgrain/cdk-esbuild` and `constructs` are peer\ndependencies as well.\n\nTo create a project from scratch:\n\n```bash\npnpm dlx projen new --from @nikovirtala/projen-constructs aws_cdk_construct_library\n```\n\n## Features\n\n- **Standard Configuration**: Opinionated defaults for author, release branch, package manager, Node.js, TypeScript, and tooling\n- **Automatic Project Type Discovery**: Generates the `ProjectType` enum from Projen's JSII manifest (19 project types)\n- **Component System**: Reusable components (Vitest, TypeDoc, Mise, Homebrew, Colima, LocalStack, Lambda bundling)\n- **Code Generation**: `ProjectGenerator` creates project classes with standard configuration\n- **ES Modules**: TypeScript and CDK App projects use ES modules (JSII uses CommonJS)\n- **Code Quality**: Biome for formatting and linting\n- **Testing**: Vitest with coverage\n- **Auto-merge**: Enabled with auto-approve\n- **VSCode**: Recommended extensions and settings\n- **mise**: Node version management\n\n## Standard Configuration\n\n- **Author**: Niko Virtala (niko.virtala@hey.com)\n- **Default Release Branch**: main\n- **Package Manager**: pnpm 11.20.0\n- **Node Version**: 24.19.0\n- **TypeScript**: 6.0.3\n- **CDK Version**: 2.263.0 (for CDK projects)\n- **JSII Version**: ~6.0.3 (for JSII projects)\n\nThe AWS CDK, Node.js and TypeScript versions live in `src/versions.json` and are refreshed by the\n`update-versions` task, which the dependency upgrade workflow runs.\n\n### pnpm\n\npnpm reads its settings from `pnpm-workspace.yaml`, not `.npmrc`, since pnpm 11. Generated projects\nget:\n\n| Setting | Value | Reason |\n| ---------------------- | ----------------- | ------------------------------------------------------------------------------------------------------------ |\n| `nodeLinker` | `hoisted` | jsii tooling resolves dependencies from a flat `node_modules` |\n| `allowBuilds` | `esbuild: true` | esbuild links its platform binary in a postinstall script, and pnpm 11 fails an install with ignored builds |\n| `verifyDepsBeforeRun` | `false` | projen resolves the task `PATH` with `$(pnpm -c exec ...)`, which otherwise re-enters `pnpm install` and deadlocks |\n| `minimumReleaseAge` | `0` | the pnpm 11 default of 1440 minutes makes pnpm write `minimumReleaseAgeExclude` entries into this generated file |\n\n### TypeScript configuration\n\nProjen renders three configs, and none of them should be edited directly:\n\n- `tsconfig.json` compiles `src` to `lib`. For JSII projects, jsii validates it against its `strict`\n rule set, so it only carries compiler options jsii accepts.\n- `test/tsconfig.json` extends it and is type-check only. This is the config Vitest type checking and\n the editor use, and the one `tsconfigDev` points at.\n- `projenrc/tsconfig.json` covers `.projenrc.ts`.\n\n## Customization\n\nOverride any option by passing it to the constructor:\n\n```typescript\nconst project = new JsiiProject({\n name: \"my-project\",\n repositoryUrl: \"https://github.com/nikovirtala/my-project.git\",\n minNodeVersion: \"24.0.0\",\n author: \"Custom Author\",\n authorAddress: \"custom@example.com\",\n mise: false,\n vitest: false,\n tsconfig: {\n compilerOptions: {\n noUnusedLocals: false,\n },\n },\n biomeOptions: {\n biomeConfig: {\n formatter: {\n lineWidth: 100,\n },\n },\n },\n});\n```\n\nEvery component is exposed as an enable flag (`mise`, `vitest`, ...) plus an options property\n(`miseOptions`, `vitestOptions`, ...).\n\n## Usage\n\n### Projects\n\n#### AWS CDK Construct Library Project\n\n```typescript\nimport { AwsCdkConstructLibraryProject } from \"@nikovirtala/projen-constructs\";\n\nconst project = new AwsCdkConstructLibraryProject({\n name: \"my-cdk-construct\",\n repositoryUrl: \"https://github.com/nikovirtala/my-cdk-construct.git\",\n});\n\nproject.synth();\n```\n\n#### AWS CDK TypeScript App Project\n\n```typescript\nimport { AwsCdkTypeScriptAppProject } from \"@nikovirtala/projen-constructs\";\n\nconst project = new AwsCdkTypeScriptAppProject({\n name: \"my-cdk-app\",\n repositoryUrl: \"https://github.com/nikovirtala/my-cdk-app.git\",\n});\n\nproject.synth();\n```\n\n#### JSII Project\n\n```typescript\nimport { JsiiProject } from \"@nikovirtala/projen-constructs\";\n\nconst project = new JsiiProject({\n name: \"my-jsii-project\",\n repositoryUrl: \"https://github.com/nikovirtala/my-jsii-project.git\",\n});\n\nproject.synth();\n```\n\n#### TypeScript Project\n\n```typescript\nimport { TypeScriptProject } from \"@nikovirtala/projen-constructs\";\n\nconst project = new TypeScriptProject({\n name: \"my-typescript-project\",\n repositoryUrl: \"https://github.com/nikovirtala/my-typescript-project.git\",\n});\n\nproject.synth();\n```\n\n### Components\n\nThe package includes reusable components for common development tasks:\n\n#### Vitest\n\n[Vitest](https://vitest.dev) testing framework component.\n\n```typescript\nimport { Vitest } from \"@nikovirtala/projen-constructs\";\n\nnew Vitest(project, {\n vitestVersion: \"^4\",\n config: {\n coverageProvider: CoverageProvider.V8,\n coverageReporters: [CoverageReporter.TEXT, CoverageReporter.LCOV],\n },\n});\n```\n\nType checking runs against the project's development tsconfig (`test/tsconfig.json`) unless\n`config.typecheckTsconfig` says otherwise.\n\nFor Vitest settings that `config` doesn't cover, use `extraTestConfig` (merged into `test`) and\n`extraConfig` (top-level options next to `test`):\n\n```typescript\nnew Vitest(project, {\n extraTestConfig: {\n setupFiles: [\"test/setup.ts\"],\n },\n extraConfig: {\n resolve: { alias: { \"@\": \"/src\" } },\n },\n});\n```\n\n`extraTestConfig` is deep-merged over the generated `test` options: objects merge, and other values\n(including arrays) replace the generated value. Both options are rendered as JSON, so their values\ncan't contain functions or regular expressions, which rules out plugins.\n\n#### TypeDoc\n\n[TypeDoc](https://typedoc.org) documentation generation component.\n\n```typescript\nimport { TypeDoc, EntryPointStrategy } from \"@nikovirtala/projen-constructs\";\n\nnew TypeDoc(project, {\n version: \"^0.28\",\n typeDocConfig: {\n entryPointStrategy: EntryPointStrategy.EXPAND,\n out: \"docs/api\",\n exclude: [\"**/*.test.ts\"],\n },\n});\n```\n\n#### Mise\n\n[Mise](https://mise.jdx.dev) dev tools/runtimes management component.\n\n```typescript\nimport { Mise } from \"@nikovirtala/projen-constructs\";\n\nnew Mise(project, {\n nodeVersion: \"24.19.0\",\n});\n```\n\n#### Homebrew\n\n[Homebrew](https://brew.sh) package management component. Writes a `Brewfile` and adds an\n`install:homebrew` task that bootstraps Homebrew and runs `brew bundle`.\n\n```typescript\nimport { Homebrew } from \"@nikovirtala/projen-constructs\";\n\nconst homebrew = new Homebrew(project, {\n packages: [\"jq\", \"yq\"],\n});\n\nhomebrew.addPackage(\"gh\");\n```\n\nA fully qualified formula (`user/repository/formula`) also adds a `tap` entry. Since Homebrew 6,\nformulae from non-official taps only load when trusted, so they're written with `trusted: true`.\nThat trusts only the formula, not the rest of its tap.\n\n#### Colima\n\n[Colima](https://github.com/abiosoft/colima) container runtime component. Alternative for Docker.\n\n```typescript\nimport { Colima } from \"@nikovirtala/projen-constructs\";\n\nnew Colima(project);\n```\n\n#### LocalStack\n\n[LocalStack](https://www.localstack.cloud) AWS emulation component.\n\n```typescript\nimport { LocalStack } from \"@nikovirtala/projen-constructs\";\n\nnew LocalStack(project, {\n services: [\"s3\", \"lambda\", \"dynamodb\"],\n port: 4566,\n debug: true,\n});\n```\n\n#### LambdaFunctionConstructGenerator\n\nGenerates AWS CDK Lambda Function constructs and bundles their code.\n\n```typescript\nimport { LambdaFunctionConstructGenerator } from \"@nikovirtala/projen-constructs\";\n\nnew LambdaFunctionConstructGenerator(project, {\n sourceDir: \"src/handlers\",\n outputDir: \"src/constructs/lambda\",\n filePattern: \"*.lambda.ts\",\n esbuildOptions: {\n minify: true,\n sourcemap: true,\n },\n});\n```\n\n#### Bundler\n\nLow-level bundling utilities for Lambda functions.\n\n```typescript\nimport {\n Bundler,\n LambdaFunctionCodeBundle,\n} from \"@nikovirtala/projen-constructs\";\n\nconst bundler = new Bundler(project, {\n assetsDir: \"assets\",\n esbuildVersion: \"^0.25\",\n});\n\nnew LambdaFunctionCodeBundle(project, {\n entrypoint: \"src/my-function.lambda.ts\",\n extension: \".lambda.ts\",\n});\n```\n\n#### ProjectGenerator\n\nGenerates TypeScript project classes with standard configuration.\n\n```typescript\nimport { ProjectGenerator, ProjectType } from \"@nikovirtala/projen-constructs\";\n\nnew ProjectGenerator(project, {\n name: \"TypeScriptProject\",\n projectType: ProjectType.TYPE_SCRIPT_PROJECT,\n filePath: \"./src/projects/typescript.generated.ts\",\n components: [\n { componentClass: Mise },\n { componentClass: Vitest }, // Auto-detects VitestOptions from JSII manifest\n ],\n});\n```\n\nFeatures:\n\n- Automatically generates the `ProjectType` enum from Projen's JSII manifest\n- Auto-detects component options types from JSII manifests\n- Strips Projen's `@pjnew` annotation from `packageManager`, which `projen new` would otherwise\n render into a generated `.projenrc.ts` as the package manager that ran the command\n- Validates paths to prevent directory traversal attacks\n- Structured error handling with custom error classes\n\n## Migrating from the standalone packages\n\nThe components used to be published as separate packages. Those packages are deprecated and won't\nget new features or fixes. Every class, interface, enum and function they exported is exported from\n`@nikovirtala/projen-constructs` under the same name, except `AwsCdkApp` (see below).\n\n| Deprecated package | Replacement in `@nikovirtala/projen-constructs` |\n| --- | --- |\n| `@nikovirtala/projen-vitest` | `Vitest`, `VitestOptions`, `VitestConfigOptions`, `Environment`, `Pool`, `CoverageProvider`, `CoverageReporter` |\n| `@nikovirtala/projen-typedoc` | `TypeDoc`, `TypeDocOptions`, `TypeDocConfiguration` and its enums |\n| `@nikovirtala/projen-homebrew` | `Homebrew`, `HomebrewOptions` |\n| `@nikovirtala/projen-colima` | `Colima` |\n| `@nikovirtala/projen-localstack` | `LocalStack`, `LocalStackOptions` |\n| `@nikovirtala/projen-bundle-lambda-function-code` | `Bundler`, `LambdaFunctionCodeBundle`, `LambdaFunctionCodeBundler` and their options |\n| `@nikovirtala/projen-lambda-function-construct-generator` | `LambdaFunctionConstructGenerator`, `LambdaFunctionConstructGeneratorOptions` |\n| `@nikovirtala/projen-aws-cdk-app` | `AwsCdkTypeScriptAppProject`, `AwsCdkTypeScriptAppProjectOptions` |\n\n### Steps\n\n1. In `.projenrc.ts`, replace the old package in `devDeps` with `@nikovirtala/projen-constructs`, and\n change the imports:\n\n ```typescript\n // before\n import { Vitest } from \"@nikovirtala/projen-vitest\";\n // after\n import { Vitest } from \"@nikovirtala/projen-constructs\";\n ```\n\n2. Check the peer dependencies. `@nikovirtala/projen-constructs` needs `projen` ^0.104, `constructs`\n ^10 and `@mrgrain/cdk-esbuild` ^5. The standalone packages accepted older projen versions, so you\n may have to upgrade projen in the same change.\n3. Install the new package, run `npx projen` and review the changes to the generated files.\n\n### Changes to expect\n\nThese are the differences in behaviour or generated files between the standalone packages and this\nlibrary.\n\n**Vitest**\n\n- `vitest.config.ts` imports `defineConfig` from\n `@nikovirtala/projen-constructs/lib/vitest-define-config` instead of\n `@nikovirtala/projen-vitest/lib/bundled-define-config`. Projen rewrites the file, so there's\n nothing to change by hand.\n- The config is rendered as JSON, so its keys are quoted. The settings are the same.\n- `config.typecheckTsconfig` defaults to the project's development tsconfig (`test/tsconfig.json`\n in current projen) instead of `tsconfig.dev.json`.\n- JSII and construct library projects exclude `vitest.config.ts` from the published package.\n- New: `extraTestConfig` and `extraConfig` for Vitest settings that `config` doesn't cover.\n\n**Homebrew and Colima**\n\n- Packages from a tap (`owner/tap/formula`) also add a `tap` line to the `Brewfile`, and the\n `Brewfile` is sorted.\n- The `install:homebrew`, `homebrew:bundle` and `colima` tasks run in bash. `homebrew:bundle` also\n finds a freshly installed `brew` that isn't on the `PATH` yet.\n\n**LocalStack**\n\n- `imageTag` is applied: LocalStack starts with `localstack/localstack:<imageTag>`. It used to be\n ignored.\n\n**Bundler / LambdaFunctionCodeBundler**\n\n- `LambdaFunctionCodeBundler.bundleOptions` applies to every discovered entrypoint. Its `entrypoint`\n used to replace them all.\n\n**LambdaFunctionConstructGenerator**\n\n- The bundle task runs `tsx` with the project's development tsconfig instead of `tsconfig.dev.json`.\n\n**TypeDoc**: no changes.\n\n### From `AwsCdkApp` to `AwsCdkTypeScriptAppProject`\n\n```typescript\n// before\nimport { AwsCdkApp } from \"@nikovirtala/projen-aws-cdk-app\";\nconst project = new AwsCdkApp({ name: \"my-app\", cdkVersion: \"2.221.0\" });\n\n// after\nimport { AwsCdkTypeScriptAppProject } from \"@nikovirtala/projen-constructs\";\nconst project = new AwsCdkTypeScriptAppProject({ name: \"my-app\", cdkVersion: \"2.221.0\" });\n```\n\nBoth are ES module apps run with `tsx`, using pnpm, Biome, Vitest and mise. The differences:\n\n- **`nvm` is removed.** Use mise (on by default), which pins the Node.js version in `mise.toml`.\n- **Homebrew is on by default.** The project gets a `Brewfile`, and `npx projen` runs\n `install:homebrew` (installs Homebrew if `brew` is missing) and `homebrew:bundle`. Set\n `homebrew: false` to turn it off.\n- **cdk.json `app`** is `npx tsx src/main.ts` instead of `tsx --tsconfig tsconfig.json src/main.ts`.\n- **Defaults** come from this library: Node.js, TypeScript, CDK and pnpm versions (pnpm 11 instead\n of 10), Dependabot off, auto-merge on, `auto-approve` and `auto-merge` labels on dependency\n upgrade PRs, and auto-approval of PRs by `nikovirtala`. Any option you set explicitly still wins,\n so set `autoApproveOptions` if you aren't `nikovirtala`.\n- **tsconfig**: `noImplicitOverride` and `allowSyntheticDefaultImports` move from `tsconfig.json`\n to the development tsconfig (`test/tsconfig.json`).\n- **Options removed from the interface**: `eslint`, `jest`, `prettier` (and their options),\n `sampleCode` and `tsJestOptions`.\n- `vitestOptions` takes the `VitestOptions` of this library, and now also `homebrewOptions` and\n `miseOptions`.\n\n## Development\n\nThis project is managed by Projen and generates itself: `.projenrc.ts` defines the project using the\n`JsiiProject` type from `src/`. Configuration changes belong in `.projenrc.ts`, never in the\ngenerated files.\n\n```bash\npnpm projen # synthesize project files\npnpm build # synthesize, compile, test and package\npnpm test # biome, vitest, typedoc\npnpm test:watch # vitest in watch mode\npnpm test:update # update snapshots\npnpm biome # format and lint\npnpm docgen # regenerate API.md from the .jsii manifest\npnpm update-versions # refresh src/versions.json\npnpm upgrade # upgrade dependencies\n```\n\n### Build process\n\n```mermaid\nflowchart TD\n projenrc[\".projenrc.ts\"]\n\n subgraph synthesize[\"default (synthesize)\"]\n direction TB\n synth[\"tsx .projenrc.ts\"]\n generator[\"ProjectGenerator\"]\n generated[\"src/project-type.ts<br/>src/projects/*.generated.ts<br/>src/projects/*-options.generated.ts\"]\n projenfiles[\"package.json, tsconfig.json,<br/>pnpm-workspace.yaml, workflows, ...\"]\n brew[\"install:homebrew<br/>brew bundle\"]\n definecfg[\"bundle-vitest-define-config<br/>esbuild → lib/vitest-define-config.js\"]\n\n synth --> generator --> generated\n synth --> projenfiles\n synth --> brew\n synth --> definecfg\n end\n\n subgraph compile[\"compile\"]\n direction TB\n jsii[\"jsii<br/>validates tsconfig.json against the strict rule set\"]\n lib[\"lib/**\"]\n manifest[\".jsii manifest\"]\n\n jsii --> lib\n jsii --> manifest\n end\n\n subgraph test[\"test\"]\n direction TB\n biome[\"biome check --write\"]\n vitest[\"vitest run<br/>+ type checking\"]\n typedoc[\"typedoc → docs/api\"]\n\n biome --> vitest --> typedoc\n end\n\n subgraph package[\"package\"]\n direction TB\n pacmak[\"jsii-pacmak<br/>--pack-command 'pnpm pack'\"]\n dist[\"dist/js/*.tgz\"]\n\n pacmak --> dist\n end\n\n projenrc --> synthesize\n synthesize --> compile\n compile --> test\n test --> package\n\n manifest -. \"component options FQNs<br/>read on the next synthesis\" .-> generator\n docgen[\"docgen<br/>jsii-docgen → API.md\"]\n manifest --> docgen\n\n classDef artifact fill:#eef,stroke:#88a\n class generated,projenfiles,lib,manifest,dist artifact\n```\n\nThe dashed edge is the part worth knowing about: `ProjectGenerator` reads the committed `.jsii`\nmanifest to resolve component options types, so the manifest produced by `compile` feeds the *next*\nsynthesis. This is why `.jsii` is committed rather than ignored. A component options type that is\nmissing from the manifest is reported as a warning and its options property is left out of the\ngenerated interface, which is expected only while a new component is being introduced: compile once,\nthen synthesize again.\n\n`package` runs `package:js` on CI and `package-all` locally; both end up in `jsii-pacmak`.\n`docgen` is not part of `build` and has to be run explicitly after the manifest changes.\n"
|
|
4200
4200
|
},
|
|
4201
4201
|
"repository": {
|
|
4202
4202
|
"type": "git",
|
|
@@ -11961,7 +11961,7 @@
|
|
|
11961
11961
|
},
|
|
11962
11962
|
"locationInModule": {
|
|
11963
11963
|
"filename": "src/components/homebrew.ts",
|
|
11964
|
-
"line":
|
|
11964
|
+
"line": 37
|
|
11965
11965
|
},
|
|
11966
11966
|
"parameters": [
|
|
11967
11967
|
{
|
|
@@ -11982,7 +11982,7 @@
|
|
|
11982
11982
|
"kind": "class",
|
|
11983
11983
|
"locationInModule": {
|
|
11984
11984
|
"filename": "src/components/homebrew.ts",
|
|
11985
|
-
"line":
|
|
11985
|
+
"line": 29
|
|
11986
11986
|
},
|
|
11987
11987
|
"methods": [
|
|
11988
11988
|
{
|
|
@@ -11991,7 +11991,7 @@
|
|
|
11991
11991
|
},
|
|
11992
11992
|
"locationInModule": {
|
|
11993
11993
|
"filename": "src/components/homebrew.ts",
|
|
11994
|
-
"line":
|
|
11994
|
+
"line": 30
|
|
11995
11995
|
},
|
|
11996
11996
|
"name": "of",
|
|
11997
11997
|
"parameters": [
|
|
@@ -12016,7 +12016,7 @@
|
|
|
12016
12016
|
},
|
|
12017
12017
|
"locationInModule": {
|
|
12018
12018
|
"filename": "src/components/homebrew.ts",
|
|
12019
|
-
"line":
|
|
12019
|
+
"line": 54
|
|
12020
12020
|
},
|
|
12021
12021
|
"name": "addPackage",
|
|
12022
12022
|
"parameters": [
|
|
@@ -12042,19 +12042,23 @@
|
|
|
12042
12042
|
"kind": "interface",
|
|
12043
12043
|
"locationInModule": {
|
|
12044
12044
|
"filename": "src/components/homebrew.ts",
|
|
12045
|
-
"line":
|
|
12045
|
+
"line": 15
|
|
12046
12046
|
},
|
|
12047
12047
|
"name": "HomebrewOptions",
|
|
12048
12048
|
"properties": [
|
|
12049
12049
|
{
|
|
12050
12050
|
"abstract": true,
|
|
12051
12051
|
"docs": {
|
|
12052
|
-
"
|
|
12052
|
+
"default": "[]",
|
|
12053
|
+
"remarks": "A fully qualified formula adds a `tap` entry for its tap. Formulae from non-official taps\nare marked `trusted: true` in the `Brewfile`, since Homebrew 6 only loads trusted formulae\nfrom non-official taps. Only the formula is trusted, not the rest of its tap.",
|
|
12054
|
+
"see": "https://docs.brew.sh/Tap-Trust",
|
|
12055
|
+
"stability": "stable",
|
|
12056
|
+
"summary": "Formulae to install, by name (`jq`) or fully qualified (`user/repository/formula`)."
|
|
12053
12057
|
},
|
|
12054
12058
|
"immutable": true,
|
|
12055
12059
|
"locationInModule": {
|
|
12056
12060
|
"filename": "src/components/homebrew.ts",
|
|
12057
|
-
"line":
|
|
12061
|
+
"line": 26
|
|
12058
12062
|
},
|
|
12059
12063
|
"name": "packages",
|
|
12060
12064
|
"optional": true,
|
|
@@ -21393,6 +21397,6 @@
|
|
|
21393
21397
|
"symbolId": "src/components/vitest:VitestOptions"
|
|
21394
21398
|
}
|
|
21395
21399
|
},
|
|
21396
|
-
"version": "0.3.
|
|
21397
|
-
"fingerprint": "
|
|
21400
|
+
"version": "0.3.84",
|
|
21401
|
+
"fingerprint": "2BmkH+gG8kVks7fnwXToMINuRneaUtI6kONUbzl+/f8="
|
|
21398
21402
|
}
|
package/README.md
CHANGED
|
@@ -237,6 +237,10 @@ const homebrew = new Homebrew(project, {
|
|
|
237
237
|
homebrew.addPackage("gh");
|
|
238
238
|
```
|
|
239
239
|
|
|
240
|
+
A fully qualified formula (`user/repository/formula`) also adds a `tap` entry. Since Homebrew 6,
|
|
241
|
+
formulae from non-official taps only load when trusted, so they're written with `trusted: true`.
|
|
242
|
+
That trusts only the formula, not the rest of its tap.
|
|
243
|
+
|
|
240
244
|
#### Colima
|
|
241
245
|
|
|
242
246
|
[Colima](https://github.com/abiosoft/colima) container runtime component. Alternative for Docker.
|
package/docs/api/index.html
CHANGED
|
@@ -146,6 +146,9 @@ can't contain functions or regular expressions, which rules out plugins.</p>
|
|
|
146
146
|
<pre><code class="typescript"><span class="hl-7">import</span><span class="hl-1"> { </span><span class="hl-5">Homebrew</span><span class="hl-1"> } </span><span class="hl-7">from</span><span class="hl-1"> </span><span class="hl-2">"@nikovirtala/projen-constructs"</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">homebrew</span><span class="hl-1"> = </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-0">Homebrew</span><span class="hl-1">(</span><span class="hl-5">project</span><span class="hl-1">, {</span><br/><span class="hl-1"> </span><span class="hl-5">packages:</span><span class="hl-1"> [</span><span class="hl-2">"jq"</span><span class="hl-1">, </span><span class="hl-2">"yq"</span><span class="hl-1">],</span><br/><span class="hl-1">});</span><br/><br/><span class="hl-5">homebrew</span><span class="hl-1">.</span><span class="hl-0">addPackage</span><span class="hl-1">(</span><span class="hl-2">"gh"</span><span class="hl-1">);</span>
|
|
147
147
|
</code><button type="button">Copy</button></pre>
|
|
148
148
|
|
|
149
|
+
<p>A fully qualified formula (<code>user/repository/formula</code>) also adds a <code>tap</code> entry. Since Homebrew 6,
|
|
150
|
+
formulae from non-official taps only load when trusted, so they're written with <code>trusted: true</code>.
|
|
151
|
+
That trusts only the formula, not the rest of its tap.</p>
|
|
149
152
|
<h4 id="colima" class="tsd-anchor-link">Colima<a href="#colima" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h4>
|
|
150
153
|
<p><a href="https://github.com/abiosoft/colima">Colima</a> container runtime component. Alternative for Docker.</p>
|
|
151
154
|
<pre><code class="typescript"><span class="hl-7">import</span><span class="hl-1"> { </span><span class="hl-5">Colima</span><span class="hl-1"> } </span><span class="hl-7">from</span><span class="hl-1"> </span><span class="hl-2">"@nikovirtala/projen-constructs"</span><span class="hl-1">;</span><br/><br/><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-0">Colima</span><span class="hl-1">(</span><span class="hl-5">project</span><span class="hl-1">);</span>
|
|
@@ -25,7 +25,21 @@
|
|
|
25
25
|
<section>
|
|
26
26
|
<section class="tsd-panel tsd-member">
|
|
27
27
|
<h3 class="tsd-anchor-link" id="packages"><code class="tsd-tag">Optional</code> <code class="tsd-tag">Readonly</code><span>packages</span><a href="#packages" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
|
|
28
|
-
<div class="tsd-signature"><span class="tsd-kind-property">packages</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span></div
|
|
28
|
+
<div class="tsd-signature"><span class="tsd-kind-property">packages</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span></div>
|
|
29
|
+
<div class="tsd-comment tsd-typography"><p>Formulae to install, by name (<code>jq</code>) or fully qualified (<code>user/repository/formula</code>).</p>
|
|
30
|
+
<p>A fully qualified formula adds a <code>tap</code> entry for its tap. Formulae from non-official taps
|
|
31
|
+
are marked <code>trusted: true</code> in the <code>Brewfile</code>, since Homebrew 6 only loads trusted formulae
|
|
32
|
+
from non-official taps. Only the formula is trusted, not the rest of its tap.</p>
|
|
33
|
+
</div>
|
|
34
|
+
<div class="tsd-comment tsd-typography">
|
|
35
|
+
<div class="tsd-tag-default">
|
|
36
|
+
<h4 class="tsd-anchor-link" id="default">Default<a href="#default" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-1">[]</span>
|
|
37
|
+
</code><button type="button">Copy</button></pre>
|
|
38
|
+
|
|
39
|
+
</div>
|
|
40
|
+
<div class="tsd-tag-see">
|
|
41
|
+
<h4 class="tsd-anchor-link" id="see">See<a href="#see" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p><a href="https://docs.brew.sh/Tap-Trust">https://docs.brew.sh/Tap-Trust</a></p>
|
|
42
|
+
</div></div></section></section></details></div>
|
|
29
43
|
<div class="col-sidebar">
|
|
30
44
|
<div class="page-menu">
|
|
31
45
|
<div class="tsd-navigation settings">
|
|
@@ -67,7 +67,7 @@ function convertToPosixPath(p) {
|
|
|
67
67
|
* single file.
|
|
68
68
|
*/
|
|
69
69
|
class Bundler extends projen_1.Component {
|
|
70
|
-
static [JSII_RTTI_SYMBOL_1] = { fqn: "@nikovirtala/projen-constructs.Bundler", version: "0.3.
|
|
70
|
+
static [JSII_RTTI_SYMBOL_1] = { fqn: "@nikovirtala/projen-constructs.Bundler", version: "0.3.84" };
|
|
71
71
|
/**
|
|
72
72
|
* Returns the `Bundler` instance associated with a project or `undefined` if
|
|
73
73
|
* there is no Bundler.
|
|
@@ -221,7 +221,7 @@ exports.Bundler = Bundler;
|
|
|
221
221
|
* });
|
|
222
222
|
*/
|
|
223
223
|
class LambdaFunctionCodeBundle extends projen_1.Component {
|
|
224
|
-
static [JSII_RTTI_SYMBOL_1] = { fqn: "@nikovirtala/projen-constructs.LambdaFunctionCodeBundle", version: "0.3.
|
|
224
|
+
static [JSII_RTTI_SYMBOL_1] = { fqn: "@nikovirtala/projen-constructs.LambdaFunctionCodeBundle", version: "0.3.84" };
|
|
225
225
|
/**
|
|
226
226
|
* Defines a pre-bundled AWS Lambda Function code asset from handler code.
|
|
227
227
|
*
|
|
@@ -273,7 +273,7 @@ exports.LambdaFunctionCodeBundle = LambdaFunctionCodeBundle;
|
|
|
273
273
|
* Creates Lambda Function code bundles from entrypoints discovered in the project's source tree.
|
|
274
274
|
*/
|
|
275
275
|
class LambdaFunctionCodeBundler extends projen_1.cdk.AutoDiscoverBase {
|
|
276
|
-
static [JSII_RTTI_SYMBOL_1] = { fqn: "@nikovirtala/projen-constructs.LambdaFunctionCodeBundler", version: "0.3.
|
|
276
|
+
static [JSII_RTTI_SYMBOL_1] = { fqn: "@nikovirtala/projen-constructs.LambdaFunctionCodeBundler", version: "0.3.84" };
|
|
277
277
|
constructor(project, options) {
|
|
278
278
|
super(project, {
|
|
279
279
|
projectdir: options.srcdir,
|
package/lib/components/colima.js
CHANGED
|
@@ -11,7 +11,7 @@ const homebrew_1 = require("./homebrew");
|
|
|
11
11
|
* Adds Colima support to your project with automatic installation and startup.
|
|
12
12
|
*/
|
|
13
13
|
class Colima extends component_1.Component {
|
|
14
|
-
static [JSII_RTTI_SYMBOL_1] = { fqn: "@nikovirtala/projen-constructs.Colima", version: "0.3.
|
|
14
|
+
static [JSII_RTTI_SYMBOL_1] = { fqn: "@nikovirtala/projen-constructs.Colima", version: "0.3.84" };
|
|
15
15
|
constructor(scope) {
|
|
16
16
|
super(scope);
|
|
17
17
|
const project = this.project;
|
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
import { Component } from "projen/lib/component";
|
|
2
2
|
import type { Project } from "projen/lib/project";
|
|
3
3
|
export interface HomebrewOptions {
|
|
4
|
+
/**
|
|
5
|
+
* Formulae to install, by name (`jq`) or fully qualified (`user/repository/formula`).
|
|
6
|
+
*
|
|
7
|
+
* A fully qualified formula adds a `tap` entry for its tap. Formulae from non-official taps
|
|
8
|
+
* are marked `trusted: true` in the `Brewfile`, since Homebrew 6 only loads trusted formulae
|
|
9
|
+
* from non-official taps. Only the formula is trusted, not the rest of its tap.
|
|
10
|
+
*
|
|
11
|
+
* @default []
|
|
12
|
+
* @see https://docs.brew.sh/Tap-Trust
|
|
13
|
+
*/
|
|
4
14
|
readonly packages?: string[];
|
|
5
15
|
}
|
|
6
16
|
export declare class Homebrew extends Component {
|
|
@@ -5,8 +5,16 @@ const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti");
|
|
|
5
5
|
const component_1 = require("projen/lib/component");
|
|
6
6
|
const task_shell_1 = require("projen/lib/task-shell");
|
|
7
7
|
const textfile_1 = require("projen/lib/textfile");
|
|
8
|
+
/**
|
|
9
|
+
* Returns the tap of a fully qualified formula name (`user/repository/formula`), or `undefined`
|
|
10
|
+
* for a formula from Homebrew's default tap.
|
|
11
|
+
*/
|
|
12
|
+
function tapOf(packageName) {
|
|
13
|
+
const parts = packageName.split("/");
|
|
14
|
+
return parts.length === 3 ? `${parts[0]}/${parts[1]}` : undefined;
|
|
15
|
+
}
|
|
8
16
|
class Homebrew extends component_1.Component {
|
|
9
|
-
static [JSII_RTTI_SYMBOL_1] = { fqn: "@nikovirtala/projen-constructs.Homebrew", version: "0.3.
|
|
17
|
+
static [JSII_RTTI_SYMBOL_1] = { fqn: "@nikovirtala/projen-constructs.Homebrew", version: "0.3.84" };
|
|
10
18
|
static of(project) {
|
|
11
19
|
const isHomebrew = (c) => c instanceof Homebrew;
|
|
12
20
|
return project.components.find(isHomebrew);
|
|
@@ -35,9 +43,8 @@ class Homebrew extends component_1.Component {
|
|
|
35
43
|
const lines = [];
|
|
36
44
|
const taps = new Set();
|
|
37
45
|
for (const pkg of this.packages) {
|
|
38
|
-
const
|
|
39
|
-
if (
|
|
40
|
-
const tap = `${parts[0]}/${parts[1]}`;
|
|
46
|
+
const tap = tapOf(pkg);
|
|
47
|
+
if (tap) {
|
|
41
48
|
taps.add(tap);
|
|
42
49
|
}
|
|
43
50
|
}
|
|
@@ -45,7 +52,11 @@ class Homebrew extends component_1.Component {
|
|
|
45
52
|
lines.push(`tap "${tap}"`);
|
|
46
53
|
}
|
|
47
54
|
for (const pkg of Array.from(this.packages).sort()) {
|
|
48
|
-
|
|
55
|
+
/* Since Homebrew 6, formulae from non-official taps only load when trusted. Trust
|
|
56
|
+
* the formula that was asked for by name rather than its whole tap. */
|
|
57
|
+
const tap = tapOf(pkg);
|
|
58
|
+
const trusted = tap !== undefined && !tap.startsWith("homebrew/");
|
|
59
|
+
lines.push(trusted ? `brew "${pkg}", trusted: true` : `brew "${pkg}"`);
|
|
49
60
|
}
|
|
50
61
|
new textfile_1.TextFile(this, "Brewfile", {
|
|
51
62
|
lines,
|
|
@@ -64,4 +75,4 @@ class Homebrew extends component_1.Component {
|
|
|
64
75
|
}
|
|
65
76
|
}
|
|
66
77
|
exports.Homebrew = Homebrew;
|
|
67
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
78
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaG9tZWJyZXcuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvY29tcG9uZW50cy9ob21lYnJldy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7O0FBQUEsb0RBQWlEO0FBRWpELHNEQUFrRDtBQUNsRCxrREFBK0M7QUFFL0M7OztHQUdHO0FBQ0gsU0FBUyxLQUFLLENBQUMsV0FBbUI7SUFDOUIsTUFBTSxLQUFLLEdBQUcsV0FBVyxDQUFDLEtBQUssQ0FBQyxHQUFHLENBQUMsQ0FBQztJQUNyQyxPQUFPLEtBQUssQ0FBQyxNQUFN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yZXdmaWxlXCIsIHtcbiAgICAgICAgICAgIGxpbmVzLFxuICAgICAgICB9KTtcblxuICAgICAgICBjb25zdCBicmV3QnVuZGxlVGFzayA9XG4gICAgICAgICAgICB0aGlzLnByb2plY3QudGFza3MudHJ5RmluZChcImhvbWVicmV3OmJ1bmRsZVwiKSA/P1xuICAgICAgICAgICAgdGhpcy5wcm9qZWN0LmFkZFRhc2soXCJob21lYnJldzpidW5kbGVcIiwge1xuICAgICAgICAgICAgICAgIC8vIGBldmFsYCBhbmQgbXVsdGlwbGUgcmVkaXJlY3RzIGFyZSBub3Qgc3VwcG9ydGVkIGJ5IHByb2plbidzIGJ1aWx0LWluXG4gICAgICAgICAgICAgICAgLy8gY3Jvc3MtcGxhdGZvcm0gc2hlbGwsIHNvIHJ1biB0aGlzIHRocm91Z2ggYmFzaFxuICAgICAgICAgICAgICAgIHNoZWxsOiBUYXNrU2hlbGwuYmFzaCgpLFxuICAgICAgICAgICAgICAgIGV4ZWM6ICdjb21tYW5kIC12IGJyZXcgPi9kZXYvbnVsbCAyPiYxIHx8IGV2YWwgXCIkKC9ob21lL2xpbnV4YnJldy8ubGludXhicmV3L2Jpbi9icmV3IHNoZWxsZW52IDI+L2Rldi9udWxsIHx8IC9vcHQvaG9tZWJyZXcvYmluL2JyZXcgc2hlbGxlbnYgMj4vZGV2L251bGwpXCIgJiYgYnJldyBidW5kbGUnLFxuICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgY29uc3QgYnJld0luc3RhbGxUYXNrID0gdGhpcy5wcm9qZWN0LnRhc2tzLnRyeUZpbmQoXCJpbnN0YWxsOmhvbWVicmV3XCIpO1xuICAgICAgICBpZiAoYnJld0luc3RhbGxUYXNrICYmICFicmV3SW5zdGFsbFRhc2suc3RlcHMuc29tZSgocykgPT4gcy5zcGF3biA9PT0gXCJob21lYnJldzpidW5kbGVcIikpIHtcbiAgICAgICAgICAgIGJyZXdJbnN0YWxsVGFzay5zcGF3bihicmV3QnVuZGxlVGFzayk7XG4gICAgICAgIH1cbiAgICB9XG59XG4iXX0=
|
|
@@ -44,7 +44,7 @@ const utils_1 = require("../utils");
|
|
|
44
44
|
* The bundling happens during projen execution, not during CDK synth, enabling a "build once, deploy many" pattern.
|
|
45
45
|
*/
|
|
46
46
|
class LambdaFunctionConstructGenerator extends projen_1.Component {
|
|
47
|
-
static [JSII_RTTI_SYMBOL_1] = { fqn: "@nikovirtala/projen-constructs.LambdaFunctionConstructGenerator", version: "0.3.
|
|
47
|
+
static [JSII_RTTI_SYMBOL_1] = { fqn: "@nikovirtala/projen-constructs.LambdaFunctionConstructGenerator", version: "0.3.84" };
|
|
48
48
|
sourceDir;
|
|
49
49
|
outputDir;
|
|
50
50
|
filePattern;
|
|
@@ -12,7 +12,7 @@ const homebrew_1 = require("./homebrew");
|
|
|
12
12
|
* Adds LocalStack support to your project with automatic Docker/Colima setup.
|
|
13
13
|
*/
|
|
14
14
|
class LocalStack extends component_1.Component {
|
|
15
|
-
static [JSII_RTTI_SYMBOL_1] = { fqn: "@nikovirtala/projen-constructs.LocalStack", version: "0.3.
|
|
15
|
+
static [JSII_RTTI_SYMBOL_1] = { fqn: "@nikovirtala/projen-constructs.LocalStack", version: "0.3.84" };
|
|
16
16
|
constructor(scope, options = {}) {
|
|
17
17
|
super(scope);
|
|
18
18
|
const project = javascript_1.NodeProject.of(this);
|
package/lib/components/mise.js
CHANGED
|
@@ -7,7 +7,7 @@ const component_1 = require("projen/lib/component");
|
|
|
7
7
|
const textfile_1 = require("projen/lib/textfile");
|
|
8
8
|
const homebrew_1 = require("./homebrew");
|
|
9
9
|
class Mise extends component_1.Component {
|
|
10
|
-
static [JSII_RTTI_SYMBOL_1] = { fqn: "@nikovirtala/projen-constructs.Mise", version: "0.3.
|
|
10
|
+
static [JSII_RTTI_SYMBOL_1] = { fqn: "@nikovirtala/projen-constructs.Mise", version: "0.3.84" };
|
|
11
11
|
static of(project) {
|
|
12
12
|
const isMise = (c) => c instanceof Mise;
|
|
13
13
|
return project.components.find(isMise);
|
|
@@ -34,7 +34,7 @@ const DEFAULT_CONFIG = {
|
|
|
34
34
|
* TypeDoc component for projen projects
|
|
35
35
|
*/
|
|
36
36
|
class TypeDoc extends component_1.Component {
|
|
37
|
-
static [JSII_RTTI_SYMBOL_1] = { fqn: "@nikovirtala/projen-constructs.TypeDoc", version: "0.3.
|
|
37
|
+
static [JSII_RTTI_SYMBOL_1] = { fqn: "@nikovirtala/projen-constructs.TypeDoc", version: "0.3.84" };
|
|
38
38
|
static of(project) {
|
|
39
39
|
const isTypeDoc = (c) => c instanceof TypeDoc;
|
|
40
40
|
return project.components.find(isTypeDoc);
|
package/lib/components/vitest.js
CHANGED
|
@@ -141,7 +141,7 @@ var CoverageReporter;
|
|
|
141
141
|
CoverageReporter["TEXT"] = "text";
|
|
142
142
|
})(CoverageReporter || (exports.CoverageReporter = CoverageReporter = {}));
|
|
143
143
|
class Vitest extends component_1.Component {
|
|
144
|
-
static [JSII_RTTI_SYMBOL_1] = { fqn: "@nikovirtala/projen-constructs.Vitest", version: "0.3.
|
|
144
|
+
static [JSII_RTTI_SYMBOL_1] = { fqn: "@nikovirtala/projen-constructs.Vitest", version: "0.3.84" };
|
|
145
145
|
static of(project) {
|
|
146
146
|
const isVitest = (c) => c instanceof Vitest;
|
|
147
147
|
return project.components.find(isVitest);
|
package/lib/project-generator.js
CHANGED
|
@@ -428,7 +428,7 @@ class TypeScriptClassRenderer {
|
|
|
428
428
|
*/
|
|
429
429
|
class ProjectGenerator extends projen.Component {
|
|
430
430
|
options;
|
|
431
|
-
static [JSII_RTTI_SYMBOL_1] = { fqn: "@nikovirtala/projen-constructs.ProjectGenerator", version: "0.3.
|
|
431
|
+
static [JSII_RTTI_SYMBOL_1] = { fqn: "@nikovirtala/projen-constructs.ProjectGenerator", version: "0.3.84" };
|
|
432
432
|
renderer;
|
|
433
433
|
static enumGenerated = false;
|
|
434
434
|
/**
|
|
@@ -15,7 +15,7 @@ const utils_1 = require("../utils");
|
|
|
15
15
|
* Extends Projen's base class with opinionated defaults and automatic component setup.
|
|
16
16
|
*/
|
|
17
17
|
class AwsCdkConstructLibraryProject extends projen_1.awscdk.AwsCdkConstructLibrary {
|
|
18
|
-
static [JSII_RTTI_SYMBOL_1] = { fqn: "@nikovirtala/projen-constructs.AwsCdkConstructLibraryProject", version: "0.3.
|
|
18
|
+
static [JSII_RTTI_SYMBOL_1] = { fqn: "@nikovirtala/projen-constructs.AwsCdkConstructLibraryProject", version: "0.3.84" };
|
|
19
19
|
/**
|
|
20
20
|
* @param options - Project configuration
|
|
21
21
|
*/
|
|
@@ -15,7 +15,7 @@ const utils_1 = require("../utils");
|
|
|
15
15
|
* Extends Projen's base class with opinionated defaults and automatic component setup.
|
|
16
16
|
*/
|
|
17
17
|
class AwsCdkTypeScriptAppProject extends projen_1.awscdk.AwsCdkTypeScriptApp {
|
|
18
|
-
static [JSII_RTTI_SYMBOL_1] = { fqn: "@nikovirtala/projen-constructs.AwsCdkTypeScriptAppProject", version: "0.3.
|
|
18
|
+
static [JSII_RTTI_SYMBOL_1] = { fqn: "@nikovirtala/projen-constructs.AwsCdkTypeScriptAppProject", version: "0.3.84" };
|
|
19
19
|
/**
|
|
20
20
|
* @param options - Project configuration
|
|
21
21
|
*/
|
|
@@ -16,7 +16,7 @@ const utils_1 = require("../utils");
|
|
|
16
16
|
* Extends Projen's base class with opinionated defaults and automatic component setup.
|
|
17
17
|
*/
|
|
18
18
|
class JsiiProject extends projen_1.cdk.JsiiProject {
|
|
19
|
-
static [JSII_RTTI_SYMBOL_1] = { fqn: "@nikovirtala/projen-constructs.JsiiProject", version: "0.3.
|
|
19
|
+
static [JSII_RTTI_SYMBOL_1] = { fqn: "@nikovirtala/projen-constructs.JsiiProject", version: "0.3.84" };
|
|
20
20
|
/**
|
|
21
21
|
* @param options - Project configuration
|
|
22
22
|
*/
|
|
@@ -15,7 +15,7 @@ const utils_1 = require("../utils");
|
|
|
15
15
|
* Extends Projen's base class with opinionated defaults and automatic component setup.
|
|
16
16
|
*/
|
|
17
17
|
class TypeScriptProject extends projen_1.typescript.TypeScriptProject {
|
|
18
|
-
static [JSII_RTTI_SYMBOL_1] = { fqn: "@nikovirtala/projen-constructs.TypeScriptProject", version: "0.3.
|
|
18
|
+
static [JSII_RTTI_SYMBOL_1] = { fqn: "@nikovirtala/projen-constructs.TypeScriptProject", version: "0.3.84" };
|
|
19
19
|
/**
|
|
20
20
|
* @param options - Project configuration
|
|
21
21
|
*/
|