@nikovirtala/projen-constructs 0.5.1 → 0.5.3
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 +4 -4
- package/.kiro/steering/product.md +7 -5
- package/.kiro/steering/tech.md +7 -5
- package/AGENTS.md +41 -0
- package/CHANGELOG.md +43 -0
- package/CONTRIBUTING.md +66 -0
- package/README.md +105 -475
- package/SECURITY.md +29 -0
- package/docs/api/assets/highlight.css +8 -8
- package/docs/api/functions/renderBundleName.html +1 -1
- package/docs/api/index.html +116 -402
- package/docs/api/interfaces/AwsCdkConstructLibraryProjectOptions.html +3 -3
- package/docs/api/interfaces/AwsCdkTypeScriptAppProjectOptions.html +3 -3
- package/docs/api/interfaces/JsiiProjectOptions.html +3 -3
- package/docs/api/interfaces/LocalStackOptions.html +2 -2
- package/docs/api/interfaces/ProjectGeneratorOptions.html +1 -1
- package/docs/api/interfaces/TypeScriptProjectOptions.html +3 -3
- package/docs/api/interfaces/VitestConfigOptions.html +3 -3
- package/docs/api/interfaces/VitestOptions.html +2 -2
- package/docs/api/media/LICENSE +202 -0
- package/docs/api/media/components.md +191 -0
- package/docs/api/media/configuration.md +108 -0
- package/docs/api/media/development.md +93 -0
- package/docs/api/media/index.html +202 -0
- package/docs/api/media/migration.md +106 -0
- package/docs/api/modules.html +2 -2
- package/docs/components.md +191 -0
- package/docs/configuration.md +108 -0
- package/docs/development.md +93 -0
- package/docs/migration.md +106 -0
- package/lib/components/bundle-lambda-function-code.js +3 -3
- package/lib/components/colima.js +1 -1
- package/lib/components/homebrew.js +1 -1
- 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 +3 -2
|
@@ -1169,7 +1169,7 @@ Set to an empty string to not include <code>main</code> in your package.json</p>
|
|
|
1169
1169
|
</div>
|
|
1170
1170
|
<div class="tsd-comment tsd-typography">
|
|
1171
1171
|
<div class="tsd-tag-default">
|
|
1172
|
-
<h4 class="tsd-anchor-link" id="default-51">Default<a href="#default-51" 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">d</span><span class="hl-1">.</span><span class="hl-5">ts</span><span class="hl-1"> </span><span class="hl-5">file</span><span class="hl-1"> </span><span class="hl-5">derived</span><span class="hl-1"> </span><span class="hl-5">from</span><span class="hl-1"> </span><span class="hl-5">the</span><span class="hl-1"> </span><span class="hl-5">project</span><span class="hl-2">'s entrypoint (usually lib/index.d.ts</span><span class="hl-
|
|
1172
|
+
<h4 class="tsd-anchor-link" id="default-51">Default<a href="#default-51" 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">d</span><span class="hl-1">.</span><span class="hl-5">ts</span><span class="hl-1"> </span><span class="hl-5">file</span><span class="hl-1"> </span><span class="hl-5">derived</span><span class="hl-1"> </span><span class="hl-5">from</span><span class="hl-1"> </span><span class="hl-5">the</span><span class="hl-1"> </span><span class="hl-5">project</span><span class="hl-2">'s entrypoint (usually lib/index.d.ts</span><span class="hl-7">)</span>
|
|
1173
1173
|
</code><button type="button">Copy</button></pre>
|
|
1174
1174
|
|
|
1175
1175
|
</div>
|
|
@@ -1766,7 +1766,7 @@ Requires <code>npmVerifyPublished</code> to be enabled.</p>
|
|
|
1766
1766
|
</div>
|
|
1767
1767
|
<div class="tsd-comment tsd-typography">
|
|
1768
1768
|
<div class="tsd-tag-default">
|
|
1769
|
-
<h4 class="tsd-anchor-link" id="default-85">Default<a href="#default-85" 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-
|
|
1769
|
+
<h4 class="tsd-anchor-link" id="default-85">Default<a href="#default-85" 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-8">3600</span>
|
|
1770
1770
|
</code><button type="button">Copy</button></pre>
|
|
1771
1771
|
|
|
1772
1772
|
</div>
|
|
@@ -2214,7 +2214,7 @@ repository, set <code>publishToSourceRepository</code> to <code>true</code>.</p>
|
|
|
2214
2214
|
</div>
|
|
2215
2215
|
<div class="tsd-comment tsd-typography">
|
|
2216
2216
|
<div class="tsd-tag-default">
|
|
2217
|
-
<h4 class="tsd-anchor-link" id="default-113">Default<a href="#default-113" 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-
|
|
2217
|
+
<h4 class="tsd-anchor-link" id="default-113">Default<a href="#default-113" 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-9">filename</span><span class="hl-1">: </span><span class="hl-2">'README.md'</span><span class="hl-1">, </span><span class="hl-9">contents</span><span class="hl-1">: </span><span class="hl-2">'# replace this'</span><span class="hl-1"> }</span>
|
|
2218
2218
|
</code><button type="button">Copy</button></pre>
|
|
2219
2219
|
|
|
2220
2220
|
</div>
|
|
@@ -1126,7 +1126,7 @@ Set to an empty string to not include <code>main</code> in your package.json</p>
|
|
|
1126
1126
|
</div>
|
|
1127
1127
|
<div class="tsd-comment tsd-typography">
|
|
1128
1128
|
<div class="tsd-tag-default">
|
|
1129
|
-
<h4 class="tsd-anchor-link" id="default-48">Default<a href="#default-48" 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">d</span><span class="hl-1">.</span><span class="hl-5">ts</span><span class="hl-1"> </span><span class="hl-5">file</span><span class="hl-1"> </span><span class="hl-5">derived</span><span class="hl-1"> </span><span class="hl-5">from</span><span class="hl-1"> </span><span class="hl-5">the</span><span class="hl-1"> </span><span class="hl-5">project</span><span class="hl-2">'s entrypoint (usually lib/index.d.ts</span><span class="hl-
|
|
1129
|
+
<h4 class="tsd-anchor-link" id="default-48">Default<a href="#default-48" 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">d</span><span class="hl-1">.</span><span class="hl-5">ts</span><span class="hl-1"> </span><span class="hl-5">file</span><span class="hl-1"> </span><span class="hl-5">derived</span><span class="hl-1"> </span><span class="hl-5">from</span><span class="hl-1"> </span><span class="hl-5">the</span><span class="hl-1"> </span><span class="hl-5">project</span><span class="hl-2">'s entrypoint (usually lib/index.d.ts</span><span class="hl-7">)</span>
|
|
1130
1130
|
</code><button type="button">Copy</button></pre>
|
|
1131
1131
|
|
|
1132
1132
|
</div>
|
|
@@ -1705,7 +1705,7 @@ Requires <code>npmVerifyPublished</code> to be enabled.</p>
|
|
|
1705
1705
|
</div>
|
|
1706
1706
|
<div class="tsd-comment tsd-typography">
|
|
1707
1707
|
<div class="tsd-tag-default">
|
|
1708
|
-
<h4 class="tsd-anchor-link" id="default-82">Default<a href="#default-82" 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-
|
|
1708
|
+
<h4 class="tsd-anchor-link" id="default-82">Default<a href="#default-82" 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-8">3600</span>
|
|
1709
1709
|
</code><button type="button">Copy</button></pre>
|
|
1710
1710
|
|
|
1711
1711
|
</div>
|
|
@@ -2095,7 +2095,7 @@ in order to create a publishing task for each publishing activity.</p>
|
|
|
2095
2095
|
</div>
|
|
2096
2096
|
<div class="tsd-comment tsd-typography">
|
|
2097
2097
|
<div class="tsd-tag-default">
|
|
2098
|
-
<h4 class="tsd-anchor-link" id="default-106">Default<a href="#default-106" 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-
|
|
2098
|
+
<h4 class="tsd-anchor-link" id="default-106">Default<a href="#default-106" 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-9">filename</span><span class="hl-1">: </span><span class="hl-2">'README.md'</span><span class="hl-1">, </span><span class="hl-9">contents</span><span class="hl-1">: </span><span class="hl-2">'# replace this'</span><span class="hl-1"> }</span>
|
|
2099
2099
|
</code><button type="button">Copy</button></pre>
|
|
2100
2100
|
|
|
2101
2101
|
</div>
|
|
@@ -1069,7 +1069,7 @@ Set to an empty string to not include <code>main</code> in your package.json</p>
|
|
|
1069
1069
|
</div>
|
|
1070
1070
|
<div class="tsd-comment tsd-typography">
|
|
1071
1071
|
<div class="tsd-tag-default">
|
|
1072
|
-
<h4 class="tsd-anchor-link" id="default-46">Default<a href="#default-46" 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">d</span><span class="hl-1">.</span><span class="hl-5">ts</span><span class="hl-1"> </span><span class="hl-5">file</span><span class="hl-1"> </span><span class="hl-5">derived</span><span class="hl-1"> </span><span class="hl-5">from</span><span class="hl-1"> </span><span class="hl-5">the</span><span class="hl-1"> </span><span class="hl-5">project</span><span class="hl-2">'s entrypoint (usually lib/index.d.ts</span><span class="hl-
|
|
1072
|
+
<h4 class="tsd-anchor-link" id="default-46">Default<a href="#default-46" 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">d</span><span class="hl-1">.</span><span class="hl-5">ts</span><span class="hl-1"> </span><span class="hl-5">file</span><span class="hl-1"> </span><span class="hl-5">derived</span><span class="hl-1"> </span><span class="hl-5">from</span><span class="hl-1"> </span><span class="hl-5">the</span><span class="hl-1"> </span><span class="hl-5">project</span><span class="hl-2">'s entrypoint (usually lib/index.d.ts</span><span class="hl-7">)</span>
|
|
1073
1073
|
</code><button type="button">Copy</button></pre>
|
|
1074
1074
|
|
|
1075
1075
|
</div>
|
|
@@ -1596,7 +1596,7 @@ Requires <code>npmVerifyPublished</code> to be enabled.</p>
|
|
|
1596
1596
|
</div>
|
|
1597
1597
|
<div class="tsd-comment tsd-typography">
|
|
1598
1598
|
<div class="tsd-tag-default">
|
|
1599
|
-
<h4 class="tsd-anchor-link" id="default-75">Default<a href="#default-75" 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-
|
|
1599
|
+
<h4 class="tsd-anchor-link" id="default-75">Default<a href="#default-75" 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-8">3600</span>
|
|
1600
1600
|
</code><button type="button">Copy</button></pre>
|
|
1601
1601
|
|
|
1602
1602
|
</div>
|
|
@@ -2044,7 +2044,7 @@ repository, set <code>publishToSourceRepository</code> to <code>true</code>.</p>
|
|
|
2044
2044
|
</div>
|
|
2045
2045
|
<div class="tsd-comment tsd-typography">
|
|
2046
2046
|
<div class="tsd-tag-default">
|
|
2047
|
-
<h4 class="tsd-anchor-link" id="default-103">Default<a href="#default-103" 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-
|
|
2047
|
+
<h4 class="tsd-anchor-link" id="default-103">Default<a href="#default-103" 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-9">filename</span><span class="hl-1">: </span><span class="hl-2">'README.md'</span><span class="hl-1">, </span><span class="hl-9">contents</span><span class="hl-1">: </span><span class="hl-2">'# replace this'</span><span class="hl-1"> }</span>
|
|
2048
2048
|
</code><button type="button">Copy</button></pre>
|
|
2049
2049
|
|
|
2050
2050
|
</div>
|
|
@@ -51,7 +51,7 @@ image, even if a <code>LOCALSTACK_AUTH_TOKEN</code> would otherwise select the P
|
|
|
51
51
|
</div>
|
|
52
52
|
<div class="tsd-comment tsd-typography">
|
|
53
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-6">CLI</span><span class="hl-2">'s default imag</span><span class="hl-
|
|
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-6">CLI</span><span class="hl-2">'s default imag</span><span class="hl-7">e</span>
|
|
55
55
|
</code><button type="button">Copy</button></pre>
|
|
56
56
|
|
|
57
57
|
</div>
|
|
@@ -65,7 +65,7 @@ image, even if a <code>LOCALSTACK_AUTH_TOKEN</code> would otherwise select the P
|
|
|
65
65
|
</div>
|
|
66
66
|
<div class="tsd-comment tsd-typography">
|
|
67
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-
|
|
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-8">4566</span>
|
|
69
69
|
</code><button type="button">Copy</button></pre>
|
|
70
70
|
|
|
71
71
|
</div></div></section>
|
|
@@ -98,7 +98,7 @@ in the same directory with a ".generated.ts" suffix.</p>
|
|
|
98
98
|
</div>
|
|
99
99
|
<div class="tsd-comment tsd-typography">
|
|
100
100
|
<div class="tsd-tag-default">
|
|
101
|
-
<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-
|
|
101
|
+
<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-8">2</span>
|
|
102
102
|
</code><button type="button">Copy</button></pre>
|
|
103
103
|
|
|
104
104
|
</div></div><aside class="tsd-sources">
|
|
@@ -964,7 +964,7 @@ Set to an empty string to not include <code>main</code> in your package.json</p>
|
|
|
964
964
|
</div>
|
|
965
965
|
<div class="tsd-comment tsd-typography">
|
|
966
966
|
<div class="tsd-tag-default">
|
|
967
|
-
<h4 class="tsd-anchor-link" id="default-40">Default<a href="#default-40" 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">d</span><span class="hl-1">.</span><span class="hl-5">ts</span><span class="hl-1"> </span><span class="hl-5">file</span><span class="hl-1"> </span><span class="hl-5">derived</span><span class="hl-1"> </span><span class="hl-5">from</span><span class="hl-1"> </span><span class="hl-5">the</span><span class="hl-1"> </span><span class="hl-5">project</span><span class="hl-2">'s entrypoint (usually lib/index.d.ts</span><span class="hl-
|
|
967
|
+
<h4 class="tsd-anchor-link" id="default-40">Default<a href="#default-40" 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">d</span><span class="hl-1">.</span><span class="hl-5">ts</span><span class="hl-1"> </span><span class="hl-5">file</span><span class="hl-1"> </span><span class="hl-5">derived</span><span class="hl-1"> </span><span class="hl-5">from</span><span class="hl-1"> </span><span class="hl-5">the</span><span class="hl-1"> </span><span class="hl-5">project</span><span class="hl-2">'s entrypoint (usually lib/index.d.ts</span><span class="hl-7">)</span>
|
|
968
968
|
</code><button type="button">Copy</button></pre>
|
|
969
969
|
|
|
970
970
|
</div>
|
|
@@ -1456,7 +1456,7 @@ Requires <code>npmVerifyPublished</code> to be enabled.</p>
|
|
|
1456
1456
|
</div>
|
|
1457
1457
|
<div class="tsd-comment tsd-typography">
|
|
1458
1458
|
<div class="tsd-tag-default">
|
|
1459
|
-
<h4 class="tsd-anchor-link" id="default-68">Default<a href="#default-68" 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-
|
|
1459
|
+
<h4 class="tsd-anchor-link" id="default-68">Default<a href="#default-68" 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-8">3600</span>
|
|
1460
1460
|
</code><button type="button">Copy</button></pre>
|
|
1461
1461
|
|
|
1462
1462
|
</div>
|
|
@@ -1846,7 +1846,7 @@ in order to create a publishing task for each publishing activity.</p>
|
|
|
1846
1846
|
</div>
|
|
1847
1847
|
<div class="tsd-comment tsd-typography">
|
|
1848
1848
|
<div class="tsd-tag-default">
|
|
1849
|
-
<h4 class="tsd-anchor-link" id="default-92">Default<a href="#default-92" 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-
|
|
1849
|
+
<h4 class="tsd-anchor-link" id="default-92">Default<a href="#default-92" 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-9">filename</span><span class="hl-1">: </span><span class="hl-2">'README.md'</span><span class="hl-1">, </span><span class="hl-9">contents</span><span class="hl-1">: </span><span class="hl-2">'# replace this'</span><span class="hl-1"> }</span>
|
|
1850
1850
|
</code><button type="button">Copy</button></pre>
|
|
1851
1851
|
|
|
1852
1852
|
</div>
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
</div>
|
|
55
55
|
<div class="tsd-comment tsd-typography">
|
|
56
56
|
<div class="tsd-tag-default">
|
|
57
|
-
<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-
|
|
57
|
+
<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-8">0</span>
|
|
58
58
|
</code><button type="button">Copy</button></pre>
|
|
59
59
|
|
|
60
60
|
</div>
|
|
@@ -234,7 +234,7 @@
|
|
|
234
234
|
</div>
|
|
235
235
|
<div class="tsd-comment tsd-typography">
|
|
236
236
|
<div class="tsd-tag-default">
|
|
237
|
-
<h4 class="tsd-anchor-link" id="default-13">Default<a href="#default-13" 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-
|
|
237
|
+
<h4 class="tsd-anchor-link" id="default-13">Default<a href="#default-13" 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-8">300</span>
|
|
238
238
|
</code><button type="button">Copy</button></pre>
|
|
239
239
|
|
|
240
240
|
</div>
|
|
@@ -276,7 +276,7 @@
|
|
|
276
276
|
</div>
|
|
277
277
|
<div class="tsd-comment tsd-typography">
|
|
278
278
|
<div class="tsd-tag-default">
|
|
279
|
-
<h4 class="tsd-anchor-link" id="default-16">Default<a href="#default-16" 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">project</span><span class="hl-2">'s development tsconfig (e.g. "test/tsconfig.json"</span><span class="hl-
|
|
279
|
+
<h4 class="tsd-anchor-link" id="default-16">Default<a href="#default-16" 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">project</span><span class="hl-2">'s development tsconfig (e.g. "test/tsconfig.json"</span><span class="hl-7">)</span>
|
|
280
280
|
</code><button type="button">Copy</button></pre>
|
|
281
281
|
|
|
282
282
|
</div>
|
|
@@ -52,7 +52,7 @@ which rules out plugins). Use <code>extraTestConfig</code> for <code>test</code>
|
|
|
52
52
|
</div>
|
|
53
53
|
<div class="tsd-comment tsd-typography">
|
|
54
54
|
<div class="tsd-tag-example">
|
|
55
|
-
<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-1">{ </span><span class="hl-
|
|
55
|
+
<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-1">{ </span><span class="hl-9">resolve</span><span class="hl-1">: { </span><span class="hl-9">alias</span><span class="hl-1">: { </span><span class="hl-2">"@"</span><span class="hl-1">: </span><span class="hl-2">"/src"</span><span class="hl-1"> } } }</span>
|
|
56
56
|
</code><button type="button">Copy</button></pre>
|
|
57
57
|
|
|
58
58
|
</div>
|
|
@@ -74,7 +74,7 @@ arrays) replace the generated value. Values are rendered as JSON, so they must b
|
|
|
74
74
|
</div>
|
|
75
75
|
<div class="tsd-comment tsd-typography">
|
|
76
76
|
<div class="tsd-tag-example">
|
|
77
|
-
<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-1">{ </span><span class="hl-
|
|
77
|
+
<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-1">{ </span><span class="hl-9">setupFiles</span><span class="hl-1">: [</span><span class="hl-2">"test/setup.ts"</span><span class="hl-1">], </span><span class="hl-9">expect</span><span class="hl-1">: { </span><span class="hl-9">requireAssertions</span><span class="hl-1">: </span><span class="hl-3">true</span><span class="hl-1"> } }</span>
|
|
78
78
|
</code><button type="button">Copy</button></pre>
|
|
79
79
|
|
|
80
80
|
</div>
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
# Components
|
|
2
|
+
|
|
3
|
+
`@nikovirtala/projen-constructs` ships reusable projen components for common development tasks. Add
|
|
4
|
+
a component to any project by constructing it with the project as its first argument. Every
|
|
5
|
+
TypeScript snippet below imports each identifier it uses, so you can paste it as-is.
|
|
6
|
+
|
|
7
|
+
## Vitest
|
|
8
|
+
|
|
9
|
+
[Vitest](https://vitest.dev) testing framework component.
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
import {
|
|
13
|
+
CoverageProvider,
|
|
14
|
+
CoverageReporter,
|
|
15
|
+
Vitest,
|
|
16
|
+
} from "@nikovirtala/projen-constructs";
|
|
17
|
+
|
|
18
|
+
new Vitest(project, {
|
|
19
|
+
vitestVersion: "^5",
|
|
20
|
+
config: {
|
|
21
|
+
coverageProvider: CoverageProvider.V8,
|
|
22
|
+
coverageReporters: [CoverageReporter.TEXT, CoverageReporter.LCOV],
|
|
23
|
+
},
|
|
24
|
+
});
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Type checking runs against the project's development tsconfig (`test/tsconfig.json`) unless
|
|
28
|
+
`config.typecheckTsconfig` says otherwise.
|
|
29
|
+
|
|
30
|
+
For Vitest settings that `config` does not cover, use `extraTestConfig` (merged into `test`) and
|
|
31
|
+
`extraConfig` (top-level options next to `test`):
|
|
32
|
+
|
|
33
|
+
```typescript
|
|
34
|
+
import { Vitest } from "@nikovirtala/projen-constructs";
|
|
35
|
+
|
|
36
|
+
new Vitest(project, {
|
|
37
|
+
extraTestConfig: {
|
|
38
|
+
setupFiles: ["test/setup.ts"],
|
|
39
|
+
},
|
|
40
|
+
extraConfig: {
|
|
41
|
+
resolve: { alias: { "@": "/src" } },
|
|
42
|
+
},
|
|
43
|
+
});
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
`extraTestConfig` is deep-merged over the generated `test` options: objects merge, and other values
|
|
47
|
+
(including arrays) replace the generated value. Both options are rendered as JSON, so their values
|
|
48
|
+
cannot contain functions or regular expressions, which rules out plugins.
|
|
49
|
+
|
|
50
|
+
## TypeDoc
|
|
51
|
+
|
|
52
|
+
[TypeDoc](https://typedoc.org) documentation generation component.
|
|
53
|
+
|
|
54
|
+
```typescript
|
|
55
|
+
import { EntryPointStrategy, TypeDoc } from "@nikovirtala/projen-constructs";
|
|
56
|
+
|
|
57
|
+
new TypeDoc(project, {
|
|
58
|
+
version: "^0.28",
|
|
59
|
+
typeDocConfig: {
|
|
60
|
+
entryPointStrategy: EntryPointStrategy.EXPAND,
|
|
61
|
+
out: "docs/api",
|
|
62
|
+
exclude: ["**/*.test.ts"],
|
|
63
|
+
},
|
|
64
|
+
});
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Mise
|
|
68
|
+
|
|
69
|
+
[Mise](https://mise.jdx.dev) dev tools and runtimes management component.
|
|
70
|
+
|
|
71
|
+
```typescript
|
|
72
|
+
import { Mise } from "@nikovirtala/projen-constructs";
|
|
73
|
+
|
|
74
|
+
new Mise(project, {
|
|
75
|
+
nodeVersion: "26.13.0",
|
|
76
|
+
});
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## Homebrew
|
|
80
|
+
|
|
81
|
+
[Homebrew](https://brew.sh) package management component. Writes a `Brewfile` and adds an
|
|
82
|
+
`install:homebrew` task that bootstraps Homebrew and runs `brew bundle`.
|
|
83
|
+
|
|
84
|
+
```typescript
|
|
85
|
+
import { Homebrew } from "@nikovirtala/projen-constructs";
|
|
86
|
+
|
|
87
|
+
const homebrew = new Homebrew(project, {
|
|
88
|
+
packages: ["jq", "yq"],
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
homebrew.addPackage("gh");
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
A fully qualified formula (`user/repository/formula`) also adds a `tap` entry. Since Homebrew 6,
|
|
95
|
+
formulae from non-official taps only load when trusted, so they are written with `trusted: true`.
|
|
96
|
+
That trusts only the formula, not the rest of its tap.
|
|
97
|
+
|
|
98
|
+
## Colima
|
|
99
|
+
|
|
100
|
+
[Colima](https://github.com/abiosoft/colima) container runtime component. An alternative to Docker.
|
|
101
|
+
|
|
102
|
+
```typescript
|
|
103
|
+
import { Colima } from "@nikovirtala/projen-constructs";
|
|
104
|
+
|
|
105
|
+
new Colima(project);
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
## LocalStack
|
|
109
|
+
|
|
110
|
+
[LocalStack](https://www.localstack.cloud) AWS emulation component.
|
|
111
|
+
|
|
112
|
+
```typescript
|
|
113
|
+
import { LocalStack } from "@nikovirtala/projen-constructs";
|
|
114
|
+
|
|
115
|
+
new LocalStack(project, {
|
|
116
|
+
services: ["s3", "lambda", "dynamodb"],
|
|
117
|
+
port: 4566,
|
|
118
|
+
debug: true,
|
|
119
|
+
});
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
## LambdaFunctionConstructGenerator
|
|
123
|
+
|
|
124
|
+
Generates AWS CDK Lambda Function constructs and bundles their code.
|
|
125
|
+
|
|
126
|
+
```typescript
|
|
127
|
+
import { LambdaFunctionConstructGenerator } from "@nikovirtala/projen-constructs";
|
|
128
|
+
|
|
129
|
+
new LambdaFunctionConstructGenerator(project, {
|
|
130
|
+
sourceDir: "src/handlers",
|
|
131
|
+
outputDir: "src/constructs/lambda",
|
|
132
|
+
filePattern: "*.lambda.ts",
|
|
133
|
+
esbuildOptions: {
|
|
134
|
+
minify: true,
|
|
135
|
+
sourcemap: true,
|
|
136
|
+
},
|
|
137
|
+
});
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
## Bundler
|
|
141
|
+
|
|
142
|
+
Low-level bundling utilities for Lambda functions.
|
|
143
|
+
|
|
144
|
+
```typescript
|
|
145
|
+
import {
|
|
146
|
+
Bundler,
|
|
147
|
+
LambdaFunctionCodeBundle,
|
|
148
|
+
} from "@nikovirtala/projen-constructs";
|
|
149
|
+
|
|
150
|
+
const bundler = new Bundler(project, {
|
|
151
|
+
assetsDir: "assets",
|
|
152
|
+
esbuildVersion: "^0.25",
|
|
153
|
+
});
|
|
154
|
+
|
|
155
|
+
new LambdaFunctionCodeBundle(project, {
|
|
156
|
+
entrypoint: "src/my-function.lambda.ts",
|
|
157
|
+
extension: ".lambda.ts",
|
|
158
|
+
});
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
## ProjectGenerator
|
|
162
|
+
|
|
163
|
+
Generates TypeScript project classes with standard configuration.
|
|
164
|
+
|
|
165
|
+
```typescript
|
|
166
|
+
import {
|
|
167
|
+
Mise,
|
|
168
|
+
ProjectGenerator,
|
|
169
|
+
ProjectType,
|
|
170
|
+
Vitest,
|
|
171
|
+
} from "@nikovirtala/projen-constructs";
|
|
172
|
+
|
|
173
|
+
new ProjectGenerator(project, {
|
|
174
|
+
name: "TypeScriptProject",
|
|
175
|
+
projectType: ProjectType.TYPE_SCRIPT_PROJECT,
|
|
176
|
+
filePath: "./src/projects/typescript.generated.ts",
|
|
177
|
+
components: [
|
|
178
|
+
{ componentClass: Mise },
|
|
179
|
+
{ componentClass: Vitest }, // auto-detects VitestOptions from the JSII manifest
|
|
180
|
+
],
|
|
181
|
+
});
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
Features:
|
|
185
|
+
|
|
186
|
+
- Automatically generates the `ProjectType` enum from projen's JSII manifest
|
|
187
|
+
- Auto-detects component options types from JSII manifests
|
|
188
|
+
- Strips projen's `@pjnew` annotation from `packageManager`, which `projen new` would otherwise
|
|
189
|
+
render into a generated `.projenrc.ts` as the package manager that ran the command
|
|
190
|
+
- Validates paths to prevent directory traversal attacks
|
|
191
|
+
- Structured error handling with custom error classes
|