agent-claw: automated task changes
This commit is contained in:
1
cdk/node_modules/aws-cdk-lib/node_modules/.bin/semver
generated
vendored
Symbolic link
1
cdk/node_modules/aws-cdk-lib/node_modules/.bin/semver
generated
vendored
Symbolic link
@@ -0,0 +1 @@
|
||||
../semver/bin/semver.js
|
||||
3
cdk/node_modules/aws-cdk-lib/node_modules/@aws-cdk/cloud-assembly-api/.yarnrc.yml
generated
vendored
Normal file
3
cdk/node_modules/aws-cdk-lib/node_modules/@aws-cdk/cloud-assembly-api/.yarnrc.yml
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
# ~~ Generated by projen. To modify, edit .projenrc.js and run "yarn projen".
|
||||
|
||||
{}
|
||||
202
cdk/node_modules/aws-cdk-lib/node_modules/@aws-cdk/cloud-assembly-api/LICENSE
generated
vendored
Normal file
202
cdk/node_modules/aws-cdk-lib/node_modules/@aws-cdk/cloud-assembly-api/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,202 @@
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
19
cdk/node_modules/aws-cdk-lib/node_modules/@aws-cdk/cloud-assembly-api/README.md
generated
vendored
Normal file
19
cdk/node_modules/aws-cdk-lib/node_modules/@aws-cdk/cloud-assembly-api/README.md
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
# Cloud Assembly API
|
||||
|
||||
This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project.
|
||||
|
||||
It provides routines to save and load Cloud Assembly manifests, as defined in
|
||||
the `@aws-cdk/cloud-assembly-schema` package.
|
||||
|
||||
A lot of this code used to live in the `@aws-cdk/cx-api` package, but has been
|
||||
extracted from it to its own package. That original package used to define the
|
||||
`Cloud Executable <--> CDK CLI` contract in both directions, but this
|
||||
responsibility has now been split:
|
||||
|
||||
```
|
||||
┌────────────────────────┐ @/cloud-assembly-api ┌────────────────┐
|
||||
│ │────────────────────────▶│ │
|
||||
│ Cloud Executable │ │ CDK CLI │
|
||||
│ │◀────────────────────────│ │
|
||||
└────────────────────────┘ @/cx-api └────────────────┘
|
||||
```
|
||||
93
cdk/node_modules/aws-cdk-lib/node_modules/@aws-cdk/cloud-assembly-api/design/NESTED_ASSEMBLIES.md
generated
vendored
Normal file
93
cdk/node_modules/aws-cdk-lib/node_modules/@aws-cdk/cloud-assembly-api/design/NESTED_ASSEMBLIES.md
generated
vendored
Normal file
@@ -0,0 +1,93 @@
|
||||
# Nested Assemblies
|
||||
|
||||
For the CI/CD project we need to be able to a final, authoritative, immutable
|
||||
rendition of part of the construct tree. This is a part of the application
|
||||
that we can ask the CI/CD system to deploy as a unit, and have it get a fighting
|
||||
chance of getting it right. This is because:
|
||||
|
||||
- The stacks will be known.
|
||||
- Their interdependencies will be known, and won't change anymore.
|
||||
|
||||
To that end, we're introducing the concept of an "nested cloud assembly".
|
||||
This is a part of the construct tree that is finalized independently of the
|
||||
rest, so that other constructs can reflect on it.
|
||||
|
||||
Constructs of type `Stage` will produce nested cloud assemblies.
|
||||
|
||||
## Restrictions
|
||||
|
||||
### Assets
|
||||
|
||||
Right now, if the same asset is used in multiple cloud assemblies, it will
|
||||
be staged independently in ever Cloud Assembly (making it take up more
|
||||
space than necessary).
|
||||
|
||||
This is unfortunate. We can think about sharing the staging directories
|
||||
between Stages, should be an easy optimization that can be applied later.
|
||||
|
||||
### Dependencies
|
||||
|
||||
It seems that it might be desirable to have dependencies that reach outside
|
||||
a single `Stage`. Consider the case where we have shared resources that
|
||||
may be shared between Stages. A typical example would be a VPC:
|
||||
|
||||
```
|
||||
┌───────────────┐
|
||||
│ │
|
||||
│ VpcStack │
|
||||
│ │
|
||||
└───────────────┘
|
||||
▲
|
||||
│
|
||||
│
|
||||
┌─────────────┴─────────────┐
|
||||
│ │
|
||||
┌───────────────┼──────────┐ ┌──────────┼───────────────┐
|
||||
│Stage │ │ │ │ Stage│
|
||||
│ │ │ │ │ │
|
||||
│ ┌───────────────┐ │ │ ┌───────────────┐ │
|
||||
│ │ │ │ │ │ │ │
|
||||
│ │ App1Stack │ │ │ │ App2Stack │ │
|
||||
│ │ │ │ │ │ │ │
|
||||
│ └───────────────┘ │ │ └───────────────┘ │
|
||||
│ │ │ │
|
||||
└──────────────────────────┘ └──────────────────────────┘
|
||||
```
|
||||
|
||||
This seems like a reasonable thing to want to be able to do.
|
||||
|
||||
|
||||
Right now, for practical reasons we're disallowing dependencies outside
|
||||
nested assemblies. That is not to say that this can never be made to work,
|
||||
but as it's really rather a significant chunk of work it has not been
|
||||
implemented yet. Things to consider:
|
||||
|
||||
- Do artifact identifiers need to be globally unique? (Does that destroy
|
||||
local assumptions around naming that constructs can make?)
|
||||
- How are artifacts addressed across assembly boundaries? Are they just the
|
||||
absolute name, wherever in the Cloud Assembly tree the artifact is? Do they
|
||||
represent a path from the top-level cloud assembly
|
||||
(`SubAsm/SubAsm/Artifact`)? Are they relative paths (`../SubAsm/Artifact`)?
|
||||
- Can there be cyclic dependencies between nested assemblies? Is it okay to
|
||||
have both dependencies `AsmA/Stack1 -> AsmB/Stack1`, and `AsmB/Stack2 ->
|
||||
AsmA/Stack2`? Why, or why not? How will we ensure that?
|
||||
|
||||
Even if we can make the addressing work at the artifact level, at the
|
||||
construct tree level we'd be giving up the guarantees we are getting from
|
||||
having `Stage` constructs produce isolated Cloud Assemblies by having
|
||||
dependencies outside them. Consider having two stages, `StageA` with `StackA`
|
||||
and `StageB` with `StackB`. We must `synth()` them in some order, either A or
|
||||
B first. Let's say A goes first (but the same argument obviously holds in
|
||||
reverse). What if during the `synth()` of `StageB`, we discover `StackB`
|
||||
introduces a dependency on `StackA`? By that point, `StageA` has already
|
||||
synthesized and `StackA` has produced a (so-called "immutable") template.
|
||||
Obviously we can't change that anymore, so we can't introduce that dependency
|
||||
anymore.
|
||||
|
||||
Seems like we should be calling `synth()` on multiple stages consumer-first!
|
||||
|
||||
The problem is that we are generally building a Pipeline *producer*-first, since
|
||||
we are modeling and building it in deployment order, which is the reverse order
|
||||
the pipeline would `synth()` each of the stages in, in order to build itself.
|
||||
|
||||
Since this is all very tricky, let's consider it out of scope for now.
|
||||
46
cdk/node_modules/aws-cdk-lib/node_modules/@aws-cdk/cloud-assembly-api/lib/artifacts/asset-manifest-artifact.d.ts
generated
vendored
Normal file
46
cdk/node_modules/aws-cdk-lib/node_modules/@aws-cdk/cloud-assembly-api/lib/artifacts/asset-manifest-artifact.d.ts
generated
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
import type * as cxschema from '@aws-cdk/cloud-assembly-schema';
|
||||
import { CloudArtifact } from '../cloud-artifact';
|
||||
import type { CloudAssembly } from '../cloud-assembly';
|
||||
/**
|
||||
* Asset manifest is a description of a set of assets which need to be built and published
|
||||
*/
|
||||
export declare class AssetManifestArtifact extends CloudArtifact {
|
||||
/**
|
||||
* Checks if `art` is an instance of this class.
|
||||
*
|
||||
* Use this method instead of `instanceof` to properly detect `AssetManifestArtifact`
|
||||
* instances, even when the construct library is symlinked.
|
||||
*
|
||||
* Explanation: in JavaScript, multiple copies of the `cx-api` library on
|
||||
* disk are seen as independent, completely different libraries. As a
|
||||
* consequence, the class `AssetManifestArtifact` in each copy of the `cx-api` library
|
||||
* is seen as a different class, and an instance of one class will not test as
|
||||
* `instanceof` the other class. `npm install` 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 `cx-api`
|
||||
* library can be accidentally installed, and `instanceof` will behave
|
||||
* unpredictably. It is safest to avoid using `instanceof`, and using
|
||||
* this type-testing method instead.
|
||||
*/
|
||||
static isAssetManifestArtifact(this: void, art: any): art is AssetManifestArtifact;
|
||||
/**
|
||||
* The file name of the asset manifest
|
||||
*/
|
||||
readonly file: string;
|
||||
/**
|
||||
* Version of bootstrap stack required to deploy this stack
|
||||
*/
|
||||
readonly requiresBootstrapStackVersion: number | undefined;
|
||||
/**
|
||||
* Name of SSM parameter with bootstrap stack version
|
||||
*
|
||||
* @default - Discover SSM parameter by reading stack
|
||||
*/
|
||||
readonly bootstrapStackVersionSsmParameter?: string;
|
||||
private _contents?;
|
||||
constructor(assembly: CloudAssembly, name: string, artifact: cxschema.ArtifactManifest);
|
||||
/**
|
||||
* The Asset Manifest contents
|
||||
*/
|
||||
get contents(): cxschema.AssetManifest;
|
||||
}
|
||||
66
cdk/node_modules/aws-cdk-lib/node_modules/@aws-cdk/cloud-assembly-api/lib/artifacts/asset-manifest-artifact.js
generated
vendored
Normal file
66
cdk/node_modules/aws-cdk-lib/node_modules/@aws-cdk/cloud-assembly-api/lib/artifacts/asset-manifest-artifact.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
147
cdk/node_modules/aws-cdk-lib/node_modules/@aws-cdk/cloud-assembly-api/lib/artifacts/cloudformation-artifact.d.ts
generated
vendored
Normal file
147
cdk/node_modules/aws-cdk-lib/node_modules/@aws-cdk/cloud-assembly-api/lib/artifacts/cloudformation-artifact.d.ts
generated
vendored
Normal file
@@ -0,0 +1,147 @@
|
||||
import * as cxschema from '@aws-cdk/cloud-assembly-schema';
|
||||
import { CloudArtifact } from '../cloud-artifact';
|
||||
import type { CloudAssembly } from '../cloud-assembly';
|
||||
import type { Environment } from '../environment';
|
||||
export declare class CloudFormationStackArtifact extends CloudArtifact {
|
||||
/**
|
||||
* Checks if `art` is an instance of this class.
|
||||
*
|
||||
* Use this method instead of `instanceof` to properly detect `CloudFormationStackArtifact`
|
||||
* instances, even when the construct library is symlinked.
|
||||
*
|
||||
* Explanation: in JavaScript, multiple copies of the `cx-api` library on
|
||||
* disk are seen as independent, completely different libraries. As a
|
||||
* consequence, the class `CloudFormationStackArtifact` in each copy of the `cx-api` library
|
||||
* is seen as a different class, and an instance of one class will not test as
|
||||
* `instanceof` the other class. `npm install` 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 `cx-api`
|
||||
* library can be accidentally installed, and `instanceof` will behave
|
||||
* unpredictably. It is safest to avoid using `instanceof`, and using
|
||||
* this type-testing method instead.
|
||||
*/
|
||||
static isCloudFormationStackArtifact(art: any): art is CloudFormationStackArtifact;
|
||||
/**
|
||||
* The file name of the template.
|
||||
*/
|
||||
readonly templateFile: string;
|
||||
/**
|
||||
* The original name as defined in the CDK app.
|
||||
*/
|
||||
readonly originalName: string;
|
||||
/**
|
||||
* Any assets associated with this stack.
|
||||
*/
|
||||
readonly assets: cxschema.AssetMetadataEntry[];
|
||||
/**
|
||||
* CloudFormation parameters to pass to the stack.
|
||||
*/
|
||||
readonly parameters: {
|
||||
[id: string]: string;
|
||||
};
|
||||
/**
|
||||
* CloudFormation tags to pass to the stack.
|
||||
*/
|
||||
readonly tags: {
|
||||
[id: string]: string;
|
||||
};
|
||||
/**
|
||||
* SNS Topics that will receive stack events.
|
||||
*/
|
||||
readonly notificationArns?: string[];
|
||||
/**
|
||||
* The physical name of this stack.
|
||||
*/
|
||||
readonly stackName: string;
|
||||
/**
|
||||
* A string that represents this stack. Should only be used in user
|
||||
* interfaces. If the stackName has not been set explicitly, or has been set
|
||||
* to artifactId, it will return the hierarchicalId of the stack. Otherwise,
|
||||
* it will return something like "<hierarchicalId> (<stackName>)"
|
||||
*/
|
||||
readonly displayName: string;
|
||||
/**
|
||||
* The physical name of this stack.
|
||||
* @deprecated renamed to `stackName`
|
||||
*/
|
||||
readonly name: string;
|
||||
/**
|
||||
* The environment into which to deploy this artifact.
|
||||
*/
|
||||
readonly environment: Environment;
|
||||
/**
|
||||
* The role that needs to be assumed to deploy the stack
|
||||
*
|
||||
* @default - No role is assumed (current credentials are used)
|
||||
*/
|
||||
readonly assumeRoleArn?: string;
|
||||
/**
|
||||
* External ID to use when assuming role for cloudformation deployments
|
||||
*
|
||||
* @default - No external ID
|
||||
*/
|
||||
readonly assumeRoleExternalId?: string;
|
||||
/**
|
||||
* Additional options to pass to STS when assuming the role for cloudformation deployments.
|
||||
*
|
||||
* - `RoleArn` should not be used. Use the dedicated `assumeRoleArn` property instead.
|
||||
* - `ExternalId` should not be used. Use the dedicated `assumeRoleExternalId` instead.
|
||||
* - `TransitiveTagKeys` defaults to use all keys (if any) specified in `Tags`. E.g, all tags are transitive by default.
|
||||
*
|
||||
* @see https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/STS.html#assumeRole-property
|
||||
* @default - No additional options.
|
||||
*/
|
||||
readonly assumeRoleAdditionalOptions?: {
|
||||
[key: string]: any;
|
||||
};
|
||||
/**
|
||||
* The role that is passed to CloudFormation to execute the change set
|
||||
*
|
||||
* @default - No role is passed (currently assumed role/credentials are used)
|
||||
*/
|
||||
readonly cloudFormationExecutionRoleArn?: string;
|
||||
/**
|
||||
* The role to use to look up values from the target AWS account
|
||||
*
|
||||
* @default - No role is assumed (current credentials are used)
|
||||
*/
|
||||
readonly lookupRole?: cxschema.BootstrapRole;
|
||||
/**
|
||||
* If the stack template has already been included in the asset manifest, its asset URL
|
||||
*
|
||||
* @default - Not uploaded yet, upload just before deploying
|
||||
*/
|
||||
readonly stackTemplateAssetObjectUrl?: string;
|
||||
/**
|
||||
* Version of bootstrap stack required to deploy this stack
|
||||
*
|
||||
* @default - No bootstrap stack required
|
||||
*/
|
||||
readonly requiresBootstrapStackVersion?: number;
|
||||
/**
|
||||
* Name of SSM parameter with bootstrap stack version
|
||||
*
|
||||
* @default - Discover SSM parameter by reading stack
|
||||
*/
|
||||
readonly bootstrapStackVersionSsmParameter?: string;
|
||||
/**
|
||||
* Whether termination protection is enabled for this stack.
|
||||
*/
|
||||
readonly terminationProtection?: boolean;
|
||||
/**
|
||||
* Whether this stack should be validated by the CLI after synthesis
|
||||
*
|
||||
* @default - false
|
||||
*/
|
||||
readonly validateOnSynth?: boolean;
|
||||
private _template;
|
||||
constructor(assembly: CloudAssembly, artifactId: string, artifact: cxschema.ArtifactManifest);
|
||||
/**
|
||||
* Full path to the template file
|
||||
*/
|
||||
get templateFullPath(): string;
|
||||
/**
|
||||
* The CloudFormation template for this stack.
|
||||
*/
|
||||
get template(): any;
|
||||
}
|
||||
94
cdk/node_modules/aws-cdk-lib/node_modules/@aws-cdk/cloud-assembly-api/lib/artifacts/cloudformation-artifact.js
generated
vendored
Normal file
94
cdk/node_modules/aws-cdk-lib/node_modules/@aws-cdk/cloud-assembly-api/lib/artifacts/cloudformation-artifact.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1
cdk/node_modules/aws-cdk-lib/node_modules/@aws-cdk/cloud-assembly-api/lib/artifacts/nested-cloud-assembly-artifact-aug.d.ts
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/node_modules/@aws-cdk/cloud-assembly-api/lib/artifacts/nested-cloud-assembly-artifact-aug.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export {};
|
||||
19
cdk/node_modules/aws-cdk-lib/node_modules/@aws-cdk/cloud-assembly-api/lib/artifacts/nested-cloud-assembly-artifact-aug.js
generated
vendored
Normal file
19
cdk/node_modules/aws-cdk-lib/node_modules/@aws-cdk/cloud-assembly-api/lib/artifacts/nested-cloud-assembly-artifact-aug.js
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const nested_cloud_assembly_artifact_1 = require("./nested-cloud-assembly-artifact");
|
||||
const cloud_assembly_1 = require("../cloud-assembly");
|
||||
const cacheSym = Symbol();
|
||||
/**
|
||||
* The nested Assembly
|
||||
*
|
||||
* Declared in a different file to break circular dep between CloudAssembly and NestedCloudAssemblyArtifact
|
||||
*/
|
||||
Object.defineProperty(nested_cloud_assembly_artifact_1.NestedCloudAssemblyArtifact.prototype, 'nestedAssembly', {
|
||||
get() {
|
||||
if (!this[cacheSym]) {
|
||||
this[cacheSym] = new cloud_assembly_1.CloudAssembly(this.fullPath, this.assembly.loadOptions);
|
||||
}
|
||||
return this[cacheSym];
|
||||
},
|
||||
});
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmVzdGVkLWNsb3VkLWFzc2VtYmx5LWFydGlmYWN0LWF1Zy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIm5lc3RlZC1jbG91ZC1hc3NlbWJseS1hcnRpZmFjdC1hdWcudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFBQSxxRkFBK0U7QUFDL0Usc0RBQWtEO0FBRWxELE1BQU0sUUFBUSxHQUFHLE1BQU0sRUFBRSxDQUFDO0FBRTFCOzs7O0dBSUc7QUFDSCxNQUFNLENBQUMsY0FBYyxDQUFDLDREQUEyQixDQUFDLFNBQVMsRUFBRSxnQkFBZ0IsRUFBRTtJQUM3RSxHQUFHO1FBQ0QsSUFBSSxDQUFDLElBQUksQ0FBQyxRQUFRLENBQUMsRUFBRSxDQUFDO1lBQ3BCLElBQUksQ0FBQyxRQUFRLENBQUMsR0FBRyxJQUFJLDhCQUFhLENBQUMsSUFBSSxDQUFDLFFBQVEsRUFBRSxJQUFJLENBQUMsUUFBUSxDQUFDLFdBQVcsQ0FBQyxDQUFDO1FBQy9FLENBQUM7UUFDRCxPQUFPLElBQUksQ0FBQyxRQUFRLENBQUMsQ0FBQztJQUN4QixDQUFDO0NBQ0YsQ0FBQyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgTmVzdGVkQ2xvdWRBc3NlbWJseUFydGlmYWN0IH0gZnJvbSAnLi9uZXN0ZWQtY2xvdWQtYXNzZW1ibHktYXJ0aWZhY3QnO1xuaW1wb3J0IHsgQ2xvdWRBc3NlbWJseSB9IGZyb20gJy4uL2Nsb3VkLWFzc2VtYmx5JztcblxuY29uc3QgY2FjaGVTeW0gPSBTeW1ib2woKTtcblxuLyoqXG4gKiBUaGUgbmVzdGVkIEFzc2VtYmx5XG4gKlxuICogRGVjbGFyZWQgaW4gYSBkaWZmZXJlbnQgZmlsZSB0byBicmVhayBjaXJjdWxhciBkZXAgYmV0d2VlbiBDbG91ZEFzc2VtYmx5IGFuZCBOZXN0ZWRDbG91ZEFzc2VtYmx5QXJ0aWZhY3RcbiAqL1xuT2JqZWN0LmRlZmluZVByb3BlcnR5KE5lc3RlZENsb3VkQXNzZW1ibHlBcnRpZmFjdC5wcm90b3R5cGUsICduZXN0ZWRBc3NlbWJseScsIHtcbiAgZ2V0KCkge1xuICAgIGlmICghdGhpc1tjYWNoZVN5bV0pIHtcbiAgICAgIHRoaXNbY2FjaGVTeW1dID0gbmV3IENsb3VkQXNzZW1ibHkodGhpcy5mdWxsUGF0aCwgdGhpcy5hc3NlbWJseS5sb2FkT3B0aW9ucyk7XG4gICAgfVxuICAgIHJldHVybiB0aGlzW2NhY2hlU3ltXTtcbiAgfSxcbn0pO1xuIl19
|
||||
45
cdk/node_modules/aws-cdk-lib/node_modules/@aws-cdk/cloud-assembly-api/lib/artifacts/nested-cloud-assembly-artifact.d.ts
generated
vendored
Normal file
45
cdk/node_modules/aws-cdk-lib/node_modules/@aws-cdk/cloud-assembly-api/lib/artifacts/nested-cloud-assembly-artifact.d.ts
generated
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
import type * as cxschema from '@aws-cdk/cloud-assembly-schema';
|
||||
import { CloudArtifact } from '../cloud-artifact';
|
||||
import type { CloudAssembly } from '../cloud-assembly';
|
||||
/**
|
||||
* Asset manifest is a description of a set of assets which need to be built and published
|
||||
*/
|
||||
export declare class NestedCloudAssemblyArtifact extends CloudArtifact {
|
||||
/**
|
||||
* Checks if `art` is an instance of this class.
|
||||
*
|
||||
* Use this method instead of `instanceof` to properly detect `NestedCloudAssemblyArtifact`
|
||||
* instances, even when the construct library is symlinked.
|
||||
*
|
||||
* Explanation: in JavaScript, multiple copies of the `cx-api` library on
|
||||
* disk are seen as independent, completely different libraries. As a
|
||||
* consequence, the class `NestedCloudAssemblyArtifact` in each copy of the `cx-api` library
|
||||
* is seen as a different class, and an instance of one class will not test as
|
||||
* `instanceof` the other class. `npm install` 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 `cx-api`
|
||||
* library can be accidentally installed, and `instanceof` will behave
|
||||
* unpredictably. It is safest to avoid using `instanceof`, and using
|
||||
* this type-testing method instead.
|
||||
*/
|
||||
static isNestedCloudAssemblyArtifact(art: any): art is NestedCloudAssemblyArtifact;
|
||||
/**
|
||||
* The relative directory name of the asset manifest
|
||||
*/
|
||||
readonly directoryName: string;
|
||||
/**
|
||||
* Display name
|
||||
*/
|
||||
readonly displayName: string;
|
||||
constructor(assembly: CloudAssembly, name: string, artifact: cxschema.ArtifactManifest);
|
||||
/**
|
||||
* Full path to the nested assembly directory
|
||||
*/
|
||||
get fullPath(): string;
|
||||
}
|
||||
export interface NestedCloudAssemblyArtifact {
|
||||
/**
|
||||
* The nested Assembly
|
||||
*/
|
||||
readonly nestedAssembly: CloudAssembly;
|
||||
}
|
||||
56
cdk/node_modules/aws-cdk-lib/node_modules/@aws-cdk/cloud-assembly-api/lib/artifacts/nested-cloud-assembly-artifact.js
generated
vendored
Normal file
56
cdk/node_modules/aws-cdk-lib/node_modules/@aws-cdk/cloud-assembly-api/lib/artifacts/nested-cloud-assembly-artifact.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
25
cdk/node_modules/aws-cdk-lib/node_modules/@aws-cdk/cloud-assembly-api/lib/artifacts/tree-cloud-artifact.d.ts
generated
vendored
Normal file
25
cdk/node_modules/aws-cdk-lib/node_modules/@aws-cdk/cloud-assembly-api/lib/artifacts/tree-cloud-artifact.d.ts
generated
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
import type * as cxschema from '@aws-cdk/cloud-assembly-schema';
|
||||
import { CloudArtifact } from '../cloud-artifact';
|
||||
import type { CloudAssembly } from '../cloud-assembly';
|
||||
export declare class TreeCloudArtifact extends CloudArtifact {
|
||||
/**
|
||||
* Checks if `art` is an instance of this class.
|
||||
*
|
||||
* Use this method instead of `instanceof` to properly detect `TreeCloudArtifact`
|
||||
* instances, even when the construct library is symlinked.
|
||||
*
|
||||
* Explanation: in JavaScript, multiple copies of the `cx-api` library on
|
||||
* disk are seen as independent, completely different libraries. As a
|
||||
* consequence, the class `TreeCloudArtifact` in each copy of the `cx-api` library
|
||||
* is seen as a different class, and an instance of one class will not test as
|
||||
* `instanceof` the other class. `npm install` 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 `cx-api`
|
||||
* library can be accidentally installed, and `instanceof` will behave
|
||||
* unpredictably. It is safest to avoid using `instanceof`, and using
|
||||
* this type-testing method instead.
|
||||
*/
|
||||
static isTreeCloudArtifact(art: any): art is TreeCloudArtifact;
|
||||
readonly file: string;
|
||||
constructor(assembly: CloudAssembly, name: string, artifact: cxschema.ArtifactManifest);
|
||||
}
|
||||
49
cdk/node_modules/aws-cdk-lib/node_modules/@aws-cdk/cloud-assembly-api/lib/artifacts/tree-cloud-artifact.js
generated
vendored
Normal file
49
cdk/node_modules/aws-cdk-lib/node_modules/@aws-cdk/cloud-assembly-api/lib/artifacts/tree-cloud-artifact.js
generated
vendored
Normal file
@@ -0,0 +1,49 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.TreeCloudArtifact = void 0;
|
||||
const cloud_artifact_1 = require("../cloud-artifact");
|
||||
const error_1 = require("../private/error");
|
||||
const TREE_CLOUD_ARTIFACT_SYM = Symbol.for('@aws-cdk/cx-api.TreeCloudArtifact');
|
||||
class TreeCloudArtifact extends cloud_artifact_1.CloudArtifact {
|
||||
/**
|
||||
* Checks if `art` is an instance of this class.
|
||||
*
|
||||
* Use this method instead of `instanceof` to properly detect `TreeCloudArtifact`
|
||||
* instances, even when the construct library is symlinked.
|
||||
*
|
||||
* Explanation: in JavaScript, multiple copies of the `cx-api` library on
|
||||
* disk are seen as independent, completely different libraries. As a
|
||||
* consequence, the class `TreeCloudArtifact` in each copy of the `cx-api` library
|
||||
* is seen as a different class, and an instance of one class will not test as
|
||||
* `instanceof` the other class. `npm install` 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 `cx-api`
|
||||
* library can be accidentally installed, and `instanceof` will behave
|
||||
* unpredictably. It is safest to avoid using `instanceof`, and using
|
||||
* this type-testing method instead.
|
||||
*/
|
||||
static isTreeCloudArtifact(art) {
|
||||
return art && typeof art === 'object' && TREE_CLOUD_ARTIFACT_SYM in art;
|
||||
}
|
||||
constructor(assembly, name, artifact) {
|
||||
super(assembly, name, artifact);
|
||||
const properties = (this.manifest.properties || {});
|
||||
if (!properties.file) {
|
||||
throw new error_1.CloudAssemblyError('Invalid TreeCloudArtifact. Missing "file" property');
|
||||
}
|
||||
this.file = properties.file;
|
||||
}
|
||||
}
|
||||
exports.TreeCloudArtifact = TreeCloudArtifact;
|
||||
/**
|
||||
* Mark all instances of 'TreeCloudArtifact'
|
||||
*
|
||||
* Why not put this in the constructor? Because this is a class property,
|
||||
* not an instance property. It applies to all instances of the class.
|
||||
*/
|
||||
Object.defineProperty(TreeCloudArtifact.prototype, TREE_CLOUD_ARTIFACT_SYM, {
|
||||
value: true,
|
||||
enumerable: false,
|
||||
writable: false,
|
||||
});
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHJlZS1jbG91ZC1hcnRpZmFjdC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInRyZWUtY2xvdWQtYXJ0aWZhY3QudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQ0Esc0RBQWtEO0FBRWxELDRDQUFzRDtBQUV0RCxNQUFNLHVCQUF1QixHQUFHLE1BQU0sQ0FBQyxHQ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25zdCBwcm9wZXJ0aWVzID0gKHRoaXMubWFuaWZlc3QucHJvcGVydGllcyB8fCB7fSkgYXMgY3hzY2hlbWEuVHJlZUFydGlmYWN0UHJvcGVydGllcztcbiAgICBpZiAoIXByb3BlcnRpZXMuZmlsZSkge1xuICAgICAgdGhyb3cgbmV3IENsb3VkQXNzZW1ibHlFcnJvcignSW52YWxpZCBUcmVlQ2xvdWRBcnRpZmFjdC4gTWlzc2luZyBcImZpbGVcIiBwcm9wZXJ0eScpO1xuICAgIH1cbiAgICB0aGlzLmZpbGUgPSBwcm9wZXJ0aWVzLmZpbGU7XG4gIH1cbn1cblxuLyoqXG4gKiBNYXJrIGFsbCBpbnN0YW5jZXMgb2YgJ1RyZWVDbG91ZEFydGlmYWN0J1xuICpcbiAqIFdoeSBub3QgcHV0IHRoaXMgaW4gdGhlIGNvbnN0cnVjdG9yPyBCZWNhdXNlIHRoaXMgaXMgYSBjbGFzcyBwcm9wZXJ0eSxcbiAqIG5vdCBhbiBpbnN0YW5jZSBwcm9wZXJ0eS4gSXQgYXBwbGllcyB0byBhbGwgaW5zdGFuY2VzIG9mIHRoZSBjbGFzcy5cbiAqL1xuT2JqZWN0LmRlZmluZVByb3BlcnR5KFRyZWVDbG91ZEFydGlmYWN0LnByb3RvdHlwZSwgVFJFRV9DTE9VRF9BUlRJRkFDVF9TWU0sIHtcbiAgdmFsdWU6IHRydWUsXG4gIGVudW1lcmFibGU6IGZhbHNlLFxuICB3cml0YWJsZTogZmFsc2UsXG59KTtcbiJdfQ==
|
||||
34
cdk/node_modules/aws-cdk-lib/node_modules/@aws-cdk/cloud-assembly-api/lib/assets.d.ts
generated
vendored
Normal file
34
cdk/node_modules/aws-cdk-lib/node_modules/@aws-cdk/cloud-assembly-api/lib/assets.d.ts
generated
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
/**
|
||||
* If this is set in the context, the aws:asset:xxx metadata entries will not be
|
||||
* added to the template. This is used, for example, when we run integrationt
|
||||
* tests.
|
||||
*/
|
||||
export declare const ASSET_RESOURCE_METADATA_ENABLED_CONTEXT = "aws:cdk:enable-asset-metadata";
|
||||
/**
|
||||
* Metadata added to the CloudFormation template entries that map local assets
|
||||
* to resources.
|
||||
*/
|
||||
export declare const ASSET_RESOURCE_METADATA_PATH_KEY = "aws:asset:path";
|
||||
export declare const ASSET_RESOURCE_METADATA_DOCKERFILE_PATH_KEY = "aws:asset:dockerfile-path";
|
||||
export declare const ASSET_RESOURCE_METADATA_DOCKER_BUILD_ARGS_KEY = "aws:asset:docker-build-args";
|
||||
export declare const ASSET_RESOURCE_METADATA_DOCKER_BUILD_CONTEXTS_KEY = "aws:asset:docker-build-contexts";
|
||||
export declare const ASSET_RESOURCE_METADATA_DOCKER_BUILD_SECRETS_KEY = "aws:asset:docker-build-secrets";
|
||||
export declare const ASSET_RESOURCE_METADATA_DOCKER_BUILD_SSH_KEY = "aws:asset:docker-build-ssh";
|
||||
export declare const ASSET_RESOURCE_METADATA_DOCKER_BUILD_TARGET_KEY = "aws:asset:docker-build-target";
|
||||
export declare const ASSET_RESOURCE_METADATA_PROPERTY_KEY = "aws:asset:property";
|
||||
export declare const ASSET_RESOURCE_METADATA_IS_BUNDLED_KEY = "aws:asset:is-bundled";
|
||||
export declare const ASSET_RESOURCE_METADATA_DOCKER_OUTPUTS_KEY = "aws:asset:docker-outputs";
|
||||
export declare const ASSET_RESOURCE_METADATA_DOCKER_CACHE_FROM_KEY = "aws:asset:docker-cache-from";
|
||||
export declare const ASSET_RESOURCE_METADATA_DOCKER_CACHE_TO_KEY = "aws:asset:docker-cache-to";
|
||||
export declare const ASSET_RESOURCE_METADATA_DOCKER_CACHE_DISABLED_KEY = "aws:asset:docker-cache-disabled";
|
||||
/**
|
||||
* Separator string that separates the prefix separator from the object key separator.
|
||||
*
|
||||
* Asset keys will look like:
|
||||
*
|
||||
* /assets/MyConstruct12345678/||abcdef12345.zip
|
||||
*
|
||||
* This allows us to encode both the prefix and the full location in a single
|
||||
* CloudFormation Template Parameter.
|
||||
*/
|
||||
export declare const ASSET_PREFIX_SEPARATOR = "||";
|
||||
38
cdk/node_modules/aws-cdk-lib/node_modules/@aws-cdk/cloud-assembly-api/lib/assets.js
generated
vendored
Normal file
38
cdk/node_modules/aws-cdk-lib/node_modules/@aws-cdk/cloud-assembly-api/lib/assets.js
generated
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.ASSET_PREFIX_SEPARATOR = exports.ASSET_RESOURCE_METADATA_DOCKER_CACHE_DISABLED_KEY = exports.ASSET_RESOURCE_METADATA_DOCKER_CACHE_TO_KEY = exports.ASSET_RESOURCE_METADATA_DOCKER_CACHE_FROM_KEY = exports.ASSET_RESOURCE_METADATA_DOCKER_OUTPUTS_KEY = exports.ASSET_RESOURCE_METADATA_IS_BUNDLED_KEY = exports.ASSET_RESOURCE_METADATA_PROPERTY_KEY = exports.ASSET_RESOURCE_METADATA_DOCKER_BUILD_TARGET_KEY = exports.ASSET_RESOURCE_METADATA_DOCKER_BUILD_SSH_KEY = exports.ASSET_RESOURCE_METADATA_DOCKER_BUILD_SECRETS_KEY = exports.ASSET_RESOURCE_METADATA_DOCKER_BUILD_CONTEXTS_KEY = exports.ASSET_RESOURCE_METADATA_DOCKER_BUILD_ARGS_KEY = exports.ASSET_RESOURCE_METADATA_DOCKERFILE_PATH_KEY = exports.ASSET_RESOURCE_METADATA_PATH_KEY = exports.ASSET_RESOURCE_METADATA_ENABLED_CONTEXT = void 0;
|
||||
/**
|
||||
* If this is set in the context, the aws:asset:xxx metadata entries will not be
|
||||
* added to the template. This is used, for example, when we run integrationt
|
||||
* tests.
|
||||
*/
|
||||
exports.ASSET_RESOURCE_METADATA_ENABLED_CONTEXT = 'aws:cdk:enable-asset-metadata';
|
||||
/**
|
||||
* Metadata added to the CloudFormation template entries that map local assets
|
||||
* to resources.
|
||||
*/
|
||||
exports.ASSET_RESOURCE_METADATA_PATH_KEY = 'aws:asset:path';
|
||||
exports.ASSET_RESOURCE_METADATA_DOCKERFILE_PATH_KEY = 'aws:asset:dockerfile-path';
|
||||
exports.ASSET_RESOURCE_METADATA_DOCKER_BUILD_ARGS_KEY = 'aws:asset:docker-build-args';
|
||||
exports.ASSET_RESOURCE_METADATA_DOCKER_BUILD_CONTEXTS_KEY = 'aws:asset:docker-build-contexts';
|
||||
exports.ASSET_RESOURCE_METADATA_DOCKER_BUILD_SECRETS_KEY = 'aws:asset:docker-build-secrets';
|
||||
exports.ASSET_RESOURCE_METADATA_DOCKER_BUILD_SSH_KEY = 'aws:asset:docker-build-ssh';
|
||||
exports.ASSET_RESOURCE_METADATA_DOCKER_BUILD_TARGET_KEY = 'aws:asset:docker-build-target';
|
||||
exports.ASSET_RESOURCE_METADATA_PROPERTY_KEY = 'aws:asset:property';
|
||||
exports.ASSET_RESOURCE_METADATA_IS_BUNDLED_KEY = 'aws:asset:is-bundled';
|
||||
exports.ASSET_RESOURCE_METADATA_DOCKER_OUTPUTS_KEY = 'aws:asset:docker-outputs';
|
||||
exports.ASSET_RESOURCE_METADATA_DOCKER_CACHE_FROM_KEY = 'aws:asset:docker-cache-from';
|
||||
exports.ASSET_RESOURCE_METADATA_DOCKER_CACHE_TO_KEY = 'aws:asset:docker-cache-to';
|
||||
exports.ASSET_RESOURCE_METADATA_DOCKER_CACHE_DISABLED_KEY = 'aws:asset:docker-cache-disabled';
|
||||
/**
|
||||
* Separator string that separates the prefix separator from the object key separator.
|
||||
*
|
||||
* Asset keys will look like:
|
||||
*
|
||||
* /assets/MyConstruct12345678/||abcdef12345.zip
|
||||
*
|
||||
* This allows us to encode both the prefix and the full location in a single
|
||||
* CloudFormation Template Parameter.
|
||||
*/
|
||||
exports.ASSET_PREFIX_SEPARATOR = '||';
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXNzZXRzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiYXNzZXRzLnR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HRoZSBwcmVmaXggYW5kIHRoZSBmdWxsIGxvY2F0aW9uIGluIGEgc2luZ2xlXG4gKiBDbG91ZEZvcm1hdGlvbiBUZW1wbGF0ZSBQYXJhbWV0ZXIuXG4gKi9cbmV4cG9ydCBjb25zdCBBU1NFVF9QUkVGSVhfU0VQQVJBVE9SID0gJ3x8JztcbiJdfQ==
|
||||
7
cdk/node_modules/aws-cdk-lib/node_modules/@aws-cdk/cloud-assembly-api/lib/bootstrap.d.ts
generated
vendored
Normal file
7
cdk/node_modules/aws-cdk-lib/node_modules/@aws-cdk/cloud-assembly-api/lib/bootstrap.d.ts
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
/**
|
||||
* This SSM parameter does not invalidate the template
|
||||
*
|
||||
* If this string occurs in the description of an SSM parameter, the CLI
|
||||
* will not assume that the stack must always be redeployed.
|
||||
*/
|
||||
export declare const SSMPARAM_NO_INVALIDATE = "[cdk:skip]";
|
||||
12
cdk/node_modules/aws-cdk-lib/node_modules/@aws-cdk/cloud-assembly-api/lib/bootstrap.js
generated
vendored
Normal file
12
cdk/node_modules/aws-cdk-lib/node_modules/@aws-cdk/cloud-assembly-api/lib/bootstrap.js
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.SSMPARAM_NO_INVALIDATE = void 0;
|
||||
/**
|
||||
* This SSM parameter does not invalidate the template
|
||||
*
|
||||
* If this string occurs in the description of an SSM parameter, the CLI
|
||||
* will not assume that the stack must always be redeployed.
|
||||
*/
|
||||
exports.SSMPARAM_NO_INVALIDATE = '[cdk:skip]';
|
||||
// Not strictly part of the cloud-assembly-api, but it definitely belongs here more than in cx-api.
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYm9vdHN0cmFwLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiYm9vdHN0cmFwLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBOzs7OztHQUtHO0FBQ1UsUUFBQSxzQkFBc0IsR0FBRyxZQUFZLENBQUM7QUFFbkQsbUdBQW1HIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBUaGlzIFNTTSBwYXJhbWV0ZXIgZG9lcyBub3QgaW52YWxpZGF0ZSB0aGUgdGVtcGxhdGVcbiAqXG4gKiBJZiB0aGlzIHN0cmluZyBvY2N1cnMgaW4gdGhlIGRlc2NyaXB0aW9uIG9mIGFuIFNTTSBwYXJhbWV0ZXIsIHRoZSBDTElcbiAqIHdpbGwgbm90IGFzc3VtZSB0aGF0IHRoZSBzdGFjayBtdXN0IGFsd2F5cyBiZSByZWRlcGxveWVkLlxuICovXG5leHBvcnQgY29uc3QgU1NNUEFSQU1fTk9fSU5WQUxJREFURSA9ICdbY2RrOnNraXBdJztcblxuLy8gTm90IHN0cmljdGx5IHBhcnQgb2YgdGhlIGNsb3VkLWFzc2VtYmx5LWFwaSwgYnV0IGl0IGRlZmluaXRlbHkgYmVsb25ncyBoZXJlIG1vcmUgdGhhbiBpbiBjeC1hcGkuXG4iXX0=
|
||||
1
cdk/node_modules/aws-cdk-lib/node_modules/@aws-cdk/cloud-assembly-api/lib/cloud-artifact-aug.d.ts
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/node_modules/@aws-cdk/cloud-assembly-api/lib/cloud-artifact-aug.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export {};
|
||||
29
cdk/node_modules/aws-cdk-lib/node_modules/@aws-cdk/cloud-assembly-api/lib/cloud-artifact-aug.js
generated
vendored
Normal file
29
cdk/node_modules/aws-cdk-lib/node_modules/@aws-cdk/cloud-assembly-api/lib/cloud-artifact-aug.js
generated
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const cxschema = require("@aws-cdk/cloud-assembly-schema");
|
||||
const asset_manifest_artifact_1 = require("./artifacts/asset-manifest-artifact");
|
||||
const cloudformation_artifact_1 = require("./artifacts/cloudformation-artifact");
|
||||
const nested_cloud_assembly_artifact_1 = require("./artifacts/nested-cloud-assembly-artifact");
|
||||
const tree_cloud_artifact_1 = require("./artifacts/tree-cloud-artifact");
|
||||
const cloud_artifact_1 = require("./cloud-artifact");
|
||||
/**
|
||||
* Add the 'fromManifest' factory function
|
||||
*
|
||||
* It is defined in a separate file to avoid circular dependencies between 'cloud-artifact.ts'
|
||||
* and all of its subclass files.
|
||||
*/
|
||||
cloud_artifact_1.CloudArtifact.fromManifest = function fromManifest(assembly, id, artifact) {
|
||||
switch (artifact.type) {
|
||||
case cxschema.ArtifactType.AWS_CLOUDFORMATION_STACK:
|
||||
return new cloudformation_artifact_1.CloudFormationStackArtifact(assembly, id, artifact);
|
||||
case cxschema.ArtifactType.CDK_TREE:
|
||||
return new tree_cloud_artifact_1.TreeCloudArtifact(assembly, id, artifact);
|
||||
case cxschema.ArtifactType.ASSET_MANIFEST:
|
||||
return new asset_manifest_artifact_1.AssetManifestArtifact(assembly, id, artifact);
|
||||
case cxschema.ArtifactType.NESTED_CLOUD_ASSEMBLY:
|
||||
return new nested_cloud_assembly_artifact_1.NestedCloudAssemblyArtifact(assembly, id, artifact);
|
||||
default:
|
||||
return undefined;
|
||||
}
|
||||
};
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2xvdWQtYXJ0aWZhY3QtYXVnLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiY2xvdWQtYXJ0aWZhY3QtYXVnLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQUEsMkRBQTJEO0FBQzNELGlGQUE0RTtBQUM1RSxpRkFBa0Y7QUFDbEYsK0ZBQXlGO0FBQ3pGLHlFQUFvRTtBQUNwRSxxREFBaUQ7QUFHakQ7Ozs7O0dBS0c7QUFDSCw4QkFBYSxDQUFDLFl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c2NoZW1hLkFydGlmYWN0VHlwZS5DREtfVFJFRTpcbiAgICAgIHJldHVybiBuZXcgVHJlZUNsb3VkQXJ0aWZhY3QoYXNzZW1ibHksIGlkLCBhcnRpZmFjdCk7XG4gICAgY2FzZSBjeHNjaGVtYS5BcnRpZmFjdFR5cGUuQVNTRVRfTUFOSUZFU1Q6XG4gICAgICByZXR1cm4gbmV3IEFzc2V0TWFuaWZlc3RBcnRpZmFjdChhc3NlbWJseSwgaWQsIGFydGlmYWN0KTtcbiAgICBjYXNlIGN4c2NoZW1hLkFydGlmYWN0VHlwZS5ORVNURURfQ0xPVURfQVNTRU1CTFk6XG4gICAgICByZXR1cm4gbmV3IE5lc3RlZENsb3VkQXNzZW1ibHlBcnRpZmFjdChhc3NlbWJseSwgaWQsIGFydGlmYWN0KTtcbiAgICBkZWZhdWx0OlxuICAgICAgcmV0dXJuIHVuZGVmaW5lZDtcbiAgfVxufTtcbiJdfQ==
|
||||
89
cdk/node_modules/aws-cdk-lib/node_modules/@aws-cdk/cloud-assembly-api/lib/cloud-artifact.d.ts
generated
vendored
Normal file
89
cdk/node_modules/aws-cdk-lib/node_modules/@aws-cdk/cloud-assembly-api/lib/cloud-artifact.d.ts
generated
vendored
Normal file
@@ -0,0 +1,89 @@
|
||||
import * as cxschema from '@aws-cdk/cloud-assembly-schema';
|
||||
import type { CloudAssembly } from './cloud-assembly';
|
||||
import type { MetadataEntryResult, SynthesisMessage } from './metadata';
|
||||
/**
|
||||
* Artifact properties for CloudFormation stacks.
|
||||
*/
|
||||
export interface AwsCloudFormationStackProperties {
|
||||
/**
|
||||
* A file relative to the assembly root which contains the CloudFormation template for this stack.
|
||||
*/
|
||||
readonly templateFile: string;
|
||||
/**
|
||||
* Values for CloudFormation stack parameters that should be passed when the stack is deployed.
|
||||
*/
|
||||
readonly parameters?: {
|
||||
[id: string]: string;
|
||||
};
|
||||
/**
|
||||
* The name to use for the CloudFormation stack.
|
||||
* @default - name derived from artifact ID
|
||||
*/
|
||||
readonly stackName?: string;
|
||||
/**
|
||||
* Whether to enable termination protection for this stack.
|
||||
*
|
||||
* @default false
|
||||
*/
|
||||
readonly terminationProtection?: boolean;
|
||||
}
|
||||
/**
|
||||
* Represents an artifact within a cloud assembly.
|
||||
*/
|
||||
export declare class CloudArtifact {
|
||||
readonly assembly: CloudAssembly;
|
||||
readonly id: string;
|
||||
/**
|
||||
* Read the metadata for the given artifact
|
||||
*
|
||||
* HISTORICAL OR PRIVATE USE ONLY
|
||||
*
|
||||
* This is publicly exposed as a static function for downstream libraries that
|
||||
* don't use the `CloudAssembly`/`CloudArtifact` API, yet still need to read
|
||||
* an artifact's metadata.
|
||||
*
|
||||
* 99% of consumers should just access `artifact.metadata`.
|
||||
*/
|
||||
static readMetadata(assemblyDirectory: string, x: cxschema.ArtifactManifest): Record<string, cxschema.MetadataEntry[]>;
|
||||
/**
|
||||
* Returns a subclass of `CloudArtifact` based on the artifact type defined in the artifact manifest.
|
||||
*
|
||||
* @param assembly - The cloud assembly from which to load the artifact
|
||||
* @param id - The artifact ID
|
||||
* @param artifact - The artifact manifest
|
||||
* @returns the `CloudArtifact` that matches the artifact type or `undefined` if it's an artifact type that is unrecognized by this module.
|
||||
*/
|
||||
static fromManifest(assembly: CloudAssembly, id: string, artifact: cxschema.ArtifactManifest): CloudArtifact | undefined;
|
||||
/**
|
||||
* The artifact's manifest
|
||||
*/
|
||||
readonly manifest: cxschema.ArtifactManifest;
|
||||
/**
|
||||
* The set of messages extracted from the artifact's metadata.
|
||||
*/
|
||||
readonly messages: SynthesisMessage[];
|
||||
/**
|
||||
* Cache of resolved dependencies.
|
||||
*/
|
||||
private _deps?;
|
||||
protected constructor(assembly: CloudAssembly, id: string, manifest: cxschema.ArtifactManifest);
|
||||
/**
|
||||
* Returns the metadata associated with this Cloud Artifact
|
||||
*/
|
||||
get metadata(): Record<string, cxschema.MetadataEntry[]>;
|
||||
/**
|
||||
* Returns all the artifacts that this artifact depends on.
|
||||
*/
|
||||
get dependencies(): CloudArtifact[];
|
||||
/**
|
||||
* @returns all the metadata entries of a specific type in this artifact.
|
||||
*/
|
||||
findMetadataByType(type: string): MetadataEntryResult[];
|
||||
private renderMessages;
|
||||
/**
|
||||
* An identifier that shows where this artifact is located in the tree
|
||||
* of nested assemblies, based on their manifests. Defaults to the normal
|
||||
* id. Should only be used in user interfaces.
|
||||
*/
|
||||
get hierarchicalId(): string;
|
||||
}
|
||||
129
cdk/node_modules/aws-cdk-lib/node_modules/@aws-cdk/cloud-assembly-api/lib/cloud-artifact.js
generated
vendored
Normal file
129
cdk/node_modules/aws-cdk-lib/node_modules/@aws-cdk/cloud-assembly-api/lib/cloud-artifact.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
270
cdk/node_modules/aws-cdk-lib/node_modules/@aws-cdk/cloud-assembly-api/lib/cloud-assembly.d.ts
generated
vendored
Normal file
270
cdk/node_modules/aws-cdk-lib/node_modules/@aws-cdk/cloud-assembly-api/lib/cloud-assembly.d.ts
generated
vendored
Normal file
@@ -0,0 +1,270 @@
|
||||
import type { ICloudAssembly } from '@aws-cdk/cloud-assembly-schema';
|
||||
import * as cxschema from '@aws-cdk/cloud-assembly-schema/lib';
|
||||
import { CloudFormationStackArtifact } from './artifacts/cloudformation-artifact';
|
||||
import { NestedCloudAssemblyArtifact } from './artifacts/nested-cloud-assembly-artifact';
|
||||
import { TreeCloudArtifact } from './artifacts/tree-cloud-artifact';
|
||||
import { CloudArtifact } from './cloud-artifact';
|
||||
/**
|
||||
* Represents a deployable cloud application.
|
||||
*/
|
||||
export declare class CloudAssembly implements ICloudAssembly {
|
||||
/**
|
||||
* Return whether the given object is a CloudAssembly.
|
||||
*
|
||||
* We do attribute detection since we can't reliably use 'instanceof'.
|
||||
*/
|
||||
static isCloudAssembly(x: any): x is CloudAssembly;
|
||||
/**
|
||||
* Cleans up any temporary assembly directories that got created in this process
|
||||
*
|
||||
* If a Cloud Assembly is emitted to a temporary directory, its directory gets
|
||||
* added to a list. This function iterates over that list and deletes each
|
||||
* directory in it, to free up disk space.
|
||||
*
|
||||
* This function will normally be called automatically during Node process
|
||||
* exit and so you don't need to call this. However, some test environments do
|
||||
* not properly trigger Node's `exit` event. Notably: Jest does not trigger
|
||||
* the `exit` event (<https://github.com/jestjs/jest/issues/10927>).
|
||||
*
|
||||
* ## Cleaning up temporary directories in jest
|
||||
*
|
||||
* For Jest, you have to make sure this function is called at the end of the
|
||||
* test suite instead:
|
||||
*
|
||||
* ```js
|
||||
* import { CloudAssembly } from 'aws-cdk-lib/cx-api';
|
||||
*
|
||||
* afterAll(CloudAssembly.cleanupTemporaryDirectories);
|
||||
* ```
|
||||
*
|
||||
* Alternatively, you can use the `setupFilesAfterEnv` feature and use a
|
||||
* provided helper script to automatically inject the above into every
|
||||
* test file, so you don't have to do it by hand.
|
||||
*
|
||||
* ```
|
||||
* $ npx jest --setupFilesAfterEnv aws-cdk-lib/testhelpers/jest-autoclean
|
||||
* ```
|
||||
*
|
||||
* Or put the following into `jest.config.js`:
|
||||
*
|
||||
* ```js
|
||||
* module.exports = {
|
||||
* // ...
|
||||
* setupFilesAfterEnv: ['aws-cdk-lib/testhelpers/jest-cleanup'],
|
||||
* };
|
||||
* ```
|
||||
*/
|
||||
static cleanupTemporaryDirectories(): void;
|
||||
/**
|
||||
* The root directory of the cloud assembly.
|
||||
*/
|
||||
readonly directory: string;
|
||||
/**
|
||||
* The schema version of the assembly manifest.
|
||||
*/
|
||||
readonly version: string;
|
||||
/**
|
||||
* All artifacts included in this assembly.
|
||||
*/
|
||||
readonly artifacts: CloudArtifact[];
|
||||
/**
|
||||
* Runtime information such as module versions used to synthesize this assembly.
|
||||
*/
|
||||
readonly runtime: cxschema.RuntimeInfo;
|
||||
/**
|
||||
* The raw assembly manifest.
|
||||
*/
|
||||
readonly manifest: cxschema.AssemblyManifest;
|
||||
/**
|
||||
* The load options used to create this assembly, propagated to nested assemblies.
|
||||
*/
|
||||
private readonly loadOptions?;
|
||||
/**
|
||||
* Reads a cloud assembly from the specified directory.
|
||||
* @param directory - The root directory of the assembly.
|
||||
*/
|
||||
constructor(directory: string, loadOptions?: cxschema.LoadManifestOptions);
|
||||
/**
|
||||
* Attempts to find an artifact with a specific identity.
|
||||
* @returns A `CloudArtifact` object or `undefined` if the artifact does not exist in this assembly.
|
||||
* @param id - The artifact ID
|
||||
*/
|
||||
tryGetArtifact(id: string): CloudArtifact | undefined;
|
||||
/**
|
||||
* Returns a CloudFormation stack artifact from this assembly.
|
||||
*
|
||||
* Will only search the current assembly.
|
||||
*
|
||||
* @param stackName - the name of the CloudFormation stack.
|
||||
* @throws if there is no stack artifact by that name
|
||||
* @throws if there is more than one stack with the same stack name. You can
|
||||
* use `getStackArtifact(stack.artifactId)` instead.
|
||||
* @returns a `CloudFormationStackArtifact` object.
|
||||
*/
|
||||
getStackByName(stackName: string): CloudFormationStackArtifact;
|
||||
/**
|
||||
* Returns a CloudFormation stack artifact by name from this assembly.
|
||||
* @deprecated renamed to `getStackByName` (or `getStackArtifact(id)`)
|
||||
*/
|
||||
getStack(stackName: string): CloudFormationStackArtifact;
|
||||
/**
|
||||
* Returns a CloudFormation stack artifact from this assembly.
|
||||
*
|
||||
* @param artifactId - the artifact id of the stack (can be obtained through `stack.artifactId`).
|
||||
* @throws if there is no stack artifact with that id
|
||||
* @returns a `CloudFormationStackArtifact` object.
|
||||
*/
|
||||
getStackArtifact(artifactId: string): CloudFormationStackArtifact;
|
||||
private tryGetArtifactRecursively;
|
||||
/**
|
||||
* Returns all the stacks, including the ones in nested assemblies
|
||||
*/
|
||||
get stacksRecursively(): CloudFormationStackArtifact[];
|
||||
/**
|
||||
* Returns a nested assembly artifact.
|
||||
*
|
||||
* @param artifactId - The artifact ID of the nested assembly
|
||||
*/
|
||||
getNestedAssemblyArtifact(artifactId: string): NestedCloudAssemblyArtifact;
|
||||
/**
|
||||
* Returns a nested assembly.
|
||||
*
|
||||
* @param artifactId - The artifact ID of the nested assembly
|
||||
*/
|
||||
getNestedAssembly(artifactId: string): CloudAssembly;
|
||||
/**
|
||||
* Returns the tree metadata artifact from this assembly.
|
||||
* @throws if there is no metadata artifact by that name
|
||||
* @returns a `TreeCloudArtifact` object if there is one defined in the manifest, `undefined` otherwise.
|
||||
*/
|
||||
tree(): TreeCloudArtifact | undefined;
|
||||
/**
|
||||
* @returns all the CloudFormation stack artifacts that are included in this assembly.
|
||||
*/
|
||||
get stacks(): CloudFormationStackArtifact[];
|
||||
/**
|
||||
* The nested assembly artifacts in this assembly
|
||||
*/
|
||||
get nestedAssemblies(): NestedCloudAssemblyArtifact[];
|
||||
private validateDeps;
|
||||
private renderArtifacts;
|
||||
}
|
||||
/**
|
||||
* Construction properties for CloudAssemblyBuilder
|
||||
*/
|
||||
export interface CloudAssemblyBuilderProps {
|
||||
/**
|
||||
* Use the given asset output directory
|
||||
*
|
||||
* @default - Same as the manifest outdir
|
||||
*/
|
||||
readonly assetOutdir?: string;
|
||||
/**
|
||||
* If this builder is for a nested assembly, the parent assembly builder
|
||||
*
|
||||
* @default - This is a root assembly
|
||||
*/
|
||||
readonly parentBuilder?: CloudAssemblyBuilder;
|
||||
}
|
||||
/**
|
||||
* Can be used to build a cloud assembly.
|
||||
*/
|
||||
export declare class CloudAssemblyBuilder {
|
||||
/**
|
||||
* The root directory of the resulting cloud assembly.
|
||||
*/
|
||||
readonly outdir: string;
|
||||
/**
|
||||
* The directory where assets of this Cloud Assembly should be stored
|
||||
*/
|
||||
readonly assetOutdir: string;
|
||||
private readonly artifacts;
|
||||
private readonly missing;
|
||||
private readonly parentBuilder?;
|
||||
/**
|
||||
* Initializes a cloud assembly builder.
|
||||
* @param outdir - The output directory, uses temporary directory if undefined
|
||||
*/
|
||||
constructor(outdir?: string, props?: CloudAssemblyBuilderProps);
|
||||
/**
|
||||
* Adds an artifact into the cloud assembly.
|
||||
* @param id - The ID of the artifact.
|
||||
* @param manifest - The artifact manifest
|
||||
*/
|
||||
addArtifact(id: string, manifest: cxschema.ArtifactManifest): void;
|
||||
/**
|
||||
* Reports that some context is missing in order for this cloud assembly to be fully synthesized.
|
||||
* @param missing - Missing context information.
|
||||
*/
|
||||
addMissing(missing: cxschema.MissingContext): void;
|
||||
/**
|
||||
* Finalizes the cloud assembly into the output directory returns a
|
||||
* `CloudAssembly` object that can be used to inspect the assembly.
|
||||
*/
|
||||
buildAssembly(options?: AssemblyBuildOptions): CloudAssembly;
|
||||
/**
|
||||
* Creates a nested cloud assembly
|
||||
*/
|
||||
createNestedAssembly(artifactId: string, displayName: string): CloudAssemblyBuilder;
|
||||
/**
|
||||
* Delete the cloud assembly directory
|
||||
*/
|
||||
delete(): void;
|
||||
}
|
||||
/**
|
||||
* Backwards compatibility for when `RuntimeInfo`
|
||||
* was defined here. This is necessary because its used as an input in the stable
|
||||
* @aws-cdk/core library.
|
||||
*
|
||||
* @deprecated moved to package 'cloud-assembly-schema'
|
||||
* @see core.ConstructNode.synth
|
||||
*/
|
||||
export interface RuntimeInfo extends cxschema.RuntimeInfo {
|
||||
}
|
||||
/**
|
||||
* Backwards compatibility for when `MetadataEntry`
|
||||
* was defined here. This is necessary because its used as an input in the stable
|
||||
* @aws-cdk/core library.
|
||||
*
|
||||
* @deprecated moved to package 'cloud-assembly-schema'
|
||||
* @see core.ConstructNode.metadata
|
||||
*/
|
||||
export interface MetadataEntry extends cxschema.MetadataEntry {
|
||||
}
|
||||
/**
|
||||
* Backwards compatibility for when `MissingContext`
|
||||
* was defined here. This is necessary because its used as an input in the stable
|
||||
* @aws-cdk/core library.
|
||||
*
|
||||
* @deprecated moved to package 'cloud-assembly-schema'
|
||||
* @see core.Stack.reportMissingContext
|
||||
*/
|
||||
export interface MissingContext {
|
||||
/**
|
||||
* The missing context key.
|
||||
*/
|
||||
readonly key: string;
|
||||
/**
|
||||
* The provider from which we expect this context key to be obtained.
|
||||
*
|
||||
* (This is the old untyped definition, which is necessary for backwards compatibility.
|
||||
* See cxschema for a type definition.)
|
||||
*/
|
||||
readonly provider: string;
|
||||
/**
|
||||
* A set of provider-specific options.
|
||||
*
|
||||
* (This is the old untyped definition, which is necessary for backwards compatibility.
|
||||
* See cxschema for a type definition.)
|
||||
*/
|
||||
readonly props: Record<string, any>;
|
||||
}
|
||||
export interface AssemblyBuildOptions {
|
||||
/**
|
||||
* Include the specified runtime information (module versions) in manifest.
|
||||
* @default - if this option is not specified, runtime info will not be included
|
||||
* @deprecated All template modifications that should result from this should
|
||||
* have already been inserted into the template.
|
||||
*/
|
||||
readonly runtimeInfo?: RuntimeInfo;
|
||||
}
|
||||
375
cdk/node_modules/aws-cdk-lib/node_modules/@aws-cdk/cloud-assembly-api/lib/cloud-assembly.js
generated
vendored
Normal file
375
cdk/node_modules/aws-cdk-lib/node_modules/@aws-cdk/cloud-assembly-api/lib/cloud-assembly.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
4
cdk/node_modules/aws-cdk-lib/node_modules/@aws-cdk/cloud-assembly-api/lib/context/ami.d.ts
generated
vendored
Normal file
4
cdk/node_modules/aws-cdk-lib/node_modules/@aws-cdk/cloud-assembly-api/lib/context/ami.d.ts
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
/**
|
||||
* Returns just an AMI ID
|
||||
*/
|
||||
export type AmiContextResponse = string;
|
||||
3
cdk/node_modules/aws-cdk-lib/node_modules/@aws-cdk/cloud-assembly-api/lib/context/ami.js
generated
vendored
Normal file
3
cdk/node_modules/aws-cdk-lib/node_modules/@aws-cdk/cloud-assembly-api/lib/context/ami.js
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYW1pLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiYW1pLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIFJldHVybnMganVzdCBhbiBBTUkgSURcbiAqL1xuZXhwb3J0IHR5cGUgQW1pQ29udGV4dFJlc3BvbnNlID0gc3RyaW5nO1xuIl19
|
||||
12
cdk/node_modules/aws-cdk-lib/node_modules/@aws-cdk/cloud-assembly-api/lib/context/availability-zones.d.ts
generated
vendored
Normal file
12
cdk/node_modules/aws-cdk-lib/node_modules/@aws-cdk/cloud-assembly-api/lib/context/availability-zones.d.ts
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
/**
|
||||
* This context key is used to determine the value of `stack.availabilityZones`
|
||||
* when a stack is not associated with a specific account/region (env-agnostic).
|
||||
*
|
||||
* If this key is passed in the context, the values will be used. Otherwise, a
|
||||
* system-fallback which uses `Fn::GetAZs` will be used.
|
||||
*/
|
||||
export declare const AVAILABILITY_ZONE_FALLBACK_CONTEXT_KEY = "aws:cdk:availability-zones:fallback";
|
||||
/**
|
||||
* Response of the AZ provider looks like this
|
||||
*/
|
||||
export type AvailabilityZonesContextResponse = string[];
|
||||
12
cdk/node_modules/aws-cdk-lib/node_modules/@aws-cdk/cloud-assembly-api/lib/context/availability-zones.js
generated
vendored
Normal file
12
cdk/node_modules/aws-cdk-lib/node_modules/@aws-cdk/cloud-assembly-api/lib/context/availability-zones.js
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.AVAILABILITY_ZONE_FALLBACK_CONTEXT_KEY = void 0;
|
||||
/**
|
||||
* This context key is used to determine the value of `stack.availabilityZones`
|
||||
* when a stack is not associated with a specific account/region (env-agnostic).
|
||||
*
|
||||
* If this key is passed in the context, the values will be used. Otherwise, a
|
||||
* system-fallback which uses `Fn::GetAZs` will be used.
|
||||
*/
|
||||
exports.AVAILABILITY_ZONE_FALLBACK_CONTEXT_KEY = 'aws:cdk:availability-zones:fallback';
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXZhaWxhYmlsaXR5LXpvbmVzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiYXZhaWxhYmlsaXR5LXpvbmVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBOzs7Ozs7R0FNRztBQUNVLFFBQUEsc0NBQXNDLEdBQUcscUNBQXFDLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIFRoaXMgY29udGV4dCBrZXkgaXMgdXNlZCB0byBkZXRlcm1pbmUgdGhlIHZhbHVlIG9mIGBzdGFjay5hdmFpbGFiaWxpdHlab25lc2BcbiAqIHdoZW4gYSBzdGFjayBpcyBub3QgYXNzb2NpYXRlZCB3aXRoIGEgc3BlY2lmaWMgYWNjb3VudC9yZWdpb24gKGVudi1hZ25vc3RpYykuXG4gKlxuICogSWYgdGhpcyBrZXkgaXMgcGFzc2VkIGluIHRoZSBjb250ZXh0LCB0aGUgdmFsdWVzIHdpbGwgYmUgdXNlZC4gT3RoZXJ3aXNlLCBhXG4gKiBzeXN0ZW0tZmFsbGJhY2sgd2hpY2ggdXNlcyBgRm46OkdldEFac2Agd2lsbCBiZSB1c2VkLlxuICovXG5leHBvcnQgY29uc3QgQVZBSUxBQklMSVRZX1pPTkVfRkFMTEJBQ0tfQ09OVEVYVF9LRVkgPSAnYXdzOmNkazphdmFpbGFiaWxpdHktem9uZXM6ZmFsbGJhY2snO1xuXG4vKipcbiAqIFJlc3BvbnNlIG9mIHRoZSBBWiBwcm92aWRlciBsb29rcyBsaWtlIHRoaXNcbiAqL1xuZXhwb3J0IHR5cGUgQXZhaWxhYmlsaXR5Wm9uZXNDb250ZXh0UmVzcG9uc2UgPSBzdHJpbmdbXTtcbiJdfQ==
|
||||
22
cdk/node_modules/aws-cdk-lib/node_modules/@aws-cdk/cloud-assembly-api/lib/context/endpoint-service-availability-zones.d.ts
generated
vendored
Normal file
22
cdk/node_modules/aws-cdk-lib/node_modules/@aws-cdk/cloud-assembly-api/lib/context/endpoint-service-availability-zones.d.ts
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
export declare const ENDPOINT_SERVICE_AVAILABILITY_ZONE_PROVIDER = "endpoint-service-availability-zones";
|
||||
/**
|
||||
* Query to hosted zone context provider
|
||||
*/
|
||||
export interface EndpointServiceAvailabilityZonesContextQuery {
|
||||
/**
|
||||
* Query account
|
||||
*/
|
||||
readonly account?: string;
|
||||
/**
|
||||
* Query region
|
||||
*/
|
||||
readonly region?: string;
|
||||
/**
|
||||
* Query service name
|
||||
*/
|
||||
readonly serviceName?: string;
|
||||
}
|
||||
/**
|
||||
* Response of the AZ provider looks like this
|
||||
*/
|
||||
export type EndpointServiceAvailabilityZonesContextResponse = string[];
|
||||
5
cdk/node_modules/aws-cdk-lib/node_modules/@aws-cdk/cloud-assembly-api/lib/context/endpoint-service-availability-zones.js
generated
vendored
Normal file
5
cdk/node_modules/aws-cdk-lib/node_modules/@aws-cdk/cloud-assembly-api/lib/context/endpoint-service-availability-zones.js
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.ENDPOINT_SERVICE_AVAILABILITY_ZONE_PROVIDER = void 0;
|
||||
exports.ENDPOINT_SERVICE_AVAILABILITY_ZONE_PROVIDER = 'endpoint-service-availability-zones';
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZW5kcG9pbnQtc2VydmljZS1hdmFpbGFiaWxpdHktem9uZXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJlbmRwb2ludC1zZXJ2aWNlLWF2YWlsYWJpbGl0eS16b25lcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBYSxRQUFBLDJDQUEyQyxHQUFHLHFDQUFxQyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IGNvbnN0IEVORFBPSU5UX1NFUlZJQ0VfQVZBSUxBQklMSVRZX1pPTkVfUFJPVklERVIgPSAnZW5kcG9pbnQtc2VydmljZS1hdmFpbGFiaWxpdHktem9uZXMnO1xuXG4vKipcbiAqIFF1ZXJ5IHRvIGhvc3RlZCB6b25lIGNvbnRleHQgcHJvdmlkZXJcbiAqL1xuZXhwb3J0IGludGVyZmFjZSBFbmRwb2ludFNlcnZpY2VBdmFpbGFiaWxpdHlab25lc0NvbnRleHRRdWVyeSB7XG4gIC8qKlxuICAgKiBRdWVyeSBhY2NvdW50XG4gICAqL1xuICByZWFkb25seSBhY2NvdW50Pzogc3RyaW5nO1xuXG4gIC8qKlxuICAgKiBRdWVyeSByZWdpb25cbiAgICovXG4gIHJlYWRvbmx5IHJlZ2lvbj86IHN0cmluZztcblxuICAvKipcbiAgICogUXVlcnkgc2VydmljZSBuYW1lXG4gICAqL1xuICByZWFkb25seSBzZXJ2aWNlTmFtZT86IHN0cmluZztcbn1cblxuLyoqXG4gKiBSZXNwb25zZSBvZiB0aGUgQVogcHJvdmlkZXIgbG9va3MgbGlrZSB0aGlzXG4gKi9cbmV4cG9ydCB0eXBlIEVuZHBvaW50U2VydmljZUF2YWlsYWJpbGl0eVpvbmVzQ29udGV4dFJlc3BvbnNlID0gc3RyaW5nW107XG4iXX0=
|
||||
4
cdk/node_modules/aws-cdk-lib/node_modules/@aws-cdk/cloud-assembly-api/lib/context/generic.d.ts
generated
vendored
Normal file
4
cdk/node_modules/aws-cdk-lib/node_modules/@aws-cdk/cloud-assembly-api/lib/context/generic.d.ts
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
/**
|
||||
* If a context value is an object with this key, it indicates an error
|
||||
*/
|
||||
export declare const PROVIDER_ERROR_KEY = "$providerError";
|
||||
8
cdk/node_modules/aws-cdk-lib/node_modules/@aws-cdk/cloud-assembly-api/lib/context/generic.js
generated
vendored
Normal file
8
cdk/node_modules/aws-cdk-lib/node_modules/@aws-cdk/cloud-assembly-api/lib/context/generic.js
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.PROVIDER_ERROR_KEY = void 0;
|
||||
/**
|
||||
* If a context value is an object with this key, it indicates an error
|
||||
*/
|
||||
exports.PROVIDER_ERROR_KEY = '$providerError';
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2VuZXJpYy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImdlbmVyaWMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUE7O0dBRUc7QUFDVSxRQUFBLGtCQUFrQixHQUFHLGdCQUFnQixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBJZiBhIGNvbnRleHQgdmFsdWUgaXMgYW4gb2JqZWN0IHdpdGggdGhpcyBrZXksIGl0IGluZGljYXRlcyBhbiBlcnJvclxuICovXG5leHBvcnQgY29uc3QgUFJPVklERVJfRVJST1JfS0VZID0gJyRwcm92aWRlckVycm9yJztcbiJdfQ==
|
||||
9
cdk/node_modules/aws-cdk-lib/node_modules/@aws-cdk/cloud-assembly-api/lib/context/key.d.ts
generated
vendored
Normal file
9
cdk/node_modules/aws-cdk-lib/node_modules/@aws-cdk/cloud-assembly-api/lib/context/key.d.ts
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
/**
|
||||
* Properties of a discovered key
|
||||
*/
|
||||
export interface KeyContextResponse {
|
||||
/**
|
||||
* Id of the key
|
||||
*/
|
||||
readonly keyId: string;
|
||||
}
|
||||
3
cdk/node_modules/aws-cdk-lib/node_modules/@aws-cdk/cloud-assembly-api/lib/context/key.js
generated
vendored
Normal file
3
cdk/node_modules/aws-cdk-lib/node_modules/@aws-cdk/cloud-assembly-api/lib/context/key.js
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoia2V5LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsia2V5LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIFByb3BlcnRpZXMgb2YgYSBkaXNjb3ZlcmVkIGtleVxuICovXG5leHBvcnQgaW50ZXJmYWNlIEtleUNvbnRleHRSZXNwb25zZSB7XG5cbiAgLyoqXG4gICAqIElkIG9mIHRoZSBrZXlcbiAgICovXG4gIHJlYWRvbmx5IGtleUlkOiBzdHJpbmc7XG5cbn1cbiJdfQ==
|
||||
63
cdk/node_modules/aws-cdk-lib/node_modules/@aws-cdk/cloud-assembly-api/lib/context/load-balancer.d.ts
generated
vendored
Normal file
63
cdk/node_modules/aws-cdk-lib/node_modules/@aws-cdk/cloud-assembly-api/lib/context/load-balancer.d.ts
generated
vendored
Normal file
@@ -0,0 +1,63 @@
|
||||
/**
|
||||
* Load balancer ip address type.
|
||||
*/
|
||||
export declare enum LoadBalancerIpAddressType {
|
||||
/**
|
||||
* IPV4 ip address
|
||||
*/
|
||||
IPV4 = "ipv4",
|
||||
/**
|
||||
* Dual stack address
|
||||
*/
|
||||
DUAL_STACK = "dualstack",
|
||||
/**
|
||||
* IPv6 only public addresses, with private IPv4 and IPv6 addresses
|
||||
*/
|
||||
DUAL_STACK_WITHOUT_PUBLIC_IPV4 = "dualstack-without-public-ipv4"
|
||||
}
|
||||
/**
|
||||
* Properties of a discovered load balancer
|
||||
*/
|
||||
export interface LoadBalancerContextResponse {
|
||||
/**
|
||||
* The ARN of the load balancer.
|
||||
*/
|
||||
readonly loadBalancerArn: string;
|
||||
/**
|
||||
* The hosted zone ID of the load balancer's name.
|
||||
*/
|
||||
readonly loadBalancerCanonicalHostedZoneId: string;
|
||||
/**
|
||||
* Load balancer's DNS name
|
||||
*/
|
||||
readonly loadBalancerDnsName: string;
|
||||
/**
|
||||
* Type of IP address
|
||||
*/
|
||||
readonly ipAddressType: LoadBalancerIpAddressType;
|
||||
/**
|
||||
* Load balancer's security groups
|
||||
*/
|
||||
readonly securityGroupIds: string[];
|
||||
/**
|
||||
* Load balancer's VPC
|
||||
*/
|
||||
readonly vpcId: string;
|
||||
}
|
||||
/**
|
||||
* Properties of a discovered load balancer listener.
|
||||
*/
|
||||
export interface LoadBalancerListenerContextResponse {
|
||||
/**
|
||||
* The ARN of the listener.
|
||||
*/
|
||||
readonly listenerArn: string;
|
||||
/**
|
||||
* The port the listener is listening on.
|
||||
*/
|
||||
readonly listenerPort: number;
|
||||
/**
|
||||
* The security groups of the load balancer.
|
||||
*/
|
||||
readonly securityGroupIds: string[];
|
||||
}
|
||||
22
cdk/node_modules/aws-cdk-lib/node_modules/@aws-cdk/cloud-assembly-api/lib/context/load-balancer.js
generated
vendored
Normal file
22
cdk/node_modules/aws-cdk-lib/node_modules/@aws-cdk/cloud-assembly-api/lib/context/load-balancer.js
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.LoadBalancerIpAddressType = void 0;
|
||||
/**
|
||||
* Load balancer ip address type.
|
||||
*/
|
||||
var LoadBalancerIpAddressType;
|
||||
(function (LoadBalancerIpAddressType) {
|
||||
/**
|
||||
* IPV4 ip address
|
||||
*/
|
||||
LoadBalancerIpAddressType["IPV4"] = "ipv4";
|
||||
/**
|
||||
* Dual stack address
|
||||
*/
|
||||
LoadBalancerIpAddressType["DUAL_STACK"] = "dualstack";
|
||||
/**
|
||||
* IPv6 only public addresses, with private IPv4 and IPv6 addresses
|
||||
*/
|
||||
LoadBalancerIpAddressType["DUAL_STACK_WITHOUT_PUBLIC_IPV4"] = "dualstack-without-public-ipv4";
|
||||
})(LoadBalancerIpAddressType || (exports.LoadBalancerIpAddressType = LoadBalancerIpAddressType = {}));
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibG9hZC1iYWxhbmNlci5qcyIsInNv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2VjdXJpdHkgZ3JvdXBzIG9mIHRoZSBsb2FkIGJhbGFuY2VyLlxuICAgKi9cbiAgcmVhZG9ubHkgc2VjdXJpdHlHcm91cElkczogc3RyaW5nW107XG59XG4iXX0=
|
||||
15
cdk/node_modules/aws-cdk-lib/node_modules/@aws-cdk/cloud-assembly-api/lib/context/security-group.d.ts
generated
vendored
Normal file
15
cdk/node_modules/aws-cdk-lib/node_modules/@aws-cdk/cloud-assembly-api/lib/context/security-group.d.ts
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
/**
|
||||
* Properties of a discovered SecurityGroup.
|
||||
*/
|
||||
export interface SecurityGroupContextResponse {
|
||||
/**
|
||||
* The security group's id.
|
||||
*/
|
||||
readonly securityGroupId: string;
|
||||
/**
|
||||
* Whether the security group allows all outbound traffic. This will be true
|
||||
* when the security group has all-protocol egress permissions to access both
|
||||
* `0.0.0.0/0` and `::/0`.
|
||||
*/
|
||||
readonly allowAllOutbound: boolean;
|
||||
}
|
||||
3
cdk/node_modules/aws-cdk-lib/node_modules/@aws-cdk/cloud-assembly-api/lib/context/security-group.js
generated
vendored
Normal file
3
cdk/node_modules/aws-cdk-lib/node_modules/@aws-cdk/cloud-assembly-api/lib/context/security-group.js
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VjdXJpdHktZ3JvdXAuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJzZWN1cml0eS1ncm91cC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIiwic291cmNlc0NvbnRlbnQiOlsiXG4vKipcbiAqIFByb3BlcnRpZXMgb2YgYSBkaXNjb3ZlcmVkIFNlY3VyaXR5R3JvdXAuXG4gKi9cbmV4cG9ydCBpbnRlcmZhY2UgU2VjdXJpdHlHcm91cENvbnRleHRSZXNwb25zZSB7XG4gIC8qKlxuICAgKiBUaGUgc2VjdXJpdHkgZ3JvdXAncyBpZC5cbiAgICovXG4gIHJlYWRvbmx5IHNlY3VyaXR5R3JvdXBJZDogc3RyaW5nO1xuXG4gIC8qKlxuICAgKiBXaGV0aGVyIHRoZSBzZWN1cml0eSBncm91cCBhbGxvd3MgYWxsIG91dGJvdW5kIHRyYWZmaWMuIFRoaXMgd2lsbCBiZSB0cnVlXG4gICAqIHdoZW4gdGhlIHNlY3VyaXR5IGdyb3VwIGhhcyBhbGwtcHJvdG9jb2wgZWdyZXNzIHBlcm1pc3Npb25zIHRvIGFjY2VzcyBib3RoXG4gICAqIGAwLjAuMC4wLzBgIGFuZCBgOjovMGAuXG4gICAqL1xuICByZWFkb25seSBhbGxvd0FsbE91dGJvdW5kOiBib29sZWFuO1xufVxuIl19
|
||||
152
cdk/node_modules/aws-cdk-lib/node_modules/@aws-cdk/cloud-assembly-api/lib/context/vpc.d.ts
generated
vendored
Normal file
152
cdk/node_modules/aws-cdk-lib/node_modules/@aws-cdk/cloud-assembly-api/lib/context/vpc.d.ts
generated
vendored
Normal file
@@ -0,0 +1,152 @@
|
||||
/**
|
||||
* The type of subnet group.
|
||||
* Same as SubnetType in the aws-cdk-lib/aws-ec2 package,
|
||||
* but we can't use that because of cyclical dependencies.
|
||||
*/
|
||||
export declare enum VpcSubnetGroupType {
|
||||
/** Public subnet group type. */
|
||||
PUBLIC = "Public",
|
||||
/** Private subnet group type. */
|
||||
PRIVATE = "Private",
|
||||
/** Isolated subnet group type. */
|
||||
ISOLATED = "Isolated"
|
||||
}
|
||||
/**
|
||||
* A subnet representation that the VPC provider uses.
|
||||
*/
|
||||
export interface VpcSubnet {
|
||||
/** The identifier of the subnet. */
|
||||
readonly subnetId: string;
|
||||
/**
|
||||
* The code of the availability zone this subnet is in
|
||||
* (for example, 'us-west-2a').
|
||||
*/
|
||||
readonly availabilityZone: string;
|
||||
/** The identifier of the route table for this subnet. */
|
||||
readonly routeTableId: string;
|
||||
/**
|
||||
* CIDR range of the subnet
|
||||
*
|
||||
* @default - CIDR information not available
|
||||
*/
|
||||
readonly cidr?: string;
|
||||
}
|
||||
/**
|
||||
* A group of subnets returned by the VPC provider.
|
||||
* The included subnets do NOT have to be symmetric!
|
||||
*/
|
||||
export interface VpcSubnetGroup {
|
||||
/**
|
||||
* The name of the subnet group,
|
||||
* determined by looking at the tags of of the subnets
|
||||
* that belong to it.
|
||||
*/
|
||||
readonly name: string;
|
||||
/** The type of the subnet group. */
|
||||
readonly type: VpcSubnetGroupType;
|
||||
/**
|
||||
* The subnets that are part of this group.
|
||||
* There is no condition that the subnets have to be symmetric
|
||||
* in the group.
|
||||
*/
|
||||
readonly subnets: VpcSubnet[];
|
||||
}
|
||||
/**
|
||||
* Properties of a discovered VPC
|
||||
*/
|
||||
export interface VpcContextResponse {
|
||||
/**
|
||||
* VPC id
|
||||
*/
|
||||
readonly vpcId: string;
|
||||
/**
|
||||
* VPC cidr
|
||||
*
|
||||
* @default - CIDR information not available
|
||||
*/
|
||||
readonly vpcCidrBlock?: string;
|
||||
/**
|
||||
* AZs
|
||||
*/
|
||||
readonly availabilityZones: string[];
|
||||
/**
|
||||
* IDs of all public subnets
|
||||
*
|
||||
* Element count: #(availabilityZones) · #(publicGroups)
|
||||
*/
|
||||
readonly publicSubnetIds?: string[];
|
||||
/**
|
||||
* Name of public subnet groups
|
||||
*
|
||||
* Element count: #(publicGroups)
|
||||
*/
|
||||
readonly publicSubnetNames?: string[];
|
||||
/**
|
||||
* Route Table IDs of public subnet groups.
|
||||
*
|
||||
* Element count: #(availabilityZones) · #(publicGroups)
|
||||
*/
|
||||
readonly publicSubnetRouteTableIds?: string[];
|
||||
/**
|
||||
* IDs of all private subnets
|
||||
*
|
||||
* Element count: #(availabilityZones) · #(privateGroups)
|
||||
*/
|
||||
readonly privateSubnetIds?: string[];
|
||||
/**
|
||||
* Name of private subnet groups
|
||||
*
|
||||
* Element count: #(privateGroups)
|
||||
*/
|
||||
readonly privateSubnetNames?: string[];
|
||||
/**
|
||||
* Route Table IDs of private subnet groups.
|
||||
*
|
||||
* Element count: #(availabilityZones) · #(privateGroups)
|
||||
*/
|
||||
readonly privateSubnetRouteTableIds?: string[];
|
||||
/**
|
||||
* IDs of all isolated subnets
|
||||
*
|
||||
* Element count: #(availabilityZones) · #(isolatedGroups)
|
||||
*/
|
||||
readonly isolatedSubnetIds?: string[];
|
||||
/**
|
||||
* Name of isolated subnet groups
|
||||
*
|
||||
* Element count: #(isolatedGroups)
|
||||
*/
|
||||
readonly isolatedSubnetNames?: string[];
|
||||
/**
|
||||
* Route Table IDs of isolated subnet groups.
|
||||
*
|
||||
* Element count: #(availabilityZones) · #(isolatedGroups)
|
||||
*/
|
||||
readonly isolatedSubnetRouteTableIds?: string[];
|
||||
/**
|
||||
* The VPN gateway ID
|
||||
*/
|
||||
readonly vpnGatewayId?: string;
|
||||
/**
|
||||
* The subnet groups discovered for the given VPC.
|
||||
* Unlike the above properties, this will include asymmetric subnets,
|
||||
* if the VPC has any.
|
||||
* This property will only be populated if `VpcContextQuery.returnAsymmetricSubnets`
|
||||
* is true.
|
||||
*
|
||||
* @default - no subnet groups will be returned unless `VpcContextQuery.returnAsymmetricSubnets` is true
|
||||
*/
|
||||
readonly subnetGroups?: VpcSubnetGroup[];
|
||||
/**
|
||||
* The region in which the VPC is in.
|
||||
*
|
||||
* @default - Region of the parent stack
|
||||
*/
|
||||
readonly region?: string;
|
||||
/**
|
||||
* The ID of the AWS account that owns the VPC.
|
||||
*
|
||||
* @default the account id of the parent stack
|
||||
*/
|
||||
readonly ownerAccountId?: string;
|
||||
}
|
||||
18
cdk/node_modules/aws-cdk-lib/node_modules/@aws-cdk/cloud-assembly-api/lib/context/vpc.js
generated
vendored
Normal file
18
cdk/node_modules/aws-cdk-lib/node_modules/@aws-cdk/cloud-assembly-api/lib/context/vpc.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
24
cdk/node_modules/aws-cdk-lib/node_modules/@aws-cdk/cloud-assembly-api/lib/environment.d.ts
generated
vendored
Normal file
24
cdk/node_modules/aws-cdk-lib/node_modules/@aws-cdk/cloud-assembly-api/lib/environment.d.ts
generated
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
/**
|
||||
* Models an AWS execution environment, for use within the CDK toolkit.
|
||||
*/
|
||||
export interface Environment {
|
||||
/** The arbitrary name of this environment (user-set, or at least user-meaningful) */
|
||||
readonly name: string;
|
||||
/** The AWS account this environment deploys into */
|
||||
readonly account: string;
|
||||
/** The AWS region name where this environment deploys into */
|
||||
readonly region: string;
|
||||
}
|
||||
export declare const UNKNOWN_ACCOUNT = "unknown-account";
|
||||
export declare const UNKNOWN_REGION = "unknown-region";
|
||||
export declare class EnvironmentUtils {
|
||||
static parse(environment: string): Environment;
|
||||
/**
|
||||
* Build an environment object from an account and region
|
||||
*/
|
||||
static make(account: string, region: string): Environment;
|
||||
/**
|
||||
* Format an environment string from an account and region
|
||||
*/
|
||||
static format(account: string, region: string): string;
|
||||
}
|
||||
40
cdk/node_modules/aws-cdk-lib/node_modules/@aws-cdk/cloud-assembly-api/lib/environment.js
generated
vendored
Normal file
40
cdk/node_modules/aws-cdk-lib/node_modules/@aws-cdk/cloud-assembly-api/lib/environment.js
generated
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.EnvironmentUtils = exports.UNKNOWN_REGION = exports.UNKNOWN_ACCOUNT = void 0;
|
||||
const error_1 = require("./private/error");
|
||||
/**
|
||||
* Parser for the artifact environment field.
|
||||
*
|
||||
* Account validation is relaxed to allow account aliasing in the future.
|
||||
*/
|
||||
const AWS_ENV_REGEX = /aws\:\/\/([a-z0-9A-Z\-\@\.\_]+)\/([a-z\-0-9]+)/;
|
||||
exports.UNKNOWN_ACCOUNT = 'unknown-account';
|
||||
exports.UNKNOWN_REGION = 'unknown-region';
|
||||
class EnvironmentUtils {
|
||||
static parse(environment) {
|
||||
const env = AWS_ENV_REGEX.exec(environment);
|
||||
if (!env) {
|
||||
throw new error_1.CloudAssemblyError(`Unable to parse environment specification "${environment}". ` +
|
||||
'Expected format: aws://account/region');
|
||||
}
|
||||
const [, account, region] = env;
|
||||
if (!account || !region) {
|
||||
throw new error_1.CloudAssemblyError(`Invalid environment specification: ${environment}`);
|
||||
}
|
||||
return { account, region, name: environment };
|
||||
}
|
||||
/**
|
||||
* Build an environment object from an account and region
|
||||
*/
|
||||
static make(account, region) {
|
||||
return { account, region, name: this.format(account, region) };
|
||||
}
|
||||
/**
|
||||
* Format an environment string from an account and region
|
||||
*/
|
||||
static format(account, region) {
|
||||
return `aws://${account}/${region}`;
|
||||
}
|
||||
}
|
||||
exports.EnvironmentUtils = EnvironmentUtils;
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZW52aXJvbm1lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJlbnZpcm9ubWVudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSwyQ0FBcUQ7QUFFckQ7Ozs7R0FJRztBQUNILE1BQU0sYUFBYSxHQUFHLGdEQUFnRCxDQUFDO0FBZ0IxRCxRQUFBLGVBQWUsR0FBRyxpQkFBaUIsQ0FBQztBQUNwQyxRQUFBLGNBQWMsR0FBRyxnQkFBZ0IsQ0FBQztBQUUvQyxNQUFhLGdCQUFnQjtJQUNwQixNQUFNLENBQUMsS0FBSyxDQUFDLFdBQW1CO1FBQ3JDLE1BQU0sR0FBRyxHQUFHLGFBQWEsQ0FBQyxJQUFJLENBQUMsV0FBVyxDQUFDLENBQUM7UUFDNUMsSUFBSSxDQUFDLEdBQUcsRUFBRSxDQUFDO1lBQ1QsTUFBTSxJQUFJLDBCQUFrQixDQUMxQiw4Q0FBOEMsV0FBVyxLQUFLO2dCQUM5RCx1Q0FBdUMsQ0FBQyxDQUFDO1FBQzdDLENBQUM7UUFFRCxNQUFNLENBQUMsR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Zvcm1hdDogYXdzOi8vYWNjb3VudC9yZWdpb24nKTtcbiAgICB9XG5cbiAgICBjb25zdCBbLCBhY2NvdW50LCByZWdpb25dID0gZW52O1xuICAgIGlmICghYWNjb3VudCB8fCAhcmVnaW9uKSB7XG4gICAgICB0aHJvdyBuZXcgQ2xvdWRBc3NlbWJseUVycm9yKGBJbnZhbGlkIGVudmlyb25tZW50IHNwZWNpZmljYXRpb246ICR7ZW52aXJvbm1lbnR9YCk7XG4gICAgfVxuXG4gICAgcmV0dXJuIHsgYWNjb3VudCwgcmVnaW9uLCBuYW1lOiBlbnZpcm9ubWVudCB9O1xuICB9XG5cbiAgLyoqXG4gICAqIEJ1aWxkIGFuIGVudmlyb25tZW50IG9iamVjdCBmcm9tIGFuIGFjY291bnQgYW5kIHJlZ2lvblxuICAgKi9cbiAgcHVibGljIHN0YXRpYyBtYWtlKGFjY291bnQ6IHN0cmluZywgcmVnaW9uOiBzdHJpbmcpOiBFbnZpcm9ubWVudCB7XG4gICAgcmV0dXJuIHsgYWNjb3VudCwgcmVnaW9uLCBuYW1lOiB0aGlzLmZvcm1hdChhY2NvdW50LCByZWdpb24pIH07XG4gIH1cblxuICAvKipcbiAgICogRm9ybWF0IGFuIGVudmlyb25tZW50IHN0cmluZyBmcm9tIGFuIGFjY291bnQgYW5kIHJlZ2lvblxuICAgKi9cbiAgcHVibGljIHN0YXRpYyBmb3JtYXQoYWNjb3VudDogc3RyaW5nLCByZWdpb246IHN0cmluZyk6IHN0cmluZyB7XG4gICAgcmV0dXJuIGBhd3M6Ly8ke2FjY291bnR9LyR7cmVnaW9ufWA7XG4gIH1cbn1cbiJdfQ==
|
||||
21
cdk/node_modules/aws-cdk-lib/node_modules/@aws-cdk/cloud-assembly-api/lib/index.d.ts
generated
vendored
Normal file
21
cdk/node_modules/aws-cdk-lib/node_modules/@aws-cdk/cloud-assembly-api/lib/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
export * from './context/vpc';
|
||||
export * from './context/ami';
|
||||
export * from './context/load-balancer';
|
||||
export * from './context/availability-zones';
|
||||
export * from './context/endpoint-service-availability-zones';
|
||||
export * from './context/security-group';
|
||||
export * from './context/key';
|
||||
export * from './context/generic';
|
||||
export * from './cloud-artifact';
|
||||
import './cloud-artifact-aug';
|
||||
export * from './artifacts/asset-manifest-artifact';
|
||||
export * from './artifacts/cloudformation-artifact';
|
||||
export * from './artifacts/tree-cloud-artifact';
|
||||
export * from './artifacts/nested-cloud-assembly-artifact';
|
||||
import './artifacts/nested-cloud-assembly-artifact-aug';
|
||||
export * from './cloud-assembly';
|
||||
export * from './assets';
|
||||
export * from './metadata';
|
||||
export * from './placeholders';
|
||||
export * from './environment';
|
||||
export * from './bootstrap';
|
||||
38
cdk/node_modules/aws-cdk-lib/node_modules/@aws-cdk/cloud-assembly-api/lib/index.js
generated
vendored
Normal file
38
cdk/node_modules/aws-cdk-lib/node_modules/@aws-cdk/cloud-assembly-api/lib/index.js
generated
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
"use strict";
|
||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
var desc = Object.getOwnPropertyDescriptor(m, k);
|
||||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
||||
desc = { enumerable: true, get: function() { return m[k]; } };
|
||||
}
|
||||
Object.defineProperty(o, k2, desc);
|
||||
}) : (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
o[k2] = m[k];
|
||||
}));
|
||||
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
||||
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
__exportStar(require("./context/vpc"), exports);
|
||||
__exportStar(require("./context/ami"), exports);
|
||||
__exportStar(require("./context/load-balancer"), exports);
|
||||
__exportStar(require("./context/availability-zones"), exports);
|
||||
__exportStar(require("./context/endpoint-service-availability-zones"), exports);
|
||||
__exportStar(require("./context/security-group"), exports);
|
||||
__exportStar(require("./context/key"), exports);
|
||||
__exportStar(require("./context/generic"), exports);
|
||||
__exportStar(require("./cloud-artifact"), exports);
|
||||
require("./cloud-artifact-aug");
|
||||
__exportStar(require("./artifacts/asset-manifest-artifact"), exports);
|
||||
__exportStar(require("./artifacts/cloudformation-artifact"), exports);
|
||||
__exportStar(require("./artifacts/tree-cloud-artifact"), exports);
|
||||
__exportStar(require("./artifacts/nested-cloud-assembly-artifact"), exports);
|
||||
require("./artifacts/nested-cloud-assembly-artifact-aug");
|
||||
__exportStar(require("./cloud-assembly"), exports);
|
||||
__exportStar(require("./assets"), exports);
|
||||
__exportStar(require("./metadata"), exports);
|
||||
__exportStar(require("./placeholders"), exports);
|
||||
__exportStar(require("./environment"), exports);
|
||||
__exportStar(require("./bootstrap"), exports);
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7O0FBQUEsZ0RBQThCO0FBQzlCLGdEQUE4QjtBQUM5QiwwREFBd0M7QUFDeEMsK0RBQTZDO0FBQzdDLGdGQUE4RDtBQUM5RCwyREFBeUM7QUFDekMsZ0RBQThCO0FBQzlCLG9EQUFrQztBQUNsQyxtREFBaUM7QUFDakMsZ0NBQThCO0FBQzlCLHNFQUFvRDtBQUNwRCxzRUFBb0Q7QUFDcEQsa0VBQWdEO0FBQ2hELDZFQUEyRDtBQUMzRCwwREFBd0Q7QUFDeEQsbURBQWlDO0FBQ2pDLDJDQUF5QjtBQUN6Qiw2Q0FBMkI7QUFDM0IsaURBQStCO0FBQy9CLGdEQUE4QjtBQUM5Qiw4Q0FBNEIiLCJzb3VyY2VzQ29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O1xuZXhwb3J0ICogZnJvbSAnLi9lbnZpcm9ubWVudCc7XG5leHBvcnQgKiBmcm9tICcuL2Jvb3RzdHJhcCc7XG4iXX0=
|
||||
27
cdk/node_modules/aws-cdk-lib/node_modules/@aws-cdk/cloud-assembly-api/lib/metadata.d.ts
generated
vendored
Normal file
27
cdk/node_modules/aws-cdk-lib/node_modules/@aws-cdk/cloud-assembly-api/lib/metadata.d.ts
generated
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
import type * as cxschema from '@aws-cdk/cloud-assembly-schema';
|
||||
/**
|
||||
* The key used when CDK path is embedded in **CloudFormation template** metadata (not cdk metadata).
|
||||
*/
|
||||
export declare const PATH_METADATA_KEY = "aws:cdk:path";
|
||||
export declare enum SynthesisMessageLevel {
|
||||
INFO = "info",
|
||||
WARNING = "warning",
|
||||
ERROR = "error"
|
||||
}
|
||||
export interface MetadataEntryResult extends cxschema.MetadataEntry {
|
||||
/**
|
||||
* The path in which this entry was defined.
|
||||
*/
|
||||
readonly path: string;
|
||||
}
|
||||
/**
|
||||
* Metadata associated with the objects in the stack's Construct tree
|
||||
*/
|
||||
export type StackMetadata = {
|
||||
[path: string]: cxschema.MetadataEntry[];
|
||||
};
|
||||
export interface SynthesisMessage {
|
||||
readonly level: SynthesisMessageLevel;
|
||||
readonly id: string;
|
||||
readonly entry: cxschema.MetadataEntry;
|
||||
}
|
||||
14
cdk/node_modules/aws-cdk-lib/node_modules/@aws-cdk/cloud-assembly-api/lib/metadata.js
generated
vendored
Normal file
14
cdk/node_modules/aws-cdk-lib/node_modules/@aws-cdk/cloud-assembly-api/lib/metadata.js
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.SynthesisMessageLevel = exports.PATH_METADATA_KEY = void 0;
|
||||
/**
|
||||
* The key used when CDK path is embedded in **CloudFormation template** metadata (not cdk metadata).
|
||||
*/
|
||||
exports.PATH_METADATA_KEY = 'aws:cdk:path';
|
||||
var SynthesisMessageLevel;
|
||||
(function (SynthesisMessageLevel) {
|
||||
SynthesisMessageLevel["INFO"] = "info";
|
||||
SynthesisMessageLevel["WARNING"] = "warning";
|
||||
SynthesisMessageLevel["ERROR"] = "error";
|
||||
})(SynthesisMessageLevel || (exports.SynthesisMessageLevel = SynthesisMessageLevel = {}));
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWV0YWRhdGEuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJtZXRhZGF0YS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFFQTs7R0FFRztBQUNVLFFBQUEsaUJBQWlCLEdBQUcsY0FBYyxDQUFDO0FBRWhELElBQVkscUJBSVg7QUFKRCxXQUFZLHFCQUFxQjtJQUMvQixzQ0FBYSxDQUFBO0lBQ2IsNENBQW1CLENBQUE7SUFDbkIsd0NBQWUsQ0FBQTtBQUNqQixDQUFDLEVBSlcscUJBQXFCLHFDQUFyQixxQkFBcUIsUUFJaEMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgdHlwZSAqIGFzIGN4c2NoZW1hIGZyb20gJ0Bhd3MtY2RrL2Nsb3VkLWFzc2VtYmx5LXNjaGVtYSc7XG5cbi8qKlxuICogVGhlIGtleSB1c2VkIHdoZW4gQ0RLIHBhdGggaXMgZW1iZWRkZWQgaW4gKipDbG91ZEZvcm1hdGlvbiB0ZW1wbGF0ZSoqIG1ldGFkYXRhIChub3QgY2RrIG1ldGFkYXRhKS5cbiAqL1xuZXhwb3J0IGNvbnN0IFBBVEhfTUVUQURBVEFfS0VZID0gJ2F3czpjZGs6cGF0aCc7XG5cbmV4cG9ydCBlbnVtIFN5bnRoZXNpc01lc3NhZ2VMZXZlbCB7XG4gIElORk8gPSAnaW5mbycsXG4gIFdBUk5JTkcgPSAnd2FybmluZycsXG4gIEVSUk9SID0gJ2Vycm9yJyxcbn1cblxuZXhwb3J0IGludGVyZmFjZSBNZXRhZGF0YUVudHJ5UmVzdWx0IGV4dGVuZHMgY3hzY2hlbWEuTWV0YWRhdGFFbnRyeSB7XG4gIC8qKlxuICAgKiBUaGUgcGF0aCBpbiB3aGljaCB0aGlzIGVudHJ5IHdhcyBkZWZpbmVkLlxuICAgKi9cbiAgcmVhZG9ubHkgcGF0aDogc3RyaW5nO1xufVxuXG4vKipcbiAqIE1ldGFkYXRhIGFzc29jaWF0ZWQgd2l0aCB0aGUgb2JqZWN0cyBpbiB0aGUgc3RhY2sncyBDb25zdHJ1Y3QgdHJlZVxuICovXG5leHBvcnQgdHlwZSBTdGFja01ldGFkYXRhID0geyBbcGF0aDogc3RyaW5nXTogY3hzY2hlbWEuTWV0YWRhdGFFbnRyeVtdIH07XG5cbmV4cG9ydCBpbnRlcmZhY2UgU3ludGhlc2lzTWVzc2FnZSB7XG4gIHJlYWRvbmx5IGxldmVsOiBTeW50aGVzaXNNZXNzYWdlTGV2ZWw7XG4gIHJlYWRvbmx5IGlkOiBzdHJpbmc7XG4gIHJlYWRvbmx5IGVudHJ5OiBjeHNjaGVtYS5NZXRhZGF0YUVudHJ5O1xufVxuIl19
|
||||
66
cdk/node_modules/aws-cdk-lib/node_modules/@aws-cdk/cloud-assembly-api/lib/placeholders.d.ts
generated
vendored
Normal file
66
cdk/node_modules/aws-cdk-lib/node_modules/@aws-cdk/cloud-assembly-api/lib/placeholders.d.ts
generated
vendored
Normal file
@@ -0,0 +1,66 @@
|
||||
/**
|
||||
* Placeholders which can be used manifests
|
||||
*
|
||||
* These can occur both in the Asset Manifest as well as the general
|
||||
* Cloud Assembly manifest.
|
||||
*/
|
||||
export declare class EnvironmentPlaceholders {
|
||||
/**
|
||||
* Insert this into the destination fields to be replaced with the current region
|
||||
*/
|
||||
static readonly CURRENT_REGION = "${AWS::Region}";
|
||||
/**
|
||||
* Insert this into the destination fields to be replaced with the current account
|
||||
*/
|
||||
static readonly CURRENT_ACCOUNT = "${AWS::AccountId}";
|
||||
/**
|
||||
* Insert this into the destination fields to be replaced with the current partition
|
||||
*/
|
||||
static readonly CURRENT_PARTITION = "${AWS::Partition}";
|
||||
/**
|
||||
* Replace the environment placeholders in all strings found in a complex object.
|
||||
*
|
||||
* Duplicated between cdk-assets and aws-cdk CLI because we don't have a good single place to put it
|
||||
* (they're nominally independent tools).
|
||||
*/
|
||||
static replace(object: any, values: EnvironmentPlaceholderValues): any;
|
||||
/**
|
||||
* Like 'replace', but asynchronous
|
||||
*/
|
||||
static replaceAsync(object: any, provider: IEnvironmentPlaceholderProvider): Promise<any>;
|
||||
private static recurse;
|
||||
}
|
||||
/**
|
||||
* Return the appropriate values for the environment placeholders
|
||||
*/
|
||||
export interface EnvironmentPlaceholderValues {
|
||||
/**
|
||||
* Return the region
|
||||
*/
|
||||
readonly region: string;
|
||||
/**
|
||||
* Return the account
|
||||
*/
|
||||
readonly accountId: string;
|
||||
/**
|
||||
* Return the partition
|
||||
*/
|
||||
readonly partition: string;
|
||||
}
|
||||
/**
|
||||
* Return the appropriate values for the environment placeholders
|
||||
*/
|
||||
export interface IEnvironmentPlaceholderProvider {
|
||||
/**
|
||||
* Return the region
|
||||
*/
|
||||
region(): Promise<string>;
|
||||
/**
|
||||
* Return the account
|
||||
*/
|
||||
accountId(): Promise<string>;
|
||||
/**
|
||||
* Return the partition
|
||||
*/
|
||||
partition(): Promise<string>;
|
||||
}
|
||||
90
cdk/node_modules/aws-cdk-lib/node_modules/@aws-cdk/cloud-assembly-api/lib/placeholders.js
generated
vendored
Normal file
90
cdk/node_modules/aws-cdk-lib/node_modules/@aws-cdk/cloud-assembly-api/lib/placeholders.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1
cdk/node_modules/aws-cdk-lib/node_modules/@aws-cdk/cloud-assembly-api/lib/private/error.d.ts
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/node_modules/@aws-cdk/cloud-assembly-api/lib/private/error.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export {};
|
||||
47
cdk/node_modules/aws-cdk-lib/node_modules/@aws-cdk/cloud-assembly-api/lib/private/error.js
generated
vendored
Normal file
47
cdk/node_modules/aws-cdk-lib/node_modules/@aws-cdk/cloud-assembly-api/lib/private/error.js
generated
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
"use strict";
|
||||
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
||||
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
||||
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
||||
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
||||
};
|
||||
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
||||
if (kind === "m") throw new TypeError("Private method is not writable");
|
||||
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
||||
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
||||
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
||||
};
|
||||
var _CloudAssemblyError_time;
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.CloudAssemblyError = void 0;
|
||||
const ASSEMBLY_ERROR_SYMBOL = Symbol.for('@aws-cdk/cx-api.CloudAssemblyError');
|
||||
/**
|
||||
* A CloudAssemblyError is thrown for issues with the synthesized CloudAssembly.
|
||||
*
|
||||
* These are typically exceptions that are unexpected for end-users,
|
||||
* and should only occur during abnormal operation, e.g. when the synthesis
|
||||
* didn't fully complete.
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
class CloudAssemblyError extends Error {
|
||||
/**
|
||||
* The time the error was thrown.
|
||||
*/
|
||||
get time() {
|
||||
return __classPrivateFieldGet(this, _CloudAssemblyError_time, "f");
|
||||
}
|
||||
get type() {
|
||||
return 'assembly';
|
||||
}
|
||||
constructor(msg) {
|
||||
super(msg);
|
||||
_CloudAssemblyError_time.set(this, void 0);
|
||||
Object.setPrototypeOf(this, CloudAssemblyError.prototype);
|
||||
Object.defineProperty(this, ASSEMBLY_ERROR_SYMBOL, { value: true });
|
||||
this.name = new.target.name;
|
||||
__classPrivateFieldSet(this, _CloudAssemblyError_time, new Date().toISOString(), "f");
|
||||
}
|
||||
}
|
||||
exports.CloudAssemblyError = CloudAssemblyError;
|
||||
_CloudAssemblyError_time = new WeakMap();
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXJyb3IuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJlcnJvci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7QUFBQSxNQUFNLHFCQUFxQixHQUFHLE1BQU0sQ0FBQyxHQUFHLENBQUMsb0NBQW9DLENBQUMsQ0FBQztBQUUvRTs7Ozs7Ozs7R0FRRztBQUNILE1BQWEsa0JBQW1CLFNBQVEsS0FBSztJQUczQzs7T0FFRztJQUNILElBQVcsSUFBSTtRQUNiLE9BQU8sdUJBQUEsSUFBSSxnQ0FBTSxDQUFDO0lBQ3BCLENBQUM7SUFFRCxJQUFXLElBQUk7UUFDYixPQUFPLFVBQVUsQ0FBQztJQUNwQixDQUFDO0lBRUQsWUFBWSxHQUFXO1FBQ3JCLEtBQUssQ0FBQyxHQUFHLENBQUMsQ0FBQztRQWRiLDJDQUFjO1FBZ0JaLE1BQU0sQ0FBQyxjQUFjLENBQUMsSUFBSSxFQUFFLGtCQUFrQixDQUFDLFNBQVMsQ0FBQyxDQUFDO1FBQzFELE1BQU0sQ0FBQyxjQUFjLENBQUMsSUFBSSxFQUFFLHFCQUFxQixFQUFFLEVBQUUsS0FBSyxFQUFFLElBQUksRUFBRSxDQUFDLENBQUM7UUFFcEUsSUFBSSxDQUFDLElBQUksR0FBR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0LnNldFByb3RvdHlwZU9mKHRoaXMsIENsb3VkQXNzZW1ibHlFcnJvci5wcm90b3R5cGUpO1xuICAgIE9iamVjdC5kZWZpbmVQcm9wZXJ0eSh0aGlzLCBBU1NFTUJMWV9FUlJPUl9TWU1CT0wsIHsgdmFsdWU6IHRydWUgfSk7XG5cbiAgICB0aGlzLm5hbWUgPSBuZXcudGFyZ2V0Lm5hbWU7XG4gICAgdGhpcy4jdGltZSA9IG5ldyBEYXRlKCkudG9JU09TdHJpbmcoKTtcbiAgfVxufVxuIl19
|
||||
11
cdk/node_modules/aws-cdk-lib/node_modules/@aws-cdk/cloud-assembly-api/lib/private/toposort.d.ts
generated
vendored
Normal file
11
cdk/node_modules/aws-cdk-lib/node_modules/@aws-cdk/cloud-assembly-api/lib/private/toposort.d.ts
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
export type KeyFunc<T> = (x: T) => string;
|
||||
export type DepFunc<T> = (x: T) => string[];
|
||||
/**
|
||||
* Return a topological sort of all elements of xs, according to the given dependency functions
|
||||
*
|
||||
* Dependencies outside the referenced set are ignored.
|
||||
*
|
||||
* Not a stable sort, but in order to keep the order as stable as possible, we'll sort by key
|
||||
* among elements of equal precedence.
|
||||
*/
|
||||
export declare function topologicalSort<T>(xs: Iterable<T>, keyFn: KeyFunc<T>, depFn: DepFunc<T>): T[];
|
||||
35
cdk/node_modules/aws-cdk-lib/node_modules/@aws-cdk/cloud-assembly-api/lib/private/toposort.js
generated
vendored
Normal file
35
cdk/node_modules/aws-cdk-lib/node_modules/@aws-cdk/cloud-assembly-api/lib/private/toposort.js
generated
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.topologicalSort = topologicalSort;
|
||||
const error_1 = require("./error");
|
||||
/**
|
||||
* Return a topological sort of all elements of xs, according to the given dependency functions
|
||||
*
|
||||
* Dependencies outside the referenced set are ignored.
|
||||
*
|
||||
* Not a stable sort, but in order to keep the order as stable as possible, we'll sort by key
|
||||
* among elements of equal precedence.
|
||||
*/
|
||||
function topologicalSort(xs, keyFn, depFn) {
|
||||
const remaining = new Map();
|
||||
for (const element of xs) {
|
||||
const key = keyFn(element);
|
||||
remaining.set(key, { key, element, dependencies: depFn(element) });
|
||||
}
|
||||
const ret = new Array();
|
||||
while (remaining.size > 0) {
|
||||
// All elements with no more deps in the set can be ordered
|
||||
const selectable = Array.from(remaining.values()).filter(e => e.dependencies.every(d => !remaining.has(d)));
|
||||
selectable.sort((a, b) => a.key < b.key ? -1 : b.key < a.key ? 1 : 0);
|
||||
for (const selected of selectable) {
|
||||
ret.push(selected.element);
|
||||
remaining.delete(selected.key);
|
||||
}
|
||||
// If we didn't make any progress, we got stuck
|
||||
if (selectable.length === 0) {
|
||||
throw new error_1.CloudAssemblyError(`Could not determine ordering between: ${Array.from(remaining.keys()).join(', ')}`);
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidG9wb3NvcnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJ0b3Bvc29ydC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQWFBLDBDQTBCQztBQXZDRCxtQ0FBNkM7QUFLN0M7Ozs7Ozs7R0FPRztBQUNILFNBQWdCLGVBQWUsQ0FBSSxFQUFlLEVBQUUsS0FBaUIsRUFBRSxLQUFpQjtJQUN0RixNQUFNLFNBQVMsR0FBRyxJQUFJLEdBQUcsRUFBMEIsQ0FBQztJQUNwRCxLQUFLLE1BQU0sT0FBTyxJQUFJLEVBQUUsRUFBRSxDQUFDO1FBQ3pCLE1BQU0sR0FBRyxHQUFHLEtBQUssQ0FBQyxPQUFPLENBQUMsQ0FBQztRQUMzQixTQUFTLENBQUMsR0FBRyxDQUFDLEdBQUcsRUFBRSxFQUFFLEdBQUcsRUFBRSxPQUFPLEVBQUUsWUFBWSxF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cm4gcmV0O1xufVxuXG5pbnRlcmZhY2UgVG9wb0VsZW1lbnQ8VD4ge1xuICBrZXk6IHN0cmluZztcbiAgZGVwZW5kZW5jaWVzOiBzdHJpbmdbXTtcbiAgZWxlbWVudDogVDtcbn1cbiJdfQ==
|
||||
97
cdk/node_modules/aws-cdk-lib/node_modules/@aws-cdk/cloud-assembly-api/package.json
generated
vendored
Normal file
97
cdk/node_modules/aws-cdk-lib/node_modules/@aws-cdk/cloud-assembly-api/package.json
generated
vendored
Normal file
@@ -0,0 +1,97 @@
|
||||
{
|
||||
"name": "@aws-cdk/cloud-assembly-api",
|
||||
"description": "API for working with Cloud Assemblies",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/aws/aws-cdk-cli",
|
||||
"directory": "packages/@aws-cdk/cloud-assembly-api"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "projen build",
|
||||
"bump": "projen bump",
|
||||
"check-for-updates": "projen check-for-updates",
|
||||
"check-licenses": "projen check-licenses",
|
||||
"compile": "projen compile",
|
||||
"default": "projen default",
|
||||
"eslint": "projen eslint",
|
||||
"gather-versions": "projen gather-versions",
|
||||
"nx": "projen nx",
|
||||
"package": "projen package",
|
||||
"post-compile": "projen post-compile",
|
||||
"pre-compile": "projen pre-compile",
|
||||
"test": "projen test",
|
||||
"test:watch": "projen test:watch",
|
||||
"unbump": "projen unbump",
|
||||
"watch": "projen watch",
|
||||
"projen": "projen"
|
||||
},
|
||||
"author": {
|
||||
"name": "Amazon Web Services",
|
||||
"url": "https://aws.amazon.com",
|
||||
"organization": true
|
||||
},
|
||||
"devDependencies": {
|
||||
"@aws-cdk/cloud-assembly-schema": "53.15.0",
|
||||
"@cdklabs/eslint-plugin": "^2.0.0",
|
||||
"@stylistic/eslint-plugin": "^3",
|
||||
"@types/jest": "^29.5.14",
|
||||
"@types/node": "^20",
|
||||
"@typescript-eslint/eslint-plugin": "^8",
|
||||
"@typescript-eslint/parser": "^8",
|
||||
"commit-and-tag-version": "^12",
|
||||
"constructs": "^10.0.0",
|
||||
"eslint": "^9",
|
||||
"eslint-config-prettier": "^10.1.8",
|
||||
"eslint-import-resolver-typescript": "^4.4.4",
|
||||
"eslint-plugin-import": "^2.32.0",
|
||||
"eslint-plugin-jest": "^29.15.2",
|
||||
"eslint-plugin-jsdoc": "^62.9.0",
|
||||
"eslint-plugin-prettier": "^4.2.5",
|
||||
"jest": "^29.7.0",
|
||||
"jest-junit": "^16",
|
||||
"license-checker": "^25.0.1",
|
||||
"nx": "^22.6.4",
|
||||
"prettier": "^2.8",
|
||||
"projen": "^0.99.48",
|
||||
"ts-jest": "^29.4.9",
|
||||
"typescript": "5.9"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@aws-cdk/cloud-assembly-schema": ">=53.15.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"jsonschema": "~1.4.1",
|
||||
"semver": "^7.7.4"
|
||||
},
|
||||
"bundledDependencies": [
|
||||
"jsonschema",
|
||||
"semver"
|
||||
],
|
||||
"keywords": [
|
||||
"aws",
|
||||
"cdk"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">= 18.0.0"
|
||||
},
|
||||
"devEngines": {
|
||||
"packageManager": {
|
||||
"name": "yarn",
|
||||
"version": ">=4",
|
||||
"onFail": "ignore"
|
||||
}
|
||||
},
|
||||
"main": "lib/index.js",
|
||||
"license": "Apache-2.0",
|
||||
"homepage": "https://github.com/aws/aws-cdk",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"version": "2.2.2",
|
||||
"packageManager": "yarn@4.13.0",
|
||||
"types": "lib/index.d.ts",
|
||||
"installConfig": {
|
||||
"hoistingLimits": "workspaces"
|
||||
},
|
||||
"//": "~~ Generated by projen. To modify, edit .projenrc.js and run \"yarn projen\"."
|
||||
}
|
||||
206
cdk/node_modules/aws-cdk-lib/node_modules/@balena/dockerignore/LICENSE.md
generated
vendored
Normal file
206
cdk/node_modules/aws-cdk-lib/node_modules/@balena/dockerignore/LICENSE.md
generated
vendored
Normal file
@@ -0,0 +1,206 @@
|
||||
|
||||
* Copyright 2020 Balena Ltd. under the Apache 2.0 License included in this file.
|
||||
* Copyright 2018 Zeit Inc. under the MIT License included in this file.
|
||||
|
||||
--------------------------------------------------------------------------
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
--------------------------------------------------------------------------
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and associated documentation files (the "Software"),
|
||||
to deal in the Software without restriction, including without limitation
|
||||
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
and/or sell copies of the Software, and to permit persons to whom the
|
||||
Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
DEALINGS IN THE SOFTWARE.
|
||||
|
||||
--------------------------------------------------------------------------
|
||||
261
cdk/node_modules/aws-cdk-lib/node_modules/@balena/dockerignore/README.md
generated
vendored
Executable file
261
cdk/node_modules/aws-cdk-lib/node_modules/@balena/dockerignore/README.md
generated
vendored
Executable file
@@ -0,0 +1,261 @@
|
||||
|
||||
# dockerignore
|
||||
|
||||
`dockerignore` is a file filter library fully compatible with Docker's [.dockerignore
|
||||
file](https://docs.docker.com/engine/reference/builder/#dockerignore-file), exposing the
|
||||
same API as the popular [ignore](https://github.com/kaelzhang/node-ignore) package for the
|
||||
`.gitignore` format.
|
||||
|
||||
`dockerignore` is also:
|
||||
|
||||
* Compatible with Linux, macOS and Windows.
|
||||
* Compact with 0 external dependencies (production install).
|
||||
* A pure Javascript port of Docker's Golang implementation of the `.dockerignore` format.
|
||||
* Well tested with hundreds of test cases including comparison against the actual behavior
|
||||
of `docker build` on Windows and Linux.
|
||||
* Relied on in production environments by
|
||||
[balena-cli](https://www.balena.io/docs/reference/balena-cli/),
|
||||
[now-cli](https://github.com/zeit/now-cli/)
|
||||
and other prominent projects built around Docker.
|
||||
|
||||
### What's different from `ignore`?
|
||||
|
||||
The `.dockerignore` spec has several differences from `.gitignore`:
|
||||
|
||||
- `*` in `.gitignore` matches everything, whereas in `.dockerignore` it only matches files in the
|
||||
current directory (like glob). This difference is important when whitelisting after a `*` rule.
|
||||
- `abc` in `.gitignore` matches all `abc` files and directories, however deeply nested, whereas
|
||||
in `.dockerignore` it matches only at `./abc` and not in subdirectories like `./somedir/abc`.
|
||||
- With `.gitignore`, when a parent directory is ignored, subdirectories cannot be re-added (using
|
||||
`!`) since `git` simply avoids walking through the subtree as an optimization. With
|
||||
`.dockerignore`, a subdirectory can be re-added even if a parent directory has been ignored.
|
||||
- For a complete list of differences, check out the [.gitignore
|
||||
spec](https://git-scm.com/docs/gitignore) and the [.dockerignore
|
||||
spec](https://docs.docker.com/engine/reference/builder/#dockerignore-file).
|
||||
|
||||
### What's the same as `ignore`?
|
||||
|
||||
The entire API. `dockerignore` started as a fork of
|
||||
[node-ignore](https://github.com/kaelzhang/node-ignore), and even reuses the same `index.d.ts` file
|
||||
for TypeScript definitions. Under the hood, `node-ignore`'s matching logic was rewritten to closely
|
||||
match Docker's implementation (modeled mainly around
|
||||
[dockerignore.go](https://github.com/moby/moby/blob/v19.03.8/builder/dockerignore/dockerignore.go)
|
||||
and [fileutils.go](https://github.com/moby/moby/blob/v19.03.8/pkg/fileutils/fileutils.go)).
|
||||
|
||||
### Compatibility
|
||||
|
||||
`dockerignore` works with Node.js version 8 and above, on Linux, macOS and Windows.
|
||||
The code is compiled with [Babel](https://babeljs.io/docs/en/).
|
||||
|
||||
## Install
|
||||
|
||||
```bash
|
||||
npm install --save @balena/dockerignore
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
const ignore = require('@balena/dockerignore')
|
||||
const ig = ignore().add(['.abc/*', '!.abc/d/'])
|
||||
```
|
||||
|
||||
Typescript type definitions are also included:
|
||||
|
||||
```typescript
|
||||
import ignore from '@balena/dockerignore'
|
||||
const ig = ignore().add(['.abc/*', '!.abc/d/'])
|
||||
```
|
||||
|
||||
### Filter the given paths
|
||||
|
||||
```js
|
||||
const paths = [
|
||||
'.abc/a.js', // filtered out
|
||||
'.abc/d/e.js' // included
|
||||
]
|
||||
|
||||
ig.filter(paths) // ['.abc/d/e.js']
|
||||
ig.ignores('.abc/a.js') // true
|
||||
```
|
||||
|
||||
### As the filter function
|
||||
|
||||
```js
|
||||
paths.filter(ig.createFilter()); // ['.abc/d/e.js']
|
||||
```
|
||||
|
||||
### Windows paths are supported
|
||||
|
||||
```js
|
||||
ig.filter(['.abc\\a.js', '.abc\\d\\e.js'])
|
||||
// if the code above runs on windows, the result will be
|
||||
// ['.abc\\d\\e.js']
|
||||
```
|
||||
|
||||
## Backslashes _vs._ forward slashes
|
||||
|
||||
`dockerignore` behaves just like the Docker CLI ("docker build") in relation to the backslash (`\`)
|
||||
and forward slash (`/`) characters:
|
||||
|
||||
OS | Location | Slash (`/`) | Backslash (`\`)
|
||||
------------ | ----------------------- | ---------------| --------------------
|
||||
Linux, macOS | `.dockerignore` | Path separator | Escape character
|
||||
Linux, macOS | `filter()`, `ignores()` | Path separator | Part of file name
|
||||
Windows | `.dockerignore` | Path separator | Path separator
|
||||
Windows | `filter()`, `ignores()` | Path separator | Path separator
|
||||
|
||||
This means that forward slashes can be used in the `.dockerignore` file for cross-platform
|
||||
compatibility. This is consistent with how Windows works generally: both forward slashes
|
||||
and backslashes are accepted as path separators by the Command Prompt (cmd.exe) or
|
||||
PowerShell, and by library functions like the Golang
|
||||
[filepath.Clean](https://golang.org/pkg/path/filepath/#Clean) or the Node.js
|
||||
[path.normalize](https://nodejs.org/docs/latest-v10.x/api/path.html#path_path_normalize_path).
|
||||
|
||||
The use of the backslash as an escape character (Linux and macOS only) is not documented in the
|
||||
`.dockerignore` specification. "Reasonable" uses are probably to escape the few characters that
|
||||
have a special meaning in the `.dockerignore` file, namely `"*#!\"` (excluding the double quotes),
|
||||
as opposed to characters that have a special meaning in [regular
|
||||
expressions](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions)
|
||||
generally. The "escaping" behavior for any other characters (e.g. `'\\b'`) is undefined and subject
|
||||
to implementation-specific interpretation that may change at any time.
|
||||
|
||||
## Absolute paths
|
||||
|
||||
Leading and trailing slashes (or backslashes on Windows) are removed from `.dockerignore` patterns,
|
||||
so `'/a'`, `'a/'` and `'/a/'` are all equivalent to `'a'` in a `.dockerignore` file, and they all
|
||||
anchor to the "leftmost" directory when matching against relative paths. For example, pattern `'a'`
|
||||
is compared with `'x'` for a given path `'x/y/z'`. This follows Docker's Golang implementation for
|
||||
compatibility. Conversely, a given absolute path will not match a non-wildcard pattern. More
|
||||
examples:
|
||||
|
||||
```js
|
||||
ignore().add('a').ignores('a') // true
|
||||
ignore().add('/a').ignores('a') // true
|
||||
ignore().add('/a/').ignores('a') // true
|
||||
ignore().add('a').ignores('/a') // false
|
||||
ignore().add('/a').ignores('/a') // false
|
||||
ignore().add('/a/').ignores('/a') // false
|
||||
```
|
||||
|
||||
Considering pattern slash removal, the cases above may be reduced to:
|
||||
|
||||
```js
|
||||
ignore().add('a').ignores('a') // true
|
||||
ignore().add('a').ignores('/a') // false
|
||||
```
|
||||
|
||||
The 'false' outcome for these examples may appear to mismatch the behavior of "docker build", when
|
||||
the source argument for the Dockerfile [ADD](https://docs.docker.com/engine/reference/builder/#add)
|
||||
or [COPY](https://docs.docker.com/engine/reference/builder/#copy) instructions is an absolute path
|
||||
(starting with a slash). The explanation is that docker converts absolute source paths to relative
|
||||
paths (relative to the "build context") **prior to pattern matching:**
|
||||
https://github.com/moby/moby/blob/v19.03.8/pkg/archive/archive.go#L806
|
||||
https://github.com/moby/moby/blob/v19.03.8/pkg/archive/archive.go#L825
|
||||
|
||||
... while `dockerignore` mirrors the implementation of the pattern matcher itself. The advice is
|
||||
for your application to do the same as the docker CLI: use relative paths for pattern matching.
|
||||
This is also generally more portable across different environments: development machine, CI
|
||||
pipelines, servers or end user devices.
|
||||
|
||||
## Comments
|
||||
|
||||
A pattern starting with `'#'` (hash) is ignored as a comment. The hash can be prefixed with
|
||||
a slash or backslash in order to match a file name that also starts with a hash:
|
||||
|
||||
```js
|
||||
ignore().add('#abc').ignores('#abc') // false
|
||||
ignore().add('/#abc').ignores('#abc') // true
|
||||
ignore().add('\\#abc').ignores('#abc') // true
|
||||
```
|
||||
|
||||
This works because of the leading slash removal from patterns described in [Absolute
|
||||
Paths](#absolute-paths).
|
||||
|
||||
## Exclusion patterns
|
||||
|
||||
Patterns starting with `'!'` (exclamation mark) define matching exclusions (exceptions) as
|
||||
documented in the [.dockerignore
|
||||
specification](https://docs.docker.com/engine/reference/builder/#dockerignore-file). For
|
||||
compatibility with Docker's implementation, patterns starting with `'/!'` or `'!/'` (but not
|
||||
`'/!/'`) will also be considered exclusion patterns, in addition to slash removal described in
|
||||
[Absolute Paths](#absolute-paths). Backslash escaping as `'\\!'` may be used in order to match a
|
||||
file or directory name that starts with the exclamation mark, but this is only possible on Linux
|
||||
and macOS, not on Windows. Again, it only behaves this way for compatibility with Docker's
|
||||
implementation.
|
||||
|
||||
## Options
|
||||
|
||||
Matching is case-insensitive by default, following the `ignore` API
|
||||
([ignorecase](https://www.npmjs.com/package/ignore#optionsignorecase-since-400)).
|
||||
Note however that Docker performs case-sensitive matching.
|
||||
Use the `ignorecase: false` option to align with Docker's behavior:
|
||||
|
||||
```js
|
||||
const ig = ignore({ ignorecase: false }) // for case-sensitive matching
|
||||
```
|
||||
|
||||
## Methods
|
||||
|
||||
### .add(pattern)
|
||||
### .add(patterns)
|
||||
|
||||
- **pattern** `String|Ignore` An ignore pattern string, or the `Ignore` instance
|
||||
- **patterns** `Array.<pattern>` Array of ignore patterns.
|
||||
|
||||
Adds a rule or several rules to the current manager.
|
||||
|
||||
Returns `this`
|
||||
|
||||
`pattern` could either be a line of ignore pattern or a string of multiple ignore patterns, which means we could just `ignore().add()` the content of a ignore file:
|
||||
|
||||
```js
|
||||
ignore()
|
||||
.add(fs.readFileSync(filenameOfGitignore).toString())
|
||||
.filter(filenames)
|
||||
```
|
||||
|
||||
`pattern` could also be an `ignore` instance, so that we could easily inherit the rules of another `Ignore` instance.
|
||||
|
||||
### .ignores(pathname)
|
||||
|
||||
Returns `Boolean` whether `pathname` should be ignored.
|
||||
|
||||
```js
|
||||
ig.ignores('.abc/a.js') // true
|
||||
```
|
||||
|
||||
### .filter(paths)
|
||||
|
||||
Filters the given array of pathnames, and returns the filtered array.
|
||||
|
||||
- **paths** `Array.<path>` The array of `pathname`s to be filtered.
|
||||
|
||||
### .createFilter()
|
||||
|
||||
Creates a filter function which could filter an array of paths with `Array.prototype.filter`.
|
||||
|
||||
Returns `function(path)` the filter function.
|
||||
|
||||
## Contributing
|
||||
|
||||
Contributions are always welcome!
|
||||
|
||||
1. Fork this repository to your own GitHub account and then clone it to your local device.
|
||||
2. Install the dependencies: `npm install`
|
||||
3. Add a test case (if applicable) and ensure it currently fails
|
||||
4. Add code to pass the test
|
||||
5. Make a pull request (additional tests will run on CI to ensure that your test case agrees with an actual `docker build`)
|
||||
|
||||
## Acknowledgements
|
||||
|
||||
The initial work on this project was done by Pranay Prakash
|
||||
([@pranaygp](https://twitter.com/pranaygp)) / [▲ZEIT](https://zeit.co), Kael Zhang
|
||||
([@kaelzhang](https://github.com/kaelzhang)) and the [node-ignore
|
||||
contributors](https://github.com/kaelzhang/node-ignore/graphs/contributors).
|
||||
|
||||
Paulo Castro ([@pdcastro](https://github.com/pdcastro)) / [balena.io](https://www.balena.io/)
|
||||
forked the repository in year 2020 ([encouraged by
|
||||
Zeit](https://github.com/zeit/dockerignore/pull/16#issuecomment-611790479)) and put in a
|
||||
substantial effort on Windows support, cross-platform compatibility and testing, leading to release
|
||||
1.0.0.
|
||||
363
cdk/node_modules/aws-cdk-lib/node_modules/@balena/dockerignore/ignore.js
generated
vendored
Normal file
363
cdk/node_modules/aws-cdk-lib/node_modules/@balena/dockerignore/ignore.js
generated
vendored
Normal file
@@ -0,0 +1,363 @@
|
||||
'use strict';
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2020 Balena Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
* ------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright 2018 Zeit, Inc.
|
||||
* Licensed under the MIT License. See file LICENSE.md for a full copy.
|
||||
*
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/**
|
||||
* This module implements the [dockerignore
|
||||
* spec](https://docs.docker.com/engine/reference/builder/#dockerignore-file),
|
||||
* closely following Docker's (Moby) Golang implementation:
|
||||
* https://github.com/moby/moby/blob/v19.03.8/builder/dockerignore/dockerignore.go
|
||||
* https://github.com/moby/moby/blob/v19.03.8/pkg/fileutils/fileutils.go
|
||||
* https://github.com/moby/moby/blob/v19.03.8/pkg/archive/archive.go#L825
|
||||
*
|
||||
* Something the spec is not clear about, but we discovered by reading source code
|
||||
* and testing against the "docker build" command, is the handling of backslashes and
|
||||
* forward slashes as path separators and escape characters in the .dockerignore file
|
||||
* across platforms including Windows, Linux and macOS:
|
||||
*
|
||||
* * On Linux and macOS, only forward slashes can be used as path separators in the
|
||||
* .dockerignore file, and the backslash works as an escape character.
|
||||
* * On Windows, both forward slashes and backslashes are allowed as path separators
|
||||
* in the .dockerignore file, and the backslash is not used as an escape character.
|
||||
*
|
||||
* This is consistent with how Windows works generally: both forward slashes and
|
||||
* backslashes are accepted as path separators by the cmd.exe Command Prompt or
|
||||
* PowerShell, and by library functions like the Golang filepath.Clean or the
|
||||
* Node.js path.normalize.
|
||||
*
|
||||
* Similarly, path strings provided to the IgnoreBase.ignores() and IgnoreBase.filter()
|
||||
* methods can use either forward slashes or backslashes as path separators on Windows,
|
||||
* but only forward slashes are accepted as path separators on Linux and macOS.
|
||||
*/
|
||||
|
||||
const path = require('path');
|
||||
|
||||
const factory = options => new IgnoreBase(options); // https://github.com/kaelzhang/node-ignore/blob/5.1.4/index.js#L538-L539
|
||||
// Fixes typescript module import
|
||||
|
||||
|
||||
factory.default = factory;
|
||||
module.exports = factory;
|
||||
|
||||
function make_array(subject) {
|
||||
return Array.isArray(subject) ? subject : [subject];
|
||||
}
|
||||
|
||||
const REGEX_TRAILING_SLASH = /(?<=.)\/$/;
|
||||
const REGEX_TRAILING_BACKSLASH = /(?<=.)\\$/;
|
||||
const REGEX_TRAILING_PATH_SEP = path.sep === '\\' ? REGEX_TRAILING_BACKSLASH : REGEX_TRAILING_SLASH;
|
||||
const KEY_IGNORE = typeof Symbol !== 'undefined' ? Symbol.for('dockerignore') : 'dockerignore'; // An implementation of Go's filepath.Clean
|
||||
// https://golang.org/pkg/path/filepath/#Clean
|
||||
// https://github.com/golang/go/blob/master/src/path/filepath/path.go
|
||||
// Note that, like Go, on Windows this function converts forward slashes
|
||||
// to backslashes.
|
||||
|
||||
function cleanPath(file) {
|
||||
return path.normalize(file).replace(REGEX_TRAILING_PATH_SEP, '');
|
||||
} // Javascript port of Golang's filepath.ToSlash
|
||||
// https://golang.org/pkg/path/filepath/#ToSlash
|
||||
// https://github.com/golang/go/blob/master/src/path/filepath/path.go
|
||||
// Convert any OS-specific path separator to '/'. Backslash is converted
|
||||
// to forward slash on Windows, but not on Linux/macOS.
|
||||
// Note that both forward slashes and backslashes are valid path separators on
|
||||
// Windows. As a result, code such as `pattern.split(path.sep).join('/')` fails
|
||||
// on Windows when forward slashes are used as path separators.
|
||||
|
||||
|
||||
function toSlash(file) {
|
||||
if (path.sep === '/') {
|
||||
return file;
|
||||
}
|
||||
|
||||
return file.replace(/\\/g, '/');
|
||||
} // Javascript port of Golang's filepath.FromSlash
|
||||
// https://github.com/golang/go/blob/master/src/path/filepath/path.go
|
||||
|
||||
|
||||
function fromSlash(file) {
|
||||
if (path.sep === '/') {
|
||||
return file;
|
||||
}
|
||||
|
||||
return file.replace(/\//g, path.sep);
|
||||
}
|
||||
|
||||
class IgnoreBase {
|
||||
constructor({
|
||||
// https://github.com/kaelzhang/node-ignore/blob/5.1.4/index.js#L372
|
||||
ignorecase = true
|
||||
} = {}) {
|
||||
this._rules = [];
|
||||
this._ignorecase = ignorecase;
|
||||
this[KEY_IGNORE] = true;
|
||||
|
||||
this._initCache();
|
||||
}
|
||||
|
||||
_initCache() {
|
||||
this._cache = {};
|
||||
} // @param {Array.<string>|string|Ignore} pattern
|
||||
|
||||
|
||||
add(pattern) {
|
||||
this._added = false;
|
||||
|
||||
if (typeof pattern === 'string') {
|
||||
pattern = pattern.split(/\r?\n/g);
|
||||
}
|
||||
|
||||
make_array(pattern).forEach(this._addPattern, this); // Some rules have just added to the ignore,
|
||||
// making the behavior changed.
|
||||
|
||||
if (this._added) {
|
||||
this._initCache();
|
||||
}
|
||||
|
||||
return this;
|
||||
} // legacy
|
||||
|
||||
|
||||
addPattern(pattern) {
|
||||
return this.add(pattern);
|
||||
}
|
||||
|
||||
_addPattern(pattern) {
|
||||
// https://github.com/kaelzhang/node-ignore/issues/32
|
||||
if (pattern && pattern[KEY_IGNORE]) {
|
||||
this._rules = this._rules.concat(pattern._rules);
|
||||
this._added = true;
|
||||
return;
|
||||
}
|
||||
|
||||
if (this._checkPattern(pattern)) {
|
||||
const rule = this._createRule(pattern.trim());
|
||||
|
||||
if (rule !== null) {
|
||||
this._added = true;
|
||||
|
||||
this._rules.push(rule);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
_checkPattern(pattern) {
|
||||
// https://github.com/moby/moby/blob/v19.03.8/builder/dockerignore/dockerignore.go#L34-L40
|
||||
return pattern && typeof pattern === 'string' && pattern.indexOf('#') !== 0 && pattern.trim() !== "";
|
||||
}
|
||||
|
||||
filter(paths) {
|
||||
return make_array(paths).filter(path => this._filter(path));
|
||||
}
|
||||
|
||||
createFilter() {
|
||||
return path => this._filter(path);
|
||||
}
|
||||
|
||||
ignores(path) {
|
||||
return !this._filter(path);
|
||||
} // https://github.com/moby/moby/blob/v19.03.8/builder/dockerignore/dockerignore.go#L41-L53
|
||||
// https://github.com/moby/moby/blob/v19.03.8/pkg/fileutils/fileutils.go#L29-L55
|
||||
|
||||
|
||||
_createRule(pattern) {
|
||||
const origin = pattern;
|
||||
let negative = false; // > An optional prefix "!" which negates the pattern;
|
||||
// https://github.com/moby/moby/blob/v19.03.8/builder/dockerignore/dockerignore.go#L43-L46
|
||||
|
||||
if (pattern[0] === '!') {
|
||||
negative = true;
|
||||
pattern = pattern.substring(1).trim();
|
||||
} // https://github.com/moby/moby/blob/v19.03.8/builder/dockerignore/dockerignore.go#L47-L53
|
||||
|
||||
|
||||
if (pattern.length > 0) {
|
||||
pattern = cleanPath(pattern);
|
||||
pattern = toSlash(pattern);
|
||||
|
||||
if (pattern.length > 1 && pattern[0] === '/') {
|
||||
pattern = pattern.slice(1);
|
||||
}
|
||||
} // https://github.com/moby/moby/blob/v19.03.8/builder/dockerignore/dockerignore.go#L54-L55
|
||||
|
||||
|
||||
if (negative) {
|
||||
pattern = '!' + pattern;
|
||||
} // https://github.com/moby/moby/blob/v19.03.8/pkg/fileutils/fileutils.go#L30
|
||||
|
||||
|
||||
pattern = pattern.trim();
|
||||
|
||||
if (pattern === "") {
|
||||
return null;
|
||||
} // https://github.com/moby/moby/blob/v19.03.8/pkg/fileutils/fileutils.go#L34
|
||||
// convert forward slashes to backslashes on Windows
|
||||
|
||||
|
||||
pattern = cleanPath(pattern); // https://github.com/moby/moby/blob/v19.03.8/pkg/fileutils/fileutils.go#L36-L42
|
||||
|
||||
if (pattern[0] === '!') {
|
||||
if (pattern.length === 1) {
|
||||
return null;
|
||||
}
|
||||
|
||||
negative = true;
|
||||
pattern = pattern.substring(1);
|
||||
} else {
|
||||
negative = false;
|
||||
}
|
||||
|
||||
return {
|
||||
origin,
|
||||
pattern,
|
||||
// https://github.com/moby/moby/blob/v19.03.8/pkg/fileutils/fileutils.go#L54
|
||||
dirs: pattern.split(path.sep),
|
||||
negative
|
||||
};
|
||||
} // @returns `Boolean` true if the `path` is NOT ignored
|
||||
|
||||
|
||||
_filter(path) {
|
||||
if (!path) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (path in this._cache) {
|
||||
return this._cache[path];
|
||||
}
|
||||
|
||||
return this._cache[path] = this._test(path);
|
||||
} // @returns {Boolean} true if a file is NOT ignored
|
||||
// https://github.com/moby/moby/blob/v19.03.8/pkg/fileutils/fileutils.go#L62
|
||||
|
||||
|
||||
_test(file) {
|
||||
file = fromSlash(file); // equivalent to golang filepath.Dir() https://golang.org/src/path/filepath/path.go
|
||||
|
||||
const parentPath = cleanPath(path.dirname(file));
|
||||
const parentPathDirs = parentPath.split(path.sep);
|
||||
let matched = false;
|
||||
|
||||
this._rules.forEach(rule => {
|
||||
let match = this._match(file, rule); // https://github.com/moby/moby/blob/v19.03.8/pkg/fileutils/fileutils.go#L80
|
||||
|
||||
|
||||
if (!match && parentPath !== ".") {
|
||||
// Check to see if the pattern matches one of our parent dirs.
|
||||
if (rule.dirs.includes('**')) {
|
||||
// Ah shucks! We have to test every possible parent path that has
|
||||
// a number of dirs _n_ where
|
||||
// `rule.dirs.filter(doubleStar).length <= _n_ <= parentPathDirs.length`
|
||||
// since the ** can imply any number of directories including 0
|
||||
for (let i = rule.dirs.filter(x => x !== '**').length; i <= parentPathDirs.length; i++) {
|
||||
match = match || this._match(parentPathDirs.slice(0, i).join(path.sep), rule);
|
||||
}
|
||||
} else if (rule.dirs.length <= parentPathDirs.length) {
|
||||
// https://github.com/moby/moby/blob/v19.03.8/pkg/fileutils/fileutils.go#L83
|
||||
match = this._match(parentPathDirs.slice(0, rule.dirs.length).join(path.sep), rule);
|
||||
}
|
||||
}
|
||||
|
||||
if (match) {
|
||||
matched = !rule.negative;
|
||||
}
|
||||
});
|
||||
|
||||
return !matched;
|
||||
} // @returns {Boolean} true if a file is matched by a rule
|
||||
|
||||
|
||||
_match(file, rule) {
|
||||
return this._compile(rule).regexp.test(file);
|
||||
} // https://github.com/moby/moby/blob/v19.03.8/pkg/fileutils/fileutils.go#L139
|
||||
|
||||
|
||||
_compile(rule) {
|
||||
if (rule.regexp) {
|
||||
return rule;
|
||||
}
|
||||
|
||||
let regStr = '^'; // Go through the pattern and convert it to a regexp.
|
||||
|
||||
let escapedSlash = path.sep === '\\' ? '\\\\' : path.sep;
|
||||
|
||||
for (let i = 0; i < rule.pattern.length; i++) {
|
||||
const ch = rule.pattern[i];
|
||||
|
||||
if (ch === '*') {
|
||||
if (rule.pattern[i + 1] === '*') {
|
||||
// is some flavor of "**"
|
||||
i++; // Treat **/ as ** so eat the "/"
|
||||
|
||||
if (rule.pattern[i + 1] === path.sep) {
|
||||
i++;
|
||||
}
|
||||
|
||||
if (rule.pattern[i + 1] === undefined) {
|
||||
// is "**EOF" - to align with .gitignore just accept all
|
||||
regStr += ".*";
|
||||
} else {
|
||||
// is "**"
|
||||
// Note that this allows for any # of /'s (even 0) because
|
||||
// the .* will eat everything, even /'s
|
||||
regStr += `(.*${escapedSlash})?`;
|
||||
}
|
||||
} else {
|
||||
// is "*" so map it to anything but "/"
|
||||
regStr += `[^${escapedSlash}]*`;
|
||||
}
|
||||
} else if (ch === '?') {
|
||||
// "?" is any char except "/"
|
||||
regStr += `[^${escapedSlash}]`;
|
||||
} else if (ch === '.' || ch === '$') {
|
||||
// Escape some regexp special chars that have no meaning
|
||||
// in golang's filepath.Match
|
||||
regStr += `\\${ch}`;
|
||||
} else if (ch === '\\') {
|
||||
// escape next char. Note that a trailing \ in the pattern
|
||||
// will be left alone (but need to escape it)
|
||||
if (path.sep === '\\') {
|
||||
// On windows map "\" to "\\", meaning an escaped backslash,
|
||||
// and then just continue because filepath.Match on
|
||||
// Windows doesn't allow escaping at all
|
||||
regStr += escapedSlash;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (rule.pattern[i + 1] !== undefined) {
|
||||
regStr += '\\' + rule.pattern[i + 1];
|
||||
i++;
|
||||
} else {
|
||||
regStr += '\\';
|
||||
}
|
||||
} else {
|
||||
regStr += ch;
|
||||
}
|
||||
}
|
||||
|
||||
regStr += "$";
|
||||
rule.regexp = new RegExp(regStr, this._ignorecase ? 'i' : '');
|
||||
return rule;
|
||||
}
|
||||
|
||||
}
|
||||
45
cdk/node_modules/aws-cdk-lib/node_modules/@balena/dockerignore/index.d.ts
generated
vendored
Normal file
45
cdk/node_modules/aws-cdk-lib/node_modules/@balena/dockerignore/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
export interface Ignore {
|
||||
/**
|
||||
* Adds a rule rules to the current manager.
|
||||
* @param {string | Ignore} pattern
|
||||
* @returns IgnoreBase
|
||||
*/
|
||||
add(pattern: string | Ignore): Ignore
|
||||
/**
|
||||
* Adds several rules to the current manager.
|
||||
* @param {string[]} patterns
|
||||
* @returns IgnoreBase
|
||||
*/
|
||||
add(patterns: (string | Ignore)[]): Ignore
|
||||
|
||||
/**
|
||||
* Filters the given array of pathnames, and returns the filtered array.
|
||||
* NOTICE that each path here should be a relative path to the root of your repository.
|
||||
* @param paths the array of paths to be filtered.
|
||||
* @returns The filtered array of paths
|
||||
*/
|
||||
filter(paths: string[]): string[]
|
||||
/**
|
||||
* Creates a filter function which could filter
|
||||
* an array of paths with Array.prototype.filter.
|
||||
*/
|
||||
createFilter(): (path: string) => boolean
|
||||
|
||||
/**
|
||||
* Returns Boolean whether pathname should be ignored.
|
||||
* @param {string} pathname a path to check
|
||||
* @returns boolean
|
||||
*/
|
||||
ignores(pathname: string): boolean
|
||||
}
|
||||
|
||||
interface Options {
|
||||
ignorecase?: boolean
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates new ignore manager.
|
||||
*/
|
||||
declare function ignore(options?: Options): Ignore
|
||||
|
||||
export default ignore
|
||||
49
cdk/node_modules/aws-cdk-lib/node_modules/@balena/dockerignore/package.json
generated
vendored
Normal file
49
cdk/node_modules/aws-cdk-lib/node_modules/@balena/dockerignore/package.json
generated
vendored
Normal file
@@ -0,0 +1,49 @@
|
||||
{
|
||||
"name": "@balena/dockerignore",
|
||||
"version": "1.0.2",
|
||||
"description": "dockerignore is a file filter library compatible with Docker and the node-ignore API",
|
||||
"main": "./ignore.js",
|
||||
"files": [
|
||||
"ignore.js",
|
||||
"index.d.ts"
|
||||
],
|
||||
"scripts": {
|
||||
"prepublishOnly": "npm run build",
|
||||
"build": "babel -o ignore.js index.js",
|
||||
"test": "npm run build && nyc ava ./test/ignore.js"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git@github.com:balena-io-modules/dockerignore.git"
|
||||
},
|
||||
"keywords": [
|
||||
"ignore",
|
||||
".dockerignore",
|
||||
"dockerignore",
|
||||
"rules",
|
||||
"manager",
|
||||
"filter",
|
||||
"regexp",
|
||||
"regex",
|
||||
"fnmatch",
|
||||
"glob",
|
||||
"asterisks",
|
||||
"regular-expression"
|
||||
],
|
||||
"license": "Apache-2.0",
|
||||
"bugs": {
|
||||
"url": "https://github.com/balena-io-modules/dockerignore/issues"
|
||||
},
|
||||
"devDependencies": {
|
||||
"async-sema": "^3.1.0",
|
||||
"ava": "^0.25.0",
|
||||
"@babel/cli": "^7.8.4",
|
||||
"@babel/preset-env": "^7.9.6",
|
||||
"chai": "^4.2.0",
|
||||
"cuid": "^2.1.8",
|
||||
"mkdirp": "^1.0.4",
|
||||
"nyc": "^15.0.1",
|
||||
"rimraf": "^3.0.2",
|
||||
"tmp": "^0.2.1"
|
||||
}
|
||||
}
|
||||
23
cdk/node_modules/aws-cdk-lib/node_modules/ajv/.runkit_example.js
generated
vendored
Normal file
23
cdk/node_modules/aws-cdk-lib/node_modules/ajv/.runkit_example.js
generated
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
const Ajv = require("ajv")
|
||||
const ajv = new Ajv({allErrors: true})
|
||||
|
||||
const schema = {
|
||||
type: "object",
|
||||
properties: {
|
||||
foo: {type: "string"},
|
||||
bar: {type: "number", maximum: 3},
|
||||
},
|
||||
required: ["foo", "bar"],
|
||||
additionalProperties: false,
|
||||
}
|
||||
|
||||
const validate = ajv.compile(schema)
|
||||
|
||||
test({foo: "abc", bar: 2})
|
||||
test({foo: 2, bar: 4})
|
||||
|
||||
function test(data) {
|
||||
const valid = validate(data)
|
||||
if (valid) console.log("Valid!")
|
||||
else console.log("Invalid: " + ajv.errorsText(validate.errors))
|
||||
}
|
||||
22
cdk/node_modules/aws-cdk-lib/node_modules/ajv/LICENSE
generated
vendored
Normal file
22
cdk/node_modules/aws-cdk-lib/node_modules/ajv/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2015-2021 Evgeny Poberezkin
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
207
cdk/node_modules/aws-cdk-lib/node_modules/ajv/README.md
generated
vendored
Normal file
207
cdk/node_modules/aws-cdk-lib/node_modules/ajv/README.md
generated
vendored
Normal file
@@ -0,0 +1,207 @@
|
||||
<img align="right" alt="Ajv logo" width="160" src="https://ajv.js.org/img/ajv.svg">
|
||||
|
||||
|
||||
|
||||
# Ajv JSON schema validator
|
||||
|
||||
The fastest JSON validator for Node.js and browser.
|
||||
|
||||
Supports JSON Schema draft-04/06/07/2019-09/2020-12 ([draft-04 support](https://ajv.js.org/json-schema.html#draft-04) requires ajv-draft-04 package) and JSON Type Definition [RFC8927](https://datatracker.ietf.org/doc/rfc8927/).
|
||||
|
||||
[](https://github.com/ajv-validator/ajv/actions?query=workflow%3Abuild)
|
||||
[](https://www.npmjs.com/package/ajv)
|
||||
[](https://www.npmjs.com/package/ajv)
|
||||
[](https://coveralls.io/github/ajv-validator/ajv?branch=master)
|
||||
[](https://simplex.chat/contact#/?v=1-2&smp=smp%3A%2F%2Fu2dS9sG8nMNURyZwqASV4yROM28Er0luVTx5X1CsMrU%3D%40smp4.simplex.im%2F8KvvURM6J38Gdq9dCuPswMOkMny0xCOJ%23%2F%3Fv%3D1-2%26dh%3DMCowBQYDK2VuAyEAr8rPVRuMOXv6kwF2yUAap-eoVg-9ssOFCi1fIrxTUw0%253D%26srv%3Do5vmywmrnaxalvz6wi3zicyftgio6psuvyniis6gco6bp6ekl4cqj4id.onion&data=%7B%22type%22%3A%22group%22%2C%22groupLinkId%22%3A%224pwLRgWHU9tlroMWHz0uOg%3D%3D%22%7D)
|
||||
[](https://gitter.im/ajv-validator/ajv)
|
||||
[](https://github.com/sponsors/epoberezkin)
|
||||
|
||||
## Ajv sponsors
|
||||
|
||||
[<img src="https://ajv.js.org/img/mozilla.svg" width="45%" alt="Mozilla">](https://www.mozilla.org)<img src="https://ajv.js.org/img/gap.svg" width="9%">[<img src="https://ajv.js.org/img/reserved.svg" width="45%">](https://opencollective.com/ajv)
|
||||
|
||||
[<img src="https://ajv.js.org/img/microsoft.png" width="31%" alt="Microsoft">](https://opensource.microsoft.com)<img src="https://ajv.js.org/img/gap.svg" width="3%">[<img src="https://ajv.js.org/img/reserved.svg" width="31%">](https://opencollective.com/ajv)<img src="https://ajv.js.org/img/gap.svg" width="3%">[<img src="https://ajv.js.org/img/reserved.svg" width="31%">](https://opencollective.com/ajv)
|
||||
|
||||
[<img src="https://ajv.js.org/img/retool.svg" width="22.5%" alt="Retool">](https://retool.com/?utm_source=sponsor&utm_campaign=ajv)<img src="https://ajv.js.org/img/gap.svg" width="3%">[<img src="https://ajv.js.org/img/tidelift.svg" width="22.5%" alt="Tidelift">](https://tidelift.com/subscription/pkg/npm-ajv?utm_source=npm-ajv&utm_medium=referral&utm_campaign=enterprise)<img src="https://ajv.js.org/img/gap.svg" width="3%">[<img src="https://ajv.js.org/img/simplex.svg" width="22.5%" alt="SimpleX">](https://github.com/simplex-chat/simplex-chat)<img src="https://ajv.js.org/img/gap.svg" width="3%">[<img src="https://ajv.js.org/img/reserved.svg" width="22.5%">](https://opencollective.com/ajv)
|
||||
|
||||
## Contributing
|
||||
|
||||
More than 100 people contributed to Ajv, and we would love to have you join the development. We welcome implementing new features that will benefit many users and ideas to improve our documentation.
|
||||
|
||||
Please review [Contributing guidelines](./CONTRIBUTING.md) and [Code components](https://ajv.js.org/components.html).
|
||||
|
||||
## Documentation
|
||||
|
||||
All documentation is available on the [Ajv website](https://ajv.js.org).
|
||||
|
||||
Some useful site links:
|
||||
|
||||
- [Getting started](https://ajv.js.org/guide/getting-started.html)
|
||||
- [JSON Schema vs JSON Type Definition](https://ajv.js.org/guide/schema-language.html)
|
||||
- [API reference](https://ajv.js.org/api.html)
|
||||
- [Strict mode](https://ajv.js.org/strict-mode.html)
|
||||
- [Standalone validation code](https://ajv.js.org/standalone.html)
|
||||
- [Security considerations](https://ajv.js.org/security.html)
|
||||
- [Command line interface](https://ajv.js.org/packages/ajv-cli.html)
|
||||
- [Frequently Asked Questions](https://ajv.js.org/faq.html)
|
||||
|
||||
## <a name="sponsors"></a>Please [sponsor Ajv development](https://github.com/sponsors/epoberezkin)
|
||||
|
||||
Since I asked to support Ajv development 40 people and 6 organizations contributed via GitHub and OpenCollective - this support helped receiving the MOSS grant!
|
||||
|
||||
Your continuing support is very important - the funds will be used to develop and maintain Ajv once the next major version is released.
|
||||
|
||||
Please sponsor Ajv via:
|
||||
|
||||
- [GitHub sponsors page](https://github.com/sponsors/epoberezkin) (GitHub will match it)
|
||||
- [Ajv Open Collective](https://opencollective.com/ajv)
|
||||
|
||||
Thank you.
|
||||
|
||||
#### Open Collective sponsors
|
||||
|
||||
<a href="https://opencollective.com/ajv"><img src="https://opencollective.com/ajv/individuals.svg?width=890"></a>
|
||||
|
||||
<a href="https://opencollective.com/ajv/organization/0/website"><img src="https://opencollective.com/ajv/organization/0/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/ajv/organization/1/website"><img src="https://opencollective.com/ajv/organization/1/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/ajv/organization/2/website"><img src="https://opencollective.com/ajv/organization/2/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/ajv/organization/3/website"><img src="https://opencollective.com/ajv/organization/3/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/ajv/organization/4/website"><img src="https://opencollective.com/ajv/organization/4/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/ajv/organization/5/website"><img src="https://opencollective.com/ajv/organization/5/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/ajv/organization/6/website"><img src="https://opencollective.com/ajv/organization/6/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/ajv/organization/7/website"><img src="https://opencollective.com/ajv/organization/7/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/ajv/organization/8/website"><img src="https://opencollective.com/ajv/organization/8/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/ajv/organization/9/website"><img src="https://opencollective.com/ajv/organization/9/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/ajv/organization/10/website"><img src="https://opencollective.com/ajv/organization/10/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/ajv/organization/11/website"><img src="https://opencollective.com/ajv/organization/11/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/ajv/organization/12/website"><img src="https://opencollective.com/ajv/organization/12/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/ajv/organization/13/website"><img src="https://opencollective.com/ajv/organization/13/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/ajv/organization/14/website"><img src="https://opencollective.com/ajv/organization/14/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/ajv/organization/15/website"><img src="https://opencollective.com/ajv/organization/15/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/ajv/organization/16/website"><img src="https://opencollective.com/ajv/organization/16/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/ajv/organization/17/website"><img src="https://opencollective.com/ajv/organization/17/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/ajv/organization/18/website"><img src="https://opencollective.com/ajv/organization/18/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/ajv/organization/19/website"><img src="https://opencollective.com/ajv/organization/19/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/ajv/organization/20/website"><img src="https://opencollective.com/ajv/organization/20/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/ajv/organization/21/website"><img src="https://opencollective.com/ajv/organization/21/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/ajv/organization/22/website"><img src="https://opencollective.com/ajv/organization/22/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/ajv/organization/23/website"><img src="https://opencollective.com/ajv/organization/23/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/ajv/organization/24/website"><img src="https://opencollective.com/ajv/organization/24/avatar.svg"></a>
|
||||
|
||||
## Performance
|
||||
|
||||
Ajv generates code to turn JSON Schemas into super-fast validation functions that are efficient for v8 optimization.
|
||||
|
||||
Currently Ajv is the fastest and the most standard compliant validator according to these benchmarks:
|
||||
|
||||
- [json-schema-benchmark](https://github.com/ebdrup/json-schema-benchmark) - 50% faster than the second place
|
||||
- [jsck benchmark](https://github.com/pandastrike/jsck#benchmarks) - 20-190% faster
|
||||
- [z-schema benchmark](https://rawgit.com/zaggino/z-schema/master/benchmark/results.html)
|
||||
- [themis benchmark](https://cdn.rawgit.com/playlyfe/themis/master/benchmark/results.html)
|
||||
|
||||
Performance of different validators by [json-schema-benchmark](https://github.com/ebdrup/json-schema-benchmark):
|
||||
|
||||
[](https://github.com/ebdrup/json-schema-benchmark/blob/master/README.md#performance)
|
||||
|
||||
## Features
|
||||
|
||||
- Ajv implements JSON Schema [draft-06/07/2019-09/2020-12](http://json-schema.org/) standards (draft-04 is supported in v6):
|
||||
- all validation keywords (see [JSON Schema validation keywords](https://ajv.js.org/json-schema.html))
|
||||
- [OpenAPI](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.3.md) extensions:
|
||||
- NEW: keyword [discriminator](https://ajv.js.org/json-schema.html#discriminator).
|
||||
- keyword [nullable](https://ajv.js.org/json-schema.html#nullable).
|
||||
- full support of remote references (remote schemas have to be added with `addSchema` or compiled to be available)
|
||||
- support of recursive references between schemas
|
||||
- correct string lengths for strings with unicode pairs
|
||||
- JSON Schema [formats](https://ajv.js.org/guide/formats.html) (with [ajv-formats](https://github.com/ajv-validator/ajv-formats) plugin).
|
||||
- [validates schemas against meta-schema](https://ajv.js.org/api.html#api-validateschema)
|
||||
- NEW: supports [JSON Type Definition](https://datatracker.ietf.org/doc/rfc8927/):
|
||||
- all keywords (see [JSON Type Definition schema forms](https://ajv.js.org/json-type-definition.html))
|
||||
- meta-schema for JTD schemas
|
||||
- "union" keyword and user-defined keywords (can be used inside "metadata" member of the schema)
|
||||
- supports [browsers](https://ajv.js.org/guide/environments.html#browsers) and Node.js 10.x - current
|
||||
- [asynchronous loading](https://ajv.js.org/guide/managing-schemas.html#asynchronous-schema-loading) of referenced schemas during compilation
|
||||
- "All errors" validation mode with [option allErrors](https://ajv.js.org/options.html#allerrors)
|
||||
- [error messages with parameters](https://ajv.js.org/api.html#validation-errors) describing error reasons to allow error message generation
|
||||
- i18n error messages support with [ajv-i18n](https://github.com/ajv-validator/ajv-i18n) package
|
||||
- [removing-additional-properties](https://ajv.js.org/guide/modifying-data.html#removing-additional-properties)
|
||||
- [assigning defaults](https://ajv.js.org/guide/modifying-data.html#assigning-defaults) to missing properties and items
|
||||
- [coercing data](https://ajv.js.org/guide/modifying-data.html#coercing-data-types) to the types specified in `type` keywords
|
||||
- [user-defined keywords](https://ajv.js.org/guide/user-keywords.html)
|
||||
- additional extension keywords with [ajv-keywords](https://github.com/ajv-validator/ajv-keywords) package
|
||||
- [\$data reference](https://ajv.js.org/guide/combining-schemas.html#data-reference) to use values from the validated data as values for the schema keywords
|
||||
- [asynchronous validation](https://ajv.js.org/guide/async-validation.html) of user-defined formats and keywords
|
||||
|
||||
## Install
|
||||
|
||||
To install version 8:
|
||||
|
||||
```
|
||||
npm install ajv
|
||||
```
|
||||
|
||||
## <a name="usage"></a>Getting started
|
||||
|
||||
Try it in the Node.js REPL: https://runkit.com/npm/ajv
|
||||
|
||||
In JavaScript:
|
||||
|
||||
```javascript
|
||||
// or ESM/TypeScript import
|
||||
import Ajv from "ajv"
|
||||
// Node.js require:
|
||||
const Ajv = require("ajv")
|
||||
|
||||
const ajv = new Ajv() // options can be passed, e.g. {allErrors: true}
|
||||
|
||||
const schema = {
|
||||
type: "object",
|
||||
properties: {
|
||||
foo: {type: "integer"},
|
||||
bar: {type: "string"},
|
||||
},
|
||||
required: ["foo"],
|
||||
additionalProperties: false,
|
||||
}
|
||||
|
||||
const data = {
|
||||
foo: 1,
|
||||
bar: "abc",
|
||||
}
|
||||
|
||||
const validate = ajv.compile(schema)
|
||||
const valid = validate(data)
|
||||
if (!valid) console.log(validate.errors)
|
||||
```
|
||||
|
||||
Learn how to use Ajv and see more examples in the [Guide: getting started](https://ajv.js.org/guide/getting-started.html)
|
||||
|
||||
## Changes history
|
||||
|
||||
See [https://github.com/ajv-validator/ajv/releases](https://github.com/ajv-validator/ajv/releases)
|
||||
|
||||
**Please note**: [Changes in version 8.0.0](https://github.com/ajv-validator/ajv/releases/tag/v8.0.0)
|
||||
|
||||
[Version 7.0.0](https://github.com/ajv-validator/ajv/releases/tag/v7.0.0)
|
||||
|
||||
[Version 6.0.0](https://github.com/ajv-validator/ajv/releases/tag/v6.0.0).
|
||||
|
||||
## Code of conduct
|
||||
|
||||
Please review and follow the [Code of conduct](./CODE_OF_CONDUCT.md).
|
||||
|
||||
Please report any unacceptable behaviour to ajv.validator@gmail.com - it will be reviewed by the project team.
|
||||
|
||||
## Security contact
|
||||
|
||||
To report a security vulnerability, please use the
|
||||
[Tidelift security contact](https://tidelift.com/security).
|
||||
Tidelift will coordinate the fix and disclosure. Please do NOT report security vulnerabilities via GitHub issues.
|
||||
|
||||
## Open-source software support
|
||||
|
||||
Ajv is a part of [Tidelift subscription](https://tidelift.com/subscription/pkg/npm-ajv?utm_source=npm-ajv&utm_medium=referral&utm_campaign=readme) - it provides a centralised support to open-source software users, in addition to the support provided by software maintainers.
|
||||
|
||||
## License
|
||||
|
||||
[MIT](./LICENSE)
|
||||
19
cdk/node_modules/aws-cdk-lib/node_modules/ajv/dist/2019.d.ts
generated
vendored
Normal file
19
cdk/node_modules/aws-cdk-lib/node_modules/ajv/dist/2019.d.ts
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
import type { AnySchemaObject } from "./types";
|
||||
import AjvCore, { Options } from "./core";
|
||||
export declare class Ajv2019 extends AjvCore {
|
||||
constructor(opts?: Options);
|
||||
_addVocabularies(): void;
|
||||
_addDefaultMetaSchema(): void;
|
||||
defaultMeta(): string | AnySchemaObject | undefined;
|
||||
}
|
||||
export default Ajv2019;
|
||||
export { Format, FormatDefinition, AsyncFormatDefinition, KeywordDefinition, KeywordErrorDefinition, CodeKeywordDefinition, MacroKeywordDefinition, FuncKeywordDefinition, Vocabulary, Schema, SchemaObject, AnySchemaObject, AsyncSchema, AnySchema, ValidateFunction, AsyncValidateFunction, ErrorObject, ErrorNoParams, } from "./types";
|
||||
export { Plugin, Options, CodeOptions, InstanceOptions, Logger, ErrorsTextOptions } from "./core";
|
||||
export { SchemaCxt, SchemaObjCxt } from "./compile";
|
||||
export { KeywordCxt } from "./compile/validate";
|
||||
export { DefinedError } from "./vocabularies/errors";
|
||||
export { JSONType } from "./compile/rules";
|
||||
export { JSONSchemaType } from "./types/json-schema";
|
||||
export { _, str, stringify, nil, Name, Code, CodeGen, CodeGenOptions } from "./compile/codegen";
|
||||
export { default as ValidationError } from "./runtime/validation_error";
|
||||
export { default as MissingRefError } from "./compile/ref_error";
|
||||
61
cdk/node_modules/aws-cdk-lib/node_modules/ajv/dist/2019.js
generated
vendored
Normal file
61
cdk/node_modules/aws-cdk-lib/node_modules/ajv/dist/2019.js
generated
vendored
Normal file
@@ -0,0 +1,61 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.MissingRefError = exports.ValidationError = exports.CodeGen = exports.Name = exports.nil = exports.stringify = exports.str = exports._ = exports.KeywordCxt = exports.Ajv2019 = void 0;
|
||||
const core_1 = require("./core");
|
||||
const draft7_1 = require("./vocabularies/draft7");
|
||||
const dynamic_1 = require("./vocabularies/dynamic");
|
||||
const next_1 = require("./vocabularies/next");
|
||||
const unevaluated_1 = require("./vocabularies/unevaluated");
|
||||
const discriminator_1 = require("./vocabularies/discriminator");
|
||||
const json_schema_2019_09_1 = require("./refs/json-schema-2019-09");
|
||||
const META_SCHEMA_ID = "https://json-schema.org/draft/2019-09/schema";
|
||||
class Ajv2019 extends core_1.default {
|
||||
constructor(opts = {}) {
|
||||
super({
|
||||
...opts,
|
||||
dynamicRef: true,
|
||||
next: true,
|
||||
unevaluated: true,
|
||||
});
|
||||
}
|
||||
_addVocabularies() {
|
||||
super._addVocabularies();
|
||||
this.addVocabulary(dynamic_1.default);
|
||||
draft7_1.default.forEach((v) => this.addVocabulary(v));
|
||||
this.addVocabulary(next_1.default);
|
||||
this.addVocabulary(unevaluated_1.default);
|
||||
if (this.opts.discriminator)
|
||||
this.addKeyword(discriminator_1.default);
|
||||
}
|
||||
_addDefaultMetaSchema() {
|
||||
super._addDefaultMetaSchema();
|
||||
const { $data, meta } = this.opts;
|
||||
if (!meta)
|
||||
return;
|
||||
json_schema_2019_09_1.default.call(this, $data);
|
||||
this.refs["http://json-schema.org/schema"] = META_SCHEMA_ID;
|
||||
}
|
||||
defaultMeta() {
|
||||
return (this.opts.defaultMeta =
|
||||
super.defaultMeta() || (this.getSchema(META_SCHEMA_ID) ? META_SCHEMA_ID : undefined));
|
||||
}
|
||||
}
|
||||
exports.Ajv2019 = Ajv2019;
|
||||
module.exports = exports = Ajv2019;
|
||||
module.exports.Ajv2019 = Ajv2019;
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.default = Ajv2019;
|
||||
var validate_1 = require("./compile/validate");
|
||||
Object.defineProperty(exports, "KeywordCxt", { enumerable: true, get: function () { return validate_1.KeywordCxt; } });
|
||||
var codegen_1 = require("./compile/codegen");
|
||||
Object.defineProperty(exports, "_", { enumerable: true, get: function () { return codegen_1._; } });
|
||||
Object.defineProperty(exports, "str", { enumerable: true, get: function () { return codegen_1.str; } });
|
||||
Object.defineProperty(exports, "stringify", { enumerable: true, get: function () { return codegen_1.stringify; } });
|
||||
Object.defineProperty(exports, "nil", { enumerable: true, get: function () { return codegen_1.nil; } });
|
||||
Object.defineProperty(exports, "Name", { enumerable: true, get: function () { return codegen_1.Name; } });
|
||||
Object.defineProperty(exports, "CodeGen", { enumerable: true, get: function () { return codegen_1.CodeGen; } });
|
||||
var validation_error_1 = require("./runtime/validation_error");
|
||||
Object.defineProperty(exports, "ValidationError", { enumerable: true, get: function () { return validation_error_1.default; } });
|
||||
var ref_error_1 = require("./compile/ref_error");
|
||||
Object.defineProperty(exports, "MissingRefError", { enumerable: true, get: function () { return ref_error_1.default; } });
|
||||
//# sourceMappingURL=2019.js.map
|
||||
1
cdk/node_modules/aws-cdk-lib/node_modules/ajv/dist/2019.js.map
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/node_modules/ajv/dist/2019.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"2019.js","sourceRoot":"","sources":["../lib/2019.ts"],"names":[],"mappings":";;;AACA,iCAAuC;AAEvC,kDAAsD;AACtD,oDAAsD;AACtD,8CAAgD;AAChD,4DAA8D;AAC9D,gEAAwD;AACxD,oEAA0D;AAE1D,MAAM,cAAc,GAAG,8CAA8C,CAAA;AAErE,MAAa,OAAQ,SAAQ,cAAO;IAClC,YAAY,OAAgB,EAAE;QAC5B,KAAK,CAAC;YACJ,GAAG,IAAI;YACP,UAAU,EAAE,IAAI;YAChB,IAAI,EAAE,IAAI;YACV,WAAW,EAAE,IAAI;SAClB,CAAC,CAAA;IACJ,CAAC;IAED,gBAAgB;QACd,KAAK,CAAC,gBAAgB,EAAE,CAAA;QACxB,IAAI,CAAC,aAAa,CAAC,iBAAiB,CAAC,CAAA;QACrC,gBAAkB,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAA;QACxD,IAAI,CAAC,aAAa,CAAC,cAAc,CAAC,CAAA;QAClC,IAAI,CAAC,aAAa,CAAC,qBAAqB,CAAC,CAAA;QACzC,IAAI,IAAI,CAAC,IAAI,CAAC,aAAa;YAAE,IAAI,CAAC,UAAU,CAAC,uBAAa,CAAC,CAAA;IAC7D,CAAC;IAED,qBAAqB;QACnB,KAAK,CAAC,qBAAqB,EAAE,CAAA;QAC7B,MAAM,EAAC,KAAK,EAAE,IAAI,EAAC,GAAG,IAAI,CAAC,IAAI,CAAA;QAC/B,IAAI,CAAC,IAAI;YAAE,OAAM;QACjB,6BAAiB,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,CAAA;QACnC,IAAI,CAAC,IAAI,CAAC,+BAA+B,CAAC,GAAG,cAAc,CAAA;IAC7D,CAAC;IAED,WAAW;QACT,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW;YAC3B,KAAK,CAAC,WAAW,EAAE,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAA;IACzF,CAAC;CACF;AA/BD,0BA+BC;AAED,MAAM,CAAC,OAAO,GAAG,OAAO,GAAG,OAAO,CAAA;AAClC,MAAM,CAAC,OAAO,CAAC,OAAO,GAAG,OAAO,CAAA;AAChC,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAC,KAAK,EAAE,IAAI,EAAC,CAAC,CAAA;AAE3D,kBAAe,OAAO,CAAA;AAyBtB,+CAA6C;AAArC,sGAAA,UAAU,OAAA;AAIlB,6CAA6F;AAArF,4FAAA,CAAC,OAAA;AAAE,8FAAA,GAAG,OAAA;AAAE,oGAAA,SAAS,OAAA;AAAE,8FAAA,GAAG,OAAA;AAAE,+FAAA,IAAI,OAAA;AAAQ,kGAAA,OAAO,OAAA;AACnD,+DAAqE;AAA7D,mHAAA,OAAO,OAAmB;AAClC,iDAA8D;AAAtD,4GAAA,OAAO,OAAmB"}
|
||||
19
cdk/node_modules/aws-cdk-lib/node_modules/ajv/dist/2020.d.ts
generated
vendored
Normal file
19
cdk/node_modules/aws-cdk-lib/node_modules/ajv/dist/2020.d.ts
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
import type { AnySchemaObject } from "./types";
|
||||
import AjvCore, { Options } from "./core";
|
||||
export declare class Ajv2020 extends AjvCore {
|
||||
constructor(opts?: Options);
|
||||
_addVocabularies(): void;
|
||||
_addDefaultMetaSchema(): void;
|
||||
defaultMeta(): string | AnySchemaObject | undefined;
|
||||
}
|
||||
export default Ajv2020;
|
||||
export { Format, FormatDefinition, AsyncFormatDefinition, KeywordDefinition, KeywordErrorDefinition, CodeKeywordDefinition, MacroKeywordDefinition, FuncKeywordDefinition, Vocabulary, Schema, SchemaObject, AnySchemaObject, AsyncSchema, AnySchema, ValidateFunction, AsyncValidateFunction, ErrorObject, ErrorNoParams, } from "./types";
|
||||
export { Plugin, Options, CodeOptions, InstanceOptions, Logger, ErrorsTextOptions } from "./core";
|
||||
export { SchemaCxt, SchemaObjCxt } from "./compile";
|
||||
export { KeywordCxt } from "./compile/validate";
|
||||
export { DefinedError } from "./vocabularies/errors";
|
||||
export { JSONType } from "./compile/rules";
|
||||
export { JSONSchemaType } from "./types/json-schema";
|
||||
export { _, str, stringify, nil, Name, Code, CodeGen, CodeGenOptions } from "./compile/codegen";
|
||||
export { default as ValidationError } from "./runtime/validation_error";
|
||||
export { default as MissingRefError } from "./compile/ref_error";
|
||||
55
cdk/node_modules/aws-cdk-lib/node_modules/ajv/dist/2020.js
generated
vendored
Normal file
55
cdk/node_modules/aws-cdk-lib/node_modules/ajv/dist/2020.js
generated
vendored
Normal file
@@ -0,0 +1,55 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.MissingRefError = exports.ValidationError = exports.CodeGen = exports.Name = exports.nil = exports.stringify = exports.str = exports._ = exports.KeywordCxt = exports.Ajv2020 = void 0;
|
||||
const core_1 = require("./core");
|
||||
const draft2020_1 = require("./vocabularies/draft2020");
|
||||
const discriminator_1 = require("./vocabularies/discriminator");
|
||||
const json_schema_2020_12_1 = require("./refs/json-schema-2020-12");
|
||||
const META_SCHEMA_ID = "https://json-schema.org/draft/2020-12/schema";
|
||||
class Ajv2020 extends core_1.default {
|
||||
constructor(opts = {}) {
|
||||
super({
|
||||
...opts,
|
||||
dynamicRef: true,
|
||||
next: true,
|
||||
unevaluated: true,
|
||||
});
|
||||
}
|
||||
_addVocabularies() {
|
||||
super._addVocabularies();
|
||||
draft2020_1.default.forEach((v) => this.addVocabulary(v));
|
||||
if (this.opts.discriminator)
|
||||
this.addKeyword(discriminator_1.default);
|
||||
}
|
||||
_addDefaultMetaSchema() {
|
||||
super._addDefaultMetaSchema();
|
||||
const { $data, meta } = this.opts;
|
||||
if (!meta)
|
||||
return;
|
||||
json_schema_2020_12_1.default.call(this, $data);
|
||||
this.refs["http://json-schema.org/schema"] = META_SCHEMA_ID;
|
||||
}
|
||||
defaultMeta() {
|
||||
return (this.opts.defaultMeta =
|
||||
super.defaultMeta() || (this.getSchema(META_SCHEMA_ID) ? META_SCHEMA_ID : undefined));
|
||||
}
|
||||
}
|
||||
exports.Ajv2020 = Ajv2020;
|
||||
module.exports = exports = Ajv2020;
|
||||
module.exports.Ajv2020 = Ajv2020;
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.default = Ajv2020;
|
||||
var validate_1 = require("./compile/validate");
|
||||
Object.defineProperty(exports, "KeywordCxt", { enumerable: true, get: function () { return validate_1.KeywordCxt; } });
|
||||
var codegen_1 = require("./compile/codegen");
|
||||
Object.defineProperty(exports, "_", { enumerable: true, get: function () { return codegen_1._; } });
|
||||
Object.defineProperty(exports, "str", { enumerable: true, get: function () { return codegen_1.str; } });
|
||||
Object.defineProperty(exports, "stringify", { enumerable: true, get: function () { return codegen_1.stringify; } });
|
||||
Object.defineProperty(exports, "nil", { enumerable: true, get: function () { return codegen_1.nil; } });
|
||||
Object.defineProperty(exports, "Name", { enumerable: true, get: function () { return codegen_1.Name; } });
|
||||
Object.defineProperty(exports, "CodeGen", { enumerable: true, get: function () { return codegen_1.CodeGen; } });
|
||||
var validation_error_1 = require("./runtime/validation_error");
|
||||
Object.defineProperty(exports, "ValidationError", { enumerable: true, get: function () { return validation_error_1.default; } });
|
||||
var ref_error_1 = require("./compile/ref_error");
|
||||
Object.defineProperty(exports, "MissingRefError", { enumerable: true, get: function () { return ref_error_1.default; } });
|
||||
//# sourceMappingURL=2020.js.map
|
||||
1
cdk/node_modules/aws-cdk-lib/node_modules/ajv/dist/2020.js.map
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/node_modules/ajv/dist/2020.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"2020.js","sourceRoot":"","sources":["../lib/2020.ts"],"names":[],"mappings":";;;AACA,iCAAuC;AAEvC,wDAA4D;AAC5D,gEAAwD;AACxD,oEAA0D;AAE1D,MAAM,cAAc,GAAG,8CAA8C,CAAA;AAErE,MAAa,OAAQ,SAAQ,cAAO;IAClC,YAAY,OAAgB,EAAE;QAC5B,KAAK,CAAC;YACJ,GAAG,IAAI;YACP,UAAU,EAAE,IAAI;YAChB,IAAI,EAAE,IAAI;YACV,WAAW,EAAE,IAAI;SAClB,CAAC,CAAA;IACJ,CAAC;IAED,gBAAgB;QACd,KAAK,CAAC,gBAAgB,EAAE,CAAA;QACxB,mBAAqB,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAA;QAC3D,IAAI,IAAI,CAAC,IAAI,CAAC,aAAa;YAAE,IAAI,CAAC,UAAU,CAAC,uBAAa,CAAC,CAAA;IAC7D,CAAC;IAED,qBAAqB;QACnB,KAAK,CAAC,qBAAqB,EAAE,CAAA;QAC7B,MAAM,EAAC,KAAK,EAAE,IAAI,EAAC,GAAG,IAAI,CAAC,IAAI,CAAA;QAC/B,IAAI,CAAC,IAAI;YAAE,OAAM;QACjB,6BAAiB,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,CAAA;QACnC,IAAI,CAAC,IAAI,CAAC,+BAA+B,CAAC,GAAG,cAAc,CAAA;IAC7D,CAAC;IAED,WAAW;QACT,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW;YAC3B,KAAK,CAAC,WAAW,EAAE,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAA;IACzF,CAAC;CACF;AA5BD,0BA4BC;AAED,MAAM,CAAC,OAAO,GAAG,OAAO,GAAG,OAAO,CAAA;AAClC,MAAM,CAAC,OAAO,CAAC,OAAO,GAAG,OAAO,CAAA;AAChC,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAC,KAAK,EAAE,IAAI,EAAC,CAAC,CAAA;AAE3D,kBAAe,OAAO,CAAA;AAyBtB,+CAA6C;AAArC,sGAAA,UAAU,OAAA;AAIlB,6CAA6F;AAArF,4FAAA,CAAC,OAAA;AAAE,8FAAA,GAAG,OAAA;AAAE,oGAAA,SAAS,OAAA;AAAE,8FAAA,GAAG,OAAA;AAAE,+FAAA,IAAI,OAAA;AAAQ,kGAAA,OAAO,OAAA;AACnD,+DAAqE;AAA7D,mHAAA,OAAO,OAAmB;AAClC,iDAA8D;AAAtD,4GAAA,OAAO,OAAmB"}
|
||||
18
cdk/node_modules/aws-cdk-lib/node_modules/ajv/dist/ajv.d.ts
generated
vendored
Normal file
18
cdk/node_modules/aws-cdk-lib/node_modules/ajv/dist/ajv.d.ts
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
import type { AnySchemaObject } from "./types";
|
||||
import AjvCore from "./core";
|
||||
export declare class Ajv extends AjvCore {
|
||||
_addVocabularies(): void;
|
||||
_addDefaultMetaSchema(): void;
|
||||
defaultMeta(): string | AnySchemaObject | undefined;
|
||||
}
|
||||
export default Ajv;
|
||||
export { Format, FormatDefinition, AsyncFormatDefinition, KeywordDefinition, KeywordErrorDefinition, CodeKeywordDefinition, MacroKeywordDefinition, FuncKeywordDefinition, Vocabulary, Schema, SchemaObject, AnySchemaObject, AsyncSchema, AnySchema, ValidateFunction, AsyncValidateFunction, SchemaValidateFunction, ErrorObject, ErrorNoParams, } from "./types";
|
||||
export { Plugin, Options, CodeOptions, InstanceOptions, Logger, ErrorsTextOptions } from "./core";
|
||||
export { SchemaCxt, SchemaObjCxt } from "./compile";
|
||||
export { KeywordCxt } from "./compile/validate";
|
||||
export { DefinedError } from "./vocabularies/errors";
|
||||
export { JSONType } from "./compile/rules";
|
||||
export { JSONSchemaType } from "./types/json-schema";
|
||||
export { _, str, stringify, nil, Name, Code, CodeGen, CodeGenOptions } from "./compile/codegen";
|
||||
export { default as ValidationError } from "./runtime/validation_error";
|
||||
export { default as MissingRefError } from "./compile/ref_error";
|
||||
50
cdk/node_modules/aws-cdk-lib/node_modules/ajv/dist/ajv.js
generated
vendored
Normal file
50
cdk/node_modules/aws-cdk-lib/node_modules/ajv/dist/ajv.js
generated
vendored
Normal file
@@ -0,0 +1,50 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.MissingRefError = exports.ValidationError = exports.CodeGen = exports.Name = exports.nil = exports.stringify = exports.str = exports._ = exports.KeywordCxt = exports.Ajv = void 0;
|
||||
const core_1 = require("./core");
|
||||
const draft7_1 = require("./vocabularies/draft7");
|
||||
const discriminator_1 = require("./vocabularies/discriminator");
|
||||
const draft7MetaSchema = require("./refs/json-schema-draft-07.json");
|
||||
const META_SUPPORT_DATA = ["/properties"];
|
||||
const META_SCHEMA_ID = "http://json-schema.org/draft-07/schema";
|
||||
class Ajv extends core_1.default {
|
||||
_addVocabularies() {
|
||||
super._addVocabularies();
|
||||
draft7_1.default.forEach((v) => this.addVocabulary(v));
|
||||
if (this.opts.discriminator)
|
||||
this.addKeyword(discriminator_1.default);
|
||||
}
|
||||
_addDefaultMetaSchema() {
|
||||
super._addDefaultMetaSchema();
|
||||
if (!this.opts.meta)
|
||||
return;
|
||||
const metaSchema = this.opts.$data
|
||||
? this.$dataMetaSchema(draft7MetaSchema, META_SUPPORT_DATA)
|
||||
: draft7MetaSchema;
|
||||
this.addMetaSchema(metaSchema, META_SCHEMA_ID, false);
|
||||
this.refs["http://json-schema.org/schema"] = META_SCHEMA_ID;
|
||||
}
|
||||
defaultMeta() {
|
||||
return (this.opts.defaultMeta =
|
||||
super.defaultMeta() || (this.getSchema(META_SCHEMA_ID) ? META_SCHEMA_ID : undefined));
|
||||
}
|
||||
}
|
||||
exports.Ajv = Ajv;
|
||||
module.exports = exports = Ajv;
|
||||
module.exports.Ajv = Ajv;
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.default = Ajv;
|
||||
var validate_1 = require("./compile/validate");
|
||||
Object.defineProperty(exports, "KeywordCxt", { enumerable: true, get: function () { return validate_1.KeywordCxt; } });
|
||||
var codegen_1 = require("./compile/codegen");
|
||||
Object.defineProperty(exports, "_", { enumerable: true, get: function () { return codegen_1._; } });
|
||||
Object.defineProperty(exports, "str", { enumerable: true, get: function () { return codegen_1.str; } });
|
||||
Object.defineProperty(exports, "stringify", { enumerable: true, get: function () { return codegen_1.stringify; } });
|
||||
Object.defineProperty(exports, "nil", { enumerable: true, get: function () { return codegen_1.nil; } });
|
||||
Object.defineProperty(exports, "Name", { enumerable: true, get: function () { return codegen_1.Name; } });
|
||||
Object.defineProperty(exports, "CodeGen", { enumerable: true, get: function () { return codegen_1.CodeGen; } });
|
||||
var validation_error_1 = require("./runtime/validation_error");
|
||||
Object.defineProperty(exports, "ValidationError", { enumerable: true, get: function () { return validation_error_1.default; } });
|
||||
var ref_error_1 = require("./compile/ref_error");
|
||||
Object.defineProperty(exports, "MissingRefError", { enumerable: true, get: function () { return ref_error_1.default; } });
|
||||
//# sourceMappingURL=ajv.js.map
|
||||
1
cdk/node_modules/aws-cdk-lib/node_modules/ajv/dist/ajv.js.map
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/node_modules/ajv/dist/ajv.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"ajv.js","sourceRoot":"","sources":["../lib/ajv.ts"],"names":[],"mappings":";;;AACA,iCAA4B;AAC5B,kDAAsD;AACtD,gEAAwD;AACxD,qEAAoE;AAEpE,MAAM,iBAAiB,GAAG,CAAC,aAAa,CAAC,CAAA;AAEzC,MAAM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AAArC,sGAAA,UAAU,OAAA;AAIlB,6CAA6F;AAArF,4FAAA,CAAC,OAAA;AAAE,8FAAA,GAAG,OAAA;AAAE,oGAAA,SAAS,OAAA;AAAE,8FAAA,GAAG,OAAA;AAAE,+FAAA,IAAI,OAAA;AAAQ,kGAAA,OAAO,OAAA;AACnD,+DAAqE;AAA7D,mHAAA,OAAO,OAAmB;AAClC,iDAA8D;AAAtD,4GAAA,OAAO,OAAmB"}
|
||||
40
cdk/node_modules/aws-cdk-lib/node_modules/ajv/dist/compile/codegen/code.d.ts
generated
vendored
Normal file
40
cdk/node_modules/aws-cdk-lib/node_modules/ajv/dist/compile/codegen/code.d.ts
generated
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
export declare abstract class _CodeOrName {
|
||||
abstract readonly str: string;
|
||||
abstract readonly names: UsedNames;
|
||||
abstract toString(): string;
|
||||
abstract emptyStr(): boolean;
|
||||
}
|
||||
export declare const IDENTIFIER: RegExp;
|
||||
export declare class Name extends _CodeOrName {
|
||||
readonly str: string;
|
||||
constructor(s: string);
|
||||
toString(): string;
|
||||
emptyStr(): boolean;
|
||||
get names(): UsedNames;
|
||||
}
|
||||
export declare class _Code extends _CodeOrName {
|
||||
readonly _items: readonly CodeItem[];
|
||||
private _str?;
|
||||
private _names?;
|
||||
constructor(code: string | readonly CodeItem[]);
|
||||
toString(): string;
|
||||
emptyStr(): boolean;
|
||||
get str(): string;
|
||||
get names(): UsedNames;
|
||||
}
|
||||
export type CodeItem = Name | string | number | boolean | null;
|
||||
export type UsedNames = Record<string, number | undefined>;
|
||||
export type Code = _Code | Name;
|
||||
export type SafeExpr = Code | number | boolean | null;
|
||||
export declare const nil: _Code;
|
||||
type CodeArg = SafeExpr | string | undefined;
|
||||
export declare function _(strs: TemplateStringsArray, ...args: CodeArg[]): _Code;
|
||||
export declare function str(strs: TemplateStringsArray, ...args: (CodeArg | string[])[]): _Code;
|
||||
export declare function addCodeArg(code: CodeItem[], arg: CodeArg | string[]): void;
|
||||
export declare function strConcat(c1: Code, c2: Code): Code;
|
||||
export declare function stringify(x: unknown): Code;
|
||||
export declare function safeStringify(x: unknown): string;
|
||||
export declare function getProperty(key: Code | string | number): Code;
|
||||
export declare function getEsmExportName(key: Code | string | number): Code;
|
||||
export declare function regexpCode(rx: RegExp): Code;
|
||||
export {};
|
||||
156
cdk/node_modules/aws-cdk-lib/node_modules/ajv/dist/compile/codegen/code.js
generated
vendored
Normal file
156
cdk/node_modules/aws-cdk-lib/node_modules/ajv/dist/compile/codegen/code.js
generated
vendored
Normal file
@@ -0,0 +1,156 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.regexpCode = exports.getEsmExportName = exports.getProperty = exports.safeStringify = exports.stringify = exports.strConcat = exports.addCodeArg = exports.str = exports._ = exports.nil = exports._Code = exports.Name = exports.IDENTIFIER = exports._CodeOrName = void 0;
|
||||
// eslint-disable-next-line @typescript-eslint/no-extraneous-class
|
||||
class _CodeOrName {
|
||||
}
|
||||
exports._CodeOrName = _CodeOrName;
|
||||
exports.IDENTIFIER = /^[a-z$_][a-z$_0-9]*$/i;
|
||||
class Name extends _CodeOrName {
|
||||
constructor(s) {
|
||||
super();
|
||||
if (!exports.IDENTIFIER.test(s))
|
||||
throw new Error("CodeGen: name must be a valid identifier");
|
||||
this.str = s;
|
||||
}
|
||||
toString() {
|
||||
return this.str;
|
||||
}
|
||||
emptyStr() {
|
||||
return false;
|
||||
}
|
||||
get names() {
|
||||
return { [this.str]: 1 };
|
||||
}
|
||||
}
|
||||
exports.Name = Name;
|
||||
class _Code extends _CodeOrName {
|
||||
constructor(code) {
|
||||
super();
|
||||
this._items = typeof code === "string" ? [code] : code;
|
||||
}
|
||||
toString() {
|
||||
return this.str;
|
||||
}
|
||||
emptyStr() {
|
||||
if (this._items.length > 1)
|
||||
return false;
|
||||
const item = this._items[0];
|
||||
return item === "" || item === '""';
|
||||
}
|
||||
get str() {
|
||||
var _a;
|
||||
return ((_a = this._str) !== null && _a !== void 0 ? _a : (this._str = this._items.reduce((s, c) => `${s}${c}`, "")));
|
||||
}
|
||||
get names() {
|
||||
var _a;
|
||||
return ((_a = this._names) !== null && _a !== void 0 ? _a : (this._names = this._items.reduce((names, c) => {
|
||||
if (c instanceof Name)
|
||||
names[c.str] = (names[c.str] || 0) + 1;
|
||||
return names;
|
||||
}, {})));
|
||||
}
|
||||
}
|
||||
exports._Code = _Code;
|
||||
exports.nil = new _Code("");
|
||||
function _(strs, ...args) {
|
||||
const code = [strs[0]];
|
||||
let i = 0;
|
||||
while (i < args.length) {
|
||||
addCodeArg(code, args[i]);
|
||||
code.push(strs[++i]);
|
||||
}
|
||||
return new _Code(code);
|
||||
}
|
||||
exports._ = _;
|
||||
const plus = new _Code("+");
|
||||
function str(strs, ...args) {
|
||||
const expr = [safeStringify(strs[0])];
|
||||
let i = 0;
|
||||
while (i < args.length) {
|
||||
expr.push(plus);
|
||||
addCodeArg(expr, args[i]);
|
||||
expr.push(plus, safeStringify(strs[++i]));
|
||||
}
|
||||
optimize(expr);
|
||||
return new _Code(expr);
|
||||
}
|
||||
exports.str = str;
|
||||
function addCodeArg(code, arg) {
|
||||
if (arg instanceof _Code)
|
||||
code.push(...arg._items);
|
||||
else if (arg instanceof Name)
|
||||
code.push(arg);
|
||||
else
|
||||
code.push(interpolate(arg));
|
||||
}
|
||||
exports.addCodeArg = addCodeArg;
|
||||
function optimize(expr) {
|
||||
let i = 1;
|
||||
while (i < expr.length - 1) {
|
||||
if (expr[i] === plus) {
|
||||
const res = mergeExprItems(expr[i - 1], expr[i + 1]);
|
||||
if (res !== undefined) {
|
||||
expr.splice(i - 1, 3, res);
|
||||
continue;
|
||||
}
|
||||
expr[i++] = "+";
|
||||
}
|
||||
i++;
|
||||
}
|
||||
}
|
||||
function mergeExprItems(a, b) {
|
||||
if (b === '""')
|
||||
return a;
|
||||
if (a === '""')
|
||||
return b;
|
||||
if (typeof a == "string") {
|
||||
if (b instanceof Name || a[a.length - 1] !== '"')
|
||||
return;
|
||||
if (typeof b != "string")
|
||||
return `${a.slice(0, -1)}${b}"`;
|
||||
if (b[0] === '"')
|
||||
return a.slice(0, -1) + b.slice(1);
|
||||
return;
|
||||
}
|
||||
if (typeof b == "string" && b[0] === '"' && !(a instanceof Name))
|
||||
return `"${a}${b.slice(1)}`;
|
||||
return;
|
||||
}
|
||||
function strConcat(c1, c2) {
|
||||
return c2.emptyStr() ? c1 : c1.emptyStr() ? c2 : str `${c1}${c2}`;
|
||||
}
|
||||
exports.strConcat = strConcat;
|
||||
// TODO do not allow arrays here
|
||||
function interpolate(x) {
|
||||
return typeof x == "number" || typeof x == "boolean" || x === null
|
||||
? x
|
||||
: safeStringify(Array.isArray(x) ? x.join(",") : x);
|
||||
}
|
||||
function stringify(x) {
|
||||
return new _Code(safeStringify(x));
|
||||
}
|
||||
exports.stringify = stringify;
|
||||
function safeStringify(x) {
|
||||
return JSON.stringify(x)
|
||||
.replace(/\u2028/g, "\\u2028")
|
||||
.replace(/\u2029/g, "\\u2029");
|
||||
}
|
||||
exports.safeStringify = safeStringify;
|
||||
function getProperty(key) {
|
||||
return typeof key == "string" && exports.IDENTIFIER.test(key) ? new _Code(`.${key}`) : _ `[${key}]`;
|
||||
}
|
||||
exports.getProperty = getProperty;
|
||||
//Does best effort to format the name properly
|
||||
function getEsmExportName(key) {
|
||||
if (typeof key == "string" && exports.IDENTIFIER.test(key)) {
|
||||
return new _Code(`${key}`);
|
||||
}
|
||||
throw new Error(`CodeGen: invalid export name: ${key}, use explicit $id name mapping`);
|
||||
}
|
||||
exports.getEsmExportName = getEsmExportName;
|
||||
function regexpCode(rx) {
|
||||
return new _Code(rx.toString());
|
||||
}
|
||||
exports.regexpCode = regexpCode;
|
||||
//# sourceMappingURL=code.js.map
|
||||
1
cdk/node_modules/aws-cdk-lib/node_modules/ajv/dist/compile/codegen/code.js.map
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/node_modules/ajv/dist/compile/codegen/code.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
79
cdk/node_modules/aws-cdk-lib/node_modules/ajv/dist/compile/codegen/index.d.ts
generated
vendored
Normal file
79
cdk/node_modules/aws-cdk-lib/node_modules/ajv/dist/compile/codegen/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,79 @@
|
||||
import type { ScopeValueSets, NameValue, ValueScope, ValueScopeName } from "./scope";
|
||||
import { _Code, Code, Name } from "./code";
|
||||
import { Scope } from "./scope";
|
||||
export { _, str, strConcat, nil, getProperty, stringify, regexpCode, Name, Code } from "./code";
|
||||
export { Scope, ScopeStore, ValueScope, ValueScopeName, ScopeValueSets, varKinds } from "./scope";
|
||||
export type SafeExpr = Code | number | boolean | null;
|
||||
export type Block = Code | (() => void);
|
||||
export declare const operators: {
|
||||
GT: _Code;
|
||||
GTE: _Code;
|
||||
LT: _Code;
|
||||
LTE: _Code;
|
||||
EQ: _Code;
|
||||
NEQ: _Code;
|
||||
NOT: _Code;
|
||||
OR: _Code;
|
||||
AND: _Code;
|
||||
ADD: _Code;
|
||||
};
|
||||
export interface CodeGenOptions {
|
||||
es5?: boolean;
|
||||
lines?: boolean;
|
||||
ownProperties?: boolean;
|
||||
}
|
||||
export declare class CodeGen {
|
||||
readonly _scope: Scope;
|
||||
readonly _extScope: ValueScope;
|
||||
readonly _values: ScopeValueSets;
|
||||
private readonly _nodes;
|
||||
private readonly _blockStarts;
|
||||
private readonly _constants;
|
||||
private readonly opts;
|
||||
constructor(extScope: ValueScope, opts?: CodeGenOptions);
|
||||
toString(): string;
|
||||
name(prefix: string): Name;
|
||||
scopeName(prefix: string): ValueScopeName;
|
||||
scopeValue(prefixOrName: ValueScopeName | string, value: NameValue): Name;
|
||||
getScopeValue(prefix: string, keyOrRef: unknown): ValueScopeName | undefined;
|
||||
scopeRefs(scopeName: Name): Code;
|
||||
scopeCode(): Code;
|
||||
private _def;
|
||||
const(nameOrPrefix: Name | string, rhs: SafeExpr, _constant?: boolean): Name;
|
||||
let(nameOrPrefix: Name | string, rhs?: SafeExpr, _constant?: boolean): Name;
|
||||
var(nameOrPrefix: Name | string, rhs?: SafeExpr, _constant?: boolean): Name;
|
||||
assign(lhs: Code, rhs: SafeExpr, sideEffects?: boolean): CodeGen;
|
||||
add(lhs: Code, rhs: SafeExpr): CodeGen;
|
||||
code(c: Block | SafeExpr): CodeGen;
|
||||
object(...keyValues: [Name | string, SafeExpr | string][]): _Code;
|
||||
if(condition: Code | boolean, thenBody?: Block, elseBody?: Block): CodeGen;
|
||||
elseIf(condition: Code | boolean): CodeGen;
|
||||
else(): CodeGen;
|
||||
endIf(): CodeGen;
|
||||
private _for;
|
||||
for(iteration: Code, forBody?: Block): CodeGen;
|
||||
forRange(nameOrPrefix: Name | string, from: SafeExpr, to: SafeExpr, forBody: (index: Name) => void, varKind?: Code): CodeGen;
|
||||
forOf(nameOrPrefix: Name | string, iterable: Code, forBody: (item: Name) => void, varKind?: Code): CodeGen;
|
||||
forIn(nameOrPrefix: Name | string, obj: Code, forBody: (item: Name) => void, varKind?: Code): CodeGen;
|
||||
endFor(): CodeGen;
|
||||
label(label: Name): CodeGen;
|
||||
break(label?: Code): CodeGen;
|
||||
return(value: Block | SafeExpr): CodeGen;
|
||||
try(tryBody: Block, catchCode?: (e: Name) => void, finallyCode?: Block): CodeGen;
|
||||
throw(error: Code): CodeGen;
|
||||
block(body?: Block, nodeCount?: number): CodeGen;
|
||||
endBlock(nodeCount?: number): CodeGen;
|
||||
func(name: Name, args?: Code, async?: boolean, funcBody?: Block): CodeGen;
|
||||
endFunc(): CodeGen;
|
||||
optimize(n?: number): void;
|
||||
private _leafNode;
|
||||
private _blockNode;
|
||||
private _endBlockNode;
|
||||
private _elseNode;
|
||||
private get _root();
|
||||
private get _currNode();
|
||||
private set _currNode(value);
|
||||
}
|
||||
export declare function not<T extends Code | SafeExpr>(x: T): T;
|
||||
export declare function and(...args: Code[]): Code;
|
||||
export declare function or(...args: Code[]): Code;
|
||||
697
cdk/node_modules/aws-cdk-lib/node_modules/ajv/dist/compile/codegen/index.js
generated
vendored
Normal file
697
cdk/node_modules/aws-cdk-lib/node_modules/ajv/dist/compile/codegen/index.js
generated
vendored
Normal file
@@ -0,0 +1,697 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.or = exports.and = exports.not = exports.CodeGen = exports.operators = exports.varKinds = exports.ValueScopeName = exports.ValueScope = exports.Scope = exports.Name = exports.regexpCode = exports.stringify = exports.getProperty = exports.nil = exports.strConcat = exports.str = exports._ = void 0;
|
||||
const code_1 = require("./code");
|
||||
const scope_1 = require("./scope");
|
||||
var code_2 = require("./code");
|
||||
Object.defineProperty(exports, "_", { enumerable: true, get: function () { return code_2._; } });
|
||||
Object.defineProperty(exports, "str", { enumerable: true, get: function () { return code_2.str; } });
|
||||
Object.defineProperty(exports, "strConcat", { enumerable: true, get: function () { return code_2.strConcat; } });
|
||||
Object.defineProperty(exports, "nil", { enumerable: true, get: function () { return code_2.nil; } });
|
||||
Object.defineProperty(exports, "getProperty", { enumerable: true, get: function () { return code_2.getProperty; } });
|
||||
Object.defineProperty(exports, "stringify", { enumerable: true, get: function () { return code_2.stringify; } });
|
||||
Object.defineProperty(exports, "regexpCode", { enumerable: true, get: function () { return code_2.regexpCode; } });
|
||||
Object.defineProperty(exports, "Name", { enumerable: true, get: function () { return code_2.Name; } });
|
||||
var scope_2 = require("./scope");
|
||||
Object.defineProperty(exports, "Scope", { enumerable: true, get: function () { return scope_2.Scope; } });
|
||||
Object.defineProperty(exports, "ValueScope", { enumerable: true, get: function () { return scope_2.ValueScope; } });
|
||||
Object.defineProperty(exports, "ValueScopeName", { enumerable: true, get: function () { return scope_2.ValueScopeName; } });
|
||||
Object.defineProperty(exports, "varKinds", { enumerable: true, get: function () { return scope_2.varKinds; } });
|
||||
exports.operators = {
|
||||
GT: new code_1._Code(">"),
|
||||
GTE: new code_1._Code(">="),
|
||||
LT: new code_1._Code("<"),
|
||||
LTE: new code_1._Code("<="),
|
||||
EQ: new code_1._Code("==="),
|
||||
NEQ: new code_1._Code("!=="),
|
||||
NOT: new code_1._Code("!"),
|
||||
OR: new code_1._Code("||"),
|
||||
AND: new code_1._Code("&&"),
|
||||
ADD: new code_1._Code("+"),
|
||||
};
|
||||
class Node {
|
||||
optimizeNodes() {
|
||||
return this;
|
||||
}
|
||||
optimizeNames(_names, _constants) {
|
||||
return this;
|
||||
}
|
||||
}
|
||||
class Def extends Node {
|
||||
constructor(varKind, name, rhs) {
|
||||
super();
|
||||
this.varKind = varKind;
|
||||
this.name = name;
|
||||
this.rhs = rhs;
|
||||
}
|
||||
render({ es5, _n }) {
|
||||
const varKind = es5 ? scope_1.varKinds.var : this.varKind;
|
||||
const rhs = this.rhs === undefined ? "" : ` = ${this.rhs}`;
|
||||
return `${varKind} ${this.name}${rhs};` + _n;
|
||||
}
|
||||
optimizeNames(names, constants) {
|
||||
if (!names[this.name.str])
|
||||
return;
|
||||
if (this.rhs)
|
||||
this.rhs = optimizeExpr(this.rhs, names, constants);
|
||||
return this;
|
||||
}
|
||||
get names() {
|
||||
return this.rhs instanceof code_1._CodeOrName ? this.rhs.names : {};
|
||||
}
|
||||
}
|
||||
class Assign extends Node {
|
||||
constructor(lhs, rhs, sideEffects) {
|
||||
super();
|
||||
this.lhs = lhs;
|
||||
this.rhs = rhs;
|
||||
this.sideEffects = sideEffects;
|
||||
}
|
||||
render({ _n }) {
|
||||
return `${this.lhs} = ${this.rhs};` + _n;
|
||||
}
|
||||
optimizeNames(names, constants) {
|
||||
if (this.lhs instanceof code_1.Name && !names[this.lhs.str] && !this.sideEffects)
|
||||
return;
|
||||
this.rhs = optimizeExpr(this.rhs, names, constants);
|
||||
return this;
|
||||
}
|
||||
get names() {
|
||||
const names = this.lhs instanceof code_1.Name ? {} : { ...this.lhs.names };
|
||||
return addExprNames(names, this.rhs);
|
||||
}
|
||||
}
|
||||
class AssignOp extends Assign {
|
||||
constructor(lhs, op, rhs, sideEffects) {
|
||||
super(lhs, rhs, sideEffects);
|
||||
this.op = op;
|
||||
}
|
||||
render({ _n }) {
|
||||
return `${this.lhs} ${this.op}= ${this.rhs};` + _n;
|
||||
}
|
||||
}
|
||||
class Label extends Node {
|
||||
constructor(label) {
|
||||
super();
|
||||
this.label = label;
|
||||
this.names = {};
|
||||
}
|
||||
render({ _n }) {
|
||||
return `${this.label}:` + _n;
|
||||
}
|
||||
}
|
||||
class Break extends Node {
|
||||
constructor(label) {
|
||||
super();
|
||||
this.label = label;
|
||||
this.names = {};
|
||||
}
|
||||
render({ _n }) {
|
||||
const label = this.label ? ` ${this.label}` : "";
|
||||
return `break${label};` + _n;
|
||||
}
|
||||
}
|
||||
class Throw extends Node {
|
||||
constructor(error) {
|
||||
super();
|
||||
this.error = error;
|
||||
}
|
||||
render({ _n }) {
|
||||
return `throw ${this.error};` + _n;
|
||||
}
|
||||
get names() {
|
||||
return this.error.names;
|
||||
}
|
||||
}
|
||||
class AnyCode extends Node {
|
||||
constructor(code) {
|
||||
super();
|
||||
this.code = code;
|
||||
}
|
||||
render({ _n }) {
|
||||
return `${this.code};` + _n;
|
||||
}
|
||||
optimizeNodes() {
|
||||
return `${this.code}` ? this : undefined;
|
||||
}
|
||||
optimizeNames(names, constants) {
|
||||
this.code = optimizeExpr(this.code, names, constants);
|
||||
return this;
|
||||
}
|
||||
get names() {
|
||||
return this.code instanceof code_1._CodeOrName ? this.code.names : {};
|
||||
}
|
||||
}
|
||||
class ParentNode extends Node {
|
||||
constructor(nodes = []) {
|
||||
super();
|
||||
this.nodes = nodes;
|
||||
}
|
||||
render(opts) {
|
||||
return this.nodes.reduce((code, n) => code + n.render(opts), "");
|
||||
}
|
||||
optimizeNodes() {
|
||||
const { nodes } = this;
|
||||
let i = nodes.length;
|
||||
while (i--) {
|
||||
const n = nodes[i].optimizeNodes();
|
||||
if (Array.isArray(n))
|
||||
nodes.splice(i, 1, ...n);
|
||||
else if (n)
|
||||
nodes[i] = n;
|
||||
else
|
||||
nodes.splice(i, 1);
|
||||
}
|
||||
return nodes.length > 0 ? this : undefined;
|
||||
}
|
||||
optimizeNames(names, constants) {
|
||||
const { nodes } = this;
|
||||
let i = nodes.length;
|
||||
while (i--) {
|
||||
// iterating backwards improves 1-pass optimization
|
||||
const n = nodes[i];
|
||||
if (n.optimizeNames(names, constants))
|
||||
continue;
|
||||
subtractNames(names, n.names);
|
||||
nodes.splice(i, 1);
|
||||
}
|
||||
return nodes.length > 0 ? this : undefined;
|
||||
}
|
||||
get names() {
|
||||
return this.nodes.reduce((names, n) => addNames(names, n.names), {});
|
||||
}
|
||||
}
|
||||
class BlockNode extends ParentNode {
|
||||
render(opts) {
|
||||
return "{" + opts._n + super.render(opts) + "}" + opts._n;
|
||||
}
|
||||
}
|
||||
class Root extends ParentNode {
|
||||
}
|
||||
class Else extends BlockNode {
|
||||
}
|
||||
Else.kind = "else";
|
||||
class If extends BlockNode {
|
||||
constructor(condition, nodes) {
|
||||
super(nodes);
|
||||
this.condition = condition;
|
||||
}
|
||||
render(opts) {
|
||||
let code = `if(${this.condition})` + super.render(opts);
|
||||
if (this.else)
|
||||
code += "else " + this.else.render(opts);
|
||||
return code;
|
||||
}
|
||||
optimizeNodes() {
|
||||
super.optimizeNodes();
|
||||
const cond = this.condition;
|
||||
if (cond === true)
|
||||
return this.nodes; // else is ignored here
|
||||
let e = this.else;
|
||||
if (e) {
|
||||
const ns = e.optimizeNodes();
|
||||
e = this.else = Array.isArray(ns) ? new Else(ns) : ns;
|
||||
}
|
||||
if (e) {
|
||||
if (cond === false)
|
||||
return e instanceof If ? e : e.nodes;
|
||||
if (this.nodes.length)
|
||||
return this;
|
||||
return new If(not(cond), e instanceof If ? [e] : e.nodes);
|
||||
}
|
||||
if (cond === false || !this.nodes.length)
|
||||
return undefined;
|
||||
return this;
|
||||
}
|
||||
optimizeNames(names, constants) {
|
||||
var _a;
|
||||
this.else = (_a = this.else) === null || _a === void 0 ? void 0 : _a.optimizeNames(names, constants);
|
||||
if (!(super.optimizeNames(names, constants) || this.else))
|
||||
return;
|
||||
this.condition = optimizeExpr(this.condition, names, constants);
|
||||
return this;
|
||||
}
|
||||
get names() {
|
||||
const names = super.names;
|
||||
addExprNames(names, this.condition);
|
||||
if (this.else)
|
||||
addNames(names, this.else.names);
|
||||
return names;
|
||||
}
|
||||
}
|
||||
If.kind = "if";
|
||||
class For extends BlockNode {
|
||||
}
|
||||
For.kind = "for";
|
||||
class ForLoop extends For {
|
||||
constructor(iteration) {
|
||||
super();
|
||||
this.iteration = iteration;
|
||||
}
|
||||
render(opts) {
|
||||
return `for(${this.iteration})` + super.render(opts);
|
||||
}
|
||||
optimizeNames(names, constants) {
|
||||
if (!super.optimizeNames(names, constants))
|
||||
return;
|
||||
this.iteration = optimizeExpr(this.iteration, names, constants);
|
||||
return this;
|
||||
}
|
||||
get names() {
|
||||
return addNames(super.names, this.iteration.names);
|
||||
}
|
||||
}
|
||||
class ForRange extends For {
|
||||
constructor(varKind, name, from, to) {
|
||||
super();
|
||||
this.varKind = varKind;
|
||||
this.name = name;
|
||||
this.from = from;
|
||||
this.to = to;
|
||||
}
|
||||
render(opts) {
|
||||
const varKind = opts.es5 ? scope_1.varKinds.var : this.varKind;
|
||||
const { name, from, to } = this;
|
||||
return `for(${varKind} ${name}=${from}; ${name}<${to}; ${name}++)` + super.render(opts);
|
||||
}
|
||||
get names() {
|
||||
const names = addExprNames(super.names, this.from);
|
||||
return addExprNames(names, this.to);
|
||||
}
|
||||
}
|
||||
class ForIter extends For {
|
||||
constructor(loop, varKind, name, iterable) {
|
||||
super();
|
||||
this.loop = loop;
|
||||
this.varKind = varKind;
|
||||
this.name = name;
|
||||
this.iterable = iterable;
|
||||
}
|
||||
render(opts) {
|
||||
return `for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})` + super.render(opts);
|
||||
}
|
||||
optimizeNames(names, constants) {
|
||||
if (!super.optimizeNames(names, constants))
|
||||
return;
|
||||
this.iterable = optimizeExpr(this.iterable, names, constants);
|
||||
return this;
|
||||
}
|
||||
get names() {
|
||||
return addNames(super.names, this.iterable.names);
|
||||
}
|
||||
}
|
||||
class Func extends BlockNode {
|
||||
constructor(name, args, async) {
|
||||
super();
|
||||
this.name = name;
|
||||
this.args = args;
|
||||
this.async = async;
|
||||
}
|
||||
render(opts) {
|
||||
const _async = this.async ? "async " : "";
|
||||
return `${_async}function ${this.name}(${this.args})` + super.render(opts);
|
||||
}
|
||||
}
|
||||
Func.kind = "func";
|
||||
class Return extends ParentNode {
|
||||
render(opts) {
|
||||
return "return " + super.render(opts);
|
||||
}
|
||||
}
|
||||
Return.kind = "return";
|
||||
class Try extends BlockNode {
|
||||
render(opts) {
|
||||
let code = "try" + super.render(opts);
|
||||
if (this.catch)
|
||||
code += this.catch.render(opts);
|
||||
if (this.finally)
|
||||
code += this.finally.render(opts);
|
||||
return code;
|
||||
}
|
||||
optimizeNodes() {
|
||||
var _a, _b;
|
||||
super.optimizeNodes();
|
||||
(_a = this.catch) === null || _a === void 0 ? void 0 : _a.optimizeNodes();
|
||||
(_b = this.finally) === null || _b === void 0 ? void 0 : _b.optimizeNodes();
|
||||
return this;
|
||||
}
|
||||
optimizeNames(names, constants) {
|
||||
var _a, _b;
|
||||
super.optimizeNames(names, constants);
|
||||
(_a = this.catch) === null || _a === void 0 ? void 0 : _a.optimizeNames(names, constants);
|
||||
(_b = this.finally) === null || _b === void 0 ? void 0 : _b.optimizeNames(names, constants);
|
||||
return this;
|
||||
}
|
||||
get names() {
|
||||
const names = super.names;
|
||||
if (this.catch)
|
||||
addNames(names, this.catch.names);
|
||||
if (this.finally)
|
||||
addNames(names, this.finally.names);
|
||||
return names;
|
||||
}
|
||||
}
|
||||
class Catch extends BlockNode {
|
||||
constructor(error) {
|
||||
super();
|
||||
this.error = error;
|
||||
}
|
||||
render(opts) {
|
||||
return `catch(${this.error})` + super.render(opts);
|
||||
}
|
||||
}
|
||||
Catch.kind = "catch";
|
||||
class Finally extends BlockNode {
|
||||
render(opts) {
|
||||
return "finally" + super.render(opts);
|
||||
}
|
||||
}
|
||||
Finally.kind = "finally";
|
||||
class CodeGen {
|
||||
constructor(extScope, opts = {}) {
|
||||
this._values = {};
|
||||
this._blockStarts = [];
|
||||
this._constants = {};
|
||||
this.opts = { ...opts, _n: opts.lines ? "\n" : "" };
|
||||
this._extScope = extScope;
|
||||
this._scope = new scope_1.Scope({ parent: extScope });
|
||||
this._nodes = [new Root()];
|
||||
}
|
||||
toString() {
|
||||
return this._root.render(this.opts);
|
||||
}
|
||||
// returns unique name in the internal scope
|
||||
name(prefix) {
|
||||
return this._scope.name(prefix);
|
||||
}
|
||||
// reserves unique name in the external scope
|
||||
scopeName(prefix) {
|
||||
return this._extScope.name(prefix);
|
||||
}
|
||||
// reserves unique name in the external scope and assigns value to it
|
||||
scopeValue(prefixOrName, value) {
|
||||
const name = this._extScope.value(prefixOrName, value);
|
||||
const vs = this._values[name.prefix] || (this._values[name.prefix] = new Set());
|
||||
vs.add(name);
|
||||
return name;
|
||||
}
|
||||
getScopeValue(prefix, keyOrRef) {
|
||||
return this._extScope.getValue(prefix, keyOrRef);
|
||||
}
|
||||
// return code that assigns values in the external scope to the names that are used internally
|
||||
// (same names that were returned by gen.scopeName or gen.scopeValue)
|
||||
scopeRefs(scopeName) {
|
||||
return this._extScope.scopeRefs(scopeName, this._values);
|
||||
}
|
||||
scopeCode() {
|
||||
return this._extScope.scopeCode(this._values);
|
||||
}
|
||||
_def(varKind, nameOrPrefix, rhs, constant) {
|
||||
const name = this._scope.toName(nameOrPrefix);
|
||||
if (rhs !== undefined && constant)
|
||||
this._constants[name.str] = rhs;
|
||||
this._leafNode(new Def(varKind, name, rhs));
|
||||
return name;
|
||||
}
|
||||
// `const` declaration (`var` in es5 mode)
|
||||
const(nameOrPrefix, rhs, _constant) {
|
||||
return this._def(scope_1.varKinds.const, nameOrPrefix, rhs, _constant);
|
||||
}
|
||||
// `let` declaration with optional assignment (`var` in es5 mode)
|
||||
let(nameOrPrefix, rhs, _constant) {
|
||||
return this._def(scope_1.varKinds.let, nameOrPrefix, rhs, _constant);
|
||||
}
|
||||
// `var` declaration with optional assignment
|
||||
var(nameOrPrefix, rhs, _constant) {
|
||||
return this._def(scope_1.varKinds.var, nameOrPrefix, rhs, _constant);
|
||||
}
|
||||
// assignment code
|
||||
assign(lhs, rhs, sideEffects) {
|
||||
return this._leafNode(new Assign(lhs, rhs, sideEffects));
|
||||
}
|
||||
// `+=` code
|
||||
add(lhs, rhs) {
|
||||
return this._leafNode(new AssignOp(lhs, exports.operators.ADD, rhs));
|
||||
}
|
||||
// appends passed SafeExpr to code or executes Block
|
||||
code(c) {
|
||||
if (typeof c == "function")
|
||||
c();
|
||||
else if (c !== code_1.nil)
|
||||
this._leafNode(new AnyCode(c));
|
||||
return this;
|
||||
}
|
||||
// returns code for object literal for the passed argument list of key-value pairs
|
||||
object(...keyValues) {
|
||||
const code = ["{"];
|
||||
for (const [key, value] of keyValues) {
|
||||
if (code.length > 1)
|
||||
code.push(",");
|
||||
code.push(key);
|
||||
if (key !== value || this.opts.es5) {
|
||||
code.push(":");
|
||||
(0, code_1.addCodeArg)(code, value);
|
||||
}
|
||||
}
|
||||
code.push("}");
|
||||
return new code_1._Code(code);
|
||||
}
|
||||
// `if` clause (or statement if `thenBody` and, optionally, `elseBody` are passed)
|
||||
if(condition, thenBody, elseBody) {
|
||||
this._blockNode(new If(condition));
|
||||
if (thenBody && elseBody) {
|
||||
this.code(thenBody).else().code(elseBody).endIf();
|
||||
}
|
||||
else if (thenBody) {
|
||||
this.code(thenBody).endIf();
|
||||
}
|
||||
else if (elseBody) {
|
||||
throw new Error('CodeGen: "else" body without "then" body');
|
||||
}
|
||||
return this;
|
||||
}
|
||||
// `else if` clause - invalid without `if` or after `else` clauses
|
||||
elseIf(condition) {
|
||||
return this._elseNode(new If(condition));
|
||||
}
|
||||
// `else` clause - only valid after `if` or `else if` clauses
|
||||
else() {
|
||||
return this._elseNode(new Else());
|
||||
}
|
||||
// end `if` statement (needed if gen.if was used only with condition)
|
||||
endIf() {
|
||||
return this._endBlockNode(If, Else);
|
||||
}
|
||||
_for(node, forBody) {
|
||||
this._blockNode(node);
|
||||
if (forBody)
|
||||
this.code(forBody).endFor();
|
||||
return this;
|
||||
}
|
||||
// a generic `for` clause (or statement if `forBody` is passed)
|
||||
for(iteration, forBody) {
|
||||
return this._for(new ForLoop(iteration), forBody);
|
||||
}
|
||||
// `for` statement for a range of values
|
||||
forRange(nameOrPrefix, from, to, forBody, varKind = this.opts.es5 ? scope_1.varKinds.var : scope_1.varKinds.let) {
|
||||
const name = this._scope.toName(nameOrPrefix);
|
||||
return this._for(new ForRange(varKind, name, from, to), () => forBody(name));
|
||||
}
|
||||
// `for-of` statement (in es5 mode replace with a normal for loop)
|
||||
forOf(nameOrPrefix, iterable, forBody, varKind = scope_1.varKinds.const) {
|
||||
const name = this._scope.toName(nameOrPrefix);
|
||||
if (this.opts.es5) {
|
||||
const arr = iterable instanceof code_1.Name ? iterable : this.var("_arr", iterable);
|
||||
return this.forRange("_i", 0, (0, code_1._) `${arr}.length`, (i) => {
|
||||
this.var(name, (0, code_1._) `${arr}[${i}]`);
|
||||
forBody(name);
|
||||
});
|
||||
}
|
||||
return this._for(new ForIter("of", varKind, name, iterable), () => forBody(name));
|
||||
}
|
||||
// `for-in` statement.
|
||||
// With option `ownProperties` replaced with a `for-of` loop for object keys
|
||||
forIn(nameOrPrefix, obj, forBody, varKind = this.opts.es5 ? scope_1.varKinds.var : scope_1.varKinds.const) {
|
||||
if (this.opts.ownProperties) {
|
||||
return this.forOf(nameOrPrefix, (0, code_1._) `Object.keys(${obj})`, forBody);
|
||||
}
|
||||
const name = this._scope.toName(nameOrPrefix);
|
||||
return this._for(new ForIter("in", varKind, name, obj), () => forBody(name));
|
||||
}
|
||||
// end `for` loop
|
||||
endFor() {
|
||||
return this._endBlockNode(For);
|
||||
}
|
||||
// `label` statement
|
||||
label(label) {
|
||||
return this._leafNode(new Label(label));
|
||||
}
|
||||
// `break` statement
|
||||
break(label) {
|
||||
return this._leafNode(new Break(label));
|
||||
}
|
||||
// `return` statement
|
||||
return(value) {
|
||||
const node = new Return();
|
||||
this._blockNode(node);
|
||||
this.code(value);
|
||||
if (node.nodes.length !== 1)
|
||||
throw new Error('CodeGen: "return" should have one node');
|
||||
return this._endBlockNode(Return);
|
||||
}
|
||||
// `try` statement
|
||||
try(tryBody, catchCode, finallyCode) {
|
||||
if (!catchCode && !finallyCode)
|
||||
throw new Error('CodeGen: "try" without "catch" and "finally"');
|
||||
const node = new Try();
|
||||
this._blockNode(node);
|
||||
this.code(tryBody);
|
||||
if (catchCode) {
|
||||
const error = this.name("e");
|
||||
this._currNode = node.catch = new Catch(error);
|
||||
catchCode(error);
|
||||
}
|
||||
if (finallyCode) {
|
||||
this._currNode = node.finally = new Finally();
|
||||
this.code(finallyCode);
|
||||
}
|
||||
return this._endBlockNode(Catch, Finally);
|
||||
}
|
||||
// `throw` statement
|
||||
throw(error) {
|
||||
return this._leafNode(new Throw(error));
|
||||
}
|
||||
// start self-balancing block
|
||||
block(body, nodeCount) {
|
||||
this._blockStarts.push(this._nodes.length);
|
||||
if (body)
|
||||
this.code(body).endBlock(nodeCount);
|
||||
return this;
|
||||
}
|
||||
// end the current self-balancing block
|
||||
endBlock(nodeCount) {
|
||||
const len = this._blockStarts.pop();
|
||||
if (len === undefined)
|
||||
throw new Error("CodeGen: not in self-balancing block");
|
||||
const toClose = this._nodes.length - len;
|
||||
if (toClose < 0 || (nodeCount !== undefined && toClose !== nodeCount)) {
|
||||
throw new Error(`CodeGen: wrong number of nodes: ${toClose} vs ${nodeCount} expected`);
|
||||
}
|
||||
this._nodes.length = len;
|
||||
return this;
|
||||
}
|
||||
// `function` heading (or definition if funcBody is passed)
|
||||
func(name, args = code_1.nil, async, funcBody) {
|
||||
this._blockNode(new Func(name, args, async));
|
||||
if (funcBody)
|
||||
this.code(funcBody).endFunc();
|
||||
return this;
|
||||
}
|
||||
// end function definition
|
||||
endFunc() {
|
||||
return this._endBlockNode(Func);
|
||||
}
|
||||
optimize(n = 1) {
|
||||
while (n-- > 0) {
|
||||
this._root.optimizeNodes();
|
||||
this._root.optimizeNames(this._root.names, this._constants);
|
||||
}
|
||||
}
|
||||
_leafNode(node) {
|
||||
this._currNode.nodes.push(node);
|
||||
return this;
|
||||
}
|
||||
_blockNode(node) {
|
||||
this._currNode.nodes.push(node);
|
||||
this._nodes.push(node);
|
||||
}
|
||||
_endBlockNode(N1, N2) {
|
||||
const n = this._currNode;
|
||||
if (n instanceof N1 || (N2 && n instanceof N2)) {
|
||||
this._nodes.pop();
|
||||
return this;
|
||||
}
|
||||
throw new Error(`CodeGen: not in block "${N2 ? `${N1.kind}/${N2.kind}` : N1.kind}"`);
|
||||
}
|
||||
_elseNode(node) {
|
||||
const n = this._currNode;
|
||||
if (!(n instanceof If)) {
|
||||
throw new Error('CodeGen: "else" without "if"');
|
||||
}
|
||||
this._currNode = n.else = node;
|
||||
return this;
|
||||
}
|
||||
get _root() {
|
||||
return this._nodes[0];
|
||||
}
|
||||
get _currNode() {
|
||||
const ns = this._nodes;
|
||||
return ns[ns.length - 1];
|
||||
}
|
||||
set _currNode(node) {
|
||||
const ns = this._nodes;
|
||||
ns[ns.length - 1] = node;
|
||||
}
|
||||
}
|
||||
exports.CodeGen = CodeGen;
|
||||
function addNames(names, from) {
|
||||
for (const n in from)
|
||||
names[n] = (names[n] || 0) + (from[n] || 0);
|
||||
return names;
|
||||
}
|
||||
function addExprNames(names, from) {
|
||||
return from instanceof code_1._CodeOrName ? addNames(names, from.names) : names;
|
||||
}
|
||||
function optimizeExpr(expr, names, constants) {
|
||||
if (expr instanceof code_1.Name)
|
||||
return replaceName(expr);
|
||||
if (!canOptimize(expr))
|
||||
return expr;
|
||||
return new code_1._Code(expr._items.reduce((items, c) => {
|
||||
if (c instanceof code_1.Name)
|
||||
c = replaceName(c);
|
||||
if (c instanceof code_1._Code)
|
||||
items.push(...c._items);
|
||||
else
|
||||
items.push(c);
|
||||
return items;
|
||||
}, []));
|
||||
function replaceName(n) {
|
||||
const c = constants[n.str];
|
||||
if (c === undefined || names[n.str] !== 1)
|
||||
return n;
|
||||
delete names[n.str];
|
||||
return c;
|
||||
}
|
||||
function canOptimize(e) {
|
||||
return (e instanceof code_1._Code &&
|
||||
e._items.some((c) => c instanceof code_1.Name && names[c.str] === 1 && constants[c.str] !== undefined));
|
||||
}
|
||||
}
|
||||
function subtractNames(names, from) {
|
||||
for (const n in from)
|
||||
names[n] = (names[n] || 0) - (from[n] || 0);
|
||||
}
|
||||
function not(x) {
|
||||
return typeof x == "boolean" || typeof x == "number" || x === null ? !x : (0, code_1._) `!${par(x)}`;
|
||||
}
|
||||
exports.not = not;
|
||||
const andCode = mappend(exports.operators.AND);
|
||||
// boolean AND (&&) expression with the passed arguments
|
||||
function and(...args) {
|
||||
return args.reduce(andCode);
|
||||
}
|
||||
exports.and = and;
|
||||
const orCode = mappend(exports.operators.OR);
|
||||
// boolean OR (||) expression with the passed arguments
|
||||
function or(...args) {
|
||||
return args.reduce(orCode);
|
||||
}
|
||||
exports.or = or;
|
||||
function mappend(op) {
|
||||
return (x, y) => (x === code_1.nil ? y : y === code_1.nil ? x : (0, code_1._) `${par(x)} ${op} ${par(y)}`);
|
||||
}
|
||||
function par(x) {
|
||||
return x instanceof code_1.Name ? x : (0, code_1._) `(${x})`;
|
||||
}
|
||||
//# sourceMappingURL=index.js.map
|
||||
1
cdk/node_modules/aws-cdk-lib/node_modules/ajv/dist/compile/codegen/index.js.map
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/node_modules/ajv/dist/compile/codegen/index.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
79
cdk/node_modules/aws-cdk-lib/node_modules/ajv/dist/compile/codegen/scope.d.ts
generated
vendored
Normal file
79
cdk/node_modules/aws-cdk-lib/node_modules/ajv/dist/compile/codegen/scope.d.ts
generated
vendored
Normal file
@@ -0,0 +1,79 @@
|
||||
import { Code, Name } from "./code";
|
||||
interface NameGroup {
|
||||
prefix: string;
|
||||
index: number;
|
||||
}
|
||||
export interface NameValue {
|
||||
ref: ValueReference;
|
||||
key?: unknown;
|
||||
code?: Code;
|
||||
}
|
||||
export type ValueReference = unknown;
|
||||
interface ScopeOptions {
|
||||
prefixes?: Set<string>;
|
||||
parent?: Scope;
|
||||
}
|
||||
interface ValueScopeOptions extends ScopeOptions {
|
||||
scope: ScopeStore;
|
||||
es5?: boolean;
|
||||
lines?: boolean;
|
||||
}
|
||||
export type ScopeStore = Record<string, ValueReference[] | undefined>;
|
||||
type ScopeValues = {
|
||||
[Prefix in string]?: Map<unknown, ValueScopeName>;
|
||||
};
|
||||
export type ScopeValueSets = {
|
||||
[Prefix in string]?: Set<ValueScopeName>;
|
||||
};
|
||||
export declare enum UsedValueState {
|
||||
Started = 0,
|
||||
Completed = 1
|
||||
}
|
||||
export type UsedScopeValues = {
|
||||
[Prefix in string]?: Map<ValueScopeName, UsedValueState | undefined>;
|
||||
};
|
||||
export declare const varKinds: {
|
||||
const: Name;
|
||||
let: Name;
|
||||
var: Name;
|
||||
};
|
||||
export declare class Scope {
|
||||
protected readonly _names: {
|
||||
[Prefix in string]?: NameGroup;
|
||||
};
|
||||
protected readonly _prefixes?: Set<string>;
|
||||
protected readonly _parent?: Scope;
|
||||
constructor({ prefixes, parent }?: ScopeOptions);
|
||||
toName(nameOrPrefix: Name | string): Name;
|
||||
name(prefix: string): Name;
|
||||
protected _newName(prefix: string): string;
|
||||
private _nameGroup;
|
||||
}
|
||||
interface ScopePath {
|
||||
property: string;
|
||||
itemIndex: number;
|
||||
}
|
||||
export declare class ValueScopeName extends Name {
|
||||
readonly prefix: string;
|
||||
value?: NameValue;
|
||||
scopePath?: Code;
|
||||
constructor(prefix: string, nameStr: string);
|
||||
setValue(value: NameValue, { property, itemIndex }: ScopePath): void;
|
||||
}
|
||||
interface VSOptions extends ValueScopeOptions {
|
||||
_n: Code;
|
||||
}
|
||||
export declare class ValueScope extends Scope {
|
||||
protected readonly _values: ScopeValues;
|
||||
protected readonly _scope: ScopeStore;
|
||||
readonly opts: VSOptions;
|
||||
constructor(opts: ValueScopeOptions);
|
||||
get(): ScopeStore;
|
||||
name(prefix: string): ValueScopeName;
|
||||
value(nameOrPrefix: ValueScopeName | string, value: NameValue): ValueScopeName;
|
||||
getValue(prefix: string, keyOrRef: unknown): ValueScopeName | undefined;
|
||||
scopeRefs(scopeName: Name, values?: ScopeValues | ScopeValueSets): Code;
|
||||
scopeCode(values?: ScopeValues | ScopeValueSets, usedValues?: UsedScopeValues, getCode?: (n: ValueScopeName) => Code | undefined): Code;
|
||||
private _reduceValues;
|
||||
}
|
||||
export {};
|
||||
143
cdk/node_modules/aws-cdk-lib/node_modules/ajv/dist/compile/codegen/scope.js
generated
vendored
Normal file
143
cdk/node_modules/aws-cdk-lib/node_modules/ajv/dist/compile/codegen/scope.js
generated
vendored
Normal file
@@ -0,0 +1,143 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.ValueScope = exports.ValueScopeName = exports.Scope = exports.varKinds = exports.UsedValueState = void 0;
|
||||
const code_1 = require("./code");
|
||||
class ValueError extends Error {
|
||||
constructor(name) {
|
||||
super(`CodeGen: "code" for ${name} not defined`);
|
||||
this.value = name.value;
|
||||
}
|
||||
}
|
||||
var UsedValueState;
|
||||
(function (UsedValueState) {
|
||||
UsedValueState[UsedValueState["Started"] = 0] = "Started";
|
||||
UsedValueState[UsedValueState["Completed"] = 1] = "Completed";
|
||||
})(UsedValueState || (exports.UsedValueState = UsedValueState = {}));
|
||||
exports.varKinds = {
|
||||
const: new code_1.Name("const"),
|
||||
let: new code_1.Name("let"),
|
||||
var: new code_1.Name("var"),
|
||||
};
|
||||
class Scope {
|
||||
constructor({ prefixes, parent } = {}) {
|
||||
this._names = {};
|
||||
this._prefixes = prefixes;
|
||||
this._parent = parent;
|
||||
}
|
||||
toName(nameOrPrefix) {
|
||||
return nameOrPrefix instanceof code_1.Name ? nameOrPrefix : this.name(nameOrPrefix);
|
||||
}
|
||||
name(prefix) {
|
||||
return new code_1.Name(this._newName(prefix));
|
||||
}
|
||||
_newName(prefix) {
|
||||
const ng = this._names[prefix] || this._nameGroup(prefix);
|
||||
return `${prefix}${ng.index++}`;
|
||||
}
|
||||
_nameGroup(prefix) {
|
||||
var _a, _b;
|
||||
if (((_b = (_a = this._parent) === null || _a === void 0 ? void 0 : _a._prefixes) === null || _b === void 0 ? void 0 : _b.has(prefix)) || (this._prefixes && !this._prefixes.has(prefix))) {
|
||||
throw new Error(`CodeGen: prefix "${prefix}" is not allowed in this scope`);
|
||||
}
|
||||
return (this._names[prefix] = { prefix, index: 0 });
|
||||
}
|
||||
}
|
||||
exports.Scope = Scope;
|
||||
class ValueScopeName extends code_1.Name {
|
||||
constructor(prefix, nameStr) {
|
||||
super(nameStr);
|
||||
this.prefix = prefix;
|
||||
}
|
||||
setValue(value, { property, itemIndex }) {
|
||||
this.value = value;
|
||||
this.scopePath = (0, code_1._) `.${new code_1.Name(property)}[${itemIndex}]`;
|
||||
}
|
||||
}
|
||||
exports.ValueScopeName = ValueScopeName;
|
||||
const line = (0, code_1._) `\n`;
|
||||
class ValueScope extends Scope {
|
||||
constructor(opts) {
|
||||
super(opts);
|
||||
this._values = {};
|
||||
this._scope = opts.scope;
|
||||
this.opts = { ...opts, _n: opts.lines ? line : code_1.nil };
|
||||
}
|
||||
get() {
|
||||
return this._scope;
|
||||
}
|
||||
name(prefix) {
|
||||
return new ValueScopeName(prefix, this._newName(prefix));
|
||||
}
|
||||
value(nameOrPrefix, value) {
|
||||
var _a;
|
||||
if (value.ref === undefined)
|
||||
throw new Error("CodeGen: ref must be passed in value");
|
||||
const name = this.toName(nameOrPrefix);
|
||||
const { prefix } = name;
|
||||
const valueKey = (_a = value.key) !== null && _a !== void 0 ? _a : value.ref;
|
||||
let vs = this._values[prefix];
|
||||
if (vs) {
|
||||
const _name = vs.get(valueKey);
|
||||
if (_name)
|
||||
return _name;
|
||||
}
|
||||
else {
|
||||
vs = this._values[prefix] = new Map();
|
||||
}
|
||||
vs.set(valueKey, name);
|
||||
const s = this._scope[prefix] || (this._scope[prefix] = []);
|
||||
const itemIndex = s.length;
|
||||
s[itemIndex] = value.ref;
|
||||
name.setValue(value, { property: prefix, itemIndex });
|
||||
return name;
|
||||
}
|
||||
getValue(prefix, keyOrRef) {
|
||||
const vs = this._values[prefix];
|
||||
if (!vs)
|
||||
return;
|
||||
return vs.get(keyOrRef);
|
||||
}
|
||||
scopeRefs(scopeName, values = this._values) {
|
||||
return this._reduceValues(values, (name) => {
|
||||
if (name.scopePath === undefined)
|
||||
throw new Error(`CodeGen: name "${name}" has no value`);
|
||||
return (0, code_1._) `${scopeName}${name.scopePath}`;
|
||||
});
|
||||
}
|
||||
scopeCode(values = this._values, usedValues, getCode) {
|
||||
return this._reduceValues(values, (name) => {
|
||||
if (name.value === undefined)
|
||||
throw new Error(`CodeGen: name "${name}" has no value`);
|
||||
return name.value.code;
|
||||
}, usedValues, getCode);
|
||||
}
|
||||
_reduceValues(values, valueCode, usedValues = {}, getCode) {
|
||||
let code = code_1.nil;
|
||||
for (const prefix in values) {
|
||||
const vs = values[prefix];
|
||||
if (!vs)
|
||||
continue;
|
||||
const nameSet = (usedValues[prefix] = usedValues[prefix] || new Map());
|
||||
vs.forEach((name) => {
|
||||
if (nameSet.has(name))
|
||||
return;
|
||||
nameSet.set(name, UsedValueState.Started);
|
||||
let c = valueCode(name);
|
||||
if (c) {
|
||||
const def = this.opts.es5 ? exports.varKinds.var : exports.varKinds.const;
|
||||
code = (0, code_1._) `${code}${def} ${name} = ${c};${this.opts._n}`;
|
||||
}
|
||||
else if ((c = getCode === null || getCode === void 0 ? void 0 : getCode(name))) {
|
||||
code = (0, code_1._) `${code}${c}${this.opts._n}`;
|
||||
}
|
||||
else {
|
||||
throw new ValueError(name);
|
||||
}
|
||||
nameSet.set(name, UsedValueState.Completed);
|
||||
});
|
||||
}
|
||||
return code;
|
||||
}
|
||||
}
|
||||
exports.ValueScope = ValueScope;
|
||||
//# sourceMappingURL=scope.js.map
|
||||
1
cdk/node_modules/aws-cdk-lib/node_modules/ajv/dist/compile/codegen/scope.js.map
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/node_modules/ajv/dist/compile/codegen/scope.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
13
cdk/node_modules/aws-cdk-lib/node_modules/ajv/dist/compile/errors.d.ts
generated
vendored
Normal file
13
cdk/node_modules/aws-cdk-lib/node_modules/ajv/dist/compile/errors.d.ts
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
import type { KeywordErrorCxt, KeywordErrorDefinition } from "../types";
|
||||
import { CodeGen, Code, Name } from "./codegen";
|
||||
export declare const keywordError: KeywordErrorDefinition;
|
||||
export declare const keyword$DataError: KeywordErrorDefinition;
|
||||
export interface ErrorPaths {
|
||||
instancePath?: Code;
|
||||
schemaPath?: string;
|
||||
parentSchema?: boolean;
|
||||
}
|
||||
export declare function reportError(cxt: KeywordErrorCxt, error?: KeywordErrorDefinition, errorPaths?: ErrorPaths, overrideAllErrors?: boolean): void;
|
||||
export declare function reportExtraError(cxt: KeywordErrorCxt, error?: KeywordErrorDefinition, errorPaths?: ErrorPaths): void;
|
||||
export declare function resetErrorsCount(gen: CodeGen, errsCount: Name): void;
|
||||
export declare function extendErrors({ gen, keyword, schemaValue, data, errsCount, it, }: KeywordErrorCxt): void;
|
||||
123
cdk/node_modules/aws-cdk-lib/node_modules/ajv/dist/compile/errors.js
generated
vendored
Normal file
123
cdk/node_modules/aws-cdk-lib/node_modules/ajv/dist/compile/errors.js
generated
vendored
Normal file
@@ -0,0 +1,123 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.extendErrors = exports.resetErrorsCount = exports.reportExtraError = exports.reportError = exports.keyword$DataError = exports.keywordError = void 0;
|
||||
const codegen_1 = require("./codegen");
|
||||
const util_1 = require("./util");
|
||||
const names_1 = require("./names");
|
||||
exports.keywordError = {
|
||||
message: ({ keyword }) => (0, codegen_1.str) `must pass "${keyword}" keyword validation`,
|
||||
};
|
||||
exports.keyword$DataError = {
|
||||
message: ({ keyword, schemaType }) => schemaType
|
||||
? (0, codegen_1.str) `"${keyword}" keyword must be ${schemaType} ($data)`
|
||||
: (0, codegen_1.str) `"${keyword}" keyword is invalid ($data)`,
|
||||
};
|
||||
function reportError(cxt, error = exports.keywordError, errorPaths, overrideAllErrors) {
|
||||
const { it } = cxt;
|
||||
const { gen, compositeRule, allErrors } = it;
|
||||
const errObj = errorObjectCode(cxt, error, errorPaths);
|
||||
if (overrideAllErrors !== null && overrideAllErrors !== void 0 ? overrideAllErrors : (compositeRule || allErrors)) {
|
||||
addError(gen, errObj);
|
||||
}
|
||||
else {
|
||||
returnErrors(it, (0, codegen_1._) `[${errObj}]`);
|
||||
}
|
||||
}
|
||||
exports.reportError = reportError;
|
||||
function reportExtraError(cxt, error = exports.keywordError, errorPaths) {
|
||||
const { it } = cxt;
|
||||
const { gen, compositeRule, allErrors } = it;
|
||||
const errObj = errorObjectCode(cxt, error, errorPaths);
|
||||
addError(gen, errObj);
|
||||
if (!(compositeRule || allErrors)) {
|
||||
returnErrors(it, names_1.default.vErrors);
|
||||
}
|
||||
}
|
||||
exports.reportExtraError = reportExtraError;
|
||||
function resetErrorsCount(gen, errsCount) {
|
||||
gen.assign(names_1.default.errors, errsCount);
|
||||
gen.if((0, codegen_1._) `${names_1.default.vErrors} !== null`, () => gen.if(errsCount, () => gen.assign((0, codegen_1._) `${names_1.default.vErrors}.length`, errsCount), () => gen.assign(names_1.default.vErrors, null)));
|
||||
}
|
||||
exports.resetErrorsCount = resetErrorsCount;
|
||||
function extendErrors({ gen, keyword, schemaValue, data, errsCount, it, }) {
|
||||
/* istanbul ignore if */
|
||||
if (errsCount === undefined)
|
||||
throw new Error("ajv implementation error");
|
||||
const err = gen.name("err");
|
||||
gen.forRange("i", errsCount, names_1.default.errors, (i) => {
|
||||
gen.const(err, (0, codegen_1._) `${names_1.default.vErrors}[${i}]`);
|
||||
gen.if((0, codegen_1._) `${err}.instancePath === undefined`, () => gen.assign((0, codegen_1._) `${err}.instancePath`, (0, codegen_1.strConcat)(names_1.default.instancePath, it.errorPath)));
|
||||
gen.assign((0, codegen_1._) `${err}.schemaPath`, (0, codegen_1.str) `${it.errSchemaPath}/${keyword}`);
|
||||
if (it.opts.verbose) {
|
||||
gen.assign((0, codegen_1._) `${err}.schema`, schemaValue);
|
||||
gen.assign((0, codegen_1._) `${err}.data`, data);
|
||||
}
|
||||
});
|
||||
}
|
||||
exports.extendErrors = extendErrors;
|
||||
function addError(gen, errObj) {
|
||||
const err = gen.const("err", errObj);
|
||||
gen.if((0, codegen_1._) `${names_1.default.vErrors} === null`, () => gen.assign(names_1.default.vErrors, (0, codegen_1._) `[${err}]`), (0, codegen_1._) `${names_1.default.vErrors}.push(${err})`);
|
||||
gen.code((0, codegen_1._) `${names_1.default.errors}++`);
|
||||
}
|
||||
function returnErrors(it, errs) {
|
||||
const { gen, validateName, schemaEnv } = it;
|
||||
if (schemaEnv.$async) {
|
||||
gen.throw((0, codegen_1._) `new ${it.ValidationError}(${errs})`);
|
||||
}
|
||||
else {
|
||||
gen.assign((0, codegen_1._) `${validateName}.errors`, errs);
|
||||
gen.return(false);
|
||||
}
|
||||
}
|
||||
const E = {
|
||||
keyword: new codegen_1.Name("keyword"),
|
||||
schemaPath: new codegen_1.Name("schemaPath"), // also used in JTD errors
|
||||
params: new codegen_1.Name("params"),
|
||||
propertyName: new codegen_1.Name("propertyName"),
|
||||
message: new codegen_1.Name("message"),
|
||||
schema: new codegen_1.Name("schema"),
|
||||
parentSchema: new codegen_1.Name("parentSchema"),
|
||||
};
|
||||
function errorObjectCode(cxt, error, errorPaths) {
|
||||
const { createErrors } = cxt.it;
|
||||
if (createErrors === false)
|
||||
return (0, codegen_1._) `{}`;
|
||||
return errorObject(cxt, error, errorPaths);
|
||||
}
|
||||
function errorObject(cxt, error, errorPaths = {}) {
|
||||
const { gen, it } = cxt;
|
||||
const keyValues = [
|
||||
errorInstancePath(it, errorPaths),
|
||||
errorSchemaPath(cxt, errorPaths),
|
||||
];
|
||||
extraErrorProps(cxt, error, keyValues);
|
||||
return gen.object(...keyValues);
|
||||
}
|
||||
function errorInstancePath({ errorPath }, { instancePath }) {
|
||||
const instPath = instancePath
|
||||
? (0, codegen_1.str) `${errorPath}${(0, util_1.getErrorPath)(instancePath, util_1.Type.Str)}`
|
||||
: errorPath;
|
||||
return [names_1.default.instancePath, (0, codegen_1.strConcat)(names_1.default.instancePath, instPath)];
|
||||
}
|
||||
function errorSchemaPath({ keyword, it: { errSchemaPath } }, { schemaPath, parentSchema }) {
|
||||
let schPath = parentSchema ? errSchemaPath : (0, codegen_1.str) `${errSchemaPath}/${keyword}`;
|
||||
if (schemaPath) {
|
||||
schPath = (0, codegen_1.str) `${schPath}${(0, util_1.getErrorPath)(schemaPath, util_1.Type.Str)}`;
|
||||
}
|
||||
return [E.schemaPath, schPath];
|
||||
}
|
||||
function extraErrorProps(cxt, { params, message }, keyValues) {
|
||||
const { keyword, data, schemaValue, it } = cxt;
|
||||
const { opts, propertyName, topSchemaRef, schemaPath } = it;
|
||||
keyValues.push([E.keyword, keyword], [E.params, typeof params == "function" ? params(cxt) : params || (0, codegen_1._) `{}`]);
|
||||
if (opts.messages) {
|
||||
keyValues.push([E.message, typeof message == "function" ? message(cxt) : message]);
|
||||
}
|
||||
if (opts.verbose) {
|
||||
keyValues.push([E.schema, schemaValue], [E.parentSchema, (0, codegen_1._) `${topSchemaRef}${schemaPath}`], [names_1.default.data, data]);
|
||||
}
|
||||
if (propertyName)
|
||||
keyValues.push([E.propertyName, propertyName]);
|
||||
}
|
||||
//# sourceMappingURL=errors.js.map
|
||||
1
cdk/node_modules/aws-cdk-lib/node_modules/ajv/dist/compile/errors.js.map
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/node_modules/ajv/dist/compile/errors.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
80
cdk/node_modules/aws-cdk-lib/node_modules/ajv/dist/compile/index.d.ts
generated
vendored
Normal file
80
cdk/node_modules/aws-cdk-lib/node_modules/ajv/dist/compile/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,80 @@
|
||||
import type { AnySchema, AnySchemaObject, AnyValidateFunction, EvaluatedProperties, EvaluatedItems } from "../types";
|
||||
import type Ajv from "../core";
|
||||
import type { InstanceOptions } from "../core";
|
||||
import { CodeGen, Name, Code, ValueScopeName } from "./codegen";
|
||||
import { LocalRefs } from "./resolve";
|
||||
import { JSONType } from "./rules";
|
||||
export type SchemaRefs = {
|
||||
[Ref in string]?: SchemaEnv | AnySchema;
|
||||
};
|
||||
export interface SchemaCxt {
|
||||
readonly gen: CodeGen;
|
||||
readonly allErrors?: boolean;
|
||||
readonly data: Name;
|
||||
readonly parentData: Name;
|
||||
readonly parentDataProperty: Code | number;
|
||||
readonly dataNames: Name[];
|
||||
readonly dataPathArr: (Code | number)[];
|
||||
readonly dataLevel: number;
|
||||
dataTypes: JSONType[];
|
||||
definedProperties: Set<string>;
|
||||
readonly topSchemaRef: Code;
|
||||
readonly validateName: Name;
|
||||
evaluated?: Name;
|
||||
readonly ValidationError?: Name;
|
||||
readonly schema: AnySchema;
|
||||
readonly schemaEnv: SchemaEnv;
|
||||
readonly rootId: string;
|
||||
baseId: string;
|
||||
readonly schemaPath: Code;
|
||||
readonly errSchemaPath: string;
|
||||
readonly errorPath: Code;
|
||||
readonly propertyName?: Name;
|
||||
readonly compositeRule?: boolean;
|
||||
props?: EvaluatedProperties | Name;
|
||||
items?: EvaluatedItems | Name;
|
||||
jtdDiscriminator?: string;
|
||||
jtdMetadata?: boolean;
|
||||
readonly createErrors?: boolean;
|
||||
readonly opts: InstanceOptions;
|
||||
readonly self: Ajv;
|
||||
}
|
||||
export interface SchemaObjCxt extends SchemaCxt {
|
||||
readonly schema: AnySchemaObject;
|
||||
}
|
||||
interface SchemaEnvArgs {
|
||||
readonly schema: AnySchema;
|
||||
readonly schemaId?: "$id" | "id";
|
||||
readonly root?: SchemaEnv;
|
||||
readonly baseId?: string;
|
||||
readonly schemaPath?: string;
|
||||
readonly localRefs?: LocalRefs;
|
||||
readonly meta?: boolean;
|
||||
}
|
||||
export declare class SchemaEnv implements SchemaEnvArgs {
|
||||
readonly schema: AnySchema;
|
||||
readonly schemaId?: "$id" | "id";
|
||||
readonly root: SchemaEnv;
|
||||
baseId: string;
|
||||
schemaPath?: string;
|
||||
localRefs?: LocalRefs;
|
||||
readonly meta?: boolean;
|
||||
readonly $async?: boolean;
|
||||
readonly refs: SchemaRefs;
|
||||
readonly dynamicAnchors: {
|
||||
[Ref in string]?: true;
|
||||
};
|
||||
validate?: AnyValidateFunction;
|
||||
validateName?: ValueScopeName;
|
||||
serialize?: (data: unknown) => string;
|
||||
serializeName?: ValueScopeName;
|
||||
parse?: (data: string) => unknown;
|
||||
parseName?: ValueScopeName;
|
||||
constructor(env: SchemaEnvArgs);
|
||||
}
|
||||
export declare function compileSchema(this: Ajv, sch: SchemaEnv): SchemaEnv;
|
||||
export declare function resolveRef(this: Ajv, root: SchemaEnv, baseId: string, ref: string): AnySchema | SchemaEnv | undefined;
|
||||
export declare function getCompilingSchema(this: Ajv, schEnv: SchemaEnv): SchemaEnv | void;
|
||||
export declare function resolveSchema(this: Ajv, root: SchemaEnv, // root object with properties schema, refs TODO below SchemaEnv is assigned to it
|
||||
ref: string): SchemaEnv | undefined;
|
||||
export {};
|
||||
242
cdk/node_modules/aws-cdk-lib/node_modules/ajv/dist/compile/index.js
generated
vendored
Normal file
242
cdk/node_modules/aws-cdk-lib/node_modules/ajv/dist/compile/index.js
generated
vendored
Normal file
@@ -0,0 +1,242 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.resolveSchema = exports.getCompilingSchema = exports.resolveRef = exports.compileSchema = exports.SchemaEnv = void 0;
|
||||
const codegen_1 = require("./codegen");
|
||||
const validation_error_1 = require("../runtime/validation_error");
|
||||
const names_1 = require("./names");
|
||||
const resolve_1 = require("./resolve");
|
||||
const util_1 = require("./util");
|
||||
const validate_1 = require("./validate");
|
||||
class SchemaEnv {
|
||||
constructor(env) {
|
||||
var _a;
|
||||
this.refs = {};
|
||||
this.dynamicAnchors = {};
|
||||
let schema;
|
||||
if (typeof env.schema == "object")
|
||||
schema = env.schema;
|
||||
this.schema = env.schema;
|
||||
this.schemaId = env.schemaId;
|
||||
this.root = env.root || this;
|
||||
this.baseId = (_a = env.baseId) !== null && _a !== void 0 ? _a : (0, resolve_1.normalizeId)(schema === null || schema === void 0 ? void 0 : schema[env.schemaId || "$id"]);
|
||||
this.schemaPath = env.schemaPath;
|
||||
this.localRefs = env.localRefs;
|
||||
this.meta = env.meta;
|
||||
this.$async = schema === null || schema === void 0 ? void 0 : schema.$async;
|
||||
this.refs = {};
|
||||
}
|
||||
}
|
||||
exports.SchemaEnv = SchemaEnv;
|
||||
// let codeSize = 0
|
||||
// let nodeCount = 0
|
||||
// Compiles schema in SchemaEnv
|
||||
function compileSchema(sch) {
|
||||
// TODO refactor - remove compilations
|
||||
const _sch = getCompilingSchema.call(this, sch);
|
||||
if (_sch)
|
||||
return _sch;
|
||||
const rootId = (0, resolve_1.getFullPath)(this.opts.uriResolver, sch.root.baseId); // TODO if getFullPath removed 1 tests fails
|
||||
const { es5, lines } = this.opts.code;
|
||||
const { ownProperties } = this.opts;
|
||||
const gen = new codegen_1.CodeGen(this.scope, { es5, lines, ownProperties });
|
||||
let _ValidationError;
|
||||
if (sch.$async) {
|
||||
_ValidationError = gen.scopeValue("Error", {
|
||||
ref: validation_error_1.default,
|
||||
code: (0, codegen_1._) `require("ajv/dist/runtime/validation_error").default`,
|
||||
});
|
||||
}
|
||||
const validateName = gen.scopeName("validate");
|
||||
sch.validateName = validateName;
|
||||
const schemaCxt = {
|
||||
gen,
|
||||
allErrors: this.opts.allErrors,
|
||||
data: names_1.default.data,
|
||||
parentData: names_1.default.parentData,
|
||||
parentDataProperty: names_1.default.parentDataProperty,
|
||||
dataNames: [names_1.default.data],
|
||||
dataPathArr: [codegen_1.nil], // TODO can its length be used as dataLevel if nil is removed?
|
||||
dataLevel: 0,
|
||||
dataTypes: [],
|
||||
definedProperties: new Set(),
|
||||
topSchemaRef: gen.scopeValue("schema", this.opts.code.source === true
|
||||
? { ref: sch.schema, code: (0, codegen_1.stringify)(sch.schema) }
|
||||
: { ref: sch.schema }),
|
||||
validateName,
|
||||
ValidationError: _ValidationError,
|
||||
schema: sch.schema,
|
||||
schemaEnv: sch,
|
||||
rootId,
|
||||
baseId: sch.baseId || rootId,
|
||||
schemaPath: codegen_1.nil,
|
||||
errSchemaPath: sch.schemaPath || (this.opts.jtd ? "" : "#"),
|
||||
errorPath: (0, codegen_1._) `""`,
|
||||
opts: this.opts,
|
||||
self: this,
|
||||
};
|
||||
let sourceCode;
|
||||
try {
|
||||
this._compilations.add(sch);
|
||||
(0, validate_1.validateFunctionCode)(schemaCxt);
|
||||
gen.optimize(this.opts.code.optimize);
|
||||
// gen.optimize(1)
|
||||
const validateCode = gen.toString();
|
||||
sourceCode = `${gen.scopeRefs(names_1.default.scope)}return ${validateCode}`;
|
||||
// console.log((codeSize += sourceCode.length), (nodeCount += gen.nodeCount))
|
||||
if (this.opts.code.process)
|
||||
sourceCode = this.opts.code.process(sourceCode, sch);
|
||||
// console.log("\n\n\n *** \n", sourceCode)
|
||||
const makeValidate = new Function(`${names_1.default.self}`, `${names_1.default.scope}`, sourceCode);
|
||||
const validate = makeValidate(this, this.scope.get());
|
||||
this.scope.value(validateName, { ref: validate });
|
||||
validate.errors = null;
|
||||
validate.schema = sch.schema;
|
||||
validate.schemaEnv = sch;
|
||||
if (sch.$async)
|
||||
validate.$async = true;
|
||||
if (this.opts.code.source === true) {
|
||||
validate.source = { validateName, validateCode, scopeValues: gen._values };
|
||||
}
|
||||
if (this.opts.unevaluated) {
|
||||
const { props, items } = schemaCxt;
|
||||
validate.evaluated = {
|
||||
props: props instanceof codegen_1.Name ? undefined : props,
|
||||
items: items instanceof codegen_1.Name ? undefined : items,
|
||||
dynamicProps: props instanceof codegen_1.Name,
|
||||
dynamicItems: items instanceof codegen_1.Name,
|
||||
};
|
||||
if (validate.source)
|
||||
validate.source.evaluated = (0, codegen_1.stringify)(validate.evaluated);
|
||||
}
|
||||
sch.validate = validate;
|
||||
return sch;
|
||||
}
|
||||
catch (e) {
|
||||
delete sch.validate;
|
||||
delete sch.validateName;
|
||||
if (sourceCode)
|
||||
this.logger.error("Error compiling schema, function code:", sourceCode);
|
||||
// console.log("\n\n\n *** \n", sourceCode, this.opts)
|
||||
throw e;
|
||||
}
|
||||
finally {
|
||||
this._compilations.delete(sch);
|
||||
}
|
||||
}
|
||||
exports.compileSchema = compileSchema;
|
||||
function resolveRef(root, baseId, ref) {
|
||||
var _a;
|
||||
ref = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, ref);
|
||||
const schOrFunc = root.refs[ref];
|
||||
if (schOrFunc)
|
||||
return schOrFunc;
|
||||
let _sch = resolve.call(this, root, ref);
|
||||
if (_sch === undefined) {
|
||||
const schema = (_a = root.localRefs) === null || _a === void 0 ? void 0 : _a[ref]; // TODO maybe localRefs should hold SchemaEnv
|
||||
const { schemaId } = this.opts;
|
||||
if (schema)
|
||||
_sch = new SchemaEnv({ schema, schemaId, root, baseId });
|
||||
}
|
||||
if (_sch === undefined)
|
||||
return;
|
||||
return (root.refs[ref] = inlineOrCompile.call(this, _sch));
|
||||
}
|
||||
exports.resolveRef = resolveRef;
|
||||
function inlineOrCompile(sch) {
|
||||
if ((0, resolve_1.inlineRef)(sch.schema, this.opts.inlineRefs))
|
||||
return sch.schema;
|
||||
return sch.validate ? sch : compileSchema.call(this, sch);
|
||||
}
|
||||
// Index of schema compilation in the currently compiled list
|
||||
function getCompilingSchema(schEnv) {
|
||||
for (const sch of this._compilations) {
|
||||
if (sameSchemaEnv(sch, schEnv))
|
||||
return sch;
|
||||
}
|
||||
}
|
||||
exports.getCompilingSchema = getCompilingSchema;
|
||||
function sameSchemaEnv(s1, s2) {
|
||||
return s1.schema === s2.schema && s1.root === s2.root && s1.baseId === s2.baseId;
|
||||
}
|
||||
// resolve and compile the references ($ref)
|
||||
// TODO returns AnySchemaObject (if the schema can be inlined) or validation function
|
||||
function resolve(root, // information about the root schema for the current schema
|
||||
ref // reference to resolve
|
||||
) {
|
||||
let sch;
|
||||
while (typeof (sch = this.refs[ref]) == "string")
|
||||
ref = sch;
|
||||
return sch || this.schemas[ref] || resolveSchema.call(this, root, ref);
|
||||
}
|
||||
// Resolve schema, its root and baseId
|
||||
function resolveSchema(root, // root object with properties schema, refs TODO below SchemaEnv is assigned to it
|
||||
ref // reference to resolve
|
||||
) {
|
||||
const p = this.opts.uriResolver.parse(ref);
|
||||
const refPath = (0, resolve_1._getFullPath)(this.opts.uriResolver, p);
|
||||
let baseId = (0, resolve_1.getFullPath)(this.opts.uriResolver, root.baseId, undefined);
|
||||
// TODO `Object.keys(root.schema).length > 0` should not be needed - but removing breaks 2 tests
|
||||
if (Object.keys(root.schema).length > 0 && refPath === baseId) {
|
||||
return getJsonPointer.call(this, p, root);
|
||||
}
|
||||
const id = (0, resolve_1.normalizeId)(refPath);
|
||||
const schOrRef = this.refs[id] || this.schemas[id];
|
||||
if (typeof schOrRef == "string") {
|
||||
const sch = resolveSchema.call(this, root, schOrRef);
|
||||
if (typeof (sch === null || sch === void 0 ? void 0 : sch.schema) !== "object")
|
||||
return;
|
||||
return getJsonPointer.call(this, p, sch);
|
||||
}
|
||||
if (typeof (schOrRef === null || schOrRef === void 0 ? void 0 : schOrRef.schema) !== "object")
|
||||
return;
|
||||
if (!schOrRef.validate)
|
||||
compileSchema.call(this, schOrRef);
|
||||
if (id === (0, resolve_1.normalizeId)(ref)) {
|
||||
const { schema } = schOrRef;
|
||||
const { schemaId } = this.opts;
|
||||
const schId = schema[schemaId];
|
||||
if (schId)
|
||||
baseId = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, schId);
|
||||
return new SchemaEnv({ schema, schemaId, root, baseId });
|
||||
}
|
||||
return getJsonPointer.call(this, p, schOrRef);
|
||||
}
|
||||
exports.resolveSchema = resolveSchema;
|
||||
const PREVENT_SCOPE_CHANGE = new Set([
|
||||
"properties",
|
||||
"patternProperties",
|
||||
"enum",
|
||||
"dependencies",
|
||||
"definitions",
|
||||
]);
|
||||
function getJsonPointer(parsedRef, { baseId, schema, root }) {
|
||||
var _a;
|
||||
if (((_a = parsedRef.fragment) === null || _a === void 0 ? void 0 : _a[0]) !== "/")
|
||||
return;
|
||||
for (const part of parsedRef.fragment.slice(1).split("/")) {
|
||||
if (typeof schema === "boolean")
|
||||
return;
|
||||
const partSchema = schema[(0, util_1.unescapeFragment)(part)];
|
||||
if (partSchema === undefined)
|
||||
return;
|
||||
schema = partSchema;
|
||||
// TODO PREVENT_SCOPE_CHANGE could be defined in keyword def?
|
||||
const schId = typeof schema === "object" && schema[this.opts.schemaId];
|
||||
if (!PREVENT_SCOPE_CHANGE.has(part) && schId) {
|
||||
baseId = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, schId);
|
||||
}
|
||||
}
|
||||
let env;
|
||||
if (typeof schema != "boolean" && schema.$ref && !(0, util_1.schemaHasRulesButRef)(schema, this.RULES)) {
|
||||
const $ref = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, schema.$ref);
|
||||
env = resolveSchema.call(this, root, $ref);
|
||||
}
|
||||
// even though resolution failed we need to return SchemaEnv to throw exception
|
||||
// so that compileAsync loads missing schema.
|
||||
const { schemaId } = this.opts;
|
||||
env = env || new SchemaEnv({ schema, schemaId, root, baseId });
|
||||
if (env.schema !== env.root.schema)
|
||||
return env;
|
||||
return undefined;
|
||||
}
|
||||
//# sourceMappingURL=index.js.map
|
||||
1
cdk/node_modules/aws-cdk-lib/node_modules/ajv/dist/compile/index.js.map
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/node_modules/ajv/dist/compile/index.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
4
cdk/node_modules/aws-cdk-lib/node_modules/ajv/dist/compile/jtd/parse.d.ts
generated
vendored
Normal file
4
cdk/node_modules/aws-cdk-lib/node_modules/ajv/dist/compile/jtd/parse.d.ts
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
import type Ajv from "../../core";
|
||||
import { SchemaObjectMap } from "./types";
|
||||
import { SchemaEnv } from "..";
|
||||
export default function compileParser(this: Ajv, sch: SchemaEnv, definitions: SchemaObjectMap): SchemaEnv;
|
||||
350
cdk/node_modules/aws-cdk-lib/node_modules/ajv/dist/compile/jtd/parse.js
generated
vendored
Normal file
350
cdk/node_modules/aws-cdk-lib/node_modules/ajv/dist/compile/jtd/parse.js
generated
vendored
Normal file
@@ -0,0 +1,350 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const types_1 = require("./types");
|
||||
const __1 = require("..");
|
||||
const codegen_1 = require("../codegen");
|
||||
const ref_error_1 = require("../ref_error");
|
||||
const names_1 = require("../names");
|
||||
const code_1 = require("../../vocabularies/code");
|
||||
const ref_1 = require("../../vocabularies/jtd/ref");
|
||||
const type_1 = require("../../vocabularies/jtd/type");
|
||||
const parseJson_1 = require("../../runtime/parseJson");
|
||||
const util_1 = require("../util");
|
||||
const timestamp_1 = require("../../runtime/timestamp");
|
||||
const genParse = {
|
||||
elements: parseElements,
|
||||
values: parseValues,
|
||||
discriminator: parseDiscriminator,
|
||||
properties: parseProperties,
|
||||
optionalProperties: parseProperties,
|
||||
enum: parseEnum,
|
||||
type: parseType,
|
||||
ref: parseRef,
|
||||
};
|
||||
function compileParser(sch, definitions) {
|
||||
const _sch = __1.getCompilingSchema.call(this, sch);
|
||||
if (_sch)
|
||||
return _sch;
|
||||
const { es5, lines } = this.opts.code;
|
||||
const { ownProperties } = this.opts;
|
||||
const gen = new codegen_1.CodeGen(this.scope, { es5, lines, ownProperties });
|
||||
const parseName = gen.scopeName("parse");
|
||||
const cxt = {
|
||||
self: this,
|
||||
gen,
|
||||
schema: sch.schema,
|
||||
schemaEnv: sch,
|
||||
definitions,
|
||||
data: names_1.default.data,
|
||||
parseName,
|
||||
char: gen.name("c"),
|
||||
};
|
||||
let sourceCode;
|
||||
try {
|
||||
this._compilations.add(sch);
|
||||
sch.parseName = parseName;
|
||||
parserFunction(cxt);
|
||||
gen.optimize(this.opts.code.optimize);
|
||||
const parseFuncCode = gen.toString();
|
||||
sourceCode = `${gen.scopeRefs(names_1.default.scope)}return ${parseFuncCode}`;
|
||||
const makeParse = new Function(`${names_1.default.scope}`, sourceCode);
|
||||
const parse = makeParse(this.scope.get());
|
||||
this.scope.value(parseName, { ref: parse });
|
||||
sch.parse = parse;
|
||||
}
|
||||
catch (e) {
|
||||
if (sourceCode)
|
||||
this.logger.error("Error compiling parser, function code:", sourceCode);
|
||||
delete sch.parse;
|
||||
delete sch.parseName;
|
||||
throw e;
|
||||
}
|
||||
finally {
|
||||
this._compilations.delete(sch);
|
||||
}
|
||||
return sch;
|
||||
}
|
||||
exports.default = compileParser;
|
||||
const undef = (0, codegen_1._) `undefined`;
|
||||
function parserFunction(cxt) {
|
||||
const { gen, parseName, char } = cxt;
|
||||
gen.func(parseName, (0, codegen_1._) `${names_1.default.json}, ${names_1.default.jsonPos}, ${names_1.default.jsonPart}`, false, () => {
|
||||
gen.let(names_1.default.data);
|
||||
gen.let(char);
|
||||
gen.assign((0, codegen_1._) `${parseName}.message`, undef);
|
||||
gen.assign((0, codegen_1._) `${parseName}.position`, undef);
|
||||
gen.assign(names_1.default.jsonPos, (0, codegen_1._) `${names_1.default.jsonPos} || 0`);
|
||||
gen.const(names_1.default.jsonLen, (0, codegen_1._) `${names_1.default.json}.length`);
|
||||
parseCode(cxt);
|
||||
skipWhitespace(cxt);
|
||||
gen.if(names_1.default.jsonPart, () => {
|
||||
gen.assign((0, codegen_1._) `${parseName}.position`, names_1.default.jsonPos);
|
||||
gen.return(names_1.default.data);
|
||||
});
|
||||
gen.if((0, codegen_1._) `${names_1.default.jsonPos} === ${names_1.default.jsonLen}`, () => gen.return(names_1.default.data));
|
||||
jsonSyntaxError(cxt);
|
||||
});
|
||||
}
|
||||
function parseCode(cxt) {
|
||||
let form;
|
||||
for (const key of types_1.jtdForms) {
|
||||
if (key in cxt.schema) {
|
||||
form = key;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (form)
|
||||
parseNullable(cxt, genParse[form]);
|
||||
else
|
||||
parseEmpty(cxt);
|
||||
}
|
||||
const parseBoolean = parseBooleanToken(true, parseBooleanToken(false, jsonSyntaxError));
|
||||
function parseNullable(cxt, parseForm) {
|
||||
const { gen, schema, data } = cxt;
|
||||
if (!schema.nullable)
|
||||
return parseForm(cxt);
|
||||
tryParseToken(cxt, "null", parseForm, () => gen.assign(data, null));
|
||||
}
|
||||
function parseElements(cxt) {
|
||||
const { gen, schema, data } = cxt;
|
||||
parseToken(cxt, "[");
|
||||
const ix = gen.let("i", 0);
|
||||
gen.assign(data, (0, codegen_1._) `[]`);
|
||||
parseItems(cxt, "]", () => {
|
||||
const el = gen.let("el");
|
||||
parseCode({ ...cxt, schema: schema.elements, data: el });
|
||||
gen.assign((0, codegen_1._) `${data}[${ix}++]`, el);
|
||||
});
|
||||
}
|
||||
function parseValues(cxt) {
|
||||
const { gen, schema, data } = cxt;
|
||||
parseToken(cxt, "{");
|
||||
gen.assign(data, (0, codegen_1._) `{}`);
|
||||
parseItems(cxt, "}", () => parseKeyValue(cxt, schema.values));
|
||||
}
|
||||
function parseItems(cxt, endToken, block) {
|
||||
tryParseItems(cxt, endToken, block);
|
||||
parseToken(cxt, endToken);
|
||||
}
|
||||
function tryParseItems(cxt, endToken, block) {
|
||||
const { gen } = cxt;
|
||||
gen.for((0, codegen_1._) `;${names_1.default.jsonPos}<${names_1.default.jsonLen} && ${jsonSlice(1)}!==${endToken};`, () => {
|
||||
block();
|
||||
tryParseToken(cxt, ",", () => gen.break(), hasItem);
|
||||
});
|
||||
function hasItem() {
|
||||
tryParseToken(cxt, endToken, () => { }, jsonSyntaxError);
|
||||
}
|
||||
}
|
||||
function parseKeyValue(cxt, schema) {
|
||||
const { gen } = cxt;
|
||||
const key = gen.let("key");
|
||||
parseString({ ...cxt, data: key });
|
||||
parseToken(cxt, ":");
|
||||
parsePropertyValue(cxt, key, schema);
|
||||
}
|
||||
function parseDiscriminator(cxt) {
|
||||
const { gen, data, schema } = cxt;
|
||||
const { discriminator, mapping } = schema;
|
||||
parseToken(cxt, "{");
|
||||
gen.assign(data, (0, codegen_1._) `{}`);
|
||||
const startPos = gen.const("pos", names_1.default.jsonPos);
|
||||
const value = gen.let("value");
|
||||
const tag = gen.let("tag");
|
||||
tryParseItems(cxt, "}", () => {
|
||||
const key = gen.let("key");
|
||||
parseString({ ...cxt, data: key });
|
||||
parseToken(cxt, ":");
|
||||
gen.if((0, codegen_1._) `${key} === ${discriminator}`, () => {
|
||||
parseString({ ...cxt, data: tag });
|
||||
gen.assign((0, codegen_1._) `${data}[${key}]`, tag);
|
||||
gen.break();
|
||||
}, () => parseEmpty({ ...cxt, data: value }) // can be discarded/skipped
|
||||
);
|
||||
});
|
||||
gen.assign(names_1.default.jsonPos, startPos);
|
||||
gen.if((0, codegen_1._) `${tag} === undefined`);
|
||||
parsingError(cxt, (0, codegen_1.str) `discriminator tag not found`);
|
||||
for (const tagValue in mapping) {
|
||||
gen.elseIf((0, codegen_1._) `${tag} === ${tagValue}`);
|
||||
parseSchemaProperties({ ...cxt, schema: mapping[tagValue] }, discriminator);
|
||||
}
|
||||
gen.else();
|
||||
parsingError(cxt, (0, codegen_1.str) `discriminator value not in schema`);
|
||||
gen.endIf();
|
||||
}
|
||||
function parseProperties(cxt) {
|
||||
const { gen, data } = cxt;
|
||||
parseToken(cxt, "{");
|
||||
gen.assign(data, (0, codegen_1._) `{}`);
|
||||
parseSchemaProperties(cxt);
|
||||
}
|
||||
function parseSchemaProperties(cxt, discriminator) {
|
||||
const { gen, schema, data } = cxt;
|
||||
const { properties, optionalProperties, additionalProperties } = schema;
|
||||
parseItems(cxt, "}", () => {
|
||||
const key = gen.let("key");
|
||||
parseString({ ...cxt, data: key });
|
||||
parseToken(cxt, ":");
|
||||
gen.if(false);
|
||||
parseDefinedProperty(cxt, key, properties);
|
||||
parseDefinedProperty(cxt, key, optionalProperties);
|
||||
if (discriminator) {
|
||||
gen.elseIf((0, codegen_1._) `${key} === ${discriminator}`);
|
||||
const tag = gen.let("tag");
|
||||
parseString({ ...cxt, data: tag }); // can be discarded, it is already assigned
|
||||
}
|
||||
gen.else();
|
||||
if (additionalProperties) {
|
||||
parseEmpty({ ...cxt, data: (0, codegen_1._) `${data}[${key}]` });
|
||||
}
|
||||
else {
|
||||
parsingError(cxt, (0, codegen_1.str) `property ${key} not allowed`);
|
||||
}
|
||||
gen.endIf();
|
||||
});
|
||||
if (properties) {
|
||||
const hasProp = (0, code_1.hasPropFunc)(gen);
|
||||
const allProps = (0, codegen_1.and)(...Object.keys(properties).map((p) => (0, codegen_1._) `${hasProp}.call(${data}, ${p})`));
|
||||
gen.if((0, codegen_1.not)(allProps), () => parsingError(cxt, (0, codegen_1.str) `missing required properties`));
|
||||
}
|
||||
}
|
||||
function parseDefinedProperty(cxt, key, schemas = {}) {
|
||||
const { gen } = cxt;
|
||||
for (const prop in schemas) {
|
||||
gen.elseIf((0, codegen_1._) `${key} === ${prop}`);
|
||||
parsePropertyValue(cxt, key, schemas[prop]);
|
||||
}
|
||||
}
|
||||
function parsePropertyValue(cxt, key, schema) {
|
||||
parseCode({ ...cxt, schema, data: (0, codegen_1._) `${cxt.data}[${key}]` });
|
||||
}
|
||||
function parseType(cxt) {
|
||||
const { gen, schema, data, self } = cxt;
|
||||
switch (schema.type) {
|
||||
case "boolean":
|
||||
parseBoolean(cxt);
|
||||
break;
|
||||
case "string":
|
||||
parseString(cxt);
|
||||
break;
|
||||
case "timestamp": {
|
||||
parseString(cxt);
|
||||
const vts = (0, util_1.useFunc)(gen, timestamp_1.default);
|
||||
const { allowDate, parseDate } = self.opts;
|
||||
const notValid = allowDate ? (0, codegen_1._) `!${vts}(${data}, true)` : (0, codegen_1._) `!${vts}(${data})`;
|
||||
const fail = parseDate
|
||||
? (0, codegen_1.or)(notValid, (0, codegen_1._) `(${data} = new Date(${data}), false)`, (0, codegen_1._) `isNaN(${data}.valueOf())`)
|
||||
: notValid;
|
||||
gen.if(fail, () => parsingError(cxt, (0, codegen_1.str) `invalid timestamp`));
|
||||
break;
|
||||
}
|
||||
case "float32":
|
||||
case "float64":
|
||||
parseNumber(cxt);
|
||||
break;
|
||||
default: {
|
||||
const t = schema.type;
|
||||
if (!self.opts.int32range && (t === "int32" || t === "uint32")) {
|
||||
parseNumber(cxt, 16); // 2 ** 53 - max safe integer
|
||||
if (t === "uint32") {
|
||||
gen.if((0, codegen_1._) `${data} < 0`, () => parsingError(cxt, (0, codegen_1.str) `integer out of range`));
|
||||
}
|
||||
}
|
||||
else {
|
||||
const [min, max, maxDigits] = type_1.intRange[t];
|
||||
parseNumber(cxt, maxDigits);
|
||||
gen.if((0, codegen_1._) `${data} < ${min} || ${data} > ${max}`, () => parsingError(cxt, (0, codegen_1.str) `integer out of range`));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
function parseString(cxt) {
|
||||
parseToken(cxt, '"');
|
||||
parseWith(cxt, parseJson_1.parseJsonString);
|
||||
}
|
||||
function parseEnum(cxt) {
|
||||
const { gen, data, schema } = cxt;
|
||||
const enumSch = schema.enum;
|
||||
parseToken(cxt, '"');
|
||||
// TODO loopEnum
|
||||
gen.if(false);
|
||||
for (const value of enumSch) {
|
||||
const valueStr = JSON.stringify(value).slice(1); // remove starting quote
|
||||
gen.elseIf((0, codegen_1._) `${jsonSlice(valueStr.length)} === ${valueStr}`);
|
||||
gen.assign(data, (0, codegen_1.str) `${value}`);
|
||||
gen.add(names_1.default.jsonPos, valueStr.length);
|
||||
}
|
||||
gen.else();
|
||||
jsonSyntaxError(cxt);
|
||||
gen.endIf();
|
||||
}
|
||||
function parseNumber(cxt, maxDigits) {
|
||||
const { gen } = cxt;
|
||||
skipWhitespace(cxt);
|
||||
gen.if((0, codegen_1._) `"-0123456789".indexOf(${jsonSlice(1)}) < 0`, () => jsonSyntaxError(cxt), () => parseWith(cxt, parseJson_1.parseJsonNumber, maxDigits));
|
||||
}
|
||||
function parseBooleanToken(bool, fail) {
|
||||
return (cxt) => {
|
||||
const { gen, data } = cxt;
|
||||
tryParseToken(cxt, `${bool}`, () => fail(cxt), () => gen.assign(data, bool));
|
||||
};
|
||||
}
|
||||
function parseRef(cxt) {
|
||||
const { gen, self, definitions, schema, schemaEnv } = cxt;
|
||||
const { ref } = schema;
|
||||
const refSchema = definitions[ref];
|
||||
if (!refSchema)
|
||||
throw new ref_error_1.default(self.opts.uriResolver, "", ref, `No definition ${ref}`);
|
||||
if (!(0, ref_1.hasRef)(refSchema))
|
||||
return parseCode({ ...cxt, schema: refSchema });
|
||||
const { root } = schemaEnv;
|
||||
const sch = compileParser.call(self, new __1.SchemaEnv({ schema: refSchema, root }), definitions);
|
||||
partialParse(cxt, getParser(gen, sch), true);
|
||||
}
|
||||
function getParser(gen, sch) {
|
||||
return sch.parse
|
||||
? gen.scopeValue("parse", { ref: sch.parse })
|
||||
: (0, codegen_1._) `${gen.scopeValue("wrapper", { ref: sch })}.parse`;
|
||||
}
|
||||
function parseEmpty(cxt) {
|
||||
parseWith(cxt, parseJson_1.parseJson);
|
||||
}
|
||||
function parseWith(cxt, parseFunc, args) {
|
||||
partialParse(cxt, (0, util_1.useFunc)(cxt.gen, parseFunc), args);
|
||||
}
|
||||
function partialParse(cxt, parseFunc, args) {
|
||||
const { gen, data } = cxt;
|
||||
gen.assign(data, (0, codegen_1._) `${parseFunc}(${names_1.default.json}, ${names_1.default.jsonPos}${args ? (0, codegen_1._) `, ${args}` : codegen_1.nil})`);
|
||||
gen.assign(names_1.default.jsonPos, (0, codegen_1._) `${parseFunc}.position`);
|
||||
gen.if((0, codegen_1._) `${data} === undefined`, () => parsingError(cxt, (0, codegen_1._) `${parseFunc}.message`));
|
||||
}
|
||||
function parseToken(cxt, tok) {
|
||||
tryParseToken(cxt, tok, jsonSyntaxError);
|
||||
}
|
||||
function tryParseToken(cxt, tok, fail, success) {
|
||||
const { gen } = cxt;
|
||||
const n = tok.length;
|
||||
skipWhitespace(cxt);
|
||||
gen.if((0, codegen_1._) `${jsonSlice(n)} === ${tok}`, () => {
|
||||
gen.add(names_1.default.jsonPos, n);
|
||||
success === null || success === void 0 ? void 0 : success(cxt);
|
||||
}, () => fail(cxt));
|
||||
}
|
||||
function skipWhitespace({ gen, char: c }) {
|
||||
gen.code((0, codegen_1._) `while((${c}=${names_1.default.json}[${names_1.default.jsonPos}],${c}===" "||${c}==="\\n"||${c}==="\\r"||${c}==="\\t"))${names_1.default.jsonPos}++;`);
|
||||
}
|
||||
function jsonSlice(len) {
|
||||
return len === 1
|
||||
? (0, codegen_1._) `${names_1.default.json}[${names_1.default.jsonPos}]`
|
||||
: (0, codegen_1._) `${names_1.default.json}.slice(${names_1.default.jsonPos}, ${names_1.default.jsonPos}+${len})`;
|
||||
}
|
||||
function jsonSyntaxError(cxt) {
|
||||
parsingError(cxt, (0, codegen_1._) `"unexpected token " + ${names_1.default.json}[${names_1.default.jsonPos}]`);
|
||||
}
|
||||
function parsingError({ gen, parseName }, msg) {
|
||||
gen.assign((0, codegen_1._) `${parseName}.message`, msg);
|
||||
gen.assign((0, codegen_1._) `${parseName}.position`, names_1.default.jsonPos);
|
||||
gen.return(undef);
|
||||
}
|
||||
//# sourceMappingURL=parse.js.map
|
||||
1
cdk/node_modules/aws-cdk-lib/node_modules/ajv/dist/compile/jtd/parse.js.map
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/node_modules/ajv/dist/compile/jtd/parse.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
4
cdk/node_modules/aws-cdk-lib/node_modules/ajv/dist/compile/jtd/serialize.d.ts
generated
vendored
Normal file
4
cdk/node_modules/aws-cdk-lib/node_modules/ajv/dist/compile/jtd/serialize.d.ts
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
import type Ajv from "../../core";
|
||||
import { SchemaObjectMap } from "./types";
|
||||
import { SchemaEnv } from "..";
|
||||
export default function compileSerializer(this: Ajv, sch: SchemaEnv, definitions: SchemaObjectMap): SchemaEnv;
|
||||
236
cdk/node_modules/aws-cdk-lib/node_modules/ajv/dist/compile/jtd/serialize.js
generated
vendored
Normal file
236
cdk/node_modules/aws-cdk-lib/node_modules/ajv/dist/compile/jtd/serialize.js
generated
vendored
Normal file
@@ -0,0 +1,236 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const types_1 = require("./types");
|
||||
const __1 = require("..");
|
||||
const codegen_1 = require("../codegen");
|
||||
const ref_error_1 = require("../ref_error");
|
||||
const names_1 = require("../names");
|
||||
const code_1 = require("../../vocabularies/code");
|
||||
const ref_1 = require("../../vocabularies/jtd/ref");
|
||||
const util_1 = require("../util");
|
||||
const quote_1 = require("../../runtime/quote");
|
||||
const genSerialize = {
|
||||
elements: serializeElements,
|
||||
values: serializeValues,
|
||||
discriminator: serializeDiscriminator,
|
||||
properties: serializeProperties,
|
||||
optionalProperties: serializeProperties,
|
||||
enum: serializeString,
|
||||
type: serializeType,
|
||||
ref: serializeRef,
|
||||
};
|
||||
function compileSerializer(sch, definitions) {
|
||||
const _sch = __1.getCompilingSchema.call(this, sch);
|
||||
if (_sch)
|
||||
return _sch;
|
||||
const { es5, lines } = this.opts.code;
|
||||
const { ownProperties } = this.opts;
|
||||
const gen = new codegen_1.CodeGen(this.scope, { es5, lines, ownProperties });
|
||||
const serializeName = gen.scopeName("serialize");
|
||||
const cxt = {
|
||||
self: this,
|
||||
gen,
|
||||
schema: sch.schema,
|
||||
schemaEnv: sch,
|
||||
definitions,
|
||||
data: names_1.default.data,
|
||||
};
|
||||
let sourceCode;
|
||||
try {
|
||||
this._compilations.add(sch);
|
||||
sch.serializeName = serializeName;
|
||||
gen.func(serializeName, names_1.default.data, false, () => {
|
||||
gen.let(names_1.default.json, (0, codegen_1.str) ``);
|
||||
serializeCode(cxt);
|
||||
gen.return(names_1.default.json);
|
||||
});
|
||||
gen.optimize(this.opts.code.optimize);
|
||||
const serializeFuncCode = gen.toString();
|
||||
sourceCode = `${gen.scopeRefs(names_1.default.scope)}return ${serializeFuncCode}`;
|
||||
const makeSerialize = new Function(`${names_1.default.scope}`, sourceCode);
|
||||
const serialize = makeSerialize(this.scope.get());
|
||||
this.scope.value(serializeName, { ref: serialize });
|
||||
sch.serialize = serialize;
|
||||
}
|
||||
catch (e) {
|
||||
if (sourceCode)
|
||||
this.logger.error("Error compiling serializer, function code:", sourceCode);
|
||||
delete sch.serialize;
|
||||
delete sch.serializeName;
|
||||
throw e;
|
||||
}
|
||||
finally {
|
||||
this._compilations.delete(sch);
|
||||
}
|
||||
return sch;
|
||||
}
|
||||
exports.default = compileSerializer;
|
||||
function serializeCode(cxt) {
|
||||
let form;
|
||||
for (const key of types_1.jtdForms) {
|
||||
if (key in cxt.schema) {
|
||||
form = key;
|
||||
break;
|
||||
}
|
||||
}
|
||||
serializeNullable(cxt, form ? genSerialize[form] : serializeEmpty);
|
||||
}
|
||||
function serializeNullable(cxt, serializeForm) {
|
||||
const { gen, schema, data } = cxt;
|
||||
if (!schema.nullable)
|
||||
return serializeForm(cxt);
|
||||
gen.if((0, codegen_1._) `${data} === undefined || ${data} === null`, () => gen.add(names_1.default.json, (0, codegen_1._) `"null"`), () => serializeForm(cxt));
|
||||
}
|
||||
function serializeElements(cxt) {
|
||||
const { gen, schema, data } = cxt;
|
||||
gen.add(names_1.default.json, (0, codegen_1.str) `[`);
|
||||
const first = gen.let("first", true);
|
||||
gen.forOf("el", data, (el) => {
|
||||
addComma(cxt, first);
|
||||
serializeCode({ ...cxt, schema: schema.elements, data: el });
|
||||
});
|
||||
gen.add(names_1.default.json, (0, codegen_1.str) `]`);
|
||||
}
|
||||
function serializeValues(cxt) {
|
||||
const { gen, schema, data } = cxt;
|
||||
gen.add(names_1.default.json, (0, codegen_1.str) `{`);
|
||||
const first = gen.let("first", true);
|
||||
gen.forIn("key", data, (key) => serializeKeyValue(cxt, key, schema.values, first));
|
||||
gen.add(names_1.default.json, (0, codegen_1.str) `}`);
|
||||
}
|
||||
function serializeKeyValue(cxt, key, schema, first) {
|
||||
const { gen, data } = cxt;
|
||||
addComma(cxt, first);
|
||||
serializeString({ ...cxt, data: key });
|
||||
gen.add(names_1.default.json, (0, codegen_1.str) `:`);
|
||||
const value = gen.const("value", (0, codegen_1._) `${data}${(0, codegen_1.getProperty)(key)}`);
|
||||
serializeCode({ ...cxt, schema, data: value });
|
||||
}
|
||||
function serializeDiscriminator(cxt) {
|
||||
const { gen, schema, data } = cxt;
|
||||
const { discriminator } = schema;
|
||||
gen.add(names_1.default.json, (0, codegen_1.str) `{${JSON.stringify(discriminator)}:`);
|
||||
const tag = gen.const("tag", (0, codegen_1._) `${data}${(0, codegen_1.getProperty)(discriminator)}`);
|
||||
serializeString({ ...cxt, data: tag });
|
||||
gen.if(false);
|
||||
for (const tagValue in schema.mapping) {
|
||||
gen.elseIf((0, codegen_1._) `${tag} === ${tagValue}`);
|
||||
const sch = schema.mapping[tagValue];
|
||||
serializeSchemaProperties({ ...cxt, schema: sch }, discriminator);
|
||||
}
|
||||
gen.endIf();
|
||||
gen.add(names_1.default.json, (0, codegen_1.str) `}`);
|
||||
}
|
||||
function serializeProperties(cxt) {
|
||||
const { gen } = cxt;
|
||||
gen.add(names_1.default.json, (0, codegen_1.str) `{`);
|
||||
serializeSchemaProperties(cxt);
|
||||
gen.add(names_1.default.json, (0, codegen_1.str) `}`);
|
||||
}
|
||||
function serializeSchemaProperties(cxt, discriminator) {
|
||||
const { gen, schema, data } = cxt;
|
||||
const { properties, optionalProperties } = schema;
|
||||
const props = keys(properties);
|
||||
const optProps = keys(optionalProperties);
|
||||
const allProps = allProperties(props.concat(optProps));
|
||||
let first = !discriminator;
|
||||
let firstProp;
|
||||
for (const key of props) {
|
||||
if (first)
|
||||
first = false;
|
||||
else
|
||||
gen.add(names_1.default.json, (0, codegen_1.str) `,`);
|
||||
serializeProperty(key, properties[key], keyValue(key));
|
||||
}
|
||||
if (first)
|
||||
firstProp = gen.let("first", true);
|
||||
for (const key of optProps) {
|
||||
const value = keyValue(key);
|
||||
gen.if((0, codegen_1.and)((0, codegen_1._) `${value} !== undefined`, (0, code_1.isOwnProperty)(gen, data, key)), () => {
|
||||
addComma(cxt, firstProp);
|
||||
serializeProperty(key, optionalProperties[key], value);
|
||||
});
|
||||
}
|
||||
if (schema.additionalProperties) {
|
||||
gen.forIn("key", data, (key) => gen.if(isAdditional(key, allProps), () => serializeKeyValue(cxt, key, {}, firstProp)));
|
||||
}
|
||||
function keys(ps) {
|
||||
return ps ? Object.keys(ps) : [];
|
||||
}
|
||||
function allProperties(ps) {
|
||||
if (discriminator)
|
||||
ps.push(discriminator);
|
||||
if (new Set(ps).size !== ps.length) {
|
||||
throw new Error("JTD: properties/optionalProperties/disciminator overlap");
|
||||
}
|
||||
return ps;
|
||||
}
|
||||
function keyValue(key) {
|
||||
return gen.const("value", (0, codegen_1._) `${data}${(0, codegen_1.getProperty)(key)}`);
|
||||
}
|
||||
function serializeProperty(key, propSchema, value) {
|
||||
gen.add(names_1.default.json, (0, codegen_1.str) `${JSON.stringify(key)}:`);
|
||||
serializeCode({ ...cxt, schema: propSchema, data: value });
|
||||
}
|
||||
function isAdditional(key, ps) {
|
||||
return ps.length ? (0, codegen_1.and)(...ps.map((p) => (0, codegen_1._) `${key} !== ${p}`)) : true;
|
||||
}
|
||||
}
|
||||
function serializeType(cxt) {
|
||||
const { gen, schema, data } = cxt;
|
||||
switch (schema.type) {
|
||||
case "boolean":
|
||||
gen.add(names_1.default.json, (0, codegen_1._) `${data} ? "true" : "false"`);
|
||||
break;
|
||||
case "string":
|
||||
serializeString(cxt);
|
||||
break;
|
||||
case "timestamp":
|
||||
gen.if((0, codegen_1._) `${data} instanceof Date`, () => gen.add(names_1.default.json, (0, codegen_1._) `'"' + ${data}.toISOString() + '"'`), () => serializeString(cxt));
|
||||
break;
|
||||
default:
|
||||
serializeNumber(cxt);
|
||||
}
|
||||
}
|
||||
function serializeString({ gen, data }) {
|
||||
gen.add(names_1.default.json, (0, codegen_1._) `${(0, util_1.useFunc)(gen, quote_1.default)}(${data})`);
|
||||
}
|
||||
function serializeNumber({ gen, data, self }) {
|
||||
const condition = (0, codegen_1._) `${data} === Infinity || ${data} === -Infinity || ${data} !== ${data}`;
|
||||
if (self.opts.specialNumbers === undefined || self.opts.specialNumbers === "fast") {
|
||||
gen.add(names_1.default.json, (0, codegen_1._) `"" + ${data}`);
|
||||
}
|
||||
else {
|
||||
// specialNumbers === "null"
|
||||
gen.if(condition, () => gen.add(names_1.default.json, (0, codegen_1._) `null`), () => gen.add(names_1.default.json, (0, codegen_1._) `"" + ${data}`));
|
||||
}
|
||||
}
|
||||
function serializeRef(cxt) {
|
||||
const { gen, self, data, definitions, schema, schemaEnv } = cxt;
|
||||
const { ref } = schema;
|
||||
const refSchema = definitions[ref];
|
||||
if (!refSchema)
|
||||
throw new ref_error_1.default(self.opts.uriResolver, "", ref, `No definition ${ref}`);
|
||||
if (!(0, ref_1.hasRef)(refSchema))
|
||||
return serializeCode({ ...cxt, schema: refSchema });
|
||||
const { root } = schemaEnv;
|
||||
const sch = compileSerializer.call(self, new __1.SchemaEnv({ schema: refSchema, root }), definitions);
|
||||
gen.add(names_1.default.json, (0, codegen_1._) `${getSerialize(gen, sch)}(${data})`);
|
||||
}
|
||||
function getSerialize(gen, sch) {
|
||||
return sch.serialize
|
||||
? gen.scopeValue("serialize", { ref: sch.serialize })
|
||||
: (0, codegen_1._) `${gen.scopeValue("wrapper", { ref: sch })}.serialize`;
|
||||
}
|
||||
function serializeEmpty({ gen, data }) {
|
||||
gen.add(names_1.default.json, (0, codegen_1._) `JSON.stringify(${data})`);
|
||||
}
|
||||
function addComma({ gen }, first) {
|
||||
if (first) {
|
||||
gen.if(first, () => gen.assign(first, false), () => gen.add(names_1.default.json, (0, codegen_1.str) `,`));
|
||||
}
|
||||
else {
|
||||
gen.add(names_1.default.json, (0, codegen_1.str) `,`);
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=serialize.js.map
|
||||
1
cdk/node_modules/aws-cdk-lib/node_modules/ajv/dist/compile/jtd/serialize.js.map
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/node_modules/ajv/dist/compile/jtd/serialize.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
6
cdk/node_modules/aws-cdk-lib/node_modules/ajv/dist/compile/jtd/types.d.ts
generated
vendored
Normal file
6
cdk/node_modules/aws-cdk-lib/node_modules/ajv/dist/compile/jtd/types.d.ts
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
import type { SchemaObject } from "../../types";
|
||||
export type SchemaObjectMap = {
|
||||
[Ref in string]?: SchemaObject;
|
||||
};
|
||||
export declare const jtdForms: readonly ["elements", "values", "discriminator", "properties", "optionalProperties", "enum", "type", "ref"];
|
||||
export type JTDForm = (typeof jtdForms)[number];
|
||||
14
cdk/node_modules/aws-cdk-lib/node_modules/ajv/dist/compile/jtd/types.js
generated
vendored
Normal file
14
cdk/node_modules/aws-cdk-lib/node_modules/ajv/dist/compile/jtd/types.js
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.jtdForms = void 0;
|
||||
exports.jtdForms = [
|
||||
"elements",
|
||||
"values",
|
||||
"discriminator",
|
||||
"properties",
|
||||
"optionalProperties",
|
||||
"enum",
|
||||
"type",
|
||||
"ref",
|
||||
];
|
||||
//# sourceMappingURL=types.js.map
|
||||
1
cdk/node_modules/aws-cdk-lib/node_modules/ajv/dist/compile/jtd/types.js.map
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/node_modules/ajv/dist/compile/jtd/types.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../lib/compile/jtd/types.ts"],"names":[],"mappings":";;;AAIa,QAAA,QAAQ,GAAG;IACtB,UAAU;IACV,QAAQ;IACR,eAAe;IACf,YAAY;IACZ,oBAAoB;IACpB,MAAM;IACN,MAAM;IACN,KAAK;CACG,CAAA"}
|
||||
20
cdk/node_modules/aws-cdk-lib/node_modules/ajv/dist/compile/names.d.ts
generated
vendored
Normal file
20
cdk/node_modules/aws-cdk-lib/node_modules/ajv/dist/compile/names.d.ts
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
import { Name } from "./codegen";
|
||||
declare const names: {
|
||||
data: Name;
|
||||
valCxt: Name;
|
||||
instancePath: Name;
|
||||
parentData: Name;
|
||||
parentDataProperty: Name;
|
||||
rootData: Name;
|
||||
dynamicAnchors: Name;
|
||||
vErrors: Name;
|
||||
errors: Name;
|
||||
this: Name;
|
||||
self: Name;
|
||||
scope: Name;
|
||||
json: Name;
|
||||
jsonPos: Name;
|
||||
jsonLen: Name;
|
||||
jsonPart: Name;
|
||||
};
|
||||
export default names;
|
||||
28
cdk/node_modules/aws-cdk-lib/node_modules/ajv/dist/compile/names.js
generated
vendored
Normal file
28
cdk/node_modules/aws-cdk-lib/node_modules/ajv/dist/compile/names.js
generated
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const codegen_1 = require("./codegen");
|
||||
const names = {
|
||||
// validation function arguments
|
||||
data: new codegen_1.Name("data"), // data passed to validation function
|
||||
// args passed from referencing schema
|
||||
valCxt: new codegen_1.Name("valCxt"), // validation/data context - should not be used directly, it is destructured to the names below
|
||||
instancePath: new codegen_1.Name("instancePath"),
|
||||
parentData: new codegen_1.Name("parentData"),
|
||||
parentDataProperty: new codegen_1.Name("parentDataProperty"),
|
||||
rootData: new codegen_1.Name("rootData"), // root data - same as the data passed to the first/top validation function
|
||||
dynamicAnchors: new codegen_1.Name("dynamicAnchors"), // used to support recursiveRef and dynamicRef
|
||||
// function scoped variables
|
||||
vErrors: new codegen_1.Name("vErrors"), // null or array of validation errors
|
||||
errors: new codegen_1.Name("errors"), // counter of validation errors
|
||||
this: new codegen_1.Name("this"),
|
||||
// "globals"
|
||||
self: new codegen_1.Name("self"),
|
||||
scope: new codegen_1.Name("scope"),
|
||||
// JTD serialize/parse name for JSON string and position
|
||||
json: new codegen_1.Name("json"),
|
||||
jsonPos: new codegen_1.Name("jsonPos"),
|
||||
jsonLen: new codegen_1.Name("jsonLen"),
|
||||
jsonPart: new codegen_1.Name("jsonPart"),
|
||||
};
|
||||
exports.default = names;
|
||||
//# sourceMappingURL=names.js.map
|
||||
1
cdk/node_modules/aws-cdk-lib/node_modules/ajv/dist/compile/names.js.map
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/node_modules/ajv/dist/compile/names.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"names.js","sourceRoot":"","sources":["../../lib/compile/names.ts"],"names":[],"mappings":";;AAAA,uCAA8B;AAE9B,MAAM,KAAK,GAAG;IACZ,gCAAgC;IAChC,IAAI,EAAE,IAAI,cAAI,CAAC,MAAM,CAAC,EAAE,qCAAqC;IAC7D,sCAAsC;IACtC,MAAM,EAAE,IAAI,cAAI,CAAC,QAAQ,CAAC,EAAE,+FAA+F;IAC3H,YAAY,EAAE,IAAI,cAAI,CAAC,cAAc,CAAC;IACtC,UAAU,EAAE,IAAI,cAAI,CAAC,YAAY,CAAC;IAClC,kBAAkB,EAAE,IAAI,cAAI,CAAC,oBAAoB,CAAC;IAClD,QAAQ,EAAE,IAAI,cAAI,CAAC,UAAU,CAAC,EAAE,2EAA2E;IAC3G,cAAc,EAAE,IAAI,cAAI,CAAC,gBAAgB,CAAC,EAAE,8CAA8C;IAC1F,4BAA4B;IAC5B,OAAO,EAAE,IAAI,cAAI,CAAC,SAAS,CAAC,EAAE,qCAAqC;IACnE,MAAM,EAAE,IAAI,cAAI,CAAC,QAAQ,CAAC,EAAE,+BAA+B;IAC3D,IAAI,EAAE,IAAI,cAAI,CAAC,MAAM,CAAC;IACtB,YAAY;IACZ,IAAI,EAAE,IAAI,cAAI,CAAC,MAAM,CAAC;IACtB,KAAK,EAAE,IAAI,cAAI,CAAC,OAAO,CAAC;IACxB,wDAAwD;IACxD,IAAI,EAAE,IAAI,cAAI,CAAC,MAAM,CAAC;IACtB,OAAO,EAAE,IAAI,cAAI,CAAC,SAAS,CAAC;IAC5B,OAAO,EAAE,IAAI,cAAI,CAAC,SAAS,CAAC;IAC5B,QAAQ,EAAE,IAAI,cAAI,CAAC,UAAU,CAAC;CAC/B,CAAA;AAED,kBAAe,KAAK,CAAA"}
|
||||
6
cdk/node_modules/aws-cdk-lib/node_modules/ajv/dist/compile/ref_error.d.ts
generated
vendored
Normal file
6
cdk/node_modules/aws-cdk-lib/node_modules/ajv/dist/compile/ref_error.d.ts
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
import type { UriResolver } from "../types";
|
||||
export default class MissingRefError extends Error {
|
||||
readonly missingRef: string;
|
||||
readonly missingSchema: string;
|
||||
constructor(resolver: UriResolver, baseId: string, ref: string, msg?: string);
|
||||
}
|
||||
12
cdk/node_modules/aws-cdk-lib/node_modules/ajv/dist/compile/ref_error.js
generated
vendored
Normal file
12
cdk/node_modules/aws-cdk-lib/node_modules/ajv/dist/compile/ref_error.js
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const resolve_1 = require("./resolve");
|
||||
class MissingRefError extends Error {
|
||||
constructor(resolver, baseId, ref, msg) {
|
||||
super(msg || `can't resolve reference ${ref} from id ${baseId}`);
|
||||
this.missingRef = (0, resolve_1.resolveUrl)(resolver, baseId, ref);
|
||||
this.missingSchema = (0, resolve_1.normalizeId)((0, resolve_1.getFullPath)(resolver, this.missingRef));
|
||||
}
|
||||
}
|
||||
exports.default = MissingRefError;
|
||||
//# sourceMappingURL=ref_error.js.map
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user