@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
|
@@ -10,6 +10,9 @@
|
|
|
10
10
|
<ul class="tsd-breadcrumb" aria-label="Breadcrumb">
|
|
11
11
|
<li><a href="" aria-current="page">LambdaFunctionConstructGeneratorOptions</a></li></ul>
|
|
12
12
|
<h1>Interface LambdaFunctionConstructGeneratorOptions</h1></div>
|
|
13
|
+
<section class="tsd-panel tsd-comment">
|
|
14
|
+
<div class="tsd-comment tsd-typography"><p>Options for the LambdaFunctionConstructGenerator</p>
|
|
15
|
+
</div></section>
|
|
13
16
|
<div class="tsd-signature"><span class="tsd-signature-keyword">interface</span> <span class="tsd-kind-interface">LambdaFunctionConstructGeneratorOptions</span> <span class="tsd-signature-symbol">{</span><br/> <a class="tsd-kind-property" href="#adddependencies">addDependencies</a><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-property" href="#baseconstructclass">baseConstructClass</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="#baseconstructimport">baseConstructImport</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="#baseconstructpackage">baseConstructPackage</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="#esbuildoptions">esbuildOptions</a><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">BuildOptions</span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-property" href="#filepattern">filePattern</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="#outputdir">outputDir</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="#sourcedir">sourceDir</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">
|
|
@@ -32,28 +35,107 @@
|
|
|
32
35
|
<section>
|
|
33
36
|
<section class="tsd-panel tsd-member">
|
|
34
37
|
<h3 class="tsd-anchor-link" id="adddependencies"><code class="tsd-tag">Optional</code> <code class="tsd-tag">Readonly</code><span>add<wbr/>Dependencies</span><a href="#adddependencies" 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>
|
|
35
|
-
<div class="tsd-signature"><span class="tsd-kind-property">addDependencies</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span></div
|
|
38
|
+
<div class="tsd-signature"><span class="tsd-kind-property">addDependencies</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span></div>
|
|
39
|
+
<div class="tsd-comment tsd-typography"><p>Whether to automatically add the required dependencies</p>
|
|
40
|
+
</div>
|
|
41
|
+
<div class="tsd-comment tsd-typography">
|
|
42
|
+
<div class="tsd-tag-default">
|
|
43
|
+
<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-3">true</span>
|
|
44
|
+
</code><button type="button">Copy</button></pre>
|
|
45
|
+
|
|
46
|
+
</div></div></section>
|
|
36
47
|
<section class="tsd-panel tsd-member">
|
|
37
48
|
<h3 class="tsd-anchor-link" id="baseconstructclass"><code class="tsd-tag">Optional</code> <code class="tsd-tag">Readonly</code><span>base<wbr/>Construct<wbr/>Class</span><a href="#baseconstructclass" 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>
|
|
38
|
-
<div class="tsd-signature"><span class="tsd-kind-property">baseConstructClass</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span></div
|
|
49
|
+
<div class="tsd-signature"><span class="tsd-kind-property">baseConstructClass</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span></div>
|
|
50
|
+
<div class="tsd-comment tsd-typography"><p>Name of the construct class to extend</p>
|
|
51
|
+
</div>
|
|
52
|
+
<div class="tsd-comment tsd-typography">
|
|
53
|
+
<div class="tsd-tag-example">
|
|
54
|
+
<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-2">"NodejsFunction"</span>
|
|
55
|
+
</code><button type="button">Copy</button></pre>
|
|
56
|
+
|
|
57
|
+
</div>
|
|
58
|
+
<div class="tsd-tag-default">
|
|
59
|
+
<h4 class="tsd-anchor-link" id="default-1">Default<a href="#default-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></h4><pre><code class="ts"><span class="hl-2">"aws_lambda.Function"</span>
|
|
60
|
+
</code><button type="button">Copy</button></pre>
|
|
61
|
+
|
|
62
|
+
</div></div></section>
|
|
39
63
|
<section class="tsd-panel tsd-member">
|
|
40
64
|
<h3 class="tsd-anchor-link" id="baseconstructimport"><code class="tsd-tag">Optional</code> <code class="tsd-tag">Readonly</code><span>base<wbr/>Construct<wbr/>Import</span><a href="#baseconstructimport" 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>
|
|
41
|
-
<div class="tsd-signature"><span class="tsd-kind-property">baseConstructImport</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span></div
|
|
65
|
+
<div class="tsd-signature"><span class="tsd-kind-property">baseConstructImport</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span></div>
|
|
66
|
+
<div class="tsd-comment tsd-typography"><p>Import statement for the base construct</p>
|
|
67
|
+
</div>
|
|
68
|
+
<div class="tsd-comment tsd-typography">
|
|
69
|
+
<div class="tsd-tag-example">
|
|
70
|
+
<h4 class="tsd-anchor-link" id="example-1">Example<a href="#example-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></h4><pre><code class="ts"><span class="hl-2">"import { NodejsFunction } from 'aws-cdk-lib/aws-lambda-nodejs';"</span>
|
|
71
|
+
</code><button type="button">Copy</button></pre>
|
|
72
|
+
|
|
73
|
+
</div>
|
|
74
|
+
<div class="tsd-tag-default">
|
|
75
|
+
<h4 class="tsd-anchor-link" id="default-2">Default<a href="#default-2" 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-2">"import { aws_lambda } from 'aws-cdk-lib';"</span>
|
|
76
|
+
</code><button type="button">Copy</button></pre>
|
|
77
|
+
|
|
78
|
+
</div></div></section>
|
|
42
79
|
<section class="tsd-panel tsd-member">
|
|
43
80
|
<h3 class="tsd-anchor-link" id="baseconstructpackage"><code class="tsd-tag">Optional</code> <code class="tsd-tag">Readonly</code><span>base<wbr/>Construct<wbr/>Package</span><a href="#baseconstructpackage" 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>
|
|
44
|
-
<div class="tsd-signature"><span class="tsd-kind-property">baseConstructPackage</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span></div
|
|
81
|
+
<div class="tsd-signature"><span class="tsd-kind-property">baseConstructPackage</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span></div>
|
|
82
|
+
<div class="tsd-comment tsd-typography"><p>Package name to add as dependency for the base construct</p>
|
|
83
|
+
</div>
|
|
84
|
+
<div class="tsd-comment tsd-typography">
|
|
85
|
+
<div class="tsd-tag-example">
|
|
86
|
+
<h4 class="tsd-anchor-link" id="example-2">Example<a href="#example-2" 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-2">"aws-cdk-lib"</span>
|
|
87
|
+
</code><button type="button">Copy</button></pre>
|
|
88
|
+
|
|
89
|
+
</div>
|
|
90
|
+
<div class="tsd-tag-default">
|
|
91
|
+
<h4 class="tsd-anchor-link" id="default-3">Default<a href="#default-3" 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-2">"aws-cdk-lib"</span>
|
|
92
|
+
</code><button type="button">Copy</button></pre>
|
|
93
|
+
|
|
94
|
+
</div></div></section>
|
|
45
95
|
<section class="tsd-panel tsd-member">
|
|
46
96
|
<h3 class="tsd-anchor-link" id="esbuildoptions"><code class="tsd-tag">Optional</code> <code class="tsd-tag">Readonly</code><span>esbuild<wbr/>Options</span><a href="#esbuildoptions" 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>
|
|
47
|
-
<div class="tsd-signature"><span class="tsd-kind-property">esbuildOptions</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">BuildOptions</span></div
|
|
97
|
+
<div class="tsd-signature"><span class="tsd-kind-property">esbuildOptions</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">BuildOptions</span></div>
|
|
98
|
+
<div class="tsd-comment tsd-typography"><p>esbuild options to customize the bundling process</p>
|
|
99
|
+
</div>
|
|
100
|
+
<div class="tsd-comment tsd-typography">
|
|
101
|
+
<div class="tsd-tag-default">
|
|
102
|
+
<h4 class="tsd-anchor-link" id="default-4">Default<a href="#default-4" 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>
|
|
103
|
+
</code><button type="button">Copy</button></pre>
|
|
104
|
+
|
|
105
|
+
</div></div></section>
|
|
48
106
|
<section class="tsd-panel tsd-member">
|
|
49
107
|
<h3 class="tsd-anchor-link" id="filepattern"><code class="tsd-tag">Optional</code> <code class="tsd-tag">Readonly</code><span>file<wbr/>Pattern</span><a href="#filepattern" 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>
|
|
50
|
-
<div class="tsd-signature"><span class="tsd-kind-property">filePattern</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span></div
|
|
108
|
+
<div class="tsd-signature"><span class="tsd-kind-property">filePattern</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span></div>
|
|
109
|
+
<div class="tsd-comment tsd-typography"><p>File pattern to identify Lambda Function handlers</p>
|
|
110
|
+
</div>
|
|
111
|
+
<div class="tsd-comment tsd-typography">
|
|
112
|
+
<div class="tsd-tag-default">
|
|
113
|
+
<h4 class="tsd-anchor-link" id="default-5">Default<a href="#default-5" 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-2">"*.lambda.ts"</span>
|
|
114
|
+
</code><button type="button">Copy</button></pre>
|
|
115
|
+
|
|
116
|
+
</div></div></section>
|
|
51
117
|
<section class="tsd-panel tsd-member">
|
|
52
118
|
<h3 class="tsd-anchor-link" id="outputdir"><code class="tsd-tag">Optional</code> <code class="tsd-tag">Readonly</code><span>output<wbr/>Dir</span><a href="#outputdir" 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>
|
|
53
|
-
<div class="tsd-signature"><span class="tsd-kind-property">outputDir</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span></div
|
|
119
|
+
<div class="tsd-signature"><span class="tsd-kind-property">outputDir</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span></div>
|
|
120
|
+
<div class="tsd-comment tsd-typography"><p>Output directory where Lambda Function constructs will be generated</p>
|
|
121
|
+
</div>
|
|
122
|
+
<div class="tsd-comment tsd-typography">
|
|
123
|
+
<div class="tsd-tag-default">
|
|
124
|
+
<h4 class="tsd-anchor-link" id="default-6">Default<a href="#default-6" 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-2">"src/constructs/lambda"</span>
|
|
125
|
+
</code><button type="button">Copy</button></pre>
|
|
126
|
+
|
|
127
|
+
</div></div></section>
|
|
54
128
|
<section class="tsd-panel tsd-member">
|
|
55
129
|
<h3 class="tsd-anchor-link" id="sourcedir"><code class="tsd-tag">Optional</code> <code class="tsd-tag">Readonly</code><span>source<wbr/>Dir</span><a href="#sourcedir" 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>
|
|
56
|
-
<div class="tsd-signature"><span class="tsd-kind-property">sourceDir</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span></div
|
|
130
|
+
<div class="tsd-signature"><span class="tsd-kind-property">sourceDir</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span></div>
|
|
131
|
+
<div class="tsd-comment tsd-typography"><p>Source directory where Lambda Function handlers are located</p>
|
|
132
|
+
</div>
|
|
133
|
+
<div class="tsd-comment tsd-typography">
|
|
134
|
+
<div class="tsd-tag-default">
|
|
135
|
+
<h4 class="tsd-anchor-link" id="default-7">Default<a href="#default-7" 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-2">"src/handlers"</span>
|
|
136
|
+
</code><button type="button">Copy</button></pre>
|
|
137
|
+
|
|
138
|
+
</div></div></section></section></details></div>
|
|
57
139
|
<div class="col-sidebar">
|
|
58
140
|
<div class="page-menu">
|
|
59
141
|
<div class="tsd-navigation settings">
|
|
@@ -10,6 +10,9 @@
|
|
|
10
10
|
<ul class="tsd-breadcrumb" aria-label="Breadcrumb">
|
|
11
11
|
<li><a href="" aria-current="page">LocalStackOptions</a></li></ul>
|
|
12
12
|
<h1>Interface LocalStackOptions</h1></div>
|
|
13
|
+
<section class="tsd-panel tsd-comment">
|
|
14
|
+
<div class="tsd-comment tsd-typography"><p>Options for LocalStack component.</p>
|
|
15
|
+
</div></section>
|
|
13
16
|
<div class="tsd-signature"><span class="tsd-signature-keyword">interface</span> <span class="tsd-kind-interface">LocalStackOptions</span> <span class="tsd-signature-symbol">{</span><br/> <a class="tsd-kind-property" href="#debug">debug</a><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-property" href="#imagetag">imageTag</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="#port">port</a><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-property" href="#services">services</a><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><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">
|
|
@@ -28,16 +31,55 @@
|
|
|
28
31
|
<section>
|
|
29
32
|
<section class="tsd-panel tsd-member">
|
|
30
33
|
<h3 class="tsd-anchor-link" id="debug"><code class="tsd-tag">Optional</code> <code class="tsd-tag">Readonly</code><span>debug</span><a href="#debug" 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>
|
|
31
|
-
<div class="tsd-signature"><span class="tsd-kind-property">debug</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span></div
|
|
34
|
+
<div class="tsd-signature"><span class="tsd-kind-property">debug</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span></div>
|
|
35
|
+
<div class="tsd-comment tsd-typography"><p>Enable LocalStack debug mode.</p>
|
|
36
|
+
</div>
|
|
37
|
+
<div class="tsd-comment tsd-typography">
|
|
38
|
+
<div class="tsd-tag-default">
|
|
39
|
+
<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-3">false</span>
|
|
40
|
+
</code><button type="button">Copy</button></pre>
|
|
41
|
+
|
|
42
|
+
</div></div></section>
|
|
32
43
|
<section class="tsd-panel tsd-member">
|
|
33
44
|
<h3 class="tsd-anchor-link" id="imagetag"><code class="tsd-tag">Optional</code> <code class="tsd-tag">Readonly</code><span>image<wbr/>Tag</span><a href="#imagetag" 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>
|
|
34
|
-
<div class="tsd-signature"><span class="tsd-kind-property">imageTag</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span></div
|
|
45
|
+
<div class="tsd-signature"><span class="tsd-kind-property">imageTag</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span></div>
|
|
46
|
+
<div class="tsd-comment tsd-typography"><p>LocalStack Docker image tag, e.g. <code>"4.9"</code> to pin a version.</p>
|
|
47
|
+
<p>When set, LocalStack starts with the <code>localstack/localstack:<imageTag></code> image, passed to
|
|
48
|
+
<code>localstack start</code> through the <code>IMAGE_NAME</code> environment variable. That's the community
|
|
49
|
+
image, even if a <code>LOCALSTACK_AUTH_TOKEN</code> would otherwise select the Pro image.</p>
|
|
50
|
+
<p>Must be a valid Docker tag.</p>
|
|
51
|
+
</div>
|
|
52
|
+
<div class="tsd-comment tsd-typography">
|
|
53
|
+
<div class="tsd-tag-default">
|
|
54
|
+
<h4 class="tsd-anchor-link" id="default-1">Default<a href="#default-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></h4><pre><code class="ts"><span class="hl-1">- </span><span class="hl-5">the</span><span class="hl-1"> </span><span class="hl-5">LocalStack</span><span class="hl-1"> </span><span class="hl-4">CLI</span><span class="hl-2">'s default imag</span><span class="hl-9">e</span>
|
|
55
|
+
</code><button type="button">Copy</button></pre>
|
|
56
|
+
|
|
57
|
+
</div>
|
|
58
|
+
<div class="tsd-tag-see">
|
|
59
|
+
<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.localstack.cloud/aws/customization/configuration-options/">https://docs.localstack.cloud/aws/customization/configuration-options/</a></p>
|
|
60
|
+
</div></div></section>
|
|
35
61
|
<section class="tsd-panel tsd-member">
|
|
36
62
|
<h3 class="tsd-anchor-link" id="port"><code class="tsd-tag">Optional</code> <code class="tsd-tag">Readonly</code><span>port</span><a href="#port" 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>
|
|
37
|
-
<div class="tsd-signature"><span class="tsd-kind-property">port</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span></div
|
|
63
|
+
<div class="tsd-signature"><span class="tsd-kind-property">port</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span></div>
|
|
64
|
+
<div class="tsd-comment tsd-typography"><p>LocalStack gateway port.</p>
|
|
65
|
+
</div>
|
|
66
|
+
<div class="tsd-comment tsd-typography">
|
|
67
|
+
<div class="tsd-tag-default">
|
|
68
|
+
<h4 class="tsd-anchor-link" id="default-2">Default<a href="#default-2" 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-6">4566</span>
|
|
69
|
+
</code><button type="button">Copy</button></pre>
|
|
70
|
+
|
|
71
|
+
</div></div></section>
|
|
38
72
|
<section class="tsd-panel tsd-member">
|
|
39
73
|
<h3 class="tsd-anchor-link" id="services"><code class="tsd-tag">Optional</code> <code class="tsd-tag">Readonly</code><span>services</span><a href="#services" 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>
|
|
40
|
-
<div class="tsd-signature"><span class="tsd-kind-property">services</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span></div
|
|
74
|
+
<div class="tsd-signature"><span class="tsd-kind-property">services</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span></div>
|
|
75
|
+
<div class="tsd-comment tsd-typography"><p>LocalStack services to enable.</p>
|
|
76
|
+
</div>
|
|
77
|
+
<div class="tsd-comment tsd-typography">
|
|
78
|
+
<div class="tsd-tag-default">
|
|
79
|
+
<h4 class="tsd-anchor-link" id="default-3">Default<a href="#default-3" 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><span class="hl-5">all</span><span class="hl-1"> </span><span class="hl-5">services</span><span class="hl-1"> </span><span class="hl-5">enabled</span>
|
|
80
|
+
</code><button type="button">Copy</button></pre>
|
|
81
|
+
|
|
82
|
+
</div></div></section></section></details></div>
|
|
41
83
|
<div class="col-sidebar">
|
|
42
84
|
<div class="page-menu">
|
|
43
85
|
<div class="tsd-navigation settings">
|
|
@@ -1,60 +1,303 @@
|
|
|
1
1
|
import { Component, cdk, type Project, type Task } from "projen";
|
|
2
|
+
/**
|
|
3
|
+
* Renders the bundle name of an entrypoint: its path without the extension and without a leading `src` directory.
|
|
4
|
+
*
|
|
5
|
+
* @example renderBundleName("src/handlers/foo.lambda.ts") // "handlers/foo.lambda"
|
|
6
|
+
*/
|
|
2
7
|
export declare function renderBundleName(entrypoint: string): string;
|
|
8
|
+
/**
|
|
9
|
+
* Converts the given path string to posix if it wasn't already.
|
|
10
|
+
*/
|
|
3
11
|
export declare function convertToPosixPath(p: string): string;
|
|
12
|
+
/**
|
|
13
|
+
* Options for `Bundler`.
|
|
14
|
+
*/
|
|
4
15
|
export interface BundlerOptions {
|
|
16
|
+
/**
|
|
17
|
+
* The semantic version requirement for `esbuild`.
|
|
18
|
+
*
|
|
19
|
+
* @default - no specific version (implies latest)
|
|
20
|
+
*/
|
|
5
21
|
readonly esbuildVersion?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Output directory for all bundles.
|
|
24
|
+
*
|
|
25
|
+
* @default "assets"
|
|
26
|
+
*/
|
|
6
27
|
readonly assetsDir?: string;
|
|
28
|
+
/**
|
|
29
|
+
* Install the `bundle` command as a pre-compile phase.
|
|
30
|
+
*
|
|
31
|
+
* @default true
|
|
32
|
+
*/
|
|
7
33
|
readonly addToPreCompile?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Map of file extensions (without dot) and loaders to use for this file type.
|
|
36
|
+
* Loaders are appended to the esbuild command by `--loader:.extension=loader`
|
|
37
|
+
*
|
|
38
|
+
* @default - no loaders
|
|
39
|
+
*/
|
|
8
40
|
readonly loaders?: {
|
|
9
41
|
[key: string]: string;
|
|
10
42
|
};
|
|
11
43
|
}
|
|
44
|
+
/**
|
|
45
|
+
* Adds support for bundling JavaScript applications and dependencies into a
|
|
46
|
+
* single file.
|
|
47
|
+
*/
|
|
12
48
|
export declare class Bundler extends Component {
|
|
49
|
+
/**
|
|
50
|
+
* Returns the `Bundler` instance associated with a project or `undefined` if
|
|
51
|
+
* there is no Bundler.
|
|
52
|
+
*
|
|
53
|
+
* @param project The project
|
|
54
|
+
* @returns A bundler
|
|
55
|
+
*/
|
|
13
56
|
static of(project: Project): Bundler | undefined;
|
|
57
|
+
/**
|
|
58
|
+
* The semantic version requirement for `esbuild` (if defined).
|
|
59
|
+
*/
|
|
14
60
|
readonly esbuildVersion: string | undefined;
|
|
61
|
+
/**
|
|
62
|
+
* Root bundle directory.
|
|
63
|
+
*/
|
|
15
64
|
readonly bundledir: string;
|
|
16
65
|
private _task;
|
|
17
66
|
private readonly addToPreCompile;
|
|
18
67
|
private readonly loaders?;
|
|
68
|
+
/**
|
|
69
|
+
* Creates a `Bundler`.
|
|
70
|
+
*/
|
|
19
71
|
constructor(project: Project, options?: BundlerOptions);
|
|
72
|
+
/**
|
|
73
|
+
* Gets or creates the singleton "bundle" task of the project.
|
|
74
|
+
*
|
|
75
|
+
* If the project doesn't have a "bundle" task, it will be created and spawned
|
|
76
|
+
* during the pre-compile phase (unless `addToPreCompile` is `false`).
|
|
77
|
+
*/
|
|
20
78
|
get bundleTask(): Task;
|
|
79
|
+
/**
|
|
80
|
+
* Adds a task to the project which bundles a specific entrypoint and all of
|
|
81
|
+
* its dependencies into a single javascript output file.
|
|
82
|
+
*
|
|
83
|
+
* @param entrypoint The relative path of the artifact within the project
|
|
84
|
+
* @param options Bundling options
|
|
85
|
+
*/
|
|
21
86
|
addBundle(entrypoint: string, options: BundlingOptions): Bundle;
|
|
87
|
+
/**
|
|
88
|
+
* Add bundling support to a project. This is called implicitly when
|
|
89
|
+
* `bundleTask` is referenced first. It adds the dependency on `esbuild`,
|
|
90
|
+
* gitignore/npmignore, etc.
|
|
91
|
+
*/
|
|
22
92
|
private addBundlingSupport;
|
|
23
93
|
}
|
|
94
|
+
/**
|
|
95
|
+
* A bundle created by `Bundler.addBundle`.
|
|
96
|
+
*/
|
|
24
97
|
export interface Bundle {
|
|
98
|
+
/**
|
|
99
|
+
* The task that produces this bundle.
|
|
100
|
+
*/
|
|
25
101
|
readonly bundleTask: Task;
|
|
102
|
+
/**
|
|
103
|
+
* Location of the output file (relative to project root).
|
|
104
|
+
*/
|
|
26
105
|
readonly outfile: string;
|
|
106
|
+
/**
|
|
107
|
+
* Base directory containing the output file (relative to project root).
|
|
108
|
+
*/
|
|
27
109
|
readonly outdir: string;
|
|
28
110
|
}
|
|
111
|
+
/**
|
|
112
|
+
* Options for bundling.
|
|
113
|
+
*/
|
|
29
114
|
export interface BundlingOptions {
|
|
115
|
+
/**
|
|
116
|
+
* You can mark a file or a package as external to exclude it from your build.
|
|
117
|
+
* Instead of being bundled, the import will be preserved (using require for
|
|
118
|
+
* the iife and cjs formats and using import for the esm format) and will be
|
|
119
|
+
* evaluated at run time instead.
|
|
120
|
+
*
|
|
121
|
+
* This has several uses. First of all, it can be used to trim unnecessary
|
|
122
|
+
* code from your bundle for a code path that you know will never be executed.
|
|
123
|
+
* For example, a package may contain code that only runs in node but you will
|
|
124
|
+
* only be using that package in the browser. It can also be used to import
|
|
125
|
+
* code in node at run time from a package that cannot be bundled. For
|
|
126
|
+
* example, the fsevents package contains a native extension, which esbuild
|
|
127
|
+
* doesn't support.
|
|
128
|
+
*
|
|
129
|
+
* @default []
|
|
130
|
+
*/
|
|
30
131
|
readonly externals?: string[];
|
|
132
|
+
/**
|
|
133
|
+
* Include a source map in the bundle.
|
|
134
|
+
*
|
|
135
|
+
* @default true
|
|
136
|
+
*/
|
|
31
137
|
readonly sourcemap?: boolean;
|
|
138
|
+
/**
|
|
139
|
+
* esbuild target.
|
|
140
|
+
*
|
|
141
|
+
* @default "esnext"
|
|
142
|
+
*/
|
|
32
143
|
readonly target?: string;
|
|
144
|
+
/**
|
|
145
|
+
* esbuild platform.
|
|
146
|
+
*
|
|
147
|
+
* @default "node"
|
|
148
|
+
*/
|
|
33
149
|
readonly platform?: string;
|
|
150
|
+
/**
|
|
151
|
+
* Bundler output path relative to the asset's output directory.
|
|
152
|
+
*
|
|
153
|
+
* @default "index.mjs"
|
|
154
|
+
*/
|
|
34
155
|
readonly outfile?: string;
|
|
156
|
+
/**
|
|
157
|
+
* The path of the tsconfig.json file to use for bundling.
|
|
158
|
+
*
|
|
159
|
+
* `LambdaFunctionCodeBundle` always sets this to the project's development tsconfig.
|
|
160
|
+
*
|
|
161
|
+
* @default - no tsconfig is passed to esbuild
|
|
162
|
+
*/
|
|
35
163
|
readonly tsconfigPath?: string;
|
|
164
|
+
/**
|
|
165
|
+
* Map of file extensions (without dot) and loaders to use for this file type.
|
|
166
|
+
* Loaders are appended to the esbuild command by `--loader:.extension=loader`
|
|
167
|
+
*
|
|
168
|
+
* @default - the loaders of the `Bundler`
|
|
169
|
+
*/
|
|
36
170
|
readonly loaders?: {
|
|
37
171
|
[key: string]: string;
|
|
38
172
|
};
|
|
173
|
+
/**
|
|
174
|
+
* Output format for the generated JavaScript files: `"iife"`, `"cjs"` or `"esm"`.
|
|
175
|
+
*
|
|
176
|
+
* @default "esm"
|
|
177
|
+
* @see https://esbuild.github.io/api/#format
|
|
178
|
+
*/
|
|
39
179
|
readonly format?: string;
|
|
180
|
+
/**
|
|
181
|
+
* Minify the bundle.
|
|
182
|
+
*
|
|
183
|
+
* @default true
|
|
184
|
+
* @see https://esbuild.github.io/api/#minify
|
|
185
|
+
*/
|
|
40
186
|
readonly minify?: boolean;
|
|
187
|
+
/**
|
|
188
|
+
* Include the original source code in the source map.
|
|
189
|
+
*
|
|
190
|
+
* @default false
|
|
191
|
+
* @see https://esbuild.github.io/api/#sources-content
|
|
192
|
+
*/
|
|
41
193
|
readonly sourcesContent?: boolean;
|
|
194
|
+
/**
|
|
195
|
+
* Comma-separated list of `package.json` fields esbuild tries when resolving a package.
|
|
196
|
+
*
|
|
197
|
+
* @default "module,main"
|
|
198
|
+
* @see https://esbuild.github.io/api/#main-fields
|
|
199
|
+
*/
|
|
42
200
|
readonly mainFields?: string;
|
|
201
|
+
/**
|
|
202
|
+
* esbuild `--banner` argument, appended as is (so it starts with the file type, e.g. `:js=`).
|
|
203
|
+
*
|
|
204
|
+
* The default defines `require` so that CommonJS dependencies work in an ES module bundle.
|
|
205
|
+
*
|
|
206
|
+
* @default ":js=import { createRequire as topLevelCreateRequire } from 'module';const require = topLevelCreateRequire(import.meta.url)"
|
|
207
|
+
* @see https://esbuild.github.io/api/#banner
|
|
208
|
+
*/
|
|
43
209
|
readonly banner?: string;
|
|
44
210
|
}
|
|
211
|
+
/**
|
|
212
|
+
* Options for `LambdaFunctionCodeBundle`.
|
|
213
|
+
*/
|
|
45
214
|
export interface LambdaFunctionCodeBundleOptions {
|
|
215
|
+
/**
|
|
216
|
+
* A path from the project root directory to a TypeScript file which contains
|
|
217
|
+
* the AWS Lambda handler entrypoint (exports a `handler` function).
|
|
218
|
+
*
|
|
219
|
+
* This is relative to the root directory of the project.
|
|
220
|
+
*
|
|
221
|
+
* @example "src/subdir/foo.lambda.ts"
|
|
222
|
+
*/
|
|
46
223
|
readonly entrypoint: string;
|
|
224
|
+
/**
|
|
225
|
+
* Suffix for AWS Lambda handlers.
|
|
226
|
+
*
|
|
227
|
+
* @example ".lambda.ts"
|
|
228
|
+
*/
|
|
47
229
|
readonly extension: string;
|
|
230
|
+
/**
|
|
231
|
+
* The name of the generated TypeScript source file. This file should also be
|
|
232
|
+
* under the source tree.
|
|
233
|
+
*
|
|
234
|
+
* @default - The path of the entrypoint file, with the `-code.ts` suffix
|
|
235
|
+
* instead of the extension (e.g. `src/foo-code.ts`).
|
|
236
|
+
*/
|
|
48
237
|
readonly constructFile?: string;
|
|
238
|
+
/**
|
|
239
|
+
* The name of the generated `aws_lambda.Code` constant.
|
|
240
|
+
*
|
|
241
|
+
* @default - A pascal cased version of the name of the entrypoint file, with
|
|
242
|
+
* the suffix `FunctionCode` (e.g. `ResizeImageFunctionCode`).
|
|
243
|
+
*/
|
|
49
244
|
readonly constructName?: string;
|
|
245
|
+
/**
|
|
246
|
+
* Bundling options for this AWS Lambda Function.
|
|
247
|
+
*
|
|
248
|
+
* @default - the defaults of `BundlingOptions`
|
|
249
|
+
*/
|
|
50
250
|
readonly bundlingOptions?: BundlingOptions;
|
|
51
251
|
}
|
|
252
|
+
/**
|
|
253
|
+
* Generates a pre-bundled AWS Lambda Function code asset from handler code.
|
|
254
|
+
*
|
|
255
|
+
* Adds a task to the project's `Bundler` that uses `esbuild` to bundle the
|
|
256
|
+
* handler into the assets directory, and generates a file (e.g. `src/foo-code.ts`)
|
|
257
|
+
* exporting an `aws_lambda.Code` constant (e.g. `FooFunctionCode`) that points to
|
|
258
|
+
* the bundle. Pass it as the `code` of an `aws_lambda.Function`.
|
|
259
|
+
*
|
|
260
|
+
* Requires a `Bundler` component in the project.
|
|
261
|
+
*
|
|
262
|
+
* @example
|
|
263
|
+
*
|
|
264
|
+
* new Bundler(myProject);
|
|
265
|
+
* new LambdaFunctionCodeBundle(myProject, {
|
|
266
|
+
* entrypoint: "src/foo.lambda.ts",
|
|
267
|
+
* extension: ".lambda.ts",
|
|
268
|
+
* });
|
|
269
|
+
*/
|
|
52
270
|
export declare class LambdaFunctionCodeBundle extends Component {
|
|
271
|
+
/**
|
|
272
|
+
* Defines a pre-bundled AWS Lambda Function code asset from handler code.
|
|
273
|
+
*
|
|
274
|
+
* @param project The project to use
|
|
275
|
+
* @param options Options
|
|
276
|
+
*/
|
|
53
277
|
constructor(project: Project, options: LambdaFunctionCodeBundleOptions);
|
|
54
278
|
}
|
|
279
|
+
/**
|
|
280
|
+
* Options for `LambdaFunctionCodeBundler`
|
|
281
|
+
*/
|
|
55
282
|
export interface LambdaFunctionCodeBundlerOptions {
|
|
283
|
+
/**
|
|
284
|
+
* Locate files with the given extension.
|
|
285
|
+
*
|
|
286
|
+
* @example ".lambda.ts"
|
|
287
|
+
*/
|
|
56
288
|
readonly extension: string;
|
|
289
|
+
/**
|
|
290
|
+
* Project source tree (relative to project output directory).
|
|
291
|
+
*/
|
|
57
292
|
readonly srcdir: string;
|
|
293
|
+
/**
|
|
294
|
+
* Options for AWS Lambda Function bundling, applied to every discovered entrypoint.
|
|
295
|
+
*
|
|
296
|
+
* The `entrypoint` and `extension` given here are ignored: each bundle uses its
|
|
297
|
+
* discovered entrypoint and the `extension` of the bundler.
|
|
298
|
+
*
|
|
299
|
+
* @default - the defaults of `LambdaFunctionCodeBundleOptions`
|
|
300
|
+
*/
|
|
58
301
|
readonly bundleOptions?: LambdaFunctionCodeBundleOptions;
|
|
59
302
|
}
|
|
60
303
|
/**
|