@nikovirtala/projen-constructs 0.3.79 → 0.3.81
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 +264 -131
- package/README.md +104 -0
- package/docs/api/classes/Bundler.html +33 -6
- package/docs/api/classes/Colima.html +4 -0
- package/docs/api/classes/LambdaFunctionCodeBundle.html +22 -2
- package/docs/api/classes/LambdaFunctionConstructGenerator.html +4 -0
- package/docs/api/classes/LocalStack.html +4 -0
- package/docs/api/functions/convertToPosixPath.html +2 -0
- package/docs/api/functions/renderBundleName.html +9 -1
- package/docs/api/index.html +129 -0
- package/docs/api/interfaces/Bundle.html +12 -3
- package/docs/api/interfaces/BundlerOptions.html +40 -4
- package/docs/api/interfaces/BundlingOptions.html +139 -12
- package/docs/api/interfaces/LambdaFunctionCodeBundleOptions.html +53 -5
- package/docs/api/interfaces/LambdaFunctionCodeBundlerOptions.html +26 -3
- package/docs/api/interfaces/LambdaFunctionConstructGeneratorOptions.html +90 -8
- package/docs/api/interfaces/LocalStackOptions.html +46 -4
- package/lib/components/bundle-lambda-function-code.d.ts +243 -0
- package/lib/components/bundle-lambda-function-code.js +75 -5
- package/lib/components/colima.d.ts +5 -0
- package/lib/components/colima.js +7 -2
- package/lib/components/homebrew.js +1 -1
- package/lib/components/lambda-function-construct-generator.d.ts +54 -0
- package/lib/components/lambda-function-construct-generator.js +7 -2
- package/lib/components/localstack.d.ts +32 -0
- package/lib/components/localstack.js +14 -2
- 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/README.md
CHANGED
|
@@ -327,6 +327,110 @@ Features:
|
|
|
327
327
|
- Validates paths to prevent directory traversal attacks
|
|
328
328
|
- Structured error handling with custom error classes
|
|
329
329
|
|
|
330
|
+
## Migrating from the standalone packages
|
|
331
|
+
|
|
332
|
+
The components used to be published as separate packages. Those packages are deprecated and won't
|
|
333
|
+
get new features or fixes. Every class, interface, enum and function they exported is exported from
|
|
334
|
+
`@nikovirtala/projen-constructs` under the same name, except `AwsCdkApp` (see below).
|
|
335
|
+
|
|
336
|
+
| Deprecated package | Replacement in `@nikovirtala/projen-constructs` |
|
|
337
|
+
| --- | --- |
|
|
338
|
+
| `@nikovirtala/projen-vitest` | `Vitest`, `VitestOptions`, `VitestConfigOptions`, `Environment`, `Pool`, `CoverageProvider`, `CoverageReporter` |
|
|
339
|
+
| `@nikovirtala/projen-typedoc` | `TypeDoc`, `TypeDocOptions`, `TypeDocConfiguration` and its enums |
|
|
340
|
+
| `@nikovirtala/projen-homebrew` | `Homebrew`, `HomebrewOptions` |
|
|
341
|
+
| `@nikovirtala/projen-colima` | `Colima` |
|
|
342
|
+
| `@nikovirtala/projen-localstack` | `LocalStack`, `LocalStackOptions` |
|
|
343
|
+
| `@nikovirtala/projen-bundle-lambda-function-code` | `Bundler`, `LambdaFunctionCodeBundle`, `LambdaFunctionCodeBundler` and their options |
|
|
344
|
+
| `@nikovirtala/projen-lambda-function-construct-generator` | `LambdaFunctionConstructGenerator`, `LambdaFunctionConstructGeneratorOptions` |
|
|
345
|
+
| `@nikovirtala/projen-aws-cdk-app` | `AwsCdkTypeScriptAppProject`, `AwsCdkTypeScriptAppProjectOptions` |
|
|
346
|
+
|
|
347
|
+
### Steps
|
|
348
|
+
|
|
349
|
+
1. In `.projenrc.ts`, replace the old package in `devDeps` with `@nikovirtala/projen-constructs`, and
|
|
350
|
+
change the imports:
|
|
351
|
+
|
|
352
|
+
```typescript
|
|
353
|
+
// before
|
|
354
|
+
import { Vitest } from "@nikovirtala/projen-vitest";
|
|
355
|
+
// after
|
|
356
|
+
import { Vitest } from "@nikovirtala/projen-constructs";
|
|
357
|
+
```
|
|
358
|
+
|
|
359
|
+
2. Check the peer dependencies. `@nikovirtala/projen-constructs` needs `projen` ^0.104, `constructs`
|
|
360
|
+
^10 and `@mrgrain/cdk-esbuild` ^5. The standalone packages accepted older projen versions, so you
|
|
361
|
+
may have to upgrade projen in the same change.
|
|
362
|
+
3. Install the new package, run `npx projen` and review the changes to the generated files.
|
|
363
|
+
|
|
364
|
+
### Changes to expect
|
|
365
|
+
|
|
366
|
+
These are the differences in behaviour or generated files between the standalone packages and this
|
|
367
|
+
library.
|
|
368
|
+
|
|
369
|
+
**Vitest**
|
|
370
|
+
|
|
371
|
+
- `vitest.config.ts` imports `defineConfig` from
|
|
372
|
+
`@nikovirtala/projen-constructs/lib/vitest-define-config` instead of
|
|
373
|
+
`@nikovirtala/projen-vitest/lib/bundled-define-config`. Projen rewrites the file, so there's
|
|
374
|
+
nothing to change by hand.
|
|
375
|
+
- The config is rendered as JSON, so its keys are quoted. The settings are the same.
|
|
376
|
+
- `config.typecheckTsconfig` defaults to the project's development tsconfig (`test/tsconfig.json`
|
|
377
|
+
in current projen) instead of `tsconfig.dev.json`.
|
|
378
|
+
- JSII and construct library projects exclude `vitest.config.ts` from the published package.
|
|
379
|
+
- New: `extraTestConfig` and `extraConfig` for Vitest settings that `config` doesn't cover.
|
|
380
|
+
|
|
381
|
+
**Homebrew and Colima**
|
|
382
|
+
|
|
383
|
+
- Packages from a tap (`owner/tap/formula`) also add a `tap` line to the `Brewfile`, and the
|
|
384
|
+
`Brewfile` is sorted.
|
|
385
|
+
- The `install:homebrew`, `homebrew:bundle` and `colima` tasks run in bash. `homebrew:bundle` also
|
|
386
|
+
finds a freshly installed `brew` that isn't on the `PATH` yet.
|
|
387
|
+
|
|
388
|
+
**LocalStack**
|
|
389
|
+
|
|
390
|
+
- `imageTag` is applied: LocalStack starts with `localstack/localstack:<imageTag>`. It used to be
|
|
391
|
+
ignored.
|
|
392
|
+
|
|
393
|
+
**Bundler / LambdaFunctionCodeBundler**
|
|
394
|
+
|
|
395
|
+
- `LambdaFunctionCodeBundler.bundleOptions` applies to every discovered entrypoint. Its `entrypoint`
|
|
396
|
+
used to replace them all.
|
|
397
|
+
|
|
398
|
+
**LambdaFunctionConstructGenerator**
|
|
399
|
+
|
|
400
|
+
- The bundle task runs `tsx` with the project's development tsconfig instead of `tsconfig.dev.json`.
|
|
401
|
+
|
|
402
|
+
**TypeDoc**: no changes.
|
|
403
|
+
|
|
404
|
+
### From `AwsCdkApp` to `AwsCdkTypeScriptAppProject`
|
|
405
|
+
|
|
406
|
+
```typescript
|
|
407
|
+
// before
|
|
408
|
+
import { AwsCdkApp } from "@nikovirtala/projen-aws-cdk-app";
|
|
409
|
+
const project = new AwsCdkApp({ name: "my-app", cdkVersion: "2.221.0" });
|
|
410
|
+
|
|
411
|
+
// after
|
|
412
|
+
import { AwsCdkTypeScriptAppProject } from "@nikovirtala/projen-constructs";
|
|
413
|
+
const project = new AwsCdkTypeScriptAppProject({ name: "my-app", cdkVersion: "2.221.0" });
|
|
414
|
+
```
|
|
415
|
+
|
|
416
|
+
Both are ES module apps run with `tsx`, using pnpm, Biome, Vitest and mise. The differences:
|
|
417
|
+
|
|
418
|
+
- **`nvm` is removed.** Use mise (on by default), which pins the Node.js version in `mise.toml`.
|
|
419
|
+
- **Homebrew is on by default.** The project gets a `Brewfile`, and `npx projen` runs
|
|
420
|
+
`install:homebrew` (installs Homebrew if `brew` is missing) and `homebrew:bundle`. Set
|
|
421
|
+
`homebrew: false` to turn it off.
|
|
422
|
+
- **cdk.json `app`** is `npx tsx src/main.ts` instead of `tsx --tsconfig tsconfig.json src/main.ts`.
|
|
423
|
+
- **Defaults** come from this library: Node.js, TypeScript, CDK and pnpm versions (pnpm 11 instead
|
|
424
|
+
of 10), Dependabot off, auto-merge on, `auto-approve` and `auto-merge` labels on dependency
|
|
425
|
+
upgrade PRs, and auto-approval of PRs by `nikovirtala`. Any option you set explicitly still wins,
|
|
426
|
+
so set `autoApproveOptions` if you aren't `nikovirtala`.
|
|
427
|
+
- **tsconfig**: `noImplicitOverride` and `allowSyntheticDefaultImports` move from `tsconfig.json`
|
|
428
|
+
to the development tsconfig (`test/tsconfig.json`).
|
|
429
|
+
- **Options removed from the interface**: `eslint`, `jest`, `prettier` (and their options),
|
|
430
|
+
`sampleCode` and `tsJestOptions`.
|
|
431
|
+
- `vitestOptions` takes the `VitestOptions` of this library, and now also `homebrewOptions` and
|
|
432
|
+
`miseOptions`.
|
|
433
|
+
|
|
330
434
|
## Development
|
|
331
435
|
|
|
332
436
|
This project is managed by Projen and generates itself: `.projenrc.ts` defines the project using the
|
|
@@ -10,6 +10,10 @@
|
|
|
10
10
|
<ul class="tsd-breadcrumb" aria-label="Breadcrumb">
|
|
11
11
|
<li><a href="" aria-current="page">Bundler</a></li></ul>
|
|
12
12
|
<h1>Class Bundler</h1></div>
|
|
13
|
+
<section class="tsd-panel tsd-comment">
|
|
14
|
+
<div class="tsd-comment tsd-typography"><p>Adds support for bundling JavaScript applications and dependencies into a
|
|
15
|
+
single file.</p>
|
|
16
|
+
</div></section>
|
|
13
17
|
<section class="tsd-panel tsd-hierarchy" data-refl="15">
|
|
14
18
|
<h4>Hierarchy</h4>
|
|
15
19
|
<ul class="tsd-hierarchy">
|
|
@@ -59,6 +63,8 @@
|
|
|
59
63
|
<li class="">
|
|
60
64
|
<div class="tsd-signature tsd-anchor-link" id="constructorbundler"><span class="tsd-signature-keyword">new</span> <span class="tsd-kind-constructor-signature">Bundler</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">project</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Project</span><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">options</span><span class="tsd-signature-symbol">?:</span> <a href="../interfaces/BundlerOptions.html" class="tsd-signature-type tsd-kind-interface">BundlerOptions</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <a href="" class="tsd-signature-type tsd-kind-class">Bundler</a><a href="#constructorbundler" 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></div>
|
|
61
65
|
<div class="tsd-description">
|
|
66
|
+
<div class="tsd-comment tsd-typography"><p>Creates a <code>Bundler</code>.</p>
|
|
67
|
+
</div>
|
|
62
68
|
<div class="tsd-parameters">
|
|
63
69
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
64
70
|
<ul class="tsd-parameter-list">
|
|
@@ -71,10 +77,14 @@
|
|
|
71
77
|
<section>
|
|
72
78
|
<section class="tsd-panel tsd-member">
|
|
73
79
|
<h3 class="tsd-anchor-link" id="bundledir"><code class="tsd-tag">Readonly</code><span>bundledir</span><a href="#bundledir" 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>
|
|
74
|
-
<div class="tsd-signature"><span class="tsd-kind-property">bundledir</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div
|
|
80
|
+
<div class="tsd-signature"><span class="tsd-kind-property">bundledir</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
|
|
81
|
+
<div class="tsd-comment tsd-typography"><p>Root bundle directory.</p>
|
|
82
|
+
</div></section>
|
|
75
83
|
<section class="tsd-panel tsd-member">
|
|
76
84
|
<h3 class="tsd-anchor-link" id="esbuildversion"><code class="tsd-tag">Readonly</code><span>esbuild<wbr/>Version</span><a href="#esbuildversion" 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>
|
|
77
|
-
<div class="tsd-signature"><span class="tsd-kind-property">esbuildVersion</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">undefined</span></div
|
|
85
|
+
<div class="tsd-signature"><span class="tsd-kind-property">esbuildVersion</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">undefined</span></div>
|
|
86
|
+
<div class="tsd-comment tsd-typography"><p>The semantic version requirement for <code>esbuild</code> (if defined).</p>
|
|
87
|
+
</div></section>
|
|
78
88
|
<section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external">
|
|
79
89
|
<h3 class="tsd-anchor-link" id="node"><code class="tsd-tag">Readonly</code><span>node</span><a href="#node" 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>
|
|
80
90
|
<div class="tsd-signature"><span class="tsd-kind-property">node</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Node</span></div>
|
|
@@ -94,6 +104,10 @@
|
|
|
94
104
|
<li>
|
|
95
105
|
<div class="tsd-signature" id="bundletaskbundletask"><span class="tsd-signature-keyword">get</span> <span class="tsd-kind-get-signature">bundleTask</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Task</span></div>
|
|
96
106
|
<div class="tsd-description">
|
|
107
|
+
<div class="tsd-comment tsd-typography"><p>Gets or creates the singleton "bundle" task of the project.</p>
|
|
108
|
+
<p>If the project doesn't have a "bundle" task, it will be created and spawned
|
|
109
|
+
during the pre-compile phase (unless <code>addToPreCompile</code> is <code>false</code>).</p>
|
|
110
|
+
</div>
|
|
97
111
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Task</span></h4></div></li></ul></section></section></details>
|
|
98
112
|
<details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Methods"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>
|
|
99
113
|
<h2 class="tsd-anchor-link" id="methods-1">Methods<a href="#methods-1" 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></h2></summary>
|
|
@@ -104,11 +118,18 @@
|
|
|
104
118
|
<li class="">
|
|
105
119
|
<div class="tsd-signature tsd-anchor-link" id="addbundle-1"><span class="tsd-kind-call-signature">addBundle</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">entrypoint</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">options</span><span class="tsd-signature-symbol">:</span> <a href="../interfaces/BundlingOptions.html" class="tsd-signature-type tsd-kind-interface">BundlingOptions</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <a href="../interfaces/Bundle.html" class="tsd-signature-type tsd-kind-interface">Bundle</a><a href="#addbundle-1" 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></div>
|
|
106
120
|
<div class="tsd-description">
|
|
121
|
+
<div class="tsd-comment tsd-typography"><p>Adds a task to the project which bundles a specific entrypoint and all of
|
|
122
|
+
its dependencies into a single javascript output file.</p>
|
|
123
|
+
</div>
|
|
107
124
|
<div class="tsd-parameters">
|
|
108
125
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
109
126
|
<ul class="tsd-parameter-list">
|
|
110
|
-
<li><span><span class="tsd-kind-parameter">entrypoint</span>: <span class="tsd-signature-type">string</span></span
|
|
111
|
-
<
|
|
127
|
+
<li><span><span class="tsd-kind-parameter">entrypoint</span>: <span class="tsd-signature-type">string</span></span>
|
|
128
|
+
<div class="tsd-comment tsd-typography"><p>The relative path of the artifact within the project</p>
|
|
129
|
+
</div></li>
|
|
130
|
+
<li><span><span class="tsd-kind-parameter">options</span>: <a href="../interfaces/BundlingOptions.html" class="tsd-signature-type tsd-kind-interface">BundlingOptions</a></span>
|
|
131
|
+
<div class="tsd-comment tsd-typography"><p>Bundling options</p>
|
|
132
|
+
</div></li></ul></div>
|
|
112
133
|
<h4 class="tsd-returns-title">Returns <a href="../interfaces/Bundle.html" class="tsd-signature-type tsd-kind-interface">Bundle</a></h4></div></li></ul></section>
|
|
113
134
|
<section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external">
|
|
114
135
|
<h3 class="tsd-anchor-link" id="postprojectcreation"><span>post<wbr/>Project<wbr/>Creation</span><a href="#postprojectcreation" 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>
|
|
@@ -258,11 +279,17 @@ this type-testing method instead.</p>
|
|
|
258
279
|
<li class="">
|
|
259
280
|
<div class="tsd-signature tsd-anchor-link" id="of-1"><span class="tsd-kind-call-signature">of</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">project</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Project</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <a href="" class="tsd-signature-type tsd-kind-class">Bundler</a> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">undefined</span><a href="#of-1" 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></div>
|
|
260
281
|
<div class="tsd-description">
|
|
282
|
+
<div class="tsd-comment tsd-typography"><p>Returns the <code>Bundler</code> instance associated with a project or <code>undefined</code> if
|
|
283
|
+
there is no Bundler.</p>
|
|
284
|
+
</div>
|
|
261
285
|
<div class="tsd-parameters">
|
|
262
286
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
263
287
|
<ul class="tsd-parameter-list">
|
|
264
|
-
<li><span><span class="tsd-kind-parameter">project</span>: <span class="tsd-signature-type">Project</span></span
|
|
265
|
-
<
|
|
288
|
+
<li><span><span class="tsd-kind-parameter">project</span>: <span class="tsd-signature-type">Project</span></span>
|
|
289
|
+
<div class="tsd-comment tsd-typography"><p>The project</p>
|
|
290
|
+
</div></li></ul></div>
|
|
291
|
+
<h4 class="tsd-returns-title">Returns <a href="" class="tsd-signature-type tsd-kind-class">Bundler</a> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">undefined</span></h4><p>A bundler</p>
|
|
292
|
+
</div></li></ul></section></section></details></div>
|
|
266
293
|
<div class="col-sidebar">
|
|
267
294
|
<div class="page-menu">
|
|
268
295
|
<div class="tsd-navigation settings">
|
|
@@ -10,6 +10,10 @@
|
|
|
10
10
|
<ul class="tsd-breadcrumb" aria-label="Breadcrumb">
|
|
11
11
|
<li><a href="" aria-current="page">Colima</a></li></ul>
|
|
12
12
|
<h1>Class Colima</h1></div>
|
|
13
|
+
<section class="tsd-panel tsd-comment">
|
|
14
|
+
<div class="tsd-comment tsd-typography"><p>Colima component for projen projects.</p>
|
|
15
|
+
<p>Adds Colima support to your project with automatic installation and startup.</p>
|
|
16
|
+
</div></section>
|
|
13
17
|
<section class="tsd-panel tsd-hierarchy" data-refl="155">
|
|
14
18
|
<h4>Hierarchy</h4>
|
|
15
19
|
<ul class="tsd-hierarchy">
|
|
@@ -10,6 +10,20 @@
|
|
|
10
10
|
<ul class="tsd-breadcrumb" aria-label="Breadcrumb">
|
|
11
11
|
<li><a href="" aria-current="page">LambdaFunctionCodeBundle</a></li></ul>
|
|
12
12
|
<h1>Class LambdaFunctionCodeBundle</h1></div>
|
|
13
|
+
<section class="tsd-panel tsd-comment">
|
|
14
|
+
<div class="tsd-comment tsd-typography"><p>Generates a pre-bundled AWS Lambda Function code asset from handler code.</p>
|
|
15
|
+
<p>Adds a task to the project's <code>Bundler</code> that uses <code>esbuild</code> to bundle the
|
|
16
|
+
handler into the assets directory, and generates a file (e.g. <code>src/foo-code.ts</code>)
|
|
17
|
+
exporting an <code>aws_lambda.Code</code> constant (e.g. <code>FooFunctionCode</code>) that points to
|
|
18
|
+
the bundle. Pass it as the <code>code</code> of an <code>aws_lambda.Function</code>.</p>
|
|
19
|
+
<p>Requires a <code>Bundler</code> component in the project.</p>
|
|
20
|
+
</div>
|
|
21
|
+
<div class="tsd-comment tsd-typography">
|
|
22
|
+
<div class="tsd-tag-example">
|
|
23
|
+
<h4 class="tsd-anchor-link" id="example">Example<a href="#example" 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-3">new</span><span class="hl-1"> </span><span class="hl-0">Bundler</span><span class="hl-1">(</span><span class="hl-5">myProject</span><span class="hl-1">);</span><br/><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-0">LambdaFunctionCodeBundle</span><span class="hl-1">(</span><span class="hl-5">myProject</span><span class="hl-1">, {</span><br/><span class="hl-1"> </span><span class="hl-5">entrypoint:</span><span class="hl-1"> </span><span class="hl-2">"src/foo.lambda.ts"</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-5">extension:</span><span class="hl-1"> </span><span class="hl-2">".lambda.ts"</span><span class="hl-1">,</span><br/><span class="hl-1">});</span>
|
|
24
|
+
</code><button type="button">Copy</button></pre>
|
|
25
|
+
|
|
26
|
+
</div></div></section>
|
|
13
27
|
<section class="tsd-panel tsd-hierarchy" data-refl="90">
|
|
14
28
|
<h4>Hierarchy</h4>
|
|
15
29
|
<ul class="tsd-hierarchy">
|
|
@@ -51,11 +65,17 @@
|
|
|
51
65
|
<li class="">
|
|
52
66
|
<div class="tsd-signature tsd-anchor-link" id="constructorlambdafunctioncodebundle"><span class="tsd-signature-keyword">new</span> <span class="tsd-kind-constructor-signature">LambdaFunctionCodeBundle</span><span class="tsd-signature-symbol">(</span><br/> <span class="tsd-kind-parameter">project</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Project</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">options</span><span class="tsd-signature-symbol">:</span> <a href="../interfaces/LambdaFunctionCodeBundleOptions.html" class="tsd-signature-type tsd-kind-interface">LambdaFunctionCodeBundleOptions</a><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <a href="" class="tsd-signature-type tsd-kind-class">LambdaFunctionCodeBundle</a><a href="#constructorlambdafunctioncodebundle" 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></div>
|
|
53
67
|
<div class="tsd-description">
|
|
68
|
+
<div class="tsd-comment tsd-typography"><p>Defines a pre-bundled AWS Lambda Function code asset from handler code.</p>
|
|
69
|
+
</div>
|
|
54
70
|
<div class="tsd-parameters">
|
|
55
71
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
56
72
|
<ul class="tsd-parameter-list">
|
|
57
|
-
<li><span><span class="tsd-kind-parameter">project</span>: <span class="tsd-signature-type">Project</span></span
|
|
58
|
-
<
|
|
73
|
+
<li><span><span class="tsd-kind-parameter">project</span>: <span class="tsd-signature-type">Project</span></span>
|
|
74
|
+
<div class="tsd-comment tsd-typography"><p>The project to use</p>
|
|
75
|
+
</div></li>
|
|
76
|
+
<li><span><span class="tsd-kind-parameter">options</span>: <a href="../interfaces/LambdaFunctionCodeBundleOptions.html" class="tsd-signature-type tsd-kind-interface">LambdaFunctionCodeBundleOptions</a></span>
|
|
77
|
+
<div class="tsd-comment tsd-typography"><p>Options</p>
|
|
78
|
+
</div></li></ul></div>
|
|
59
79
|
<h4 class="tsd-returns-title">Returns <a href="" class="tsd-signature-type tsd-kind-class">LambdaFunctionCodeBundle</a></h4><aside class="tsd-sources">
|
|
60
80
|
<p>Overrides Component.constructor</p></aside></div></li></ul></section></section></details>
|
|
61
81
|
<details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>
|
|
@@ -10,6 +10,10 @@
|
|
|
10
10
|
<ul class="tsd-breadcrumb" aria-label="Breadcrumb">
|
|
11
11
|
<li><a href="" aria-current="page">LambdaFunctionConstructGenerator</a></li></ul>
|
|
12
12
|
<h1>Class LambdaFunctionConstructGenerator</h1></div>
|
|
13
|
+
<section class="tsd-panel tsd-comment">
|
|
14
|
+
<div class="tsd-comment tsd-typography"><p>A projen component that generates AWS CDK Lambda Function constructs and bundles their code assets using esbuild.</p>
|
|
15
|
+
<p>The bundling happens during projen execution, not during CDK synth, enabling a "build once, deploy many" pattern.</p>
|
|
16
|
+
</div></section>
|
|
13
17
|
<section class="tsd-panel tsd-hierarchy" data-refl="234">
|
|
14
18
|
<h4>Hierarchy</h4>
|
|
15
19
|
<ul class="tsd-hierarchy">
|
|
@@ -10,6 +10,10 @@
|
|
|
10
10
|
<ul class="tsd-breadcrumb" aria-label="Breadcrumb">
|
|
11
11
|
<li><a href="" aria-current="page">LocalStack</a></li></ul>
|
|
12
12
|
<h1>Class LocalStack</h1></div>
|
|
13
|
+
<section class="tsd-panel tsd-comment">
|
|
14
|
+
<div class="tsd-comment tsd-typography"><p>LocalStack component for projen projects.</p>
|
|
15
|
+
<p>Adds LocalStack support to your project with automatic Docker/Colima setup.</p>
|
|
16
|
+
</div></section>
|
|
13
17
|
<section class="tsd-panel tsd-hierarchy" data-refl="291">
|
|
14
18
|
<h4>Hierarchy</h4>
|
|
15
19
|
<ul class="tsd-hierarchy">
|
|
@@ -15,6 +15,8 @@
|
|
|
15
15
|
<li class="">
|
|
16
16
|
<div class="tsd-signature tsd-anchor-link" id="converttoposixpath"><span class="tsd-kind-call-signature">convertToPosixPath</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">p</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><a href="#converttoposixpath" 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></div>
|
|
17
17
|
<div class="tsd-description">
|
|
18
|
+
<div class="tsd-comment tsd-typography"><p>Converts the given path string to posix if it wasn't already.</p>
|
|
19
|
+
</div>
|
|
18
20
|
<div class="tsd-parameters">
|
|
19
21
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
20
22
|
<ul class="tsd-parameter-list">
|
|
@@ -15,11 +15,19 @@
|
|
|
15
15
|
<li class="">
|
|
16
16
|
<div class="tsd-signature tsd-anchor-link" id="renderbundlename"><span class="tsd-kind-call-signature">renderBundleName</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">entrypoint</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><a href="#renderbundlename" 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></div>
|
|
17
17
|
<div class="tsd-description">
|
|
18
|
+
<div class="tsd-comment tsd-typography"><p>Renders the bundle name of an entrypoint: its path without the extension and without a leading <code>src</code> directory.</p>
|
|
19
|
+
</div>
|
|
18
20
|
<div class="tsd-parameters">
|
|
19
21
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
20
22
|
<ul class="tsd-parameter-list">
|
|
21
23
|
<li><span><span class="tsd-kind-parameter">entrypoint</span>: <span class="tsd-signature-type">string</span></span></li></ul></div>
|
|
22
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4
|
|
24
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4>
|
|
25
|
+
<div class="tsd-comment tsd-typography">
|
|
26
|
+
<div class="tsd-tag-example">
|
|
27
|
+
<h4 class="tsd-anchor-link" id="example">Example<a href="#example" 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-0">renderBundleName</span><span class="hl-1">(</span><span class="hl-2">"src/handlers/foo.lambda.ts"</span><span class="hl-1">) </span><span class="hl-8">// "handlers/foo.lambda"</span>
|
|
28
|
+
</code><button type="button">Copy</button></pre>
|
|
29
|
+
|
|
30
|
+
</div></div></div></li></ul></section></div>
|
|
23
31
|
<div class="col-sidebar">
|
|
24
32
|
<div class="page-menu">
|
|
25
33
|
<div class="tsd-navigation settings">
|
package/docs/api/index.html
CHANGED
|
@@ -180,6 +180,129 @@ render into a generated <code>.projenrc.ts</code> as the package manager that ra
|
|
|
180
180
|
<li>Validates paths to prevent directory traversal attacks</li>
|
|
181
181
|
<li>Structured error handling with custom error classes</li>
|
|
182
182
|
</ul>
|
|
183
|
+
<h2 id="migrating-from-the-standalone-packages" class="tsd-anchor-link">Migrating from the standalone packages<a href="#migrating-from-the-standalone-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></h2>
|
|
184
|
+
<p>The components used to be published as separate packages. Those packages are deprecated and won't
|
|
185
|
+
get new features or fixes. Every class, interface, enum and function they exported is exported from
|
|
186
|
+
<code>@nikovirtala/projen-constructs</code> under the same name, except <code>AwsCdkApp</code> (see below).</p>
|
|
187
|
+
<table>
|
|
188
|
+
<thead>
|
|
189
|
+
<tr>
|
|
190
|
+
<th>Deprecated package</th>
|
|
191
|
+
<th>Replacement in <code>@nikovirtala/projen-constructs</code></th>
|
|
192
|
+
</tr>
|
|
193
|
+
</thead>
|
|
194
|
+
<tbody>
|
|
195
|
+
<tr>
|
|
196
|
+
<td><code>@nikovirtala/projen-vitest</code></td>
|
|
197
|
+
<td><code>Vitest</code>, <code>VitestOptions</code>, <code>VitestConfigOptions</code>, <code>Environment</code>, <code>Pool</code>, <code>CoverageProvider</code>, <code>CoverageReporter</code></td>
|
|
198
|
+
</tr>
|
|
199
|
+
<tr>
|
|
200
|
+
<td><code>@nikovirtala/projen-typedoc</code></td>
|
|
201
|
+
<td><code>TypeDoc</code>, <code>TypeDocOptions</code>, <code>TypeDocConfiguration</code> and its enums</td>
|
|
202
|
+
</tr>
|
|
203
|
+
<tr>
|
|
204
|
+
<td><code>@nikovirtala/projen-homebrew</code></td>
|
|
205
|
+
<td><code>Homebrew</code>, <code>HomebrewOptions</code></td>
|
|
206
|
+
</tr>
|
|
207
|
+
<tr>
|
|
208
|
+
<td><code>@nikovirtala/projen-colima</code></td>
|
|
209
|
+
<td><code>Colima</code></td>
|
|
210
|
+
</tr>
|
|
211
|
+
<tr>
|
|
212
|
+
<td><code>@nikovirtala/projen-localstack</code></td>
|
|
213
|
+
<td><code>LocalStack</code>, <code>LocalStackOptions</code></td>
|
|
214
|
+
</tr>
|
|
215
|
+
<tr>
|
|
216
|
+
<td><code>@nikovirtala/projen-bundle-lambda-function-code</code></td>
|
|
217
|
+
<td><code>Bundler</code>, <code>LambdaFunctionCodeBundle</code>, <code>LambdaFunctionCodeBundler</code> and their options</td>
|
|
218
|
+
</tr>
|
|
219
|
+
<tr>
|
|
220
|
+
<td><code>@nikovirtala/projen-lambda-function-construct-generator</code></td>
|
|
221
|
+
<td><code>LambdaFunctionConstructGenerator</code>, <code>LambdaFunctionConstructGeneratorOptions</code></td>
|
|
222
|
+
</tr>
|
|
223
|
+
<tr>
|
|
224
|
+
<td><code>@nikovirtala/projen-aws-cdk-app</code></td>
|
|
225
|
+
<td><code>AwsCdkTypeScriptAppProject</code>, <code>AwsCdkTypeScriptAppProjectOptions</code></td>
|
|
226
|
+
</tr>
|
|
227
|
+
</tbody>
|
|
228
|
+
</table>
|
|
229
|
+
<h3 id="steps" class="tsd-anchor-link">Steps<a href="#steps" 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>
|
|
230
|
+
<ol>
|
|
231
|
+
<li>
|
|
232
|
+
<p>In <code>.projenrc.ts</code>, replace the old package in <code>devDeps</code> with <code>@nikovirtala/projen-constructs</code>, and
|
|
233
|
+
change the imports:</p>
|
|
234
|
+
<pre><code class="typescript"><span class="hl-8">// before</span><br/><span class="hl-7">import</span><span class="hl-1"> { </span><span class="hl-5">Vitest</span><span class="hl-1"> } </span><span class="hl-7">from</span><span class="hl-1"> </span><span class="hl-2">"@nikovirtala/projen-vitest"</span><span class="hl-1">;</span><br/><span class="hl-8">// after</span><br/><span class="hl-7">import</span><span class="hl-1"> { </span><span class="hl-5">Vitest</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>
|
|
235
|
+
</code><button type="button">Copy</button></pre>
|
|
236
|
+
|
|
237
|
+
</li>
|
|
238
|
+
<li>
|
|
239
|
+
<p>Check the peer dependencies. <code>@nikovirtala/projen-constructs</code> needs <code>projen</code> ^0.104, <code>constructs</code>
|
|
240
|
+
^10 and <code>@mrgrain/cdk-esbuild</code> ^5. The standalone packages accepted older projen versions, so you
|
|
241
|
+
may have to upgrade projen in the same change.</p>
|
|
242
|
+
</li>
|
|
243
|
+
<li>
|
|
244
|
+
<p>Install the new package, run <code>npx projen</code> and review the changes to the generated files.</p>
|
|
245
|
+
</li>
|
|
246
|
+
</ol>
|
|
247
|
+
<h3 id="changes-to-expect" class="tsd-anchor-link">Changes to expect<a href="#changes-to-expect" 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>
|
|
248
|
+
<p>These are the differences in behaviour or generated files between the standalone packages and this
|
|
249
|
+
library.</p>
|
|
250
|
+
<p><strong>Vitest</strong></p>
|
|
251
|
+
<ul>
|
|
252
|
+
<li><code>vitest.config.ts</code> imports <code>defineConfig</code> from
|
|
253
|
+
<code>@nikovirtala/projen-constructs/lib/vitest-define-config</code> instead of
|
|
254
|
+
<code>@nikovirtala/projen-vitest/lib/bundled-define-config</code>. Projen rewrites the file, so there's
|
|
255
|
+
nothing to change by hand.</li>
|
|
256
|
+
<li>The config is rendered as JSON, so its keys are quoted. The settings are the same.</li>
|
|
257
|
+
<li><code>config.typecheckTsconfig</code> defaults to the project's development tsconfig (<code>test/tsconfig.json</code>
|
|
258
|
+
in current projen) instead of <code>tsconfig.dev.json</code>.</li>
|
|
259
|
+
<li>JSII and construct library projects exclude <code>vitest.config.ts</code> from the published package.</li>
|
|
260
|
+
<li>New: <code>extraTestConfig</code> and <code>extraConfig</code> for Vitest settings that <code>config</code> doesn't cover.</li>
|
|
261
|
+
</ul>
|
|
262
|
+
<p><strong>Homebrew and Colima</strong></p>
|
|
263
|
+
<ul>
|
|
264
|
+
<li>Packages from a tap (<code>owner/tap/formula</code>) also add a <code>tap</code> line to the <code>Brewfile</code>, and the
|
|
265
|
+
<code>Brewfile</code> is sorted.</li>
|
|
266
|
+
<li>The <code>install:homebrew</code>, <code>homebrew:bundle</code> and <code>colima</code> tasks run in bash. <code>homebrew:bundle</code> also
|
|
267
|
+
finds a freshly installed <code>brew</code> that isn't on the <code>PATH</code> yet.</li>
|
|
268
|
+
</ul>
|
|
269
|
+
<p><strong>LocalStack</strong></p>
|
|
270
|
+
<ul>
|
|
271
|
+
<li><code>imageTag</code> is applied: LocalStack starts with <code>localstack/localstack:<imageTag></code>. It used to be
|
|
272
|
+
ignored.</li>
|
|
273
|
+
</ul>
|
|
274
|
+
<p><strong>Bundler / LambdaFunctionCodeBundler</strong></p>
|
|
275
|
+
<ul>
|
|
276
|
+
<li><code>LambdaFunctionCodeBundler.bundleOptions</code> applies to every discovered entrypoint. Its <code>entrypoint</code>
|
|
277
|
+
used to replace them all.</li>
|
|
278
|
+
</ul>
|
|
279
|
+
<p><strong>LambdaFunctionConstructGenerator</strong></p>
|
|
280
|
+
<ul>
|
|
281
|
+
<li>The bundle task runs <code>tsx</code> with the project's development tsconfig instead of <code>tsconfig.dev.json</code>.</li>
|
|
282
|
+
</ul>
|
|
283
|
+
<p><strong>TypeDoc</strong>: no changes.</p>
|
|
284
|
+
<h3 id="from-to" class="tsd-anchor-link">From <code>AwsCdkApp</code> to <code>AwsCdkTypeScriptAppProject</code><a href="#from-to" 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>
|
|
285
|
+
<pre><code class="typescript"><span class="hl-8">// before</span><br/><span class="hl-7">import</span><span class="hl-1"> { </span><span class="hl-5">AwsCdkApp</span><span class="hl-1"> } </span><span class="hl-7">from</span><span class="hl-1"> </span><span class="hl-2">"@nikovirtala/projen-aws-cdk-app"</span><span class="hl-1">;</span><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">project</span><span class="hl-1"> = </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-0">AwsCdkApp</span><span class="hl-1">({ </span><span class="hl-5">name:</span><span class="hl-1"> </span><span class="hl-2">"my-app"</span><span class="hl-1">, </span><span class="hl-5">cdkVersion:</span><span class="hl-1"> </span><span class="hl-2">"2.221.0"</span><span class="hl-1"> });</span><br/><br/><span class="hl-8">// after</span><br/><span class="hl-7">import</span><span class="hl-1"> { </span><span class="hl-5">AwsCdkTypeScriptAppProject</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/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">project</span><span class="hl-1"> = </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-0">AwsCdkTypeScriptAppProject</span><span class="hl-1">({ </span><span class="hl-5">name:</span><span class="hl-1"> </span><span class="hl-2">"my-app"</span><span class="hl-1">, </span><span class="hl-5">cdkVersion:</span><span class="hl-1"> </span><span class="hl-2">"2.221.0"</span><span class="hl-1"> });</span>
|
|
286
|
+
</code><button type="button">Copy</button></pre>
|
|
287
|
+
|
|
288
|
+
<p>Both are ES module apps run with <code>tsx</code>, using pnpm, Biome, Vitest and mise. The differences:</p>
|
|
289
|
+
<ul>
|
|
290
|
+
<li><strong><code>nvm</code> is removed.</strong> Use mise (on by default), which pins the Node.js version in <code>mise.toml</code>.</li>
|
|
291
|
+
<li><strong>Homebrew is on by default.</strong> The project gets a <code>Brewfile</code>, and <code>npx projen</code> runs
|
|
292
|
+
<code>install:homebrew</code> (installs Homebrew if <code>brew</code> is missing) and <code>homebrew:bundle</code>. Set
|
|
293
|
+
<code>homebrew: false</code> to turn it off.</li>
|
|
294
|
+
<li><strong>cdk.json <code>app</code></strong> is <code>npx tsx src/main.ts</code> instead of <code>tsx --tsconfig tsconfig.json src/main.ts</code>.</li>
|
|
295
|
+
<li><strong>Defaults</strong> come from this library: Node.js, TypeScript, CDK and pnpm versions (pnpm 11 instead
|
|
296
|
+
of 10), Dependabot off, auto-merge on, <code>auto-approve</code> and <code>auto-merge</code> labels on dependency
|
|
297
|
+
upgrade PRs, and auto-approval of PRs by <code>nikovirtala</code>. Any option you set explicitly still wins,
|
|
298
|
+
so set <code>autoApproveOptions</code> if you aren't <code>nikovirtala</code>.</li>
|
|
299
|
+
<li><strong>tsconfig</strong>: <code>noImplicitOverride</code> and <code>allowSyntheticDefaultImports</code> move from <code>tsconfig.json</code>
|
|
300
|
+
to the development tsconfig (<code>test/tsconfig.json</code>).</li>
|
|
301
|
+
<li><strong>Options removed from the interface</strong>: <code>eslint</code>, <code>jest</code>, <code>prettier</code> (and their options),
|
|
302
|
+
<code>sampleCode</code> and <code>tsJestOptions</code>.</li>
|
|
303
|
+
<li><code>vitestOptions</code> takes the <code>VitestOptions</code> of this library, and now also <code>homebrewOptions</code> and
|
|
304
|
+
<code>miseOptions</code>.</li>
|
|
305
|
+
</ul>
|
|
183
306
|
<h2 id="development" class="tsd-anchor-link">Development<a href="#development" 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></h2>
|
|
184
307
|
<p>This project is managed by Projen and generates itself: <code>.projenrc.ts</code> defines the project using the
|
|
185
308
|
<code>JsiiProject</code> type from <code>src/</code>. Configuration changes belong in <code>.projenrc.ts</code>, never in the
|
|
@@ -301,6 +424,12 @@ then synthesize again.</p>
|
|
|
301
424
|
<li><a href="#lambdafunctionconstructgenerator"><span>Lambda<wbr/>Function<wbr/>Construct<wbr/>Generator</span></a></li>
|
|
302
425
|
<li><a href="#bundler"><span>Bundler</span></a></li>
|
|
303
426
|
<li><a href="#projectgenerator"><span>Project<wbr/>Generator</span></a></li></ul></li></ul></li>
|
|
427
|
+
<li><a href="#migrating-from-the-standalone-packages"><span>Migrating from the standalone packages</span></a></li>
|
|
428
|
+
<li>
|
|
429
|
+
<ul>
|
|
430
|
+
<li><a href="#steps"><span>Steps</span></a></li>
|
|
431
|
+
<li><a href="#changes-to-expect"><span>Changes to expect</span></a></li>
|
|
432
|
+
<li><a href="#from-to"><span>From to </span></a></li></ul></li>
|
|
304
433
|
<li><a href="#development"><span>Development</span></a></li>
|
|
305
434
|
<li>
|
|
306
435
|
<ul>
|
|
@@ -10,6 +10,9 @@
|
|
|
10
10
|
<ul class="tsd-breadcrumb" aria-label="Breadcrumb">
|
|
11
11
|
<li><a href="" aria-current="page">Bundle</a></li></ul>
|
|
12
12
|
<h1>Interface Bundle</h1></div>
|
|
13
|
+
<section class="tsd-panel tsd-comment">
|
|
14
|
+
<div class="tsd-comment tsd-typography"><p>A bundle created by <code>Bundler.addBundle</code>.</p>
|
|
15
|
+
</div></section>
|
|
13
16
|
<div class="tsd-signature"><span class="tsd-signature-keyword">interface</span> <span class="tsd-kind-interface">Bundle</span> <span class="tsd-signature-symbol">{</span><br/> <a class="tsd-kind-property" href="#bundletask">bundleTask</a><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Task</span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-property" href="#outdir">outdir</a><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-property" href="#outfile">outfile</a><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/><span class="tsd-signature-symbol">}</span></div>
|
|
14
17
|
<section class="tsd-panel-group tsd-index-group">
|
|
15
18
|
<section class="tsd-panel tsd-index-panel">
|
|
@@ -27,13 +30,19 @@
|
|
|
27
30
|
<section>
|
|
28
31
|
<section class="tsd-panel tsd-member">
|
|
29
32
|
<h3 class="tsd-anchor-link" id="bundletask"><code class="tsd-tag">Readonly</code><span>bundle<wbr/>Task</span><a href="#bundletask" 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>
|
|
30
|
-
<div class="tsd-signature"><span class="tsd-kind-property">bundleTask</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Task</span></div
|
|
33
|
+
<div class="tsd-signature"><span class="tsd-kind-property">bundleTask</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Task</span></div>
|
|
34
|
+
<div class="tsd-comment tsd-typography"><p>The task that produces this bundle.</p>
|
|
35
|
+
</div></section>
|
|
31
36
|
<section class="tsd-panel tsd-member">
|
|
32
37
|
<h3 class="tsd-anchor-link" id="outdir"><code class="tsd-tag">Readonly</code><span>outdir</span><a href="#outdir" 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>
|
|
33
|
-
<div class="tsd-signature"><span class="tsd-kind-property">outdir</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div
|
|
38
|
+
<div class="tsd-signature"><span class="tsd-kind-property">outdir</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
|
|
39
|
+
<div class="tsd-comment tsd-typography"><p>Base directory containing the output file (relative to project root).</p>
|
|
40
|
+
</div></section>
|
|
34
41
|
<section class="tsd-panel tsd-member">
|
|
35
42
|
<h3 class="tsd-anchor-link" id="outfile"><code class="tsd-tag">Readonly</code><span>outfile</span><a href="#outfile" 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>
|
|
36
|
-
<div class="tsd-signature"><span class="tsd-kind-property">outfile</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div
|
|
43
|
+
<div class="tsd-signature"><span class="tsd-kind-property">outfile</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
|
|
44
|
+
<div class="tsd-comment tsd-typography"><p>Location of the output file (relative to project root).</p>
|
|
45
|
+
</div></section></section></details></div>
|
|
37
46
|
<div class="col-sidebar">
|
|
38
47
|
<div class="page-menu">
|
|
39
48
|
<div class="tsd-navigation settings">
|