Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: use projen native TextFile features for generated files #281

Merged
merged 12 commits into from
Jan 15, 2024
Merged
9 changes: 4 additions & 5 deletions .projen/deps.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions .projenrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const project = new TaimosTypescriptLibrary({
'axios',
'uuid',
'lambda-log',
'constructs',
],
defaultReleaseBranch: 'main',
minMajorVersion: '2',
Expand All @@ -24,13 +25,13 @@ const project = new TaimosTypescriptLibrary({
'@types/jwk-to-pem',
'@types/uuid',
'@hapi/boom',
'typedoc',
],
peerDeps: [
'openapi-typescript',
'dynamodb-onetable',
'aws-cdk-lib@^2.60.0',
'@aws-cdk/aws-cognito-identitypool-alpha@^2.60.0-alpha.0',
'constructs@^10.0.5',
],
keywords: [
'aws',
Expand All @@ -51,8 +52,6 @@ const project = new TaimosTypescriptLibrary({
},
});

project.addDevDeps('typedoc');

const docgen = project.addTask('docgen', {
description: 'Generate TypeScript API reference',
exec: `typedoc ${project.srcdir}/constructs --disableSources --out ${project.docsDirectory}constructs/`,
Expand Down
28 changes: 17 additions & 11 deletions docs/constructs/classes/AssetCdn.html
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,7 @@ <h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagReadonly">Readonly</code
<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>
<div class="tsd-comment tsd-typography"><p>The tree node.</p>
</div>
<div class="tsd-comment tsd-typography">
<h4>Stability</h4><p>stable</p>
</div><aside class="tsd-sources">
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
<p>Inherited from Construct.node</p></aside></section>
<section class="tsd-panel tsd-member"><a id="zone" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagReadonly">Readonly</code> <span>zone</span><a href="#zone" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
Expand All @@ -90,29 +88,37 @@ <h3 class="tsd-anchor-link"><span>to<wbr/>String</span><a href="#toString" aria-
<div class="tsd-comment tsd-typography"><p>Returns a string representation of this construct.</p>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4>
<div class="tsd-comment tsd-typography">
<h4>Stability</h4><p>stable</p>
</div><aside class="tsd-sources">
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
<p>Inherited from Construct.toString</p></aside></li></ul></section>
<section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="isConstruct" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <span>is<wbr/>Construct</span><a href="#isConstruct" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
<ul class="tsd-signatures tsd-is-inherited tsd-is-external">
<li class="tsd-signature tsd-anchor-link" id="isConstruct.isConstruct-1"><span class="tsd-kind-call-signature">is<wbr/>Construct</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">x</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-kind-parameter">x</span><span class="tsd-signature-symbol"> is </span><span class="tsd-signature-type ">Construct</span><a href="#isConstruct.isConstruct-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
<li class="tsd-description">
<div class="tsd-comment tsd-typography"><p>(deprecated) Checks if <code>x</code> is a construct.</p>
<div class="tsd-comment tsd-typography"><p>Checks if <code>x</code> is a construct.</p>
<p>Use this method instead of <code>instanceof</code> to properly detect <code>Construct</code>
instances, even when the construct library is symlinked.</p>
<p>Explanation: in JavaScript, multiple copies of the <code>constructs</code> library on
disk are seen as independent, completely different libraries. As a
consequence, the class <code>Construct</code> in each copy of the <code>constructs</code> library
is seen as a different class, and an instance of one class will not test as
<code>instanceof</code> the other class. <code>npm install</code> will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the <code>constructs</code>
library can be accidentally installed, and <code>instanceof</code> will behave
unpredictably. It is safest to avoid using <code>instanceof</code>, and using
this type-testing method instead.</p>
</div>
<div class="tsd-parameters">
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameter-list">
<li>
<h5><span class="tsd-kind-parameter">x</span>: <span class="tsd-signature-type">any</span></h5>
<div class="tsd-comment tsd-typography"><p>Any object.</p>
<div class="tsd-comment tsd-typography"><p>Any object</p>
</div></li></ul></div>
<h4 class="tsd-returns-title">Returns <span class="tsd-kind-parameter">x</span><span class="tsd-signature-symbol"> is </span><span class="tsd-signature-type ">Construct</span></h4><p>true if <code>x</code> is an object created from a class which extends <code>Construct</code>.</p>

<div class="tsd-comment tsd-typography">
<h4>Deprecated</h4><p>use <code>x instanceof Construct</code> instead</p>
</div><aside class="tsd-sources">
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
<p>Inherited from Construct.isConstruct</p></aside></li></ul></section></section></div>
<div class="col-sidebar">
<div class="page-menu">
Expand Down
28 changes: 17 additions & 11 deletions docs/constructs/classes/BaseApi.html
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,7 @@ <h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagReadonly">Readonly</code
<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>
<div class="tsd-comment tsd-typography"><p>The tree node.</p>
</div>
<div class="tsd-comment tsd-typography">
<h4>Stability</h4><p>stable</p>
</div><aside class="tsd-sources">
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
<p>Inherited from Construct.node</p></aside></section></section>
<section class="tsd-panel-group tsd-member-group">
<h2>Methods</h2>
Expand All @@ -97,29 +95,37 @@ <h3 class="tsd-anchor-link"><span>to<wbr/>String</span><a href="#toString" aria-
<div class="tsd-comment tsd-typography"><p>Returns a string representation of this construct.</p>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4>
<div class="tsd-comment tsd-typography">
<h4>Stability</h4><p>stable</p>
</div><aside class="tsd-sources">
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
<p>Inherited from Construct.toString</p></aside></li></ul></section>
<section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="isConstruct" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <span>is<wbr/>Construct</span><a href="#isConstruct" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
<ul class="tsd-signatures tsd-is-inherited tsd-is-external">
<li class="tsd-signature tsd-anchor-link" id="isConstruct.isConstruct-1"><span class="tsd-kind-call-signature">is<wbr/>Construct</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">x</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-kind-parameter">x</span><span class="tsd-signature-symbol"> is </span><span class="tsd-signature-type ">Construct</span><a href="#isConstruct.isConstruct-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
<li class="tsd-description">
<div class="tsd-comment tsd-typography"><p>(deprecated) Checks if <code>x</code> is a construct.</p>
<div class="tsd-comment tsd-typography"><p>Checks if <code>x</code> is a construct.</p>
<p>Use this method instead of <code>instanceof</code> to properly detect <code>Construct</code>
instances, even when the construct library is symlinked.</p>
<p>Explanation: in JavaScript, multiple copies of the <code>constructs</code> library on
disk are seen as independent, completely different libraries. As a
consequence, the class <code>Construct</code> in each copy of the <code>constructs</code> library
is seen as a different class, and an instance of one class will not test as
<code>instanceof</code> the other class. <code>npm install</code> will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the <code>constructs</code>
library can be accidentally installed, and <code>instanceof</code> will behave
unpredictably. It is safest to avoid using <code>instanceof</code>, and using
this type-testing method instead.</p>
</div>
<div class="tsd-parameters">
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameter-list">
<li>
<h5><span class="tsd-kind-parameter">x</span>: <span class="tsd-signature-type">any</span></h5>
<div class="tsd-comment tsd-typography"><p>Any object.</p>
<div class="tsd-comment tsd-typography"><p>Any object</p>
</div></li></ul></div>
<h4 class="tsd-returns-title">Returns <span class="tsd-kind-parameter">x</span><span class="tsd-signature-symbol"> is </span><span class="tsd-signature-type ">Construct</span></h4><p>true if <code>x</code> is an object created from a class which extends <code>Construct</code>.</p>

<div class="tsd-comment tsd-typography">
<h4>Deprecated</h4><p>use <code>x instanceof Construct</code> instead</p>
</div><aside class="tsd-sources">
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
<p>Inherited from Construct.isConstruct</p></aside></li></ul></section></section></div>
<div class="col-sidebar">
<div class="page-menu">
Expand Down
28 changes: 17 additions & 11 deletions docs/constructs/classes/CognitoAuthentication.html
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,7 @@ <h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagReadonly">Readonly</code
<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>
<div class="tsd-comment tsd-typography"><p>The tree node.</p>
</div>
<div class="tsd-comment tsd-typography">
<h4>Stability</h4><p>stable</p>
</div><aside class="tsd-sources">
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
<p>Inherited from Construct.node</p></aside></section>
<section class="tsd-panel tsd-member"><a id="preSignUpFunction" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOptional">Optional</code> <code class="tsd-tag ts-flagReadonly">Readonly</code> <span>pre<wbr/>Sign<wbr/>Up<wbr/>Function</span><a href="#preSignUpFunction" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
Expand All @@ -106,29 +104,37 @@ <h3 class="tsd-anchor-link"><span>to<wbr/>String</span><a href="#toString" aria-
<div class="tsd-comment tsd-typography"><p>Returns a string representation of this construct.</p>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4>
<div class="tsd-comment tsd-typography">
<h4>Stability</h4><p>stable</p>
</div><aside class="tsd-sources">
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
<p>Inherited from Construct.toString</p></aside></li></ul></section>
<section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="isConstruct" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <span>is<wbr/>Construct</span><a href="#isConstruct" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
<ul class="tsd-signatures tsd-is-inherited tsd-is-external">
<li class="tsd-signature tsd-anchor-link" id="isConstruct.isConstruct-1"><span class="tsd-kind-call-signature">is<wbr/>Construct</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">x</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-kind-parameter">x</span><span class="tsd-signature-symbol"> is </span><span class="tsd-signature-type ">Construct</span><a href="#isConstruct.isConstruct-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
<li class="tsd-description">
<div class="tsd-comment tsd-typography"><p>(deprecated) Checks if <code>x</code> is a construct.</p>
<div class="tsd-comment tsd-typography"><p>Checks if <code>x</code> is a construct.</p>
<p>Use this method instead of <code>instanceof</code> to properly detect <code>Construct</code>
instances, even when the construct library is symlinked.</p>
<p>Explanation: in JavaScript, multiple copies of the <code>constructs</code> library on
disk are seen as independent, completely different libraries. As a
consequence, the class <code>Construct</code> in each copy of the <code>constructs</code> library
is seen as a different class, and an instance of one class will not test as
<code>instanceof</code> the other class. <code>npm install</code> will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the <code>constructs</code>
library can be accidentally installed, and <code>instanceof</code> will behave
unpredictably. It is safest to avoid using <code>instanceof</code>, and using
this type-testing method instead.</p>
</div>
<div class="tsd-parameters">
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameter-list">
<li>
<h5><span class="tsd-kind-parameter">x</span>: <span class="tsd-signature-type">any</span></h5>
<div class="tsd-comment tsd-typography"><p>Any object.</p>
<div class="tsd-comment tsd-typography"><p>Any object</p>
</div></li></ul></div>
<h4 class="tsd-returns-title">Returns <span class="tsd-kind-parameter">x</span><span class="tsd-signature-symbol"> is </span><span class="tsd-signature-type ">Construct</span></h4><p>true if <code>x</code> is an object created from a class which extends <code>Construct</code>.</p>

<div class="tsd-comment tsd-typography">
<h4>Deprecated</h4><p>use <code>x instanceof Construct</code> instead</p>
</div><aside class="tsd-sources">
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
<p>Inherited from Construct.isConstruct</p></aside></li></ul></section></section></div>
<div class="col-sidebar">
<div class="page-menu">
Expand Down
28 changes: 17 additions & 11 deletions docs/constructs/classes/GraphQlApi.html
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,7 @@ <h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagReadonly">Readonly</code
<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>
<div class="tsd-comment tsd-typography"><p>The tree node.</p>
</div>
<div class="tsd-comment tsd-typography">
<h4>Stability</h4><p>stable</p>
</div><aside class="tsd-sources">
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
<p>Inherited from <a href="BaseApi.html">BaseApi</a>.<a href="BaseApi.html#node">node</a></p></aside></section>
<section class="tsd-panel tsd-member tsd-is-private"><a id="props" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</code> <span>props</span><a href="#props" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
Expand Down Expand Up @@ -389,29 +387,37 @@ <h3 class="tsd-anchor-link"><span>to<wbr/>String</span><a href="#toString" aria-
<div class="tsd-comment tsd-typography"><p>Returns a string representation of this construct.</p>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4>
<div class="tsd-comment tsd-typography">
<h4>Stability</h4><p>stable</p>
</div><aside class="tsd-sources">
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
<p>Inherited from <a href="BaseApi.html">BaseApi</a>.<a href="BaseApi.html#toString">toString</a></p></aside></li></ul></section>
<section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="isConstruct" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <span>is<wbr/>Construct</span><a href="#isConstruct" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
<ul class="tsd-signatures tsd-is-inherited tsd-is-external">
<li class="tsd-signature tsd-anchor-link" id="isConstruct.isConstruct-1"><span class="tsd-kind-call-signature">is<wbr/>Construct</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">x</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-kind-parameter">x</span><span class="tsd-signature-symbol"> is </span><span class="tsd-signature-type ">Construct</span><a href="#isConstruct.isConstruct-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
<li class="tsd-description">
<div class="tsd-comment tsd-typography"><p>(deprecated) Checks if <code>x</code> is a construct.</p>
<div class="tsd-comment tsd-typography"><p>Checks if <code>x</code> is a construct.</p>
<p>Use this method instead of <code>instanceof</code> to properly detect <code>Construct</code>
instances, even when the construct library is symlinked.</p>
<p>Explanation: in JavaScript, multiple copies of the <code>constructs</code> library on
disk are seen as independent, completely different libraries. As a
consequence, the class <code>Construct</code> in each copy of the <code>constructs</code> library
is seen as a different class, and an instance of one class will not test as
<code>instanceof</code> the other class. <code>npm install</code> will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the <code>constructs</code>
library can be accidentally installed, and <code>instanceof</code> will behave
unpredictably. It is safest to avoid using <code>instanceof</code>, and using
this type-testing method instead.</p>
</div>
<div class="tsd-parameters">
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameter-list">
<li>
<h5><span class="tsd-kind-parameter">x</span>: <span class="tsd-signature-type">any</span></h5>
<div class="tsd-comment tsd-typography"><p>Any object.</p>
<div class="tsd-comment tsd-typography"><p>Any object</p>
</div></li></ul></div>
<h4 class="tsd-returns-title">Returns <span class="tsd-kind-parameter">x</span><span class="tsd-signature-symbol"> is </span><span class="tsd-signature-type ">Construct</span></h4><p>true if <code>x</code> is an object created from a class which extends <code>Construct</code>.</p>

<div class="tsd-comment tsd-typography">
<h4>Deprecated</h4><p>use <code>x instanceof Construct</code> instead</p>
</div><aside class="tsd-sources">
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
<p>Inherited from <a href="BaseApi.html">BaseApi</a>.<a href="BaseApi.html#isConstruct">isConstruct</a></p></aside></li></ul></section></section></div>
<div class="col-sidebar">
<div class="page-menu">
Expand Down
Loading