From 002ea1736961223e41c74138b1a39443bf104326 Mon Sep 17 00:00:00 2001 From: Seiya T Date: Mon, 21 Jun 2021 16:22:48 -0700 Subject: [PATCH 01/14] doc(appmesh): clarifying the difference between using the constructor and method to crete a resource --- packages/@aws-cdk/aws-appmesh/README.md | 2 ++ packages/@aws-cdk/aws-appmesh/lib/mesh.ts | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/@aws-cdk/aws-appmesh/README.md b/packages/@aws-cdk/aws-appmesh/README.md index b71bd5d9ab53c..a4f1abe9bf9c9 100644 --- a/packages/@aws-cdk/aws-appmesh/README.md +++ b/packages/@aws-cdk/aws-appmesh/README.md @@ -73,6 +73,8 @@ const router = mesh.addVirtualRouter('router', { ``` The router can also be created using the constructor and passing in the mesh instead of calling the `addVirtualRouter()` method for the mesh. +It is important to note when calling the `addVirtualRouter()` method for the mesh, router is created in the same stack where the mesh is called. +On the other hands, when the router is created using the constructor, it is created in the current stack. The same pattern applies to all constructs within the appmesh library, for any mesh.addXZY method, a new constuctor can also be used. This is particularly useful for cross stack resources are required. Where creating the `mesh` as part of an infrastructure stack and creating the `resources` such as `nodes` is more useful to keep in the application stack. diff --git a/packages/@aws-cdk/aws-appmesh/lib/mesh.ts b/packages/@aws-cdk/aws-appmesh/lib/mesh.ts index a1cd5b49904a5..307ecc6753291 100644 --- a/packages/@aws-cdk/aws-appmesh/lib/mesh.ts +++ b/packages/@aws-cdk/aws-appmesh/lib/mesh.ts @@ -41,17 +41,17 @@ export interface IMesh extends cdk.IResource { readonly meshArn: string; /** - * Adds a VirtualRouter to the Mesh with the given id and props + * Adds a VirtualRouter to the same Stack as the Mesh is called on and NOT in the current stack */ addVirtualRouter(id: string, props?: VirtualRouterBaseProps): VirtualRouter; /** - * Adds a VirtualNode to the Mesh + * Adds a VirtualNode to the same Stack as the Mesh is called on and NOT in the current stack */ addVirtualNode(id: string, props?: VirtualNodeBaseProps): VirtualNode; /** - * Adds a VirtualGateway to the Mesh + * Adds a VirtualGateway to the same Stack as the Mesh is called on and NOT in the current stack */ addVirtualGateway(id: string, props?: VirtualGatewayBaseProps): VirtualGateway; } From 57c982068f248e310c401d3c304d3f389335d1ea Mon Sep 17 00:00:00 2001 From: Seiya T Date: Tue, 22 Jun 2021 10:15:31 -0700 Subject: [PATCH 02/14] Fixing sentence, grammar, and typo --- packages/@aws-cdk/aws-appmesh/README.md | 8 +++++--- packages/@aws-cdk/aws-appmesh/lib/mesh.ts | 16 +++++++++++----- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/packages/@aws-cdk/aws-appmesh/README.md b/packages/@aws-cdk/aws-appmesh/README.md index a4f1abe9bf9c9..bd65634329654 100644 --- a/packages/@aws-cdk/aws-appmesh/README.md +++ b/packages/@aws-cdk/aws-appmesh/README.md @@ -73,9 +73,11 @@ const router = mesh.addVirtualRouter('router', { ``` The router can also be created using the constructor and passing in the mesh instead of calling the `addVirtualRouter()` method for the mesh. -It is important to note when calling the `addVirtualRouter()` method for the mesh, router is created in the same stack where the mesh is called. -On the other hands, when the router is created using the constructor, it is created in the current stack. -The same pattern applies to all constructs within the appmesh library, for any mesh.addXZY method, a new constuctor can also be used. +Note that creating the router using the `addVirtualRouter()` method places it in the same Stack that the mesh belongs to +(which might be different from the current Stack). +The same pattern applies to all constructs within the appmesh library, for any mesh.addXZY method, a new constructor can also be used. +(For example, see [Adding a VirtualNode](https://docs.aws.amazon.com/cdk/api/latest/docs/aws-appmesh-readme.html#adding-a-virtualnode) + and [Adding a Virtual Gateway](https://docs.aws.amazon.com/cdk/api/latest/docs/aws-appmesh-readme.html#adding-a-virtual-gateway) sections) This is particularly useful for cross stack resources are required. Where creating the `mesh` as part of an infrastructure stack and creating the `resources` such as `nodes` is more useful to keep in the application stack. diff --git a/packages/@aws-cdk/aws-appmesh/lib/mesh.ts b/packages/@aws-cdk/aws-appmesh/lib/mesh.ts index 307ecc6753291..ddb74d7ef2cff 100644 --- a/packages/@aws-cdk/aws-appmesh/lib/mesh.ts +++ b/packages/@aws-cdk/aws-appmesh/lib/mesh.ts @@ -23,7 +23,7 @@ export enum MeshFilterType { } /** - * Interface wich all Mesh based classes MUST implement + * Interface which all Mesh based classes MUST implement */ export interface IMesh extends cdk.IResource { /** @@ -41,17 +41,23 @@ export interface IMesh extends cdk.IResource { readonly meshArn: string; /** - * Adds a VirtualRouter to the same Stack as the Mesh is called on and NOT in the current stack + * Creates a new VirtualRouter in this Mesh. + * Note that the Router is created in the same Stack that this Mesh belongs to, + * which might be different than current stack. */ addVirtualRouter(id: string, props?: VirtualRouterBaseProps): VirtualRouter; /** - * Adds a VirtualNode to the same Stack as the Mesh is called on and NOT in the current stack + * Creates a new VirtualNode in this Mesh. + * Note that the Node is created in the same Stack that this Mesh belongs to, + * which might be different than current stack. */ addVirtualNode(id: string, props?: VirtualNodeBaseProps): VirtualNode; /** - * Adds a VirtualGateway to the same Stack as the Mesh is called on and NOT in the current stack + * Creates a new VirtualGateway in this Mesh. + * Note that the Gateway is created in the same Stack that this Mesh belongs to, + * which might be different than current stack. */ addVirtualGateway(id: string, props?: VirtualGatewayBaseProps): VirtualGateway; } @@ -108,7 +114,7 @@ export interface MeshProps { /** * The name of the Mesh being defined * - * @default - A name is autmoatically generated + * @default - A name is automatically generated */ readonly meshName?: string; From df76a023c709babf6c597f1fb1d9237cdd4200f0 Mon Sep 17 00:00:00 2001 From: Adam Ruka Date: Tue, 22 Jun 2021 11:32:26 -0700 Subject: [PATCH 03/14] Fixup the wording in the ReadMe --- packages/@aws-cdk/aws-appmesh/README.md | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/packages/@aws-cdk/aws-appmesh/README.md b/packages/@aws-cdk/aws-appmesh/README.md index bd65634329654..ba1bd01e66873 100644 --- a/packages/@aws-cdk/aws-appmesh/README.md +++ b/packages/@aws-cdk/aws-appmesh/README.md @@ -72,25 +72,24 @@ const router = mesh.addVirtualRouter('router', { }); ``` -The router can also be created using the constructor and passing in the mesh instead of calling the `addVirtualRouter()` method for the mesh. Note that creating the router using the `addVirtualRouter()` method places it in the same Stack that the mesh belongs to (which might be different from the current Stack). -The same pattern applies to all constructs within the appmesh library, for any mesh.addXZY method, a new constructor can also be used. -(For example, see [Adding a VirtualNode](https://docs.aws.amazon.com/cdk/api/latest/docs/aws-appmesh-readme.html#adding-a-virtualnode) - and [Adding a Virtual Gateway](https://docs.aws.amazon.com/cdk/api/latest/docs/aws-appmesh-readme.html#adding-a-virtual-gateway) sections) -This is particularly useful for cross stack resources are required. -Where creating the `mesh` as part of an infrastructure stack and creating the `resources` such as `nodes` is more useful to keep in the application stack. +The router can also be created using the constructor of `VirtualRouter` and passing in the mesh instead of calling the `addVirtualRouter()` method. +This is particularly useful when splitting your resources between many Stacks, +like creating the `mesh` as part of an infrastructure stack, +but the other resources, such as routers, in the application stack: ```ts -const mesh = new Mesh(stack, 'AppMesh', { +const mesh = new Mesh(infraStack, 'AppMesh', { meshName: 'myAwsmMesh', - egressFilter: MeshFilterType.Allow_All, + egressFilter: MeshFilterType.ALLOW_ALL, }); -const router = new VirtualRouter(stack, 'router', { - mesh, // notice that mesh is a required property when creating a router with a new statement - listeners: [ appmesh.VirtualRouterListener.http(8081) ] - } +// the VirtualRouter will belong to 'appStack', +// even though the Mesh belongs to 'infraStack' +const router = new VirtualRouter(appStack, 'router', { + mesh: mesh, // notice that mesh is a required property when creating a router with the 'new' statement + listeners: [appmesh.VirtualRouterListener.http(8081)], }); ``` From cbd2e6406def3a71bd932949c8f6f89a2f681239 Mon Sep 17 00:00:00 2001 From: Adam Ruka Date: Tue, 22 Jun 2021 11:34:56 -0700 Subject: [PATCH 04/14] Fix spelling in Mesh.add*() method docs --- packages/@aws-cdk/aws-appmesh/lib/mesh.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/@aws-cdk/aws-appmesh/lib/mesh.ts b/packages/@aws-cdk/aws-appmesh/lib/mesh.ts index ddb74d7ef2cff..c3d768660117e 100644 --- a/packages/@aws-cdk/aws-appmesh/lib/mesh.ts +++ b/packages/@aws-cdk/aws-appmesh/lib/mesh.ts @@ -43,21 +43,21 @@ export interface IMesh extends cdk.IResource { /** * Creates a new VirtualRouter in this Mesh. * Note that the Router is created in the same Stack that this Mesh belongs to, - * which might be different than current stack. + * which might be different than the current stack. */ addVirtualRouter(id: string, props?: VirtualRouterBaseProps): VirtualRouter; /** * Creates a new VirtualNode in this Mesh. * Note that the Node is created in the same Stack that this Mesh belongs to, - * which might be different than current stack. + * which might be different than the current stack. */ addVirtualNode(id: string, props?: VirtualNodeBaseProps): VirtualNode; /** * Creates a new VirtualGateway in this Mesh. * Note that the Gateway is created in the same Stack that this Mesh belongs to, - * which might be different than current stack. + * which might be different than the current stack. */ addVirtualGateway(id: string, props?: VirtualGatewayBaseProps): VirtualGateway; } From 5db786128d7da95ed904ed41c227a43273e38e88 Mon Sep 17 00:00:00 2001 From: Adam Ruka Date: Tue, 22 Jun 2021 11:38:29 -0700 Subject: [PATCH 05/14] Add a note about other add*() methods in the AppMesh library --- packages/@aws-cdk/aws-appmesh/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/@aws-cdk/aws-appmesh/README.md b/packages/@aws-cdk/aws-appmesh/README.md index ba1bd01e66873..1ed090155c37e 100644 --- a/packages/@aws-cdk/aws-appmesh/README.md +++ b/packages/@aws-cdk/aws-appmesh/README.md @@ -93,6 +93,8 @@ const router = new VirtualRouter(appStack, 'router', { }); ``` +The same is true for other `add*()` methods in the AppMesh library. + The _VirtualRouterListener_ class provides an easy interface for defining new protocol specific listeners. The `http()`, `http2()`, `grpc()` and `tcp()` methods are available for use. They accept a single port parameter, that is used to define what port to match requests on. From 9087cf2017a1ead575feffee83ce25e0b35f302e Mon Sep 17 00:00:00 2001 From: Ross Date: Mon, 21 Jun 2021 21:10:17 +0100 Subject: [PATCH 06/14] feat(dynamodb): allow using Kinesis stream in Table (#15199) Add support for Kinesis Streams in DynamoDB tables with a new `kinesisStreamArn` table option. Closes #14534 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/aws-dynamodb/README.md | 16 ++++ packages/@aws-cdk/aws-dynamodb/lib/table.ts | 9 +++ packages/@aws-cdk/aws-dynamodb/package.json | 2 + .../aws-dynamodb/test/dynamodb.test.ts | 8 ++ ...nteg.dynamodb.kinesis-stream.expected.json | 76 +++++++++++++++++++ .../test/integ.dynamodb.kinesis-stream.ts | 16 ++++ 6 files changed, 127 insertions(+) create mode 100644 packages/@aws-cdk/aws-dynamodb/test/integ.dynamodb.kinesis-stream.expected.json create mode 100644 packages/@aws-cdk/aws-dynamodb/test/integ.dynamodb.kinesis-stream.ts diff --git a/packages/@aws-cdk/aws-dynamodb/README.md b/packages/@aws-cdk/aws-dynamodb/README.md index a9391d2534673..3355f8b41b508 100644 --- a/packages/@aws-cdk/aws-dynamodb/README.md +++ b/packages/@aws-cdk/aws-dynamodb/README.md @@ -185,3 +185,19 @@ const { partitionKey, sortKey } = table.schema(); const { partitionKey, sortKey } = table.schema(INDEX_NAME); ``` + +## Kinesis Stream + +A Kinesis Data Stream can be configured on the DynamoDB table to capture item-level changes. + +```ts +import * as dynamodb from '@aws-cdk/aws-dynamodb'; +import * as kinesis from '@aws-cdk/aws-kinesis'; + +const stream = new kinesis.Stream(this, 'Stream'); + +const table = new dynamodb.Table(this, 'Table', { + partitionKey: { name: 'id', type: dynamodb.AttributeType.STRING }, + kinesisStream: stream, +}); +``` diff --git a/packages/@aws-cdk/aws-dynamodb/lib/table.ts b/packages/@aws-cdk/aws-dynamodb/lib/table.ts index 4d5b31460d686..a2b1aae5ee2eb 100644 --- a/packages/@aws-cdk/aws-dynamodb/lib/table.ts +++ b/packages/@aws-cdk/aws-dynamodb/lib/table.ts @@ -1,6 +1,7 @@ import * as appscaling from '@aws-cdk/aws-applicationautoscaling'; import * as cloudwatch from '@aws-cdk/aws-cloudwatch'; import * as iam from '@aws-cdk/aws-iam'; +import * as kinesis from '@aws-cdk/aws-kinesis'; import * as kms from '@aws-cdk/aws-kms'; import { Aws, CfnCondition, CfnCustomResource, CfnResource, CustomResource, Duration, @@ -247,6 +248,13 @@ export interface TableProps extends TableOptions { * @default */ readonly tableName?: string; + + /** + * Kinesis Data Stream to capture item-level changes for the table. + * + * @default - no Kinesis Data Stream + */ + readonly kinesisStream?: kinesis.IStream; } /** @@ -1116,6 +1124,7 @@ export class Table extends TableBase { streamSpecification, timeToLiveSpecification: props.timeToLiveAttribute ? { attributeName: props.timeToLiveAttribute, enabled: true } : undefined, contributorInsightsSpecification: props.contributorInsightsEnabled !== undefined ? { enabled: props.contributorInsightsEnabled } : undefined, + kinesisStreamSpecification: props.kinesisStream ? { streamArn: props.kinesisStream.streamArn } : undefined, }); this.table.applyRemovalPolicy(props.removalPolicy); diff --git a/packages/@aws-cdk/aws-dynamodb/package.json b/packages/@aws-cdk/aws-dynamodb/package.json index 82e23dd8e6c86..84015fdc372fc 100644 --- a/packages/@aws-cdk/aws-dynamodb/package.json +++ b/packages/@aws-cdk/aws-dynamodb/package.json @@ -91,6 +91,7 @@ "@aws-cdk/aws-applicationautoscaling": "0.0.0", "@aws-cdk/aws-cloudwatch": "0.0.0", "@aws-cdk/aws-iam": "0.0.0", + "@aws-cdk/aws-kinesis": "0.0.0", "@aws-cdk/aws-kms": "0.0.0", "@aws-cdk/aws-lambda": "0.0.0", "@aws-cdk/core": "0.0.0", @@ -102,6 +103,7 @@ "@aws-cdk/aws-applicationautoscaling": "0.0.0", "@aws-cdk/aws-cloudwatch": "0.0.0", "@aws-cdk/aws-iam": "0.0.0", + "@aws-cdk/aws-kinesis": "0.0.0", "@aws-cdk/aws-kms": "0.0.0", "@aws-cdk/aws-lambda": "0.0.0", "@aws-cdk/core": "0.0.0", diff --git a/packages/@aws-cdk/aws-dynamodb/test/dynamodb.test.ts b/packages/@aws-cdk/aws-dynamodb/test/dynamodb.test.ts index c41771b59b078..de83b596ea1e4 100644 --- a/packages/@aws-cdk/aws-dynamodb/test/dynamodb.test.ts +++ b/packages/@aws-cdk/aws-dynamodb/test/dynamodb.test.ts @@ -2,6 +2,7 @@ import { arrayWith, ABSENT, ResourcePart, SynthUtils } from '@aws-cdk/assert-int import '@aws-cdk/assert-internal/jest'; import * as appscaling from '@aws-cdk/aws-applicationautoscaling'; import * as iam from '@aws-cdk/aws-iam'; +import * as kinesis from '@aws-cdk/aws-kinesis'; import * as kms from '@aws-cdk/aws-kms'; import { App, Aws, CfnDeletionPolicy, ConstructNode, Duration, PhysicalName, RemovalPolicy, Resource, Stack, Tags } from '@aws-cdk/core'; import * as cr from '@aws-cdk/custom-resources'; @@ -320,6 +321,7 @@ describe('default properties', () => { test('when specifying every property', () => { const stack = new Stack(); + const stream = new kinesis.Stream(stack, 'MyStream'); const table = new Table(stack, CONSTRUCT_NAME, { tableName: TABLE_NAME, readCapacity: 42, @@ -332,6 +334,7 @@ test('when specifying every property', () => { partitionKey: TABLE_PARTITION_KEY, sortKey: TABLE_SORT_KEY, contributorInsightsEnabled: true, + kinesisStream: stream, }); Tags.of(table).add('Environment', 'Production'); @@ -356,6 +359,11 @@ test('when specifying every property', () => { Tags: [{ Key: 'Environment', Value: 'Production' }], TimeToLiveSpecification: { AttributeName: 'timeToLive', Enabled: true }, ContributorInsightsSpecification: { Enabled: true }, + KinesisStreamSpecification: { + StreamArn: { + 'Fn::GetAtt': ['MyStream5C050E93', 'Arn'], + }, + }, }, ); }); diff --git a/packages/@aws-cdk/aws-dynamodb/test/integ.dynamodb.kinesis-stream.expected.json b/packages/@aws-cdk/aws-dynamodb/test/integ.dynamodb.kinesis-stream.expected.json new file mode 100644 index 0000000000000..77d522466ccf5 --- /dev/null +++ b/packages/@aws-cdk/aws-dynamodb/test/integ.dynamodb.kinesis-stream.expected.json @@ -0,0 +1,76 @@ +{ + "Resources": { + "Stream790BDEE4": { + "Type": "AWS::Kinesis::Stream", + "Properties": { + "ShardCount": 1, + "RetentionPeriodHours": 24, + "StreamEncryption": { + "Fn::If": [ + "AwsCdkKinesisEncryptedStreamsUnsupportedRegions", + { + "Ref": "AWS::NoValue" + }, + { + "EncryptionType": "KMS", + "KeyId": "alias/aws/kinesis" + } + ] + } + } + }, + "TableCD117FA1": { + "Type": "AWS::DynamoDB::Table", + "Properties": { + "KeySchema": [ + { + "AttributeName": "hashKey", + "KeyType": "HASH" + } + ], + "AttributeDefinitions": [ + { + "AttributeName": "hashKey", + "AttributeType": "S" + } + ], + "KinesisStreamSpecification": { + "StreamArn": { + "Fn::GetAtt": [ + "Stream790BDEE4", + "Arn" + ] + } + }, + "ProvisionedThroughput": { + "ReadCapacityUnits": 5, + "WriteCapacityUnits": 5 + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + } + }, + "Conditions": { + "AwsCdkKinesisEncryptedStreamsUnsupportedRegions": { + "Fn::Or": [ + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "cn-north-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "cn-northwest-1" + ] + } + ] + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-dynamodb/test/integ.dynamodb.kinesis-stream.ts b/packages/@aws-cdk/aws-dynamodb/test/integ.dynamodb.kinesis-stream.ts new file mode 100644 index 0000000000000..ea1c2650c7758 --- /dev/null +++ b/packages/@aws-cdk/aws-dynamodb/test/integ.dynamodb.kinesis-stream.ts @@ -0,0 +1,16 @@ +import * as kinesis from '@aws-cdk/aws-kinesis'; +import * as cdk from '@aws-cdk/core'; +import * as dynamodb from '../lib'; + +const app = new cdk.App(); +const stack = new cdk.Stack(app, 'aws-cdk-dynamodb-kinesis-stream'); + +const stream = new kinesis.Stream(stack, 'Stream'); + +new dynamodb.Table(stack, 'Table', { + partitionKey: { name: 'hashKey', type: dynamodb.AttributeType.STRING }, + removalPolicy: cdk.RemovalPolicy.DESTROY, + kinesisStream: stream, +}); + +app.synth(); From 8d048d62f757709159c8d7642bd4c316aecde6fd Mon Sep 17 00:00:00 2001 From: Adam Ruka Date: Mon, 21 Jun 2021 14:18:38 -0700 Subject: [PATCH 07/14] fix(core): parsing an ARN with a slash after a colon in the resource part fails (#15166) New-style ARNs are of the form `'arn:aws:s4:us-west-1:12345:/resource-type/resource-name'`. We didn't handle that correctly in `parseArn()`, and instead returned an `undefined` resource, which funnily enough should never happen according to our types. Introduce the concept of ARN formats, represented by an enum in core, and replace the `Stack.parseArn()` method by a new one `Stack.splitArn()`, taking that enum as a required second argument. Spotted in https://github.com/aws/aws-cdk/pull/15140/files#r653112073 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/core/lib/arn.ts | 199 ++++++++++++++++++------ packages/@aws-cdk/core/lib/stack.ts | 18 ++- packages/@aws-cdk/core/test/arn.test.ts | 62 +++++++- tools/nodeunit-shim/index.ts | 32 ++-- 4 files changed, 242 insertions(+), 69 deletions(-) diff --git a/packages/@aws-cdk/core/lib/arn.ts b/packages/@aws-cdk/core/lib/arn.ts index fe6b5b12b934b..343eb553e2cc7 100644 --- a/packages/@aws-cdk/core/lib/arn.ts +++ b/packages/@aws-cdk/core/lib/arn.ts @@ -3,6 +3,50 @@ import { Stack } from './stack'; import { Token } from './token'; import { filterUndefined } from './util'; +/** + * An enum representing the various ARN formats that different services use. + */ +export enum ArnFormat { + /** + * This represents a format where there is no 'resourceName' part. + * This format is used for S3 resources, + * like 'arn:aws:s3:::bucket'. + * Everything after the last colon is considered the 'resource', + * even if it contains slashes, + * like in 'arn:aws:s3:::bucket/object.zip'. + */ + NO_RESOURCE_NAME = 'arn:aws:service:region:account:resource', + + /** + * This represents a format where the 'resource' and 'resourceName' + * parts are separated with a colon. + * Like in: 'arn:aws:service:region:account:resource:resourceName'. + * Everything after the last colon is considered the 'resourceName', + * even if it contains slashes, + * like in 'arn:aws:apigateway:region:account:resource:/test/mydemoresource/*'. + */ + COLON_RESOURCE_NAME = 'arn:aws:service:region:account:resource:resourceName', + + /** + * This represents a format where the 'resource' and 'resourceName' + * parts are separated with a slash. + * Like in: 'arn:aws:service:region:account:resource/resourceName'. + * Everything after the separating slash is considered the 'resourceName', + * even if it contains colons, + * like in 'arn:aws:cognito-sync:region:account:identitypool/us-east-1:1a1a1a1a-ffff-1111-9999-12345678:bla'. + */ + SLASH_RESOURCE_NAME = 'arn:aws:service:region:account:resource/resourceName', + + /** + * This represents a format where the 'resource' and 'resourceName' + * parts are seperated with a slash, + * but there is also an additional slash after the colon separating 'account' from 'resource'. + * Like in: 'arn:aws:service:region:account:/resource/resourceName'. + * Note that the leading slash is _not_ included in the parsed 'resource' part. + */ + SLASH_RESOURCE_SLASH_RESOURCE_NAME = 'arn:aws:service:region:account:/resource/resourceName', +} + export interface ArnComponents { /** * The partition that the resource is in. For standard AWS regions, the @@ -48,6 +92,8 @@ export interface ArnComponents { * * Can be either '/', ':' or an empty string. Will only be used if resourceName is defined. * @default '/' + * + * @deprecated use arnFormat instead */ readonly sep?: string; @@ -56,6 +102,14 @@ export interface ArnComponents { * a wildcard such as ``"*"``. This is service-dependent. */ readonly resourceName?: string; + + /** + * The specific ARN format to use for this ARN value. + * + * @default - uses value of `sep` as the separator for formatting, + * `ArnFormat.SLASH_RESOURCE_NAME` if that property was also not provided + */ + readonly arnFormat?: ArnFormat; } export class Arn { @@ -80,9 +134,13 @@ export class Arn { const partition = components.partition ?? stack.partition; const region = components.region ?? stack.region; const account = components.account ?? stack.account; - const sep = components.sep ?? '/'; + const sep = components.sep ?? (components.arnFormat === ArnFormat.COLON_RESOURCE_NAME ? ':' : '/'); - const values = ['arn', ':', partition, ':', components.service, ':', region, ':', account, ':', components.resource]; + const values = [ + 'arn', ':', partition, ':', components.service, ':', region, ':', account, ':', + ...(components.arnFormat === ArnFormat.SLASH_RESOURCE_SLASH_RESOURCE_NAME ? ['/'] : []), + components.resource, + ]; if (sep !== '/' && sep !== ':' && sep !== '') { throw new Error('resourcePathSep may only be ":", "/" or an empty string'); @@ -133,11 +191,33 @@ export class Arn { * * @returns an ArnComponents object which allows access to the various * components of the ARN. + * + * @deprecated use split instead */ public static parse(arn: string, sepIfToken: string = '/', hasName: boolean = true): ArnComponents { + let arnFormat: ArnFormat; + if (!hasName) { + arnFormat = ArnFormat.NO_RESOURCE_NAME; + } else { + arnFormat = sepIfToken === '/' ? ArnFormat.SLASH_RESOURCE_NAME : ArnFormat.COLON_RESOURCE_NAME; + } + return this.split(arn, arnFormat); + } + + /** + * Splits the provided ARN into its components. + * Works both if 'arn' is a string like 'arn:aws:s3:::bucket', + * and a Token representing a dynamic CloudFormation expression + * (in which case the returned components will also be dynamic CloudFormation expressions, + * encoded as Tokens). + * + * @param arn the ARN to split into its components + * @param arnFormat the expected format of 'arn' - depends on what format the service 'arn' represents uses + */ + public static split(arn: string, arnFormat: ArnFormat): ArnComponents { const components = parseArnShape(arn); if (components === 'token') { - return parseToken(arn, sepIfToken, hasName); + return parseTokenArn(arn, arnFormat); } const [, partition, service, region, account, resourceTypeOrName, ...rest] = components; @@ -145,18 +225,41 @@ export class Arn { let resource: string; let resourceName: string | undefined; let sep: string | undefined; - - let sepIndex = resourceTypeOrName.indexOf('/'); - if (sepIndex !== -1) { - sep = '/'; + let resourcePartStartIndex = 0; + let detectedArnFormat: ArnFormat; + + let slashIndex = resourceTypeOrName.indexOf('/'); + if (slashIndex === 0) { + // new-style ARNs are of the form 'arn:aws:s4:us-west-1:12345:/resource-type/resource-name' + slashIndex = resourceTypeOrName.indexOf('/', 1); + resourcePartStartIndex = 1; + detectedArnFormat = ArnFormat.SLASH_RESOURCE_SLASH_RESOURCE_NAME; + } + if (slashIndex !== -1) { + // the slash is only a separator if ArnFormat is not NO_RESOURCE_NAME + if (arnFormat === ArnFormat.NO_RESOURCE_NAME) { + sep = undefined; + slashIndex = -1; + detectedArnFormat = ArnFormat.NO_RESOURCE_NAME; + } else { + sep = '/'; + detectedArnFormat = resourcePartStartIndex === 0 + ? ArnFormat.SLASH_RESOURCE_NAME + // need to repeat this here, as otherwise the compiler thinks 'detectedArnFormat' is not initialized in all paths + : ArnFormat.SLASH_RESOURCE_SLASH_RESOURCE_NAME; + } } else if (rest.length > 0) { sep = ':'; - sepIndex = -1; + slashIndex = -1; + detectedArnFormat = ArnFormat.COLON_RESOURCE_NAME; + } else { + sep = undefined; + detectedArnFormat = ArnFormat.NO_RESOURCE_NAME; } - if (sepIndex !== -1) { - resource = resourceTypeOrName.substr(0, sepIndex); - resourceName = resourceTypeOrName.substr(sepIndex + 1); + if (slashIndex !== -1) { + resource = resourceTypeOrName.substring(resourcePartStartIndex, slashIndex); + resourceName = resourceTypeOrName.substring(slashIndex + 1); } else { resource = resourceTypeOrName; } @@ -182,6 +285,7 @@ export class Arn { account, resourceName, sep, + arnFormat: detectedArnFormat, }); } @@ -232,32 +336,18 @@ export class Arn { * subexpressions of the ARN, not string literals. * * WARNING: this function cannot properly parse the complete final - * resourceName (path) out of ARNs that use '/' to both separate the - * 'resource' from the 'resourceName' AND to subdivide the resourceName - * further. For example, in S3 ARNs: - * - * arn:aws:s3:::my_corporate_bucket/path/to/exampleobject.png - * - * After parsing the resourceName will not contain 'path/to/exampleobject.png' - * but simply 'path'. This is a limitation because there is no slicing - * functionality in CloudFormation templates. + * 'resourceName' part if it contains colons, + * like 'arn:aws:cognito-sync:region:account:identitypool/us-east-1:1a1a1a1a-ffff-1111-9999-12345678:bla'. * * @param arnToken The input token that contains an ARN - * @param sep The separator used to separate resource from resourceName - * @param hasName Whether there is a name component in the ARN at all. - * For example, SNS Topics ARNs have the 'resource' component contain the - * topic name, and no 'resourceName' component. - * @returns an ArnComponents object which allows access to the various - * components of the ARN. + * @param arnFormat the expected format of 'arn' - depends on what format the service the ARN represents uses */ -function parseToken(arnToken: string, sep: string = '/', hasName: boolean = true): ArnComponents { - // Arn ARN looks like: - // arn:partition:service:region:account-id:resource - // arn:partition:service:region:account-id:resourcetype/resource - // arn:partition:service:region:account-id:resourcetype:resource - - // We need the 'hasName' argument because {Fn::Select}ing a nonexistent field - // throws an error. +function parseTokenArn(arnToken: string, arnFormat: ArnFormat): ArnComponents { + // ARN looks like: + // arn:partition:service:region:account:resource + // arn:partition:service:region:account:resource:resourceName + // arn:partition:service:region:account:resource/resourceName + // arn:partition:service:region:account:/resource/resourceName const components = Fn.split(':', arnToken); @@ -265,22 +355,39 @@ function parseToken(arnToken: string, sep: string = '/', hasName: boolean = true const service = Fn.select(2, components).toString(); const region = Fn.select(3, components).toString(); const account = Fn.select(4, components).toString(); - - if (sep === ':') { - const resource = Fn.select(5, components).toString(); - const resourceName = hasName ? Fn.select(6, components).toString() : undefined; - - return { partition, service, region, account, resource, resourceName, sep }; + let resource: string; + let resourceName: string | undefined; + let sep: string | undefined; + + if (arnFormat === ArnFormat.NO_RESOURCE_NAME || arnFormat === ArnFormat.COLON_RESOURCE_NAME) { + // we know that the 'resource' part will always be the 6th segment in this case + resource = Fn.select(5, components); + if (arnFormat === ArnFormat.COLON_RESOURCE_NAME) { + resourceName = Fn.select(6, components); + sep = ':'; + } else { + resourceName = undefined; + sep = undefined; + } } else { - const lastComponents = Fn.split(sep, Fn.select(5, components)); + // we know that the 'resource' and 'resourceName' parts are separated by slash here, + // so we split the 6th segment from the colon-separated ones with a slash + const lastComponents = Fn.split('/', Fn.select(5, components)); - const resource = Fn.select(0, lastComponents).toString(); - const resourceName = hasName ? Fn.select(1, lastComponents).toString() : undefined; - - return { partition, service, region, account, resource, resourceName, sep }; + if (arnFormat === ArnFormat.SLASH_RESOURCE_NAME) { + resource = Fn.select(0, lastComponents); + resourceName = Fn.select(1, lastComponents); + } else { + // arnFormat is ArnFormat.SLASH_RESOURCE_SLASH_RESOURCE_NAME, + // which means there's an extra slash there at the beginning that we need to skip + resource = Fn.select(1, lastComponents); + resourceName = Fn.select(2, lastComponents); + } + sep = '/'; } -} + return { partition, service, region, account, resource, resourceName, sep, arnFormat }; +} /** * Validate that a string is either unparseable or looks mostly like an ARN diff --git a/packages/@aws-cdk/core/lib/stack.ts b/packages/@aws-cdk/core/lib/stack.ts index b32095233b80d..a74a82e55ccd6 100644 --- a/packages/@aws-cdk/core/lib/stack.ts +++ b/packages/@aws-cdk/core/lib/stack.ts @@ -5,7 +5,7 @@ import * as cxapi from '@aws-cdk/cx-api'; import { IConstruct, Construct, Node } from 'constructs'; import { Annotations } from './annotations'; import { App } from './app'; -import { Arn, ArnComponents } from './arn'; +import { Arn, ArnComponents, ArnFormat } from './arn'; import { DockerImageAssetLocation, DockerImageAssetSource, FileAssetLocation, FileAssetSource } from './assets'; import { CfnElement } from './cfn-element'; import { Fn } from './cfn-fn'; @@ -609,11 +609,27 @@ export class Stack extends CoreConstruct implements ITaggable { * * @returns an ArnComponents object which allows access to the various * components of the ARN. + * + * @deprecated use splitArn instead */ public parseArn(arn: string, sepIfToken: string = '/', hasName: boolean = true): ArnComponents { return Arn.parse(arn, sepIfToken, hasName); } + /** + * Splits the provided ARN into its components. + * Works both if 'arn' is a string like 'arn:aws:s3:::bucket', + * and a Token representing a dynamic CloudFormation expression + * (in which case the returned components will also be dynamic CloudFormation expressions, + * encoded as Tokens). + * + * @param arn the ARN to split into its components + * @param arnFormat the expected format of 'arn' - depends on what format the service 'arn' represents uses + */ + public splitArn(arn: string, arnFormat: ArnFormat): ArnComponents { + return Arn.split(arn, arnFormat); + } + /** * Returns the list of AZs that are available in the AWS environment * (account/region) associated with this stack. diff --git a/packages/@aws-cdk/core/test/arn.test.ts b/packages/@aws-cdk/core/test/arn.test.ts index febbcc407c2b7..8f1a4d451a111 100644 --- a/packages/@aws-cdk/core/test/arn.test.ts +++ b/packages/@aws-cdk/core/test/arn.test.ts @@ -1,5 +1,5 @@ import { nodeunitShim, Test } from 'nodeunit-shim'; -import { Arn, ArnComponents, Aws, CfnOutput, ScopedAws, Stack, Token } from '../lib'; +import { Arn, ArnComponents, ArnFormat, Aws, CfnOutput, ScopedAws, Stack, Token } from '../lib'; import { Intrinsic } from '../lib/private/intrinsic'; import { evaluateCFN } from './evaluate-cfn'; import { toCloudFormation } from './util'; @@ -128,8 +128,13 @@ nodeunitShim({ }, 'various successful parses'(test: Test) { + interface TestArnComponents extends ArnComponents { + /** @default true */ + checkCfnEncoding?: boolean; + } + const stack = new Stack(); - const tests: { [arn: string]: ArnComponents } = { + const tests: { [arn: string]: TestArnComponents } = { 'arn:aws:a4b:region:accountid:resourcetype/resource': { partition: 'aws', service: 'a4b', @@ -138,6 +143,7 @@ nodeunitShim({ resource: 'resourcetype', resourceName: 'resource', sep: '/', + arnFormat: ArnFormat.SLASH_RESOURCE_NAME, }, 'arn:aws:apigateway:us-east-1::a123456789012bc3de45678901f23a45:/test/mydemoresource/*': { partition: 'aws', @@ -147,6 +153,7 @@ nodeunitShim({ resource: 'a123456789012bc3de45678901f23a45', sep: ':', resourceName: '/test/mydemoresource/*', + arnFormat: ArnFormat.COLON_RESOURCE_NAME, }, 'arn:aws-cn:cloud9::123456789012:environment:81e900317347585a0601e04c8d52eaEX': { partition: 'aws-cn', @@ -156,6 +163,7 @@ nodeunitShim({ resource: 'environment', resourceName: '81e900317347585a0601e04c8d52eaEX', sep: ':', + arnFormat: ArnFormat.COLON_RESOURCE_NAME, }, 'arn:aws:cognito-sync:::identitypool/us-east-1:1a1a1a1a-ffff-1111-9999-12345678:bla': { service: 'cognito-sync', @@ -165,6 +173,19 @@ nodeunitShim({ resource: 'identitypool', resourceName: 'us-east-1:1a1a1a1a-ffff-1111-9999-12345678:bla', sep: '/', + arnFormat: ArnFormat.SLASH_RESOURCE_NAME, + // ToDo: does not work currently, because we split on ':' first, which are present in resourceName here + checkCfnEncoding: false, + }, + 'arn:aws:servicecatalog:us-east-1:123456789012:/applications/0aqmvxvgmry0ecc4mjhwypun6i': { + resource: 'applications', + resourceName: '0aqmvxvgmry0ecc4mjhwypun6i', + sep: '/', + service: 'servicecatalog', + region: 'us-east-1', + account: '123456789012', + partition: 'aws', + arnFormat: ArnFormat.SLASH_RESOURCE_SLASH_RESOURCE_NAME, }, 'arn:aws:s3:::my_corporate_bucket': { partition: 'aws', @@ -172,13 +193,41 @@ nodeunitShim({ region: '', account: '', resource: 'my_corporate_bucket', + arnFormat: ArnFormat.NO_RESOURCE_NAME, + }, + 'arn:aws:s3:::my_corporate_bucket/object.zip': { + partition: 'aws', + service: 's3', + region: '', + account: '', + resource: 'my_corporate_bucket/object.zip', + arnFormat: ArnFormat.NO_RESOURCE_NAME, }, }; - Object.keys(tests).forEach(arn => { - const expected = tests[arn]; - test.deepEqual(stack.parseArn(arn), expected, arn); - }); + for (const [arn, expectedComponents] of Object.entries(tests)) { + const skipCheckingCfnEncoding = expectedComponents.checkCfnEncoding === false; + // delete the extra field so it doesn't screw up the equality comparison + delete expectedComponents.checkCfnEncoding; + + // test the basic case + const parsedComponents = stack.splitArn(arn, expectedComponents.arnFormat!); + test.deepEqual(parsedComponents, expectedComponents, arn); + + // test the round-trip + test.equal(stack.formatArn(parsedComponents), arn); + + // test that the CloudFormation functions we generate evaluate to the correct value + if (skipCheckingCfnEncoding) { + continue; + } + const tokenArnComponents = stack.splitArn( + Token.asString(new Intrinsic({ Ref: 'TheArn' })), + parsedComponents.arnFormat!); + const cfnArnComponents = stack.resolve(tokenArnComponents); + const evaluatedArnComponents = evaluateCFN(cfnArnComponents, { TheArn: arn }); + test.deepEqual(evaluatedArnComponents, parsedComponents); + } test.done(); }, @@ -250,6 +299,7 @@ nodeunitShim({ resource: 'role', resourceName: 'abc123', sep: '/', + arnFormat: ArnFormat.SLASH_RESOURCE_NAME, }; test.deepEqual(stack.parseArn(arn), expected, arn); diff --git a/tools/nodeunit-shim/index.ts b/tools/nodeunit-shim/index.ts index 8ba50bedefefd..ced735d9e6897 100644 --- a/tools/nodeunit-shim/index.ts +++ b/tools/nodeunit-shim/index.ts @@ -11,36 +11,36 @@ export class Test { constructor(private readonly cb: () => void) { } - public equal(a: any, b: any, _message?: string) { - expect(a).toEqual(b); + public equal(actual: any, expected: any, _message?: string) { + expect(actual).toEqual(expected); } - public notEqual(a: any, b: any, _message?: string) { - expect(a).not.toEqual(b); + public notEqual(actual: any, expected: any, _message?: string) { + expect(actual).not.toEqual(expected); } - public equals(a: any, b: any, _message?: string) { - expect(a).toEqual(b); + public equals(actual: any, expected: any, _message?: string) { + expect(actual).toEqual(expected); } - public strictEqual(a: any, b: any, _message?: string) { - expect(a).toEqual(b); + public strictEqual(actual: any, expected: any, _message?: string) { + expect(actual).toEqual(expected); } - public deepEqual(a: any, b: any, _message?: string) { - expect(a).toEqual(b); + public deepEqual(actual: any, expected: any, _message?: string) { + expect(actual).toEqual(expected); } - public notDeepEqual(a: any, b: any, _message?: string) { - expect(a).not.toEqual(b); + public notDeepEqual(actual: any, expected: any, _message?: string) { + expect(actual).not.toEqual(expected); } - public ok(a: any, _message?: string) { - expect(a).toBeTruthy(); + public ok(actual: any, _message?: string) { + expect(actual).toBeTruthy(); } - public same(a: any, b: any) { - expect(a).toBe(b); + public same(actual: any, expected: any) { + expect(actual).toBe(expected); } public throws(block: () => any, error?: string | RegExp | ErrorConstructor, _message?: string) { From 3eb023217dd60c1b58336e921857a5bd39f5c32f Mon Sep 17 00:00:00 2001 From: arcrank Date: Mon, 21 Jun 2021 20:00:05 -0400 Subject: [PATCH 08/14] fix(servicecatalog): Portfolio fails validation when passed Tokens as its properties (#15208) We currently do not check if inputs are token when validating them which might throw errors if it is given a `ref`, adding them in here and corresponding unit tests that do not throw validation errors when given tokens with invalid inputs. Also updated one test which had mismatched description. Also moved core to qualified import for better consistency. Testing done ------------------ * `yarn build && yarn lint & yarn test` ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../aws-servicecatalog/lib/portfolio.ts | 12 ++-- .../lib/private/validation.ts | 6 +- .../aws-servicecatalog/test/portfolio.test.ts | 63 ++++++++++++++++--- 3 files changed, 64 insertions(+), 17 deletions(-) diff --git a/packages/@aws-cdk/aws-servicecatalog/lib/portfolio.ts b/packages/@aws-cdk/aws-servicecatalog/lib/portfolio.ts index 99c78de06e692..c11c980bb4520 100644 --- a/packages/@aws-cdk/aws-servicecatalog/lib/portfolio.ts +++ b/packages/@aws-cdk/aws-servicecatalog/lib/portfolio.ts @@ -1,5 +1,5 @@ import * as iam from '@aws-cdk/aws-iam'; -import { IResource, Names, Resource, Stack } from '@aws-cdk/core'; +import * as cdk from '@aws-cdk/core'; import { AcceptLanguage } from './common'; import { hashValues } from './private/util'; import { InputValidator } from './private/validation'; @@ -29,7 +29,7 @@ export interface PortfolioShareOptions { /** * A Service Catalog portfolio. */ -export interface IPortfolio extends IResource { +export interface IPortfolio extends cdk.IResource { /** * The ARN of the portfolio. * @attribute @@ -68,7 +68,7 @@ export interface IPortfolio extends IResource { shareWithAccount(accountId: string, options?: PortfolioShareOptions): void; } -abstract class PortfolioBase extends Resource implements IPortfolio { +abstract class PortfolioBase extends cdk.Resource implements IPortfolio { public abstract readonly portfolioArn: string; public abstract readonly portfolioId: string; private readonly associatedPrincipals: Set = new Set(); @@ -156,7 +156,7 @@ export class Portfolio extends PortfolioBase { * @param portfolioArn the Amazon Resource Name of the existing portfolio. */ public static fromPortfolioArn(scope: Construct, id: string, portfolioArn: string): IPortfolio { - const arn = Stack.of(scope).parseArn(portfolioArn); + const arn = cdk.Stack.of(scope).parseArn(portfolioArn); const portfolioId = arn.resourceName; if (!portfolioId) { @@ -193,7 +193,7 @@ export class Portfolio extends PortfolioBase { acceptLanguage: props.acceptLanguage, }); this.portfolioId = this.portfolio.ref; - this.portfolioArn = Stack.of(this).formatArn({ + this.portfolioArn = cdk.Stack.of(this).formatArn({ service: 'servicecatalog', resource: 'portfolio', resourceName: this.portfolioId, @@ -201,7 +201,7 @@ export class Portfolio extends PortfolioBase { } protected generateUniqueHash(value: string): string { - return hashValues(Names.nodeUniqueId(this.portfolio.node), value); + return hashValues(cdk.Names.nodeUniqueId(this.portfolio.node), value); } private validatePortfolioProps(props: PortfolioProps) { diff --git a/packages/@aws-cdk/aws-servicecatalog/lib/private/validation.ts b/packages/@aws-cdk/aws-servicecatalog/lib/private/validation.ts index 95a802561a2be..054da93c0aa9d 100644 --- a/packages/@aws-cdk/aws-servicecatalog/lib/private/validation.ts +++ b/packages/@aws-cdk/aws-servicecatalog/lib/private/validation.ts @@ -1,3 +1,5 @@ +import * as cdk from '@aws-cdk/core'; + /** * Class to validate that inputs match requirements. */ @@ -6,7 +8,7 @@ export class InputValidator { * Validates length is between allowed min and max lengths. */ public static validateLength(resourceName: string, inputName: string, minLength: number, maxLength: number, inputString?: string): void { - if (inputString !== undefined && (inputString.length < minLength || inputString.length > maxLength)) { + if (!cdk.Token.isUnresolved(inputString) && inputString !== undefined && (inputString.length < minLength || inputString.length > maxLength)) { throw new Error(`Invalid ${inputName} for resource ${resourceName}, must have length between ${minLength} and ${maxLength}, got: '${this.truncateString(inputString, 100)}'`); } } @@ -17,4 +19,4 @@ export class InputValidator { } return string; } -} +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-servicecatalog/test/portfolio.test.ts b/packages/@aws-cdk/aws-servicecatalog/test/portfolio.test.ts index 9115b232a7e6c..c85bf4b05955c 100644 --- a/packages/@aws-cdk/aws-servicecatalog/test/portfolio.test.ts +++ b/packages/@aws-cdk/aws-servicecatalog/test/portfolio.test.ts @@ -1,13 +1,13 @@ import '@aws-cdk/assert-internal/jest'; -import { Stack, Tags } from '@aws-cdk/core'; import * as iam from '@aws-cdk/aws-iam'; +import * as cdk from '@aws-cdk/core'; import * as servicecatalog from '../lib'; describe('Portfolio', () => { - let stack: Stack; + let stack: cdk.Stack; beforeEach(() => { - stack = new Stack(); + stack = new cdk.Stack(); }); describe('portfolio creation and importing', () => { @@ -68,11 +68,10 @@ describe('Portfolio', () => { test('fails portfolio creation with long name', () => { expect(() => { new servicecatalog.Portfolio(stack, 'MyPortfolio', { - displayName: 'DisplayName', + displayName: 'DisplayName'.repeat(1000), providerName: 'testProvider', - description: 'A portfolio for some products'.repeat(1000), }); - }).toThrowError(/Invalid portfolio description for resource Default\/MyPortfolio/); + }).toThrowError(/Invalid portfolio display name for resource Default\/MyPortfolio/); }), test('fails portfolio creation with invalid provider name', () => { @@ -94,8 +93,54 @@ describe('Portfolio', () => { description: description, }); }).toThrowError(/Invalid portfolio description for resource Default\/MyPortfolio/); + }), + + test('portfolio creation with token description does not throw validation error and creates', () => { + const tokenDescription = new cdk.CfnParameter(stack, 'Description'); + + new servicecatalog.Portfolio(stack, 'MyPortfolio', { + displayName: 'testPortfolio', + providerName: 'testProvider', + description: tokenDescription.valueAsString, + }); + + expect(stack).toHaveResourceLike('AWS::ServiceCatalog::Portfolio', { + Description: { + Ref: 'Description', + }, + }); + }), + + test('portfolio creation with token display name does not throw validation error and creates', () => { + const tokenDisplayName = new cdk.CfnParameter(stack, 'DisplayName'); + + new servicecatalog.Portfolio(stack, 'MyPortfolio', { + displayName: tokenDisplayName.valueAsString, + providerName: 'testProvider', + }); + + expect(stack).toHaveResourceLike('AWS::ServiceCatalog::Portfolio', { + DisplayName: { + Ref: 'DisplayName', + }, + }); + }), + + test('portfolio creation with token provider name does not throw validation error and creates', () => { + const tokenProviderName = new cdk.CfnParameter(stack, 'ProviderName'); + + new servicecatalog.Portfolio(stack, 'MyPortfolio', { + displayName: 'testPortfolio', + providerName: tokenProviderName.valueAsString, + }); + + expect(stack).toHaveResourceLike('AWS::ServiceCatalog::Portfolio', { + ProviderName: { + Ref: 'ProviderName', + }, + }); }); - }), + }); describe('portfolio methods and associations', () => { let portfolio: servicecatalog.Portfolio; @@ -108,8 +153,8 @@ describe('Portfolio', () => { }); test('portfolio with tags', () => { - Tags.of(portfolio).add('myTestKey1', 'myTestKeyValue1'); - Tags.of(portfolio).add('myTestKey2', 'myTestKeyValue2'); + cdk.Tags.of(portfolio).add('myTestKey1', 'myTestKeyValue1'); + cdk.Tags.of(portfolio).add('myTestKey2', 'myTestKeyValue2'); expect(stack).toHaveResourceLike('AWS::ServiceCatalog::Portfolio', { Tags: [ From ea5fd85ef55158801378b5e8daa9252c2deb04b4 Mon Sep 17 00:00:00 2001 From: arcrank Date: Mon, 21 Jun 2021 20:48:44 -0400 Subject: [PATCH 09/14] feat(servicecatalogappregistry): initial L2 construct for Application (#15140) Service Catalog AppRegistry application construct initial base version. Please note the ARNS for this construct have two '/' in them hence the slightly different ARN parsing. Testing done ------------------ * `yarn build && yarn test` * `yarn integ` ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* Co-authored-by: Dillon Ponzo --- .../aws-servicecatalogappregistry/README.md | 36 ++++- .../lib/application.ts | 98 +++++++++++++ .../lib/index.ts | 2 + .../lib/private/validation.ts | 31 ++++ .../package.json | 13 +- .../test/application.test.ts | 132 ++++++++++++++++++ .../test/integ.application.expected.json | 11 ++ .../test/integ.application.ts | 13 ++ 8 files changed, 328 insertions(+), 8 deletions(-) create mode 100644 packages/@aws-cdk/aws-servicecatalogappregistry/lib/application.ts create mode 100644 packages/@aws-cdk/aws-servicecatalogappregistry/lib/private/validation.ts create mode 100644 packages/@aws-cdk/aws-servicecatalogappregistry/test/application.test.ts create mode 100644 packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application.expected.json create mode 100644 packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application.ts diff --git a/packages/@aws-cdk/aws-servicecatalogappregistry/README.md b/packages/@aws-cdk/aws-servicecatalogappregistry/README.md index 06ffc58a41c06..457121401a258 100644 --- a/packages/@aws-cdk/aws-servicecatalogappregistry/README.md +++ b/packages/@aws-cdk/aws-servicecatalogappregistry/README.md @@ -1,4 +1,4 @@ -# AWS::ServiceCatalogAppRegistry Construct Library +# AWS ServiceCatalogAppRegistry Construct Library --- @@ -9,12 +9,42 @@ > > [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib +![cdk-constructs: Experimental](https://img.shields.io/badge/cdk--constructs-experimental-important.svg?style=for-the-badge) + +> The APIs of higher level constructs in this module are experimental and under active development. +> They are subject to non-backward compatible changes or removal in any future version. These are +> not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be +> announced in the release notes. This means that while you may use them, you may need to update +> your source code when upgrading to a newer version of this package. + --- -This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. +[AWS Service Catalog App Registry](https://docs.aws.amazon.com/servicecatalog/latest/adminguide/appregistry.html) +enables organizations to create and manage repositores of applications and associated resources. + + +```ts +import * as appreg from '@aws-cdk/aws-servicecatalogappregistry'; +``` + +## Application + +An AppRegistry application enables you to define your applications and associated resources. +The application name must be unique at the account level, but is mutable. + +```ts +const application = new appreg.Application(this, 'MyFirstApplication', { + applicationName: 'MyFirstApplicationName', + description: 'description for my application', // the description is optional +}); +``` + +An application that has been created outside of the stack can be imported into your CDK app. +Applications can be imported by their ARN via the `Application.fromApplicationArn()` API: ```ts -import servicecatalogappregistry = require('@aws-cdk/aws-servicecatalogappregistry'); +const importedApplication = appreg.Application.fromApplicationArn(this, 'MyImportedApplication', + 'arn:aws:servicecatalog:us-east-1:012345678910:/applications/0aqmvxvgmry0ecc4mjhwypun6i'); ``` diff --git a/packages/@aws-cdk/aws-servicecatalogappregistry/lib/application.ts b/packages/@aws-cdk/aws-servicecatalogappregistry/lib/application.ts new file mode 100644 index 0000000000000..3f93a10671c82 --- /dev/null +++ b/packages/@aws-cdk/aws-servicecatalogappregistry/lib/application.ts @@ -0,0 +1,98 @@ +import * as cdk from '@aws-cdk/core'; +import { InputValidator } from './private/validation'; +import { CfnApplication } from './servicecatalogappregistry.generated'; + +// keep this import separate from other imports to reduce chance for merge conflicts with v2-main +// eslint-disable-next-line no-duplicate-imports, import/order +import { Construct } from 'constructs'; + +/** + * A Service Catalog AppRegistry Application. + */ +export interface IApplication extends cdk.IResource { + /** + * The ARN of the application. + * @attribute + */ + readonly applicationArn: string; + + /** + * The ID of the application. + * @attribute + */ + readonly applicationId: string; +} + +/** + * Properties for a Service Catalog AppRegistry Application + */ +export interface ApplicationProps { + /** + * Enforces a particular physical application name. + */ + readonly applicationName: string; + + /** + * Description for application. + * @default - No description provided + */ + readonly description?: string; +} + +abstract class ApplicationBase extends cdk.Resource implements IApplication { + public abstract readonly applicationArn: string; + public abstract readonly applicationId: string; +} + +/** + * A Service Catalog AppRegistry Application. + */ +export class Application extends ApplicationBase { + /** + * Imports an Application construct that represents an external application. + * + * @param scope The parent creating construct (usually `this`). + * @param id The construct's name. + * @param applicationArn the Amazon Resource Name of the existing AppRegistry Application + */ + public static fromApplicationArn(scope: Construct, id: string, applicationArn: string): IApplication { + const arn = cdk.Stack.of(scope).splitArn(applicationArn, cdk.ArnFormat.SLASH_RESOURCE_SLASH_RESOURCE_NAME); + const applicationId = arn.resourceName; + + if (!applicationId) { + throw new Error('Missing required Application ID from Application ARN: ' + applicationArn); + } + + class Import extends ApplicationBase { + public readonly applicationArn = applicationArn; + public readonly applicationId = applicationId!; + } + + return new Import(scope, id, { + environmentFromArn: applicationArn, + }); + } + + public readonly applicationArn: string; + public readonly applicationId: string; + + constructor(scope: Construct, id: string, props: ApplicationProps) { + super(scope, id); + + this.validateApplicationProps(props); + + const application = new CfnApplication(this, 'Resource', { + name: props.applicationName, + description: props.description, + }); + + this.applicationArn = application.attrArn; + this.applicationId = application.attrId; + } + + private validateApplicationProps(props: ApplicationProps) { + InputValidator.validateLength(this.node.path, 'application name', 1, 256, props.applicationName); + InputValidator.validateRegex(this.node.path, 'application name', /^[a-zA-Z0-9-_]+$/, props.applicationName); + InputValidator.validateLength(this.node.path, 'application description', 0, 1024, props.description); + } +} diff --git a/packages/@aws-cdk/aws-servicecatalogappregistry/lib/index.ts b/packages/@aws-cdk/aws-servicecatalogappregistry/lib/index.ts index ed6629976cbce..c38ecc6891ef1 100644 --- a/packages/@aws-cdk/aws-servicecatalogappregistry/lib/index.ts +++ b/packages/@aws-cdk/aws-servicecatalogappregistry/lib/index.ts @@ -1,2 +1,4 @@ +export * from './application'; + // AWS::ServiceCatalogAppRegistry CloudFormation Resources: export * from './servicecatalogappregistry.generated'; diff --git a/packages/@aws-cdk/aws-servicecatalogappregistry/lib/private/validation.ts b/packages/@aws-cdk/aws-servicecatalogappregistry/lib/private/validation.ts new file mode 100644 index 0000000000000..efee933061c3f --- /dev/null +++ b/packages/@aws-cdk/aws-servicecatalogappregistry/lib/private/validation.ts @@ -0,0 +1,31 @@ +import * as cdk from '@aws-cdk/core'; + +/** + * Class to validate that inputs match requirements. + */ +export class InputValidator { + /** + * Validates length is between allowed min and max lengths. + */ + public static validateLength(resourceName: string, inputName: string, minLength: number, maxLength: number, inputString?: string): void { + if (!cdk.Token.isUnresolved(inputString) && inputString !== undefined && (inputString.length < minLength || inputString.length > maxLength)) { + throw new Error(`Invalid ${inputName} for resource ${resourceName}, must have length between ${minLength} and ${maxLength}, got: '${this.truncateString(inputString, 100)}'`); + } + } + + /** + * Validates a regex. + */ + public static validateRegex(resourceName: string, inputName: string, regex: RegExp, inputString?: string): void { + if (!cdk.Token.isUnresolved(inputString) && inputString !== undefined && !regex.test(inputString)) { + throw new Error(`Invalid ${inputName} for resource ${resourceName}, must match regex pattern ${regex}, got: '${this.truncateString(inputString, 100)}'`); + } + } + + private static truncateString(string: string, maxLength: number): string { + if (string.length > maxLength) { + return string.substring(0, maxLength) + '[truncated]'; + } + return string; + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-servicecatalogappregistry/package.json b/packages/@aws-cdk/aws-servicecatalogappregistry/package.json index e47ca12cdb370..e29e277575c45 100644 --- a/packages/@aws-cdk/aws-servicecatalogappregistry/package.json +++ b/packages/@aws-cdk/aws-servicecatalogappregistry/package.json @@ -77,23 +77,26 @@ }, "license": "Apache-2.0", "devDependencies": { + "@aws-cdk/assert-internal": "0.0.0", "@types/jest": "^26.0.23", "cdk-build-tools": "0.0.0", + "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", - "pkglint": "0.0.0", - "@aws-cdk/assert-internal": "0.0.0" + "pkglint": "0.0.0" }, "dependencies": { - "@aws-cdk/core": "0.0.0" + "@aws-cdk/core": "0.0.0", + "constructs": "^3.3.69" }, "peerDependencies": { - "@aws-cdk/core": "0.0.0" + "@aws-cdk/core": "0.0.0", + "constructs": "^3.3.69" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" }, "stability": "experimental", - "maturity": "cfn-only", + "maturity": "experimental", "awscdkio": { "announce": false }, diff --git a/packages/@aws-cdk/aws-servicecatalogappregistry/test/application.test.ts b/packages/@aws-cdk/aws-servicecatalogappregistry/test/application.test.ts new file mode 100644 index 0000000000000..6dc3c9e823105 --- /dev/null +++ b/packages/@aws-cdk/aws-servicecatalogappregistry/test/application.test.ts @@ -0,0 +1,132 @@ +import '@aws-cdk/assert-internal/jest'; +import * as cdk from '@aws-cdk/core'; +import * as appreg from '../lib'; + +describe('Application', () => { + let stack: cdk.Stack; + + beforeEach(() => { + stack = new cdk.Stack(); + }); + + test('default application creation', () => { + new appreg.Application(stack, 'MyApplication', { + applicationName: 'testApplication', + }); + + expect(stack).toMatchTemplate({ + Resources: { + MyApplication5C63EC1D: { + Type: 'AWS::ServiceCatalogAppRegistry::Application', + Properties: { + Name: 'testApplication', + }, + }, + }, + }); + }), + + test('application with explicit description', () => { + const description = 'my test application description'; + new appreg.Application(stack, 'MyApplication', { + applicationName: 'testApplication', + description: description, + }); + + expect(stack).toHaveResourceLike('AWS::ServiceCatalogAppRegistry::Application', { + Description: description, + }); + }), + + test('application with application tags', () => { + const application = new appreg.Application(stack, 'MyApplication', { + applicationName: 'testApplication', + }); + + cdk.Tags.of(application).add('key1', 'value1'); + cdk.Tags.of(application).add('key2', 'value2'); + + expect(stack).toHaveResourceLike('AWS::ServiceCatalogAppRegistry::Application', { + Tags: { + key1: 'value1', + key2: 'value2', + }, + }); + }), + + test('for an application imported by ARN', () => { + const application = appreg.Application.fromApplicationArn(stack, 'MyApplication', + 'arn:aws:servicecatalog:us-east-1:123456789012:/applications/0aqmvxvgmry0ecc4mjhwypun6i'); + expect(application.applicationId).toEqual('0aqmvxvgmry0ecc4mjhwypun6i'); + }), + + test('fails for application imported by ARN missing applicationId', () => { + expect(() => { + appreg.Application.fromApplicationArn(stack, 'MyApplication', + 'arn:aws:servicecatalog:us-east-1:123456789012:/applications/'); + }).toThrow(/Missing required Application ID from Application ARN:/); + }), + + test('application created with a token description does not throw validation error and creates', () => { + const tokenDescription = new cdk.CfnParameter(stack, 'Description'); + + new appreg.Application(stack, 'MyApplication', { + applicationName: 'myApplication', + description: tokenDescription.valueAsString, + }); + + expect(stack).toHaveResourceLike('AWS::ServiceCatalogAppRegistry::Application', { + Description: { + Ref: 'Description', + }, + }); + }), + + test('application created with a token application name does not throw validation error', () => { + const tokenApplicationName= new cdk.CfnParameter(stack, 'ApplicationName'); + + new appreg.Application(stack, 'MyApplication', { + applicationName: tokenApplicationName.valueAsString, + }); + + expect(stack).toHaveResourceLike('AWS::ServiceCatalogAppRegistry::Application', { + Name: { + Ref: 'ApplicationName', + }, + }); + }), + + test('fails for application with description length longer than allowed', () => { + expect(() => { + new appreg.Application(stack, 'MyApplication', { + applicationName: 'testApplication', + description: 'too long description'.repeat(1000), + }); + }).toThrow(/Invalid application description for resource/); + }), + + test('fails for application creation with name too short', () => { + expect(() => { + new appreg.Application(stack, 'MyApplication', { + applicationName: '', + }); + }).toThrow(/Invalid application name for resource/); + }), + + test('fails for application with name too long', () => { + expect(() => { + new appreg.Application(stack, 'MyApplication', { + applicationName: 'testApplication'.repeat(50), + }); + }).toThrow(/Invalid application name for resource/); + }), + + test('fails for application with name of invalid characters', () => { + expect(() => { + new appreg.Application(stack, 'MyApplication', { + applicationName: 'My@ppl!iC@ #', + }); + }).toThrow(/Invalid application name for resource/); + }); +}); + diff --git a/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application.expected.json b/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application.expected.json new file mode 100644 index 0000000000000..9daac86f4dd5c --- /dev/null +++ b/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application.expected.json @@ -0,0 +1,11 @@ +{ + "Resources": { + "TestApplication2FBC585F": { + "Type": "AWS::ServiceCatalogAppRegistry::Application", + "Properties": { + "Name": "myApplicationtest", + "Description": "my application description" + } + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application.ts b/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application.ts new file mode 100644 index 0000000000000..1c3e3cdeb2696 --- /dev/null +++ b/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application.ts @@ -0,0 +1,13 @@ +import * as cdk from '@aws-cdk/core'; +import * as appreg from '../lib'; + +const app = new cdk.App(); +const stack = new cdk.Stack(app, 'integ-servicecatalogappregistry-application'); + +new appreg.Application(stack, 'TestApplication', { + applicationName: 'myApplicationtest', + description: 'my application description', +}); + +app.synth(); + From 26cf1f93e48a6ff6dc06591b8e7431def1a64868 Mon Sep 17 00:00:00 2001 From: Romain Marcadier Date: Tue, 22 Jun 2021 16:19:33 +0200 Subject: [PATCH 10/14] chore: package .lit.ts files and rosetta/ (#15064) The `rosetta/` directory contains fixtures that may be necessary to compile code examples, and the `.lit.ts` represents module documentation that may be necessary to generate the complete module documentation site from the published artifacts. Those hence need to be included in the npm package. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/alexa-ask/.npmignore | 3 ++- packages/@aws-cdk/app-delivery/.npmignore | 3 ++- packages/@aws-cdk/assertions/.npmignore | 3 ++- packages/@aws-cdk/assets/.npmignore | 3 ++- packages/@aws-cdk/aws-accessanalyzer/.npmignore | 3 ++- packages/@aws-cdk/aws-acmpca/.npmignore | 3 ++- packages/@aws-cdk/aws-amazonmq/.npmignore | 3 ++- packages/@aws-cdk/aws-amplify/.npmignore | 3 ++- packages/@aws-cdk/aws-apigateway/.npmignore | 3 ++- packages/@aws-cdk/aws-apigatewayv2-authorizers/.npmignore | 3 ++- packages/@aws-cdk/aws-apigatewayv2-integrations/.npmignore | 3 ++- packages/@aws-cdk/aws-apigatewayv2/.npmignore | 3 ++- packages/@aws-cdk/aws-appconfig/.npmignore | 3 ++- packages/@aws-cdk/aws-appflow/.npmignore | 3 ++- packages/@aws-cdk/aws-appintegrations/.npmignore | 2 ++ packages/@aws-cdk/aws-applicationautoscaling/.npmignore | 3 ++- packages/@aws-cdk/aws-applicationinsights/.npmignore | 3 ++- packages/@aws-cdk/aws-appmesh/.npmignore | 3 ++- packages/@aws-cdk/aws-apprunner/.npmignore | 2 ++ packages/@aws-cdk/aws-appstream/.npmignore | 3 ++- packages/@aws-cdk/aws-appsync/.npmignore | 3 ++- packages/@aws-cdk/aws-athena/.npmignore | 3 ++- packages/@aws-cdk/aws-auditmanager/.npmignore | 2 ++ packages/@aws-cdk/aws-autoscaling-common/.npmignore | 3 ++- packages/@aws-cdk/aws-autoscaling-hooktargets/.npmignore | 3 ++- packages/@aws-cdk/aws-autoscaling/.npmignore | 3 ++- packages/@aws-cdk/aws-autoscalingplans/.npmignore | 3 ++- packages/@aws-cdk/aws-backup/.npmignore | 3 ++- packages/@aws-cdk/aws-batch/.npmignore | 3 ++- packages/@aws-cdk/aws-budgets/.npmignore | 3 ++- packages/@aws-cdk/aws-cassandra/.npmignore | 3 ++- packages/@aws-cdk/aws-ce/.npmignore | 3 ++- packages/@aws-cdk/aws-certificatemanager/.npmignore | 3 ++- packages/@aws-cdk/aws-chatbot/.npmignore | 3 ++- packages/@aws-cdk/aws-cloud9/.npmignore | 3 ++- packages/@aws-cdk/aws-cloudformation/.npmignore | 3 ++- packages/@aws-cdk/aws-cloudfront-origins/.npmignore | 3 ++- packages/@aws-cdk/aws-cloudfront/.npmignore | 3 ++- packages/@aws-cdk/aws-cloudtrail/.npmignore | 3 ++- packages/@aws-cdk/aws-cloudwatch-actions/.npmignore | 3 ++- packages/@aws-cdk/aws-cloudwatch/.npmignore | 3 ++- packages/@aws-cdk/aws-codeartifact/.npmignore | 3 ++- packages/@aws-cdk/aws-codebuild/.npmignore | 3 ++- packages/@aws-cdk/aws-codecommit/.npmignore | 3 ++- packages/@aws-cdk/aws-codedeploy/.npmignore | 3 ++- packages/@aws-cdk/aws-codeguruprofiler/.npmignore | 3 ++- packages/@aws-cdk/aws-codegurureviewer/.npmignore | 3 ++- packages/@aws-cdk/aws-codepipeline-actions/.npmignore | 3 ++- packages/@aws-cdk/aws-codepipeline/.npmignore | 3 ++- packages/@aws-cdk/aws-codestar/.npmignore | 3 ++- packages/@aws-cdk/aws-codestarconnections/.npmignore | 3 ++- packages/@aws-cdk/aws-codestarnotifications/.npmignore | 3 ++- packages/@aws-cdk/aws-cognito/.npmignore | 3 ++- packages/@aws-cdk/aws-config/.npmignore | 3 ++- packages/@aws-cdk/aws-cur/.npmignore | 2 ++ packages/@aws-cdk/aws-customerprofiles/.npmignore | 2 ++ packages/@aws-cdk/aws-databrew/.npmignore | 2 ++ packages/@aws-cdk/aws-datapipeline/.npmignore | 3 ++- packages/@aws-cdk/aws-datasync/.npmignore | 2 ++ packages/@aws-cdk/aws-dax/.npmignore | 3 ++- packages/@aws-cdk/aws-detective/.npmignore | 3 ++- packages/@aws-cdk/aws-devopsguru/.npmignore | 2 ++ packages/@aws-cdk/aws-directoryservice/.npmignore | 3 ++- packages/@aws-cdk/aws-dlm/.npmignore | 3 ++- packages/@aws-cdk/aws-dms/.npmignore | 3 ++- packages/@aws-cdk/aws-docdb/.npmignore | 3 ++- packages/@aws-cdk/aws-dynamodb-global/.npmignore | 3 ++- packages/@aws-cdk/aws-dynamodb/.npmignore | 3 ++- packages/@aws-cdk/aws-ec2/.npmignore | 3 ++- packages/@aws-cdk/aws-ecr-assets/.npmignore | 3 ++- packages/@aws-cdk/aws-ecr/.npmignore | 2 ++ packages/@aws-cdk/aws-ecs-patterns/.npmignore | 3 ++- packages/@aws-cdk/aws-ecs/.npmignore | 3 ++- packages/@aws-cdk/aws-efs/.npmignore | 3 ++- packages/@aws-cdk/aws-eks-legacy/.npmignore | 3 ++- packages/@aws-cdk/aws-eks/.npmignore | 3 ++- packages/@aws-cdk/aws-elasticache/.npmignore | 3 ++- packages/@aws-cdk/aws-elasticbeanstalk/.npmignore | 3 ++- packages/@aws-cdk/aws-elasticloadbalancing/.npmignore | 3 ++- .../@aws-cdk/aws-elasticloadbalancingv2-actions/.npmignore | 3 ++- .../@aws-cdk/aws-elasticloadbalancingv2-targets/.npmignore | 3 ++- packages/@aws-cdk/aws-elasticloadbalancingv2/.npmignore | 3 ++- packages/@aws-cdk/aws-elasticsearch/.npmignore | 3 ++- packages/@aws-cdk/aws-emr/.npmignore | 3 ++- packages/@aws-cdk/aws-emrcontainers/.npmignore | 2 ++ packages/@aws-cdk/aws-events-targets/.npmignore | 3 ++- packages/@aws-cdk/aws-events/.npmignore | 3 ++- packages/@aws-cdk/aws-eventschemas/.npmignore | 3 ++- packages/@aws-cdk/aws-finspace/.npmignore | 2 ++ packages/@aws-cdk/aws-fis/.npmignore | 2 ++ packages/@aws-cdk/aws-fms/.npmignore | 3 ++- packages/@aws-cdk/aws-frauddetector/.npmignore | 2 ++ packages/@aws-cdk/aws-fsx/.npmignore | 3 ++- packages/@aws-cdk/aws-gamelift/.npmignore | 3 ++- .../@aws-cdk/aws-globalaccelerator-endpoints/.npmignore | 3 ++- packages/@aws-cdk/aws-globalaccelerator/.npmignore | 3 ++- packages/@aws-cdk/aws-glue/.npmignore | 3 ++- packages/@aws-cdk/aws-greengrass/.npmignore | 3 ++- packages/@aws-cdk/aws-greengrassv2/.npmignore | 3 ++- packages/@aws-cdk/aws-groundstation/.npmignore | 2 ++ packages/@aws-cdk/aws-guardduty/.npmignore | 3 ++- packages/@aws-cdk/aws-iam/.npmignore | 3 ++- packages/@aws-cdk/aws-imagebuilder/.npmignore | 3 ++- packages/@aws-cdk/aws-inspector/.npmignore | 3 ++- packages/@aws-cdk/aws-iot/.npmignore | 3 ++- packages/@aws-cdk/aws-iot1click/.npmignore | 3 ++- packages/@aws-cdk/aws-iotanalytics/.npmignore | 3 ++- packages/@aws-cdk/aws-iotcoredeviceadvisor/.npmignore | 2 ++ packages/@aws-cdk/aws-iotevents/.npmignore | 3 ++- packages/@aws-cdk/aws-iotfleethub/.npmignore | 2 ++ packages/@aws-cdk/aws-iotsitewise/.npmignore | 2 ++ packages/@aws-cdk/aws-iotthingsgraph/.npmignore | 3 ++- packages/@aws-cdk/aws-iotwireless/.npmignore | 2 ++ packages/@aws-cdk/aws-ivs/.npmignore | 2 ++ packages/@aws-cdk/aws-kendra/.npmignore | 3 ++- packages/@aws-cdk/aws-kinesis/.npmignore | 3 ++- packages/@aws-cdk/aws-kinesisanalytics-flink/.npmignore | 3 ++- packages/@aws-cdk/aws-kinesisanalytics/.npmignore | 3 ++- packages/@aws-cdk/aws-kinesisfirehose/.npmignore | 3 ++- packages/@aws-cdk/aws-kms/.npmignore | 3 ++- packages/@aws-cdk/aws-lakeformation/.npmignore | 3 ++- packages/@aws-cdk/aws-lambda-destinations/.npmignore | 3 ++- packages/@aws-cdk/aws-lambda-event-sources/.npmignore | 3 ++- packages/@aws-cdk/aws-lambda-go/.npmignore | 2 ++ packages/@aws-cdk/aws-lambda-nodejs/.npmignore | 3 ++- packages/@aws-cdk/aws-lambda-python/.npmignore | 3 ++- packages/@aws-cdk/aws-lambda/.npmignore | 3 ++- packages/@aws-cdk/aws-licensemanager/.npmignore | 2 ++ packages/@aws-cdk/aws-location/.npmignore | 2 ++ packages/@aws-cdk/aws-logs-destinations/.npmignore | 3 ++- packages/@aws-cdk/aws-logs/.npmignore | 3 ++- packages/@aws-cdk/aws-lookoutmetrics/.npmignore | 2 ++ packages/@aws-cdk/aws-lookoutvision/.npmignore | 2 ++ packages/@aws-cdk/aws-macie/.npmignore | 3 ++- packages/@aws-cdk/aws-managedblockchain/.npmignore | 3 ++- packages/@aws-cdk/aws-mediaconnect/.npmignore | 2 ++ packages/@aws-cdk/aws-mediaconvert/.npmignore | 3 ++- packages/@aws-cdk/aws-medialive/.npmignore | 3 ++- packages/@aws-cdk/aws-mediapackage/.npmignore | 2 ++ packages/@aws-cdk/aws-mediastore/.npmignore | 3 ++- packages/@aws-cdk/aws-msk/.npmignore | 3 ++- packages/@aws-cdk/aws-mwaa/.npmignore | 2 ++ packages/@aws-cdk/aws-neptune/.npmignore | 3 ++- packages/@aws-cdk/aws-networkfirewall/.npmignore | 2 ++ packages/@aws-cdk/aws-networkmanager/.npmignore | 3 ++- packages/@aws-cdk/aws-nimblestudio/.npmignore | 2 ++ packages/@aws-cdk/aws-opsworks/.npmignore | 3 ++- packages/@aws-cdk/aws-opsworkscm/.npmignore | 3 ++- packages/@aws-cdk/aws-pinpoint/.npmignore | 3 ++- packages/@aws-cdk/aws-pinpointemail/.npmignore | 3 ++- packages/@aws-cdk/aws-qldb/.npmignore | 3 ++- packages/@aws-cdk/aws-quicksight/.npmignore | 2 ++ packages/@aws-cdk/aws-ram/.npmignore | 3 ++- packages/@aws-cdk/aws-rds/.npmignore | 3 ++- packages/@aws-cdk/aws-redshift/.npmignore | 3 ++- packages/@aws-cdk/aws-resourcegroups/.npmignore | 3 ++- packages/@aws-cdk/aws-robomaker/.npmignore | 3 ++- packages/@aws-cdk/aws-route53-patterns/.npmignore | 3 ++- packages/@aws-cdk/aws-route53-targets/.npmignore | 3 ++- packages/@aws-cdk/aws-route53/.npmignore | 3 ++- packages/@aws-cdk/aws-route53resolver/.npmignore | 3 ++- packages/@aws-cdk/aws-s3-assets/.npmignore | 3 ++- packages/@aws-cdk/aws-s3-deployment/.npmignore | 3 ++- packages/@aws-cdk/aws-s3-notifications/.npmignore | 3 ++- packages/@aws-cdk/aws-s3/.npmignore | 3 ++- packages/@aws-cdk/aws-s3objectlambda/.npmignore | 2 ++ packages/@aws-cdk/aws-s3outposts/.npmignore | 2 ++ packages/@aws-cdk/aws-sagemaker/.npmignore | 3 ++- packages/@aws-cdk/aws-sam/.npmignore | 3 ++- packages/@aws-cdk/aws-sdb/.npmignore | 3 ++- packages/@aws-cdk/aws-secretsmanager/.npmignore | 2 ++ packages/@aws-cdk/aws-securityhub/.npmignore | 3 ++- packages/@aws-cdk/aws-servicecatalog/.npmignore | 3 ++- packages/@aws-cdk/aws-servicecatalogappregistry/.npmignore | 2 ++ packages/@aws-cdk/aws-servicediscovery/.npmignore | 3 ++- packages/@aws-cdk/aws-ses-actions/.npmignore | 3 ++- packages/@aws-cdk/aws-ses/.npmignore | 3 ++- packages/@aws-cdk/aws-signer/.npmignore | 2 ++ packages/@aws-cdk/aws-sns-subscriptions/.npmignore | 3 ++- packages/@aws-cdk/aws-sns/.npmignore | 3 ++- packages/@aws-cdk/aws-sqs/.npmignore | 3 ++- packages/@aws-cdk/aws-ssm/.npmignore | 3 ++- packages/@aws-cdk/aws-ssmcontacts/.npmignore | 2 ++ packages/@aws-cdk/aws-ssmincidents/.npmignore | 2 ++ packages/@aws-cdk/aws-sso/.npmignore | 3 ++- packages/@aws-cdk/aws-stepfunctions-tasks/.npmignore | 3 ++- packages/@aws-cdk/aws-stepfunctions/.npmignore | 3 ++- packages/@aws-cdk/aws-synthetics/.npmignore | 3 ++- packages/@aws-cdk/aws-timestream/.npmignore | 3 ++- packages/@aws-cdk/aws-transfer/.npmignore | 3 ++- packages/@aws-cdk/aws-waf/.npmignore | 3 ++- packages/@aws-cdk/aws-wafregional/.npmignore | 3 ++- packages/@aws-cdk/aws-wafv2/.npmignore | 3 ++- packages/@aws-cdk/aws-workspaces/.npmignore | 3 ++- packages/@aws-cdk/aws-xray/.npmignore | 2 ++ packages/@aws-cdk/cdk-assets-schema/.npmignore | 3 ++- packages/@aws-cdk/cloud-assembly-schema/.npmignore | 3 ++- packages/@aws-cdk/cloudformation-include/.npmignore | 3 ++- packages/@aws-cdk/core/.npmignore | 3 ++- packages/@aws-cdk/custom-resources/.npmignore | 3 ++- packages/@aws-cdk/cx-api/.npmignore | 3 ++- packages/@aws-cdk/example-construct-library/.npmignore | 3 ++- packages/@aws-cdk/lambda-layer-awscli/.npmignore | 2 ++ packages/@aws-cdk/lambda-layer-kubectl/.npmignore | 2 ++ packages/@aws-cdk/pipelines/.npmignore | 2 ++ packages/@aws-cdk/region-info/.npmignore | 3 ++- packages/@aws-cdk/yaml-cfn/.npmignore | 3 ++- packages/aws-cdk-lib/.npmignore | 3 ++- packages/monocdk/.npmignore | 3 ++- packages/monocdk/rosetta/default.ts-fixture | 1 - scripts/check-build-prerequisites.sh | 6 +++--- scripts/check-pack-prerequisites.sh | 4 ++-- tools/pkglint/lib/rules.ts | 1 + yarn.lock | 2 +- 214 files changed, 425 insertions(+), 175 deletions(-) diff --git a/packages/@aws-cdk/alexa-ask/.npmignore b/packages/@aws-cdk/alexa-ask/.npmignore index 207e92300ba4a..ab6d20fee7d79 100644 --- a/packages/@aws-cdk/alexa-ask/.npmignore +++ b/packages/@aws-cdk/alexa-ask/.npmignore @@ -27,4 +27,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/app-delivery/.npmignore b/packages/@aws-cdk/app-delivery/.npmignore index d04129afefc48..b0d9cb5dd2512 100644 --- a/packages/@aws-cdk/app-delivery/.npmignore +++ b/packages/@aws-cdk/app-delivery/.npmignore @@ -21,4 +21,5 @@ tsconfig.json # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/assertions/.npmignore b/packages/@aws-cdk/assertions/.npmignore index 24f98e142c79a..cb9b5659bd7ca 100644 --- a/packages/@aws-cdk/assertions/.npmignore +++ b/packages/@aws-cdk/assertions/.npmignore @@ -21,4 +21,5 @@ jest.config.js junit.xml test/ !.jsii -!*.js \ No newline at end of file +!*.js +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/assets/.npmignore b/packages/@aws-cdk/assets/.npmignore index a94c531529866..9a032ae80868c 100644 --- a/packages/@aws-cdk/assets/.npmignore +++ b/packages/@aws-cdk/assets/.npmignore @@ -23,4 +23,5 @@ tsconfig.json # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-accessanalyzer/.npmignore b/packages/@aws-cdk/aws-accessanalyzer/.npmignore index c2827f80c26db..294b1464a0155 100644 --- a/packages/@aws-cdk/aws-accessanalyzer/.npmignore +++ b/packages/@aws-cdk/aws-accessanalyzer/.npmignore @@ -24,4 +24,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-acmpca/.npmignore b/packages/@aws-cdk/aws-acmpca/.npmignore index 5bd978c36b820..326e5850d930f 100644 --- a/packages/@aws-cdk/aws-acmpca/.npmignore +++ b/packages/@aws-cdk/aws-acmpca/.npmignore @@ -25,4 +25,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-amazonmq/.npmignore b/packages/@aws-cdk/aws-amazonmq/.npmignore index 2892fc6e99416..778a9ab8b203a 100644 --- a/packages/@aws-cdk/aws-amazonmq/.npmignore +++ b/packages/@aws-cdk/aws-amazonmq/.npmignore @@ -28,4 +28,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-amplify/.npmignore b/packages/@aws-cdk/aws-amplify/.npmignore index f3eaded585e2d..8d5646d700888 100644 --- a/packages/@aws-cdk/aws-amplify/.npmignore +++ b/packages/@aws-cdk/aws-amplify/.npmignore @@ -28,4 +28,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-apigateway/.npmignore b/packages/@aws-cdk/aws-apigateway/.npmignore index 63ab95621c764..aaabf1df59065 100644 --- a/packages/@aws-cdk/aws-apigateway/.npmignore +++ b/packages/@aws-cdk/aws-apigateway/.npmignore @@ -24,4 +24,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-apigatewayv2-authorizers/.npmignore b/packages/@aws-cdk/aws-apigatewayv2-authorizers/.npmignore index 093c734b1bd2f..412fc61891e74 100644 --- a/packages/@aws-cdk/aws-apigatewayv2-authorizers/.npmignore +++ b/packages/@aws-cdk/aws-apigatewayv2-authorizers/.npmignore @@ -25,4 +25,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-apigatewayv2-integrations/.npmignore b/packages/@aws-cdk/aws-apigatewayv2-integrations/.npmignore index 093c734b1bd2f..412fc61891e74 100644 --- a/packages/@aws-cdk/aws-apigatewayv2-integrations/.npmignore +++ b/packages/@aws-cdk/aws-apigatewayv2-integrations/.npmignore @@ -25,4 +25,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-apigatewayv2/.npmignore b/packages/@aws-cdk/aws-apigatewayv2/.npmignore index 093c734b1bd2f..412fc61891e74 100644 --- a/packages/@aws-cdk/aws-apigatewayv2/.npmignore +++ b/packages/@aws-cdk/aws-apigatewayv2/.npmignore @@ -25,4 +25,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-appconfig/.npmignore b/packages/@aws-cdk/aws-appconfig/.npmignore index 5bd978c36b820..326e5850d930f 100644 --- a/packages/@aws-cdk/aws-appconfig/.npmignore +++ b/packages/@aws-cdk/aws-appconfig/.npmignore @@ -25,4 +25,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-appflow/.npmignore b/packages/@aws-cdk/aws-appflow/.npmignore index 5bd978c36b820..326e5850d930f 100644 --- a/packages/@aws-cdk/aws-appflow/.npmignore +++ b/packages/@aws-cdk/aws-appflow/.npmignore @@ -25,4 +25,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-appintegrations/.npmignore b/packages/@aws-cdk/aws-appintegrations/.npmignore index e4486030fcb17..4ee1f86e9b1de 100644 --- a/packages/@aws-cdk/aws-appintegrations/.npmignore +++ b/packages/@aws-cdk/aws-appintegrations/.npmignore @@ -26,3 +26,5 @@ jest.config.js **/cdk.out junit.xml test/ + +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-applicationautoscaling/.npmignore b/packages/@aws-cdk/aws-applicationautoscaling/.npmignore index a94c531529866..9a032ae80868c 100644 --- a/packages/@aws-cdk/aws-applicationautoscaling/.npmignore +++ b/packages/@aws-cdk/aws-applicationautoscaling/.npmignore @@ -23,4 +23,5 @@ tsconfig.json # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-applicationinsights/.npmignore b/packages/@aws-cdk/aws-applicationinsights/.npmignore index 9c086d15db4aa..b3e124d9e80e6 100644 --- a/packages/@aws-cdk/aws-applicationinsights/.npmignore +++ b/packages/@aws-cdk/aws-applicationinsights/.npmignore @@ -26,4 +26,5 @@ jest.config.js **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-appmesh/.npmignore b/packages/@aws-cdk/aws-appmesh/.npmignore index 305e5b0db6ec1..c740523e10914 100644 --- a/packages/@aws-cdk/aws-appmesh/.npmignore +++ b/packages/@aws-cdk/aws-appmesh/.npmignore @@ -26,4 +26,5 @@ tsconfig.json # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-apprunner/.npmignore b/packages/@aws-cdk/aws-apprunner/.npmignore index e4486030fcb17..4ee1f86e9b1de 100644 --- a/packages/@aws-cdk/aws-apprunner/.npmignore +++ b/packages/@aws-cdk/aws-apprunner/.npmignore @@ -26,3 +26,5 @@ jest.config.js **/cdk.out junit.xml test/ + +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-appstream/.npmignore b/packages/@aws-cdk/aws-appstream/.npmignore index 207e92300ba4a..ab6d20fee7d79 100644 --- a/packages/@aws-cdk/aws-appstream/.npmignore +++ b/packages/@aws-cdk/aws-appstream/.npmignore @@ -27,4 +27,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-appsync/.npmignore b/packages/@aws-cdk/aws-appsync/.npmignore index 63ab95621c764..aaabf1df59065 100644 --- a/packages/@aws-cdk/aws-appsync/.npmignore +++ b/packages/@aws-cdk/aws-appsync/.npmignore @@ -24,4 +24,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-athena/.npmignore b/packages/@aws-cdk/aws-athena/.npmignore index 63ab95621c764..aaabf1df59065 100644 --- a/packages/@aws-cdk/aws-athena/.npmignore +++ b/packages/@aws-cdk/aws-athena/.npmignore @@ -24,4 +24,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-auditmanager/.npmignore b/packages/@aws-cdk/aws-auditmanager/.npmignore index e4486030fcb17..4ee1f86e9b1de 100644 --- a/packages/@aws-cdk/aws-auditmanager/.npmignore +++ b/packages/@aws-cdk/aws-auditmanager/.npmignore @@ -26,3 +26,5 @@ jest.config.js **/cdk.out junit.xml test/ + +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-autoscaling-common/.npmignore b/packages/@aws-cdk/aws-autoscaling-common/.npmignore index 500c9f6884d44..57df50c29e494 100644 --- a/packages/@aws-cdk/aws-autoscaling-common/.npmignore +++ b/packages/@aws-cdk/aws-autoscaling-common/.npmignore @@ -26,4 +26,5 @@ tsconfig.json # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-autoscaling-hooktargets/.npmignore b/packages/@aws-cdk/aws-autoscaling-hooktargets/.npmignore index 63ab95621c764..aaabf1df59065 100644 --- a/packages/@aws-cdk/aws-autoscaling-hooktargets/.npmignore +++ b/packages/@aws-cdk/aws-autoscaling-hooktargets/.npmignore @@ -24,4 +24,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-autoscaling/.npmignore b/packages/@aws-cdk/aws-autoscaling/.npmignore index 6b3aee5fcab7c..1b946eecbde02 100644 --- a/packages/@aws-cdk/aws-autoscaling/.npmignore +++ b/packages/@aws-cdk/aws-autoscaling/.npmignore @@ -24,4 +24,5 @@ tsconfig.json **/cdk.out jest.config.js junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-autoscalingplans/.npmignore b/packages/@aws-cdk/aws-autoscalingplans/.npmignore index 63ab95621c764..aaabf1df59065 100644 --- a/packages/@aws-cdk/aws-autoscalingplans/.npmignore +++ b/packages/@aws-cdk/aws-autoscalingplans/.npmignore @@ -24,4 +24,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-backup/.npmignore b/packages/@aws-cdk/aws-backup/.npmignore index de98f3be1b6f4..059c8f07899cc 100644 --- a/packages/@aws-cdk/aws-backup/.npmignore +++ b/packages/@aws-cdk/aws-backup/.npmignore @@ -27,4 +27,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-batch/.npmignore b/packages/@aws-cdk/aws-batch/.npmignore index 63ab95621c764..aaabf1df59065 100644 --- a/packages/@aws-cdk/aws-batch/.npmignore +++ b/packages/@aws-cdk/aws-batch/.npmignore @@ -24,4 +24,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-budgets/.npmignore b/packages/@aws-cdk/aws-budgets/.npmignore index 63ab95621c764..aaabf1df59065 100644 --- a/packages/@aws-cdk/aws-budgets/.npmignore +++ b/packages/@aws-cdk/aws-budgets/.npmignore @@ -24,4 +24,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cassandra/.npmignore b/packages/@aws-cdk/aws-cassandra/.npmignore index 5bd978c36b820..326e5850d930f 100644 --- a/packages/@aws-cdk/aws-cassandra/.npmignore +++ b/packages/@aws-cdk/aws-cassandra/.npmignore @@ -25,4 +25,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ce/.npmignore b/packages/@aws-cdk/aws-ce/.npmignore index 5bd978c36b820..326e5850d930f 100644 --- a/packages/@aws-cdk/aws-ce/.npmignore +++ b/packages/@aws-cdk/aws-ce/.npmignore @@ -25,4 +25,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-certificatemanager/.npmignore b/packages/@aws-cdk/aws-certificatemanager/.npmignore index 8ace99e984f5a..bab5a08ea36df 100644 --- a/packages/@aws-cdk/aws-certificatemanager/.npmignore +++ b/packages/@aws-cdk/aws-certificatemanager/.npmignore @@ -28,4 +28,5 @@ tsconfig.json junit.xml jest.config.js -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-chatbot/.npmignore b/packages/@aws-cdk/aws-chatbot/.npmignore index 5bd978c36b820..326e5850d930f 100644 --- a/packages/@aws-cdk/aws-chatbot/.npmignore +++ b/packages/@aws-cdk/aws-chatbot/.npmignore @@ -25,4 +25,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cloud9/.npmignore b/packages/@aws-cdk/aws-cloud9/.npmignore index 63ab95621c764..aaabf1df59065 100644 --- a/packages/@aws-cdk/aws-cloud9/.npmignore +++ b/packages/@aws-cdk/aws-cloud9/.npmignore @@ -24,4 +24,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cloudformation/.npmignore b/packages/@aws-cdk/aws-cloudformation/.npmignore index a94c531529866..9a032ae80868c 100644 --- a/packages/@aws-cdk/aws-cloudformation/.npmignore +++ b/packages/@aws-cdk/aws-cloudformation/.npmignore @@ -23,4 +23,5 @@ tsconfig.json # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cloudfront-origins/.npmignore b/packages/@aws-cdk/aws-cloudfront-origins/.npmignore index 63ab95621c764..aaabf1df59065 100644 --- a/packages/@aws-cdk/aws-cloudfront-origins/.npmignore +++ b/packages/@aws-cdk/aws-cloudfront-origins/.npmignore @@ -24,4 +24,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cloudfront/.npmignore b/packages/@aws-cdk/aws-cloudfront/.npmignore index fccf7d5aa28df..453e4f4b793db 100644 --- a/packages/@aws-cdk/aws-cloudfront/.npmignore +++ b/packages/@aws-cdk/aws-cloudfront/.npmignore @@ -26,4 +26,5 @@ tsconfig.json jest.config.js junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cloudtrail/.npmignore b/packages/@aws-cdk/aws-cloudtrail/.npmignore index f507135a52f29..6c13078a36b61 100644 --- a/packages/@aws-cdk/aws-cloudtrail/.npmignore +++ b/packages/@aws-cdk/aws-cloudtrail/.npmignore @@ -24,4 +24,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cloudwatch-actions/.npmignore b/packages/@aws-cdk/aws-cloudwatch-actions/.npmignore index 63ab95621c764..aaabf1df59065 100644 --- a/packages/@aws-cdk/aws-cloudwatch-actions/.npmignore +++ b/packages/@aws-cdk/aws-cloudwatch-actions/.npmignore @@ -24,4 +24,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cloudwatch/.npmignore b/packages/@aws-cdk/aws-cloudwatch/.npmignore index a94c531529866..9a032ae80868c 100644 --- a/packages/@aws-cdk/aws-cloudwatch/.npmignore +++ b/packages/@aws-cdk/aws-cloudwatch/.npmignore @@ -23,4 +23,5 @@ tsconfig.json # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-codeartifact/.npmignore b/packages/@aws-cdk/aws-codeartifact/.npmignore index 63ab95621c764..aaabf1df59065 100644 --- a/packages/@aws-cdk/aws-codeartifact/.npmignore +++ b/packages/@aws-cdk/aws-codeartifact/.npmignore @@ -24,4 +24,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-codebuild/.npmignore b/packages/@aws-cdk/aws-codebuild/.npmignore index a94c531529866..9a032ae80868c 100644 --- a/packages/@aws-cdk/aws-codebuild/.npmignore +++ b/packages/@aws-cdk/aws-codebuild/.npmignore @@ -23,4 +23,5 @@ tsconfig.json # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-codecommit/.npmignore b/packages/@aws-cdk/aws-codecommit/.npmignore index a94c531529866..9a032ae80868c 100644 --- a/packages/@aws-cdk/aws-codecommit/.npmignore +++ b/packages/@aws-cdk/aws-codecommit/.npmignore @@ -23,4 +23,5 @@ tsconfig.json # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-codedeploy/.npmignore b/packages/@aws-cdk/aws-codedeploy/.npmignore index a94c531529866..9a032ae80868c 100644 --- a/packages/@aws-cdk/aws-codedeploy/.npmignore +++ b/packages/@aws-cdk/aws-codedeploy/.npmignore @@ -23,4 +23,5 @@ tsconfig.json # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-codeguruprofiler/.npmignore b/packages/@aws-cdk/aws-codeguruprofiler/.npmignore index 5bd978c36b820..326e5850d930f 100644 --- a/packages/@aws-cdk/aws-codeguruprofiler/.npmignore +++ b/packages/@aws-cdk/aws-codeguruprofiler/.npmignore @@ -25,4 +25,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-codegurureviewer/.npmignore b/packages/@aws-cdk/aws-codegurureviewer/.npmignore index 7b8fb69082a0f..055473b613fbd 100644 --- a/packages/@aws-cdk/aws-codegurureviewer/.npmignore +++ b/packages/@aws-cdk/aws-codegurureviewer/.npmignore @@ -25,4 +25,5 @@ jest.config.js **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-codepipeline-actions/.npmignore b/packages/@aws-cdk/aws-codepipeline-actions/.npmignore index 9e88226921c33..52ca12195912c 100644 --- a/packages/@aws-cdk/aws-codepipeline-actions/.npmignore +++ b/packages/@aws-cdk/aws-codepipeline-actions/.npmignore @@ -24,4 +24,5 @@ tsconfig.json **/cdk.out junit.xml test/ -jest.config.js \ No newline at end of file +jest.config.js +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-codepipeline/.npmignore b/packages/@aws-cdk/aws-codepipeline/.npmignore index 1b4217fb1a9f0..056a68fe3e96f 100644 --- a/packages/@aws-cdk/aws-codepipeline/.npmignore +++ b/packages/@aws-cdk/aws-codepipeline/.npmignore @@ -25,4 +25,5 @@ jest.config.js **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-codestar/.npmignore b/packages/@aws-cdk/aws-codestar/.npmignore index de98f3be1b6f4..059c8f07899cc 100644 --- a/packages/@aws-cdk/aws-codestar/.npmignore +++ b/packages/@aws-cdk/aws-codestar/.npmignore @@ -27,4 +27,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-codestarconnections/.npmignore b/packages/@aws-cdk/aws-codestarconnections/.npmignore index 5bd978c36b820..326e5850d930f 100644 --- a/packages/@aws-cdk/aws-codestarconnections/.npmignore +++ b/packages/@aws-cdk/aws-codestarconnections/.npmignore @@ -25,4 +25,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-codestarnotifications/.npmignore b/packages/@aws-cdk/aws-codestarnotifications/.npmignore index c2827f80c26db..294b1464a0155 100644 --- a/packages/@aws-cdk/aws-codestarnotifications/.npmignore +++ b/packages/@aws-cdk/aws-codestarnotifications/.npmignore @@ -24,4 +24,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cognito/.npmignore b/packages/@aws-cdk/aws-cognito/.npmignore index 63ab95621c764..aaabf1df59065 100644 --- a/packages/@aws-cdk/aws-cognito/.npmignore +++ b/packages/@aws-cdk/aws-cognito/.npmignore @@ -24,4 +24,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-config/.npmignore b/packages/@aws-cdk/aws-config/.npmignore index a94c531529866..9a032ae80868c 100644 --- a/packages/@aws-cdk/aws-config/.npmignore +++ b/packages/@aws-cdk/aws-config/.npmignore @@ -23,4 +23,5 @@ tsconfig.json # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cur/.npmignore b/packages/@aws-cdk/aws-cur/.npmignore index e4486030fcb17..4ee1f86e9b1de 100644 --- a/packages/@aws-cdk/aws-cur/.npmignore +++ b/packages/@aws-cdk/aws-cur/.npmignore @@ -26,3 +26,5 @@ jest.config.js **/cdk.out junit.xml test/ + +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-customerprofiles/.npmignore b/packages/@aws-cdk/aws-customerprofiles/.npmignore index e4486030fcb17..4ee1f86e9b1de 100644 --- a/packages/@aws-cdk/aws-customerprofiles/.npmignore +++ b/packages/@aws-cdk/aws-customerprofiles/.npmignore @@ -26,3 +26,5 @@ jest.config.js **/cdk.out junit.xml test/ + +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-databrew/.npmignore b/packages/@aws-cdk/aws-databrew/.npmignore index e4486030fcb17..4ee1f86e9b1de 100644 --- a/packages/@aws-cdk/aws-databrew/.npmignore +++ b/packages/@aws-cdk/aws-databrew/.npmignore @@ -26,3 +26,5 @@ jest.config.js **/cdk.out junit.xml test/ + +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-datapipeline/.npmignore b/packages/@aws-cdk/aws-datapipeline/.npmignore index 63ab95621c764..aaabf1df59065 100644 --- a/packages/@aws-cdk/aws-datapipeline/.npmignore +++ b/packages/@aws-cdk/aws-datapipeline/.npmignore @@ -24,4 +24,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-datasync/.npmignore b/packages/@aws-cdk/aws-datasync/.npmignore index e4486030fcb17..4ee1f86e9b1de 100644 --- a/packages/@aws-cdk/aws-datasync/.npmignore +++ b/packages/@aws-cdk/aws-datasync/.npmignore @@ -26,3 +26,5 @@ jest.config.js **/cdk.out junit.xml test/ + +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-dax/.npmignore b/packages/@aws-cdk/aws-dax/.npmignore index 63ab95621c764..aaabf1df59065 100644 --- a/packages/@aws-cdk/aws-dax/.npmignore +++ b/packages/@aws-cdk/aws-dax/.npmignore @@ -24,4 +24,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-detective/.npmignore b/packages/@aws-cdk/aws-detective/.npmignore index 5bd978c36b820..326e5850d930f 100644 --- a/packages/@aws-cdk/aws-detective/.npmignore +++ b/packages/@aws-cdk/aws-detective/.npmignore @@ -25,4 +25,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-devopsguru/.npmignore b/packages/@aws-cdk/aws-devopsguru/.npmignore index e4486030fcb17..4ee1f86e9b1de 100644 --- a/packages/@aws-cdk/aws-devopsguru/.npmignore +++ b/packages/@aws-cdk/aws-devopsguru/.npmignore @@ -26,3 +26,5 @@ jest.config.js **/cdk.out junit.xml test/ + +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-directoryservice/.npmignore b/packages/@aws-cdk/aws-directoryservice/.npmignore index 63ab95621c764..aaabf1df59065 100644 --- a/packages/@aws-cdk/aws-directoryservice/.npmignore +++ b/packages/@aws-cdk/aws-directoryservice/.npmignore @@ -24,4 +24,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-dlm/.npmignore b/packages/@aws-cdk/aws-dlm/.npmignore index 207e92300ba4a..ab6d20fee7d79 100644 --- a/packages/@aws-cdk/aws-dlm/.npmignore +++ b/packages/@aws-cdk/aws-dlm/.npmignore @@ -27,4 +27,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-dms/.npmignore b/packages/@aws-cdk/aws-dms/.npmignore index 63ab95621c764..aaabf1df59065 100644 --- a/packages/@aws-cdk/aws-dms/.npmignore +++ b/packages/@aws-cdk/aws-dms/.npmignore @@ -24,4 +24,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-docdb/.npmignore b/packages/@aws-cdk/aws-docdb/.npmignore index 207e92300ba4a..ab6d20fee7d79 100644 --- a/packages/@aws-cdk/aws-docdb/.npmignore +++ b/packages/@aws-cdk/aws-docdb/.npmignore @@ -27,4 +27,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-dynamodb-global/.npmignore b/packages/@aws-cdk/aws-dynamodb-global/.npmignore index ecc7155058048..3fd2a6ce320a0 100644 --- a/packages/@aws-cdk/aws-dynamodb-global/.npmignore +++ b/packages/@aws-cdk/aws-dynamodb-global/.npmignore @@ -24,4 +24,5 @@ tsconfig.json # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-dynamodb/.npmignore b/packages/@aws-cdk/aws-dynamodb/.npmignore index 63ab95621c764..aaabf1df59065 100644 --- a/packages/@aws-cdk/aws-dynamodb/.npmignore +++ b/packages/@aws-cdk/aws-dynamodb/.npmignore @@ -24,4 +24,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ec2/.npmignore b/packages/@aws-cdk/aws-ec2/.npmignore index 6b3aee5fcab7c..1b946eecbde02 100644 --- a/packages/@aws-cdk/aws-ec2/.npmignore +++ b/packages/@aws-cdk/aws-ec2/.npmignore @@ -24,4 +24,5 @@ tsconfig.json **/cdk.out jest.config.js junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ecr-assets/.npmignore b/packages/@aws-cdk/aws-ecr-assets/.npmignore index 9e88226921c33..52ca12195912c 100644 --- a/packages/@aws-cdk/aws-ecr-assets/.npmignore +++ b/packages/@aws-cdk/aws-ecr-assets/.npmignore @@ -24,4 +24,5 @@ tsconfig.json **/cdk.out junit.xml test/ -jest.config.js \ No newline at end of file +jest.config.js +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ecr/.npmignore b/packages/@aws-cdk/aws-ecr/.npmignore index 94b89531c7268..036fc97c4bf8d 100644 --- a/packages/@aws-cdk/aws-ecr/.npmignore +++ b/packages/@aws-cdk/aws-ecr/.npmignore @@ -25,3 +25,5 @@ jest.config.js **/cdk.out junit.xml test/ + +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ecs-patterns/.npmignore b/packages/@aws-cdk/aws-ecs-patterns/.npmignore index a94c531529866..9a032ae80868c 100644 --- a/packages/@aws-cdk/aws-ecs-patterns/.npmignore +++ b/packages/@aws-cdk/aws-ecs-patterns/.npmignore @@ -23,4 +23,5 @@ tsconfig.json # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ecs/.npmignore b/packages/@aws-cdk/aws-ecs/.npmignore index 6c1b9b8c69ec6..0161492629d0f 100644 --- a/packages/@aws-cdk/aws-ecs/.npmignore +++ b/packages/@aws-cdk/aws-ecs/.npmignore @@ -24,4 +24,5 @@ tsconfig.json **/cdk.out junit.xml test/ -jest.config.js \ No newline at end of file +jest.config.js +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-efs/.npmignore b/packages/@aws-cdk/aws-efs/.npmignore index 63ab95621c764..aaabf1df59065 100644 --- a/packages/@aws-cdk/aws-efs/.npmignore +++ b/packages/@aws-cdk/aws-efs/.npmignore @@ -24,4 +24,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-eks-legacy/.npmignore b/packages/@aws-cdk/aws-eks-legacy/.npmignore index a94c531529866..9a032ae80868c 100644 --- a/packages/@aws-cdk/aws-eks-legacy/.npmignore +++ b/packages/@aws-cdk/aws-eks-legacy/.npmignore @@ -23,4 +23,5 @@ tsconfig.json # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-eks/.npmignore b/packages/@aws-cdk/aws-eks/.npmignore index a94c531529866..9a032ae80868c 100644 --- a/packages/@aws-cdk/aws-eks/.npmignore +++ b/packages/@aws-cdk/aws-eks/.npmignore @@ -23,4 +23,5 @@ tsconfig.json # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-elasticache/.npmignore b/packages/@aws-cdk/aws-elasticache/.npmignore index 63ab95621c764..aaabf1df59065 100644 --- a/packages/@aws-cdk/aws-elasticache/.npmignore +++ b/packages/@aws-cdk/aws-elasticache/.npmignore @@ -24,4 +24,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-elasticbeanstalk/.npmignore b/packages/@aws-cdk/aws-elasticbeanstalk/.npmignore index 63ab95621c764..aaabf1df59065 100644 --- a/packages/@aws-cdk/aws-elasticbeanstalk/.npmignore +++ b/packages/@aws-cdk/aws-elasticbeanstalk/.npmignore @@ -24,4 +24,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-elasticloadbalancing/.npmignore b/packages/@aws-cdk/aws-elasticloadbalancing/.npmignore index 4a398e9d7d239..772af5929ae9a 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancing/.npmignore +++ b/packages/@aws-cdk/aws-elasticloadbalancing/.npmignore @@ -25,4 +25,5 @@ tsconfig.json junit.xml jest.config.js -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2-actions/.npmignore b/packages/@aws-cdk/aws-elasticloadbalancingv2-actions/.npmignore index dffe09131a636..9a4d2a4ab0df9 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2-actions/.npmignore +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2-actions/.npmignore @@ -23,4 +23,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2-targets/.npmignore b/packages/@aws-cdk/aws-elasticloadbalancingv2-targets/.npmignore index c28149f1ec41d..42cdb9cf63a1b 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2-targets/.npmignore +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2-targets/.npmignore @@ -23,4 +23,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2/.npmignore b/packages/@aws-cdk/aws-elasticloadbalancingv2/.npmignore index 4a398e9d7d239..772af5929ae9a 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2/.npmignore +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2/.npmignore @@ -25,4 +25,5 @@ tsconfig.json junit.xml jest.config.js -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-elasticsearch/.npmignore b/packages/@aws-cdk/aws-elasticsearch/.npmignore index 63ab95621c764..aaabf1df59065 100644 --- a/packages/@aws-cdk/aws-elasticsearch/.npmignore +++ b/packages/@aws-cdk/aws-elasticsearch/.npmignore @@ -24,4 +24,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-emr/.npmignore b/packages/@aws-cdk/aws-emr/.npmignore index 63ab95621c764..aaabf1df59065 100644 --- a/packages/@aws-cdk/aws-emr/.npmignore +++ b/packages/@aws-cdk/aws-emr/.npmignore @@ -24,4 +24,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-emrcontainers/.npmignore b/packages/@aws-cdk/aws-emrcontainers/.npmignore index e4486030fcb17..4ee1f86e9b1de 100644 --- a/packages/@aws-cdk/aws-emrcontainers/.npmignore +++ b/packages/@aws-cdk/aws-emrcontainers/.npmignore @@ -26,3 +26,5 @@ jest.config.js **/cdk.out junit.xml test/ + +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-events-targets/.npmignore b/packages/@aws-cdk/aws-events-targets/.npmignore index 63ab95621c764..aaabf1df59065 100644 --- a/packages/@aws-cdk/aws-events-targets/.npmignore +++ b/packages/@aws-cdk/aws-events-targets/.npmignore @@ -24,4 +24,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-events/.npmignore b/packages/@aws-cdk/aws-events/.npmignore index a94c531529866..9a032ae80868c 100644 --- a/packages/@aws-cdk/aws-events/.npmignore +++ b/packages/@aws-cdk/aws-events/.npmignore @@ -23,4 +23,5 @@ tsconfig.json # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-eventschemas/.npmignore b/packages/@aws-cdk/aws-eventschemas/.npmignore index c2827f80c26db..294b1464a0155 100644 --- a/packages/@aws-cdk/aws-eventschemas/.npmignore +++ b/packages/@aws-cdk/aws-eventschemas/.npmignore @@ -24,4 +24,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-finspace/.npmignore b/packages/@aws-cdk/aws-finspace/.npmignore index e4486030fcb17..4ee1f86e9b1de 100644 --- a/packages/@aws-cdk/aws-finspace/.npmignore +++ b/packages/@aws-cdk/aws-finspace/.npmignore @@ -26,3 +26,5 @@ jest.config.js **/cdk.out junit.xml test/ + +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-fis/.npmignore b/packages/@aws-cdk/aws-fis/.npmignore index e4486030fcb17..4ee1f86e9b1de 100644 --- a/packages/@aws-cdk/aws-fis/.npmignore +++ b/packages/@aws-cdk/aws-fis/.npmignore @@ -26,3 +26,5 @@ jest.config.js **/cdk.out junit.xml test/ + +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-fms/.npmignore b/packages/@aws-cdk/aws-fms/.npmignore index 5bd978c36b820..326e5850d930f 100644 --- a/packages/@aws-cdk/aws-fms/.npmignore +++ b/packages/@aws-cdk/aws-fms/.npmignore @@ -25,4 +25,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-frauddetector/.npmignore b/packages/@aws-cdk/aws-frauddetector/.npmignore index e4486030fcb17..4ee1f86e9b1de 100644 --- a/packages/@aws-cdk/aws-frauddetector/.npmignore +++ b/packages/@aws-cdk/aws-frauddetector/.npmignore @@ -26,3 +26,5 @@ jest.config.js **/cdk.out junit.xml test/ + +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-fsx/.npmignore b/packages/@aws-cdk/aws-fsx/.npmignore index 207e92300ba4a..ab6d20fee7d79 100644 --- a/packages/@aws-cdk/aws-fsx/.npmignore +++ b/packages/@aws-cdk/aws-fsx/.npmignore @@ -27,4 +27,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-gamelift/.npmignore b/packages/@aws-cdk/aws-gamelift/.npmignore index 63ab95621c764..aaabf1df59065 100644 --- a/packages/@aws-cdk/aws-gamelift/.npmignore +++ b/packages/@aws-cdk/aws-gamelift/.npmignore @@ -24,4 +24,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-globalaccelerator-endpoints/.npmignore b/packages/@aws-cdk/aws-globalaccelerator-endpoints/.npmignore index 63ab95621c764..aaabf1df59065 100644 --- a/packages/@aws-cdk/aws-globalaccelerator-endpoints/.npmignore +++ b/packages/@aws-cdk/aws-globalaccelerator-endpoints/.npmignore @@ -24,4 +24,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-globalaccelerator/.npmignore b/packages/@aws-cdk/aws-globalaccelerator/.npmignore index 5bd978c36b820..326e5850d930f 100644 --- a/packages/@aws-cdk/aws-globalaccelerator/.npmignore +++ b/packages/@aws-cdk/aws-globalaccelerator/.npmignore @@ -25,4 +25,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-glue/.npmignore b/packages/@aws-cdk/aws-glue/.npmignore index 63ab95621c764..aaabf1df59065 100644 --- a/packages/@aws-cdk/aws-glue/.npmignore +++ b/packages/@aws-cdk/aws-glue/.npmignore @@ -24,4 +24,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-greengrass/.npmignore b/packages/@aws-cdk/aws-greengrass/.npmignore index 207e92300ba4a..ab6d20fee7d79 100644 --- a/packages/@aws-cdk/aws-greengrass/.npmignore +++ b/packages/@aws-cdk/aws-greengrass/.npmignore @@ -27,4 +27,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-greengrassv2/.npmignore b/packages/@aws-cdk/aws-greengrassv2/.npmignore index 207e92300ba4a..ab6d20fee7d79 100644 --- a/packages/@aws-cdk/aws-greengrassv2/.npmignore +++ b/packages/@aws-cdk/aws-greengrassv2/.npmignore @@ -27,4 +27,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-groundstation/.npmignore b/packages/@aws-cdk/aws-groundstation/.npmignore index e4486030fcb17..4ee1f86e9b1de 100644 --- a/packages/@aws-cdk/aws-groundstation/.npmignore +++ b/packages/@aws-cdk/aws-groundstation/.npmignore @@ -26,3 +26,5 @@ jest.config.js **/cdk.out junit.xml test/ + +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-guardduty/.npmignore b/packages/@aws-cdk/aws-guardduty/.npmignore index 63ab95621c764..aaabf1df59065 100644 --- a/packages/@aws-cdk/aws-guardduty/.npmignore +++ b/packages/@aws-cdk/aws-guardduty/.npmignore @@ -24,4 +24,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-iam/.npmignore b/packages/@aws-cdk/aws-iam/.npmignore index 63ab95621c764..aaabf1df59065 100644 --- a/packages/@aws-cdk/aws-iam/.npmignore +++ b/packages/@aws-cdk/aws-iam/.npmignore @@ -24,4 +24,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-imagebuilder/.npmignore b/packages/@aws-cdk/aws-imagebuilder/.npmignore index 5bd978c36b820..326e5850d930f 100644 --- a/packages/@aws-cdk/aws-imagebuilder/.npmignore +++ b/packages/@aws-cdk/aws-imagebuilder/.npmignore @@ -25,4 +25,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-inspector/.npmignore b/packages/@aws-cdk/aws-inspector/.npmignore index 63ab95621c764..aaabf1df59065 100644 --- a/packages/@aws-cdk/aws-inspector/.npmignore +++ b/packages/@aws-cdk/aws-inspector/.npmignore @@ -24,4 +24,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-iot/.npmignore b/packages/@aws-cdk/aws-iot/.npmignore index 63ab95621c764..aaabf1df59065 100644 --- a/packages/@aws-cdk/aws-iot/.npmignore +++ b/packages/@aws-cdk/aws-iot/.npmignore @@ -24,4 +24,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-iot1click/.npmignore b/packages/@aws-cdk/aws-iot1click/.npmignore index 2892fc6e99416..778a9ab8b203a 100644 --- a/packages/@aws-cdk/aws-iot1click/.npmignore +++ b/packages/@aws-cdk/aws-iot1click/.npmignore @@ -28,4 +28,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-iotanalytics/.npmignore b/packages/@aws-cdk/aws-iotanalytics/.npmignore index 207e92300ba4a..ab6d20fee7d79 100644 --- a/packages/@aws-cdk/aws-iotanalytics/.npmignore +++ b/packages/@aws-cdk/aws-iotanalytics/.npmignore @@ -27,4 +27,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-iotcoredeviceadvisor/.npmignore b/packages/@aws-cdk/aws-iotcoredeviceadvisor/.npmignore index e4486030fcb17..4ee1f86e9b1de 100644 --- a/packages/@aws-cdk/aws-iotcoredeviceadvisor/.npmignore +++ b/packages/@aws-cdk/aws-iotcoredeviceadvisor/.npmignore @@ -26,3 +26,5 @@ jest.config.js **/cdk.out junit.xml test/ + +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-iotevents/.npmignore b/packages/@aws-cdk/aws-iotevents/.npmignore index de98f3be1b6f4..059c8f07899cc 100644 --- a/packages/@aws-cdk/aws-iotevents/.npmignore +++ b/packages/@aws-cdk/aws-iotevents/.npmignore @@ -27,4 +27,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-iotfleethub/.npmignore b/packages/@aws-cdk/aws-iotfleethub/.npmignore index e4486030fcb17..4ee1f86e9b1de 100644 --- a/packages/@aws-cdk/aws-iotfleethub/.npmignore +++ b/packages/@aws-cdk/aws-iotfleethub/.npmignore @@ -26,3 +26,5 @@ jest.config.js **/cdk.out junit.xml test/ + +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-iotsitewise/.npmignore b/packages/@aws-cdk/aws-iotsitewise/.npmignore index e4486030fcb17..4ee1f86e9b1de 100644 --- a/packages/@aws-cdk/aws-iotsitewise/.npmignore +++ b/packages/@aws-cdk/aws-iotsitewise/.npmignore @@ -26,3 +26,5 @@ jest.config.js **/cdk.out junit.xml test/ + +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-iotthingsgraph/.npmignore b/packages/@aws-cdk/aws-iotthingsgraph/.npmignore index f3eaded585e2d..8d5646d700888 100644 --- a/packages/@aws-cdk/aws-iotthingsgraph/.npmignore +++ b/packages/@aws-cdk/aws-iotthingsgraph/.npmignore @@ -28,4 +28,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-iotwireless/.npmignore b/packages/@aws-cdk/aws-iotwireless/.npmignore index e4486030fcb17..4ee1f86e9b1de 100644 --- a/packages/@aws-cdk/aws-iotwireless/.npmignore +++ b/packages/@aws-cdk/aws-iotwireless/.npmignore @@ -26,3 +26,5 @@ jest.config.js **/cdk.out junit.xml test/ + +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ivs/.npmignore b/packages/@aws-cdk/aws-ivs/.npmignore index e4486030fcb17..4ee1f86e9b1de 100644 --- a/packages/@aws-cdk/aws-ivs/.npmignore +++ b/packages/@aws-cdk/aws-ivs/.npmignore @@ -26,3 +26,5 @@ jest.config.js **/cdk.out junit.xml test/ + +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-kendra/.npmignore b/packages/@aws-cdk/aws-kendra/.npmignore index 7b8fb69082a0f..055473b613fbd 100644 --- a/packages/@aws-cdk/aws-kendra/.npmignore +++ b/packages/@aws-cdk/aws-kendra/.npmignore @@ -25,4 +25,5 @@ jest.config.js **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-kinesis/.npmignore b/packages/@aws-cdk/aws-kinesis/.npmignore index 63ab95621c764..aaabf1df59065 100644 --- a/packages/@aws-cdk/aws-kinesis/.npmignore +++ b/packages/@aws-cdk/aws-kinesis/.npmignore @@ -24,4 +24,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-kinesisanalytics-flink/.npmignore b/packages/@aws-cdk/aws-kinesisanalytics-flink/.npmignore index 63ab95621c764..aaabf1df59065 100644 --- a/packages/@aws-cdk/aws-kinesisanalytics-flink/.npmignore +++ b/packages/@aws-cdk/aws-kinesisanalytics-flink/.npmignore @@ -24,4 +24,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-kinesisanalytics/.npmignore b/packages/@aws-cdk/aws-kinesisanalytics/.npmignore index 63ab95621c764..aaabf1df59065 100644 --- a/packages/@aws-cdk/aws-kinesisanalytics/.npmignore +++ b/packages/@aws-cdk/aws-kinesisanalytics/.npmignore @@ -24,4 +24,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-kinesisfirehose/.npmignore b/packages/@aws-cdk/aws-kinesisfirehose/.npmignore index 63ab95621c764..aaabf1df59065 100644 --- a/packages/@aws-cdk/aws-kinesisfirehose/.npmignore +++ b/packages/@aws-cdk/aws-kinesisfirehose/.npmignore @@ -24,4 +24,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-kms/.npmignore b/packages/@aws-cdk/aws-kms/.npmignore index 9e88226921c33..52ca12195912c 100644 --- a/packages/@aws-cdk/aws-kms/.npmignore +++ b/packages/@aws-cdk/aws-kms/.npmignore @@ -24,4 +24,5 @@ tsconfig.json **/cdk.out junit.xml test/ -jest.config.js \ No newline at end of file +jest.config.js +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-lakeformation/.npmignore b/packages/@aws-cdk/aws-lakeformation/.npmignore index de98f3be1b6f4..059c8f07899cc 100644 --- a/packages/@aws-cdk/aws-lakeformation/.npmignore +++ b/packages/@aws-cdk/aws-lakeformation/.npmignore @@ -27,4 +27,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-lambda-destinations/.npmignore b/packages/@aws-cdk/aws-lambda-destinations/.npmignore index 63ab95621c764..aaabf1df59065 100644 --- a/packages/@aws-cdk/aws-lambda-destinations/.npmignore +++ b/packages/@aws-cdk/aws-lambda-destinations/.npmignore @@ -24,4 +24,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-lambda-event-sources/.npmignore b/packages/@aws-cdk/aws-lambda-event-sources/.npmignore index a94c531529866..9a032ae80868c 100644 --- a/packages/@aws-cdk/aws-lambda-event-sources/.npmignore +++ b/packages/@aws-cdk/aws-lambda-event-sources/.npmignore @@ -23,4 +23,5 @@ tsconfig.json # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-lambda-go/.npmignore b/packages/@aws-cdk/aws-lambda-go/.npmignore index 94b89531c7268..036fc97c4bf8d 100644 --- a/packages/@aws-cdk/aws-lambda-go/.npmignore +++ b/packages/@aws-cdk/aws-lambda-go/.npmignore @@ -25,3 +25,5 @@ jest.config.js **/cdk.out junit.xml test/ + +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-lambda-nodejs/.npmignore b/packages/@aws-cdk/aws-lambda-nodejs/.npmignore index 63ab95621c764..aaabf1df59065 100644 --- a/packages/@aws-cdk/aws-lambda-nodejs/.npmignore +++ b/packages/@aws-cdk/aws-lambda-nodejs/.npmignore @@ -24,4 +24,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-lambda-python/.npmignore b/packages/@aws-cdk/aws-lambda-python/.npmignore index 1b4217fb1a9f0..056a68fe3e96f 100644 --- a/packages/@aws-cdk/aws-lambda-python/.npmignore +++ b/packages/@aws-cdk/aws-lambda-python/.npmignore @@ -25,4 +25,5 @@ jest.config.js **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-lambda/.npmignore b/packages/@aws-cdk/aws-lambda/.npmignore index 63ab95621c764..aaabf1df59065 100644 --- a/packages/@aws-cdk/aws-lambda/.npmignore +++ b/packages/@aws-cdk/aws-lambda/.npmignore @@ -24,4 +24,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-licensemanager/.npmignore b/packages/@aws-cdk/aws-licensemanager/.npmignore index e4486030fcb17..4ee1f86e9b1de 100644 --- a/packages/@aws-cdk/aws-licensemanager/.npmignore +++ b/packages/@aws-cdk/aws-licensemanager/.npmignore @@ -26,3 +26,5 @@ jest.config.js **/cdk.out junit.xml test/ + +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-location/.npmignore b/packages/@aws-cdk/aws-location/.npmignore index e4486030fcb17..4ee1f86e9b1de 100644 --- a/packages/@aws-cdk/aws-location/.npmignore +++ b/packages/@aws-cdk/aws-location/.npmignore @@ -26,3 +26,5 @@ jest.config.js **/cdk.out junit.xml test/ + +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-logs-destinations/.npmignore b/packages/@aws-cdk/aws-logs-destinations/.npmignore index 63ab95621c764..aaabf1df59065 100644 --- a/packages/@aws-cdk/aws-logs-destinations/.npmignore +++ b/packages/@aws-cdk/aws-logs-destinations/.npmignore @@ -24,4 +24,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-logs/.npmignore b/packages/@aws-cdk/aws-logs/.npmignore index a94c531529866..9a032ae80868c 100644 --- a/packages/@aws-cdk/aws-logs/.npmignore +++ b/packages/@aws-cdk/aws-logs/.npmignore @@ -23,4 +23,5 @@ tsconfig.json # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-lookoutmetrics/.npmignore b/packages/@aws-cdk/aws-lookoutmetrics/.npmignore index e4486030fcb17..4ee1f86e9b1de 100644 --- a/packages/@aws-cdk/aws-lookoutmetrics/.npmignore +++ b/packages/@aws-cdk/aws-lookoutmetrics/.npmignore @@ -26,3 +26,5 @@ jest.config.js **/cdk.out junit.xml test/ + +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-lookoutvision/.npmignore b/packages/@aws-cdk/aws-lookoutvision/.npmignore index e4486030fcb17..4ee1f86e9b1de 100644 --- a/packages/@aws-cdk/aws-lookoutvision/.npmignore +++ b/packages/@aws-cdk/aws-lookoutvision/.npmignore @@ -26,3 +26,5 @@ jest.config.js **/cdk.out junit.xml test/ + +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-macie/.npmignore b/packages/@aws-cdk/aws-macie/.npmignore index 5bd978c36b820..326e5850d930f 100644 --- a/packages/@aws-cdk/aws-macie/.npmignore +++ b/packages/@aws-cdk/aws-macie/.npmignore @@ -25,4 +25,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-managedblockchain/.npmignore b/packages/@aws-cdk/aws-managedblockchain/.npmignore index de98f3be1b6f4..059c8f07899cc 100644 --- a/packages/@aws-cdk/aws-managedblockchain/.npmignore +++ b/packages/@aws-cdk/aws-managedblockchain/.npmignore @@ -27,4 +27,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-mediaconnect/.npmignore b/packages/@aws-cdk/aws-mediaconnect/.npmignore index e4486030fcb17..4ee1f86e9b1de 100644 --- a/packages/@aws-cdk/aws-mediaconnect/.npmignore +++ b/packages/@aws-cdk/aws-mediaconnect/.npmignore @@ -26,3 +26,5 @@ jest.config.js **/cdk.out junit.xml test/ + +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-mediaconvert/.npmignore b/packages/@aws-cdk/aws-mediaconvert/.npmignore index c2827f80c26db..294b1464a0155 100644 --- a/packages/@aws-cdk/aws-mediaconvert/.npmignore +++ b/packages/@aws-cdk/aws-mediaconvert/.npmignore @@ -24,4 +24,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-medialive/.npmignore b/packages/@aws-cdk/aws-medialive/.npmignore index de98f3be1b6f4..059c8f07899cc 100644 --- a/packages/@aws-cdk/aws-medialive/.npmignore +++ b/packages/@aws-cdk/aws-medialive/.npmignore @@ -27,4 +27,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-mediapackage/.npmignore b/packages/@aws-cdk/aws-mediapackage/.npmignore index e4486030fcb17..4ee1f86e9b1de 100644 --- a/packages/@aws-cdk/aws-mediapackage/.npmignore +++ b/packages/@aws-cdk/aws-mediapackage/.npmignore @@ -26,3 +26,5 @@ jest.config.js **/cdk.out junit.xml test/ + +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-mediastore/.npmignore b/packages/@aws-cdk/aws-mediastore/.npmignore index de98f3be1b6f4..059c8f07899cc 100644 --- a/packages/@aws-cdk/aws-mediastore/.npmignore +++ b/packages/@aws-cdk/aws-mediastore/.npmignore @@ -27,4 +27,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-msk/.npmignore b/packages/@aws-cdk/aws-msk/.npmignore index f3eaded585e2d..8d5646d700888 100644 --- a/packages/@aws-cdk/aws-msk/.npmignore +++ b/packages/@aws-cdk/aws-msk/.npmignore @@ -28,4 +28,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-mwaa/.npmignore b/packages/@aws-cdk/aws-mwaa/.npmignore index e4486030fcb17..4ee1f86e9b1de 100644 --- a/packages/@aws-cdk/aws-mwaa/.npmignore +++ b/packages/@aws-cdk/aws-mwaa/.npmignore @@ -26,3 +26,5 @@ jest.config.js **/cdk.out junit.xml test/ + +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-neptune/.npmignore b/packages/@aws-cdk/aws-neptune/.npmignore index 2892fc6e99416..778a9ab8b203a 100644 --- a/packages/@aws-cdk/aws-neptune/.npmignore +++ b/packages/@aws-cdk/aws-neptune/.npmignore @@ -28,4 +28,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-networkfirewall/.npmignore b/packages/@aws-cdk/aws-networkfirewall/.npmignore index e4486030fcb17..4ee1f86e9b1de 100644 --- a/packages/@aws-cdk/aws-networkfirewall/.npmignore +++ b/packages/@aws-cdk/aws-networkfirewall/.npmignore @@ -26,3 +26,5 @@ jest.config.js **/cdk.out junit.xml test/ + +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-networkmanager/.npmignore b/packages/@aws-cdk/aws-networkmanager/.npmignore index 5bd978c36b820..326e5850d930f 100644 --- a/packages/@aws-cdk/aws-networkmanager/.npmignore +++ b/packages/@aws-cdk/aws-networkmanager/.npmignore @@ -25,4 +25,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-nimblestudio/.npmignore b/packages/@aws-cdk/aws-nimblestudio/.npmignore index e4486030fcb17..4ee1f86e9b1de 100644 --- a/packages/@aws-cdk/aws-nimblestudio/.npmignore +++ b/packages/@aws-cdk/aws-nimblestudio/.npmignore @@ -26,3 +26,5 @@ jest.config.js **/cdk.out junit.xml test/ + +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-opsworks/.npmignore b/packages/@aws-cdk/aws-opsworks/.npmignore index 63ab95621c764..aaabf1df59065 100644 --- a/packages/@aws-cdk/aws-opsworks/.npmignore +++ b/packages/@aws-cdk/aws-opsworks/.npmignore @@ -24,4 +24,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-opsworkscm/.npmignore b/packages/@aws-cdk/aws-opsworkscm/.npmignore index 207e92300ba4a..ab6d20fee7d79 100644 --- a/packages/@aws-cdk/aws-opsworkscm/.npmignore +++ b/packages/@aws-cdk/aws-opsworkscm/.npmignore @@ -27,4 +27,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-pinpoint/.npmignore b/packages/@aws-cdk/aws-pinpoint/.npmignore index f3eaded585e2d..8d5646d700888 100644 --- a/packages/@aws-cdk/aws-pinpoint/.npmignore +++ b/packages/@aws-cdk/aws-pinpoint/.npmignore @@ -28,4 +28,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-pinpointemail/.npmignore b/packages/@aws-cdk/aws-pinpointemail/.npmignore index de98f3be1b6f4..059c8f07899cc 100644 --- a/packages/@aws-cdk/aws-pinpointemail/.npmignore +++ b/packages/@aws-cdk/aws-pinpointemail/.npmignore @@ -27,4 +27,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-qldb/.npmignore b/packages/@aws-cdk/aws-qldb/.npmignore index de98f3be1b6f4..059c8f07899cc 100644 --- a/packages/@aws-cdk/aws-qldb/.npmignore +++ b/packages/@aws-cdk/aws-qldb/.npmignore @@ -27,4 +27,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-quicksight/.npmignore b/packages/@aws-cdk/aws-quicksight/.npmignore index e4486030fcb17..4ee1f86e9b1de 100644 --- a/packages/@aws-cdk/aws-quicksight/.npmignore +++ b/packages/@aws-cdk/aws-quicksight/.npmignore @@ -26,3 +26,5 @@ jest.config.js **/cdk.out junit.xml test/ + +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ram/.npmignore b/packages/@aws-cdk/aws-ram/.npmignore index 207e92300ba4a..ab6d20fee7d79 100644 --- a/packages/@aws-cdk/aws-ram/.npmignore +++ b/packages/@aws-cdk/aws-ram/.npmignore @@ -27,4 +27,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-rds/.npmignore b/packages/@aws-cdk/aws-rds/.npmignore index 9e88226921c33..52ca12195912c 100644 --- a/packages/@aws-cdk/aws-rds/.npmignore +++ b/packages/@aws-cdk/aws-rds/.npmignore @@ -24,4 +24,5 @@ tsconfig.json **/cdk.out junit.xml test/ -jest.config.js \ No newline at end of file +jest.config.js +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-redshift/.npmignore b/packages/@aws-cdk/aws-redshift/.npmignore index 63ab95621c764..aaabf1df59065 100644 --- a/packages/@aws-cdk/aws-redshift/.npmignore +++ b/packages/@aws-cdk/aws-redshift/.npmignore @@ -24,4 +24,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-resourcegroups/.npmignore b/packages/@aws-cdk/aws-resourcegroups/.npmignore index 5bd978c36b820..326e5850d930f 100644 --- a/packages/@aws-cdk/aws-resourcegroups/.npmignore +++ b/packages/@aws-cdk/aws-resourcegroups/.npmignore @@ -25,4 +25,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-robomaker/.npmignore b/packages/@aws-cdk/aws-robomaker/.npmignore index 207e92300ba4a..ab6d20fee7d79 100644 --- a/packages/@aws-cdk/aws-robomaker/.npmignore +++ b/packages/@aws-cdk/aws-robomaker/.npmignore @@ -27,4 +27,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-route53-patterns/.npmignore b/packages/@aws-cdk/aws-route53-patterns/.npmignore index 63ab95621c764..aaabf1df59065 100644 --- a/packages/@aws-cdk/aws-route53-patterns/.npmignore +++ b/packages/@aws-cdk/aws-route53-patterns/.npmignore @@ -24,4 +24,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-route53-targets/.npmignore b/packages/@aws-cdk/aws-route53-targets/.npmignore index 63ab95621c764..aaabf1df59065 100644 --- a/packages/@aws-cdk/aws-route53-targets/.npmignore +++ b/packages/@aws-cdk/aws-route53-targets/.npmignore @@ -24,4 +24,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-route53/.npmignore b/packages/@aws-cdk/aws-route53/.npmignore index 9e88226921c33..52ca12195912c 100644 --- a/packages/@aws-cdk/aws-route53/.npmignore +++ b/packages/@aws-cdk/aws-route53/.npmignore @@ -24,4 +24,5 @@ tsconfig.json **/cdk.out junit.xml test/ -jest.config.js \ No newline at end of file +jest.config.js +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-route53resolver/.npmignore b/packages/@aws-cdk/aws-route53resolver/.npmignore index 207e92300ba4a..ab6d20fee7d79 100644 --- a/packages/@aws-cdk/aws-route53resolver/.npmignore +++ b/packages/@aws-cdk/aws-route53resolver/.npmignore @@ -27,4 +27,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-s3-assets/.npmignore b/packages/@aws-cdk/aws-s3-assets/.npmignore index 63ab95621c764..aaabf1df59065 100644 --- a/packages/@aws-cdk/aws-s3-assets/.npmignore +++ b/packages/@aws-cdk/aws-s3-assets/.npmignore @@ -24,4 +24,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-s3-deployment/.npmignore b/packages/@aws-cdk/aws-s3-deployment/.npmignore index 6ed30427bcfa6..583bc17f7fb8a 100644 --- a/packages/@aws-cdk/aws-s3-deployment/.npmignore +++ b/packages/@aws-cdk/aws-s3-deployment/.npmignore @@ -27,4 +27,5 @@ jest.config.js **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-s3-notifications/.npmignore b/packages/@aws-cdk/aws-s3-notifications/.npmignore index 63ab95621c764..aaabf1df59065 100644 --- a/packages/@aws-cdk/aws-s3-notifications/.npmignore +++ b/packages/@aws-cdk/aws-s3-notifications/.npmignore @@ -24,4 +24,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-s3/.npmignore b/packages/@aws-cdk/aws-s3/.npmignore index 9e88226921c33..52ca12195912c 100644 --- a/packages/@aws-cdk/aws-s3/.npmignore +++ b/packages/@aws-cdk/aws-s3/.npmignore @@ -24,4 +24,5 @@ tsconfig.json **/cdk.out junit.xml test/ -jest.config.js \ No newline at end of file +jest.config.js +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-s3objectlambda/.npmignore b/packages/@aws-cdk/aws-s3objectlambda/.npmignore index e4486030fcb17..4ee1f86e9b1de 100644 --- a/packages/@aws-cdk/aws-s3objectlambda/.npmignore +++ b/packages/@aws-cdk/aws-s3objectlambda/.npmignore @@ -26,3 +26,5 @@ jest.config.js **/cdk.out junit.xml test/ + +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-s3outposts/.npmignore b/packages/@aws-cdk/aws-s3outposts/.npmignore index e4486030fcb17..4ee1f86e9b1de 100644 --- a/packages/@aws-cdk/aws-s3outposts/.npmignore +++ b/packages/@aws-cdk/aws-s3outposts/.npmignore @@ -26,3 +26,5 @@ jest.config.js **/cdk.out junit.xml test/ + +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-sagemaker/.npmignore b/packages/@aws-cdk/aws-sagemaker/.npmignore index 142da412995b7..ea1b1ae027cfc 100644 --- a/packages/@aws-cdk/aws-sagemaker/.npmignore +++ b/packages/@aws-cdk/aws-sagemaker/.npmignore @@ -28,4 +28,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-sam/.npmignore b/packages/@aws-cdk/aws-sam/.npmignore index 2892fc6e99416..778a9ab8b203a 100644 --- a/packages/@aws-cdk/aws-sam/.npmignore +++ b/packages/@aws-cdk/aws-sam/.npmignore @@ -28,4 +28,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-sdb/.npmignore b/packages/@aws-cdk/aws-sdb/.npmignore index 63ab95621c764..aaabf1df59065 100644 --- a/packages/@aws-cdk/aws-sdb/.npmignore +++ b/packages/@aws-cdk/aws-sdb/.npmignore @@ -24,4 +24,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-secretsmanager/.npmignore b/packages/@aws-cdk/aws-secretsmanager/.npmignore index ff4c0cd3c03a2..0ff3b96c4cf77 100644 --- a/packages/@aws-cdk/aws-secretsmanager/.npmignore +++ b/packages/@aws-cdk/aws-secretsmanager/.npmignore @@ -28,3 +28,5 @@ jest.config.js **/cdk.out junit.xml test/ + +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-securityhub/.npmignore b/packages/@aws-cdk/aws-securityhub/.npmignore index de98f3be1b6f4..059c8f07899cc 100644 --- a/packages/@aws-cdk/aws-securityhub/.npmignore +++ b/packages/@aws-cdk/aws-securityhub/.npmignore @@ -27,4 +27,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-servicecatalog/.npmignore b/packages/@aws-cdk/aws-servicecatalog/.npmignore index 63ab95621c764..aaabf1df59065 100644 --- a/packages/@aws-cdk/aws-servicecatalog/.npmignore +++ b/packages/@aws-cdk/aws-servicecatalog/.npmignore @@ -24,4 +24,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-servicecatalogappregistry/.npmignore b/packages/@aws-cdk/aws-servicecatalogappregistry/.npmignore index e4486030fcb17..4ee1f86e9b1de 100644 --- a/packages/@aws-cdk/aws-servicecatalogappregistry/.npmignore +++ b/packages/@aws-cdk/aws-servicecatalogappregistry/.npmignore @@ -26,3 +26,5 @@ jest.config.js **/cdk.out junit.xml test/ + +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-servicediscovery/.npmignore b/packages/@aws-cdk/aws-servicediscovery/.npmignore index a94c531529866..9a032ae80868c 100644 --- a/packages/@aws-cdk/aws-servicediscovery/.npmignore +++ b/packages/@aws-cdk/aws-servicediscovery/.npmignore @@ -23,4 +23,5 @@ tsconfig.json # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ses-actions/.npmignore b/packages/@aws-cdk/aws-ses-actions/.npmignore index 63ab95621c764..aaabf1df59065 100644 --- a/packages/@aws-cdk/aws-ses-actions/.npmignore +++ b/packages/@aws-cdk/aws-ses-actions/.npmignore @@ -24,4 +24,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ses/.npmignore b/packages/@aws-cdk/aws-ses/.npmignore index a94c531529866..9a032ae80868c 100644 --- a/packages/@aws-cdk/aws-ses/.npmignore +++ b/packages/@aws-cdk/aws-ses/.npmignore @@ -23,4 +23,5 @@ tsconfig.json # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-signer/.npmignore b/packages/@aws-cdk/aws-signer/.npmignore index e4486030fcb17..4ee1f86e9b1de 100644 --- a/packages/@aws-cdk/aws-signer/.npmignore +++ b/packages/@aws-cdk/aws-signer/.npmignore @@ -26,3 +26,5 @@ jest.config.js **/cdk.out junit.xml test/ + +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-sns-subscriptions/.npmignore b/packages/@aws-cdk/aws-sns-subscriptions/.npmignore index 63ab95621c764..aaabf1df59065 100644 --- a/packages/@aws-cdk/aws-sns-subscriptions/.npmignore +++ b/packages/@aws-cdk/aws-sns-subscriptions/.npmignore @@ -24,4 +24,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-sns/.npmignore b/packages/@aws-cdk/aws-sns/.npmignore index a94c531529866..9a032ae80868c 100644 --- a/packages/@aws-cdk/aws-sns/.npmignore +++ b/packages/@aws-cdk/aws-sns/.npmignore @@ -23,4 +23,5 @@ tsconfig.json # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-sqs/.npmignore b/packages/@aws-cdk/aws-sqs/.npmignore index a94c531529866..9a032ae80868c 100644 --- a/packages/@aws-cdk/aws-sqs/.npmignore +++ b/packages/@aws-cdk/aws-sqs/.npmignore @@ -23,4 +23,5 @@ tsconfig.json # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ssm/.npmignore b/packages/@aws-cdk/aws-ssm/.npmignore index a94c531529866..9a032ae80868c 100644 --- a/packages/@aws-cdk/aws-ssm/.npmignore +++ b/packages/@aws-cdk/aws-ssm/.npmignore @@ -23,4 +23,5 @@ tsconfig.json # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ssmcontacts/.npmignore b/packages/@aws-cdk/aws-ssmcontacts/.npmignore index e4486030fcb17..4ee1f86e9b1de 100644 --- a/packages/@aws-cdk/aws-ssmcontacts/.npmignore +++ b/packages/@aws-cdk/aws-ssmcontacts/.npmignore @@ -26,3 +26,5 @@ jest.config.js **/cdk.out junit.xml test/ + +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ssmincidents/.npmignore b/packages/@aws-cdk/aws-ssmincidents/.npmignore index e4486030fcb17..4ee1f86e9b1de 100644 --- a/packages/@aws-cdk/aws-ssmincidents/.npmignore +++ b/packages/@aws-cdk/aws-ssmincidents/.npmignore @@ -26,3 +26,5 @@ jest.config.js **/cdk.out junit.xml test/ + +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-sso/.npmignore b/packages/@aws-cdk/aws-sso/.npmignore index 7b8fb69082a0f..055473b613fbd 100644 --- a/packages/@aws-cdk/aws-sso/.npmignore +++ b/packages/@aws-cdk/aws-sso/.npmignore @@ -25,4 +25,5 @@ jest.config.js **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/.npmignore b/packages/@aws-cdk/aws-stepfunctions-tasks/.npmignore index c28149f1ec41d..42cdb9cf63a1b 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/.npmignore +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/.npmignore @@ -23,4 +23,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-stepfunctions/.npmignore b/packages/@aws-cdk/aws-stepfunctions/.npmignore index 63ab95621c764..aaabf1df59065 100644 --- a/packages/@aws-cdk/aws-stepfunctions/.npmignore +++ b/packages/@aws-cdk/aws-stepfunctions/.npmignore @@ -24,4 +24,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-synthetics/.npmignore b/packages/@aws-cdk/aws-synthetics/.npmignore index b3858c23d8230..55a44f8f7c031 100644 --- a/packages/@aws-cdk/aws-synthetics/.npmignore +++ b/packages/@aws-cdk/aws-synthetics/.npmignore @@ -24,4 +24,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-timestream/.npmignore b/packages/@aws-cdk/aws-timestream/.npmignore index 63ab95621c764..aaabf1df59065 100644 --- a/packages/@aws-cdk/aws-timestream/.npmignore +++ b/packages/@aws-cdk/aws-timestream/.npmignore @@ -24,4 +24,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-transfer/.npmignore b/packages/@aws-cdk/aws-transfer/.npmignore index de98f3be1b6f4..059c8f07899cc 100644 --- a/packages/@aws-cdk/aws-transfer/.npmignore +++ b/packages/@aws-cdk/aws-transfer/.npmignore @@ -27,4 +27,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-waf/.npmignore b/packages/@aws-cdk/aws-waf/.npmignore index 63ab95621c764..aaabf1df59065 100644 --- a/packages/@aws-cdk/aws-waf/.npmignore +++ b/packages/@aws-cdk/aws-waf/.npmignore @@ -24,4 +24,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-wafregional/.npmignore b/packages/@aws-cdk/aws-wafregional/.npmignore index 63ab95621c764..aaabf1df59065 100644 --- a/packages/@aws-cdk/aws-wafregional/.npmignore +++ b/packages/@aws-cdk/aws-wafregional/.npmignore @@ -24,4 +24,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-wafv2/.npmignore b/packages/@aws-cdk/aws-wafv2/.npmignore index c2827f80c26db..294b1464a0155 100644 --- a/packages/@aws-cdk/aws-wafv2/.npmignore +++ b/packages/@aws-cdk/aws-wafv2/.npmignore @@ -24,4 +24,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-workspaces/.npmignore b/packages/@aws-cdk/aws-workspaces/.npmignore index 63ab95621c764..aaabf1df59065 100644 --- a/packages/@aws-cdk/aws-workspaces/.npmignore +++ b/packages/@aws-cdk/aws-workspaces/.npmignore @@ -24,4 +24,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/aws-xray/.npmignore b/packages/@aws-cdk/aws-xray/.npmignore index e4486030fcb17..4ee1f86e9b1de 100644 --- a/packages/@aws-cdk/aws-xray/.npmignore +++ b/packages/@aws-cdk/aws-xray/.npmignore @@ -26,3 +26,5 @@ jest.config.js **/cdk.out junit.xml test/ + +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/cdk-assets-schema/.npmignore b/packages/@aws-cdk/cdk-assets-schema/.npmignore index 63ab95621c764..aaabf1df59065 100644 --- a/packages/@aws-cdk/cdk-assets-schema/.npmignore +++ b/packages/@aws-cdk/cdk-assets-schema/.npmignore @@ -24,4 +24,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/cloud-assembly-schema/.npmignore b/packages/@aws-cdk/cloud-assembly-schema/.npmignore index 63ab95621c764..aaabf1df59065 100644 --- a/packages/@aws-cdk/cloud-assembly-schema/.npmignore +++ b/packages/@aws-cdk/cloud-assembly-schema/.npmignore @@ -24,4 +24,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/cloudformation-include/.npmignore b/packages/@aws-cdk/cloudformation-include/.npmignore index 89953b9a92f1b..fb249272fc7f0 100644 --- a/packages/@aws-cdk/cloudformation-include/.npmignore +++ b/packages/@aws-cdk/cloudformation-include/.npmignore @@ -24,4 +24,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/core/.npmignore b/packages/@aws-cdk/core/.npmignore index cab9567cc557d..16ca0d3960de2 100644 --- a/packages/@aws-cdk/core/.npmignore +++ b/packages/@aws-cdk/core/.npmignore @@ -27,4 +27,5 @@ tsconfig.json **/cdk.out junit.xml jest.config.js -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/custom-resources/.npmignore b/packages/@aws-cdk/custom-resources/.npmignore index fcd1908ac39cb..7c9d5b2ef9a4c 100644 --- a/packages/@aws-cdk/custom-resources/.npmignore +++ b/packages/@aws-cdk/custom-resources/.npmignore @@ -25,4 +25,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/cx-api/.npmignore b/packages/@aws-cdk/cx-api/.npmignore index 63ab95621c764..aaabf1df59065 100644 --- a/packages/@aws-cdk/cx-api/.npmignore +++ b/packages/@aws-cdk/cx-api/.npmignore @@ -24,4 +24,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/example-construct-library/.npmignore b/packages/@aws-cdk/example-construct-library/.npmignore index bca0ae2513f1e..035ae58ab85b2 100644 --- a/packages/@aws-cdk/example-construct-library/.npmignore +++ b/packages/@aws-cdk/example-construct-library/.npmignore @@ -23,4 +23,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/lambda-layer-awscli/.npmignore b/packages/@aws-cdk/lambda-layer-awscli/.npmignore index e514bf94711e1..d6e5b7eb9655c 100644 --- a/packages/@aws-cdk/lambda-layer-awscli/.npmignore +++ b/packages/@aws-cdk/lambda-layer-awscli/.npmignore @@ -26,3 +26,5 @@ jest.config.js junit.xml test/ + +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/lambda-layer-kubectl/.npmignore b/packages/@aws-cdk/lambda-layer-kubectl/.npmignore index e514bf94711e1..d6e5b7eb9655c 100644 --- a/packages/@aws-cdk/lambda-layer-kubectl/.npmignore +++ b/packages/@aws-cdk/lambda-layer-kubectl/.npmignore @@ -26,3 +26,5 @@ jest.config.js junit.xml test/ + +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/pipelines/.npmignore b/packages/@aws-cdk/pipelines/.npmignore index 8b1d5e48f3c78..0f236edd1e0c1 100644 --- a/packages/@aws-cdk/pipelines/.npmignore +++ b/packages/@aws-cdk/pipelines/.npmignore @@ -26,3 +26,5 @@ jest.config.js junit.xml package/node_modules test/ + +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/region-info/.npmignore b/packages/@aws-cdk/region-info/.npmignore index 4e84b879a486f..e948a49f4e18e 100644 --- a/packages/@aws-cdk/region-info/.npmignore +++ b/packages/@aws-cdk/region-info/.npmignore @@ -22,4 +22,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/@aws-cdk/yaml-cfn/.npmignore b/packages/@aws-cdk/yaml-cfn/.npmignore index 63ab95621c764..aaabf1df59065 100644 --- a/packages/@aws-cdk/yaml-cfn/.npmignore +++ b/packages/@aws-cdk/yaml-cfn/.npmignore @@ -24,4 +24,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/aws-cdk-lib/.npmignore b/packages/aws-cdk-lib/.npmignore index 74ae2ddf8a56f..e718645d81b63 100644 --- a/packages/aws-cdk-lib/.npmignore +++ b/packages/aws-cdk-lib/.npmignore @@ -25,4 +25,5 @@ tsconfig.json # exclude cdk artifacts **/cdk.out junit.xml -rosetta + +!*.lit.ts \ No newline at end of file diff --git a/packages/monocdk/.npmignore b/packages/monocdk/.npmignore index eb24dc7eb2308..29879ae453b8b 100644 --- a/packages/monocdk/.npmignore +++ b/packages/monocdk/.npmignore @@ -24,4 +24,5 @@ tsconfig.json # exclude cdk artifacts **/cdk.out junit.xml -test/ \ No newline at end of file +test/ +!*.lit.ts \ No newline at end of file diff --git a/packages/monocdk/rosetta/default.ts-fixture b/packages/monocdk/rosetta/default.ts-fixture index 558cc09b1c049..b4fc6518a606e 100644 --- a/packages/monocdk/rosetta/default.ts-fixture +++ b/packages/monocdk/rosetta/default.ts-fixture @@ -23,7 +23,6 @@ import { CustomResource, CustomResourceProvider, CustomResourceProviderRuntime, - DependableTrait, Duration, Fn, IConstruct, diff --git a/scripts/check-build-prerequisites.sh b/scripts/check-build-prerequisites.sh index 4414ff378a48d..b48e67f363edf 100755 --- a/scripts/check-build-prerequisites.sh +++ b/scripts/check-build-prerequisites.sh @@ -56,7 +56,7 @@ then echo "Ok" fi fi -else +else echo "Not 12" wrong_version fi @@ -89,13 +89,13 @@ else die "Docker is not running" fi -# [.NET == 3.1.x] +# [.NET == 3.1.x, == 5.x] app="dotnet" app_min="3.1.0" check_which $app $app_min app_v=$(${app} --version) echo -e "Checking dotnet version... \c" -if [ $(echo $app_v | grep -c -E "3\.1\.[0-9]+") -eq 1 ] +if [ $(echo $app_v | grep -c -E "(3\.1\.[0-9]+|5\.[0-9]+\.[0-9]+)") -eq 1 ] then echo "Ok" else diff --git a/scripts/check-pack-prerequisites.sh b/scripts/check-pack-prerequisites.sh index 6b648054fe253..b60d23f963d5b 100755 --- a/scripts/check-pack-prerequisites.sh +++ b/scripts/check-pack-prerequisites.sh @@ -57,8 +57,8 @@ if [ $(echo $app_v | grep -c -E "1\.8\.[0-9].*") -eq 1 ] then echo "Ok" else - # 11 or 14 or 15 - if [ $(echo $app_v | grep -c -E "1[145]\.[0-9]\.[0-9].*") -eq 1 ] + # 11 or 14 or 15 or 16 + if [ $(echo $app_v | grep -c -E "1[1-6]\.[0-9]\.[0-9].*") -eq 1 ] then echo "Ok" else diff --git a/tools/pkglint/lib/rules.ts b/tools/pkglint/lib/rules.ts index 39e9b6dc6dd04..a696b43bceabe 100644 --- a/tools/pkglint/lib/rules.ts +++ b/tools/pkglint/lib/rules.ts @@ -1055,6 +1055,7 @@ export class NpmIgnoreForJsiiModules extends ValidationRule { '*.ts', '!*.d.ts', '!*.js', + '!*.lit.ts', // <- This is part of the module's documentation! 'coverage', '.nyc_output', '*.tgz', diff --git a/yarn.lock b/yarn.lock index 726490335f32e..98cc64e9e0178 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1609,7 +1609,7 @@ dependencies: "@types/istanbul-lib-report" "*" -"@types/jest@^26.0.22", "@types/jest@^26.0.23": +"@types/jest@^26.0.23": version "26.0.23" resolved "https://registry.yarnpkg.com/@types/jest/-/jest-26.0.23.tgz#a1b7eab3c503b80451d019efb588ec63522ee4e7" integrity sha512-ZHLmWMJ9jJ9PTiT58juykZpL7KjwJywFN3Rr2pTSkyQfydf/rk22yS7W8p5DaVUMQ2BQC7oYiU3FjbTM/mYrOA== From c0bfb716c85ae6e5feffcdb6c88e508ba40d0387 Mon Sep 17 00:00:00 2001 From: Rico Huijbers Date: Tue, 22 Jun 2021 18:09:59 +0200 Subject: [PATCH 11/14] chore(assertions): fix build for nozem 0.11.0 (#15251) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/assertions/package.json | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/packages/@aws-cdk/assertions/package.json b/packages/@aws-cdk/assertions/package.json index 34c3937e7b774..9721df2f04574 100644 --- a/packages/@aws-cdk/assertions/package.json +++ b/packages/@aws-cdk/assertions/package.json @@ -59,6 +59,7 @@ "devDependencies": { "@types/jest": "^26.0.23", "cdk-build-tools": "0.0.0", + "@aws-cdk/cfnspec": "0.0.0", "constructs": "^3.3.69", "jest": "^26.6.3", "pkglint": "0.0.0", @@ -102,6 +103,15 @@ "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" }, + "nozem": { + "ostools": ["dirname", "cd", "bash", "rm", "xargs", "sed", "mkdir", "rsync", "cat", "find"], + "additionalDirs": [ + "../cfnspec/lib", + "ARTIFACTS:../cfnspec/spec", + "../cloudformation-diff", + "../assert-internal" + ] + }, "stability": "experimental", "maturity": "experimental", "publishConfig": { From 249c367fc449afc67dea7bc2ad48c69a29a11034 Mon Sep 17 00:00:00 2001 From: Jonathan Goldwasser Date: Tue, 22 Jun 2021 18:53:21 +0200 Subject: [PATCH 12/14] fix(amplify): deployment does not remove basic auth (#15243) Removing the `BasicAuthConfig` property from the template doesn't remove the basic auth. Explicitely set `EnableBasicAuth` to `false` instead. Closes #15028 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/aws-amplify/lib/app.ts | 8 ++++++-- packages/@aws-cdk/aws-amplify/test/app.test.ts | 6 ++++++ .../aws-amplify/test/integ.app-codecommit.expected.json | 3 +++ .../@aws-cdk/aws-amplify/test/integ.app.expected.json | 3 +++ 4 files changed, 18 insertions(+), 2 deletions(-) diff --git a/packages/@aws-cdk/aws-amplify/lib/app.ts b/packages/@aws-cdk/aws-amplify/lib/app.ts index 43f8e308cb8f9..831921f89dbf8 100644 --- a/packages/@aws-cdk/aws-amplify/lib/app.ts +++ b/packages/@aws-cdk/aws-amplify/lib/app.ts @@ -215,7 +215,9 @@ export class App extends Resource implements IApp, iam.IGrantable { accessToken: sourceCodeProviderOptions?.accessToken?.toString(), autoBranchCreationConfig: props.autoBranchCreation && { autoBranchCreationPatterns: props.autoBranchCreation.patterns, - basicAuthConfig: props.autoBranchCreation.basicAuth && props.autoBranchCreation.basicAuth.bind(this, 'BranchBasicAuth'), + basicAuthConfig: props.autoBranchCreation.basicAuth + ? props.autoBranchCreation.basicAuth.bind(this, 'BranchBasicAuth') + : { enableBasicAuth: false }, buildSpec: props.autoBranchCreation.buildSpec && props.autoBranchCreation.buildSpec.toBuildSpec(), enableAutoBranchCreation: true, enableAutoBuild: props.autoBranchCreation.autoBuild ?? true, @@ -225,7 +227,9 @@ export class App extends Resource implements IApp, iam.IGrantable { stage: props.autoBranchCreation.stage, }, enableBranchAutoDeletion: props.autoBranchDeletion, - basicAuthConfig: props.basicAuth && props.basicAuth.bind(this, 'AppBasicAuth'), + basicAuthConfig: props.basicAuth + ? props.basicAuth.bind(this, 'AppBasicAuth') + : { enableBasicAuth: false }, buildSpec: props.buildSpec && props.buildSpec.toBuildSpec(), customRules: Lazy.any({ produce: () => this.customRules }, { omitEmptyArray: true }), description: props.description, diff --git a/packages/@aws-cdk/aws-amplify/test/app.test.ts b/packages/@aws-cdk/aws-amplify/test/app.test.ts index 9c7dcb4689fcb..f4e4468708a76 100644 --- a/packages/@aws-cdk/aws-amplify/test/app.test.ts +++ b/packages/@aws-cdk/aws-amplify/test/app.test.ts @@ -43,6 +43,9 @@ test('create an app connected to a GitHub repository', () => { }, OauthToken: 'secret', Repository: 'https://github.com/aws/aws-cdk', + BasicAuthConfig: { + EnableBasicAuth: false, + }, }); expect(stack).toHaveResource('AWS::IAM::Role', { @@ -355,6 +358,9 @@ test('with auto branch creation', () => { // THEN expect(stack).toHaveResource('AWS::Amplify::App', { AutoBranchCreationConfig: { + BasicAuthConfig: { + EnableBasicAuth: false, + }, EnableAutoBranchCreation: true, EnableAutoBuild: true, EnablePullRequestPreview: true, diff --git a/packages/@aws-cdk/aws-amplify/test/integ.app-codecommit.expected.json b/packages/@aws-cdk/aws-amplify/test/integ.app-codecommit.expected.json index 3c8d758a92492..740a646d60a12 100644 --- a/packages/@aws-cdk/aws-amplify/test/integ.app-codecommit.expected.json +++ b/packages/@aws-cdk/aws-amplify/test/integ.app-codecommit.expected.json @@ -53,6 +53,9 @@ "Type": "AWS::Amplify::App", "Properties": { "Name": "App", + "BasicAuthConfig": { + "EnableBasicAuth": false + }, "IAMServiceRole": { "Fn::GetAtt": [ "AppRole1AF9B530", diff --git a/packages/@aws-cdk/aws-amplify/test/integ.app.expected.json b/packages/@aws-cdk/aws-amplify/test/integ.app.expected.json index d88cdb37025d8..25971c2ea44a7 100644 --- a/packages/@aws-cdk/aws-amplify/test/integ.app.expected.json +++ b/packages/@aws-cdk/aws-amplify/test/integ.app.expected.json @@ -31,6 +31,9 @@ "Properties": { "Name": "App", "AutoBranchCreationConfig": { + "BasicAuthConfig": { + "EnableBasicAuth": false + }, "EnableAutoBranchCreation": true, "EnableAutoBuild": true, "EnablePullRequestPreview": true From d4bb09af162b103ddd866076e08fca2b68b22c02 Mon Sep 17 00:00:00 2001 From: Akshay Gupta Date: Tue, 22 Jun 2021 10:31:29 -0700 Subject: [PATCH 13/14] fix(core): `1 hour` renders as `60 minutes` (#15125) When asked to convert full hours to human strings, due to floating point errors, they get rendered as minutes. 1 hour gets converted to 60 minutes. 2 hours converts to 1 hour 60 minutes. This request fixes that by first multiplying `amount` with the `fromUnit.inMillis` before dividing by `toUnit.inMillis`. This ensures that if the amount is big enough, it gets divided properly. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../@aws-cdk/aws-cognito/test/user-pool-client.test.ts | 10 +++++----- packages/@aws-cdk/core/lib/duration.ts | 3 +-- packages/@aws-cdk/core/test/duration.test.ts | 7 ++++++- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/packages/@aws-cdk/aws-cognito/test/user-pool-client.test.ts b/packages/@aws-cdk/aws-cognito/test/user-pool-client.test.ts index 084ea563cb477..22055828bebe5 100644 --- a/packages/@aws-cdk/aws-cognito/test/user-pool-client.test.ts +++ b/packages/@aws-cdk/aws-cognito/test/user-pool-client.test.ts @@ -670,7 +670,7 @@ describe('User Pool Client', () => { accessTokenValidity: validity, refreshTokenValidity: Duration.hours(1), }); - }).toThrow(`accessTokenValidity: Must be a duration between 5 minutes and 60 minutes (inclusive); received ${validity.toHumanString()}.`); + }).toThrow(`accessTokenValidity: Must be a duration between 5 minutes and 1 hour (inclusive); received ${validity.toHumanString()}.`); }); test.each([ @@ -686,7 +686,7 @@ describe('User Pool Client', () => { idTokenValidity: validity, refreshTokenValidity: Duration.hours(1), }); - }).toThrow(`idTokenValidity: Must be a duration between 5 minutes and 60 minutes (inclusive); received ${validity.toHumanString()}.`); + }).toThrow(`idTokenValidity: Must be a duration between 5 minutes and 1 hour (inclusive); received ${validity.toHumanString()}.`); }); test.each([ @@ -694,7 +694,7 @@ describe('User Pool Client', () => { Duration.minutes(59), Duration.days(10 * 365).plus(Duration.minutes(1)), Duration.days(10 * 365 + 1), - ])('validates refreshTokenValidity is a duration between 60 minutes and 10 years', (validity) => { + ])('validates refreshTokenValidity is a duration between 1 hour and 10 years', (validity) => { const stack = new Stack(); const pool = new UserPool(stack, 'Pool'); expect(() => { @@ -702,7 +702,7 @@ describe('User Pool Client', () => { userPoolClientName: 'Client1', refreshTokenValidity: validity, }); - }).toThrow(`refreshTokenValidity: Must be a duration between 60 minutes and 3650 days (inclusive); received ${validity.toHumanString()}.`); + }).toThrow(`refreshTokenValidity: Must be a duration between 1 hour and 3650 days (inclusive); received ${validity.toHumanString()}.`); }); test.each([ @@ -758,7 +758,7 @@ describe('User Pool Client', () => { Duration.minutes(120), Duration.days(365), Duration.days(10 * 365), - ])('validates refreshTokenValidity is a duration between 60 minutes and 10 years (valid)', (validity) => { + ])('validates refreshTokenValidity is a duration between 1 hour and 10 years (valid)', (validity) => { const stack = new Stack(); const pool = new UserPool(stack, 'Pool'); diff --git a/packages/@aws-cdk/core/lib/duration.ts b/packages/@aws-cdk/core/lib/duration.ts index b1c675d3ce722..0061e7928e900 100644 --- a/packages/@aws-cdk/core/lib/duration.ts +++ b/packages/@aws-cdk/core/lib/duration.ts @@ -309,12 +309,11 @@ class TimeUnit { function convert(amount: number, fromUnit: TimeUnit, toUnit: TimeUnit, { integral = true }: TimeConversionOptions) { if (fromUnit.inMillis === toUnit.inMillis) { return amount; } - const multiplier = fromUnit.inMillis / toUnit.inMillis; if (Token.isUnresolved(amount)) { throw new Error(`Unable to perform time unit conversion on un-resolved token ${amount}.`); } - const value = amount * multiplier; + const value = (amount * fromUnit.inMillis) / toUnit.inMillis; if (!Number.isInteger(value) && integral) { throw new Error(`'${amount} ${fromUnit}' cannot be converted into a whole number of ${toUnit}.`); } diff --git a/packages/@aws-cdk/core/test/duration.test.ts b/packages/@aws-cdk/core/test/duration.test.ts index 75b92c76924c2..5b04827d72f07 100644 --- a/packages/@aws-cdk/core/test/duration.test.ts +++ b/packages/@aws-cdk/core/test/duration.test.ts @@ -147,8 +147,13 @@ nodeunitShim({ test.equal(Duration.minutes(0).toHumanString(), '0 minutes'); test.equal(Duration.minutes(Lazy.number({ produce: () => 5 })).toHumanString(), ' minutes'); - test.equal(Duration.minutes(10).toHumanString(), '10 minutes'); + test.equal(Duration.days(1).toHumanString(), '1 day'); + test.equal(Duration.hours(1).toHumanString(), '1 hour'); test.equal(Duration.minutes(1).toHumanString(), '1 minute'); + test.equal(Duration.seconds(1).toHumanString(), '1 second'); + test.equal(Duration.millis(1).toHumanString(), '1 milli'); + + test.equal(Duration.minutes(10).toHumanString(), '10 minutes'); test.equal(Duration.minutes(62).toHumanString(), '1 hour 2 minutes'); From bc77be794c0f8715de1df542fa30675cec9eaffa Mon Sep 17 00:00:00 2001 From: Sai Sandeep Mutyala Date: Tue, 22 Jun 2021 23:53:14 +0530 Subject: [PATCH 14/14] fix(elasticsearch): Domain.fromDomainAttributes gives "Invalid URL" when endpoint is a token (#15219) `Domain.fromDomainAttributes` throws the error "Invalid URL" when a token endpoint is provided. In this PR, the domain name is retrieved from the scope using the arn present in `DomainAttributes`, and if no name is found, we try to get it from the endpoint (as it has been done so far). Also added a test to verify that the error disappears with this change, even when it is given token attributes. closes #15188 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../@aws-cdk/aws-elasticsearch/lib/domain.ts | 2 +- .../aws-elasticsearch/test/domain.test.ts | 41 ++++++++++++++++++- 2 files changed, 40 insertions(+), 3 deletions(-) diff --git a/packages/@aws-cdk/aws-elasticsearch/lib/domain.ts b/packages/@aws-cdk/aws-elasticsearch/lib/domain.ts index d8a8db02d8a8a..676d6984234c4 100644 --- a/packages/@aws-cdk/aws-elasticsearch/lib/domain.ts +++ b/packages/@aws-cdk/aws-elasticsearch/lib/domain.ts @@ -1211,7 +1211,7 @@ export class Domain extends DomainBase implements IDomain, ec2.IConnectable { */ public static fromDomainAttributes(scope: Construct, id: string, attrs: DomainAttributes): IDomain { const { domainArn, domainEndpoint } = attrs; - const domainName = extractNameFromEndpoint(domainEndpoint); + const domainName = cdk.Stack.of(scope).parseArn(domainArn).resourceName ?? extractNameFromEndpoint(domainEndpoint); return new class extends DomainBase { public readonly domainArn = domainArn; diff --git a/packages/@aws-cdk/aws-elasticsearch/test/domain.test.ts b/packages/@aws-cdk/aws-elasticsearch/test/domain.test.ts index 0135d979860b1..038eb1ebc82db 100644 --- a/packages/@aws-cdk/aws-elasticsearch/test/domain.test.ts +++ b/packages/@aws-cdk/aws-elasticsearch/test/domain.test.ts @@ -8,7 +8,7 @@ import * as iam from '@aws-cdk/aws-iam'; import * as kms from '@aws-cdk/aws-kms'; import * as logs from '@aws-cdk/aws-logs'; import * as route53 from '@aws-cdk/aws-route53'; -import { App, Stack, Duration, SecretValue } from '@aws-cdk/core'; +import { App, Stack, Duration, SecretValue, CfnParameter } from '@aws-cdk/core'; import { Domain, ElasticsearchVersion } from '../lib'; let app: App; @@ -900,7 +900,7 @@ describe('import', () => { test('static fromDomainAttributes(attributes) allows importing an external/existing domain', () => { const domainName = 'test-domain-2w2x2u3tifly'; - const domainArn = `es:testregion:1234:domain/${domainName}`; + const domainArn = `arn:aws:es:testregion:1234:domain/${domainName}`; const domainEndpoint = `https://${domainName}-jcjotrt6f7otem4sqcwbch3c4u.testregion.es.amazonaws.com`; const imported = Domain.fromDomainAttributes(stack, 'Domain', { domainArn, @@ -913,6 +913,43 @@ describe('import', () => { expect(stack).not.toHaveResource('AWS::Elasticsearch::Domain'); }); + test('static fromDomainAttributes(attributes) allows importing with token arn and endpoint', () => { + const domainArn = new CfnParameter(stack, 'domainArn', { type: 'String' }).valueAsString; + const domainEndpoint = new CfnParameter(stack, 'domainEndpoint', { type: 'String' }).valueAsString; + const imported = Domain.fromDomainAttributes(stack, 'Domain', { + domainArn, + domainEndpoint, + }); + const expectedDomainName = { + 'Fn::Select': [ + 1, + { + 'Fn::Split': [ + '/', + { + 'Fn::Select': [ + 5, + { + 'Fn::Split': [ + ':', + { + Ref: 'domainArn', + }, + ], + }, + ], + }, + ], + }, + ], + }; + + expect(stack.resolve(imported.domainName)).toEqual(expectedDomainName); + expect(imported.domainArn).toEqual(domainArn); + expect(imported.domainEndpoint).toEqual(domainEndpoint); + + expect(stack).not.toHaveResource('AWS::Elasticsearch::Domain'); + }); }); describe('advanced security options', () => {