diff --git a/.projen/deps.json b/.projen/deps.json index 9c8073ca..a250d841 100644 --- a/.projen/deps.json +++ b/.projen/deps.json @@ -20,6 +20,10 @@ "version": "2.28.1", "type": "build" }, + { + "name": "@aws-sdk/client-dynamodb", + "type": "build" + }, { "name": "@swc/jest", "type": "build" @@ -254,6 +258,10 @@ { "name": "minimatch", "type": "runtime" + }, + { + "name": "source-map", + "type": "runtime" } ], "//": "~~ Generated by projen. To modify, edit .projenrc.js and run \"npx projen\"." diff --git a/.projenrc.ts b/.projenrc.ts index 42b5a547..d47eac62 100644 --- a/.projenrc.ts +++ b/.projenrc.ts @@ -102,6 +102,7 @@ const project = new CustomTypescriptProject({ "@swc/cli", "@swc/core@1.2.245", "@swc/register", + "source-map", ], devDeps: [ `@aws-cdk/aws-appsync-alpha@${MIN_CDK_VERSION}-alpha.0`, @@ -118,6 +119,7 @@ const project = new CustomTypescriptProject({ /** * For CDK Local Stack tests */ + "@aws-sdk/client-dynamodb", `@aws-cdk/cloud-assembly-schema@${MIN_CDK_VERSION}`, `@aws-cdk/cloudformation-diff@${MIN_CDK_VERSION}`, `@aws-cdk/cx-api@${MIN_CDK_VERSION}`, diff --git a/.vscode/launch.json b/.vscode/launch.json index 834cbfc6..8e988eae 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -37,8 +37,8 @@ "type": "node", "request": "launch", "runtimeExecutable": "node", - "runtimeArgs": ["--nolazy"], - "args": ["./lib/message-board.js"], + "runtimeArgs": ["--nolazy", "-r", "./hook"], + "args": ["./src/message-board.ts"], "outFiles": [ "${workspaceRoot}/lib/**/*.js", "${workspaceRoot}/test-app/lib/**/*.js", @@ -98,6 +98,7 @@ "disableOptimisticBPs": true, "program": "${workspaceFolder}/node_modules/.bin/jest", "cwd": "${workspaceFolder}", + "runtimeArgs": ["--enable-source-maps"], "args": [ "--runInBand", "--watchAll=false", @@ -108,19 +109,33 @@ "--coverage=false" ] }, - + { + "name": ".projenrc.ts", + "type": "node", + "request": "launch", + "runtimeExecutable": "node", + "runtimeArgs": ["--nolazy", "-r", "@swc/register"], + "args": [".projenrc.ts"], + "cwd": "${workspaceRoot}", + "internalConsoleOptions": "openOnSessionStart", + "skipFiles": ["/**", "node_modules/**"], + "env": { + "TS_NODE_PROJECT": "${workspaceRoot}/test-app/tsconfig.json" + } + }, { "name": "generate aws sdk types", "type": "node", "request": "launch", "runtimeExecutable": "node", "runtimeArgs": ["--nolazy", "-r", "ts-node/register/transpile-only"], - - "args": ["scripts/sdk-gen.ts"], - + "args": ["./src/serialize-globals.ts"], "cwd": "${workspaceRoot}", "internalConsoleOptions": "openOnSessionStart", - "skipFiles": ["/**", "node_modules/**"] + "skipFiles": ["/**", "node_modules/**"], + "env": { + "TS_NODE_PROJECT": "${workspaceRoot}/tsconfig.json" + } } ] } diff --git a/.vscode/settings.json b/.vscode/settings.json index f79e5125..795aee42 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -39,7 +39,7 @@ "editor.insertSpaces": true, "editor.formatOnSave": true, "eslint.format.enable": false, - "typescript.tsdk": "node_modules/typescript/lib", "jest.jestCommandLine": "node_modules/.bin/jest", + "jest.autoRun": "off", "cSpell.words": ["localstack", "stepfunctions", "typesafe"] } diff --git a/package.json b/package.json index ff9b7fcf..349838b0 100644 --- a/package.json +++ b/package.json @@ -36,6 +36,7 @@ "@aws-cdk/cloud-assembly-schema": "2.28.1", "@aws-cdk/cloudformation-diff": "2.28.1", "@aws-cdk/cx-api": "2.28.1", + "@aws-sdk/client-dynamodb": "^3.145.0", "@swc/jest": "^0.2.22", "@types/fs-extra": "^9.0.13", "@types/jest": "^29.0.3", @@ -94,7 +95,8 @@ "@swc/register": "^0.1.10", "@types/aws-lambda": "^8.10.102", "fs-extra": "^10.1.0", - "minimatch": "^5.1.0" + "minimatch": "^5.1.0", + "source-map": "^0.7.4" }, "main": "lib/index.js", "license": "Apache-2.0", @@ -145,6 +147,10 @@ ] }, "types": "lib/index.d.ts", + "resolutions": { + "@types/responselike": "1.0.0", + "got": "12.3.1" + }, "lint-staged": { "*.{tsx,jsx,ts,js,json,md,css}": [ "eslint --fix" diff --git a/src/api.ts b/src/api.ts index 453ec892..e7dfb655 100644 --- a/src/api.ts +++ b/src/api.ts @@ -658,12 +658,13 @@ export class APIGatewayVTL extends VTL { } else if ( isPropAccessExpr(node) && isIdentifier(node.name) && - isInputBody(node.expr) && node.name.name === "data" ) { - // $input.data maps to `$input.path('$')` - // this returns a VTL object representing the root payload data - return `$input.path('$')`; + if (isInputBody(node.expr)) { + // $input.data maps to `$input.path('$')` + // this returns a VTL object representing the root payload data + return `$input.path('$')`; + } } return super.eval(node as any, returnVar); } diff --git a/src/asl/synth.ts b/src/asl/synth.ts index f75cb549..1c6d7177 100644 --- a/src/asl/synth.ts +++ b/src/asl/synth.ts @@ -4111,6 +4111,7 @@ export class ASL { `the 'callback' argument of map must be a function or arrow expression, found: ${callbackfn?.kindName}` ); } + return this.evalExprToJsonPath(expr.expr.expr, (listOutput) => { // we assume that an array literal or a call would return a variable. if ( @@ -5654,7 +5655,7 @@ function toStateName(node?: FunctionlessNode): string { } else if (isBooleanLiteralExpr(node)) { return `${node.value}`; } else if (isCallExpr(node) || isNewExpr(node)) { - if (isSuperKeyword(node.expr) || isImportKeyword(node.expr)) { + if (isImportKeyword(node.expr)) { throw new Error(`calling ${node.expr.kindName} is unsupported in ASL`); } return `${isNewExpr(node) ? "new " : ""}${toStateName( @@ -5689,7 +5690,6 @@ function toStateName(node?: FunctionlessNode): string { `${prop.kindName} is not supported by Step Functions` ); } - return toStateName(prop); }) .join(", ")}}`; diff --git a/src/aws-sdk/sdk.generated.ts b/src/aws-sdk/sdk.generated.ts index ddb58d2d..40d33360 100644 --- a/src/aws-sdk/sdk.generated.ts +++ b/src/aws-sdk/sdk.generated.ts @@ -12482,6 +12482,13 @@ export interface CloudTrail { input: AWS.CloudTrail.DescribeTrailsRequest, options: SdkCallOptions ): Promise; + /** + * Returns the specified CloudTrail service-linked channel. Amazon Web Services services create service-linked channels to view CloudTrail events. + */ + getChannel( + input: AWS.CloudTrail.GetChannelRequest, + options: SdkCallOptions + ): Promise; /** * Returns information about an event data store specified as either an ARN or the ID portion of the ARN. */ @@ -12524,6 +12531,13 @@ export interface CloudTrail { input: AWS.CloudTrail.GetTrailStatusRequest, options: SdkCallOptions ): Promise; + /** + * Returns all CloudTrail channels. + */ + listChannels( + input: AWS.CloudTrail.ListChannelsRequest, + options: SdkCallOptions + ): Promise; /** * Returns information about all event data stores in the account, in the current region. */ @@ -12616,7 +12630,7 @@ export interface CloudTrail { options: SdkCallOptions ): Promise; /** - * Updates an event data store. The required EventDataStore value is an ARN or the ID portion of the ARN. Other parameters are optional, but at least one optional parameter must be specified, or CloudTrail throws an error. RetentionPeriod is in days, and valid values are integers between 90 and 2555. By default, TerminationProtection is enabled. AdvancedEventSelectors includes or excludes management and data events in your event data store; for more information about AdvancedEventSelectors, see PutEventSelectorsRequest$AdvancedEventSelectors. + * Updates an event data store. The required EventDataStore value is an ARN or the ID portion of the ARN. Other parameters are optional, but at least one optional parameter must be specified, or CloudTrail throws an error. RetentionPeriod is in days, and valid values are integers between 90 and 2557. By default, TerminationProtection is enabled. AdvancedEventSelectors includes or excludes management and data events in your event data store; for more information about AdvancedEventSelectors, see PutEventSelectorsRequest$AdvancedEventSelectors. */ updateEventDataStore( input: AWS.CloudTrail.UpdateEventDataStoreRequest, @@ -24960,7 +24974,7 @@ export interface EC2 { options: SdkCallOptions ): Promise; /** - * We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon Elastic Compute Cloud User Guide. Links an EC2-Classic instance to a ClassicLink-enabled VPC through one or more of the VPC's security groups. You cannot link an EC2-Classic instance to more than one VPC at a time. You can only link an instance that's in the running state. An instance is automatically unlinked from a VPC when it's stopped - you can link it to the VPC again when you restart it. After you've linked an instance, you cannot change the VPC security groups that are associated with it. To change the security groups, you must first unlink the instance, and then link it again. Linking your instance to a VPC is sometimes referred to as attaching your instance. + * We are retiring EC2-Classic. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon Elastic Compute Cloud User Guide. Links an EC2-Classic instance to a ClassicLink-enabled VPC through one or more of the VPC's security groups. You cannot link an EC2-Classic instance to more than one VPC at a time. You can only link an instance that's in the running state. An instance is automatically unlinked from a VPC when it's stopped - you can link it to the VPC again when you restart it. After you've linked an instance, you cannot change the VPC security groups that are associated with it. To change the security groups, you must first unlink the instance, and then link it again. Linking your instance to a VPC is sometimes referred to as attaching your instance. */ attachClassicLinkVpc( input: AWS.EC2.AttachClassicLinkVpcRequest, @@ -25163,7 +25177,7 @@ export interface EC2 { options: SdkCallOptions ): Promise; /** - * Creates a default VPC with a size /16 IPv4 CIDR block and a default subnet in each Availability Zone. For more information about the components of a default VPC, see Default VPC and default subnets in the Amazon Virtual Private Cloud User Guide. You cannot specify the components of the default VPC yourself. If you deleted your previous default VPC, you can create a default VPC. You cannot have more than one default VPC per Region. If your account supports EC2-Classic, you cannot use this action to create a default VPC in a Region that supports EC2-Classic. If you want a default VPC in a Region that supports EC2-Classic, see "I really want a default VPC for my existing EC2 account. Is that possible?" in the Default VPCs FAQ. We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon Elastic Compute Cloud User Guide. + * Creates a default VPC with a size /16 IPv4 CIDR block and a default subnet in each Availability Zone. For more information about the components of a default VPC, see Default VPC and default subnets in the Amazon Virtual Private Cloud User Guide. You cannot specify the components of the default VPC yourself. If you deleted your previous default VPC, you can create a default VPC. You cannot have more than one default VPC per Region. If your account supports EC2-Classic, you cannot use this action to create a default VPC in a Region that supports EC2-Classic. If you want a default VPC in a Region that supports EC2-Classic, see "I really want a default VPC for my existing EC2 account. Is that possible?" in the Default VPCs FAQ. We are retiring EC2-Classic. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon Elastic Compute Cloud User Guide. */ createDefaultVpc( input: AWS.EC2.CreateDefaultVpcRequest, @@ -26185,7 +26199,7 @@ export interface EC2 { options: SdkCallOptions ): Promise; /** - * Describes one or more of your linked EC2-Classic instances. This request only returns information about EC2-Classic instances linked to a VPC through ClassicLink. You cannot use this request to return information about other instances. We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon Elastic Compute Cloud User Guide. + * Describes one or more of your linked EC2-Classic instances. This request only returns information about EC2-Classic instances linked to a VPC through ClassicLink. You cannot use this request to return information about other instances. We are retiring EC2-Classic. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon Elastic Compute Cloud User Guide. */ describeClassicLinkInstances( input: AWS.EC2.DescribeClassicLinkInstancesRequest, @@ -26318,7 +26332,7 @@ export interface EC2 { options: SdkCallOptions ): Promise; /** - * Describes one or more flow logs. To view the information in your flow logs (the log streams for the network interfaces), you must use the CloudWatch Logs console or the CloudWatch Logs API. + * Describes one or more flow logs. To view the published flow log records, you must view the log destination. For example, the CloudWatch Logs log group, the Amazon S3 bucket, or the Kinesis Data Firehose delivery stream. */ describeFlowLogs( input: AWS.EC2.DescribeFlowLogsRequest, @@ -26976,14 +26990,14 @@ export interface EC2 { options: SdkCallOptions ): Promise; /** - * Describes the ClassicLink status of one or more VPCs. We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon Elastic Compute Cloud User Guide. + * Describes the ClassicLink status of one or more VPCs. We are retiring EC2-Classic. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon Elastic Compute Cloud User Guide. */ describeVpcClassicLink( input: AWS.EC2.DescribeVpcClassicLinkRequest, options: SdkCallOptions ): Promise; /** - * We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon Elastic Compute Cloud User Guide. Describes the ClassicLink DNS support status of one or more VPCs. If enabled, the DNS hostname of a linked EC2-Classic instance resolves to its private IP address when addressed from an instance in the VPC to which it's linked. Similarly, the DNS hostname of an instance in a VPC resolves to its private IP address when addressed from a linked EC2-Classic instance. For more information, see ClassicLink in the Amazon Elastic Compute Cloud User Guide. + * We are retiring EC2-Classic. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon Elastic Compute Cloud User Guide. Describes the ClassicLink DNS support status of one or more VPCs. If enabled, the DNS hostname of a linked EC2-Classic instance resolves to its private IP address when addressed from an instance in the VPC to which it's linked. Similarly, the DNS hostname of an instance in a VPC resolves to its private IP address when addressed from a linked EC2-Classic instance. For more information, see ClassicLink in the Amazon Elastic Compute Cloud User Guide. */ describeVpcClassicLinkDnsSupport( input: AWS.EC2.DescribeVpcClassicLinkDnsSupportRequest, @@ -27060,7 +27074,7 @@ export interface EC2 { options: SdkCallOptions ): Promise; /** - * We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon Elastic Compute Cloud User Guide. Unlinks (detaches) a linked EC2-Classic instance from a VPC. After the instance has been unlinked, the VPC security groups are no longer associated with it. An instance is automatically unlinked from a VPC when it's stopped. + * We are retiring EC2-Classic. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon Elastic Compute Cloud User Guide. Unlinks (detaches) a linked EC2-Classic instance from a VPC. After the instance has been unlinked, the VPC security groups are no longer associated with it. An instance is automatically unlinked from a VPC when it's stopped. */ detachClassicLinkVpc( input: AWS.EC2.DetachClassicLinkVpcRequest, @@ -27151,14 +27165,14 @@ export interface EC2 { options: SdkCallOptions ): Promise<{}>; /** - * Disables ClassicLink for a VPC. You cannot disable ClassicLink for a VPC that has EC2-Classic instances linked to it. We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon Elastic Compute Cloud User Guide. + * Disables ClassicLink for a VPC. You cannot disable ClassicLink for a VPC that has EC2-Classic instances linked to it. We are retiring EC2-Classic. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon Elastic Compute Cloud User Guide. */ disableVpcClassicLink( input: AWS.EC2.DisableVpcClassicLinkRequest, options: SdkCallOptions ): Promise; /** - * Disables ClassicLink DNS support for a VPC. If disabled, DNS hostnames resolve to public IP addresses when addressed between a linked EC2-Classic instance and instances in the VPC to which it's linked. For more information, see ClassicLink in the Amazon Elastic Compute Cloud User Guide. You must specify a VPC ID in the request. We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon Elastic Compute Cloud User Guide. + * Disables ClassicLink DNS support for a VPC. If disabled, DNS hostnames resolve to public IP addresses when addressed between a linked EC2-Classic instance and instances in the VPC to which it's linked. For more information, see ClassicLink in the Amazon Elastic Compute Cloud User Guide. You must specify a VPC ID in the request. We are retiring EC2-Classic. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon Elastic Compute Cloud User Guide. */ disableVpcClassicLinkDnsSupport( input: AWS.EC2.DisableVpcClassicLinkDnsSupportRequest, @@ -27312,14 +27326,14 @@ export interface EC2 { options: SdkCallOptions ): Promise<{}>; /** - * We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon Elastic Compute Cloud User Guide. Enables a VPC for ClassicLink. You can then link EC2-Classic instances to your ClassicLink-enabled VPC to allow communication over private IP addresses. You cannot enable your VPC for ClassicLink if any of your VPC route tables have existing routes for address ranges within the 10.0.0.0/8 IP address range, excluding local routes for VPCs in the 10.0.0.0/16 and 10.1.0.0/16 IP address ranges. For more information, see ClassicLink in the Amazon Elastic Compute Cloud User Guide. + * We are retiring EC2-Classic. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon Elastic Compute Cloud User Guide. Enables a VPC for ClassicLink. You can then link EC2-Classic instances to your ClassicLink-enabled VPC to allow communication over private IP addresses. You cannot enable your VPC for ClassicLink if any of your VPC route tables have existing routes for address ranges within the 10.0.0.0/8 IP address range, excluding local routes for VPCs in the 10.0.0.0/16 and 10.1.0.0/16 IP address ranges. For more information, see ClassicLink in the Amazon Elastic Compute Cloud User Guide. */ enableVpcClassicLink( input: AWS.EC2.EnableVpcClassicLinkRequest, options: SdkCallOptions ): Promise; /** - * We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon Elastic Compute Cloud User Guide. Enables a VPC to support DNS hostname resolution for ClassicLink. If enabled, the DNS hostname of a linked EC2-Classic instance resolves to its private IP address when addressed from an instance in the VPC to which it's linked. Similarly, the DNS hostname of an instance in a VPC resolves to its private IP address when addressed from a linked EC2-Classic instance. For more information, see ClassicLink in the Amazon Elastic Compute Cloud User Guide. You must specify a VPC ID in the request. + * We are retiring EC2-Classic. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon Elastic Compute Cloud User Guide. Enables a VPC to support DNS hostname resolution for ClassicLink. If enabled, the DNS hostname of a linked EC2-Classic instance resolves to its private IP address when addressed from an instance in the VPC to which it's linked. Similarly, the DNS hostname of an instance in a VPC resolves to its private IP address when addressed from a linked EC2-Classic instance. For more information, see ClassicLink in the Amazon Elastic Compute Cloud User Guide. You must specify a VPC ID in the request. */ enableVpcClassicLinkDnsSupport( input: AWS.EC2.EnableVpcClassicLinkDnsSupportRequest, @@ -28012,7 +28026,7 @@ export interface EC2 { options: SdkCallOptions ): Promise; /** - * We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon Elastic Compute Cloud User Guide. Modifies the VPC peering connection options on one side of a VPC peering connection. You can do the following: Enable/disable communication over the peering connection between an EC2-Classic instance that's linked to your VPC (using ClassicLink) and instances in the peer VPC. Enable/disable communication over the peering connection between instances in your VPC and an EC2-Classic instance that's linked to the peer VPC. Enable/disable the ability to resolve public DNS hostnames to private IP addresses when queried from instances in the peer VPC. If the peered VPCs are in the same Amazon Web Services account, you can enable DNS resolution for queries from the local VPC. This ensures that queries from the local VPC resolve to private IP addresses in the peer VPC. This option is not available if the peered VPCs are in different different Amazon Web Services accounts or different Regions. For peered VPCs in different Amazon Web Services accounts, each Amazon Web Services account owner must initiate a separate request to modify the peering connection options. For inter-region peering connections, you must use the Region for the requester VPC to modify the requester VPC peering options and the Region for the accepter VPC to modify the accepter VPC peering options. To verify which VPCs are the accepter and the requester for a VPC peering connection, use the DescribeVpcPeeringConnections command. + * We are retiring EC2-Classic. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon Elastic Compute Cloud User Guide. Modifies the VPC peering connection options on one side of a VPC peering connection. You can do the following: Enable/disable communication over the peering connection between an EC2-Classic instance that's linked to your VPC (using ClassicLink) and instances in the peer VPC. Enable/disable communication over the peering connection between instances in your VPC and an EC2-Classic instance that's linked to the peer VPC. Enable/disable the ability to resolve public DNS hostnames to private IP addresses when queried from instances in the peer VPC. If the peered VPCs are in the same Amazon Web Services account, you can enable DNS resolution for queries from the local VPC. This ensures that queries from the local VPC resolve to private IP addresses in the peer VPC. This option is not available if the peered VPCs are in different different Amazon Web Services accounts or different Regions. For peered VPCs in different Amazon Web Services accounts, each Amazon Web Services account owner must initiate a separate request to modify the peering connection options. For inter-region peering connections, you must use the Region for the requester VPC to modify the requester VPC peering options and the Region for the accepter VPC to modify the accepter VPC peering options. To verify which VPCs are the accepter and the requester for a VPC peering connection, use the DescribeVpcPeeringConnections command. */ modifyVpcPeeringConnectionOptions( input: AWS.EC2.ModifyVpcPeeringConnectionOptionsRequest, @@ -40300,7 +40314,7 @@ export interface IdentityStore { options: SdkCallOptions ): Promise; /** - * Retrieves membership metadata and attributes from MembershipId in a group. + * Retrieves membership metadata and attributes from MembershipId in an identity store. */ describeGroupMembership( input: AWS.IdentityStore.DescribeGroupMembershipRequest, @@ -40321,7 +40335,7 @@ export interface IdentityStore { options: SdkCallOptions ): Promise; /** - * Retrieves the MembershipId in a group. + * Retrieves the MembershipId in an identity store. */ getGroupMembershipId( input: AWS.IdentityStore.GetGroupMembershipIdRequest, @@ -40335,7 +40349,7 @@ export interface IdentityStore { options: SdkCallOptions ): Promise; /** - * Returns if a member exists in specified groups. + * Checks the user's membership in all requested groups and returns if the member exists in all queried groups. */ isMemberInGroups( input: AWS.IdentityStore.IsMemberInGroupsRequest, @@ -40356,14 +40370,14 @@ export interface IdentityStore { options: SdkCallOptions ): Promise; /** - * Filtering for a group by the group DisplayName attribute is deprecated. Instead, use the GetGroupId API action. Lists all groups in the identity store. Returns a paginated list of complete Group objects. + * Lists the attribute name and value of the group that you specified in the search. We only support DisplayName as a valid filter attribute path currently, and filter is required. This API returns minimum attributes, including GroupId and group DisplayName in the response. */ listGroups( input: AWS.IdentityStore.ListGroupsRequest, options: SdkCallOptions ): Promise; /** - * Filtering for a user by the UserName attribute is deprecated. Instead, use the GetUserId API action. Lists all users in the identity store. Returns a paginated list of complete User objects. + * Lists the attribute name and value of the user that you specified in the search. We only support UserName as a valid filter attribute path currently, and filter is required. This API returns minimum attributes, including UserId and UserName in the response. */ listUsers( input: AWS.IdentityStore.ListUsersRequest, @@ -44027,7 +44041,7 @@ export interface IoTSiteWise { options: SdkCallOptions ): Promise; /** - * This API operation is in preview release for IoT SiteWise and is subject to change. We recommend that you use this operation only with test data, and not in production environments. Defines a job to ingest data to IoT SiteWise from Amazon S3. For more information, see Create a bulk import job (CLI) in the Amazon Simple Storage Service User Guide. You must enable IoT SiteWise to export data to Amazon S3 before you create a bulk import job. For more information about how to configure storage settings, see PutStorageConfiguration. + * Defines a job to ingest data to IoT SiteWise from Amazon S3. For more information, see Create a bulk import job (CLI) in the Amazon Simple Storage Service User Guide. You must enable IoT SiteWise to export data to Amazon S3 before you create a bulk import job. For more information about how to configure storage settings, see PutStorageConfiguration. */ createBulkImportJob( input: AWS.IoTSiteWise.CreateBulkImportJobRequest, @@ -44146,7 +44160,7 @@ export interface IoTSiteWise { options: SdkCallOptions ): Promise; /** - * This API operation is in preview release for IoT SiteWise and is subject to change. We recommend that you use this operation only with test data, and not in production environments. Retrieves information about a bulk import job request. For more information, see Describe a bulk import job (CLI) in the Amazon Simple Storage Service User Guide. + * Retrieves information about a bulk import job request. For more information, see Describe a bulk import job (CLI) in the Amazon Simple Storage Service User Guide. */ describeBulkImportJob( input: AWS.IoTSiteWise.DescribeBulkImportJobRequest, @@ -44293,7 +44307,7 @@ export interface IoTSiteWise { options: SdkCallOptions ): Promise; /** - * This API operation is in preview release for IoT SiteWise and is subject to change. We recommend that you use this operation only with test data, and not in production environments. Retrieves a paginated list of bulk import job requests. For more information, see List bulk import jobs (CLI) in the Amazon Simple Storage Service User Guide. + * Retrieves a paginated list of bulk import job requests. For more information, see List bulk import jobs (CLI) in the IoT SiteWise User Guide. */ listBulkImportJobs( input: AWS.IoTSiteWise.ListBulkImportJobsRequest, @@ -65149,7 +65163,7 @@ export interface Redshift { options: SdkCallOptions ): Promise; /** - * Modifies whether a cluster can use AQUA (Advanced Query Accelerator). + * This operation is retired. Calling this operation does not change AQUA configuration. Amazon Redshift automatically determines whether to use AQUA (Advanced Query Accelerator). */ modifyAquaConfiguration( input: AWS.Redshift.ModifyAquaInputMessage, @@ -70227,7 +70241,7 @@ export interface SageMaker { options: SdkCallOptions ): Promise; /** - * Starts a model training job. After training completes, SageMaker saves the resulting model artifacts to an Amazon S3 location that you specify. If you choose to host your model using SageMaker hosting services, you can use the resulting model artifacts as part of the model. You can also use the artifacts in a machine learning service other than SageMaker, provided that you know how to use them for inference. In the request body, you provide the following: AlgorithmSpecification - Identifies the training algorithm to use. HyperParameters - Specify these algorithm-specific parameters to enable the estimation of model parameters during training. Hyperparameters can be tuned to optimize this learning process. For a list of hyperparameters for each training algorithm provided by SageMaker, see Algorithms. InputDataConfig - Describes the training dataset and the Amazon S3, EFS, or FSx location where it is stored. OutputDataConfig - Identifies the Amazon S3 bucket where you want SageMaker to save the results of model training. ResourceConfig - Identifies the resources, ML compute instances, and ML storage volumes to deploy for model training. In distributed training, you specify more than one instance. EnableManagedSpotTraining - Optimize the cost of training machine learning models by up to 80% by using Amazon EC2 Spot instances. For more information, see Managed Spot Training. RoleArn - The Amazon Resource Name (ARN) that SageMaker assumes to perform tasks on your behalf during model training. You must grant this role the necessary permissions so that SageMaker can successfully complete model training. StoppingCondition - To help cap training costs, use MaxRuntimeInSeconds to set a time limit for training. Use MaxWaitTimeInSeconds to specify how long a managed spot training job has to complete. Environment - The environment variables to set in the Docker container. RetryStrategy - The number of times to retry the job when the job fails due to an InternalServerError. For more information about SageMaker, see How It Works. + * Starts a model training job. After training completes, SageMaker saves the resulting model artifacts to an Amazon S3 location that you specify. If you choose to host your model using SageMaker hosting services, you can use the resulting model artifacts as part of the model. You can also use the artifacts in a machine learning service other than SageMaker, provided that you know how to use them for inference. In the request body, you provide the following: AlgorithmSpecification - Identifies the training algorithm to use. HyperParameters - Specify these algorithm-specific parameters to enable the estimation of model parameters during training. Hyperparameters can be tuned to optimize this learning process. For a list of hyperparameters for each training algorithm provided by SageMaker, see Algorithms. You must not include any security-sensitive information, such as account access IDs, secrets, and tokens, in the dictionary for configuring hyperparameters. SageMaker rejects the training job request and returns an exception error for detected credentials, if such user input is found. InputDataConfig - Describes the training dataset and the Amazon S3, EFS, or FSx location where it is stored. OutputDataConfig - Identifies the Amazon S3 bucket where you want SageMaker to save the results of model training. ResourceConfig - Identifies the resources, ML compute instances, and ML storage volumes to deploy for model training. In distributed training, you specify more than one instance. EnableManagedSpotTraining - Optimize the cost of training machine learning models by up to 80% by using Amazon EC2 Spot instances. For more information, see Managed Spot Training. RoleArn - The Amazon Resource Name (ARN) that SageMaker assumes to perform tasks on your behalf during model training. You must grant this role the necessary permissions so that SageMaker can successfully complete model training. StoppingCondition - To help cap training costs, use MaxRuntimeInSeconds to set a time limit for training. Use MaxWaitTimeInSeconds to specify how long a managed spot training job has to complete. Environment - The environment variables to set in the Docker container. RetryStrategy - The number of times to retry the job when the job fails due to an InternalServerError. For more information about SageMaker, see How It Works. */ createTrainingJob( input: AWS.SageMaker.CreateTrainingJobRequest, @@ -75921,6 +75935,13 @@ export interface SNS { input: AWS.SNS.DeleteTopicInput, options: SdkCallOptions ): Promise<{}>; + /** + * Retrieves the specified inline DataProtectionPolicy document that is stored in the specified Amazon SNS topic. + */ + getDataProtectionPolicy( + input: AWS.SNS.GetDataProtectionPolicyInput, + options: SdkCallOptions + ): Promise; /** * Retrieves the endpoint attributes for a device on one of the supported push notification services, such as GCM (Firebase Cloud Messaging) and APNS. For more information, see Using Amazon SNS Mobile Push Notifications. */ @@ -76047,6 +76068,13 @@ export interface SNS { input: AWS.SNS.PublishBatchInput, options: SdkCallOptions ): Promise; + /** + * Adds or updates an inline policy document that is stored in the specified Amazon SNS topic. + */ + putDataProtectionPolicy( + input: AWS.SNS.PutDataProtectionPolicyInput, + options: SdkCallOptions + ): Promise<{}>; /** * Removes a statement from a topic's access control policy. */ diff --git a/src/aws-sdk/sdk.ts b/src/aws-sdk/sdk.ts index db49ed8a..49f62c70 100644 --- a/src/aws-sdk/sdk.ts +++ b/src/aws-sdk/sdk.ts @@ -84,6 +84,7 @@ const SFN_SERVICE_BLOCK_LIST: { "skipWaitTimeForInstanceTermination", ], ComprehendMedical: ["detectEntities"], + ControlTower: true, DirectConnect: [ "allocateConnectionOnInterconnect", "describeConnectionLoa", diff --git a/src/declaration.ts b/src/declaration.ts index 53c4be5d..bf87c4e7 100644 --- a/src/declaration.ts +++ b/src/declaration.ts @@ -40,7 +40,7 @@ abstract class BaseDecl< export class ClassDecl extends BaseDecl< NodeKind.ClassDecl, - undefined + BlockStmt | undefined > { readonly _classBrand?: C; constructor( @@ -74,7 +74,10 @@ export type ClassMember = | PropDecl | SetAccessorDecl; -export class ClassStaticBlockDecl extends BaseDecl { +export class ClassStaticBlockDecl extends BaseDecl< + NodeKind.ClassStaticBlockDecl, + ClassDecl | ClassExpr +> { constructor( /** * Range of text in the source file where this Node resides. @@ -100,16 +103,36 @@ export class ConstructorDecl extends BaseDecl { * * Only set on the root of the tree, i.e. when `this` is `undefined`. */ - readonly filename?: string + readonly filename: string | undefined, + /** + * The class or object that owns this {@link ConstructorDecl}. + * + * This value is only set if this {@link ConstructorDecl} is the root node in the tree (parent === undefined). + * + * ```ts + * class Foo { + * // ^ + * constructor() {} + * } + * ``` + */ + readonly ownedBy: ReferenceExpr | undefined ) { super(NodeKind.ConstructorDecl, span, arguments); this.ensureArrayOf(parameters, "parameters", [NodeKind.ParameterDecl]); this.ensure(body, "body", [NodeKind.BlockStmt]); this.ensure(filename, "filename", ["undefined", "string"]); + this.ensure(ownedBy, "ownedBy", ["undefined", NodeKind.ReferenceExpr]); } } -export class MethodDecl extends BaseDecl { +export class MethodDecl extends BaseDecl< + NodeKind.MethodDecl, + ClassDecl | ClassExpr | undefined +> { + // @ts-ignore + __methodBrand: F; + constructor( /** * Range of text in the source file where this Node resides. @@ -118,7 +141,6 @@ export class MethodDecl extends BaseDecl { readonly name: PropName, readonly parameters: ParameterDecl[], readonly body: BlockStmt, - /** * true if this function has an `async` modifier * ```ts @@ -149,7 +171,34 @@ export class MethodDecl extends BaseDecl { * * Only set on the root of the tree, i.e. when `this` is `undefined`. */ - readonly filename?: string + readonly filename: string | undefined, + /** + * `true` if this is a static setter on a class. + * + * ```ts + * class Foo { + * static method() { + * return value; + * } + * } + * ``` + */ + readonly isStatic: boolean | undefined, + /** + * The class or object that owns this {@link MethodDecl}. + * + * This value is only set if this {@link MethodDecl} is the root node in the tree (parent === undefined). + * + * ```ts + * class Foo { + * // ^ + * static method() { + * return value; + * } + * } + * ``` + */ + readonly ownedBy: ReferenceExpr | undefined ) { super(NodeKind.MethodDecl, span, arguments); this.ensure(name, "name", NodeKind.PropName); @@ -158,30 +207,81 @@ export class MethodDecl extends BaseDecl { this.ensure(isAsync, "isAsync", ["boolean"]); this.ensure(isAsterisk, "isAsterisk", ["boolean"]); this.ensure(filename, "filename", ["undefined", "string"]); + this.ensure(isStatic, "isStatic", ["undefined", "boolean"]); + this.ensure(ownedBy, "ownedBy", ["undefined", NodeKind.ReferenceExpr]); } } -export class PropDecl extends BaseDecl { +export class PropDecl extends BaseDecl< + NodeKind.PropDecl, + ClassDecl | ClassExpr +> { constructor( /** * Range of text in the source file where this Node resides. */ span: Span, + /** + * Name of the {@link PropDecl}. + * + * ```ts + * class Foo { + * prop; + * // ^ + * } + * ``` + */ readonly name: PropName, + /** + * `true` if this is a static setter on a class. + * + * ```ts + * class Foo { + * static prop: string = ? + * } + * ``` + */ readonly isStatic: boolean, - readonly initializer?: Expr + /** + * An optional initializer for the property. + * + * ```ts + * class Foo { + * prop = + * // ^ + * } + * ``` + */ + readonly initializer: Expr | undefined, + /** + * A reference to the {@link ClassDecl} or {@link ClassExpr} instance that owns this {@link PropDecl} + * + * This value is only set if this {@link PropDecl} is the root node in the tree (parent === undefined). + * + * ```ts + * class Foo { + * // ^ + * static prop: string = ? + * } + * ``` + */ + readonly ownedBy: ReferenceExpr | undefined ) { super(NodeKind.PropDecl, span, arguments); this.ensure(name, "name", NodeKind.PropName); this.ensure(isStatic, "isStatic", ["boolean"]); this.ensure(initializer, "initializer", ["undefined", "Expr"]); + this.ensure(ownedBy, "ownedBy", ["undefined", NodeKind.ReferenceExpr]); } } -export class GetAccessorDecl extends BaseDecl< +export class GetAccessorDecl any = () => any> extends BaseDecl< NodeKind.GetAccessorDecl, ClassDecl | ClassExpr | ObjectLiteralExpr > { + // @ts-ignore + __getterBrand: F; + constructor( /** * Range of text in the source file where this Node resides. @@ -189,8 +289,45 @@ export class GetAccessorDecl extends BaseDecl< span: Span, readonly name: PropName, readonly body: BlockStmt, + /** + * `true` if this is a static getter on a class. + * + * ```ts + * class Foo { + * static get getter() { + * return value; + * } + * } + * ``` + */ readonly isStatic: boolean | undefined, - readonly ownedBy: ReferenceExpr | undefined + /** + * The class or object that owns this {@link GetAccessorDecl}. This value is only set + * if this {@link GetAccessorDecl} is the root node in the tree (parent === undefined). + * + * ```ts + * const object = { + * // ^ + * get getter() { + * return value; + * } + * } + * + * class Foo { + * // ^ + * get getter() { + * return value; + * } + * } + * ``` + */ + readonly ownedBy: ReferenceExpr | undefined, + /** + * Name of the source file this node originates from. + * + * Only set on the root of the tree, i.e. when `this` is `undefined`. + */ + readonly filename?: string ) { super(NodeKind.GetAccessorDecl, span, arguments); this.ensure(name, "name", NodeKind.PropName); @@ -200,32 +337,83 @@ export class GetAccessorDecl extends BaseDecl< NodeKind.ReferenceExpr, "undefined", ]); + this.ensure(filename, "filename", ["string", "undefined"]); } } -export class SetAccessorDecl extends BaseDecl< +export class SetAccessorDecl< + F extends (val: any) => typeof val = (val: any) => typeof val +> extends BaseDecl< NodeKind.SetAccessorDecl, ClassDecl | ClassExpr | ObjectLiteralExpr > { + // @ts-ignore + __setterBrand: F; + constructor( /** * Range of text in the source file where this Node resides. */ span: Span, readonly name: PropName, - readonly parameter: ParameterDecl, + /** + * ```ts + * class Foo { + * static get setter(value) { + * // ^ + * _value = value; + * } + * } + * ``` + */ + readonly parameter: ParameterDecl | undefined, readonly body: BlockStmt, + /** + * `true` if this is a static setter on a class. + * + * ```ts + * class Foo { + * static get setter(value) { + * _value = value; + * } + * } + * ``` + */ readonly isStatic: boolean | undefined, - readonly ownedBy: ReferenceExpr | undefined + /** + * The class or object that owns this {@link SetAccessorDecl}. This value is only set + * if this {@link SetAccessorDecl} is the root node in the tree (parent === undefined). + * + * ```ts + * const object = { + * // ^ + * get setter(value) { + * _value = value; + * } + * } + * + * class Foo { + * // ^ + * get setter(value) { + * _value = value; + * } + * } + * ``` + */ + readonly ownedBy: ReferenceExpr | undefined, + /** + * Name of the source file this node originates from. + * + * Only set on the root of the tree, i.e. when `this` is `undefined`. + */ + readonly filename?: string ) { super(NodeKind.SetAccessorDecl, span, arguments); this.ensure(name, "name", NodeKind.PropName); - this.ensure(parameter, "parameter", [NodeKind.ParameterDecl]); + this.ensure(parameter, "parameter", ["undefined", NodeKind.ParameterDecl]); this.ensure(body, "body", [NodeKind.BlockStmt]); - this.ensure(isStatic, "isStatic", ["boolean", "undefined"]); - this.ensure(ownedBy, "ReferenceExpr", [ - NodeKind.ReferenceExpr, - "undefined", - ]); + this.ensure(isStatic, "isStatic", ["undefined", "boolean"]); + this.ensure(ownedBy, "ownedBy", ["undefined", NodeKind.ReferenceExpr]); + this.ensure(filename, "filename", ["undefined", "string"]); } } @@ -234,9 +422,10 @@ export type FunctionLike = | FunctionExpr | ArrowFunctionExpr; -export class FunctionDecl< - F extends AnyFunction = AnyFunction -> extends BaseDecl { +export class FunctionDecl extends BaseDecl< + NodeKind.FunctionDecl, + BlockStmt | undefined +> { readonly _functionBrand?: F; constructor( /** @@ -306,7 +495,8 @@ export class ParameterDecl extends BaseDecl< * ```ts * function foo(...rest) {} * ``` - */ readonly isRest: boolean + */ + readonly isRest: boolean ) { super(NodeKind.ParameterDecl, span, arguments); this.ensure(name, "name", NodeKind.BindingNames); diff --git a/src/event-bridge/event-pattern/synth.ts b/src/event-bridge/event-pattern/synth.ts index 75646cf0..3075a742 100644 --- a/src/event-bridge/event-pattern/synth.ts +++ b/src/event-bridge/event-pattern/synth.ts @@ -16,6 +16,7 @@ import { Expr, PropAccessExpr, UnaryExpr, + SuperKeyword, } from "../../expression"; import { isBinaryExpr, @@ -635,7 +636,9 @@ export const synthesizePatternDocument = ( /** * Recurse an expression to find a reference to the event. */ - const getEventReference = (expression: Expr): ReferencePath | undefined => { + const getEventReference = ( + expression: Expr | SuperKeyword + ): ReferencePath | undefined => { return getReferencePath(expression); }; diff --git a/src/expression.ts b/src/expression.ts index d4d73eb1..d6b2b60e 100644 --- a/src/expression.ts +++ b/src/expression.ts @@ -1,7 +1,6 @@ import type { BindingElem, ClassMember, - Decl, GetAccessorDecl, MethodDecl, ParameterDecl, @@ -16,7 +15,7 @@ import { isPropAssignExpr, isStringLiteralExpr, } from "./guards"; -import { BaseNode, FunctionlessNode } from "./node"; +import { BaseNode, BindingDecl, FunctionlessNode } from "./node"; import { NodeKind } from "./node-kind"; import { Span } from "./span"; import type { BlockStmt, Stmt } from "./statement"; @@ -74,14 +73,13 @@ export abstract class BaseExpr< | Expr | Stmt | VariableDecl - | undefined > extends BaseNode { readonly nodeKind: "Expr" = "Expr"; } export class ArrowFunctionExpr< F extends AnyFunction = AnyFunction -> extends BaseExpr { +> extends BaseExpr { readonly _functionBrand?: F; constructor( /** @@ -163,7 +161,7 @@ export class FunctionExpr< export class ClassExpr extends BaseExpr< NodeKind.ClassExpr, - undefined + FunctionlessNode | undefined > { readonly _classBrand?: C; constructor( @@ -210,11 +208,24 @@ export class ReferenceExpr< /** * A closure that produces the referred value. */ - readonly ref: () => R + readonly ref: () => R, + /** + * A number that uniquely identifies the variable within this AST. + * + * This is used to ensure that two ReferenceExpr's pointing to the same variable still point + * to the same variable after transformation. + */ + readonly id: number | undefined, + /** + * Unique ID of this {@link ReferenceExpr}. + */ + readonly referenceId: number | undefined ) { super(NodeKind.ReferenceExpr, span, arguments); this.ensure(name, "name", ["undefined", "string"]); this.ensure(ref, "ref", ["function"]); + this.ensure(id, "id", ["number", "undefined"]); + this.ensure(referenceId, "referenceId", ["number", "undefined"]); } } @@ -232,7 +243,7 @@ export class Identifier extends BaseExpr { this.ensure(name, "name", ["string"]); } - public lookup(): Decl | undefined { + public lookup(): BindingDecl | undefined { return this.getLexicalScope().get(this.name); } } @@ -249,7 +260,7 @@ export class PrivateIdentifier extends BaseExpr { this.ensure(name, "name", ["string"]); } - public lookup(): Decl | undefined { + public lookup(): BindingDecl | undefined { return this.getLexicalScope().get(this.name); } } @@ -260,7 +271,7 @@ export class PropAccessExpr extends BaseExpr { * Range of text in the source file where this Node resides. */ span: Span, - readonly expr: Expr, + readonly expr: Expr | SuperKeyword, readonly name: Identifier | PrivateIdentifier, /** * Whether this is using optional chaining. @@ -271,7 +282,7 @@ export class PropAccessExpr extends BaseExpr { readonly isOptional: boolean ) { super(NodeKind.PropAccessExpr, span, arguments); - this.ensure(expr, "expr", ["Expr"]); + this.ensure(expr, "expr", ["Expr", NodeKind.SuperKeyword]); this.ensure(name, "ref", [NodeKind.Identifier, NodeKind.PrivateIdentifier]); } } diff --git a/src/function.ts b/src/function.ts index eae25f35..e97fb8e3 100644 --- a/src/function.ts +++ b/src/function.ts @@ -59,6 +59,10 @@ import { } from "./integration"; import { ReflectionSymbols, validateFunctionLike } from "./reflect"; import { isSecret } from "./secret"; +import { + serializeClosure, + serializeCodeWithSourceMap, +} from "./serialize-closure/serialize"; import { isStepFunction } from "./step-function"; import { isTable } from "./table"; import { AnyAsyncFunction, AnyFunction } from "./util"; @@ -507,6 +511,28 @@ interface FunctionBase { >; } +export enum SerializerImpl { + /** + * The default serializer, uses the v8 inspector API to introspect closures. + * + * It is slow and has caveats such as not properly serializing stable references to variables. + * + * @see https://github.com/functionless/nodejs-closure-serializer + */ + V1, + /** + * A new experimental serializer that makes use of Functionless's SWC AST + * reflection library that decorates syntax for use at runtime. + * + * It has not been as well tested, but is fast, synchronous and has support for + * stable references and other features. + * + * @see https://www.npmjs.com/package/@functionless/ast-reflection + */ + V2, + Default = V1, +} + const PromisesSymbol = Symbol.for("functionless.Function.promises"); export interface FunctionProps @@ -514,6 +540,21 @@ export interface FunctionProps aws_lambda.FunctionProps, "code" | "handler" | "runtime" | "onSuccess" | "onFailure" > { + /** + * Whether to generate source maps for serialized closures and + * to set --enableSourceMaps on NODE_OPTIONS environment variable. + * + * Only supported when using {@link SerializerImpl.V2}. + * + * @default true + */ + sourceMaps?: boolean; + /** + * Which {@link SerializerImpl} to use when serializing closures. + * + * @default {@link SerializerImpl.V1} + */ + serializer?: SerializerImpl; /** * Method which allows runtime computation of AWS client configuration. * ```ts @@ -656,6 +697,17 @@ export class Function< onFailure ), environment: { + ...(props?.environment ?? {}), + ...(props?.sourceMaps !== false + ? { + // merge --enableSourceMaps + NODE_OPTIONS: `--enable-source-maps${ + props?.environment?.NODE_OPTIONS + ? ` ${props.environment.NODE_OPTIONS}` + : "" + }`, + } + : {}), functionless_infer: Lazy.string({ produce: () => { // retrieve and bind all found native integrations. Will fail if the integration does not support native integration. @@ -687,8 +739,18 @@ export class Function< // Start serializing process, add the callback to the promises so we can later ensure completion Function.promises.push( (async () => { + const serializerImpl = props?.serializer ?? SerializerImpl.Default; + const sourceMaps = + props?.sourceMaps ?? + // if using SWC serializer, enable source maps by default + // otherwise disable by default + (serializerImpl === SerializerImpl.V2 ? true : false); try { - await callbackLambdaCode.generate(nativeIntegrationsPrewarm); + await callbackLambdaCode.generate( + nativeIntegrationsPrewarm, + serializerImpl, + sourceMaps + ); } catch (e) { if (e instanceof SynthError) { throw new SynthError( @@ -779,7 +841,7 @@ export class CallbackLambdaCode extends aws_lambda.Code { constructor( private func: AnyAsyncFunction, - private props?: CallbackLambdaCodeProps + private props: CallbackLambdaCodeProps ) { super(); } @@ -799,7 +861,9 @@ export class CallbackLambdaCode extends aws_lambda.Code { * https://twitter.com/samgoodwin89/status/1516887131108438016?s=20&t=7GRGOQ1Bp0h_cPsJgFk3Ww */ public async generate( - integrationPrewarms: NativeIntegration["preWarm"][] + integrationPrewarms: NativeIntegration["preWarm"][], + serializerImpl: SerializerImpl, + sourceMaps: boolean ) { if (!this.scope) { throw new SynthError( @@ -820,10 +884,11 @@ export class CallbackLambdaCode extends aws_lambda.Code { const [serialized, tokens] = await serialize( this.func, integrationPrewarms, + serializerImpl, this.props ); - - const bundled = await bundle(serialized); + const bundledPackage = await bundle(serialized, sourceMaps); + const bundled = bundledPackage.contents; const asset = aws_lambda.Code.fromAsset("", { assetHashType: AssetHashType.OUTPUT, @@ -833,17 +898,16 @@ export class CallbackLambdaCode extends aws_lambda.Code { user: scope.node.addr, local: { tryBundle(outdir, _opts) { - fs.writeFileSync( - path.resolve(outdir, "index.js"), - bundled.contents - ); + fs.writeFileSync(path.resolve(outdir, "index.js"), bundled); return true; }, }, }, }); - tokens.forEach((t) => scope.addEnvironment(t.env, t.token)); + tokens.forEach((t) => { + scope.addEnvironment(t.env, t.token); + }); const funcResource = scope.node.findChild( "Resource" @@ -915,213 +979,84 @@ interface TokenContext { export async function serialize( func: AnyAsyncFunction, integrationPrewarms: NativeIntegration["preWarm"][], + serializerImpl: SerializerImpl = SerializerImpl.Default, props?: PrewarmProps ): Promise<[string, TokenContext[]]> { let tokens: string[] = []; const preWarmContext = new NativePreWarmContext(props); - const result = await serializeFunction( - // factory function allows us to prewarm the clients and other context. - integrationPrewarms.length > 0 - ? () => { - integrationPrewarms.forEach((i) => i?.(preWarmContext)); - return func; - } - : func, - { - isFactoryFunction: integrationPrewarms.length > 0, - transformers: [ - (ctx) => - /** - * TS Transformer for erasing calls to the generated `register` and `bind` functions - * from all emitted closures. - */ - function eraseBindAndRegister(node: ts.Node): ts.Node { - if (ts.isCallExpression(node) && ts.isIdentifier(node.expression)) { - if (node.expression.text === RegisterFunctionName) { - // register(func, ast) - // => func - return ts.visitEachChild( - node.arguments[0]!, - eraseBindAndRegister, - ctx - ); - } else if (node.expression.text === BindFunctionName) { - // bind(func, self, ...args) - // => func.bind(self, ...args) - return ts.factory.createCallExpression( - eraseBindAndRegister(node.arguments[0]!) as ts.Expression, - undefined, - node.arguments.map( - (arg) => eraseBindAndRegister(arg) as ts.Expression - ) - ); - } - } - return ts.visitEachChild(node, eraseBindAndRegister, ctx); - }, - ], - shouldCaptureProp: (_, propName) => { - // do not serialize the AST property on functions - return propName !== ReflectionSymbols.AST; - }, - serialize: (obj) => { - if (typeof obj === "string") { - const reversed = - Tokenization.reverse(obj, { failConcat: false }) ?? - Tokenization.reverseString(obj).tokens; - if (!Array.isArray(reversed) || reversed.length > 0) { - if (Array.isArray(reversed)) { - tokens = [ - ...tokens, - ...reversed.map((s) => validateResolvable(s).toString()), - ]; - } else { - tokens = [...tokens, validateResolvable(reversed).toString()]; - } - } - } else if (typeof obj === "object") { - return obj - ? transformIntegration(transformResource(transformCfnResource(obj))) - : obj; - - /** - * Remove unnecessary fields from {@link CfnResource} that bloat or fail the closure serialization. - */ - function transformCfnResource(o: unknown) { - if (Resource.isResource(o as any)) { - const { node, stack, env, ...rest } = o as unknown as Resource; - return rest; - } else if (CfnResource.isCfnResource(o as any)) { - const { - stack, - node, - creationStack, - // don't need to serialize at runtime - _toCloudFormation, - // @ts-ignore - private - adds the tag manager, which we don't need - cfnProperties, - ...rest - } = transformTable(o as CfnResource); - return transformTaggableResource(rest); - } else if (Token.isUnresolved(o)) { - const reversed = validateResolvable(Tokenization.reverse(o)!); - - if (Reference.isReference(reversed)) { - tokens.push(reversed.toString()); - return reversed.toString(); - } else if (SecretValue.isSecretValue(reversed)) { - throw new SynthError( - ErrorCodes.Unsafe_use_of_secrets, - "Found unsafe use of SecretValue token in a Function." - ); - } else if ("value" in reversed) { - return (reversed as unknown as { value: any }).value; - } - // TODO: fail at runtime and warn at compiler time when a token cannot be serialized - return {}; - } - return o; - } - - /** - * When the StreamArn attribute is used in a Cfn template, but streamSpecification is - * undefined, then the deployment fails. Lets make sure that doesn't happen. - */ - function transformTable(o: CfnResource): CfnResource { - if ( - o.cfnResourceType === aws_dynamodb.CfnTable.CFN_RESOURCE_TYPE_NAME - ) { - const table = o as aws_dynamodb.CfnTable; - if (!table.streamSpecification) { - const { attrStreamArn, ...rest } = table; - - return rest as unknown as CfnResource; - } - } - - return o; - } - - /** - * CDK Tag manager bundles in ~200kb of junk we don't need at runtime, - */ - function transformTaggableResource(o: any) { - if (TagManager.isTaggable(o)) { - const { tags, ...rest } = o; - return rest; - } - return o; - } - - /** - * Remove unnecessary fields from {@link CfnTable} that bloat or fail the closure serialization. - */ - function transformIntegration(integ: unknown): any { - if (integ && isIntegration(integ)) { - const c = integ.native?.call; - const call = - typeof c !== "undefined" - ? function (...args: any[]) { - return c(args, preWarmContext); - } - : integ.unhandledContext - ? function () { - integ.unhandledContext!(integ.kind, "Function"); - } - : function () { - throw new Error(); - }; - - for (const prop in integ) { - if (!INTEGRATION_TYPE_KEYS.includes(prop as any)) { - // @ts-ignore - call[prop] = integ[prop]; + const f = func; + + const preWarms = integrationPrewarms; + const result = + serializerImpl === SerializerImpl.V2 + ? serializeCodeWithSourceMap( + serializeClosure( + integrationPrewarms.length > 0 + ? () => { + preWarms.forEach((i) => i?.(preWarmContext)); + return f; } - } - - return call; - } - return integ; - } - - /** - * TODO, make this configuration based. - * https://github.com/functionless/functionless/issues/239 - */ - function transformResource(integ: unknown): any { - if ( - integ && - (isFunction(integ) || - isTable(integ) || - isStepFunction(integ) || - isEventBus(integ) || - isSecret(integ)) - ) { - const { resource, ...rest } = integ; - - return rest; + : f, + { + shouldCaptureProp, + serialize: serializeHook, + isFactoryFunction: integrationPrewarms.length > 0, } - return integ; - } - } - return true; - - function validateResolvable(resolvable: IResolvable) { - if (Token.isUnresolved(resolvable)) { - const tokenSource = Tokenization.reverse(resolvable)!; - if (SecretValue.isSecretValue(tokenSource)) { - throw new SynthError( - ErrorCodes.Unsafe_use_of_secrets, - "Found unsafe use of SecretValue token in a Function." - ); + ) + ) + : ( + await serializeFunction( + // factory function allows us to prewarm the clients and other context. + integrationPrewarms.length > 0 + ? () => { + integrationPrewarms.forEach((i) => i?.(preWarmContext)); + return func; + } + : func, + { + isFactoryFunction: integrationPrewarms.length > 0, + transformers: [ + (ctx) => + /** + * TS Transformer for erasing calls to the generated `register` and `bind` functions + * from all emitted closures. + */ + function eraseBindAndRegister(node: ts.Node): ts.Node { + if ( + ts.isCallExpression(node) && + ts.isIdentifier(node.expression) + ) { + if (node.expression.text === RegisterFunctionName) { + // register(func, ast) + // => func + return ts.visitEachChild( + node.arguments[0]!, + eraseBindAndRegister, + ctx + ); + } else if (node.expression.text === BindFunctionName) { + // bind(func, self, ...args) + // => func.bind(self, ...args) + return ts.factory.createCallExpression( + eraseBindAndRegister( + node.arguments[0]! + ) as ts.Expression, + undefined, + node.arguments.map( + (arg) => eraseBindAndRegister(arg) as ts.Expression + ) + ); + } + } + return ts.visitEachChild(node, eraseBindAndRegister, ctx); + }, + ], + serialize: serializeHook, + shouldCaptureProp, } - } - return resolvable; - } - }, - } - ); + ) + ).text; /** * A map of token id to unique index. @@ -1152,16 +1087,182 @@ export async function serialize( const resultText = tokenContext.reduce( // TODO: support templated strings (r, t) => r.split(`"${t.token}"`).join(`process.env.${t.env}`), - result.text + result ); return [resultText, tokenContext]; + + function shouldCaptureProp( + _: any, + propName: string | symbol | number + ): boolean { + // do not serialize the AST property on functions + return propName !== ReflectionSymbols.AST; + } + + function serializeHook(obj: any): any { + if (typeof obj === "string") { + const reversed = + Tokenization.reverse(obj, { failConcat: false }) ?? + Tokenization.reverseString(obj).tokens; + if (!Array.isArray(reversed) || reversed.length > 0) { + if (Array.isArray(reversed)) { + tokens = [ + ...tokens, + ...reversed.map((s) => validateResolvable(s).toString()), + ]; + } else { + tokens = [...tokens, validateResolvable(reversed).toString()]; + } + } + } else if (typeof obj === "object") { + return obj + ? transformIntegration(transformResource(transformCfnResource(obj))) + : obj; + + /** + * Remove unnecessary fields from {@link CfnResource} that bloat or fail the closure serialization. + */ + function transformCfnResource(o: unknown) { + if (Resource.isResource(o as any)) { + const { node, stack, env, ...rest } = o as unknown as Resource; + return rest; + } else if (CfnResource.isCfnResource(o as any)) { + const { + stack, + node, + creationStack, + // don't need to serialize at runtime + _toCloudFormation, + // @ts-ignore - private - adds the tag manager, which we don't need + cfnProperties, + ...rest + } = transformTable(o as CfnResource); + return transformTaggableResource(rest); + } else if (Token.isUnresolved(o)) { + const reversed = validateResolvable(Tokenization.reverse(o)!); + + if (Reference.isReference(reversed)) { + tokens.push(reversed.toString()); + return reversed.toString(); + } else if (SecretValue.isSecretValue(reversed)) { + throw new SynthError( + ErrorCodes.Unsafe_use_of_secrets, + "Found unsafe use of SecretValue token in a Function." + ); + } else if ("value" in reversed) { + return (reversed as unknown as { value: any }).value; + } + // TODO: fail at runtime and warn at compiler time when a token cannot be serialized + return {}; + } + return o; + } + + /** + * When the StreamArn attribute is used in a Cfn template, but streamSpecification is + * undefined, then the deployment fails. Lets make sure that doesn't happen. + */ + function transformTable(o: CfnResource): CfnResource { + if ( + o.cfnResourceType === aws_dynamodb.CfnTable.CFN_RESOURCE_TYPE_NAME + ) { + const table = o as aws_dynamodb.CfnTable; + if (!table.streamSpecification) { + const { attrStreamArn, ...rest } = table; + + return rest as unknown as CfnResource; + } + } + + return o; + } + + /** + * CDK Tag manager bundles in ~200kb of junk we don't need at runtime, + */ + function transformTaggableResource(o: any) { + if (TagManager.isTaggable(o)) { + const { tags, ...rest } = o; + return rest; + } + return o; + } + + /** + * Remove unnecessary fields from {@link CfnTable} that bloat or fail the closure serialization. + */ + function transformIntegration(integ: unknown): any { + if (integ && isIntegration(integ)) { + const c = integ.native?.call; + const call = + typeof c !== "undefined" + ? function (...args: any[]) { + return c(args, preWarmContext); + } + : integ.unhandledContext + ? function () { + integ.unhandledContext!(integ.kind, "Function"); + } + : function () { + throw new Error(); + }; + + for (const prop in integ) { + if (!INTEGRATION_TYPE_KEYS.includes(prop as any)) { + // @ts-ignore + call[prop] = integ[prop]; + } + } + + return call; + } + return integ; + } + + /** + * TODO, make this configuration based. + * https://github.com/functionless/functionless/issues/239 + */ + function transformResource(integ: unknown): any { + if ( + integ && + (isFunction(integ) || + isTable(integ) || + isStepFunction(integ) || + isEventBus(integ) || + isSecret(integ)) + ) { + const { resource, ...rest } = integ; + return rest; + } + return integ; + } + } + return true; + + function validateResolvable(resolvable: IResolvable) { + if (Token.isUnresolved(resolvable)) { + const tokenSource = Tokenization.reverse(resolvable)!; + if (SecretValue.isSecretValue(tokenSource)) { + throw new SynthError( + ErrorCodes.Unsafe_use_of_secrets, + "Found unsafe use of SecretValue token in a Function." + ); + } + } + return resolvable; + } + } } /** * Bundles a serialized function with esbuild. */ -export async function bundle(text: string): Promise { +export async function bundle( + text: string, + sourceMap: boolean = false +): Promise { const bundle = await esbuild.build({ stdin: { contents: text, @@ -1173,6 +1274,7 @@ export async function bundle(text: string): Promise { platform: "node", target: "node14", external: ["aws-sdk", "aws-cdk-lib", "esbuild"], + sourcemap: sourceMap ? "inline" : undefined, }); // a bundled output will be one file diff --git a/src/guards.ts b/src/guards.ts index 4e34477d..20327eef 100644 --- a/src/guards.ts +++ b/src/guards.ts @@ -128,6 +128,8 @@ export const isFunctionLike = typeGuard( NodeKind.ArrowFunctionExpr ); +export const isClassLike = typeGuard(NodeKind.ClassDecl, NodeKind.ClassExpr); + export const isClassDecl = typeGuard(NodeKind.ClassDecl); export const isClassStaticBlockDecl = typeGuard(NodeKind.ClassStaticBlockDecl); export const isConstructorDecl = typeGuard(NodeKind.ConstructorDecl); @@ -168,7 +170,6 @@ export function typeGuard( return (a: any): a is Extract => kinds.find((kind) => a?.kind === kind) !== undefined; } - export function isVariableReference(expr: Expr): expr is VariableReference { return ( isIdentifier(expr) || isPropAccessExpr(expr) || isElementAccessExpr(expr) diff --git a/src/index.ts b/src/index.ts index 4b2a6d25..baabc70a 100644 --- a/src/index.ts +++ b/src/index.ts @@ -12,6 +12,7 @@ export * from "./event-bridge"; export * from "./event-source"; export * from "./expression"; export * from "./function"; +export * from "./function-prewarm"; export * from "./guards"; export * from "./iterable"; export * from "./node-kind"; @@ -22,6 +23,7 @@ export * from "./reflect"; export * from "./s-expression"; export * from "./secret"; export * from "./serializer"; +export * from "./serialize-closure/serialize"; export * from "./statement"; export * from "./step-function"; export * from "./table"; diff --git a/src/integration.ts b/src/integration.ts index ed1127ea..658de11e 100644 --- a/src/integration.ts +++ b/src/integration.ts @@ -309,7 +309,7 @@ export function findDeepIntegrations( node.fork( new CallExpr( node.span, - new ReferenceExpr(node.expr.span, "", () => integration), + new ReferenceExpr(node.expr.span, "", () => integration, 0, 0), node.args.map((arg) => arg.clone()), false ) @@ -420,7 +420,10 @@ export function tryResolveReferences( return tryResolveReferences(defaultValue, undefined); } } else if (isReferenceExpr(node) || isThisExpr(node)) { - return [node.ref?.()]; + const ref = node.ref?.(); + if (ref) { + return [ref]; + } } else if (isIdentifier(node)) { return tryResolveReferences(node.lookup(), defaultValue); } else if (isBindingElem(node)) { diff --git a/src/node.ts b/src/node.ts index a811ce86..93fc0792 100644 --- a/src/node.ts +++ b/src/node.ts @@ -1,7 +1,9 @@ import type { BindingElem, BindingPattern, + ClassDecl, Decl, + FunctionDecl, ParameterDecl, VariableDecl, VariableDeclList, @@ -14,7 +16,9 @@ import { } from "./ensure"; import type { Err } from "./error"; import type { + ClassExpr, Expr, + FunctionExpr, ImportKeyword, SuperKeyword, TemplateHead, @@ -27,13 +31,19 @@ import { isBindingPattern, isBlockStmt, isCatchClause, + isClassDecl, + isClassExpr, + isClassLike, isDoStmt, isForInStmt, isForOfStmt, isForStmt, + isFunctionDecl, + isFunctionExpr, isFunctionLike, isIdentifier, isIfStmt, + isMethodDecl, isNode, isParameterDecl, isReturnStmt, @@ -69,13 +79,20 @@ export interface HasParent { } type Binding = [string, BindingDecl]; -export type BindingDecl = VariableDecl | ParameterDecl | BindingElem; +export type BindingDecl = + | VariableDecl + | ParameterDecl + | BindingElem + | ClassDecl + | ClassExpr + | FunctionDecl + | FunctionExpr; export abstract class BaseNode< Kind extends NodeKind, - Parent extends FunctionlessNode | undefined = FunctionlessNode | undefined + Parent extends FunctionlessNode | undefined = FunctionlessNode > { - abstract readonly nodeKind: "Err" | "Expr" | "Stmt" | "Decl" | "Node"; + abstract readonly nodeKind: "Decl" | "Err" | "Expr" | "Node" | "Stmt"; // @ts-ignore - we have a convention to set this in the parent constructor readonly parent: Parent; @@ -139,6 +156,22 @@ export abstract class BaseNode< return node; } + /** + * @returns the name of the file this node originates from. + */ + public getFileName(): string { + if ( + (isFunctionLike(this) || isClassLike(this) || isMethodDecl(this)) && + this.filename + ) { + return this.filename; + } else if (this.parent === undefined) { + throw new Error(`cannot get filename of orphaned node`); + } else { + return this.parent.getFileName(); + } + } + protected ensureArrayOf( arr: any[], fieldName: string, @@ -466,14 +499,36 @@ export abstract class BaseNode< } else if (isBindingPattern(node)) { return node.bindings.flatMap((b) => getNames(b, kind)); } else if (isFunctionLike(node)) { - if (kind === "sibling") return []; - return node.parameters.flatMap((param) => getNames(param, kind)); + if (kind === "sibling" && isFunctionDecl(node)) { + if (node.name) { + return [[node.name, node]]; + } else { + return []; + } + } + const parameters = node.parameters.flatMap((param) => + getNames(param, kind) + ); + if ((isFunctionExpr(node) || isFunctionDecl(node)) && node.name) { + return [[node.name, node], ...parameters]; + } else { + return parameters; + } } else if (isForInStmt(node) || isForOfStmt(node) || isForStmt(node)) { if (kind === "sibling") return []; return getNames(node.initializer, kind); } else if (isCatchClause(node) && node.variableDecl?.name) { if (kind === "sibling") return []; return getNames(node.variableDecl, kind); + } else if (isClassDecl(node) || (isClassExpr(node) && node.name)) { + if (kind === "sibling" && isClassDecl(node)) { + if (node.name) { + return [[node.name.name, node]]; + } else { + return []; + } + } + return [[node.name!.name, node]]; } else { return []; } diff --git a/src/reflect.ts b/src/reflect.ts index 65774de3..b209ff4f 100644 --- a/src/reflect.ts +++ b/src/reflect.ts @@ -1,4 +1,9 @@ -import { FunctionLike } from "./declaration"; +import { + FunctionLike, + GetAccessorDecl, + MethodDecl, + SetAccessorDecl, +} from "./declaration"; import { Err } from "./error"; import { ErrorCodes, SynthError } from "./error-code"; import { isFunctionLike, isErr, isNewExpr } from "./guards"; @@ -8,6 +13,8 @@ import { parseSExpr } from "./s-expression"; import { AnyAsyncFunction, AnyFunction } from "./util"; import { forEachChild } from "./visit"; +const Global: any = global; + /** * A macro (compile-time) function that converts an ArrowFunction or FunctionExpression to a {@link FunctionDecl}. * @@ -36,10 +43,18 @@ import { forEachChild } from "./visit"; */ export function reflect( func: F -): FunctionLike | Err | undefined { - if (func.name.startsWith("bound ")) { +): + | FunctionLike + | MethodDecl + | GetAccessorDecl + | SetAccessorDecl + | Err + | undefined { + if (func.name === "bound requireModuleOrMock") { + return undefined; + } else if (func.name.startsWith("bound ")) { // native bound function - const targetFunc = (func)[ReflectionSymbols.TargetFunction]; + const targetFunc = unbind(func)?.targetFunction; if (targetFunc) { return reflect(targetFunc); } else { @@ -52,7 +67,7 @@ export function reflect( if (!reflectCache.has(astCallback)) { reflectCache.set( astCallback, - parseSExpr(astCallback()) as FunctionLike | Err + parseSExpr(astCallback()) as FunctionLike | Err ); } return reflectCache.get(astCallback) as FunctionLike | Err | undefined; @@ -60,15 +75,103 @@ export function reflect( return undefined; } -const Global: any = global; +export interface BoundFunctionComponents { + /** + * The target function + */ + targetFunction: F; + /** + * The `this` argument bound to the function. + */ + boundThis: any; + /** + * The arguments bound to the function. + */ + boundArgs: any[]; +} + +/** + * Unbind a bound function into its components. + * @param boundFunction the bound function + * @returns the targetFunction, boundThis and boundArgs if this is a bound function compiled with Functionless, otherwise undefined. + */ +export function unbind( + boundFunction: F +): BoundFunctionComponents | undefined { + if (boundFunction.name.startsWith("bound ")) { + const targetFunction = (boundFunction)[ + ReflectionSymbols.TargetFunction + ]; + const boundThis = (boundFunction)[ReflectionSymbols.BoundThis]; + const boundArgs = (boundFunction)[ReflectionSymbols.BoundArgs]; + if (targetFunction) { + return { + targetFunction, + boundThis, + boundArgs, + }; + } + } + return undefined; +} + +/** + * The components of a {@link Proxy}. + */ +export interface ProxyComponents { + /** + * The target object that the {@link Proxy} is intercepting. + */ + target: T; + /** + * The {@link ProxyHandler} interceptor handler functions. + */ + handler: ProxyHandler; +} + +/** + * Reverses a {@link Proxy} instance into the args that were used to created it. + * + * ```ts + * const proxy = new Proxy({ hello: "world" }, { get: () => {} }); + * + * const components = reverseProxy(proxy); + * components.target // { hello: "world" } + * components.handler // { get: () => {} } + * ``` + * + * @param proxy the proxy instance + * @returns the {@link ProxyComponents} if this proxy can be reversed, or `undefined`. + */ +export function reverseProxy( + proxy: T +): ProxyComponents | undefined { + const reversed = getProxyMap().get(proxy); + if (reversed) { + return { + target: reversed[0], + handler: reversed[1], + }; + } + return undefined; +} + +/** + * @returns the global WeakMap containing all intercepted Proxies. + */ +function getProxyMap() { + return (Global[Global.Symbol.for("functionless:Proxies")] = + Global[Global.Symbol.for("functionless:Proxies")] ?? new Global.WeakMap()); +} // to prevent the closure serializer from trying to import all of functionless. export const deploymentOnlyModule = true; export const ReflectionSymbolNames = { AST: "functionless:AST", - BoundThis: "functionless:BoundThis", BoundArgs: "functionless:BoundArgs", + BoundThis: "functionless:BoundThis", + Proxies: "functionless:Proxies", Reflect: "functionless:Reflect", TargetFunction: "functionless:TargetFunction", } as const; @@ -77,6 +180,7 @@ export const ReflectionSymbols = { AST: Symbol.for(ReflectionSymbolNames.AST), BoundArgs: Symbol.for(ReflectionSymbolNames.BoundArgs), BoundThis: Symbol.for(ReflectionSymbolNames.BoundThis), + Proxies: Symbol.for(ReflectionSymbolNames.Proxies), Reflect: Symbol.for(ReflectionSymbolNames.Reflect), TargetFunction: Symbol.for(ReflectionSymbolNames.TargetFunction), } as const; @@ -169,7 +273,7 @@ function validateFunctionlessNodeSemantics( // we should definitely make this a Symbol typeof clazz.FunctionlessType === "string" ); - if (references?.length > 0) { + if (references.length > 0) { throw new SynthError( ErrorCodes.Unsupported_initialization_of_resources, "Cannot initialize new CDK resources in a runtime function." diff --git a/src/serialize-closure/globals.json b/src/serialize-closure/globals.json new file mode 100644 index 00000000..b5afaf9c --- /dev/null +++ b/src/serialize-closure/globals.json @@ -0,0 +1,235 @@ +[ + "AbortController", + "AbortSignal", + "AggregateError", + "Array", + "ArrayBuffer", + "Atomics", + "BigInt", + "BigInt64Array", + "BigUint64Array", + "Blob", + "Boolean", + "BroadcastChannel", + "Buffer", + "ByteLengthQueuingStrategy", + "Cache", + "caches", + "CacheStorage", + "CanvasGradient", + "CanvasPattern", + "Client", + "Clients", + "CloseEvent", + "console", + "CountQueuingStrategy", + "crossOriginIsolated", + "crypto", + "Crypto", + "CryptoKey", + "CustomEvent", + "DataView", + "Date", + "decodeURI", + "decodeURIComponent", + "DedicatedWorkerGlobalScope", + "DOMException", + "DOMMatrix", + "DOMMatrixReadOnly", + "DOMPoint", + "DOMPointReadOnly", + "DOMQuad", + "DOMRect", + "DOMRectReadOnly", + "DOMStringList", + "encodeURI", + "encodeURIComponent", + "Error", + "ErrorEvent", + "escape", + "eval", + "EvalError", + "Event", + "EventSource", + "EventTarget", + "ExtendableEvent", + "ExtendableMessageEvent", + "FetchEvent", + "File", + "FileList", + "FileReader", + "FileReaderSync", + "FileSystemDirectoryHandle", + "FileSystemFileHandle", + "FileSystemHandle", + "FinalizationRegistry", + "Float32Array", + "Float64Array", + "FontFace", + "FontFaceSet", + "FontFaceSetLoadEvent", + "fonts", + "FormData", + "Function", + "Headers", + "IDBCursor", + "IDBCursorWithValue", + "IDBDatabase", + "IDBFactory", + "IDBIndex", + "IDBKeyRange", + "IDBObjectStore", + "IDBOpenDBRequest", + "IDBRequest", + "IDBTransaction", + "IDBVersionChangeEvent", + "ImageBitmap", + "ImageBitmapRenderingContext", + "ImageData", + "indexedDB", + "Infinity", + "Int16Array", + "Int32Array", + "Int8Array", + "isFinite", + "isNaN", + "isSecureContext", + "JSON", + "location", + "Lock", + "LockManager", + "Math", + "Map", + "MediaCapabilities", + "MessageChannel", + "MessageEvent", + "MessagePort", + "name", + "NaN", + "NavigationPreloadManager", + "navigator", + "NetworkInformation", + "Notification", + "NotificationEvent", + "Number", + "Object", + "onerror", + "onlanguagechange", + "onmessage", + "onmessageerror", + "onoffline", + "ononline", + "onrejectionhandled", + "onunhandledrejection", + "origin", + "parseFloat", + "parseInt", + "Path2D", + "performance", + "Performance", + "PerformanceEntry", + "PerformanceMark", + "PerformanceMeasure", + "PerformanceObserver", + "PerformanceObserverEntryList", + "PerformanceResourceTiming", + "PerformanceServerTiming", + "Permissions", + "PermissionStatus", + "process", + "ProgressEvent", + "Promise", + "PromiseRejectionEvent", + "Proxy", + "PushEvent", + "PushManager", + "PushMessageData", + "PushSubscription", + "PushSubscriptionOptions", + "RangeError", + "ReadableStream", + "ReadableStreamDefaultController", + "ReadableStreamDefaultReader", + "ReferenceError", + "Reflect", + "RegExp", + "Request", + "Response", + "RTCEncodedAudioFrame", + "RTCEncodedVideoFrame", + "SecurityPolicyViolationEvent", + "self", + "ServiceWorker", + "ServiceWorkerContainer", + "ServiceWorkerGlobalScope", + "ServiceWorkerRegistration", + "Set", + "SharedArrayBuffer", + "SharedWorkerGlobalScope", + "StorageManager", + "String", + "SubtleCrypto", + "Symbol", + "Symbol", + "SyntaxError", + "TextDecoder", + "TextDecoderStream", + "TextEncoder", + "TextEncoderStream", + "TextMetrics", + "TransformStream", + "TransformStreamDefaultController", + "TypeError", + "Uint16Array", + "Uint32Array", + "Uint8Array", + "Uint8ClampedArray", + "unescape", + "URIError", + "URL", + "URLSearchParams", + "VideoColorSpace", + "WeakMap", + "WeakRef", + "WeakSet", + "WebGL2RenderingContext", + "WebGLActiveInfo", + "WebGLBuffer", + "WebGLContextEvent", + "WebGLFramebuffer", + "WebGLProgram", + "WebGLQuery", + "WebGLRenderbuffer", + "WebGLRenderingContext", + "WebGLSampler", + "WebGLShader", + "WebGLShaderPrecisionFormat", + "WebGLSync", + "WebGLTexture", + "WebGLTransformFeedback", + "WebGLUniformLocation", + "WebGLVertexArrayObject", + "WebSocket", + "WindowClient", + "Worker", + "WorkerGlobalScope", + "WorkerLocation", + "WorkerNavigator", + "WritableStream", + "WritableStreamDefaultController", + "WritableStreamDefaultWriter", + "XMLHttpRequest", + "XMLHttpRequestEventTarget", + "XMLHttpRequestUpload", + + "clearImmediate", + "clearInterval", + "clearTimeout", + "hasOwnProperty", + "performance", + "queueMicrotask", + "require", + "setImmediate", + "setInterval", + "setTimeout" +] diff --git a/src/serialize-closure/globals.ts b/src/serialize-closure/globals.ts new file mode 100644 index 00000000..32ec6f3d --- /dev/null +++ b/src/serialize-closure/globals.ts @@ -0,0 +1,147 @@ +// sourced from the lib.*.d.ts files +import module from "module"; +import globals from "./globals.json"; +import { callExpr, idExpr, propAccessExpr, stringExpr } from "./util"; + +export const Globals = new Map string>(); + +for (const valueName of globals) { + if (valueName in global) { + registerValue(global[valueName as keyof typeof global], idExpr(valueName)); + } +} + +const ignore = [ + "_http_agent", + "_http_client", + "_http_common", + "_http_incoming", + "_http_outgoing", + "_http_server", + "_stream_duplex", + "_stream_passthrough", + "_stream_readable", + "_stream_transform", + "_stream_wrap", + "_stream_writable", + "_tls_common", + "_tls_wrap", + // "assert", + // "assert/strict", + // "async_hooks", + // "buffer", + // "child_process", + // "cluster", + // "console", + // "constants", + // "crypto", + // "dgram", + // "diagnostics_channel", + // "dns", + // "dns/promises", + // "domain", + // "events", + // "fs", + // "fs/promises", + // "http", + // "http2", + // "https", + // "inspector", + // "module", + // "net", + // "os", + // "path", + // "path/posix", + // "path/win32", + // "perf_hooks", + // "process", + // "punycode", + // "querystring", + // "readline", + // "repl", + // "stream", + // "stream/consumers", + // "stream/promises", + // "stream/web", + // "string_decoder", + "sys", + // "timers", + // "timers/promises", + // "tls", + // "trace_events", + // "tty", + // "url", + // "util", + // "util/types", + // "v8", + // "vm", + // "worker_threads", + // "zlib", +]; + +for (const moduleName of module.builtinModules) { + if (ignore.includes(moduleName) || moduleName.startsWith("_")) { + continue; + } + // eslint-disable-next-line @typescript-eslint/no-require-imports + const module = require(moduleName); + const requireModule = callExpr(idExpr("require"), [stringExpr(moduleName)]); + registerValue(module, requireModule); + registerOwnProperties( + module, + requireModule, + true, + // skip crypto.DEFAULT_ENCODING to avoid complaints about deprecated APIs + // TODO: is this a good tenet? Only support non-deprecated APIs? + moduleName === "crypto" ? ["DEFAULT_ENCODING"] : [] + ); +} + +function registerValue(value: any, expr: string) { + if (Globals.has(value)) { + return; + } + if (typeof value === "object" || typeof value === "function") { + Globals.set(value, () => expr); + registerOwnProperties(value, expr, false); + if (typeof value === "function") { + registerValue(value.prototype, propAccessExpr(expr, "prototype")); + } else if (value && typeof value === "object") { + // registerValue(value.constructor, propAccessExpr(expr, "constructor")); + } + } +} + +function registerOwnProperties( + value: any, + expr: string, + isModule: boolean, + skip: string[] = [] +) { + if ( + value && + (typeof value === "object" || typeof value === "function") && + !(Array.isArray(value) && value !== Array.prototype) + ) { + // go through each of its properties + + for (const propName of Object.getOwnPropertyNames(value)) { + if (skip.includes(propName)) { + continue; + } else if (value === process && propName === "env") { + // never serialize environment variables + continue; + } else if (value === module && propName === "_cache") { + // never serialize the module cache + continue; + } + const propDesc = Object.getOwnPropertyDescriptor(value, propName); + if (propDesc?.get && isModule) { + registerValue(propDesc.get(), propAccessExpr(expr, propName)); + } else if (!propDesc?.writable) { + continue; + } + registerValue(propDesc.value, propAccessExpr(expr, propName)); + } + } +} diff --git a/src/serialize-closure/serialize.ts b/src/serialize-closure/serialize.ts new file mode 100644 index 00000000..7c9fc7b0 --- /dev/null +++ b/src/serialize-closure/serialize.ts @@ -0,0 +1,1493 @@ +import fs from "fs"; +import path from "path"; +import util from "util"; +import { Token } from "aws-cdk-lib"; +import { CodeWithSourceMap, SourceNode } from "source-map"; + +import { assertNever } from "../assert"; +import { + BindingName, + ClassDecl, + FunctionLike, + GetAccessorDecl, + MethodDecl, + SetAccessorDecl, + VariableDeclKind, +} from "../declaration"; +import { ClassExpr } from "../expression"; +import { + isArgument, + isArrayBinding, + isArrayLiteralExpr, + isArrowFunctionExpr, + isAwaitExpr, + isBigIntExpr, + isBinaryExpr, + isBindingElem, + isBlockStmt, + isBooleanLiteralExpr, + isBreakStmt, + isCallExpr, + isCaseClause, + isCatchClause, + isClassDecl, + isClassExpr, + isClassStaticBlockDecl, + isComputedPropertyNameExpr, + isConditionExpr, + isConstructorDecl, + isContinueStmt, + isDebuggerStmt, + isDefaultClause, + isDeleteExpr, + isDoStmt, + isElementAccessExpr, + isEmptyStmt, + isErr, + isExprStmt, + isForInStmt, + isForOfStmt, + isForStmt, + isFunctionDecl, + isFunctionExpr, + isFunctionLike, + isGetAccessorDecl, + isIdentifier, + isIfStmt, + isImportKeyword, + isLabelledStmt, + isMethodDecl, + isNewExpr, + isNoSubstitutionTemplateLiteral, + isNullLiteralExpr, + isNumberLiteralExpr, + isObjectBinding, + isObjectLiteralExpr, + isOmittedExpr, + isParameterDecl, + isParenthesizedExpr, + isPostfixUnaryExpr, + isPrivateIdentifier, + isPropAccessExpr, + isPropAssignExpr, + isPropDecl, + isReferenceExpr, + isRegexExpr, + isReturnStmt, + isSetAccessorDecl, + isSpreadAssignExpr, + isSpreadElementExpr, + isStringLiteralExpr, + isSuperKeyword, + isSwitchStmt, + isTaggedTemplateExpr, + isTemplateExpr, + isTemplateHead, + isTemplateMiddle, + isTemplateSpan, + isTemplateTail, + isThisExpr, + isThrowStmt, + isTryStmt, + isTypeOfExpr, + isUnaryExpr, + isUndefinedLiteralExpr, + isVariableDecl, + isVariableDeclList, + isVariableStmt, + isVoidExpr, + isWhileStmt, + isWithStmt, + isYieldExpr, +} from "../guards"; +import { FunctionlessNode } from "../node"; +import { reflect, reverseProxy, unbind } from "../reflect"; +import { AnyClass, AnyFunction, evalToConstant } from "../util"; +import { forEachChild } from "../visit"; +import { Globals } from "./globals"; +import { + exprStmt, + assignExpr, + propAccessExpr, + idExpr, + stringExpr, + undefinedExpr, + nullExpr, + trueExpr, + falseExpr, + numberExpr, + objectExpr, + definePropertyExpr, + getOwnPropertyDescriptorExpr, + callExpr, + setPropertyStmt, + newExpr, + bigIntExpr, + regExpr, + SourceNodeOrString, + createSourceNode, + createSourceNodeWithoutSpan, +} from "./util"; + +export interface SerializeClosureProps { + /** + * A function to prevent serialization of certain values captured during the serialization. + */ + serialize?: (o: any) => boolean | any; + /** + * A function to prevent serialization of a {@link property} on an {@link obj} + * + * @param obj the object containing the property + * @param property the value of the property name + */ + shouldCaptureProp?: (obj: any, property: string | number | symbol) => boolean; + /** + * If this is a function which, when invoked, will produce the actual entrypoint function. + * Useful for when serializing a function that has high startup cost that only wants to be + * run once. The signature of this function should be: () => (provider_handler_args...) => provider_result + * + * This will then be emitted as: `exports.[exportName] = serialized_func_name();` + * + * In other words, the function will be invoked (once) and the resulting inner function will + * be what is exported. + */ + isFactoryFunction?: boolean; +} + +/** + * Serialize a {@link CodeWithSourceMap} to a JavaScript string with the source map + * as a base64-encoded comment at the end of the file. + * + * @param code the code and source map + * @returns a a JavaScript string with the source map as a base64-encoded comment at the end of the file. + */ +export function serializeCodeWithSourceMap(code: CodeWithSourceMap) { + const map = Buffer.from(JSON.stringify(code.map.toJSON())).toString("base64"); + return `${code.code}\n//# sourceMappingURL=data:application/json;base64,${map}`; +} + +// cache a map of directory -> module id +const moduleIdCache = new Map(); + +/** + * Serialize a closure to a bundle that can be remotely executed. + * @param func + * @param options ES Build options. + * @returns a string + */ +export function serializeClosure( + func: AnyFunction, + options?: SerializeClosureProps +): CodeWithSourceMap { + interface RequiredModule { + path: string; + exportName?: string; + exportValue: any; + module: NodeModule; + } + + // walk the entire require.cache and store a map of value + // -> the module that exported it + // -> the name of the exported value + // -> the path of the module + const requireCache = new Map( + Object.entries(require.cache).flatMap(([path, module]) => { + try { + return [ + [ + module?.exports as any, + { + path, + exportName: undefined, + exportValue: module?.exports, + module, + }, + ], + ...(Object.entries( + Object.getOwnPropertyDescriptors(module?.exports ?? {}) + ).map(([exportName, exportValue]) => { + return [ + exportValue.value, + { + path, + exportName, + exportValue: exportValue.value, + module: module, + }, + ]; + }) as [any, RequiredModule][]), + ]; + } catch (err) { + throw err; + } + }) + ); + + const uniqueName = (() => { + let i = 0; + + return (illegalNames?: Set) => { + let name; + do { + name = `v${i++}`; + } while (illegalNames?.has(name)); + return name; + }; + })(); + + const statements: (SourceNode | string)[] = []; + + // stores a map of value to a ts.Expression producing that value + const valueIds = new Map(); + + const singleton = (() => { + return function (value: any, produce: () => string): string { + // optimize for number of map get/set operations as this is hot code + let expr = valueIds.get(value); + if (expr === undefined) { + expr = produce(); + valueIds.set(value, expr); + } + return expr; + }; + })(); + + // stores a map of a `` to a ts.Identifier pointing to the unique location of that variable + const referenceIds = new Map(); + // map ReferenceExpr (syntactically) to the Closure Instance ID + const referenceInstanceIDs = new Map(); + + const funcAst = reflect(func)!; + const handler = serialize(func); + emit( + createSourceNode( + funcAst, + `exports.handler = ${handler}${options?.isFactoryFunction ? "()" : ""}` + ) + ); + + // looks like TS does not expose the source-map functionality + // TODO: figure out how to generate a source map since we have all the information ... + const script = new SourceNode(1, 0, "index.js", statements); + + return script.toStringWithSourceMap(); + + function emit(...stmts: (string | SourceNode)[]) { + statements.push(...stmts.flatMap((stmt) => [stmt, "\n"])); + } + + function emitVarDecl( + varKind: "const" | "let" | "var", + varName: string, + expr?: SourceNodeOrString | undefined + ): string { + emit( + createSourceNodeWithoutSpan( + varKind, + " ", + varName, + ...(expr ? [" = ", expr] : []), + ";" + ) + ); + return varName; + } + + function emitRequire(mod: string) { + // const vMod = require("module-name"); + return emitVarDecl( + "const", + uniqueName(), + callExpr(idExpr("require"), [stringExpr(mod)]) + ); + } + + function serialize(value: any): string { + let serializedVal = valueIds.get(value); + if (serializedVal === undefined) { + serializedVal = serializeHook(value); + valueIds.set(value, serializedVal); + } + return serializedVal; + } + + function serializeHook(value: any) { + if (options?.serialize) { + const result = options.serialize(value); + if (result === false) { + // do not serialize - emit `undefined`. + return undefinedExpr(); + } else if (result === true) { + // `true` means serialize the original value + return serializeValue(value); + } else { + // otherwise, serialize the modified value + return serializeValue(result); + } + } else { + // there is no serialize hook, so just serialize the original value + return serializeValue(value); + } + } + + function serializeValue(value: any): string { + if (value === undefined) { + return undefinedExpr(); + } else if (value === null) { + return nullExpr(); + } else if (value === true) { + return trueExpr(); + } else if (value === false) { + return falseExpr(); + } else if (typeof value === "number") { + return numberExpr(value); + } else if (typeof value === "bigint") { + return bigIntExpr(value); + } else if (typeof value === "symbol") { + const symbol = serialize(Symbol); + return singleton(value, () => { + if (typeof value.description === "string") { + if (value === Symbol.for(value.description)) { + // Symbol.for(description) + return callExpr(propAccessExpr(symbol, "for"), [ + stringExpr(value.description), + ]); + } else { + // Symbol(description) + return callExpr(symbol, [stringExpr(value.description)]); + } + } else { + // Symbol() + return callExpr(symbol, []); + } + }); + } else if (typeof value === "string") { + return stringExpr(value); + } else if (value instanceof RegExp) { + return singleton(value, () => regExpr(value)); + } else if (value instanceof Date) { + return singleton(value, () => + newExpr(idExpr("Date"), [numberExpr(value.getTime())]) + ); + } else if (Array.isArray(value)) { + // TODO: should we check the array's prototype? + + // emit an empty array + // var vArr = [] + const arr = singleton(value, () => + emitVarDecl("const", uniqueName(), `[]`) + ); + + if (value.length > 0) { + // for each item in the array, serialize the value and push it into the array + // vArr.push(vItem1, vItem2) + emit( + exprStmt(callExpr(propAccessExpr(arr, "push"), value.map(serialize))) + ); + } + + return arr; + } else if (util.types.isProxy(value)) { + const components = reverseProxy(value); + if (components) { + const target = serialize(components.target); + const handler = serialize(components.handler); + return emitVarDecl( + "const", + uniqueName(), + newExpr(idExpr("Proxy"), [target, handler]) + ); + } + throw new Error( + `cannot reverse Proxy - make sure you are compiling with Functionless` + ); + } else if (typeof value === "object") { + if (Globals.has(value)) { + return emitVarDecl("const", uniqueName(), Globals.get(value)!()); + } + + const mod = requireCache.get(value); + + if (mod) { + return serializeModule(value, mod); + } + + if ( + Object.hasOwn(value, "constructor") && + typeof value.constructor === "function" && + value.constructor.prototype === value + ) { + // this is the prototype value of a Function/class + const clazz = serialize(value.constructor); + return singleton(value, () => propAccessExpr(clazz, "prototype")); + } + + const prototype = Object.getPrototypeOf(value); + + // serialize the prototype first + // there should be no circular references between an object instance and its prototype + // if we need to handle circular references between an instance and prototype, then we can + // switch to a strategy of emitting an object and then calling Object.setPrototypeOf + const serializedPrototype = + prototype !== Object.prototype ? serialize(prototype) : undefined; + + // emit an empty object with the correct prototype + // e.g. `var vObj = Object.create(vPrototype);` + const obj = singleton(value, () => + emitVarDecl( + "const", + uniqueName(), + serializedPrototype + ? callExpr(propAccessExpr(idExpr("Object"), "create"), [ + serializedPrototype, + ]) + : objectExpr({}) + ) + ); + + defineProperties(value, obj); + + return obj; + } else if (typeof value === "function") { + if (Globals.has(value)) { + return singleton(value, () => + emitVarDecl("const", uniqueName(), Globals.get(value)!()) + ); + } + + const exportedValue = requireCache.get(value); + + // if this is a reference to an exported value from a module + // and we're using esbuild, then emit a require + if (exportedValue) { + return serializeModule(value, exportedValue); + } + + // if this is a bound closure, try and reconstruct it from its components + const boundFunction = serializeBoundFunction(value); + if (boundFunction) { + return boundFunction; + } + + const ast = reflect(value); + + if (ast === undefined) { + // this function does not have its AST available, so apply some heuristics + // to serialize it or fail + return serializeUnknownFunction(value); + } else if (isFunctionLike(ast)) { + return serializeFunction(value, ast); + } else if (isClassDecl(ast) || isClassExpr(ast)) { + return serializeClass(value, ast); + } else if (isMethodDecl(ast)) { + /** + * This is a reference to a method - pull it out as an individual function + * + * This occurs in two cases: + * 1. a reference to a method on an object + * ```ts + * class Foo { + * method() { } + * } + * + * const method = Foo.prototype.method; + * + * serialize(() => { + * // serialize method as a function + * method(); + * }) + * ``` + * 2. a reference to a method on an object + * + * ```ts + * const o = { + * prop: "value"; + * method() { + * return this.prop; + * } + * } + * ``` + */ + return serializeMethodAsFunction(ast); + } else if (isErr(ast)) { + throw ast.error; + } + console.error("cannot serialize node:", ast); + throw new Error(`cannot serialize node: ${ast.nodeKind}`); + } + + console.error("cannot serialize value:", value); + throw new Error(`cannot serialize value: ${value}`); + } + + /** + * Require a module and import the exported value. + * + * ```ts + * const mod = require("module-id"). + * ``` + * + * CAVEAT: only importing values exported by the module's index. + * + * ```ts + * // will map to require("aws-sdk").DynamoDB; + * const DynamoDB = require("aws-sdk/clients/dynamodb"); + * ``` + */ + function serializeModule(value: unknown, mod: RequiredModule) { + const exports = mod.module?.exports; + if (exports === undefined) { + throw new Error(`undefined exports`); + } + const requireMod = singleton(exports, () => { + const moduleId = getModuleId(mod.path); + return emitRequire(moduleId); + }); + return singleton(value, () => + emitVarDecl( + "const", + uniqueName(), + mod.exportName ? propAccessExpr(requireMod, mod.exportName) : requireMod + ) + ); + } + + /** + * Find the module-id of a jsFile by recursively walking back until + * finding the `package.json`. + * + * If the `package.json` isn't found, then the direct path of the file is returned. + */ + function getModuleId(jsFile: string): string { + return findModuleName(path.dirname(jsFile)) ?? jsFile; + + function findModuleName(dir: string): string | null { + let moduleId = moduleIdCache.get(dir); + if (moduleId !== undefined) { + return moduleId; + } + moduleIdCache.set(dir, (moduleId = _findModuleName(dir))); + return moduleId; + } + + function _findModuleName(dir: string): string | null { + if (path.resolve(dir) === path.resolve(process.cwd())) { + // reached the root workspace - could not resolve the module ID + return null; + } + const pkgJsonPath = path.join(dir, "package.json"); + if (fs.existsSync(pkgJsonPath)) { + const pkgJson = JSON.parse( + fs.readFileSync(pkgJsonPath).toString("utf-8") + ); + if (typeof pkgJson.name === "string") { + if (pkgJson.name === "functionless") { + // always in-memory serialize functionless + return null; + } + return pkgJson.name; + } + } + return findModuleName(path.join(dir, "..")); + } + } + + function serializeFunction(value: AnyFunction, ast: FunctionLike) { + // declare an empty var for this function + const func = singleton(value, () => emitVarDecl("var", uniqueName())); + + emit(exprStmt(assignExpr(func, toSourceNode(ast, getIllegalNames(ast))))); + + defineProperties(value, func); + + return func; + } + + function getIllegalNames(ast: FunctionlessNode): Set { + const names = new Set(); + forEachChild(ast, function visit(node) { + if (isParameterDecl(node) || isVariableDecl(node)) { + getNames(node.name).forEach((name) => names.add(name)); + } else if ( + (isFunctionDecl(node) || + isFunctionExpr(node) || + isClassDecl(node) || + isClassExpr(node)) && + node.name + ) { + if (typeof node.name === "string") { + names.add(node.name); + } else { + names.add(node.name.name); + } + } + forEachChild(node, visit); + }); + return names; + } + + function getNames(name: BindingName): string[] { + if (isIdentifier(name)) { + return [name.name]; + } else { + return name.bindings.flatMap((binding) => + isBindingElem(binding) ? getNames(binding.name) : [] + ); + } + } + + function serializeBoundFunction(func: AnyFunction) { + const components = unbind(func); + if (components) { + const boundThis = serialize(components.boundThis); + const boundArgs = serialize(components.boundArgs); + const targetFunction = serialize(components.targetFunction); + + return singleton(func, () => + emitVarDecl( + "const", + uniqueName(), + callExpr(propAccessExpr(targetFunction, "bind"), [ + boundThis, + boundArgs, + ]) + ) + ); + } + return undefined; + } + + function serializeUnknownFunction(value: AnyFunction) { + if (value.name === "bound requireModuleOrMock") { + // heuristic to catch Jest's hacked-up require + return idExpr("require"); + } else if (value.name === "Object") { + return serialize(Object); + } + + throw new Error( + `cannot serialize closures that were not compiled with Functionless unless they are exported by a module: ${func}` + ); + } + + function serializeClass( + classVal: AnyClass, + classAST: ClassExpr | ClassDecl + ): string { + // emit the class to the closure + const classDecl = singleton(classVal, () => + emitVarDecl("var", uniqueName()) + ); + + emit( + exprStmt( + assignExpr(classDecl, toSourceNode(classAST, getIllegalNames(classAST))) + ) + ); + + monkeyPatch(classDecl, classVal, classVal, ["prototype"]); + monkeyPatch( + propAccessExpr(classDecl, "prototype"), + classVal.prototype, + classVal, + ["constructor"] + ); + + return classDecl; + } + + function defineProperties(value: unknown, expr: string, ignore?: string[]) { + const ignoreSet = ignore ? new Set() : undefined; + // for each of the object's own properties, emit a statement that assigns the value of that property + // vObj.propName = vValue + Object.getOwnPropertyNames(value) + .filter( + (propName) => + ignoreSet?.has(propName) !== true && + (options?.shouldCaptureProp?.(value, propName) ?? true) + ) + .forEach((propName) => { + const propDescriptor = Object.getOwnPropertyDescriptor( + value, + propName + )!; + + if ( + !propDescriptor.writable && + (propName === "length" || + propName === "name" || + propName === "arguments" || + propName === "caller") + ) { + // don't attempt to write Function's length and name properties + return; + } + + if ( + propDescriptor.get === undefined && + propDescriptor.set === undefined + ) { + emit( + setPropertyStmt(expr, propName, serialize(propDescriptor.value)) + ); + } else { + const getter = propDescriptor.get + ? serialize(propDescriptor.get) + : undefinedExpr(); + const setter = propDescriptor.set + ? serialize(propDescriptor.set) + : undefinedExpr(); + + emit( + exprStmt( + definePropertyExpr( + expr, + stringExpr(propName), + objectExpr({ + get: getter, + set: setter, + }) + ) + ) + ); + } + }); + } + + /** + * Detect properties that have been patched on the original class and + * emit statements to re-apply the patched values. + */ + function monkeyPatch( + /** + * A ts.Expression pointing to the value within the closure that contains the + * patched properties. + */ + varName: SourceNodeOrString, + /** + * The value being serialized. + */ + varValue: any, + /** + * The class that "owns" this value. + */ + ownedBy: AnyClass, + /** + * A list of names that should not be considered, such as `prototype` or `constructor`. + */ + exclude: string[] = [] + ) { + // discover any properties that have been monkey-patched and overwrite them + for (const [propName, propDescriptor] of Object.entries( + Object.getOwnPropertyDescriptors(varValue) + ).filter(([propName]) => !exclude.includes(propName))) { + if (propDescriptor.get || propDescriptor.set) { + const get = propAccessor("get", propDescriptor); + const set = propAccessor("set", propDescriptor); + + if (get?.patched || set?.patched) { + emit( + exprStmt( + definePropertyExpr( + varName, + stringExpr(propName), + objectExpr({ + ...(get + ? { + get: get.patched ?? get.original, + } + : {}), + ...(set + ? { + set: set.patched ?? set.original, + } + : {}), + }) + ) + ) + ); + } + + type PatchedPropAccessor = + | { + patched: SourceNodeOrString; + original?: never; + } + | { + patched?: never; + original: SourceNodeOrString; + }; + + /** + * If this getter/setter has changed from the original declaration, then + * serialize its value and monkey-patch it back in. + */ + function propAccessor( + kind: "get" | "set", + propDescriptor: PropertyDescriptor + ): PatchedPropAccessor | undefined { + const getterOrSetter = propDescriptor[kind]; + if (getterOrSetter === undefined) { + return undefined; + } + const ast = reflect(getterOrSetter); + if (ast === undefined) { + throw new Error( + `${`${kind}ter`} was not compiled with functionless` + ); + } + if ( + (kind === "get" && isGetAccessorDecl(ast)) || + (kind === "set" && isSetAccessorDecl(ast)) + ) { + const owner = ( + ast as GetAccessorDecl | SetAccessorDecl + ).ownedBy!.ref(); + if (owner === ownedBy) { + return { + original: propAccessExpr( + getOwnPropertyDescriptorExpr(varName, stringExpr(propName)), + kind + ), + }; + } else { + // a monkey-patched getter/setter + return { + patched: serialize(getterOrSetter), + }; + } + } else if (isFunctionLike(ast) || isMethodDecl(ast)) { + return { + patched: serialize(getterOrSetter), + }; + } + return undefined; + } + } else if (typeof propDescriptor.value === "function") { + // method + const method = propDescriptor.value; + const methodAST = reflect(method); + if (methodAST === undefined) { + throw new Error(`method ${method.toString()} cannot be reflected`); + } else if (isMethodDecl(methodAST)) { + if (methodAST.ownedBy!.ref() !== ownedBy) { + // this is a monkey-patched method, overwrite the value + emit(setPropertyStmt(varName, propName, serialize(method))); + } else { + // this is the same method as declared in the class, so do nothing + } + } else if (isFunctionLike(methodAST)) { + // a method that has been patched with a function decl/expr or arrow expr. + emit(setPropertyStmt(varName, propName, serialize(method))); + } else { + throw new Error( + `Cannot monkey-patch a method with a ${methodAST.kindName}` + ); + } + } else if (propDescriptor.writable) { + // this is a literal value, like an object, so let's serialize it and set + emit( + setPropertyStmt(varName, propName, serialize(propDescriptor.value)) + ); + } + } + } + + /** + * Serialize a {@link MethodDecl} as a Function so that it can be individually referenced. + */ + function serializeMethodAsFunction(node: MethodDecl): string { + // find all names used as identifiers in the AST + // we must ensure that no free variables collide with these names + const illegalNames = getIllegalNames(node); + + const methodName = uniqueName(); + + emit( + createSourceNode(node, [ + `const ${methodName} = `, + ...(node.isAsync ? ["async "] : []), + "function ", + ...(node.name ? [toSourceNode(node.name, illegalNames)] : []), + ...(node.isAsterisk ? ["*"] : []), + "(", + ...commaSeparatedListSourceNode(node.parameters, illegalNames), + ")", + toSourceNode(node.body, illegalNames), + ]) + ); + + return methodName; + } + + /** + * Serialize a {@link FunctionlessNode} to a {@link SourceNode} representing the JavaScript. + * + * The {@link SourceNode} contains strings and other nested {@link SourceNode}s. Together, + * they form an entire JS file. Whenever a {@link FunctionlessNode} is mapped to a {@link SourceNode}, + * the {@link FunctionlessNode.span} and {@link FunctionlessNode.getFileName} are included + * in the {@link SourceNode} so that a source map can be generated mapping the serialized + * JS back to the source code that created it. + * + * @param node + * @param illegalNames names used within the {@link node} that should not be used + * as free variable names. + */ + function toSourceNode( + node: FunctionlessNode, + illegalNames: Set + ): SourceNode { + if (isReferenceExpr(node)) { + if (isRequire(node.ref())) { + return createSourceNode(node, "require"); + } + // get the set of ReferenceExpr instances for thisId + let thisId = + node.referenceId !== undefined + ? referenceInstanceIDs.get(node.referenceId) + : undefined; + thisId = thisId === undefined ? 0 : thisId + 1; + if (node.referenceId) { + referenceInstanceIDs.set(node.referenceId, thisId); + } + + // a key that uniquely identifies the variable pointed to by this reference + const varKey = `${node.getFileName()} ${node.name} ${node.id} ${thisId}`; + + // a ts.Identifier that uniquely references the memory location of this variable in the serialized closure + let varId: string | undefined = referenceIds.get(varKey); + if (varId === undefined) { + varId = uniqueName(illegalNames); + referenceIds.set(varKey, varId); + + const value = serialize(node.ref()); + + // emit a unique variable with the current value + emitVarDecl("var", varId, value); + } + return createSourceNode(node, varId); + } else if (isArrowFunctionExpr(node)) { + return createSourceNode(node, [ + ...(node.isAsync ? ["async "] : []), + "(", + ...commaSeparatedListSourceNode(node.parameters, illegalNames), + ") => ", + toSourceNode(node.body, illegalNames), + ]); + } else if (isFunctionDecl(node) || isFunctionExpr(node)) { + return createSourceNode(node, [ + ...(node.isAsync ? ["async "] : []), + "function ", + ...(node.isAsterisk ? ["*"] : []), + ...(node.name ? [node.name] : []), + "(", + ...commaSeparatedListSourceNode(node.parameters, illegalNames), + ")", + toSourceNode(node.body, illegalNames), + ]); + } else if (isParameterDecl(node)) { + return createSourceNode(node, [ + ...(node.isRest ? ["..."] : []), + toSourceNode(node.name, illegalNames), + ...(node.initializer + ? ["=", toSourceNode(node.initializer, illegalNames)] + : []), + ]); + } else if (isBlockStmt(node)) { + return createSourceNode(node, [ + "{\n", + ...node.statements.flatMap((stmt) => [ + toSourceNode(stmt, illegalNames), + "\n", + ]), + "}\n", + ]); + } else if (isThisExpr(node)) { + return createSourceNode(node, ["this"]); + } else if (isSuperKeyword(node)) { + return createSourceNode(node, ["super"]); + } else if (isIdentifier(node)) { + return createSourceNode(node, [node.name]); + } else if (isPrivateIdentifier(node)) { + return createSourceNode(node, [node.name]); + } else if (isPropAccessExpr(node)) { + const val = evalToConstant(node); + if (val?.constant) { + if (Token.isUnresolved(val.constant)) { + // if this is a reference to a Token, pluck it + return createSourceNode(node, [serialize(val.constant)]); + } + } + return createSourceNode(node, [ + toSourceNode(node.expr, illegalNames), + ...(node.isOptional ? ["?."] : ["."]), + toSourceNode(node.name, illegalNames), + ]); + } else if (isElementAccessExpr(node)) { + const val = evalToConstant(node); + if (val?.constant) { + if (Token.isUnresolved(val.constant)) { + // if this is a reference to a Token, pluck it + return createSourceNode(node, [serialize(val.constant)]); + } + } + return createSourceNode(node, [ + toSourceNode(node.expr, illegalNames), + ...(node.isOptional ? ["?."] : []), + "[", + toSourceNode(node.element, illegalNames), + "]", + ]); + } else if (isCallExpr(node)) { + return createSourceNode(node, [ + toSourceNode(node.expr, illegalNames), + ...(node.isOptional ? ["?."] : []), + "(", + ...commaSeparatedListSourceNode(node.args, illegalNames), + ")", + ]); + } else if (isNewExpr(node)) { + return createSourceNode(node, [ + "new ", + toSourceNode(node.expr, illegalNames), + "(", + ...node.args.flatMap((arg) => [toSourceNode(arg, illegalNames), ","]), + ")", + ]); + } else if (isArgument(node)) { + return toSourceNode(node.expr, illegalNames); + } else if (isUndefinedLiteralExpr(node)) { + return createSourceNode(node, "undefined"); + } else if (isNullLiteralExpr(node)) { + return createSourceNode(node, "null"); + } else if (isBooleanLiteralExpr(node)) { + return createSourceNode(node, node.value ? "true" : "false"); + } else if (isNumberLiteralExpr(node)) { + return createSourceNode(node, node.value.toString(10)); + } else if (isBigIntExpr(node)) { + return createSourceNode(node, `${node.value.toString(10)}n`); + } else if (isStringLiteralExpr(node)) { + return createSourceNode(node, stringExpr(node.value)); + } else if (isArrayLiteralExpr(node)) { + return createSourceNode(node, [ + "[", + ...node.items.flatMap((item) => [ + toSourceNode(item, illegalNames), + ",", + ]), + "]", + ]); + } else if (isSpreadElementExpr(node)) { + return createSourceNode(node, [ + "...", + toSourceNode(node.expr, illegalNames), + ]); + } else if (isObjectLiteralExpr(node)) { + return createSourceNode(node, [ + "{", + ...commaSeparatedListSourceNode(node.properties, illegalNames), + "}", + ]); + } else if (isPropAssignExpr(node)) { + return createSourceNode(node, [ + toSourceNode(node.name, illegalNames), + ":", + toSourceNode(node.expr, illegalNames), + ]); + } else if (isSpreadAssignExpr(node)) { + return createSourceNode(node, [ + "...", + toSourceNode(node.expr, illegalNames), + ]); + } else if (isComputedPropertyNameExpr(node)) { + return createSourceNode(node, [ + "[", + toSourceNode(node.expr, illegalNames), + "]", + ]); + } else if (isOmittedExpr(node)) { + return createSourceNode(node, ""); + } else if (isVariableStmt(node)) { + return toSourceNode(node.declList, illegalNames); + } else if (isVariableDeclList(node)) { + return createSourceNode(node, [ + node.varKind === VariableDeclKind.Const + ? "const" + : node.varKind === VariableDeclKind.Let + ? "let" + : "var", + " ", + ...node.decls.flatMap((decl, i) => [ + toSourceNode(decl, illegalNames), + ...(i < node.decls.length - 1 ? [","] : []), + ]), + ]); + } else if (isVariableDecl(node)) { + return createSourceNode(node, [ + toSourceNode(node.name, illegalNames), + ...(node.initializer + ? ["=", toSourceNode(node.initializer, illegalNames)] + : []), + ]); + } else if (isBindingElem(node)) { + return createSourceNode(node, [ + ...(node.rest ? ["..."] : []), + ...(node.propertyName + ? [toSourceNode(node.propertyName, illegalNames), ":"] + : []), + toSourceNode(node.name, illegalNames), + ...(node.initializer + ? ["=", toSourceNode(node.initializer, illegalNames)] + : []), + ]); + } else if (isObjectBinding(node)) { + return createSourceNode(node, [ + "{", + ...commaSeparatedListSourceNode(node.bindings, illegalNames), + "}", + ]); + } else if (isArrayBinding(node)) { + return createSourceNode(node, [ + "[", + ...commaSeparatedListSourceNode(node.bindings, illegalNames), + "]", + ]); + } else if (isClassDecl(node) || isClassExpr(node)) { + return createSourceNode(node, [ + "class ", + ...(node.name ? [toSourceNode(node.name, illegalNames)] : []), + ...(node.heritage + ? [" extends ", toSourceNode(node.heritage, illegalNames)] + : []), + "{\n", + ...node.members.flatMap((member) => [ + toSourceNode(member, illegalNames), + "\n", + ]), + "}", + ]); + } else if (isClassStaticBlockDecl(node)) { + return createSourceNode(node, [ + "static ", + toSourceNode(node.block, illegalNames), + ]); + } else if (isConstructorDecl(node)) { + return createSourceNode(node, [ + "constructor(", + ...node.parameters.flatMap((param, i) => [ + toSourceNode(param, illegalNames), + ...(i < node.parameters.length ? [","] : []), + ]), + ")", + toSourceNode(node.body, illegalNames), + ]); + } else if (isPropDecl(node)) { + return createSourceNode(node, [ + ...(node.isStatic ? ["static "] : [""]), + toSourceNode(node.name, illegalNames), + ...(node.initializer + ? [" = ", toSourceNode(node.initializer, illegalNames)] + : []), + ]); + } else if (isMethodDecl(node)) { + return createSourceNode(node, [ + ...(node.isAsync ? [" async "] : []), + ...(node.isAsterisk ? ["*"] : []), + toSourceNode(node.name, illegalNames), + "(", + ...commaSeparatedListSourceNode(node.parameters, illegalNames), + ")", + toSourceNode(node.body, illegalNames), + ]); + } else if (isGetAccessorDecl(node)) { + return createSourceNode(node, [ + "get ", + toSourceNode(node.name, illegalNames), + "()", + toSourceNode(node.body, illegalNames), + ]); + } else if (isSetAccessorDecl(node)) { + return createSourceNode(node, [ + "set ", + toSourceNode(node.name, illegalNames), + "(", + ...(node.parameter ? [toSourceNode(node.parameter, illegalNames)] : []), + ")", + toSourceNode(node.body, illegalNames), + ]); + } else if (isExprStmt(node)) { + return createSourceNode(node, [ + toSourceNode(node.expr, illegalNames), + ";", + ]); + } else if (isAwaitExpr(node)) { + return createSourceNode(node, [ + "await ", + toSourceNode(node.expr, illegalNames), + ]); + } else if (isYieldExpr(node)) { + return createSourceNode(node, [ + "yield", + ...(node.delegate ? ["*"] : []), + " ", + toSourceNode(node.expr, illegalNames), + ]); + } else if (isUnaryExpr(node)) { + return createSourceNode(node, [ + node.op, + toSourceNode(node.expr, illegalNames), + ]); + } else if (isPostfixUnaryExpr(node)) { + return createSourceNode(node, [ + toSourceNode(node.expr, illegalNames), + node.op, + ]); + } else if (isBinaryExpr(node)) { + return createSourceNode(node, [ + toSourceNode(node.left, illegalNames), + " ", + node.op, + " ", + toSourceNode(node.right, illegalNames), + ]); + } else if (isConditionExpr(node)) { + return createSourceNode(node, [ + toSourceNode(node.when, illegalNames), + " ? ", + toSourceNode(node.then, illegalNames), + " : ", + toSourceNode(node._else, illegalNames), + ]); + } else if (isIfStmt(node)) { + return createSourceNode(node, [ + "if (", + toSourceNode(node.when, illegalNames), + ")", + ...(isBlockStmt(node.then) + ? [toSourceNode(node.then, illegalNames)] + : [toSourceNode(node.then, illegalNames), ";"]), + + ...(node._else + ? ["else ", toSourceNode(node._else, illegalNames)] + : []), + ]); + } else if (isSwitchStmt(node)) { + return createSourceNode(node, [ + "switch (", + toSourceNode(node.expr, illegalNames), + ") {\n", + ...node.clauses.flatMap((clause) => [ + toSourceNode(clause, illegalNames), + "\n", + ]), + "}", + ]); + } else if (isCaseClause(node)) { + return createSourceNode(node, [ + "case ", + toSourceNode(node.expr, illegalNames), + ":", + ...node.statements.flatMap((stmt) => [ + toSourceNode(stmt, illegalNames), + "\n", + ]), + ]); + } else if (isDefaultClause(node)) { + return createSourceNode(node, [ + "default:\n", + ...node.statements.flatMap((stmt) => [ + toSourceNode(stmt, illegalNames), + "\n", + ]), + ]); + } else if (isForStmt(node)) { + return createSourceNode(node, [ + "for (", + ...(node.initializer + ? [toSourceNode(node.initializer, illegalNames)] + : []), + ";", + ...(node.condition ? [toSourceNode(node.condition, illegalNames)] : []), + ";", + ...(node.incrementor + ? [toSourceNode(node.incrementor, illegalNames)] + : []), + ")", + toSourceNode(node.stmt, illegalNames), + ]); + } else if (isForOfStmt(node)) { + return createSourceNode(node, [ + "for", + ...(node.isAwait ? [" await "] : []), + "(", + toSourceNode(node.initializer, illegalNames), + " of ", + toSourceNode(node.expr, illegalNames), + ")", + toSourceNode(node.stmt, illegalNames), + ]); + } else if (isForInStmt(node)) { + return createSourceNode(node, [ + "for", + toSourceNode(node.initializer, illegalNames), + " in ", + toSourceNode(node.expr, illegalNames), + ")", + toSourceNode(node.stmt, illegalNames), + ]); + } else if (isWhileStmt(node)) { + return createSourceNode(node, [ + "while (", + toSourceNode(node.condition, illegalNames), + ")", + toSourceNode(node.stmt, illegalNames), + ]); + } else if (isDoStmt(node)) { + return createSourceNode(node, [ + "do", + toSourceNode(node.stmt, illegalNames), + "while (", + toSourceNode(node.condition, illegalNames), + ");", + ]); + } else if (isBreakStmt(node)) { + return createSourceNode(node, "break;"); + } else if (isContinueStmt(node)) { + return createSourceNode(node, "continue;"); + } else if (isLabelledStmt(node)) { + return createSourceNode(node, [ + `${node.label.name}:`, + toSourceNode(node.stmt, illegalNames), + ]); + } else if (isTryStmt(node)) { + return createSourceNode(node, [ + `try `, + toSourceNode(node.tryBlock, illegalNames), + ...(node.catchClause + ? [toSourceNode(node.catchClause, illegalNames)] + : []), + ...(node.finallyBlock + ? ["finally ", toSourceNode(node.finallyBlock, illegalNames)] + : []), + ]); + } else if (isCatchClause(node)) { + return createSourceNode(node, [ + `catch`, + ...(node.variableDecl + ? ["(", toSourceNode(node.variableDecl, illegalNames), ")"] + : []), + toSourceNode(node.block, illegalNames), + ]); + } else if (isThrowStmt(node)) { + return createSourceNode(node, [ + `throw `, + toSourceNode(node.expr, illegalNames), + ";", + ]); + } else if (isDeleteExpr(node)) { + return createSourceNode(node, [ + `delete `, + toSourceNode(node.expr, illegalNames), + ";", + ]); + } else if (isParenthesizedExpr(node)) { + return createSourceNode(node, [ + `(`, + toSourceNode(node.expr, illegalNames), + ")", + ]); + } else if (isRegexExpr(node)) { + return createSourceNode(node, [ + "/", + node.regex.source, + "/", + node.regex.flags, + ]); + } else if (isTemplateExpr(node)) { + return createSourceNode(node, [ + "`", + node.head.text, + ...node.spans.map((span) => toSourceNode(span, illegalNames)), + "`", + ]); + } else if (isTaggedTemplateExpr(node)) { + return createSourceNode(node, [ + toSourceNode(node.tag, illegalNames), + toSourceNode(node.template, illegalNames), + ]); + } else if (isNoSubstitutionTemplateLiteral(node)) { + return createSourceNode(node, ["`", node.text, "`"]); + } else if ( + isTemplateHead(node) || + isTemplateMiddle(node) || + isTemplateTail(node) + ) { + return createSourceNode(node, node.text); + } else if (isTemplateSpan(node)) { + return createSourceNode(node, [ + createSourceNode(node, [ + "${", + toSourceNode(node.expr, illegalNames), + "}", + ]), + toSourceNode(node.literal, illegalNames), + ]); + } else if (isTypeOfExpr(node)) { + return createSourceNode(node, [ + "typeof ", + toSourceNode(node.expr, illegalNames), + ]); + } else if (isVoidExpr(node)) { + return createSourceNode(node, [ + "void ", + toSourceNode(node.expr, illegalNames), + ]); + } else if (isDebuggerStmt(node)) { + return createSourceNode(node, "debugger;"); + } else if (isEmptyStmt(node)) { + return createSourceNode(node, ";"); + } else if (isReturnStmt(node)) { + return createSourceNode( + node, + node.expr + ? ["return ", toSourceNode(node.expr, illegalNames), ";"] + : "return;" + ); + } else if (isImportKeyword(node)) { + return createSourceNode(node, "import"); + } else if (isWithStmt(node)) { + return createSourceNode(node, [ + "with(", + toSourceNode(node.expr, illegalNames), + ")", + toSourceNode(node.stmt, illegalNames), + ]); + } else if (isErr(node)) { + throw node.error; + } else { + return assertNever(node); + } + } + + function commaSeparatedListSourceNode( + nodes: FunctionlessNode[], + illegalNames: Set + ): (string | SourceNode)[] { + return nodes.flatMap((node, i) => [ + toSourceNode(node, illegalNames), + ...(i < nodes.length - 1 ? [","] : []), + ]); + } +} + +/** + * Heuristic for detecting whether a value is the require function. + * + * Detects both the intrinsic require and jest's patched require. + */ +function isRequire(a: any): boolean { + return ( + a === require || + (typeof a === "function" && a.name === "bound requireModuleOrMock") + ); +} diff --git a/src/serialize-closure/util.ts b/src/serialize-closure/util.ts new file mode 100644 index 00000000..1cefe91f --- /dev/null +++ b/src/serialize-closure/util.ts @@ -0,0 +1,169 @@ +import path from "path"; +import { SourceNode } from "source-map"; +import { FunctionlessNode } from "../node"; + +export function undefinedExpr() { + return "undefined"; +} + +export function nullExpr() { + return "null"; +} + +export function trueExpr() { + return "true"; +} + +export function falseExpr() { + return "false"; +} + +export function idExpr(name: string) { + return name; +} + +export function stringExpr(name: string) { + // this seems dangerous - are we handling this right? + return `"${name.replaceAll('"', '\\"').replaceAll("\n", "\\n")}"`; +} + +export function numberExpr(num: number) { + return num.toString(10); +} + +export function bigIntExpr(num: bigint) { + return `${num.toString(10)}n`; +} + +export function regExpr(regex: RegExp) { + return `/${regex.source}/${regex.flags}`; +} + +export function objectExpr(obj: Record) { + return createSourceNodeWithoutSpan( + "{", + ...Object.entries(obj).flatMap(([name, val]) => [ + createSourceNodeWithoutSpan(name, " : ", val), + ",", + ]), + "}" + ); +} + +export type SourceNodeOrString = string | SourceNode; + +export function createSourceNodeWithoutSpan( + ...exprs: S +): S extends string ? string : SourceNodeOrString { + if (exprs.every((expr) => typeof expr === "string")) { + return exprs.join(""); + } else { + return new SourceNode(null, null, "index.js", exprs) as any; + } +} + +export function createSourceNode( + node: FunctionlessNode, + chunks: string | SourceNodeOrString[] +) { + const absoluteFileName = node.getFileName(); + + return new SourceNode( + node.span[0], + node.span[1], + path.relative(process.cwd(), absoluteFileName), + chunks + ); +} + +const propNameRegex = /^[_a-zA-Z][_a-zA-Z0-9]*$/g; + +export function propAccessExpr( + expr: S, + name: string +): S extends string ? string : SourceNodeOrString { + if (name.match(propNameRegex)) { + return createSourceNodeWithoutSpan(expr, ".", name) as S extends string + ? string + : SourceNodeOrString; + } else { + return createSourceNodeWithoutSpan( + expr, + "[", + stringExpr(name), + "]" + ) as S extends string ? string : SourceNodeOrString; + } +} + +export function assignExpr( + left: SourceNodeOrString | SourceNode, + right: SourceNodeOrString | SourceNode +) { + return createSourceNodeWithoutSpan(left, " = ", right); +} + +export function callExpr< + E extends SourceNodeOrString, + A extends SourceNodeOrString +>(expr: E, args: A[]): E | A extends string ? string : SourceNodeOrString { + return createSourceNodeWithoutSpan( + expr, + "(", + ...args.flatMap((arg, i) => (i < args.length - 1 ? [arg, ","] : [arg])), + ")" + ) as E | A extends string ? string : SourceNodeOrString; +} + +export function newExpr(expr: string, args: string[]): string; +export function newExpr(expr: SourceNodeOrString, args: SourceNodeOrString[]) { + return createSourceNodeWithoutSpan( + "new ", + expr, + "(", + ...args.flatMap((arg) => [arg, ","]), + ")" + ); +} + +export function exprStmt(expr: SourceNodeOrString | SourceNode) { + return createSourceNodeWithoutSpan(expr, ";"); +} + +export function setPropertyStmt( + on: SourceNodeOrString, + key: string, + value: SourceNodeOrString +) { + return createSourceNodeWithoutSpan(setPropertyExpr(on, key, value), ";"); +} + +export function setPropertyExpr( + on: SourceNodeOrString, + key: string, + value: SourceNodeOrString +) { + return assignExpr(propAccessExpr(on, key), value); +} + +export function definePropertyExpr( + on: SourceNodeOrString, + name: SourceNodeOrString, + value: SourceNodeOrString +) { + return callExpr(propAccessExpr(idExpr("Object"), "defineProperty"), [ + on, + name, + value, + ]); +} + +export function getOwnPropertyDescriptorExpr( + obj: SourceNodeOrString, + key: SourceNodeOrString +) { + return callExpr( + propAccessExpr(idExpr("Object"), "getOwnPropertyDescriptor"), + [obj, key] + ); +} diff --git a/src/statement.ts b/src/statement.ts index 02a5eeef..55662c3c 100644 --- a/src/statement.ts +++ b/src/statement.ts @@ -39,7 +39,7 @@ export type Stmt = export abstract class BaseStmt< Kind extends NodeKind, - Parent extends FunctionlessNode | undefined = BlockStmt | IfStmt + Parent extends FunctionlessNode = BlockStmt | IfStmt > extends BaseNode { readonly nodeKind: "Stmt" = "Stmt"; diff --git a/src/step-function.ts b/src/step-function.ts index 3b2dab34..a5e1f783 100644 --- a/src/step-function.ts +++ b/src/step-function.ts @@ -995,6 +995,7 @@ export type StepFunctionCause = * } * ``` */ +// @ts-ignore - TODO: rename error and cause export class StepFunctionError extends Error { static readonly kind = "StepFunctionError"; diff --git a/src/vtl.ts b/src/vtl.ts index b038f33d..8e04dba2 100644 --- a/src/vtl.ts +++ b/src/vtl.ts @@ -13,6 +13,7 @@ import { Expr, Identifier, ReferenceExpr, + SuperKeyword, ThisExpr, } from "./expression"; import { @@ -324,9 +325,12 @@ export abstract class VTL { * @param node the {@link Expr} or {@link Stmt} to evaluate. * @returns a variable reference to the evaluated value */ - public eval(node?: Expr, returnVar?: string): string; + public eval(node?: Expr | SuperKeyword, returnVar?: string): string; public eval(node: Stmt, returnVar?: string): void; - public eval(node?: Expr | Stmt, returnVar?: string): string | void { + public eval( + node?: Expr | Stmt | SuperKeyword, + returnVar?: string + ): string | void { if (!node) { return "$null"; } @@ -1052,7 +1056,7 @@ export abstract class VTL { * @return [firstVariable, list variable, render function] */ private flattenListMapOperations( - expr: Expr, + expr: Expr | SuperKeyword, // Should start with $ returnVariable: string, before: (firstVariable: string, list: string) => void, diff --git a/test-app/hook.js b/test-app/hook.js index a4883120..347d034b 100644 --- a/test-app/hook.js +++ b/test-app/hook.js @@ -2,8 +2,9 @@ const register = require("@swc/register/lib/node").default; const path = require("path"); const src = path.join(__dirname, "src"); -const functionlessLib = path.resolve(__dirname, "..", "lib"); +const functionlessLib = path.dirname(require.resolve("functionless")); register({ + sourceMaps: true, ignore: [ (file) => { if (file.startsWith(src) || file.startsWith(functionlessLib)) { diff --git a/test-app/src/order-processing-queue.ts b/test-app/src/order-processing-queue.ts index 94f4a3a1..0c271b65 100644 --- a/test-app/src/order-processing-queue.ts +++ b/test-app/src/order-processing-queue.ts @@ -1,5 +1,18 @@ -import { App, aws_logs, aws_stepfunctions, Stack } from "aws-cdk-lib"; -import { Queue, Function, EventBus, Event, StepFunction } from "functionless"; +import { + App, + aws_logs, + aws_stepfunctions, + SecretValue, + Stack, +} from "aws-cdk-lib"; +import { + Queue, + Function, + EventBus, + Event, + StepFunction, + JsonSecret, +} from "functionless"; const app = new App(); const stack = new Stack(app, "queue"); @@ -166,3 +179,28 @@ new StepFunction( }); } ); + +export interface UserPass { + username: string; + password: string; +} + +const secret = new JsonSecret(stack, "JsonSecret", { + secretStringValue: SecretValue.unsafePlainText( + JSON.stringify({ + username: "sam", + password: "sam", + }) + ), +}); + +new Function(stack, "SecretFunc", async (input: "get" | UserPass) => { + if (input === "get") { + return (await secret.getSecretValue()).SecretValue; + } else { + const response = await secret.putSecretValue({ + SecretValue: input, + }); + return response; + } +}); diff --git a/test-app/yarn.lock b/test-app/yarn.lock index bd799af7..4571da4f 100644 --- a/test-app/yarn.lock +++ b/test-app/yarn.lock @@ -2808,6 +2808,7 @@ function.prototype.name@^1.1.5: "@types/aws-lambda" "^8.10.102" fs-extra "^10.1.0" minimatch "^5.1.0" + source-map "^0.7.4" functions-have-names@^1.2.2: version "1.2.3" @@ -4214,7 +4215,7 @@ source-map@^0.6.0: resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== -source-map@^0.7.3: +source-map@^0.7.3, source-map@^0.7.4: version "0.7.4" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.7.4.tgz#a9bbe705c9d8846f4e08ff6765acf0f1b0898656" integrity sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA== diff --git a/test/__snapshots__/serialize-closure.test.ts.snap b/test/__snapshots__/serialize-closure.test.ts.snap new file mode 100644 index 00000000..814c0aba --- /dev/null +++ b/test/__snapshots__/serialize-closure.test.ts.snap @@ -0,0 +1,1253 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`all observers of a free variable share the same reference 1`] = ` +"var v0; +var v2; +var v3 = 0; +v2 = function up(){ +v3 += 2; +} +; +v2.prototype = v2.prototype; +var v1 = v2; +var v5; +v5 = function down(){ +v3 -= 1; +} +; +v5.prototype = v5.prototype; +var v4 = v5; +v0 = () => { +v1(); +v4(); +return v3; +} +; +exports.handler = v0 + +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LmpzIiwidGVzdC9zZXJpYWxpemUtY2xvc3VyZS50ZXN0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7QUFBQTtLQ21FRSxhQUFjO0FBQ1osTUFBSyxDQUFMLENBRFk7QUFBQTtDRG5FaEI7QUFBQTtBQUFBO0FBQUE7S0N1RUUsZUFBZ0I7QUFDZCxNQUFLLENBQUwsQ0FEYztBQUFBO0NEdkVsQjtBQUFBO0FBQUE7S0MyRXNDLE1BQU07QUFDeEMsS0FEd0M7QUFFeEMsS0FGd0M7QUFHeEMsT0FBTyxFQUFQLENBSHdDO0FBQUE7Q0QzRTVDO0FDMkVzQyxvQkQzRXRDIn0=" +`; + +exports[`all observers of a free variable share the same reference even when two instances 1`] = ` +"var v0; +const v2 = []; +var v3; +var v5; +var v6 = 0; +v5 = function up(){ +v6 += 2; +} +; +v5.prototype = v5.prototype; +var v4 = v5; +var v8; +v8 = function down(){ +v6 -= 1; +} +; +v8.prototype = v8.prototype; +var v7 = v8; +v3 = () => { +v4(); +v7(); +return v6; +} +; +var v9; +var v11; +var v12 = 0; +v11 = function up(){ +v12 += 2; +} +; +v11.prototype = v11.prototype; +var v10 = v11; +var v14; +v14 = function down(){ +v12 -= 1; +} +; +v14.prototype = v14.prototype; +var v13 = v14; +v9 = () => { +v10(); +v13(); +return v12; +} +; +v2.push(v3,v9); +var v1 = v2; +v0 = () => { +return v1.map((closure) => { +return closure(); +} +); +} +; +exports.handler = v0 + +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LmpzIiwidGVzdC9zZXJpYWxpemUtY2xvc3VyZS50ZXN0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7S0N3RkksYUFBYztBQUNaLE1BQUssQ0FBTCxDQURZO0FBQUE7Q0R4RmxCO0FBQUE7QUFBQTtBQUFBO0tDNEZJLGVBQWdCO0FBQ2QsTUFBSyxDQUFMLENBRGM7QUFBQTtDRDVGcEI7QUFBQTtBQUFBO0tDZ0dXLE1BQU07QUFDWCxLQURXO0FBRVgsS0FGVztBQUdYLE9BQU8sRUFBUCxDQUhXO0FBQUE7Q0RoR2pCO0FBQUE7QUFBQTtBQUFBO01Dd0ZJLGFBQWM7QUFDWixPQUFLLENBQUwsQ0FEWTtBQUFBO0NEeEZsQjtBQUFBO0FBQUE7QUFBQTtNQzRGSSxlQUFnQjtBQUNkLE9BQUssQ0FBTCxDQURjO0FBQUE7Q0Q1RnBCO0FBQUE7QUFBQTtLQ2dHVyxNQUFNO0FBQ1gsTUFEVztBQUVYLE1BRlc7QUFHWCxPQUFPLEdBQVAsQ0FIVztBQUFBO0NEaEdqQjtBQUFBO0FBQUE7S0N1R3NDLE1BQU07QUFDeEMsT0FBTyxHQUFTLEdBQVQsQ0FBYSxDQUFDLE9BQUQsS0FBYTtBQUFBO0FBQUE7QUFBMUIsQ0FBUCxDQUR3QztBQUFBO0NEdkc1QztBQ3VHc0Msb0JEdkd0QyJ9" +`; + +exports[`avoid collision with a catch variable 1`] = ` +"var v0; +var v2 = 1; +v0 = () => { +let _v=0 +try { +throw 2; +} +catch(v1){ +_v = v1; +} + +let free=v2 +return _v + free; +} +; +exports.handler = v0 + +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LmpzIiwidGVzdC9zZXJpYWxpemUtY2xvc3VyZS50ZXN0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7S0NncEJzQyxNQUFNO0FBQ3hDLElBQUksR0FBYSxDQUR1QjtBQUV4QyxJQUFJO0FBQ0YsTUFBTSxDQUFOLENBREU7QUFBQTtBQUVGLE1BQU8sRUFBUCxDQUFXO0FBQ1gsS0FBSyxFQUFMLENBRFc7QUFBQTtBQUoyQjtBQVF4QyxJQUFJLEtBQU8sRUFSNkI7QUFTeEMsT0FBTyxLQUFLLElBQVosQ0FUd0M7QUFBQTtDRGhwQjVDO0FDZ3BCc0Msb0JEaHBCdEMifQ==" +`; + +exports[`avoid collision with a locally scoped array binding 1`] = ` +"var v0; +var v2 = 1; +v0 = () => { +let free=v2 +const [v1]=[2,] +return v1 + free; +} +; +exports.handler = v0 + +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LmpzIiwidGVzdC9zZXJpYWxpemUtY2xvc3VyZS50ZXN0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7S0NxZXNDLE1BQU07QUFFeEMsSUFBSSxLQUFPLEVBRjZCO0FBSXhDLE1BQU0sQ0FBQyxFQUFELEVBQU8sQ0FBQyxDQUFELEVBSjJCO0FBS3hDLE9BQU8sS0FBSyxJQUFaLENBTHdDO0FBQUE7Q0RyZTVDO0FDcWVzQyxvQkRyZXRDIn0=" +`; + +exports[`avoid collision with a locally scoped array binding with nested object binding 1`] = ` +"var v0; +var v2 = 1; +v0 = () => { +let free=v2 +const [{v1}]=[{v1:2},] +return v1 + free; +} +; +exports.handler = v0 + +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LmpzIiwidGVzdC9zZXJpYWxpemUtY2xvc3VyZS50ZXN0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7S0NrZnNDLE1BQU07QUFFeEMsSUFBSSxLQUFPLEVBRjZCO0FBSXhDLE1BQU0sQ0FBQyxDQUFFLEVBQUYsQ0FBRCxFQUFXLENBQUMsQ0FBRSxHQUFJLENBQU4sQ0FBRCxFQUp1QjtBQUt4QyxPQUFPLEtBQUssSUFBWixDQUx3QztBQUFBO0NEbGY1QztBQ2tmc0Msb0JEbGZ0QyJ9" +`; + +exports[`avoid collision with a locally scoped class 1`] = ` +"var v0; +var v2 = 1; +v0 = () => { +let free=v2 +class v1{ +foo = 2 +} +return new v1().foo + free; +} +; +exports.handler = v0 + +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LmpzIiwidGVzdC9zZXJpYWxpemUtY2xvc3VyZS50ZXN0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7S0M4Z0JzQyxNQUFNO0FBRXhDLElBQUksS0FBTyxFQUY2QjtBQUl4QyxNQUFNLEVBQU47QUFDRSxNQUFNLENBRFI7QUFBQSxDQUp3QztBQU94QyxPQUFPLElBQUksRUFBSixHQUFTLEdBQVQsR0FBZSxJQUF0QixDQVB3QztBQUFBO0NEOWdCNUM7QUM4Z0JzQyxvQkQ5Z0J0QyJ9" +`; + +exports[`avoid collision with a locally scoped function 1`] = ` +"var v0; +var v2 = 1; +v0 = () => { +let free=v2 +function v1(){ +return 2; +} + +return v1() + free; +} +; +exports.handler = v0 + +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LmpzIiwidGVzdC9zZXJpYWxpemUtY2xvc3VyZS50ZXN0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7S0MrZnNDLE1BQU07QUFFeEMsSUFBSSxLQUFPLEVBRjZCO0FBSXhDLGFBQWM7QUFDWixPQUFPLENBQVAsQ0FEWTtBQUFBO0FBSjBCO0FBT3hDLE9BQU8sT0FBTyxJQUFkLENBUHdDO0FBQUE7Q0QvZjVDO0FDK2ZzQyxvQkQvZnRDIn0=" +`; + +exports[`avoid collision with a locally scoped object binding variable 1`] = ` +"var v0; +var v2 = 1; +v0 = () => { +let free=v2 +const {v1}={v1:2} +return v1 + free; +} +; +exports.handler = v0 + +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LmpzIiwidGVzdC9zZXJpYWxpemUtY2xvc3VyZS50ZXN0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7S0MyY3NDLE1BQU07QUFFeEMsSUFBSSxLQUFPLEVBRjZCO0FBSXhDLE1BQU0sQ0FBRSxFQUFGLEVBQVMsQ0FBRSxHQUFJLENBQU4sQ0FKeUI7QUFLeEMsT0FBTyxLQUFLLElBQVosQ0FMd0M7QUFBQTtDRDNjNUM7QUMyY3NDLG9CRDNjdEMifQ==" +`; + +exports[`avoid collision with a locally scoped object binding variable with renamed property 1`] = ` +"var v0; +var v2 = 1; +v0 = () => { +let free=v2 +const {v2:v1}={v2:2} +return v1 + free; +} +; +exports.handler = v0 + +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LmpzIiwidGVzdC9zZXJpYWxpemUtY2xvc3VyZS50ZXN0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7S0N3ZHNDLE1BQU07QUFFeEMsSUFBSSxLQUFPLEVBRjZCO0FBSXhDLE1BQU0sQ0FBRSxHQUFJLEVBQU4sRUFBYSxDQUFFLEdBQUksQ0FBTixDQUpxQjtBQUt4QyxPQUFPLEtBQUssSUFBWixDQUx3QztBQUFBO0NEeGQ1QztBQ3dkc0Msb0JEeGR0QyJ9" +`; + +exports[`avoid collision with a locally scoped variable 1`] = ` +"var v0; +var v2 = 1; +v0 = () => { +let free=v2 +const v1=2 +return v1 + free; +} +; +exports.handler = v0 + +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LmpzIiwidGVzdC9zZXJpYWxpemUtY2xvc3VyZS50ZXN0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7S0M4YnNDLE1BQU07QUFFeEMsSUFBSSxLQUFPLEVBRjZCO0FBSXhDLE1BQU0sR0FBSyxDQUo2QjtBQUt4QyxPQUFPLEtBQUssSUFBWixDQUx3QztBQUFBO0NEOWI1QztBQzhic0Msb0JEOWJ0QyJ9" +`; + +exports[`avoid collision with a parameter array binding 1`] = ` +"var v0; +var v2 = 1; +v0 = ([v1]) => { +let free=v2 +return v1 + free; +} +; +exports.handler = v0 + +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LmpzIiwidGVzdC9zZXJpYWxpemUtY2xvc3VyZS50ZXN0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7S0M4akJzQyxDQUFDLENBQUMsRUFBRCxDQUFELEtBQW9CO0FBRXRELElBQUksS0FBTyxFQUYyQztBQUd0RCxPQUFPLEtBQUssSUFBWixDQUhzRDtBQUFBO0NEOWpCMUQ7QUM4akJzQyxvQkQ5akJ0QyJ9" +`; + +exports[`avoid collision with a parameter declaration 1`] = ` +"var v0; +var v2 = 1; +v0 = (v1) => { +let free=v2 +return v1 + free; +} +; +exports.handler = v0 + +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LmpzIiwidGVzdC9zZXJpYWxpemUtY2xvc3VyZS50ZXN0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7S0M2aEJzQyxDQUFDLEVBQUQsS0FBZ0I7QUFFbEQsSUFBSSxLQUFPLEVBRnVDO0FBR2xELE9BQU8sS0FBSyxJQUFaLENBSGtEO0FBQUE7Q0Q3aEJ0RDtBQzZoQnNDLG9CRDdoQnRDIn0=" +`; + +exports[`avoid collision with a parameter object binding 1`] = ` +"var v0; +var v2 = 1; +v0 = ({v1}) => { +let free=v2 +return v1 + free; +} +; +exports.handler = v0 + +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LmpzIiwidGVzdC9zZXJpYWxpemUtY2xvc3VyZS50ZXN0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7S0N3aUJzQyxDQUFDLENBQUUsRUFBRixDQUFELEtBQTRCO0FBRTlELElBQUksS0FBTyxFQUZtRDtBQUc5RCxPQUFPLEtBQUssSUFBWixDQUg4RDtBQUFBO0NEeGlCbEU7QUN3aUJzQyxvQkR4aUJ0QyJ9" +`; + +exports[`avoid collision with a parameter object binding renamed 1`] = ` +"var v0; +var v2 = 1; +v0 = ({v2:v1}) => { +let free=v2 +return v1 + free; +} +; +exports.handler = v0 + +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LmpzIiwidGVzdC9zZXJpYWxpemUtY2xvc3VyZS50ZXN0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7S0NtakJzQyxDQUFDLENBQUUsR0FBSSxFQUFOLENBQUQsS0FBZ0M7QUFFbEUsSUFBSSxLQUFPLEVBRnVEO0FBR2xFLE9BQU8sS0FBSyxJQUFaLENBSGtFO0FBQUE7Q0RuakJ0RTtBQ21qQnNDLG9CRG5qQnRDIn0=" +`; + +exports[`avoid collision with a parameter with object binding nested in array binding 1`] = ` +"var v0; +var v2 = 1; +v0 = ([{v1}]) => { +let free=v2 +return v1 + free; +} +; +exports.handler = v0 + +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LmpzIiwidGVzdC9zZXJpYWxpemUtY2xvc3VyZS50ZXN0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7S0N5a0JzQyxDQUFDLENBQUMsQ0FBRSxFQUFGLENBQUQsQ0FBRCxLQUFnQztBQUVsRSxJQUFJLEtBQU8sRUFGdUQ7QUFHbEUsT0FBTyxLQUFLLElBQVosQ0FIa0U7QUFBQTtDRHprQnRFO0FDeWtCc0Msb0JEemtCdEMifQ==" +`; + +exports[`avoid collision with a variable declaration array binding in for-of 1`] = ` +"var v0; +var v2 = 1; +v0 = () => { +let _v=0 +for(const [v1] of [[2,],]){ +_v = v1; +} + +let free=v2 +return _v + free; +} +; +exports.handler = v0 + +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LmpzIiwidGVzdC9zZXJpYWxpemUtY2xvc3VyZS50ZXN0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7S0Npb0JzQyxNQUFNO0FBQ3hDLElBQUksR0FBYSxDQUR1QjtBQUV4QyxJQUFLLE1BQU0sQ0FBQyxFQUFELENBQVgsSUFBbUIsQ0FBQyxDQUFDLENBQUQsRUFBRCxFQUFuQixDQUEwQjtBQUN4QixLQUFLLEVBQUwsQ0FEd0I7QUFBQTtBQUZjO0FBTXhDLElBQUksS0FBTyxFQU42QjtBQU94QyxPQUFPLEtBQUssSUFBWixDQVB3QztBQUFBO0NEam9CNUM7QUNpb0JzQyxvQkRqb0J0QyJ9" +`; + +exports[`avoid collision with a variable declaration in for-of 1`] = ` +"var v0; +var v2 = 1; +v0 = () => { +let _v=0 +for(const v1 of [2,]){ +_v = v1; +} + +let free=v2 +return _v + free; +} +; +exports.handler = v0 + +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LmpzIiwidGVzdC9zZXJpYWxpemUtY2xvc3VyZS50ZXN0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7S0NvbEJzQyxNQUFNO0FBQ3hDLElBQUksR0FBYSxDQUR1QjtBQUV4QyxJQUFLLE1BQU0sRUFBWCxJQUFpQixDQUFDLENBQUQsRUFBakIsQ0FBc0I7QUFDcEIsS0FBSyxFQUFMLENBRG9CO0FBQUE7QUFGa0I7QUFNeEMsSUFBSSxLQUFPLEVBTjZCO0FBT3hDLE9BQU8sS0FBSyxJQUFaLENBUHdDO0FBQUE7Q0RwbEI1QztBQ29sQnNDLG9CRHBsQnRDIn0=" +`; + +exports[`avoid collision with a variable declaration object binding in for-of 1`] = ` +"var v0; +var v2 = 1; +v0 = () => { +let _v=0 +for(const {v1} of [{v1:2},]){ +_v = v1; +} + +let free=v2 +return _v + free; +} +; +exports.handler = v0 + +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LmpzIiwidGVzdC9zZXJpYWxpemUtY2xvc3VyZS50ZXN0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7S0NtbUJzQyxNQUFNO0FBQ3hDLElBQUksR0FBYSxDQUR1QjtBQUV4QyxJQUFLLE1BQU0sQ0FBRSxFQUFGLENBQVgsSUFBcUIsQ0FBQyxDQUFFLEdBQUksQ0FBTixDQUFELEVBQXJCLENBQWtDO0FBQ2hDLEtBQUssRUFBTCxDQURnQztBQUFBO0FBRk07QUFNeEMsSUFBSSxLQUFPLEVBTjZCO0FBT3hDLE9BQU8sS0FBSyxJQUFaLENBUHdDO0FBQUE7Q0RubUI1QztBQ21tQnNDLG9CRG5tQnRDIn0=" +`; + +exports[`avoid collision with a variable declaration object binding in for-of 2`] = ` +"var v0; +var v2 = 1; +v0 = () => { +let _v=0 +for(const {v1} of [{v1:2},]){ +_v = v1; +} + +let free=v2 +return _v + free; +} +; +exports.handler = v0 + +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LmpzIiwidGVzdC9zZXJpYWxpemUtY2xvc3VyZS50ZXN0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7S0NrbkJzQyxNQUFNO0FBQ3hDLElBQUksR0FBYSxDQUR1QjtBQUV4QyxJQUFLLE1BQU0sQ0FBRSxFQUFGLENBQVgsSUFBcUIsQ0FBQyxDQUFFLEdBQUksQ0FBTixDQUFELEVBQXJCLENBQWtDO0FBQ2hDLEtBQUssRUFBTCxDQURnQztBQUFBO0FBRk07QUFNeEMsSUFBSSxLQUFPLEVBTjZCO0FBT3hDLE9BQU8sS0FBSyxJQUFaLENBUHdDO0FBQUE7Q0RsbkI1QztBQ2tuQnNDLG9CRGxuQnRDIn0=" +`; + +exports[`avoid name collision with a closure's lexical scope 1`] = ` +"var v0; +var v2; +var v4; +var v5 = 0; +v4 = class v1{ +foo(){ +return (v5 += 1); +} + +}; +var v3 = v4; +v2 = class v2 extends v3{ +}; +var v1 = v2; +v0 = () => { +const v3=new v1() +return v3.foo(); +} +; +exports.handler = v0 + +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LmpzIiwidGVzdC9zZXJpYWxpemUtY2xvc3VyZS50ZXN0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7QUFBQTtBQUFBO0tDNmFFLE1BQU0sRUFBTjtBQUNTLEdBQVAsRUFBYTtBQUNYLE9BQU8sQ0FBQyxNQUFNLENBQVAsQ0FBUCxDQURXO0FBQUE7QUFEZjtBQUFBLEMsQ0Q3YUY7QUFBQTtLQ2tiRSxNQUFNLEVBQU4sU0FBaUIsRUFBakI7QUFBQSxDLENEbGJGO0FBQUE7S0NvYnNDLE1BQU07QUFDeEMsTUFBTSxHQUFLLElBQUksRUFBSixFQUQ2QjtBQUV4QyxPQUFPLEdBQUcsR0FBSCxFQUFQLENBRndDO0FBQUE7Q0RwYjVDO0FDb2JzQyxvQkRwYnRDIn0=" +`; + +exports[`broad spectrum syntax test 1`] = ` +"var v0; +const v2 = Promise; +var v1 = v2; +const v4 = Error; +var v3 = v4; +const v6 = Symbol; +var v5 = v6; +const v8 = Math; +var v7 = v8; +var v9 = NaN; +v0 = async () => { +const arrowExpr=(a,...b) => { +return [a,...b,]; +} + +const arrowBlockExpr=(a,...b) => { +return [a,...b,]; +} + +const asyncArrowExpr=async () => { +return "asyncArrowExpr"; +} + +async function asyncFuncDecl(){ +return "asyncFuncDecl"; +} + +function funcDecl(a,...b){ +return [a,...b,]; +} + +const funcExpr=function funcExpr(a,...b){ +return [a,...b,]; +} + +const anonFuncExpr=function (a,...b){ +return [a,...b,]; +} + +const asyncFuncExpr=async function asyncFuncExpr(){ +return "asyncFuncExpr"; +} + +const anonAsyncFuncExpr=async function (){ +return "anonAsyncFuncExpr"; +} + +let getterSetterVal +const obj={prop:"prop",getProp(){ +return this.prop + " 1"; +} +,get getterSetter(){ +return getterSetterVal; +} +,set getterSetter(val){ +getterSetterVal = val; +} +} +const {a,b:c,d:[e],f="f"}={a:"a",b:"b",d:["e",]} +obj.getterSetter = "getterSetter"; +class Foo{ +static VAL = "VAL" +static { +Foo.VAL = "VAL 1"; +this.VAL = \`\${this.VAL} 2\`; +} + +constructor(prop,val,){ +this.prop = prop; +this.val = val; +} + +method(){ +return \`\${this.prop} \${this.val} \${Foo.VAL}\`; +} + + async asyncMethod(){ +const result=await new v1((resolve) => { +return resolve("asyncResult"); +} +,) +return result; +} + +*generatorMethod(){ +yield "yielded item"; +yield* generatorFuncDecl(); +yield* generatorFuncExpr(); +yield* anonGeneratorFuncExpr(); +} + +} +function *generatorFuncDecl(){ +yield "yielded in function decl"; +} + +const generatorFuncExpr=function *generatorFuncExpr(){ +yield "yielded in function expr"; +} + +const anonGeneratorFuncExpr=function *(){ +yield "yielded in anonymous function expr"; +} + +class Bar extends Foo{ +constructor(){ +super("bar prop","bar val"); +} + +method(){ +return \`bar \${super.method()}\`; +} + +} +const foo=new Foo("foo prop","foo val",) +const bar=new Bar() +const generator=foo.generatorMethod() +function ifTest(condition){ +if (condition === 0){ +return "if"; +} +else if (condition === 1){ +return "else if"; +} +else { +return "else"; +} + +} + +const whileStmts=[] +while (whileStmts.length === 0){ +whileStmts.push("while block"); +} + +while (whileStmts.length === 1){ +whileStmts.push("while stmt"); +} + +const doWhileStmts=[] +do{ +doWhileStmts.push("do while block"); +} +while (doWhileStmts.length === 0); +do{ +doWhileStmts.push("do while stmt"); +} +while (doWhileStmts.length === 1); +const whileTrue=[] +while (true){ +whileTrue.push(\`while true \${whileTrue.length}\`); +if (whileTrue.length === 1){ +continue; +} + +break; +} + +const tryCatchErr=[] +try { +tryCatchErr.push("try"); +throw new v3("catch",); +} +catch(err){ +tryCatchErr.push(err.message); +} +finally { +tryCatchErr.push("finally"); +} + +const tryCatch=[] +try { +tryCatch.push("try 2"); +throw new v3("",); +} +catch{ +tryCatch.push("catch 2"); +} +finally { +tryCatch.push("finally 2"); +} + +const tryNoFinally=[] +try { +tryNoFinally.push("try 3"); +throw new v3("",); +} +catch{ +tryNoFinally.push("catch 3"); +} + +const tryNoCatch=[] +try { +(() => { +try { +tryNoCatch.push("try 4"); +throw new v3("",); +} +finally { +tryNoCatch.push("finally 4"); +} + +} +)(); +} +catch{ +} + +const deleteObj={notDeleted:"value",prop:"prop","spaces prop":"spaces prop",[v5.for("prop")]:"symbol prop"} +delete deleteObj.prop;; +delete deleteObj["spaces prop"];; +delete deleteObj[v5.for("prop")];; +const regex=/a.*/g +let unicode +{ +var HECOMḚṮH=42 +const _="___" +const $="$$" +const ƒ={π:v7.PI,ø:[],Ø:v9,e:2.718281828459045,root2:2.718281828459045,α:2.5029,δ:4.6692,ζ:1.2020569,φ:1.61803398874,γ:1.30357,K:2.685452001,oo:Infinity * Infinity,A:1.2824271291,C10:0.12345678910111213,c:299792458} +unicode = {ƒ:ƒ,out:\`\${HECOMḚṮH}\${_}\${$}\`}; +} + +var homecometh={H̹̙̦̮͉̩̗̗ͧ̇̏̊̾Eͨ͆͒̆ͮ̃͏̷̮̣̫̤̣Cͯ̂͐͏̨̛͔̦̟͈̻O̜͎͍͙͚̬̝̣̽ͮ͐͗̀ͤ̍̀͢M̴̡̲̭͍͇̼̟̯̦̉̒͠Ḛ̛̙̞̪̗ͥͤͩ̾͑̔͐ͅṮ̴̷̷̗̼͍̿̿̓̽͐H̙̙̔̄͜:42} +const parens=(2 + 3) * 2 +function tag(strings,...args){ +return \`tag \${strings.map((str,i) => { +return \`\${str} \${args[i]}\`; +} +).join("|")}\`; +} + +const noSubstitutionTemplateLiteral=\`hello world\` +const {head,...rest}={head:"head",rest1:"rest1",rest2:"rest2"} +const [head2,...rest2]=["head array","rest array1","rest array2",] +const binary=true && false +const fooInstanceOf=foo instanceof Foo +const condition=binary ? "condition true" : "condition false" +let switchDefault +switch (0) { +case 1:switchDefault = "switchCase"; +break; + +default: +switchDefault = "switchDefault"; + +} +let switchCase +switch (0) { +case 0:switchCase = "switchCase"; +break; + +default: +switchDefault = "switchDefault"; + +} +let num=0 +const str="hello" +const typeOf=typeof str +const array=[1,2,] +const object={key:"value"} +const key="key" +const element=object[key] +const unary=!str +const postfix=num++ +const prefix=++num +const binaryOp=(num += 1) +debugger; +return [...arrowExpr("a","b","c"),...arrowBlockExpr("A","B","C"),...funcDecl("d","e","f"),...funcExpr("g","h","i"),...anonFuncExpr("j","k","l"),await asyncArrowExpr(),await asyncFuncDecl(),await asyncFuncExpr(),await anonAsyncFuncExpr(),obj.prop,obj.getProp(),obj.getterSetter,a,c,e,f,(() => { +return "foo"; +} +)(),(function (){ +return "bar"; +} +)(),(function baz(){ +return "baz"; +} +)(),foo.method(),bar.method(),await foo.asyncMethod(),generator.next().value,generator.next().value,generator.next().value,generator.next().value,ifTest(0),ifTest(1),ifTest(2),...whileStmts,...doWhileStmts,...whileTrue,...tryCatchErr,...tryCatch,...tryNoFinally,...tryNoCatch,deleteObj,regex.test("abc"),unicode,homecometh,parens,tag\`\${1} + \${2} + \${3}\`,noSubstitutionTemplateLiteral,typeof "hello world",void 0,rest,head2,rest2,binary,fooInstanceOf,condition,switchDefault,switchCase,typeOf,array,element,unary,postfix,prefix,binaryOp,]; +} +; +exports.handler = v0 + +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LmpzIiwidGVzdC9zZXJpYWxpemUtY2xvc3VyZS50ZXN0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0tDb3pCc0MsWUFBWTtBQUM5QyxNQUFNLFVBQVksQ0FBQyxDQUFELENBQVksR0FBRyxDQUFmLEtBQStCO0FBQUEsUUFBQyxDQUFELENBQUksR0FBRyxDQUFQO0FBQUE7QUFESDtBQUU5QyxNQUFNLGVBQWlCLENBQUMsQ0FBRCxDQUFZLEdBQUcsQ0FBZixLQUErQjtBQUNwRCxPQUFPLENBQUMsQ0FBRCxDQUFJLEdBQUcsQ0FBUCxFQUFQLENBRG9EO0FBQUE7QUFGUjtBQUs5QyxNQUFNLGVBQWlCLFlBQVk7QUFDakMsT0FBTyxnQkFBUCxDQURpQztBQUFBO0FBTFc7QUFROUMsOEJBQStCO0FBQzdCLE9BQU8sZUFBUCxDQUQ2QjtBQUFBO0FBUmU7QUFXOUMsa0JBQWtCLENBQWxCLENBQTZCLEdBQUcsQ0FBaEMsQ0FBNkM7QUFDM0MsT0FBTyxDQUFDLENBQUQsQ0FBSSxHQUFHLENBQVAsRUFBUCxDQUQyQztBQUFBO0FBWEM7QUFjOUMsTUFBTSxTQUFXLGtCQUFrQixDQUFsQixDQUE2QixHQUFHLENBQWhDLENBQTZDO0FBQzVELE9BQU8sQ0FBQyxDQUFELENBQUksR0FBRyxDQUFQLEVBQVAsQ0FENEQ7QUFBQTtBQWRoQjtBQWlCOUMsTUFBTSxhQUFlLFVBQVUsQ0FBVixDQUFxQixHQUFHLENBQXhCLENBQXFDO0FBQ3hELE9BQU8sQ0FBQyxDQUFELENBQUksR0FBRyxDQUFQLEVBQVAsQ0FEd0Q7QUFBQTtBQWpCWjtBQW9COUMsTUFBTSxjQUFnQiw4QkFBK0I7QUFDbkQsT0FBTyxlQUFQLENBRG1EO0FBQUE7QUFwQlA7QUF1QjlDLE1BQU0sa0JBQW9CLGlCQUFrQjtBQUMxQyxPQUFPLG1CQUFQLENBRDBDO0FBQUE7QUF2QkU7QUEyQjlDLElBQUksZUEzQjBDO0FBNEI5QyxNQUFNLElBQU0sQ0FDVixLQUFNLE1BREksQ0FFVixTQUFVO0FBQ1IsT0FBTyxLQUFLLElBQUwsR0FBWSxJQUFuQixDQURRO0FBQUE7QUFGQSxDQUtWLElBQUksWUFBSixFQUEyQjtBQUN6QixPQUFPLGVBQVAsQ0FEeUI7QUFBQTtBQUxqQixDQVFWLElBQUksWUFBSixDQUFpQixHQUFqQixDQUE4QjtBQUM1QixrQkFBa0IsR0FBbEIsQ0FENEI7QUFBQTtBQVJwQixDQTVCa0M7QUEwQzlDLE1BQU0sQ0FDSixDQURJLENBRUosRUFBRyxDQUZDLENBR0osRUFBRyxDQUFDLENBQUQsQ0FIQyxDQUlKLEVBQUksR0FKQSxFQUtGLENBQ0YsRUFBRyxHQURELENBRUYsRUFBRyxHQUZELENBR0YsRUFBRyxDQUFDLEdBQUQsRUFIRCxDQS9DMEM7QUFxRDlDLElBQUksWUFBSixHQUFtQixjQUFuQixDQXJEOEM7QUF1RDlDLE1BQU0sR0FBTjtBQUNFLE9BQU8sR0FBUCxHQUFhLEtBRGY7QUFFRSxPQUFPO0FBQ0wsSUFBSSxHQUFKLEdBQVUsT0FBVixDQURLO0FBRUwsS0FBSyxHQUFMLEdBQVcsQ0FBRyxPQUFLLEdBQUwsQ0FBUyxFQUFaLENBQVgsQ0FGSztBQUFBO0FBRlQ7QUFPRSxZQUFxQixJQUFyQixDQUFtQyxHQUFuQyxFQUFnRDtBQWwzQnRELFNBazNCMkIsT0FsM0IzQixDQWszQnNEO0FBQzlDLEtBQUssR0FBTCxHQUFXLEdBQVgsQ0FEOEM7QUFBQTtBQVBsRDtBQVVTLE1BQVAsRUFBZ0I7QUFDZCxPQUFPLENBQUcsT0FBSyxJQUFMLENBQVUsQ0FBRyxPQUFLLEdBQUwsQ0FBUyxDQUFHLE1BQUksR0FBSixDQUE1QixDQUFQLENBRGM7QUFBQTtBQVZsQjtBQWNFLE9BQWEsV0FBYixFQUEyQjtBQUN6QixNQUFNLE9BQVMsTUFBTSxJQUFJLEVBQUosQ0FBb0IsQ0FBQyxPQUFELEtBQ3ZDO0FBQUEsZUFBUSxhQUFSO0FBQUE7QUFEbUIsRUFESTtBQUl6QixPQUFPLE1BQVAsQ0FKeUI7QUFBQTtBQWQ3QjtBQXFCRSxDQUFRLGVBQVIsRUFBK0I7QUFDN0IsTUFBTSxjQUFOLENBRDZCO0FBRTdCLE9BQU8sbUJBQVAsQ0FGNkI7QUFHN0IsT0FBTyxtQkFBUCxDQUg2QjtBQUk3QixPQUFPLHVCQUFQLENBSjZCO0FBQUE7QUFyQmpDO0FBQUEsQ0F2RDhDO0FBb0Y5Qyw2QkFBOEI7QUFDNUIsTUFBTSwwQkFBTixDQUQ0QjtBQUFBO0FBcEZnQjtBQXdGOUMsTUFBTSxrQkFBb0IsNkJBQThCO0FBQ3RELE1BQU0sMEJBQU4sQ0FEc0Q7QUFBQTtBQXhGVjtBQTRGOUMsTUFBTSxzQkFBd0IsWUFBYTtBQUN6QyxNQUFNLG9DQUFOLENBRHlDO0FBQUE7QUE1Rkc7QUFnRzlDLE1BQU0sR0FBTixTQUFrQixHQUFsQjtBQUNFLGFBQWM7QUFDWixNQUFNLFVBQU4sQ0FBa0IsU0FBbEIsRUFEWTtBQUFBO0FBRGhCO0FBS1MsTUFBUCxFQUFnQjtBQUNkLE9BQU8sS0FBTyxRQUFNLE1BQU4sR0FBUCxDQUFQLENBRGM7QUFBQTtBQUxsQjtBQUFBLENBaEc4QztBQTBHOUMsTUFBTSxJQUFNLElBQUksR0FBSixDQUFRLFVBQVIsQ0FBb0IsU0FBcEIsRUExR2tDO0FBMkc5QyxNQUFNLElBQU0sSUFBSSxHQUFKLEVBM0drQztBQTRHOUMsTUFBTSxVQUFZLElBQUksZUFBSixFQTVHNEI7QUE4RzlDLGdCQUFnQixTQUFoQixDQUFzQztBQUNwQyxJQUFJLGNBQWMsQ0FBbEIsQ0FBcUI7QUFDbkIsT0FBTyxJQUFQLENBRG1CO0FBQUE7QUFBckIsS0FFTyxJQUFJLGNBQWMsQ0FBbEIsQ0FBcUI7QUFDMUIsT0FBTyxTQUFQLENBRDBCO0FBQUE7QUFBckIsS0FFQTtBQUNMLE9BQU8sTUFBUCxDQURLO0FBQUE7QUFMNkI7QUFBQTtBQTlHUTtBQXdIOUMsTUFBTSxXQUFhLEVBeEgyQjtBQXlIOUMsT0FBTyxXQUFXLE1BQVgsS0FBc0IsQ0FBN0IsQ0FBZ0M7QUFDOUIsV0FBVyxJQUFYLENBQWdCLGFBQWhCLEVBRDhCO0FBQUE7QUF6SGM7QUE2SDlDLE9BQU8sV0FBVyxNQUFYLEtBQXNCLENBQTdCLENBQWdDO0FBQUEsV0FBVyxJQUFYLENBQWdCLFlBQWhCO0FBQUE7QUE3SGM7QUErSDlDLE1BQU0sYUFBZSxFQS9IeUI7QUFnSTlDLEVBQUc7QUFDRCxhQUFhLElBQWIsQ0FBa0IsZ0JBQWxCLEVBREM7QUFBQTtBQUFILE9BRVMsYUFBYSxNQUFiLEtBQXdCLENBRmpDLEVBaEk4QztBQW9JOUMsRUFBRztBQUFBLGFBQWEsSUFBYixDQUFrQixlQUFsQjtBQUFBO0FBQUgsT0FDTyxhQUFhLE1BQWIsS0FBd0IsQ0FEL0IsRUFwSThDO0FBdUk5QyxNQUFNLFVBQVksRUF2STRCO0FBd0k5QyxPQUFPLElBQVAsQ0FBYTtBQUNYLFVBQVUsSUFBVixDQUFlLFlBQWMsWUFBVSxNQUFWLENBQWQsQ0FBZixFQURXO0FBRVgsSUFBSSxVQUFVLE1BQVYsS0FBcUIsQ0FBekIsQ0FBNEI7QUFDMUIsU0FEMEI7QUFBQTtBQUZqQjtBQUtYLE1BTFc7QUFBQTtBQXhJaUM7QUFnSjlDLE1BQU0sWUFBYyxFQWhKMEI7QUFpSjlDLElBQUk7QUFDRixZQUFZLElBQVosQ0FBaUIsS0FBakIsRUFERTtBQUVGLE1BQU0sSUFBSSxFQUFKLENBQVUsT0FBVixFQUFOLENBRkU7QUFBQTtBQUdGLE1BQU8sR0FBUCxDQUFpQjtBQUNqQixZQUFZLElBQVosQ0FBaUIsSUFBSSxPQUFyQixFQURpQjtBQUFBO0FBSG5CLFFBS1U7QUFDUixZQUFZLElBQVosQ0FBaUIsU0FBakIsRUFEUTtBQUFBO0FBdEpvQztBQTBKOUMsTUFBTSxTQUFXLEVBMUo2QjtBQTJKOUMsSUFBSTtBQUNGLFNBQVMsSUFBVCxDQUFjLE9BQWQsRUFERTtBQUVGLE1BQU0sSUFBSSxFQUFKLENBQVUsRUFBVixFQUFOLENBRkU7QUFBQTtBQUdGLEtBQU07QUFDTixTQUFTLElBQVQsQ0FBYyxTQUFkLEVBRE07QUFBQTtBQUhSLFFBS1U7QUFDUixTQUFTLElBQVQsQ0FBYyxXQUFkLEVBRFE7QUFBQTtBQWhLb0M7QUFvSzlDLE1BQU0sYUFBZSxFQXBLeUI7QUFxSzlDLElBQUk7QUFDRixhQUFhLElBQWIsQ0FBa0IsT0FBbEIsRUFERTtBQUVGLE1BQU0sSUFBSSxFQUFKLENBQVUsRUFBVixFQUFOLENBRkU7QUFBQTtBQUdGLEtBQU07QUFDTixhQUFhLElBQWIsQ0FBa0IsU0FBbEIsRUFETTtBQUFBO0FBeEtzQztBQTRLOUMsTUFBTSxXQUF1QixFQTVLaUI7QUE2SzlDLElBQUk7QUFDRixDQUFDLE1BQU07QUFDTCxJQUFJO0FBQ0YsV0FBVyxJQUFYLENBQWdCLE9BQWhCLEVBREU7QUFFRixNQUFNLElBQUksRUFBSixDQUFVLEVBQVYsRUFBTixDQUZFO0FBQUE7QUFBSixRQUdVO0FBQ1IsV0FBVyxJQUFYLENBQWdCLFdBQWhCLEVBRFE7QUFBQTtBQUpMO0FBQUE7QUFBUCxJQURFO0FBQUE7QUFTRixLQUFNO0FBQUE7QUF0THNDO0FBd0w5QyxNQUFNLFVBQWlCLENBQ3JCLFdBQVksT0FEUyxDQUVyQixLQUFNLE1BRmUsQ0FHckIsY0FBZSxhQUhNLENBSXJCLENBQUMsR0FBTyxHQUFQLENBQVcsTUFBWCxDQUFELEVBQXNCLGFBSkQsQ0F4THVCO0FBOEw5QyxPQUFPLFVBQVUsSUFBakIsRUE5TDhDO0FBK0w5QyxPQUFPLFVBQVUsYUFBVixDQUFQLEVBL0w4QztBQWdNOUMsT0FBTyxVQUFVLEdBQU8sR0FBUCxDQUFXLE1BQVgsQ0FBVixDQUFQLEVBaE04QztBQWtNOUMsTUFBTSxNQUFRLE1BbE1nQztBQW9NOUMsSUFBSSxPQXBNMEM7QUFxTTlDO0FBQ0UsSUFBSSxTQUFXLEVBRGpCO0FBRUUsTUFBTSxFQUFJLEtBRlo7QUFHRSxNQUFNLEVBQUksSUFIWjtBQUlFLE1BQU0sRUFBSSxDQUNSLEVBQUcsR0FBSyxFQURBLENBRVIsRUFBRyxFQUZLLENBR1IsRUFBRyxFQUhLLENBSVIsRUFBRyxpQkFKSyxDQUtSLE1BQU8saUJBTEMsQ0FNUixFQUFHLE1BTkssQ0FPUixFQUFHLE1BUEssQ0FRUixFQUFHLFNBUkssQ0FTUixFQUFHLGFBVEssQ0FVUixFQUFHLE9BVkssQ0FXUixFQUFHLFdBWEssQ0FZUixHQUFJLFdBQWlCLFFBWmIsQ0FhUixFQUFHLFlBYkssQ0FjUixJQUFLLG1CQWRHLENBZVIsRUFBRyxTQWZLLENBSlo7QUFxQkUsVUFBVSxDQUFFLEdBQUYsQ0FBSyxJQUFLLENBQUcsV0FBVyxJQUFJLElBQWxCLENBQVYsQ0FBVixDQXJCRjtBQUFBO0FBck04QztBQTZOOUMsSUFBSSxXQUFhLENBQUUseUdBQVUsRUFBWixDQTdONkI7QUErTjlDLE1BQU0sT0FBUyxDQUFDLElBQUksQ0FBTCxJQUFVLENBL05xQjtBQWlPOUMsYUFBYSxPQUFiLENBQTRDLEdBQUcsSUFBL0MsQ0FBK0Q7QUFFN0QsT0FBTyxLQUFPLFVBQVEsR0FBUixDQUFZLENBQUMsR0FBRCxDQUFNLENBQU4sS0FBWTtBQUFBLFFBQUcsTUFBSSxDQUFHLE9BQUssQ0FBTCxFQUFWO0FBQUE7QUFBeEIsRUFBNkMsSUFBN0MsQ0FBa0QsR0FBbEQsRUFBUCxDQUFQLENBRjZEO0FBQUE7QUFqT2pCO0FBc085QyxNQUFNLDhCQUFnQyxhQXRPUTtBQXdPOUMsTUFBTSxDQUFFLElBQUYsQ0FBUSxHQUFHLElBQVgsRUFBb0IsQ0FBRSxLQUFNLE1BQVIsQ0FBZ0IsTUFBTyxPQUF2QixDQUFnQyxNQUFPLE9BQXZDLENBeE9vQjtBQXlPOUMsTUFBTSxDQUFDLEtBQUQsQ0FBUSxHQUFHLEtBQVgsRUFBb0IsQ0FBQyxZQUFELENBQWUsYUFBZixDQUE4QixhQUE5QixFQXpPb0I7QUEyTzlDLE1BQU0sT0FBUyxRQUFRLEtBM091QjtBQTRPOUMsTUFBTSxjQUFnQixlQUFlLEdBNU9TO0FBNk85QyxNQUFNLFVBQVksU0FBUyxnQkFBVCxHQUE0QixpQkE3T0E7QUErTzlDLElBQUksYUEvTzBDO0FBZ1A5QyxRQUFRLENBQVI7QUFDRSxLQUFLLENBQUwsQ0FDRSxnQkFBZ0IsWUFBaEIsQ0FERjtBQUVFLE1BRkY7QUFERjtBQUlFO0FBQ0UsZ0JBQWdCLGVBQWhCLENBREY7QUFKRjtBQUFBLENBaFA4QztBQXdQOUMsSUFBSSxVQXhQMEM7QUF5UDlDLFFBQVEsQ0FBUjtBQUNFLEtBQUssQ0FBTCxDQUNFLGFBQWEsWUFBYixDQURGO0FBRUUsTUFGRjtBQURGO0FBSUU7QUFDRSxnQkFBZ0IsZUFBaEIsQ0FERjtBQUpGO0FBQUEsQ0F6UDhDO0FBaVE5QyxJQUFJLElBQU0sQ0FqUW9DO0FBa1E5QyxNQUFNLElBQU0sT0FsUWtDO0FBbVE5QyxNQUFNLE9BQVMsT0FBTyxHQW5Rd0I7QUFxUTlDLE1BQU0sTUFBUSxDQUFDLENBQUQsQ0FBSSxDQUFKLEVBclFnQztBQXNROUMsTUFBTSxPQUFTLENBQUUsSUFBSyxPQUFQLENBdFErQjtBQXVROUMsTUFBTSxJQUFNLEtBdlFrQztBQXdROUMsTUFBTSxRQUFVLE9BQU8sR0FBUCxDQXhROEI7QUF5UTlDLE1BQU0sTUFBUSxDQUFDLEdBelErQjtBQTBROUMsTUFBTSxRQUFVLEtBMVE4QjtBQTJROUMsTUFBTSxPQUFTLEVBQUUsR0EzUTZCO0FBNFE5QyxNQUFNLFNBQVcsQ0FBQyxPQUFPLENBQVIsQ0E1UTZCO0FBK1E5QyxTQS9ROEM7QUFpUjlDLE9BQU8sQ0FDTCxHQUFHLFVBQVUsR0FBVixDQUFlLEdBQWYsQ0FBb0IsR0FBcEIsQ0FERSxDQUVMLEdBQUcsZUFBZSxHQUFmLENBQW9CLEdBQXBCLENBQXlCLEdBQXpCLENBRkUsQ0FHTCxHQUFHLFNBQVMsR0FBVCxDQUFjLEdBQWQsQ0FBbUIsR0FBbkIsQ0FIRSxDQUlMLEdBQUcsU0FBUyxHQUFULENBQWMsR0FBZCxDQUFtQixHQUFuQixDQUpFLENBS0wsR0FBRyxhQUFhLEdBQWIsQ0FBa0IsR0FBbEIsQ0FBdUIsR0FBdkIsQ0FMRSxDQU1MLE1BQU0sZ0JBTkQsQ0FPTCxNQUFNLGVBUEQsQ0FRTCxNQUFNLGVBUkQsQ0FTTCxNQUFNLG1CQVRELENBVUwsSUFBSSxJQVZDLENBV0wsSUFBSSxPQUFKLEVBWEssQ0FZTCxJQUFJLFlBWkMsQ0FhTCxDQWJLLENBY0wsQ0FkSyxDQWVMLENBZkssQ0FnQkwsQ0FoQkssQ0FpQkwsQ0FBQyxNQUFNO0FBQ0wsT0FBTyxLQUFQLENBREs7QUFBQTtBQUFQLEdBakJLLENBb0JMLENBQUMsV0FBWTtBQUNYLE9BQU8sS0FBUCxDQURXO0FBQUE7QUFBYixHQXBCSyxDQXVCTCxDQUFDLGNBQWU7QUFDZCxPQUFPLEtBQVAsQ0FEYztBQUFBO0FBQWhCLEdBdkJLLENBMEJMLElBQUksTUFBSixFQTFCSyxDQTJCTCxJQUFJLE1BQUosRUEzQkssQ0E0QkwsTUFBTSxJQUFJLFdBQUosRUE1QkQsQ0E2QkwsVUFBVSxJQUFWLEdBQWlCLEtBN0JaLENBOEJMLFVBQVUsSUFBVixHQUFpQixLQTlCWixDQStCTCxVQUFVLElBQVYsR0FBaUIsS0EvQlosQ0FnQ0wsVUFBVSxJQUFWLEdBQWlCLEtBaENaLENBaUNMLE9BQU8sQ0FBUCxDQWpDSyxDQWtDTCxPQUFPLENBQVAsQ0FsQ0ssQ0FtQ0wsT0FBTyxDQUFQLENBbkNLLENBb0NMLEdBQUcsVUFwQ0UsQ0FxQ0wsR0FBRyxZQXJDRSxDQXNDTCxHQUFHLFNBdENFLENBdUNMLEdBQUcsV0F2Q0UsQ0F3Q0wsR0FBRyxRQXhDRSxDQXlDTCxHQUFHLFlBekNFLENBMENMLEdBQUcsVUExQ0UsQ0EyQ0wsU0EzQ0ssQ0E0Q0wsTUFBTSxJQUFOLENBQVcsS0FBWCxDQTVDSyxDQTZDTCxPQTdDSyxDQThDTCxVQTlDSyxDQStDTCxNQS9DSyxDQWdETCxHQUFHLENBQUcsSUFBRSxHQUFLLElBQUUsR0FBSyxJQUFqQixDQWhERSxDQWlETCw2QkFqREssQ0FrREwsT0FBTyxhQWxERixDQW1ETCxLQUFLLENBbkRBLENBb0RMLElBcERLLENBcURMLEtBckRLLENBc0RMLEtBdERLLENBdURMLE1BdkRLLENBd0RMLGFBeERLLENBeURMLFNBekRLLENBMERMLGFBMURLLENBMkRMLFVBM0RLLENBNERMLE1BNURLLENBNkRMLEtBN0RLLENBOERMLE9BOURLLENBK0RMLEtBL0RLLENBZ0VMLE9BaEVLLENBaUVMLE1BakVLLENBa0VMLFFBbEVLLEVBQVAsQ0FqUjhDO0FBQUE7Q0RwekJsRDtBQ296QnNDLG9CRHB6QnRDIn0=" +`; + +exports[`instantiating the AWS SDK 1`] = ` +"var v0; +const v2 = require("aws-sdk"); +var v1 = v2; +v0 = () => { +const client=new v1.DynamoDB() +return client; +} +; +exports.handler = v0 + +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LmpzIiwidGVzdC9zZXJpYWxpemUtY2xvc3VyZS50ZXN0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7QUFBQTtLQ2dxQnNDLE1BQU07QUFDeEMsTUFBTSxPQUFTLElBQUksR0FBSSxRQUFSLEVBRHlCO0FBR3hDLE9BQU8sTUFBUCxDQUh3QztBQUFBO0NEaHFCNUM7QUNncUJzQyxvQkRocUJ0QyJ9" +`; + +exports[`instantiating the AWS SDK v3 1`] = ` +"var v0; +const v2 = require("@aws-sdk/client-dynamodb"); +const v3 = v2.DynamoDBClient; +var v1 = v3; +v0 = () => { +const client=new v1({},) +return client; +} +; +exports.handler = v0 + +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LmpzIiwidGVzdC9zZXJpYWxpemUtY2xvc3VyZS50ZXN0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7QUFBQTtBQUFBO0tDd3JCc0MsTUFBTTtBQUN4QyxNQUFNLE9BQVMsSUFBSSxFQUFKLENBQW1CLEVBQW5CLEVBRHlCO0FBR3hDLE9BQU8sTUFBUCxDQUh3QztBQUFBO0NEeHJCNUM7QUN3ckJzQyxvQkR4ckJ0QyJ9" +`; + +exports[`serialize a bound function 1`] = ` +"var v0; +const v2 = {}; +v2.prop = "hello"; +const v3 = []; +var v4; +v4 = function foo(){ +return this.prop; +} +; +v4.prototype = v4.prototype; +const v5 = v4.bind(v2,v3); +var v1 = v5; +v0 = () => { +return v1(); +} +; +exports.handler = v0 + +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LmpzIiwidGVzdC9zZXJpYWxpemUtY2xvc3VyZS50ZXN0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7S0NrdEJlLGNBQXFDO0FBQ2hELE9BQU8sS0FBSyxJQUFaLENBRGdEO0FBQUE7Q0RsdEJwRDtBQUFBO0FBQUE7QUFBQTtLQzB0QnNDLE1BQU07QUFDeEMsT0FBTyxJQUFQLENBRHdDO0FBQUE7Q0QxdEI1QztBQzB0QnNDLG9CRDF0QnRDIn0=" +`; + +exports[`serialize a class declaration 1`] = ` +"var v0; +var v2; +var v3 = 0; +v2 = class Foo{ +method(){ +v3++; +return v3; +} + +}; +var v1 = v2; +v0 = () => { +const foo=new v1() +foo.method(); +foo.method(); +return v3; +} +; +exports.handler = v0 + +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LmpzIiwidGVzdC9zZXJpYWxpemUtY2xvc3VyZS50ZXN0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7QUFBQTtLQ3NIRSxNQUFNLEdBQU47QUFDUyxNQUFQLEVBQWdCO0FBQ2QsS0FEYztBQUVkLE9BQU8sRUFBUCxDQUZjO0FBQUE7QUFEbEI7QUFBQSxDLENEdEhGO0FBQUE7S0M2SHNDLE1BQU07QUFDeEMsTUFBTSxJQUFNLElBQUksRUFBSixFQUQ0QjtBQUd4QyxJQUFJLE1BQUosR0FId0M7QUFJeEMsSUFBSSxNQUFKLEdBSndDO0FBS3hDLE9BQU8sRUFBUCxDQUx3QztBQUFBO0NEN0g1QztBQzZIc0Msb0JEN0h0QyJ9" +`; + +exports[`serialize a class declaration with constructor 1`] = ` +"var v0; +var v2; +var v3 = 0; +v2 = class Foo{ +constructor(){ +v3 += 1; +} + +method(){ +v3++; +return v3; +} + +}; +var v1 = v2; +v0 = () => { +const foo=new v1() +foo.method(); +foo.method(); +return v3; +} +; +exports.handler = v0 + +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LmpzIiwidGVzdC9zZXJpYWxpemUtY2xvc3VyZS50ZXN0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7QUFBQTtLQzBJRSxNQUFNLEdBQU47QUFDRSxhQUFjO0FBQ1osTUFBSyxDQUFMLENBRFk7QUFBQTtBQURoQjtBQUtTLE1BQVAsRUFBZ0I7QUFDZCxLQURjO0FBRWQsT0FBTyxFQUFQLENBRmM7QUFBQTtBQUxsQjtBQUFBLEMsQ0QxSUY7QUFBQTtLQ3FKc0MsTUFBTTtBQUN4QyxNQUFNLElBQU0sSUFBSSxFQUFKLEVBRDRCO0FBR3hDLElBQUksTUFBSixHQUh3QztBQUl4QyxJQUFJLE1BQUosR0FKd0M7QUFLeEMsT0FBTyxFQUFQLENBTHdDO0FBQUE7Q0RySjVDO0FDcUpzQyxvQkRySnRDIn0=" +`; + +exports[`serialize a class hierarchy 1`] = ` +"var v0; +var v2; +var v4; +var v5 = 0; +v4 = class Foo{ +method(){ +return (v5 += 1); +} + +}; +var v3 = v4; +v2 = class Bar extends v3{ +method(){ +return super.method() + 1; +} + +}; +var v1 = v2; +v0 = () => { +const bar=new v1() +return [bar.method(),v5,]; +} +; +exports.handler = v0 + +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LmpzIiwidGVzdC9zZXJpYWxpemUtY2xvc3VyZS50ZXN0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7QUFBQTtBQUFBO0tDOFhFLE1BQU0sR0FBTjtBQUNTLE1BQVAsRUFBZ0I7QUFDZCxPQUFPLENBQUMsTUFBSyxDQUFOLENBQVAsQ0FEYztBQUFBO0FBRGxCO0FBQUEsQyxDRDlYRjtBQUFBO0tDb1lFLE1BQU0sR0FBTixTQUFrQixFQUFsQjtBQUNTLE1BQVAsRUFBZ0I7QUFDZCxPQUFPLE1BQU0sTUFBTixLQUFpQixDQUF4QixDQURjO0FBQUE7QUFEbEI7QUFBQSxDLENEcFlGO0FBQUE7S0MwWXNDLE1BQU07QUFDeEMsTUFBTSxJQUFNLElBQUksRUFBSixFQUQ0QjtBQUd4QyxPQUFPLENBQUMsSUFBSSxNQUFKLEVBQUQsQ0FBZSxFQUFmLEVBQVAsQ0FId0M7QUFBQTtDRDFZNUM7QUMwWXNDLG9CRDFZdEMifQ==" +`; + +exports[`serialize a class method calling super 1`] = ` +"var v0; +var v2; +var v4; +v4 = class Foo{ +constructor(value,){ +this.value = value; +} + +method(){ +return \`hello \${this.value}\`; +} + +}; +var v3 = v4; +v2 = class Bar extends v3{ +method(){ +return \`\${super.method()}!\`; +} + +}; +const v5 = Object.create(v2.prototype); +v5.value = "world"; +var v1 = v5; +v0 = () => { +return v1.method(); +} +; +exports.handler = v0 + +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LmpzIiwidGVzdC9zZXJpYWxpemUtY2xvc3VyZS50ZXN0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7QUFBQTtLQ294QkUsTUFBTSxHQUFOO0FBQ0UsWUFBcUIsS0FBckIsRUFBb0M7QUFyeEJ4QyxVQXF4QnlCLFFBcnhCekIsQ0FxeEJ3QztBQUFBO0FBRHRDO0FBRVMsTUFBUCxFQUFnQjtBQUNkLE9BQU8sT0FBUyxPQUFLLEtBQUwsQ0FBVCxDQUFQLENBRGM7QUFBQTtBQUZsQjtBQUFBLEMsQ0RweEJGO0FBQUE7S0MweEJFLE1BQU0sR0FBTixTQUFrQixFQUFsQjtBQUNTLE1BQVAsRUFBZ0I7QUFDZCxPQUFPLENBQUcsUUFBTSxNQUFOLEdBQWUsQ0FBbEIsQ0FBUCxDQURjO0FBQUE7QUFEbEI7QUFBQSxDLENEMXhCRjtBQUFBO0FBQUE7QUFBQTtLQ2l5QnNDLE1BQU07QUFBQSxVQUFJLE1BQUo7QUFBQTtDRGp5QjVDO0FDaXlCc0Msb0JEanlCdEMifQ==" +`; + +exports[`serialize a class mix-in 1`] = ` +"var v0; +var v2; +var v4; +var v5 = 0; +v4 = () => { +return class Foo{ +method(){ +return (v5 += 1); +} + +}; +} +; +var v3 = v4; +v2 = class Bar extends v3(){ +method(){ +return super.method() + 1; +} + +}; +var v1 = v2; +v0 = () => { +const bar=new v1() +return [bar.method(),v5,]; +} +; +exports.handler = v0 + +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LmpzIiwidGVzdC9zZXJpYWxpemUtY2xvc3VyZS50ZXN0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7QUFBQTtBQUFBO0tDcVpnQixNQUNaO0FBQUEsYUFBTSxHQUFOO0FBQ1MsTUFBUCxFQUFnQjtBQUNkLE9BQU8sQ0FBQyxNQUFLLENBQU4sQ0FBUCxDQURjO0FBQUE7QUFEbEI7QUFBQTtBQUFBO0NEdFpKO0FBQUE7S0M0WkUsTUFBTSxHQUFOLFNBQWtCLElBQWxCO0FBQ1MsTUFBUCxFQUFnQjtBQUNkLE9BQU8sTUFBTSxNQUFOLEtBQWlCLENBQXhCLENBRGM7QUFBQTtBQURsQjtBQUFBLEMsQ0Q1WkY7QUFBQTtLQ2thc0MsTUFBTTtBQUN4QyxNQUFNLElBQU0sSUFBSSxFQUFKLEVBRDRCO0FBR3hDLE9BQU8sQ0FBQyxJQUFJLE1BQUosRUFBRCxDQUFlLEVBQWYsRUFBUCxDQUh3QztBQUFBO0NEbGE1QztBQ2thc0Msb0JEbGF0QyJ9" +`; + +exports[`serialize a class value 1`] = ` +"var v0; +var v2; +v2 = class Foo{ +constructor(value,){ +this.value = value; +} + +method(){ +return \`hello \${this.value}\`; +} + +}; +const v3 = Object.create(v2.prototype); +v3.value = "world"; +var v1 = v3; +v0 = () => { +return v1.method(); +} +; +exports.handler = v0 + +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LmpzIiwidGVzdC9zZXJpYWxpemUtY2xvc3VyZS50ZXN0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7S0Nzd0JFLE1BQU0sR0FBTjtBQUNFLFlBQXFCLEtBQXJCLEVBQW9DO0FBdndCeEMsVUF1d0J5QixRQXZ3QnpCLENBdXdCd0M7QUFBQTtBQUR0QztBQUVTLE1BQVAsRUFBZ0I7QUFDZCxPQUFPLE9BQVMsT0FBSyxLQUFMLENBQVQsQ0FBUCxDQURjO0FBQUE7QUFGbEI7QUFBQSxDLENEdHdCRjtBQUFBO0FBQUE7QUFBQTtLQzh3QnNDLE1BQU07QUFBQSxVQUFJLE1BQUo7QUFBQTtDRDl3QjVDO0FDOHdCc0Msb0JEOXdCdEMifQ==" +`; + +exports[`serialize a monkey-patched class getter 1`] = ` +"var v0; +var v2; +var v3 = 0; +v2 = class Foo{ +get method(){ +return (v3 += 1); +} + +}; +const v4 = function get(){ +return (v3 += 2); +} + +Object.defineProperty(v2.prototype,"method",{get : v4,}); +var v1 = v2; +v0 = () => { +const foo=new v1() +foo.method; +foo.method; +return v3; +} +; +exports.handler = v0 + +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LmpzIiwidGVzdC9zZXJpYWxpemUtY2xvc3VyZS50ZXN0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7QUFBQTtLQ2dSRSxNQUFNLEdBQU47QUFDRSxJQUFXLE1BQVgsRUFBb0I7QUFDbEIsT0FBTyxDQUFDLE1BQUssQ0FBTixDQUFQLENBRGtCO0FBQUE7QUFEdEI7QUFBQSxDLENEaFJGO0FDdVJJLHlCQUFNO0FBQ0osT0FBTyxDQUFDLE1BQUssQ0FBTixDQUFQLENBREk7QUFBQTtBRHZSVjtBQUFBO0FBQUE7S0M0UnNDLE1BQU07QUFDeEMsTUFBTSxJQUFNLElBQUksRUFBSixFQUQ0QjtBQUd4QyxJQUFJLE1BQUosQ0FId0M7QUFJeEMsSUFBSSxNQUFKLENBSndDO0FBS3hDLE9BQU8sRUFBUCxDQUx3QztBQUFBO0NENVI1QztBQzRSc0Msb0JENVJ0QyJ9" +`; + +exports[`serialize a monkey-patched class getter and setter 1`] = ` +"var v0; +var v2; +var v3 = 0; +v2 = class Foo{ +set method(val){ +v3 += val; +} + +get method(){ +return v3; +} + +}; +const v4 = function get(){ +return v3 + 1; +} + +const v5 = function set(val){ +v3 += val + 1; +} + +Object.defineProperty(v2.prototype,"method",{get : v4,set : v5,}); +var v1 = v2; +v0 = () => { +const foo=new v1() +foo.method = 1; +foo.method = 1; +return foo.method; +} +; +exports.handler = v0 + +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LmpzIiwidGVzdC9zZXJpYWxpemUtY2xvc3VyZS50ZXN0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7QUFBQTtLQ2tVRSxNQUFNLEdBQU47QUFDRSxJQUFXLE1BQVgsQ0FBa0IsR0FBbEIsQ0FBK0I7QUFDN0IsTUFBSyxHQUFMLENBRDZCO0FBQUE7QUFEakM7QUFJRSxJQUFXLE1BQVgsRUFBb0I7QUFDbEIsT0FBTyxFQUFQLENBRGtCO0FBQUE7QUFKdEI7QUFBQSxDLENEbFVGO0FDK1VJLHlCQUFNO0FBQ0osT0FBTyxLQUFJLENBQVgsQ0FESTtBQUFBO0FEL1VWO0FDNFVJLHdCQUFJLEdBQUosQ0FBaUI7QUFDZixNQUFLLE1BQU0sQ0FBWCxDQURlO0FBQUE7QUQ1VXJCO0FBQUE7QUFBQTtLQ29Wc0MsTUFBTTtBQUN4QyxNQUFNLElBQU0sSUFBSSxFQUFKLEVBRDRCO0FBR3hDLElBQUksTUFBSixHQUFhLENBQWIsQ0FId0M7QUFJeEMsSUFBSSxNQUFKLEdBQWEsQ0FBYixDQUp3QztBQUt4QyxPQUFPLElBQUksTUFBWCxDQUx3QztBQUFBO0NEcFY1QztBQ29Wc0Msb0JEcFZ0QyJ9" +`; + +exports[`serialize a monkey-patched class getter while setter remains unchanged 1`] = ` +"var v0; +var v2; +var v3 = 0; +v2 = class Foo{ +set method(val){ +v3 += val; +} + +get method(){ +return v3; +} + +}; +const v4 = function get(){ +return v3 + 1; +} + +Object.defineProperty(v2.prototype,"method",{get : v4,set : Object.getOwnPropertyDescriptor(v2.prototype,"method").set,}); +var v1 = v2; +v0 = () => { +const foo=new v1() +foo.method = 1; +foo.method = 1; +return foo.method; +} +; +exports.handler = v0 + +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LmpzIiwidGVzdC9zZXJpYWxpemUtY2xvc3VyZS50ZXN0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7QUFBQTtLQ2lXRSxNQUFNLEdBQU47QUFDRSxJQUFXLE1BQVgsQ0FBa0IsR0FBbEIsQ0FBK0I7QUFDN0IsTUFBSyxHQUFMLENBRDZCO0FBQUE7QUFEakM7QUFJRSxJQUFXLE1BQVgsRUFBb0I7QUFDbEIsT0FBTyxFQUFQLENBRGtCO0FBQUE7QUFKdEI7QUFBQSxDLENEaldGO0FDNFdJLHlCQUFNO0FBQ0osT0FBTyxLQUFJLENBQVgsQ0FESTtBQUFBO0FENVdWO0FBQUE7QUFBQTtLQ2lYc0MsTUFBTTtBQUN4QyxNQUFNLElBQU0sSUFBSSxFQUFKLEVBRDRCO0FBR3hDLElBQUksTUFBSixHQUFhLENBQWIsQ0FId0M7QUFJeEMsSUFBSSxNQUFKLEdBQWEsQ0FBYixDQUp3QztBQUt4QyxPQUFPLElBQUksTUFBWCxDQUx3QztBQUFBO0NEalg1QztBQ2lYc0Msb0JEalh0QyJ9" +`; + +exports[`serialize a monkey-patched class method 1`] = ` +"var v0; +var v2; +var v3 = 0; +v2 = class Foo{ +method(){ +v3 += 1; +} + +}; +var v4; +v4 = function (){ +v3 += 2; +} +; +v4.prototype = v4.prototype; +v2.prototype.method = v4; +var v1 = v2; +v0 = () => { +const foo=new v1() +foo.method(); +foo.method(); +return v3; +} +; +exports.handler = v0 + +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LmpzIiwidGVzdC9zZXJpYWxpemUtY2xvc3VyZS50ZXN0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7QUFBQTtLQzBORSxNQUFNLEdBQU47QUFDUyxNQUFQLEVBQWdCO0FBQ2QsTUFBSyxDQUFMLENBRGM7QUFBQTtBQURsQjtBQUFBLEMsQ0QxTkY7QUFBQTtLQ2dPeUIsV0FBWTtBQUNqQyxNQUFLLENBQUwsQ0FEaUM7QUFBQTtDRGhPckM7QUFBQTtBQUFBO0FBQUE7S0NvT3NDLE1BQU07QUFDeEMsTUFBTSxJQUFNLElBQUksRUFBSixFQUQ0QjtBQUd4QyxJQUFJLE1BQUosR0FId0M7QUFJeEMsSUFBSSxNQUFKLEdBSndDO0FBS3hDLE9BQU8sRUFBUCxDQUx3QztBQUFBO0NEcE81QztBQ29Pc0Msb0JEcE90QyJ9" +`; + +exports[`serialize a monkey-patched class method that has been re-set 1`] = ` +"var v0; +var v2; +var v3 = 0; +v2 = class Foo{ +method(){ +v3 += 1; +} + +}; +var v4; +v4 = function (){ +v3 += 2; +} +; +v4.prototype = v4.prototype; +v2.prototype.method = v4; +var v1 = v2; +const v6 = function method(){ +v3 += 1; +} + +var v5 = v6; +v0 = () => { +const foo=new v1() +foo.method(); +v1.prototype.method = v5; +foo.method(); +return v3; +} +; +exports.handler = v0 + +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LmpzIiwidGVzdC9zZXJpYWxpemUtY2xvc3VyZS50ZXN0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7QUFBQTtLQ2lQRSxNQUFNLEdBQU47QUFDUyxNQUFQLEVBQWdCO0FBQ2QsTUFBSyxDQUFMLENBRGM7QUFBQTtBQURsQjtBQUFBLEMsQ0RqUEY7QUFBQTtLQ3lQeUIsV0FBWTtBQUNqQyxNQUFLLENBQUwsQ0FEaUM7QUFBQTtDRHpQckM7QUFBQTtBQUFBO0FBQUE7QUNrUEksb0JBQU8sTUFBUCxFQUFnQjtBQUNkLE1BQUssQ0FBTCxDQURjO0FBQUE7QURsUHBCO0FBQUE7S0M2UGtCLE1BQU07QUFDcEIsTUFBTSxJQUFNLElBQUksRUFBSixFQURRO0FBR3BCLElBQUksTUFBSixHQUhvQjtBQUtwQixHQUFJLFNBQUosQ0FBYyxNQUFkLEdBQXVCLEVBQXZCLENBTG9CO0FBT3BCLElBQUksTUFBSixHQVBvQjtBQVFwQixPQUFPLEVBQVAsQ0FSb0I7QUFBQTtDRDdQeEI7QUM2UGtCLG9CRDdQbEIifQ==" +`; + +exports[`serialize a monkey-patched class setter 1`] = ` +"var v0; +var v2; +var v3 = 0; +v2 = class Foo{ +set method(val){ +v3 += val; +} + +}; +const v4 = function set(val){ +v3 += val + 1; +} + +Object.defineProperty(v2.prototype,"method",{set : v4,}); +var v1 = v2; +v0 = () => { +const foo=new v1() +foo.method = 1; +foo.method = 1; +return v3; +} +; +exports.handler = v0 + +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LmpzIiwidGVzdC9zZXJpYWxpemUtY2xvc3VyZS50ZXN0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7QUFBQTtLQ3lTRSxNQUFNLEdBQU47QUFDRSxJQUFXLE1BQVgsQ0FBa0IsR0FBbEIsQ0FBK0I7QUFDN0IsTUFBSyxHQUFMLENBRDZCO0FBQUE7QUFEakM7QUFBQSxDLENEelNGO0FDZ1RJLHdCQUFJLEdBQUosQ0FBaUI7QUFDZixNQUFLLE1BQU0sQ0FBWCxDQURlO0FBQUE7QURoVHJCO0FBQUE7QUFBQTtLQ3FUc0MsTUFBTTtBQUN4QyxNQUFNLElBQU0sSUFBSSxFQUFKLEVBRDRCO0FBR3hDLElBQUksTUFBSixHQUFhLENBQWIsQ0FId0M7QUFJeEMsSUFBSSxNQUFKLEdBQWEsQ0FBYixDQUp3QztBQUt4QyxPQUFPLEVBQVAsQ0FMd0M7QUFBQTtDRHJUNUM7QUNxVHNDLG9CRHJUdEMifQ==" +`; + +exports[`serialize a monkey-patched static class arrow function 1`] = ` +"var v0; +var v2; +var v3 = 0; +v2 = class Foo{ +static method = () => { +v3 += 1; +} + +}; +var v4; +v4 = function (){ +v3 += 2; +} +; +v4.prototype = v4.prototype; +v2.method = v4; +var v1 = v2; +v0 = () => { +v1.method(); +v1.method(); +return v3; +} +; +exports.handler = v0 + +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LmpzIiwidGVzdC9zZXJpYWxpemUtY2xvc3VyZS50ZXN0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7QUFBQTtLQ3VMRSxNQUFNLEdBQU47QUFDRSxPQUFjLE1BQWQsR0FBdUIsTUFBTTtBQUMzQixNQUFLLENBQUwsQ0FEMkI7QUFBQTtBQUQvQjtBQUFBLEMsQ0R2TEY7QUFBQTtLQzZMZSxXQUFZO0FBQ3ZCLE1BQUssQ0FBTCxDQUR1QjtBQUFBO0NEN0wzQjtBQUFBO0FBQUE7QUFBQTtLQ2lNc0MsTUFBTTtBQUN4QyxHQUFJLE1BQUosR0FEd0M7QUFFeEMsR0FBSSxNQUFKLEdBRndDO0FBR3hDLE9BQU8sRUFBUCxDQUh3QztBQUFBO0NEak01QztBQ2lNc0Msb0JEak10QyJ9" +`; + +exports[`serialize a monkey-patched static class method 1`] = ` +"var v0; +var v2; +var v3 = 0; +v2 = class Foo{ +method(){ +v3 += 1; +} + +}; +var v4; +v4 = function (){ +v3 += 2; +} +; +v4.prototype = v4.prototype; +v2.method = v4; +var v1 = v2; +v0 = () => { +v1.method(); +v1.method(); +return v3; +} +; +exports.handler = v0 + +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LmpzIiwidGVzdC9zZXJpYWxpemUtY2xvc3VyZS50ZXN0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7QUFBQTtLQ2tLRSxNQUFNLEdBQU47QUFDZ0IsTUFBZCxFQUF1QjtBQUNyQixNQUFLLENBQUwsQ0FEcUI7QUFBQTtBQUR6QjtBQUFBLEMsQ0RsS0Y7QUFBQTtLQ3dLZSxXQUFZO0FBQ3ZCLE1BQUssQ0FBTCxDQUR1QjtBQUFBO0NEeEszQjtBQUFBO0FBQUE7QUFBQTtLQzRLc0MsTUFBTTtBQUN4QyxHQUFJLE1BQUosR0FEd0M7QUFFeEMsR0FBSSxNQUFKLEdBRndDO0FBR3hDLE9BQU8sRUFBUCxDQUh3QztBQUFBO0NENUs1QztBQzRLc0Msb0JENUt0QyJ9" +`; + +exports[`serialize a monkey-patched static class property 1`] = ` +"var v0; +var v2; +v2 = class Foo{ +static prop = 1 +}; +v2.prop = 2; +var v1 = v2; +v0 = () => { +return v1.prop; +} +; +exports.handler = v0 + +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LmpzIiwidGVzdC9zZXJpYWxpemUtY2xvc3VyZS50ZXN0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7S0MyTUUsTUFBTSxHQUFOO0FBQ0UsT0FBYyxJQUFkLEdBQXFCLENBRHZCO0FBQUEsQyxDRDNNRjtBQUFBO0FBQUE7S0NpTnNDLE1BQU07QUFDeEMsT0FBTyxHQUFJLElBQVgsQ0FEd0M7QUFBQTtDRGpONUM7QUNpTnNDLG9CRGpOdEMifQ==" +`; + +exports[`serialize a proxy 1`] = ` +"var v0; +const v2 = {}; +v2.value = "hello"; +const v3 = {}; +var v4; +v4 = (self,name) => { +return \`\${self[name]} world\`; +} +; +v3.get = v4; +const v5 = new Proxy(v2,v3,); +var v1 = v5; +v0 = () => { +return v1.value; +} +; +exports.handler = v0 + +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LmpzIiwidGVzdC9zZXJpYWxpemUtY2xvc3VyZS50ZXN0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7S0N1dUJXLENBQUMsSUFBRCxDQUFPLElBQVAsS0FBZ0I7QUFDbkIsT0FBTyxDQUFHLE9BQUssSUFBTCxFQUFnQyxNQUFuQyxDQUFQLENBRG1CO0FBQUE7Q0R2dUIzQjtBQUFBO0FBQUE7QUFBQTtLQzZ1QnNDLE1BQU07QUFDeEMsT0FBTyxHQUFNLEtBQWIsQ0FEd0M7QUFBQTtDRDd1QjVDO0FDNnVCc0Msb0JEN3VCdEMifQ==" +`; + +exports[`serialize a this reference in an object literal 1`] = ` +"var v0; +const v2 = {}; +v2.prop = "prop"; +const v3 = function get(){ +return this.prop; +} + +v2.get = v3; +var v1 = v2; +v0 = () => { +return v1.get(); +} +; +exports.handler = v0 + +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LmpzIiwidGVzdC9zZXJpYWxpemUtY2xvc3VyZS50ZXN0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7QUFBQTtBQ3l5QkkseUJBQU07QUFDSixPQUFPLEtBQUssSUFBWixDQURJO0FBQUE7QUR6eUJWO0FBQUE7QUFBQTtLQzh5QnNDLE1BQU07QUFBQSxVQUFJLEdBQUo7QUFBQTtDRDl5QjVDO0FDOHlCc0Msb0JEOXlCdEMifQ==" +`; + +exports[`serialize an imported module 1`] = ` +"var v0; +v0 = function isNode(a){ +return typeof a?.kind === "number"; +} +; +v0.prototype = v0.prototype; +exports.handler = v0 + +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LmpzIiwic3JjL2d1YXJkcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtLQ01PLGdCQUFnQixDQUFoQixDQUErQztBQUNwRCxPQUFPLE9BQU8sR0FBRyxJQUFWLEtBQW1CLFFBQTFCLENBRG9EO0FBQUE7Q0ROdEQ7QUFBQTtBQ01PLG9CRE5QIn0=" +`; + +exports[`should serialize NativePreWarmContext 1`] = ` +"var v0; +var v2; +v2 = class NativePreWarmContext{ +constructor(props,){ +this.props = props; +this.cache = {}; +} + +get(key){ +return this.cache[key]; +} + +getOrInit(client){ +if (!this.cache[client.key]){ +this.cache[client.key] = client.init(client.key,this.props); +} + +return this.cache[client.key]; +} + +}; +const v3 = Object.create(v2.prototype); +v3.props = undefined; +const v4 = {}; +v3.cache = v4; +var v1 = v3; +v0 = () => { +return v1.getOrInit({key:"key",init:() => { +return "value"; +} +}); +} +; +exports.handler = v0 + +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LmpzIiwic3JjL2Z1bmN0aW9uLXByZXdhcm0udHMiLCJ0ZXN0L3NlcmlhbGl6ZS1jbG9zdXJlLnRlc3QudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7QUFBQTtLQ2tITyxNQUFNLG9CQUFOO0FBR0wsWUFBb0IsS0FBcEIsRUFBMEM7QUFySDVDLFVBcUhzQixRQXJIdEIsQ0FxSDRDO0FBQ3hDLEtBQUssS0FBTCxHQUFhLEVBQWIsQ0FEd0M7QUFBQTtBQUhyQztBQU9FLEdBQVAsQ0FBYyxHQUFkLENBQXVEO0FBQ3JELE9BQU8sS0FBSyxLQUFMLENBQVcsR0FBWCxDQUFQLENBRHFEO0FBQUE7QUFQbEQ7QUFXRSxTQUFQLENBQW9CLE1BQXBCLENBQWlFO0FBQy9ELElBQUksQ0FBQyxLQUFLLEtBQUwsQ0FBVyxPQUFPLEdBQWxCLENBQUwsQ0FBNkI7QUFDM0IsS0FBSyxLQUFMLENBQVcsT0FBTyxHQUFsQixJQUF5QixPQUFPLElBQVAsQ0FBWSxPQUFPLEdBQW5CLENBQXdCLEtBQUssS0FBN0IsQ0FBekIsQ0FEMkI7QUFBQTtBQURrQztBQUkvRCxPQUFPLEtBQUssS0FBTCxDQUFXLE9BQU8sR0FBbEIsQ0FBUCxDQUorRDtBQUFBO0FBWDVEO0FBQUEsQyxDRGxIUDtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7S0V5dkNzQyxNQUFNO0FBQ3hDLE9BQU8sR0FBUSxTQUFSLENBQWtCLENBQ3ZCLElBQUssS0FEa0IsQ0FFdkIsS0FBTSxNQUFNO0FBQUE7QUFBQTtBQUZXLENBQWxCLENBQVAsQ0FEd0M7QUFBQTtDRnp2QzVDO0FFeXZDc0Msb0JGenZDdEMifQ==" +`; + +exports[`thrown errors map back to source 1`] = ` +"var v0; +const v2 = Error; +var v1 = v2; +v0 = () => { +throw new v1("oops",); +} +; +exports.handler = v0 + +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LmpzIiwidGVzdC9zZXJpYWxpemUtY2xvc3VyZS50ZXN0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7QUFBQTtLQ3F2QnNDLE1BQU07QUFDeEMsTUFBTSxJQUFJLEVBQUosQ0FBVSxNQUFWLEVBQU4sQ0FEd0M7QUFBQTtDRHJ2QjVDO0FDcXZCc0Msb0JEcnZCdEMifQ==" +`; diff --git a/test/isolated.test.ts b/test/isolated.test.ts deleted file mode 100644 index 6f93464e..00000000 --- a/test/isolated.test.ts +++ /dev/null @@ -1,23 +0,0 @@ -import "jest"; -import { aws_events, Duration, Stack } from "aws-cdk-lib"; -import { Function } from "../src"; - -test("should not create new resources in lambda", async () => { - await expect(async () => { - const stack = new Stack(); - new Function( - stack, - "function", - { - timeout: Duration.seconds(20), - }, - async () => { - const bus = new aws_events.EventBus(stack, "busbus"); - return bus.eventBusArn; - } - ); - await Promise.all(Function.promises); - }).rejects.toThrow( - `Cannot initialize new CDK resources in a runtime function.` - ); -}); diff --git a/test/queue.localstack.test.ts b/test/queue.localstack.test.ts index 52cb3eb9..4f2a8308 100644 --- a/test/queue.localstack.test.ts +++ b/test/queue.localstack.test.ts @@ -116,6 +116,9 @@ runtimeTestSuite<{ const test = _testQ(_test) as TestQueueResource; + // eslint-disable-next-line no-only-tests/no-only-tests + test.only = _testQ(_test.only); + test.skip = (name, _func, _t) => _test.skip( name, diff --git a/test/serialize-closure.test.ts b/test/serialize-closure.test.ts new file mode 100644 index 00000000..b68fd5b0 --- /dev/null +++ b/test/serialize-closure.test.ts @@ -0,0 +1,1307 @@ +/* eslint-disable @typescript-eslint/no-require-imports */ +import "jest"; +import fs from "fs"; +import path from "path"; +import { DynamoDBClient } from "@aws-sdk/client-dynamodb"; +import { App, aws_dynamodb, Stack } from "aws-cdk-lib"; +import AWS from "aws-sdk"; +import { v4 } from "uuid"; +import { $AWS, AnyFunction, Table, Function } from "../src"; + +import { NativePreWarmContext } from "../src/function-prewarm"; +import { isNode } from "../src/guards"; +import { + serializeClosure, + SerializeClosureProps, + serializeCodeWithSourceMap, +} from "../src/serialize-closure/serialize"; + +// set to false to inspect generated js files in .test/ +const cleanup = true; + +const tmpDir = path.join(__dirname, ".test"); +beforeAll(async () => { + let exists = true; + try { + await fs.promises.access(tmpDir); + } catch { + exists = false; + } + if (exists) { + await rmrf(tmpDir); + } + await fs.promises.mkdir(tmpDir); +}); + +afterAll(async () => { + if (cleanup) { + await rmrf(tmpDir); + } +}); +async function rmrf(file: string) { + const stat = await fs.promises.stat(file); + if (stat.isDirectory()) { + await Promise.all( + (await fs.promises.readdir(file)).map((f) => rmrf(path.join(file, f))) + ); + await fs.promises.rmdir(file); + } else { + await fs.promises.rm(file); + } +} + +async function expectClosure( + f: F, + options?: SerializeClosureProps +): Promise { + const closure = serializeCodeWithSourceMap(serializeClosure(f, options)); + expect(closure).toMatchSnapshot(); + const jsFile = path.join(tmpDir, `${v4()}.js`); + await fs.promises.writeFile(jsFile, closure); + // eslint-disable-next-line @typescript-eslint/no-require-imports + return require(jsFile).handler as F; +} + +test("all observers of a free variable share the same reference", async () => { + let i = 0; + + function up() { + i += 2; + } + + function down() { + i -= 1; + } + + const closure = await expectClosure(() => { + up(); + down(); + return i; + }); + + expect(closure()).toEqual(1); +}); + +test("all observers of a free variable share the same reference even when two instances", async () => { + const closures = [0, 0].map(() => { + let i = 0; + + function up() { + i += 2; + } + + function down() { + i -= 1; + } + + return () => { + up(); + down(); + return i; + }; + }); + + const closure = await expectClosure(() => { + return closures.map((closure) => closure()); + }); + + expect(closure()).toEqual([1, 1]); +}); + +test("serialize an imported module", async () => { + const closure = await expectClosure(isNode); + + expect(closure({ kind: 1 })).toEqual(true); +}); + +test("serialize a class declaration", async () => { + let i = 0; + class Foo { + public method() { + i++; + return i; + } + } + + const closure = await expectClosure(() => { + const foo = new Foo(); + + foo.method(); + foo.method(); + return i; + }); + + expect(closure()).toEqual(2); +}); + +test("serialize a class declaration with constructor", async () => { + let i = 0; + class Foo { + constructor() { + i += 1; + } + + public method() { + i++; + return i; + } + } + + const closure = await expectClosure(() => { + const foo = new Foo(); + + foo.method(); + foo.method(); + return i; + }); + + expect(closure()).toEqual(3); +}); + +test("serialize a monkey-patched static class method", async () => { + let i = 0; + class Foo { + public static method() { + i += 1; + } + } + + Foo.method = function () { + i += 2; + }; + + const closure = await expectClosure(() => { + Foo.method(); + Foo.method(); + return i; + }); + + expect(closure()).toEqual(4); +}); + +test("serialize a monkey-patched static class arrow function", async () => { + let i = 0; + class Foo { + public static method = () => { + i += 1; + }; + } + + Foo.method = function () { + i += 2; + }; + + const closure = await expectClosure(() => { + Foo.method(); + Foo.method(); + return i; + }); + + expect(closure()).toEqual(4); +}); + +test("serialize a monkey-patched static class property", async () => { + class Foo { + public static prop = 1; + } + + Foo.prop = 2; + + const closure = await expectClosure(() => { + return Foo.prop; + }); + + expect(closure()).toEqual(2); +}); + +test("serialize a monkey-patched class method", async () => { + let i = 0; + class Foo { + public method() { + i += 1; + } + } + + Foo.prototype.method = function () { + i += 2; + }; + + const closure = await expectClosure(() => { + const foo = new Foo(); + + foo.method(); + foo.method(); + return i; + }); + + expect(closure()).toEqual(4); +}); + +test("serialize a monkey-patched class method that has been re-set", async () => { + let i = 0; + class Foo { + public method() { + i += 1; + } + } + + const method = Foo.prototype.method; + + Foo.prototype.method = function () { + i += 2; + }; + + const closure = () => { + const foo = new Foo(); + + foo.method(); + + Foo.prototype.method = method; + + foo.method(); + return i; + }; + + const serialized = await expectClosure(closure); + + expect(closure()).toEqual(3); + expect(serialized()).toEqual(3); +}); + +test("serialize a monkey-patched class getter", async () => { + let i = 0; + class Foo { + public get method() { + return (i += 1); + } + } + + Object.defineProperty(Foo.prototype, "method", { + get() { + return (i += 2); + }, + }); + + const closure = await expectClosure(() => { + const foo = new Foo(); + + foo.method; + foo.method; + return i; + }); + + expect(closure()).toEqual(4); // equals 2 if monkey patch not applied +}); + +test("serialize a monkey-patched class setter", async () => { + let i = 0; + class Foo { + public set method(val: number) { + i += val; + } + } + + Object.defineProperty(Foo.prototype, "method", { + set(val: number) { + i += val + 1; + }, + }); + + const closure = await expectClosure(() => { + const foo = new Foo(); + + foo.method = 1; + foo.method = 1; + return i; + }); + + expect(closure()).toEqual(4); // equals 2 if monkey patch not applied +}); + +test("serialize a monkey-patched class getter and setter", async () => { + let i = 0; + class Foo { + public set method(val: number) { + i += val; + } + public get method() { + return i; + } + } + + Object.defineProperty(Foo.prototype, "method", { + set(val: number) { + i += val + 1; + }, + get() { + return i + 1; + }, + }); + + const closure = await expectClosure(() => { + const foo = new Foo(); + + foo.method = 1; + foo.method = 1; + return foo.method; + }); + + expect(closure()).toEqual(5); // equals 2 if monkey patch not applied +}); + +test("serialize a monkey-patched class getter while setter remains unchanged", async () => { + let i = 0; + class Foo { + public set method(val: number) { + i += val; + } + public get method() { + return i; + } + } + + Object.defineProperty(Foo.prototype, "method", { + set: Object.getOwnPropertyDescriptor(Foo.prototype, "method")?.set!, + get() { + return i + 1; + }, + }); + + const closure = await expectClosure(() => { + const foo = new Foo(); + + foo.method = 1; + foo.method = 1; + return foo.method; + }); + + expect(closure()).toEqual(3); +}); + +test("serialize a class hierarchy", async () => { + let i = 0; + class Foo { + public method() { + return (i += 1); + } + } + + class Bar extends Foo { + public method() { + return super.method() + 1; + } + } + + const closure = await expectClosure(() => { + const bar = new Bar(); + + return [bar.method(), i]; + }); + + expect(closure()).toEqual([2, 1]); +}); + +test("serialize a class mix-in", async () => { + let i = 0; + const mixin = () => + class Foo { + public method() { + return (i += 1); + } + }; + + class Bar extends mixin() { + public method() { + return super.method() + 1; + } + } + + const closure = await expectClosure(() => { + const bar = new Bar(); + + return [bar.method(), i]; + }); + + expect(closure()).toEqual([2, 1]); +}); + +test("avoid name collision with a closure's lexical scope", async () => { + let v0 = 0; + class v1 { + public foo() { + return (v0 += 1); + } + } + class v2 extends v1 {} + + const closure = await expectClosure(() => { + const v3 = new v2(); + return v3.foo(); + }); + + expect(closure()).toEqual(1); +}); + +test("avoid collision with a locally scoped variable", async () => { + const one = 1; + const closure = await expectClosure(() => { + // capture the v0 free variable + let free = one; + // shadow the v0 free variable + const v1 = 2; + return v1 + free; + }); + + expect(closure()).toEqual(3); +}); + +test("avoid collision with a locally scoped object binding variable", async () => { + const one = 1; + const closure = await expectClosure(() => { + // capture the v0 free variable + let free = one; + // shadow the v0 free variable + const { v1 } = { v1: 2 }; + return v1 + free; + }); + + expect(closure()).toEqual(3); +}); + +test("avoid collision with a locally scoped object binding variable with renamed property", async () => { + const one = 1; + const closure = await expectClosure(() => { + // capture the v0 free variable + let free = one; + // shadow the v0 free variable + const { v2: v1 } = { v2: 2 }; + return v1 + free; + }); + + expect(closure()).toEqual(3); +}); + +test("avoid collision with a locally scoped array binding", async () => { + const one = 1; + const closure = await expectClosure(() => { + // capture the v0 free variable + let free = one; + // shadow the v0 free variable + const [v1] = [2]; + return v1 + free; + }); + + expect(closure()).toEqual(3); +}); + +test("avoid collision with a locally scoped array binding with nested object binding", async () => { + const one = 1; + const closure = await expectClosure(() => { + // capture the v0 free variable + let free = one; + // shadow the v0 free variable + const [{ v1 }] = [{ v1: 2 }]; + return v1 + free; + }); + + expect(closure()).toEqual(3); +}); + +test("avoid collision with a locally scoped function", async () => { + const one = 1; + const closure = await expectClosure(() => { + // capture the v0 free variable + let free = one; + // shadow the v0 free variable + function v1() { + return 2; + } + return v1() + free; + }); + + expect(closure()).toEqual(3); +}); + +test("avoid collision with a locally scoped class", async () => { + const one = 1; + const closure = await expectClosure(() => { + // capture the v0 free variable + let free = one; + // shadow the v0 free variable + class v1 { + foo = 2; + } + return new v1().foo + free; + }); + + expect(closure()).toEqual(3); +}); + +test("avoid collision with a parameter declaration", async () => { + const one = 1; + const closure = await expectClosure((v1: number) => { + // capture the v0 free variable + let free = one; + return v1 + free; + }); + + expect(closure(2)).toEqual(3); +}); + +test("avoid collision with a parameter object binding", async () => { + const one = 1; + const closure = await expectClosure(({ v1 }: { v1: number }) => { + // capture the v0 free variable + let free = one; + return v1 + free; + }); + + expect(closure({ v1: 2 })).toEqual(3); +}); + +test("avoid collision with a parameter object binding renamed", async () => { + const one = 1; + const closure = await expectClosure(({ v2: v1 }: { v2: number }) => { + // capture the v0 free variable + let free = one; + return v1 + free; + }); + + expect(closure({ v2: 2 })).toEqual(3); +}); + +test("avoid collision with a parameter array binding", async () => { + const one = 1; + const closure = await expectClosure(([v1]: [number]) => { + // capture the v0 free variable + let free = one; + return v1 + free; + }); + + expect(closure([2])).toEqual(3); +}); + +test("avoid collision with a parameter with object binding nested in array binding", async () => { + const one = 1; + const closure = await expectClosure(([{ v1 }]: [{ v1: number }]) => { + // capture the v0 free variable + let free = one; + return v1 + free; + }); + + expect(closure([{ v1: 2 }])).toEqual(3); +}); + +test("avoid collision with a variable declaration in for-of", async () => { + const one = 1; + const closure = await expectClosure(() => { + let _v: number = 0; + for (const v1 of [2]) { + _v = v1; + } + // capture the v0 free variable + let free = one; + return _v + free; + }); + + expect(closure()).toEqual(3); +}); + +test("avoid collision with a variable declaration object binding in for-of", async () => { + const one = 1; + const closure = await expectClosure(() => { + let _v: number = 0; + for (const { v1 } of [{ v1: 2 }]) { + _v = v1; + } + // capture the v0 free variable + let free = one; + return _v + free; + }); + + expect(closure()).toEqual(3); +}); + +test("avoid collision with a variable declaration object binding in for-of", async () => { + const one = 1; + const closure = await expectClosure(() => { + let _v: number = 0; + for (const { v1 } of [{ v1: 2 }]) { + _v = v1; + } + // capture the v0 free variable + let free = one; + return _v + free; + }); + + expect(closure()).toEqual(3); +}); + +test("avoid collision with a variable declaration array binding in for-of", async () => { + const one = 1; + const closure = await expectClosure(() => { + let _v: number = 0; + for (const [v1] of [[2]]) { + _v = v1!; + } + // capture the v0 free variable + let free = one; + return _v + free; + }); + + expect(closure()).toEqual(3); +}); + +test("avoid collision with a catch variable", async () => { + const one = 1; + const closure = await expectClosure(() => { + let _v: number = 0; + try { + throw 2; + } catch (v1) { + _v = v1 as number; + } + // capture the v0 free variable + let free = one; + return _v + free; + }); + + expect(closure()).toEqual(3); +}); + +test("instantiating the AWS SDK", async () => { + const closure = await expectClosure(() => { + const client = new AWS.DynamoDB(); + + return client; + }); + + expect(closure()).toBeInstanceOf(AWS.DynamoDB); +}); + +test.skip("instantiating the AWS SDK without esbuild", async () => { + const closure = await expectClosure( + () => { + const client = new AWS.DynamoDB(); + return client.config.endpoint; + }, + { + // @ts-ignore + requireModules: false, + } + ); + expect(closure()).toBeInstanceOf(AWS.DynamoDB); +}); + +test("instantiating the AWS SDK v3", async () => { + const closure = await expectClosure(() => { + const client = new DynamoDBClient({}); + + return client; + }); + + expect(closure()).toBeInstanceOf(DynamoDBClient); +}); + +test.skip("instantiating the AWS SDK v3 without esbuild", async () => { + const closure = await expectClosure( + () => { + const client = new DynamoDBClient({}); + + return client.config.serviceId; + }, + { + // @ts-ignore + requireModules: false, + } + ); + + expect(closure()).toEqual("DynamoDB"); +}); + +test("serialize a bound function", async () => { + const func = function foo(this: { prop: string }) { + return this.prop; + }; + + const bound = func.bind({ + prop: "hello", + }); + + const closure = await expectClosure(() => { + return bound(); + }); + + expect(closure()).toEqual("hello"); +}); + +test("serialize a proxy", async () => { + const proxy = new Proxy( + { + value: "hello", + }, + { + get: (self, name) => { + return `${self[name as keyof typeof self]} world`; + }, + } + ); + + const closure = await expectClosure(() => { + return proxy.value; + }); + + expect(closure()).toEqual("hello world"); +}); + +test("thrown errors map back to source", async () => { + const closure = await expectClosure(() => { + throw new Error("oops"); + }); + + let failed = false; + try { + closure(); + } catch (err) { + failed = true; + console.log((err as Error).stack); + } + if (!failed) { + fail("expected a thrown error"); + } +}); + +test("serialize a class value", async () => { + class Foo { + constructor(readonly value: string) {} + public method() { + return `hello ${this.value}`; + } + } + const foo = new Foo("world"); + + const closure = await expectClosure(() => foo.method()); + + expect(closure()).toEqual("hello world"); +}); + +test("serialize a class method calling super", async () => { + class Foo { + constructor(readonly value: string) {} + public method() { + return `hello ${this.value}`; + } + } + class Bar extends Foo { + public method() { + return `${super.method()}!`; + } + } + const foo = new Bar("world"); + + const closure = await expectClosure(() => foo.method()); + + expect(closure()).toEqual("hello world!"); +}); + +test("serialize a this reference in an object literal", async () => { + const obj = { + prop: "prop", + get() { + return this.prop; + }, + }; + + const closure = await expectClosure(() => obj.get()); + + expect(closure()).toEqual("prop"); +}); + +test("broad spectrum syntax test", async () => { + const closure = await expectClosure(async () => { + const arrowExpr = (a: string, ...b: string[]) => [a, ...b]; + const arrowBlockExpr = (a: string, ...b: string[]) => { + return [a, ...b]; + }; + const asyncArrowExpr = async () => { + return "asyncArrowExpr"; + }; + async function asyncFuncDecl() { + return "asyncFuncDecl"; + } + function funcDecl(a: string, ...b: string[]) { + return [a, ...b]; + } + const funcExpr = function funcExpr(a: string, ...b: string[]) { + return [a, ...b]; + }; + const anonFuncExpr = function (a: string, ...b: string[]) { + return [a, ...b]; + }; + const asyncFuncExpr = async function asyncFuncExpr() { + return "asyncFuncExpr"; + }; + const anonAsyncFuncExpr = async function () { + return "anonAsyncFuncExpr"; + }; + + let getterSetterVal: string; + const obj = { + prop: "prop", + getProp() { + return this.prop + " 1"; + }, + get getterSetter(): string { + return getterSetterVal; + }, + set getterSetter(val: string) { + getterSetterVal = val; + }, + }; + + // destructuring + const { + a, + b: c, + d: [e], + f = "f", + } = { + a: "a", + b: "b", + d: ["e"], + }; + + obj.getterSetter = "getterSetter"; + + class Foo { + static VAL = "VAL"; + static { + Foo.VAL = "VAL 1"; + this.VAL = `${this.VAL} 2`; + } + readonly val: string; + constructor(readonly prop: string, val: string) { + this.val = val; + } + public method() { + return `${this.prop} ${this.val} ${Foo.VAL}`; + } + + public async asyncMethod() { + const result = await new Promise((resolve) => + resolve("asyncResult") + ); + return result; + } + + public *generatorMethod(): any { + yield "yielded item"; + yield* generatorFuncDecl(); + yield* generatorFuncExpr(); + yield* anonGeneratorFuncExpr(); + } + } + + function* generatorFuncDecl() { + yield "yielded in function decl"; + } + + const generatorFuncExpr = function* generatorFuncExpr() { + yield "yielded in function expr"; + }; + + const anonGeneratorFuncExpr = function* () { + yield "yielded in anonymous function expr"; + }; + + class Bar extends Foo { + constructor() { + super("bar prop", "bar val"); + } + + public method() { + return `bar ${super.method()}`; + } + } + + const foo = new Foo("foo prop", "foo val"); + const bar = new Bar(); + const generator = foo.generatorMethod(); + + function ifTest(condition: 0 | 1 | 2) { + if (condition === 0) { + return "if"; + } else if (condition === 1) { + return "else if"; + } else { + return "else"; + } + } + + const whileStmts = []; + while (whileStmts.length === 0) { + whileStmts.push("while block"); + } + + while (whileStmts.length === 1) whileStmts.push("while stmt"); + + const doWhileStmts = []; + do { + doWhileStmts.push("do while block"); + } while (doWhileStmts.length === 0); + + do doWhileStmts.push("do while stmt"); + while (doWhileStmts.length === 1); + + const whileTrue = []; + while (true) { + whileTrue.push(`while true ${whileTrue.length}`); + if (whileTrue.length === 1) { + continue; + } + break; + } + + const tryCatchErr = []; + try { + tryCatchErr.push("try"); + throw new Error("catch"); + } catch (err: any) { + tryCatchErr.push(err.message); + } finally { + tryCatchErr.push("finally"); + } + + const tryCatch = []; + try { + tryCatch.push("try 2"); + throw new Error(""); + } catch { + tryCatch.push("catch 2"); + } finally { + tryCatch.push("finally 2"); + } + + const tryNoFinally = []; + try { + tryNoFinally.push("try 3"); + throw new Error(""); + } catch { + tryNoFinally.push("catch 3"); + } + + const tryNoCatch: string[] = []; + try { + (() => { + try { + tryNoCatch.push("try 4"); + throw new Error(""); + } finally { + tryNoCatch.push("finally 4"); + } + })(); + } catch {} + + const deleteObj: any = { + notDeleted: "value", + prop: "prop", + "spaces prop": "spaces prop", + [Symbol.for("prop")]: "symbol prop", + }; + delete deleteObj.prop; + delete deleteObj["spaces prop"]; + delete deleteObj[Symbol.for("prop")]; + + const regex = /a.*/g; + + let unicode; + { + var HECOMḚṮH = 42; + const _ = "___"; + const $ = "$$"; + const ƒ = { + π: Math.PI, + ø: [], + Ø: NaN, + e: 2.7182818284590452353602874713527, + root2: 2.7182818284590452353602874713527, + α: 2.5029, + δ: 4.6692, + ζ: 1.2020569, + φ: 1.61803398874, + γ: 1.30357, + K: 2.685452001, + oo: 9999999999e999 * 9999999999e9999, + A: 1.2824271291, + C10: 0.12345678910111213141516171819202122232425252728293031323334353637, + c: 299792458, + }; + unicode = { ƒ, out: `${HECOMḚṮH}${_}${$}` }; + } + + var homecometh = { H̹̙̦̮͉̩̗̗ͧ̇̏̊̾Eͨ͆͒̆ͮ̃͏̷̮̣̫̤̣Cͯ̂͐͏̨̛͔̦̟͈̻O̜͎͍͙͚̬̝̣̽ͮ͐͗̀ͤ̍̀͢M̴̡̲̭͍͇̼̟̯̦̉̒͠Ḛ̛̙̞̪̗ͥͤͩ̾͑̔͐ͅṮ̴̷̷̗̼͍̿̿̓̽͐H̙̙̔̄͜: 42 }; + + const parens = (2 + 3) * 2; + + function tag(strings: TemplateStringsArray, ...args: number[]) { + // hi is tag function + return `tag ${strings.map((str, i) => `${str} ${args[i]}`).join("|")}`; + } + + const noSubstitutionTemplateLiteral = `hello world`; + + const { head, ...rest } = { head: "head", rest1: "rest1", rest2: "rest2" }; + const [head2, ...rest2] = ["head array", "rest array1", "rest array2"]; + + const binary = true && false; + const fooInstanceOf = foo instanceof Foo; + const condition = binary ? "condition true" : "condition false"; + + let switchDefault; + switch (0 as number) { + case 1: + switchDefault = "switchCase"; + break; + default: + switchDefault = "switchDefault"; + } + + let switchCase; + switch (0 as number) { + case 0: + switchCase = "switchCase"; + break; + default: + switchDefault = "switchDefault"; + } + + let num = 0; + const str = "hello"; + const typeOf = typeof str; + + const array = [1, 2]; + const object = { key: "value" }; + const key = "key"; + const element = object[key]; + const unary = !str; + const postfix = num++; + const prefix = ++num; + const binaryOp = (num += 1); + + // eslint-disable-next-line no-debugger + debugger; + + return [ + ...arrowExpr("a", "b", "c"), + ...arrowBlockExpr("A", "B", "C"), + ...funcDecl("d", "e", "f"), + ...funcExpr("g", "h", "i"), + ...anonFuncExpr("j", "k", "l"), + await asyncArrowExpr(), + await asyncFuncDecl(), + await asyncFuncExpr(), + await anonAsyncFuncExpr(), + obj.prop, + obj.getProp(), + obj.getterSetter, + a, + c, + e, + f, + (() => { + return "foo"; + })(), + (function () { + return "bar"; + })(), + (function baz() { + return "baz"; + })(), + foo.method(), + bar.method(), + await foo.asyncMethod(), + generator.next().value, + generator.next().value, + generator.next().value, + generator.next().value, + ifTest(0), + ifTest(1), + ifTest(2), + ...whileStmts, + ...doWhileStmts, + ...whileTrue, + ...tryCatchErr, + ...tryCatch, + ...tryNoFinally, + ...tryNoCatch, + deleteObj, + regex.test("abc"), + unicode, + homecometh, + parens, + tag`${1} + ${2} + ${3}`, + noSubstitutionTemplateLiteral, + typeof "hello world", + void 0, + rest, + head2, + rest2, + binary, + fooInstanceOf, + condition, + switchDefault, + switchCase, + typeOf, + array, + element, + unary, + postfix, + prefix, + binaryOp, + ]; + }); + + expect(await closure()).toEqual([ + "a", + "b", + "c", + "A", + "B", + "C", + "d", + "e", + "f", + "g", + "h", + "i", + "j", + "k", + "l", + "asyncArrowExpr", + "asyncFuncDecl", + "asyncFuncExpr", + "anonAsyncFuncExpr", + "prop", + "prop 1", + "getterSetter", + "a", + "b", + "e", + "f", + "foo", + "bar", + "baz", + "foo prop foo val VAL 1 2", + "bar bar prop bar val VAL 1 2", + "asyncResult", + "yielded item", + "yielded in function decl", + "yielded in function expr", + "yielded in anonymous function expr", + "if", + "else if", + "else", + "while block", + "while stmt", + "do while block", + "do while stmt", + "while true 0", + "while true 1", + "try", + "catch", + "finally", + "try 2", + "catch 2", + "finally 2", + "try 3", + "catch 3", + "try 4", + "finally 4", + { + notDeleted: "value", + }, + true, + { + out: "42___$$", + ƒ: { + A: 1.2824271291, + C10: 0.12345678910111213, + K: 2.685452001, + c: 299792458, + e: 2.718281828459045, + oo: Infinity, + root2: 2.718281828459045, + Ø: NaN, + ø: [], + α: 2.5029, + γ: 1.30357, + δ: 4.6692, + ζ: 1.2020569, + π: 3.141592653589793, + φ: 1.61803398874, + }, + }, + { H̹̙̦̮͉̩̗̗ͧ̇̏̊̾Eͨ͆͒̆ͮ̃͏̷̮̣̫̤̣Cͯ̂͐͏̨̛͔̦̟͈̻O̜͎͍͙͚̬̝̣̽ͮ͐͗̀ͤ̍̀͢M̴̡̲̭͍͇̼̟̯̦̉̒͠Ḛ̛̙̞̪̗ͥͤͩ̾͑̔͐ͅṮ̴̷̷̗̼͍̿̿̓̽͐H̙̙̔̄͜: 42 }, + 10, + "tag 1| + 2| + 3| undefined", + "hello world", + "string", + void 0, + { + rest1: "rest1", + rest2: "rest2", + }, + "head array", + ["rest array1", "rest array2"], + false, + true, + "condition false", + "switchDefault", + "switchCase", + "string", + [1, 2], + "value", + false, + 0, + 2, + 3, + ]); +}); + +test("should serialize NativePreWarmContext", async () => { + const preWarm = new NativePreWarmContext(); + + const closure = await expectClosure(() => { + return preWarm.getOrInit({ + key: "key", + init: () => "value", + }); + }); + + expect(closure()).toEqual("value"); +}); + +test("should serialize Function", async () => { + const app = new App({ + autoSynth: false, + }); + const stack = new Stack(app, "stack"); + + const table = new Table(stack, "Table", { + partitionKey: { + name: "id", + type: aws_dynamodb.AttributeType.STRING, + }, + }); + + new Function(stack, "foo", async () => { + await $AWS.DynamoDB.GetItem({ + Table: table, + Key: { + id: { + S: "id", + }, + }, + }); + }); +}); diff --git a/test/serialize.test.ts b/test/serialize.test.ts index 7061bfaa..9c035885 100644 --- a/test/serialize.test.ts +++ b/test/serialize.test.ts @@ -14,7 +14,7 @@ import { // 15k arbitrary max bundle size. Some functions may need more. // In that case increase explicitly. -const BUNDLED_MAX_SIZE = 15 * 1024; +const BUNDLED_MAX_SIZE = 50 * 1024; interface CustomMatchers { toHaveLengthLessThan(length: number): R; diff --git a/yarn.lock b/yarn.lock index 24119136..a43e1f0c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -53,9 +53,9 @@ semver "^7.3.7" "@aws-crypto/ie11-detection@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@aws-crypto/ie11-detection/-/ie11-detection-2.0.0.tgz#bb6c2facf8f03457e949dcf0921477397ffa4c6e" - integrity sha512-pkVXf/dq6PITJ0jzYZ69VhL8VFOFoPZLZqtU/12SGnzYuJOOGNfF41q9GxdI1yqC8R13Rq3jOLKDFpUJFT5eTA== + version "2.0.2" + resolved "https://registry.yarnpkg.com/@aws-crypto/ie11-detection/-/ie11-detection-2.0.2.tgz#9c39f4a5558196636031a933ec1b4792de959d6a" + integrity sha512-5XDMQY98gMAf/WRTic5G++jfmS/VLM0rwpiOpaainKi4L0nqWMSB1SzsrEG5rjFZGYN6ZAefO+/Yta2dFM0kMw== dependencies: tslib "^1.11.1" @@ -83,649 +83,649 @@ tslib "^1.11.1" "@aws-crypto/sha256-js@^2.0.0": - version "2.0.1" - resolved "https://registry.yarnpkg.com/@aws-crypto/sha256-js/-/sha256-js-2.0.1.tgz#79e1e6cf61f652ef2089c08d471c722ecf1626a9" - integrity sha512-mbHTBSPBvg6o/mN/c18Z/zifM05eJrapj5ggoOIeHIWckvkv5VgGi7r/wYpt+QAO2ySKXLNvH2d8L7bne4xrMQ== + version "2.0.2" + resolved "https://registry.yarnpkg.com/@aws-crypto/sha256-js/-/sha256-js-2.0.2.tgz#c81e5d378b8a74ff1671b58632779986e50f4c99" + integrity sha512-iXLdKH19qPmIC73fVCrHWCSYjN/sxaAvZ3jNNyw6FclmHyjLKg0f69WlC9KTnyElxCR5MO9SKaG00VwlJwyAkQ== dependencies: - "@aws-crypto/util" "^2.0.1" - "@aws-sdk/types" "^3.1.0" + "@aws-crypto/util" "^2.0.2" + "@aws-sdk/types" "^3.110.0" tslib "^1.11.1" "@aws-crypto/supports-web-crypto@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@aws-crypto/supports-web-crypto/-/supports-web-crypto-2.0.0.tgz#fd6cde30b88f77d5a4f57b2c37c560d918014f9e" - integrity sha512-Ge7WQ3E0OC7FHYprsZV3h0QIcpdyJLvIeg+uTuHqRYm8D6qCFJoiC+edSzSyFiHtZf+NOQDJ1q46qxjtzIY2nA== + version "2.0.2" + resolved "https://registry.yarnpkg.com/@aws-crypto/supports-web-crypto/-/supports-web-crypto-2.0.2.tgz#9f02aafad8789cac9c0ab5faaebb1ab8aa841338" + integrity sha512-6mbSsLHwZ99CTOOswvCRP3C+VCWnzBf+1SnbWxzzJ9lR0mA0JnY2JEAhp8rqmTE0GPFy88rrM27ffgp62oErMQ== dependencies: tslib "^1.11.1" -"@aws-crypto/util@^2.0.0", "@aws-crypto/util@^2.0.1": - version "2.0.1" - resolved "https://registry.yarnpkg.com/@aws-crypto/util/-/util-2.0.1.tgz#976cf619cf85084ca85ec5eb947a6ac6b8b5c98c" - integrity sha512-JJmFFwvbm08lULw4Nm5QOLg8+lAQeC8aCXK5xrtxntYzYXCGfHwUJ4Is3770Q7HmICsXthGQ+ZsDL7C2uH3yBQ== +"@aws-crypto/util@^2.0.0", "@aws-crypto/util@^2.0.2": + version "2.0.2" + resolved "https://registry.yarnpkg.com/@aws-crypto/util/-/util-2.0.2.tgz#adf5ff5dfbc7713082f897f1d01e551ce0edb9c0" + integrity sha512-Lgu5v/0e/BcrZ5m/IWqzPUf3UYFTy/PpeED+uc9SWUR1iZQL8XXbGQg10UfllwwBryO3hFF5dizK+78aoXC1eA== dependencies: - "@aws-sdk/types" "^3.1.0" + "@aws-sdk/types" "^3.110.0" "@aws-sdk/util-utf8-browser" "^3.0.0" tslib "^1.11.1" -"@aws-sdk/abort-controller@3.162.0": - version "3.162.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/abort-controller/-/abort-controller-3.162.0.tgz#c49c08e61e87c1e6bcba8214177228ecf4007535" - integrity sha512-8j1f/g+pNny3HkOojl+6phwd1yQE0FmM6EdssRJPA/IpR+SE0qTva2psKfZA9DivAg+/iTBozVCQU5GUJY1F2A== +"@aws-sdk/abort-controller@3.168.0": + version "3.168.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/abort-controller/-/abort-controller-3.168.0.tgz#f98f08022f9e3ffc38d57686e1d5e2abf7a91b06" + integrity sha512-mvFXmdoIVV3cUmPuwzzHLB1YNjxzm7sHk99zE0zvT653kc7slThLMfO5Kc1WtblXAKbE6eqPDMcA0zg6eRM1cw== dependencies: - "@aws-sdk/types" "3.162.0" + "@aws-sdk/types" "3.168.0" tslib "^2.3.1" -"@aws-sdk/client-dynamodb@^3.50.0": - version "3.163.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/client-dynamodb/-/client-dynamodb-3.163.0.tgz#7b3a4c7e7e5ebdeb813781efe83fca45133ee226" - integrity sha512-NALw3nejI4e8pYucHchYz3RyxREvr58w3FhcmmTp0u9FA4zfRN4D0+tHexdBlMGuKkdY1niSPXXDq+qefxudyA== +"@aws-sdk/client-dynamodb@^3.145.0", "@aws-sdk/client-dynamodb@^3.50.0": + version "3.169.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/client-dynamodb/-/client-dynamodb-3.169.0.tgz#e776d639326ac45eeebb653c70c8476f2f78ba18" + integrity sha512-s+s1PH5HjSydWAgeW7rzOfmbek3U1Y/SIMGUauxujz442Q4H4iWqxxoUR0TYefTP87k/i95yfA8Ezt8XocW3Cg== dependencies: "@aws-crypto/sha256-browser" "2.0.0" "@aws-crypto/sha256-js" "2.0.0" - "@aws-sdk/client-sts" "3.163.0" - "@aws-sdk/config-resolver" "3.163.0" - "@aws-sdk/credential-provider-node" "3.163.0" - "@aws-sdk/fetch-http-handler" "3.162.0" - "@aws-sdk/hash-node" "3.162.0" - "@aws-sdk/invalid-dependency" "3.162.0" - "@aws-sdk/middleware-content-length" "3.162.0" - "@aws-sdk/middleware-endpoint-discovery" "3.163.0" - "@aws-sdk/middleware-host-header" "3.162.0" - "@aws-sdk/middleware-logger" "3.162.0" - "@aws-sdk/middleware-recursion-detection" "3.162.0" - "@aws-sdk/middleware-retry" "3.162.0" - "@aws-sdk/middleware-serde" "3.162.0" - "@aws-sdk/middleware-signing" "3.163.0" - "@aws-sdk/middleware-stack" "3.162.0" - "@aws-sdk/middleware-user-agent" "3.162.0" - "@aws-sdk/node-config-provider" "3.162.0" - "@aws-sdk/node-http-handler" "3.162.0" - "@aws-sdk/protocol-http" "3.162.0" - "@aws-sdk/smithy-client" "3.162.0" - "@aws-sdk/types" "3.162.0" - "@aws-sdk/url-parser" "3.162.0" - "@aws-sdk/util-base64-browser" "3.109.0" - "@aws-sdk/util-base64-node" "3.55.0" - "@aws-sdk/util-body-length-browser" "3.154.0" - "@aws-sdk/util-body-length-node" "3.55.0" - "@aws-sdk/util-defaults-mode-browser" "3.162.0" - "@aws-sdk/util-defaults-mode-node" "3.163.0" - "@aws-sdk/util-user-agent-browser" "3.162.0" - "@aws-sdk/util-user-agent-node" "3.162.0" - "@aws-sdk/util-utf8-browser" "3.109.0" - "@aws-sdk/util-utf8-node" "3.109.0" - "@aws-sdk/util-waiter" "3.162.0" + "@aws-sdk/client-sts" "3.169.0" + "@aws-sdk/config-resolver" "3.168.0" + "@aws-sdk/credential-provider-node" "3.169.0" + "@aws-sdk/fetch-http-handler" "3.168.0" + "@aws-sdk/hash-node" "3.168.0" + "@aws-sdk/invalid-dependency" "3.168.0" + "@aws-sdk/middleware-content-length" "3.168.0" + "@aws-sdk/middleware-endpoint-discovery" "3.168.0" + "@aws-sdk/middleware-host-header" "3.168.0" + "@aws-sdk/middleware-logger" "3.168.0" + "@aws-sdk/middleware-recursion-detection" "3.168.0" + "@aws-sdk/middleware-retry" "3.169.0" + "@aws-sdk/middleware-serde" "3.168.0" + "@aws-sdk/middleware-signing" "3.168.0" + "@aws-sdk/middleware-stack" "3.168.0" + "@aws-sdk/middleware-user-agent" "3.168.0" + "@aws-sdk/node-config-provider" "3.168.0" + "@aws-sdk/node-http-handler" "3.168.0" + "@aws-sdk/protocol-http" "3.168.0" + "@aws-sdk/smithy-client" "3.168.0" + "@aws-sdk/types" "3.168.0" + "@aws-sdk/url-parser" "3.168.0" + "@aws-sdk/util-base64-browser" "3.168.0" + "@aws-sdk/util-base64-node" "3.168.0" + "@aws-sdk/util-body-length-browser" "3.168.0" + "@aws-sdk/util-body-length-node" "3.168.0" + "@aws-sdk/util-defaults-mode-browser" "3.168.0" + "@aws-sdk/util-defaults-mode-node" "3.168.0" + "@aws-sdk/util-user-agent-browser" "3.168.0" + "@aws-sdk/util-user-agent-node" "3.168.0" + "@aws-sdk/util-utf8-browser" "3.168.0" + "@aws-sdk/util-utf8-node" "3.168.0" + "@aws-sdk/util-waiter" "3.168.0" tslib "^2.3.1" uuid "^8.3.2" -"@aws-sdk/client-sso@3.163.0": - version "3.163.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/client-sso/-/client-sso-3.163.0.tgz#fa99acadf4f049c0482ac92373b64ad409f26570" - integrity sha512-qWVDIhHwrGQf+vu+y/6Yq/YaWwdp8wa3OhX5JbaU5aBEoRYVAMEZX/srHKcfGR4Lu9lHoUZcXp3XnKugZiN49g== +"@aws-sdk/client-sso@3.169.0": + version "3.169.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/client-sso/-/client-sso-3.169.0.tgz#1f5df90de01ab723044ebaed82486e89124846b0" + integrity sha512-FeV4X7iP2mXr3+KSRfsQsHIDdGpOXZALC7huFYvC27CGjZgI6lYkQZqY4LjPd+1zi4MF77A8RgjwdNsmBTt6rg== dependencies: "@aws-crypto/sha256-browser" "2.0.0" "@aws-crypto/sha256-js" "2.0.0" - "@aws-sdk/config-resolver" "3.163.0" - "@aws-sdk/fetch-http-handler" "3.162.0" - "@aws-sdk/hash-node" "3.162.0" - "@aws-sdk/invalid-dependency" "3.162.0" - "@aws-sdk/middleware-content-length" "3.162.0" - "@aws-sdk/middleware-host-header" "3.162.0" - "@aws-sdk/middleware-logger" "3.162.0" - "@aws-sdk/middleware-recursion-detection" "3.162.0" - "@aws-sdk/middleware-retry" "3.162.0" - "@aws-sdk/middleware-serde" "3.162.0" - "@aws-sdk/middleware-stack" "3.162.0" - "@aws-sdk/middleware-user-agent" "3.162.0" - "@aws-sdk/node-config-provider" "3.162.0" - "@aws-sdk/node-http-handler" "3.162.0" - "@aws-sdk/protocol-http" "3.162.0" - "@aws-sdk/smithy-client" "3.162.0" - "@aws-sdk/types" "3.162.0" - "@aws-sdk/url-parser" "3.162.0" - "@aws-sdk/util-base64-browser" "3.109.0" - "@aws-sdk/util-base64-node" "3.55.0" - "@aws-sdk/util-body-length-browser" "3.154.0" - "@aws-sdk/util-body-length-node" "3.55.0" - "@aws-sdk/util-defaults-mode-browser" "3.162.0" - "@aws-sdk/util-defaults-mode-node" "3.163.0" - "@aws-sdk/util-user-agent-browser" "3.162.0" - "@aws-sdk/util-user-agent-node" "3.162.0" - "@aws-sdk/util-utf8-browser" "3.109.0" - "@aws-sdk/util-utf8-node" "3.109.0" + "@aws-sdk/config-resolver" "3.168.0" + "@aws-sdk/fetch-http-handler" "3.168.0" + "@aws-sdk/hash-node" "3.168.0" + "@aws-sdk/invalid-dependency" "3.168.0" + "@aws-sdk/middleware-content-length" "3.168.0" + "@aws-sdk/middleware-host-header" "3.168.0" + "@aws-sdk/middleware-logger" "3.168.0" + "@aws-sdk/middleware-recursion-detection" "3.168.0" + "@aws-sdk/middleware-retry" "3.169.0" + "@aws-sdk/middleware-serde" "3.168.0" + "@aws-sdk/middleware-stack" "3.168.0" + "@aws-sdk/middleware-user-agent" "3.168.0" + "@aws-sdk/node-config-provider" "3.168.0" + "@aws-sdk/node-http-handler" "3.168.0" + "@aws-sdk/protocol-http" "3.168.0" + "@aws-sdk/smithy-client" "3.168.0" + "@aws-sdk/types" "3.168.0" + "@aws-sdk/url-parser" "3.168.0" + "@aws-sdk/util-base64-browser" "3.168.0" + "@aws-sdk/util-base64-node" "3.168.0" + "@aws-sdk/util-body-length-browser" "3.168.0" + "@aws-sdk/util-body-length-node" "3.168.0" + "@aws-sdk/util-defaults-mode-browser" "3.168.0" + "@aws-sdk/util-defaults-mode-node" "3.168.0" + "@aws-sdk/util-user-agent-browser" "3.168.0" + "@aws-sdk/util-user-agent-node" "3.168.0" + "@aws-sdk/util-utf8-browser" "3.168.0" + "@aws-sdk/util-utf8-node" "3.168.0" tslib "^2.3.1" -"@aws-sdk/client-sts@3.163.0": - version "3.163.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/client-sts/-/client-sts-3.163.0.tgz#8af28c722c9a45adf4eca324395f33490bf4a141" - integrity sha512-gm0dzuy+qE61F0W8YYGeSQzY9Bn0O+K6LMcwxJhsOkN8drzEe3KJqEIfSSrYBgUoSc5+qvzwmXpC1W9hb8D1ZA== +"@aws-sdk/client-sts@3.169.0": + version "3.169.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/client-sts/-/client-sts-3.169.0.tgz#15e7452747b96f234e9f5b9131b578dc7b230ea3" + integrity sha512-nvrUDz4SNYt0cDjFRKJd6ewi5yEYJfmxZXY76AOoRUmzKsxq6YRWyu7of8Qn0ldlasx+RO8+/QKCZo0UllVMPw== dependencies: "@aws-crypto/sha256-browser" "2.0.0" "@aws-crypto/sha256-js" "2.0.0" - "@aws-sdk/config-resolver" "3.163.0" - "@aws-sdk/credential-provider-node" "3.163.0" - "@aws-sdk/fetch-http-handler" "3.162.0" - "@aws-sdk/hash-node" "3.162.0" - "@aws-sdk/invalid-dependency" "3.162.0" - "@aws-sdk/middleware-content-length" "3.162.0" - "@aws-sdk/middleware-host-header" "3.162.0" - "@aws-sdk/middleware-logger" "3.162.0" - "@aws-sdk/middleware-recursion-detection" "3.162.0" - "@aws-sdk/middleware-retry" "3.162.0" - "@aws-sdk/middleware-sdk-sts" "3.163.0" - "@aws-sdk/middleware-serde" "3.162.0" - "@aws-sdk/middleware-signing" "3.163.0" - "@aws-sdk/middleware-stack" "3.162.0" - "@aws-sdk/middleware-user-agent" "3.162.0" - "@aws-sdk/node-config-provider" "3.162.0" - "@aws-sdk/node-http-handler" "3.162.0" - "@aws-sdk/protocol-http" "3.162.0" - "@aws-sdk/smithy-client" "3.162.0" - "@aws-sdk/types" "3.162.0" - "@aws-sdk/url-parser" "3.162.0" - "@aws-sdk/util-base64-browser" "3.109.0" - "@aws-sdk/util-base64-node" "3.55.0" - "@aws-sdk/util-body-length-browser" "3.154.0" - "@aws-sdk/util-body-length-node" "3.55.0" - "@aws-sdk/util-defaults-mode-browser" "3.162.0" - "@aws-sdk/util-defaults-mode-node" "3.163.0" - "@aws-sdk/util-user-agent-browser" "3.162.0" - "@aws-sdk/util-user-agent-node" "3.162.0" - "@aws-sdk/util-utf8-browser" "3.109.0" - "@aws-sdk/util-utf8-node" "3.109.0" + "@aws-sdk/config-resolver" "3.168.0" + "@aws-sdk/credential-provider-node" "3.169.0" + "@aws-sdk/fetch-http-handler" "3.168.0" + "@aws-sdk/hash-node" "3.168.0" + "@aws-sdk/invalid-dependency" "3.168.0" + "@aws-sdk/middleware-content-length" "3.168.0" + "@aws-sdk/middleware-host-header" "3.168.0" + "@aws-sdk/middleware-logger" "3.168.0" + "@aws-sdk/middleware-recursion-detection" "3.168.0" + "@aws-sdk/middleware-retry" "3.169.0" + "@aws-sdk/middleware-sdk-sts" "3.168.0" + "@aws-sdk/middleware-serde" "3.168.0" + "@aws-sdk/middleware-signing" "3.168.0" + "@aws-sdk/middleware-stack" "3.168.0" + "@aws-sdk/middleware-user-agent" "3.168.0" + "@aws-sdk/node-config-provider" "3.168.0" + "@aws-sdk/node-http-handler" "3.168.0" + "@aws-sdk/protocol-http" "3.168.0" + "@aws-sdk/smithy-client" "3.168.0" + "@aws-sdk/types" "3.168.0" + "@aws-sdk/url-parser" "3.168.0" + "@aws-sdk/util-base64-browser" "3.168.0" + "@aws-sdk/util-base64-node" "3.168.0" + "@aws-sdk/util-body-length-browser" "3.168.0" + "@aws-sdk/util-body-length-node" "3.168.0" + "@aws-sdk/util-defaults-mode-browser" "3.168.0" + "@aws-sdk/util-defaults-mode-node" "3.168.0" + "@aws-sdk/util-user-agent-browser" "3.168.0" + "@aws-sdk/util-user-agent-node" "3.168.0" + "@aws-sdk/util-utf8-browser" "3.168.0" + "@aws-sdk/util-utf8-node" "3.168.0" entities "2.2.0" fast-xml-parser "3.19.0" tslib "^2.3.1" -"@aws-sdk/config-resolver@3.163.0": - version "3.163.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/config-resolver/-/config-resolver-3.163.0.tgz#65ae429a02d65a8a9d2fe321cc88fa9117c6ecae" - integrity sha512-iBl5Zc3+VRGJy6n+aMcg++7tzYi4G1bHia6v/eF93SvdKxtRv40M9QnqoNfaNUuw9U2ltwKOHepw7J3bkOA8cQ== +"@aws-sdk/config-resolver@3.168.0": + version "3.168.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/config-resolver/-/config-resolver-3.168.0.tgz#933c4d4b7b982253f9006f14658f6bbf45b158ca" + integrity sha512-eSGHsa5kDIpBtBr1HhM9n0Deb+uSyr5pvk39WPFf5CTGvIqe52Fg9s1/Jz54rDwlgsfPzufX7TrCXgUhMwb8+w== dependencies: - "@aws-sdk/signature-v4" "3.163.0" - "@aws-sdk/types" "3.162.0" - "@aws-sdk/util-config-provider" "3.109.0" - "@aws-sdk/util-middleware" "3.162.0" + "@aws-sdk/signature-v4" "3.168.0" + "@aws-sdk/types" "3.168.0" + "@aws-sdk/util-config-provider" "3.168.0" + "@aws-sdk/util-middleware" "3.168.0" tslib "^2.3.1" -"@aws-sdk/credential-provider-env@3.162.0": - version "3.162.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-env/-/credential-provider-env-3.162.0.tgz#be2bf9587d9e7b2a10b1c2530c5984b60efc11bd" - integrity sha512-yzCJXiAAbZZHB4iThi4I+rs+gTYwBSetdU4Z1D89a2xjcOjCa8IhdQKm3GO/uJMScy4VtW3EEFG4/zZ7dVQPOw== +"@aws-sdk/credential-provider-env@3.168.0": + version "3.168.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-env/-/credential-provider-env-3.168.0.tgz#9b6e7095cb711ab917f447507899a02945d7b5e4" + integrity sha512-dzblFOkmH0FzYuckCJYVH/d+HEGO814B0gVt0HnaIvsS5skDSDBXD+/S9AX6BAKTNBWP8BVcn7+u+oS5l7GBkQ== dependencies: - "@aws-sdk/property-provider" "3.162.0" - "@aws-sdk/types" "3.162.0" + "@aws-sdk/property-provider" "3.168.0" + "@aws-sdk/types" "3.168.0" tslib "^2.3.1" -"@aws-sdk/credential-provider-imds@3.162.0": - version "3.162.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-imds/-/credential-provider-imds-3.162.0.tgz#bb8002a37c42e6f2f42fcafff3a8e4262b6aac4a" - integrity sha512-ohrHMIu2MNauPjbE8mEMKtlEQH/VZdpNswPigaEejUGVumz0NSft9PlIn2X79sNX5Y+uXopynMQF4MZj773hTw== +"@aws-sdk/credential-provider-imds@3.168.0": + version "3.168.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-imds/-/credential-provider-imds-3.168.0.tgz#4a28508865df552de0e4d22a491c3e6764569154" + integrity sha512-Ua2zTmo0eep/fGh3SL9W0ERlGRkEAiP2IEC63QbRZKK+5Xg6RIgqij7hQHvKLY78zBDd7exnU9W1AMnt9lOd1A== dependencies: - "@aws-sdk/node-config-provider" "3.162.0" - "@aws-sdk/property-provider" "3.162.0" - "@aws-sdk/types" "3.162.0" - "@aws-sdk/url-parser" "3.162.0" + "@aws-sdk/node-config-provider" "3.168.0" + "@aws-sdk/property-provider" "3.168.0" + "@aws-sdk/types" "3.168.0" + "@aws-sdk/url-parser" "3.168.0" tslib "^2.3.1" -"@aws-sdk/credential-provider-ini@3.163.0": - version "3.163.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.163.0.tgz#5c82fafbf051843f7739aacca4bf34d0a19780c1" - integrity sha512-i6WF+Q00MKzFnzVqQie0xDCVq0JtAxq9UA0lCHOAtKwIvQXTZka/Ya3oII0cn9I3avCZLcI/SYZc9lmVEiJfDg== - dependencies: - "@aws-sdk/credential-provider-env" "3.162.0" - "@aws-sdk/credential-provider-imds" "3.162.0" - "@aws-sdk/credential-provider-sso" "3.163.0" - "@aws-sdk/credential-provider-web-identity" "3.162.0" - "@aws-sdk/property-provider" "3.162.0" - "@aws-sdk/shared-ini-file-loader" "3.162.0" - "@aws-sdk/types" "3.162.0" +"@aws-sdk/credential-provider-ini@3.169.0": + version "3.169.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.169.0.tgz#30adc46ce76b58f6e0c60eab6fca0b06b8187d44" + integrity sha512-bJb/dJY0Sk23smbwjhDUDuCMneMwom0eBjkMrJrabh64Ysvzpf/RnMr9n1VJTpgoy4hRbWWIikyWhicc9BeSrA== + dependencies: + "@aws-sdk/credential-provider-env" "3.168.0" + "@aws-sdk/credential-provider-imds" "3.168.0" + "@aws-sdk/credential-provider-sso" "3.169.0" + "@aws-sdk/credential-provider-web-identity" "3.168.0" + "@aws-sdk/property-provider" "3.168.0" + "@aws-sdk/shared-ini-file-loader" "3.168.0" + "@aws-sdk/types" "3.168.0" tslib "^2.3.1" -"@aws-sdk/credential-provider-node@3.163.0": - version "3.163.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-node/-/credential-provider-node-3.163.0.tgz#d5ac87da6a8d0d1535b4099670ca178be2dc78d1" - integrity sha512-43Fp3YyfgK8M+yEpzxUXUWwGzG4AEpd+4IO5CBna0ZnrNX+x7JbZTUXfSopkPkMnZeudgjHvNF6/Vr7v9pOSkw== - dependencies: - "@aws-sdk/credential-provider-env" "3.162.0" - "@aws-sdk/credential-provider-imds" "3.162.0" - "@aws-sdk/credential-provider-ini" "3.163.0" - "@aws-sdk/credential-provider-process" "3.162.0" - "@aws-sdk/credential-provider-sso" "3.163.0" - "@aws-sdk/credential-provider-web-identity" "3.162.0" - "@aws-sdk/property-provider" "3.162.0" - "@aws-sdk/shared-ini-file-loader" "3.162.0" - "@aws-sdk/types" "3.162.0" +"@aws-sdk/credential-provider-node@3.169.0": + version "3.169.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-node/-/credential-provider-node-3.169.0.tgz#93ff28899d355d91f6696c98bb2b9673aa8a3233" + integrity sha512-oMZLrZZpkcR+Z4795oDdwb9iXyqnwhNc8loBi2YGjZ9Uav+gGaZB9hjN/TMP4VkQNvt4mhDtfu/KMciFVSaHLw== + dependencies: + "@aws-sdk/credential-provider-env" "3.168.0" + "@aws-sdk/credential-provider-imds" "3.168.0" + "@aws-sdk/credential-provider-ini" "3.169.0" + "@aws-sdk/credential-provider-process" "3.168.0" + "@aws-sdk/credential-provider-sso" "3.169.0" + "@aws-sdk/credential-provider-web-identity" "3.168.0" + "@aws-sdk/property-provider" "3.168.0" + "@aws-sdk/shared-ini-file-loader" "3.168.0" + "@aws-sdk/types" "3.168.0" tslib "^2.3.1" -"@aws-sdk/credential-provider-process@3.162.0": - version "3.162.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-process/-/credential-provider-process-3.162.0.tgz#e54db5f3ac5a5200a6f04803b05278c028a54447" - integrity sha512-KtmYjlCMAa0XF3IJo4dxSF+OWmRoHbrdEHGEZw+j6iCZ3Nz6Y6xCsdxun5rAKdom1QRNMDR4wX0hRAdPYobW2w== +"@aws-sdk/credential-provider-process@3.168.0": + version "3.168.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-process/-/credential-provider-process-3.168.0.tgz#f9d0b4777dad993eb3e94fc7dd71f7c253a9d73a" + integrity sha512-Yni2S+yHLkUvDI30ZNkEOao2hSBj1eeQvWBUEJsgCFvHdlFDwOYwIueDmrBggqUISUgCLb6y/eylqeMvjN3Eyw== dependencies: - "@aws-sdk/property-provider" "3.162.0" - "@aws-sdk/shared-ini-file-loader" "3.162.0" - "@aws-sdk/types" "3.162.0" + "@aws-sdk/property-provider" "3.168.0" + "@aws-sdk/shared-ini-file-loader" "3.168.0" + "@aws-sdk/types" "3.168.0" tslib "^2.3.1" -"@aws-sdk/credential-provider-sso@3.163.0": - version "3.163.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.163.0.tgz#b8a241aeeacc17773600cfb41a2faf1f703f80b1" - integrity sha512-VbmxP4Z0sxqBzbqs5u86/5q2PG3xzTClOWE1aUWoiBLqDRkO3+4lpLUKD0lwh9Ot3Ai/pT2KYDgxkRBXrfA/bA== +"@aws-sdk/credential-provider-sso@3.169.0": + version "3.169.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.169.0.tgz#06f2e572f27caefeeefc7ea97267217b85b0a045" + integrity sha512-8SlgQGRwSobLXZnizmBg1mo03yfm6Ub0vYPX+6u706XAVs8eJHT+Ia1B/j53ZrB2RSg0wjR47l+khKJtHhcJJg== dependencies: - "@aws-sdk/client-sso" "3.163.0" - "@aws-sdk/property-provider" "3.162.0" - "@aws-sdk/shared-ini-file-loader" "3.162.0" - "@aws-sdk/types" "3.162.0" + "@aws-sdk/client-sso" "3.169.0" + "@aws-sdk/property-provider" "3.168.0" + "@aws-sdk/shared-ini-file-loader" "3.168.0" + "@aws-sdk/types" "3.168.0" tslib "^2.3.1" -"@aws-sdk/credential-provider-web-identity@3.162.0": - version "3.162.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.162.0.tgz#0b06aee91777b16c362ad565e9f1fdf77de7e8f6" - integrity sha512-vy86OS5/h+Vfk1bxvWjbayyUtFNdwU+mfALin3zxJbFqneSxRBydNBomt/guJjapZE+h865lkteyOsqsYMskzQ== +"@aws-sdk/credential-provider-web-identity@3.168.0": + version "3.168.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.168.0.tgz#c6ac9ced8bc4c928ccb26e3837ff8c45339b17f3" + integrity sha512-hz7wj8htY6s3/TubzH/YOd6f4bxO26GYupCTvKZlWdErLUmZ8h3hG/9xO/5kWOakD40T3MXT7HIo2rvEWg1GWw== dependencies: - "@aws-sdk/property-provider" "3.162.0" - "@aws-sdk/types" "3.162.0" + "@aws-sdk/property-provider" "3.168.0" + "@aws-sdk/types" "3.168.0" tslib "^2.3.1" -"@aws-sdk/endpoint-cache@3.55.0": - version "3.55.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/endpoint-cache/-/endpoint-cache-3.55.0.tgz#b4be2cb363af005a67c2a6f938f06fcbbbbbccf8" - integrity sha512-kxDoHFDuQwZEEUZRp+ZLOg68EXuKPzUN86DcpIZantDVcmu7MSPTbbQp9DZd8MnKVEKCP7Sop5f7zCqOPl3LXw== +"@aws-sdk/endpoint-cache@3.168.0": + version "3.168.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/endpoint-cache/-/endpoint-cache-3.168.0.tgz#33d0464794216d4c7cf72a2da24c88d6da1052f9" + integrity sha512-nO9zUuLLksDm92y4faCuK4+BT0+MmnQC/pmrhKs4LggSBNXR+KLh+1WBTvCoTu1+OWuGcRUuwcNW990xGf0DyA== dependencies: mnemonist "0.38.3" tslib "^2.3.1" -"@aws-sdk/fetch-http-handler@3.162.0": - version "3.162.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/fetch-http-handler/-/fetch-http-handler-3.162.0.tgz#d90d3f179ff11bedf69b971d22a7c00abba650d9" - integrity sha512-DZLxxEqSMXqKteYohO4w6uoORabpETWso6wBdIFMul1BbEseqLjub1594D5RA18cqkcM2dV4ttw+boPPzOjSAw== +"@aws-sdk/fetch-http-handler@3.168.0": + version "3.168.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/fetch-http-handler/-/fetch-http-handler-3.168.0.tgz#8093d7341746a29b87e945f9f40515c5b2e05bed" + integrity sha512-D4vN6zbF/RA7czw34gFhjsfOD5fkkLxLvmW8zbrJSsrex79Ju96NFuNBs7TtaV2btfXC7SkhhI/z+E81BxqRpg== dependencies: - "@aws-sdk/protocol-http" "3.162.0" - "@aws-sdk/querystring-builder" "3.162.0" - "@aws-sdk/types" "3.162.0" - "@aws-sdk/util-base64-browser" "3.109.0" + "@aws-sdk/protocol-http" "3.168.0" + "@aws-sdk/querystring-builder" "3.168.0" + "@aws-sdk/types" "3.168.0" + "@aws-sdk/util-base64-browser" "3.168.0" tslib "^2.3.1" -"@aws-sdk/hash-node@3.162.0": - version "3.162.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/hash-node/-/hash-node-3.162.0.tgz#72eeba4fe923fc96103740600bcb5a217dc8d338" - integrity sha512-lfyyAb0Cd084QnUNLTkYowD8RW3L5Tb9lNnIMH6HY7uSE/obw1j/OnLUPqpey628WJ5DPyyvNBah3Vu+JVZ5Mw== +"@aws-sdk/hash-node@3.168.0": + version "3.168.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/hash-node/-/hash-node-3.168.0.tgz#807afb8663569e35acc072dff94239b95f13a2d4" + integrity sha512-W2kMIuMric2Q2D4787DGubHz3Pw5fWDndM2gMjs/MB1psC/N74/ggRUIlUmsjSBFUHY1BYMfjsxe8DS9dSj77A== dependencies: - "@aws-sdk/types" "3.162.0" - "@aws-sdk/util-buffer-from" "3.55.0" + "@aws-sdk/types" "3.168.0" + "@aws-sdk/util-buffer-from" "3.168.0" tslib "^2.3.1" -"@aws-sdk/invalid-dependency@3.162.0": - version "3.162.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/invalid-dependency/-/invalid-dependency-3.162.0.tgz#a75b29aae362854041ebc4d282746041231109e4" - integrity sha512-ENZ7Jf2EcxMMdAX9/sRrt/1rzeA2WwqAKrjIacKGT9KEGQNU+omWF/h+8stLCu0Uxcg0XswFXgQCXcI1IQuZjg== +"@aws-sdk/invalid-dependency@3.168.0": + version "3.168.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/invalid-dependency/-/invalid-dependency-3.168.0.tgz#a44e8e0248bd591f06f6fe5a8a2896c54b42745e" + integrity sha512-KuDn4e1XsxBQi+dAoRfSOExICq+Gt5zGA7/dI2jnfqejBNHVmJ8ksOnV/HmilFscPxdJx5POECQosf3p/N4t9w== dependencies: - "@aws-sdk/types" "3.162.0" + "@aws-sdk/types" "3.168.0" tslib "^2.3.1" -"@aws-sdk/is-array-buffer@3.55.0": - version "3.55.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/is-array-buffer/-/is-array-buffer-3.55.0.tgz#c46122c5636f01d5895e5256a587768c3425ea7a" - integrity sha512-NbiPHVYuPxdqdFd6FxzzN3H1BQn/iWA3ri3Ry7AyLeP/tGs1yzEWMwf8BN8TSMALI0GXT6Sh0GDWy3Ok5xB6DA== +"@aws-sdk/is-array-buffer@3.168.0": + version "3.168.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/is-array-buffer/-/is-array-buffer-3.168.0.tgz#4cd8492246e00763a225684bcf5150d76ed99eb4" + integrity sha512-Zvt8a/g1UfvwmhxOnt/hDrFprC3+DQivFQGnzwBpv+ZyM1BfdgAruAkUZF+GtXI22DXZUumBrposCH1CcgjeIA== dependencies: tslib "^2.3.1" "@aws-sdk/lib-dynamodb@^3.52.0": - version "3.163.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/lib-dynamodb/-/lib-dynamodb-3.163.0.tgz#db462faf89dc786dd4957e2eedf8c9033703c69b" - integrity sha512-zOrPlqkHFa0tafpyD6wqyDShu1bRA/dtCCPXhwJZOp2Qtl0gt3OJjPOVFDyfrdcpelgvLSocPvIKZMqLCGQaQg== + version "3.169.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/lib-dynamodb/-/lib-dynamodb-3.169.0.tgz#5ea47dfe386e70fd9ca9420d91707b30d74e95cc" + integrity sha512-eGe4RnSzcfRyhbPEzQWXsL7xysBP8vcd0aRTzArKGMx23VA/YnDLcxBMyO3+XV+2WRQMtHMvTfrGnmedvA+nyA== dependencies: - "@aws-sdk/util-dynamodb" "3.163.0" + "@aws-sdk/util-dynamodb" "3.169.0" tslib "^2.3.1" -"@aws-sdk/middleware-content-length@3.162.0": - version "3.162.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-content-length/-/middleware-content-length-3.162.0.tgz#987d77a843598aa52d1045745dbae7e79e763464" - integrity sha512-gwuxHPBNNkr9Ah9gTNHqJ3uIp3zeY+VC2H810+RqkG5QrxU1bGAN/zezIIbcAlXjMM9vTSfO0rxGI04nhTx0BQ== +"@aws-sdk/middleware-content-length@3.168.0": + version "3.168.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-content-length/-/middleware-content-length-3.168.0.tgz#ba553e563467bd6da8006c96ac87ee6de337c9fc" + integrity sha512-PHvoNIuXkLkBZ/0OSmFlCmA1o+RdqkNWwNm7/rIMe9cV+ZgtP9kQs+e4itibQb82veHTwG37+B7OAGa0DGqIvg== dependencies: - "@aws-sdk/protocol-http" "3.162.0" - "@aws-sdk/types" "3.162.0" + "@aws-sdk/protocol-http" "3.168.0" + "@aws-sdk/types" "3.168.0" tslib "^2.3.1" -"@aws-sdk/middleware-endpoint-discovery@3.163.0": - version "3.163.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-endpoint-discovery/-/middleware-endpoint-discovery-3.163.0.tgz#8eb4d1dd8b95d406583e34a784e396597519e110" - integrity sha512-RMIM5JOm6j8xeO4CWxFiodxFMsic/SFbX3PRQh4FNBTk95E+x7hovQ/q+p/UR0DGZTjhSDVNku64n/tlEuPvtQ== +"@aws-sdk/middleware-endpoint-discovery@3.168.0": + version "3.168.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-endpoint-discovery/-/middleware-endpoint-discovery-3.168.0.tgz#2fe3594ace021108555097d539cf199ef840e170" + integrity sha512-1Ov/SeRHqcOeOwqEr8P5I/3fwlrWNIZ5JbGizggjHops5QwzbJ1O5+lFFdTBTSlOWKBimDTMHlvwCbKmBTcDkQ== dependencies: - "@aws-sdk/config-resolver" "3.163.0" - "@aws-sdk/endpoint-cache" "3.55.0" - "@aws-sdk/protocol-http" "3.162.0" - "@aws-sdk/types" "3.162.0" + "@aws-sdk/config-resolver" "3.168.0" + "@aws-sdk/endpoint-cache" "3.168.0" + "@aws-sdk/protocol-http" "3.168.0" + "@aws-sdk/types" "3.168.0" tslib "^2.3.1" -"@aws-sdk/middleware-host-header@3.162.0": - version "3.162.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-host-header/-/middleware-host-header-3.162.0.tgz#c59015c83f6c574bde72534919022b3a90c3cd2a" - integrity sha512-gw5xe22P62N9yZPvrVXewM2vp70w9mLRWC1vh6pRDs0hEudAlsbXoWjB/z6jpG6ucA4Y1IOuXy5yGr9lND+zhg== +"@aws-sdk/middleware-host-header@3.168.0": + version "3.168.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-host-header/-/middleware-host-header-3.168.0.tgz#d5f2b51880e53e2848b65c8d767c3183cbad1f67" + integrity sha512-420rWpd/fsoPzRnMkyUFW1in6jpa1kbVCuewY5cqoH9uQcthrNJ0l9IgePDEMdymIMxGBfwiQERvUYogUadxrw== dependencies: - "@aws-sdk/protocol-http" "3.162.0" - "@aws-sdk/types" "3.162.0" + "@aws-sdk/protocol-http" "3.168.0" + "@aws-sdk/types" "3.168.0" tslib "^2.3.1" -"@aws-sdk/middleware-logger@3.162.0": - version "3.162.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-logger/-/middleware-logger-3.162.0.tgz#10b2d552d7aa2c48b91061a418224cc47984272c" - integrity sha512-3YysLwpTZdfZkve2ytKFIwEc/WqDkxoI5kUXQq2hjsHAjLW7pEhUV00o+LJbgKjNxh38eSmmKeFlr5jnIjXHiQ== +"@aws-sdk/middleware-logger@3.168.0": + version "3.168.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-logger/-/middleware-logger-3.168.0.tgz#056384dc42fb1494afbef2d2b8d168dbc6f50e13" + integrity sha512-5xeBlHQz/iWVor04eZLTfygj5T9zvLsngrUVb8FkHDzzNqT9+QwoA0iZoT8Vq5khfZK7UE7SWm2Hi/13t9T9+w== dependencies: - "@aws-sdk/types" "3.162.0" + "@aws-sdk/types" "3.168.0" tslib "^2.3.1" -"@aws-sdk/middleware-recursion-detection@3.162.0": - version "3.162.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-recursion-detection/-/middleware-recursion-detection-3.162.0.tgz#6c13e90ec9cc7b7adcb98bcb3d02eb37cef37b5c" - integrity sha512-AqoTnSX0JgoFuKPyWy0S+WUJqgfkVz6Os50azi32snjHmluEgLOmfeF0ixfxGFUVGxZp8WDuu/JVhwgTRKVuUA== +"@aws-sdk/middleware-recursion-detection@3.168.0": + version "3.168.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-recursion-detection/-/middleware-recursion-detection-3.168.0.tgz#0afd175822aaceca91cfb520a40f70db9d859475" + integrity sha512-4sr3E37PUDQSpE205d+kGcaJmZj7kE/I50qyf39U0jphk121AZXdKCWDs/T7g/d4LVJLoe6N+zzZIg4ZWVUUZw== dependencies: - "@aws-sdk/protocol-http" "3.162.0" - "@aws-sdk/types" "3.162.0" + "@aws-sdk/protocol-http" "3.168.0" + "@aws-sdk/types" "3.168.0" tslib "^2.3.1" -"@aws-sdk/middleware-retry@3.162.0": - version "3.162.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-retry/-/middleware-retry-3.162.0.tgz#0601882f9105fc440b902a937f630da65914bd99" - integrity sha512-9ZuTim8tnTgP7wNgj+RIdYzGhNgou6QBBX85qMIvngksRUgsd1CGR17HQTyYDZTKlZs7GvLt/L5FaJcOlpPUxA== +"@aws-sdk/middleware-retry@3.169.0": + version "3.169.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-retry/-/middleware-retry-3.169.0.tgz#8821160379bcfa34c6dddd95dbb78d23aade67b6" + integrity sha512-XGAPxJpHEdqbZwaga3H40hQKqftOshvwhOLHLgCQQeOp/ftB6ohzM/pRfutSRCmK4+XPJGILzLZPSRyoME//mw== dependencies: - "@aws-sdk/protocol-http" "3.162.0" - "@aws-sdk/service-error-classification" "3.162.0" - "@aws-sdk/types" "3.162.0" - "@aws-sdk/util-middleware" "3.162.0" + "@aws-sdk/protocol-http" "3.168.0" + "@aws-sdk/service-error-classification" "3.168.0" + "@aws-sdk/types" "3.168.0" + "@aws-sdk/util-middleware" "3.168.0" tslib "^2.3.1" uuid "^8.3.2" -"@aws-sdk/middleware-sdk-sts@3.163.0": - version "3.163.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-sdk-sts/-/middleware-sdk-sts-3.163.0.tgz#362eedb0739c3b4e98aa1154cc5c6f38d7e18f68" - integrity sha512-3UV0O5D3HPF5xHsIrDiygs06wmGVnoAXsyrqcZSPkYig9eGP6lTL1I8YS8JIG9/VojQDKjDUpQZMC3Om0+C7hA== +"@aws-sdk/middleware-sdk-sts@3.168.0": + version "3.168.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-sdk-sts/-/middleware-sdk-sts-3.168.0.tgz#819d1697c402c3ae2ed77a4be6f73710503035b2" + integrity sha512-uE5VYczEkoCG/G63Whp4dGKFouDjx0Jj4vZj7Z4oEQSv/eynBm1+AQAtWA4zJQfYO60lFKOSiBykv/c1hk09Mg== dependencies: - "@aws-sdk/middleware-signing" "3.163.0" - "@aws-sdk/property-provider" "3.162.0" - "@aws-sdk/protocol-http" "3.162.0" - "@aws-sdk/signature-v4" "3.163.0" - "@aws-sdk/types" "3.162.0" + "@aws-sdk/middleware-signing" "3.168.0" + "@aws-sdk/property-provider" "3.168.0" + "@aws-sdk/protocol-http" "3.168.0" + "@aws-sdk/signature-v4" "3.168.0" + "@aws-sdk/types" "3.168.0" tslib "^2.3.1" -"@aws-sdk/middleware-serde@3.162.0": - version "3.162.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-serde/-/middleware-serde-3.162.0.tgz#e83201bffd46500ed4ea71bb3ceda63505f31f96" - integrity sha512-Vdgxbl7/o99CjeljQx3mTpY4cX7rc8YQykD49L2S61D6+Gkk9Zc4DMvaJDcxvR7ZUzRwjMTcMHlxbopcp1+UBA== +"@aws-sdk/middleware-serde@3.168.0": + version "3.168.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-serde/-/middleware-serde-3.168.0.tgz#c6c615ce02f7931a5040f4fdc5162189c54e3e66" + integrity sha512-6z3iySqCjhV5NVEF3o++TgvK1XOBauYdZFCZk4foMxyh/wZ4MB+uIQ/D2AeHExzFGyrPjx0S0gZb4z8st6q9mA== dependencies: - "@aws-sdk/types" "3.162.0" + "@aws-sdk/types" "3.168.0" tslib "^2.3.1" -"@aws-sdk/middleware-signing@3.163.0": - version "3.163.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-signing/-/middleware-signing-3.163.0.tgz#9ecc4bdeb1e2b67ab777808818f86ebde9e64578" - integrity sha512-Uj5vdejYUJOCJAx5u/SHWQTp75bd7GVqnXazO3QFHRjhSCMT55wsm8D+7LKRNbp4SjavO49m9kubXf+pLpqlJQ== +"@aws-sdk/middleware-signing@3.168.0": + version "3.168.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-signing/-/middleware-signing-3.168.0.tgz#cd6ff279e0482bd7354a28a4d1e0ee7da1dd28b5" + integrity sha512-yQme9D4bNRdrPQH50a3oJfbf+54Dm1MkW4yjwIwpRoGkxAs2T7sjc3/u/Wo/Jy3g5yzM1Ven3KU+nlKOMNOpAw== dependencies: - "@aws-sdk/property-provider" "3.162.0" - "@aws-sdk/protocol-http" "3.162.0" - "@aws-sdk/signature-v4" "3.163.0" - "@aws-sdk/types" "3.162.0" + "@aws-sdk/property-provider" "3.168.0" + "@aws-sdk/protocol-http" "3.168.0" + "@aws-sdk/signature-v4" "3.168.0" + "@aws-sdk/types" "3.168.0" tslib "^2.3.1" -"@aws-sdk/middleware-stack@3.162.0": - version "3.162.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-stack/-/middleware-stack-3.162.0.tgz#26b37e6241ca5c1a5e50bb2b1367a39eabd2b5ad" - integrity sha512-e/by4QvDl9qMQHdBnLz6n8PRglswPb3eS23qT2Wt32KVLUehMUGAf1cdns6YmYSHATK/ivFmT2QHHEnNIc+n5w== +"@aws-sdk/middleware-stack@3.168.0": + version "3.168.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-stack/-/middleware-stack-3.168.0.tgz#56baa1d58d235bfc3285384e51736b7ec3b71cc8" + integrity sha512-tUMa6gQFqyRC9xRy1cfQAX/K84LkFC+NAyENoDn4cbLvTJpH6tLPINFktaXLkKl2bdzGGWLHefxriBjTqZB+rg== dependencies: tslib "^2.3.1" -"@aws-sdk/middleware-user-agent@3.162.0": - version "3.162.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-user-agent/-/middleware-user-agent-3.162.0.tgz#da374bd9c66efc563ee9a2f6d1fff29c5ebea965" - integrity sha512-aSCQk+oQbMPVHdncuend4jmd4MguLWjvi67OwKqdZjIKsSQfObCO8vwlfDM+ED3HcOfA0LwSxsFeSfQxC+WHxA== +"@aws-sdk/middleware-user-agent@3.168.0": + version "3.168.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-user-agent/-/middleware-user-agent-3.168.0.tgz#429f14ea4ea560021587b8a0e934439e8e4aad7e" + integrity sha512-nwcWN1tz39s4IWyx1lxak/W9LdLnusQEdb+0pnJFWTCNhba3BvlAnt1sZFDwbFRmRUbU3x+hhpNB+Xub2hFttg== dependencies: - "@aws-sdk/protocol-http" "3.162.0" - "@aws-sdk/types" "3.162.0" + "@aws-sdk/protocol-http" "3.168.0" + "@aws-sdk/types" "3.168.0" tslib "^2.3.1" -"@aws-sdk/node-config-provider@3.162.0": - version "3.162.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/node-config-provider/-/node-config-provider-3.162.0.tgz#9637996fd5ef18ce4619b927744727d2aff0d508" - integrity sha512-PgaekXCCyz/gKkbukt9zYLBJDEVgmCm0l78q5J84yJbu0FhcZY4LaAgCHdzhsgEYWTX497hokzNc3rgLdVu46A== +"@aws-sdk/node-config-provider@3.168.0": + version "3.168.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/node-config-provider/-/node-config-provider-3.168.0.tgz#98a8c332850528afb83d1265e17eaff24392a0a7" + integrity sha512-8su32ifopNLb835NudTdxyv4fQ+7Eie17MjbqnvOeWmjFAgzJyIVJjyvMI+N8Gu3dDCTxSbBh3hl++VOzL+oXg== dependencies: - "@aws-sdk/property-provider" "3.162.0" - "@aws-sdk/shared-ini-file-loader" "3.162.0" - "@aws-sdk/types" "3.162.0" + "@aws-sdk/property-provider" "3.168.0" + "@aws-sdk/shared-ini-file-loader" "3.168.0" + "@aws-sdk/types" "3.168.0" tslib "^2.3.1" -"@aws-sdk/node-http-handler@3.162.0": - version "3.162.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/node-http-handler/-/node-http-handler-3.162.0.tgz#771370fe09cc3b030666a6654cf1e461e6fe3cf1" - integrity sha512-9jNk9SU3nNLZ1OW+fd6zHGdByUDm0FEO3Hy+J62DvbFe16x09TnVnPAoHfZ69kjz5ZNS7Gg0wmdKjUHi9T3lJQ== +"@aws-sdk/node-http-handler@3.168.0": + version "3.168.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/node-http-handler/-/node-http-handler-3.168.0.tgz#6978977635f8bec3a37806a1cd54c11424ed751f" + integrity sha512-yO68M12LUJa/bhuljSRCtLbmWvnS0eopoE3P2+xzV2JzkIg5r+bJmh/VtpDz8D2PxZhRALwBchjq8h+Po6rhcQ== dependencies: - "@aws-sdk/abort-controller" "3.162.0" - "@aws-sdk/protocol-http" "3.162.0" - "@aws-sdk/querystring-builder" "3.162.0" - "@aws-sdk/types" "3.162.0" + "@aws-sdk/abort-controller" "3.168.0" + "@aws-sdk/protocol-http" "3.168.0" + "@aws-sdk/querystring-builder" "3.168.0" + "@aws-sdk/types" "3.168.0" tslib "^2.3.1" -"@aws-sdk/property-provider@3.162.0": - version "3.162.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/property-provider/-/property-provider-3.162.0.tgz#45cdaadfba54bb1c275972f12f33f72c8eb22333" - integrity sha512-kQLpibZRIrF58axcKY4Pr17YGoVBKBOWKol8jI8vlDhbFJqn14pVLohv4wZ8TzG2kKhWCF+t25YQCefWz2/lkg== +"@aws-sdk/property-provider@3.168.0": + version "3.168.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/property-provider/-/property-provider-3.168.0.tgz#abdcc76545c56f2fb2542db34bab0aafbe35576b" + integrity sha512-syvXTexP2t9HQY3dsfpPgUP5GjFcpBVzPfxd8GjLWFRcqBCQ5frdetkAfvnhPpytL/stauXuT1xv6jcN1vBAZQ== dependencies: - "@aws-sdk/types" "3.162.0" + "@aws-sdk/types" "3.168.0" tslib "^2.3.1" -"@aws-sdk/protocol-http@3.162.0": - version "3.162.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/protocol-http/-/protocol-http-3.162.0.tgz#3657cb6627576180d8c5a9a37d6c3f2984d70f92" - integrity sha512-xMFFxwcO+x5QoQX/LRGb3BpLCIBWC9cBOULm34rYGBySd/zQqebVJOhiKTPzaRL02WZTDNxsEEQHg97Lpe8CNw== +"@aws-sdk/protocol-http@3.168.0": + version "3.168.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/protocol-http/-/protocol-http-3.168.0.tgz#17674afb026789b739e640956bc36794b4c3e81e" + integrity sha512-5g7T5WqeU1W/TShfOYiczZFOK5svsQajjSGs1drB2DBQlbepF5YSmVbFGrfX6003h4TV9hpA6CqOjbgd59NgGA== dependencies: - "@aws-sdk/types" "3.162.0" + "@aws-sdk/types" "3.168.0" tslib "^2.3.1" -"@aws-sdk/querystring-builder@3.162.0": - version "3.162.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/querystring-builder/-/querystring-builder-3.162.0.tgz#c1667eebeb0e15ac6cae2523afa5ea3a8ca8aa00" - integrity sha512-3urwxCEpnQwa1B6fKmcr8R2Qmzr8VDttRSay5CgD/stbZ4XUzNsA6G1V36+EL1Vq4vMr1aZhriARioLDlhcz+g== +"@aws-sdk/querystring-builder@3.168.0": + version "3.168.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/querystring-builder/-/querystring-builder-3.168.0.tgz#bdd6cc0656ddb17997ba059afe02e0bd3724124c" + integrity sha512-cCjdmRKf+zVc/Whc9fP3DqB6QTBz0MsJ2uGqYCWG8kqBr4W8nDZVNRVj4Q1zZjQzipU7+77xJAE8NSIl+RsubA== dependencies: - "@aws-sdk/types" "3.162.0" - "@aws-sdk/util-uri-escape" "3.55.0" + "@aws-sdk/types" "3.168.0" + "@aws-sdk/util-uri-escape" "3.168.0" tslib "^2.3.1" -"@aws-sdk/querystring-parser@3.162.0": - version "3.162.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/querystring-parser/-/querystring-parser-3.162.0.tgz#d4f0522cfe2a44d2f242a2e5c9c9cf928930938e" - integrity sha512-0ccaGsR1O7e3BsprdYBMwGf8gmycTv1Dfz2EB5R6MiTqzcuQJ/lxpIcRh3jhUJaD1TPlUziyrBEAxtLka3HDDQ== +"@aws-sdk/querystring-parser@3.168.0": + version "3.168.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/querystring-parser/-/querystring-parser-3.168.0.tgz#8e768667a8e472fc23dabe6069351a6963157cb6" + integrity sha512-O82vxPyoLRuqcCFxAQYuvDwOdMOaQ/hqlaC8Tw6qNE3wpJ1296M51Zgb7lPfIlSxzAc96H//Q+d1t5MViK2SFg== dependencies: - "@aws-sdk/types" "3.162.0" + "@aws-sdk/types" "3.168.0" tslib "^2.3.1" -"@aws-sdk/service-error-classification@3.162.0": - version "3.162.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/service-error-classification/-/service-error-classification-3.162.0.tgz#b07ed4ef541ec4d3d3cfe93efae054e3d39b5a1b" - integrity sha512-AD9XL3CHFzwVWNEzdTo9aRnJl1ImqrRLlJ5zR/5ihTIJ68ZTYEiYP4vNKSCV6UfQ+vaaRNgLwiAx7JXzY54awg== +"@aws-sdk/service-error-classification@3.168.0": + version "3.168.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/service-error-classification/-/service-error-classification-3.168.0.tgz#e5c5879dae22ba7a3e2340933e2136407813eabc" + integrity sha512-cW1U3YMMRLukx5/Fl7NpCsaFgcDkOOZVUaW2qLghJOakt1dc6OwgtPlS7toC9A7zjMIovqYwcksHO5mCyqrPlA== -"@aws-sdk/shared-ini-file-loader@3.162.0": - version "3.162.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/shared-ini-file-loader/-/shared-ini-file-loader-3.162.0.tgz#53bc40d774f4411200104e415cbe27a3dea110f7" - integrity sha512-AGxISXns+1o6Pw+SPizFJDTw4Lwm+JSwhycCNhFU3JfdLsKfLY08JV4JHlcc+TyY4a8HhnGvE3r5t2f2dPLIsA== +"@aws-sdk/shared-ini-file-loader@3.168.0": + version "3.168.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/shared-ini-file-loader/-/shared-ini-file-loader-3.168.0.tgz#c1f5f9c87d41400272edc0c8b4b2df0acd782820" + integrity sha512-K97HWEySV6HJC4CLyimVuqit4FILW4BtTU62jCaEwoPvg1XPAolCzzWfLClJ0GWfyf32+o30wJj8SgHuIuN2Qw== dependencies: tslib "^2.3.1" -"@aws-sdk/signature-v4@3.163.0": - version "3.163.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/signature-v4/-/signature-v4-3.163.0.tgz#6a083fd0fe285b07ca71fc88990c7a9440b7c0b2" - integrity sha512-1iein+7iAHKcRIXaZhl/lG6JrOR/Qmk27zMqfARzxDF7o/W5arSs3DHIKytO1sOEn9zV6Mqm21dRAumD21VCCg== +"@aws-sdk/signature-v4@3.168.0": + version "3.168.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/signature-v4/-/signature-v4-3.168.0.tgz#4488efb8436db3cab01b8808ea6b988ab81ed01c" + integrity sha512-jb98UrZ4d07Wr1mUVDY1HRlbEOVoPFZ38e4k20AUEXybxhsvlQhfAfaDITFg3UwMO978m4VAsjpzw8h8WGsNQw== dependencies: - "@aws-sdk/is-array-buffer" "3.55.0" - "@aws-sdk/types" "3.162.0" - "@aws-sdk/util-hex-encoding" "3.109.0" - "@aws-sdk/util-middleware" "3.162.0" - "@aws-sdk/util-uri-escape" "3.55.0" + "@aws-sdk/is-array-buffer" "3.168.0" + "@aws-sdk/types" "3.168.0" + "@aws-sdk/util-hex-encoding" "3.168.0" + "@aws-sdk/util-middleware" "3.168.0" + "@aws-sdk/util-uri-escape" "3.168.0" tslib "^2.3.1" -"@aws-sdk/smithy-client@3.162.0", "@aws-sdk/smithy-client@^3.50.0": - version "3.162.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/smithy-client/-/smithy-client-3.162.0.tgz#2646b05c287a609a1abb7d28a7009f3314c26803" - integrity sha512-o7CwdhPvzYMvHY5dTzL2kqN8Zsl2D8pZ1mG2dPdQW9hYnutLOFK1HVv5dIzoSkp3jUwVGh6AXd1i4ZSb2d0LrA== +"@aws-sdk/smithy-client@3.168.0", "@aws-sdk/smithy-client@^3.50.0": + version "3.168.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/smithy-client/-/smithy-client-3.168.0.tgz#c16045468c8878454a6228376cdc1535004ac590" + integrity sha512-B2wuTg5ymTYA7eVkt73bdRlWNWvdWNRY3QQizTWn0Ch3nOZXyVZSdH4mGmuWcpiQXEX/YYGmTLY7nCKWrk1E6Q== dependencies: - "@aws-sdk/middleware-stack" "3.162.0" - "@aws-sdk/types" "3.162.0" + "@aws-sdk/middleware-stack" "3.168.0" + "@aws-sdk/types" "3.168.0" tslib "^2.3.1" -"@aws-sdk/types@3.162.0", "@aws-sdk/types@^3.1.0", "@aws-sdk/types@^3.50.0": - version "3.162.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/types/-/types-3.162.0.tgz#e908ff1a5de6bd06d7d6b88a648b384592acf7e2" - integrity sha512-NBmuwVujH8fURDMvBHkHrYu/JAfG6Js/Bu0mC4o2Kdo5mRa3fD/N9kK0dEAxU1Rxp4wY2E++V9j2ZCw1KBGrSg== +"@aws-sdk/types@3.168.0", "@aws-sdk/types@^3.1.0", "@aws-sdk/types@^3.110.0", "@aws-sdk/types@^3.50.0": + version "3.168.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/types/-/types-3.168.0.tgz#0c5734b94033a15ddec3723afc9ed99d40315620" + integrity sha512-J9VmQAakmqrdYKt3N0T/zQR6ZkfvQ7Y3WufjEWRTdslYcQ9f7UyI93Q21baCHvgcp3E5c4w62x18o6mEA/cHPQ== -"@aws-sdk/url-parser@3.162.0": - version "3.162.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/url-parser/-/url-parser-3.162.0.tgz#ce341d3b6dbcaf52f00b80aff56b24b5ab8c1e82" - integrity sha512-aJQ2awXYDceLAzPMQETpvI1XQd8oYuqH1EriFzXHqoJTNmYnHb7awtKSqwaS8pq48x1rS/eVtJAi85BG93fXyw== +"@aws-sdk/url-parser@3.168.0": + version "3.168.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/url-parser/-/url-parser-3.168.0.tgz#16958e36c93ebcecbed809ad9a5d8af0f40b186d" + integrity sha512-spFHA6NpsmAF3NCYyljjvl7uavHRvFDCNN32ce9RuRUXXuK8emAtwzXW95OUqtgCcyyKIA5p5p+gujrT7Npmeg== dependencies: - "@aws-sdk/querystring-parser" "3.162.0" - "@aws-sdk/types" "3.162.0" + "@aws-sdk/querystring-parser" "3.168.0" + "@aws-sdk/types" "3.168.0" tslib "^2.3.1" -"@aws-sdk/util-base64-browser@3.109.0": - version "3.109.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/util-base64-browser/-/util-base64-browser-3.109.0.tgz#e7faf5c4cbb88bc39b9c1c5a1a79e4c869e9f645" - integrity sha512-lAZ6fyDGiRLaIsKT9qh7P9FGuNyZ4gAbr1YOSQk/5mHtaTuUvxlPptZuInNM/0MPQm6lpcot00D8IWTucn4PbA== +"@aws-sdk/util-base64-browser@3.168.0": + version "3.168.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/util-base64-browser/-/util-base64-browser-3.168.0.tgz#da17a371f96d65503f52c9f645d79052dfc54029" + integrity sha512-awyUvPXWbV5SrpUY8vTA58RTdTnDFJJmVlCXGB8JCtWYVuAQ5FfKA/K0ZD6p+AP6AsCgHSvXCuZm8vFyZldJ2Q== dependencies: tslib "^2.3.1" -"@aws-sdk/util-base64-node@3.55.0": - version "3.55.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/util-base64-node/-/util-base64-node-3.55.0.tgz#da9a3fd6752be49163572144793e6b23d0186ff4" - integrity sha512-UQ/ZuNoAc8CFMpSiRYmevaTsuRKzLwulZTnM8LNlIt9Wx1tpNvqp80cfvVj7yySKROtEi20wq29h31dZf1eYNQ== +"@aws-sdk/util-base64-node@3.168.0": + version "3.168.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/util-base64-node/-/util-base64-node-3.168.0.tgz#9c31efc306fe2c35cf655743831ecfd4d7dce39f" + integrity sha512-NqU7t3Fes0QngHwAZoIKeXyUZOoszEwGuerj1wZk6+Jd6X4L5NdBcBg8AA2VMyRdSFhCP+irgVRZrYSn0Ii66g== dependencies: - "@aws-sdk/util-buffer-from" "3.55.0" + "@aws-sdk/util-buffer-from" "3.168.0" tslib "^2.3.1" -"@aws-sdk/util-body-length-browser@3.154.0": - version "3.154.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/util-body-length-browser/-/util-body-length-browser-3.154.0.tgz#8c4c5d08c1923deeedf46006dc4db820ca606f56" - integrity sha512-TUuy7paVkBRQrB/XFCsL8iTW6g/ma0S3N8dYOiIMJdeTqTFryeyOGkBpYBgYFQL6zRMZpyu0jOM7GYEffGFOXw== +"@aws-sdk/util-body-length-browser@3.168.0": + version "3.168.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/util-body-length-browser/-/util-body-length-browser-3.168.0.tgz#670bdd6e94d94d310666524e91d664814bbb4e5a" + integrity sha512-s51E8ctLKCoLqcj4a1YsIVX1sMLwf1f9lNfhnE8H7U85BeqTAtjAifdejDdFtxS4ECF95cupzN6PgqFmgdrzpQ== dependencies: tslib "^2.3.1" -"@aws-sdk/util-body-length-node@3.55.0": - version "3.55.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/util-body-length-node/-/util-body-length-node-3.55.0.tgz#67049bbb6c62d794a1bb5a13b9a678988c925489" - integrity sha512-lU1d4I+9wJwydduXs0SxSfd+mHKjxeyd39VwOv6i2KSwWkPbji9UQqpflKLKw+r45jL7+xU/zfeTUg5Tt/3Gew== +"@aws-sdk/util-body-length-node@3.168.0": + version "3.168.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/util-body-length-node/-/util-body-length-node-3.168.0.tgz#e9121883bbcfc22035fd567d6285ad352a51b267" + integrity sha512-vKG9iylTshwzHsVsRpx3oLDMtBvG47b3TIMGQFSuCDPEwD91+s1ORe3r+RxJIWDYJtmw5Y5ZPveYib4p4rWSUQ== dependencies: tslib "^2.3.1" -"@aws-sdk/util-buffer-from@3.55.0": - version "3.55.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/util-buffer-from/-/util-buffer-from-3.55.0.tgz#e7c927974b07a29502aa1ad58509b91d0d7cf0f7" - integrity sha512-uVzKG1UgvnV7XX2FPTylBujYMKBPBaq/qFBxfl0LVNfrty7YjpfieQxAe6yRLD+T0Kir/WDQwGvYC+tOYG3IGA== +"@aws-sdk/util-buffer-from@3.168.0": + version "3.168.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/util-buffer-from/-/util-buffer-from-3.168.0.tgz#18bc11f81a5cc30c56ca17784a6e6e73084efc32" + integrity sha512-NDQIBdJfK95N/zewOcEJC9NqNVRXzWHrgKJTdCTW4UuRBADg3YTeDmqmNA2TUaWydQZa0ubpX3JyaKz4l3DDZw== dependencies: - "@aws-sdk/is-array-buffer" "3.55.0" + "@aws-sdk/is-array-buffer" "3.168.0" tslib "^2.3.1" -"@aws-sdk/util-config-provider@3.109.0": - version "3.109.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/util-config-provider/-/util-config-provider-3.109.0.tgz#7828b8894b2b23c289ffc5c106cbced7a5d6ee86" - integrity sha512-GrAZl/aBv0A28LkyNyq8SPJ5fmViCwz80fWLMeWx/6q5AbivuILogjlWwEZSvZ9zrlHOcFC0+AnCa5pQrjaslw== +"@aws-sdk/util-config-provider@3.168.0": + version "3.168.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/util-config-provider/-/util-config-provider-3.168.0.tgz#4eaf6dc1ee612d89876335c3c45dfb64b77d57c3" + integrity sha512-4AyBOlV2w8fqQ1Os9khnjrsAogBN7ou0bRS1Q34Y9zwtFL+T+xhHO0pp9+Yfw+E6s2Uy3DZWbq8PWyBZze6nuw== dependencies: tslib "^2.3.1" -"@aws-sdk/util-defaults-mode-browser@3.162.0": - version "3.162.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/util-defaults-mode-browser/-/util-defaults-mode-browser-3.162.0.tgz#41625d5ea4d3d347df00cc5647a0808fcb059c94" - integrity sha512-BjhuriainNy0ezFqCK//380Wc4xsJJOnq1tmPlHScQxp3g8ucfClvjOUi96XQaTrEf8c8EsYp77+JNsvrHytmw== +"@aws-sdk/util-defaults-mode-browser@3.168.0": + version "3.168.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/util-defaults-mode-browser/-/util-defaults-mode-browser-3.168.0.tgz#2430e83d98c3674d2b9b5584c5b0a05810951936" + integrity sha512-5lB9eDMkaittKbdugurzJx32quGrQar+ki3oebjJQZl4/gsDVRqOT9qwz95RVeXdEIUdA4U3T/1OgSNUT9aMyA== dependencies: - "@aws-sdk/property-provider" "3.162.0" - "@aws-sdk/types" "3.162.0" + "@aws-sdk/property-provider" "3.168.0" + "@aws-sdk/types" "3.168.0" bowser "^2.11.0" tslib "^2.3.1" -"@aws-sdk/util-defaults-mode-node@3.163.0": - version "3.163.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/util-defaults-mode-node/-/util-defaults-mode-node-3.163.0.tgz#9cb4d5b0b1beb9573b11289eee46c762d3a9c0bd" - integrity sha512-IM5BVeUXzLpb9m8qBSpUc2iO+topP1F7Ojq1GNrl5G/b22f7b1FCL5qkTem/UIXkkgI+efI7jr05xPRGiU73Hg== +"@aws-sdk/util-defaults-mode-node@3.168.0": + version "3.168.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/util-defaults-mode-node/-/util-defaults-mode-node-3.168.0.tgz#6f97897eab510b1c7615bb8d822ae26fca5dc297" + integrity sha512-462U5waEl495rP0WaKHXS6rrKHusMMBYvHzMzD3/gpSEwMZti0ZWLzhHNRcWp7d3uRVVdAsjF4UM6QwhJrScmA== dependencies: - "@aws-sdk/config-resolver" "3.163.0" - "@aws-sdk/credential-provider-imds" "3.162.0" - "@aws-sdk/node-config-provider" "3.162.0" - "@aws-sdk/property-provider" "3.162.0" - "@aws-sdk/types" "3.162.0" + "@aws-sdk/config-resolver" "3.168.0" + "@aws-sdk/credential-provider-imds" "3.168.0" + "@aws-sdk/node-config-provider" "3.168.0" + "@aws-sdk/property-provider" "3.168.0" + "@aws-sdk/types" "3.168.0" tslib "^2.3.1" -"@aws-sdk/util-dynamodb@3.163.0", "@aws-sdk/util-dynamodb@^3.50.0": - version "3.163.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/util-dynamodb/-/util-dynamodb-3.163.0.tgz#5b5749ba34892cfc8cc9cf99df304839ff03e548" - integrity sha512-Z+4lFv/fBWW/HY9KPPg1K8GLIXCyJYqKLpAdVh5+1AvkvaWf7JXfTL6If4WMVptNW0cEwFu903+RWKJHEFriVA== +"@aws-sdk/util-dynamodb@3.169.0", "@aws-sdk/util-dynamodb@^3.50.0": + version "3.169.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/util-dynamodb/-/util-dynamodb-3.169.0.tgz#ac82d58e9792edfb4eaf196e50a64fd5d93b66e2" + integrity sha512-9S6E/W0/I+jEJl2zgN1F/p/tCQ3cfwlGC1Ww6+mcMVjtQFGXqo1nyZ/dlGDMWD7yqbKurrhlUF7WphCV9UIyAw== dependencies: tslib "^2.3.1" -"@aws-sdk/util-hex-encoding@3.109.0": - version "3.109.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/util-hex-encoding/-/util-hex-encoding-3.109.0.tgz#93b20acc27c0a1d7d80f653bf19d3dd01c2ccc65" - integrity sha512-s8CgTNrn3cLkrdiohfxLuOYPCanzvHn/aH5RW6DaMoeQiG5Hl9QUiP/WtdQ9QQx3xvpQFpmvxIaSBwSgFNLQxA== +"@aws-sdk/util-hex-encoding@3.168.0": + version "3.168.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/util-hex-encoding/-/util-hex-encoding-3.168.0.tgz#66d0ae56305080525fd48ad5ea6d07ba2e3afd23" + integrity sha512-KmJkd0eKXGd2z5h2N0yV6WUBqulwumq2eppv6pYrVfyQc0bBwSOYRG0NcXDvQB7rd+spbQjgbeqrHnsk34fQbQ== dependencies: tslib "^2.3.1" "@aws-sdk/util-locate-window@^3.0.0": - version "3.55.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/util-locate-window/-/util-locate-window-3.55.0.tgz#a4136a20ee1bfcb73967a6614caf769ef79db070" - integrity sha512-0sPmK2JaJE2BbTcnvybzob/VrFKCXKfN4CUKcvn0yGg/me7Bz+vtzQRB3Xp+YSx+7OtWxzv63wsvHoAnXvgxgg== + version "3.168.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/util-locate-window/-/util-locate-window-3.168.0.tgz#50e2eb5f29f9ecbc41da05b1e893f20603a14709" + integrity sha512-bCKN6rbTTA41cqm7TYuiSkXR8peSXR/t8GioeEOExPESNgR7kuwVU4pQ2LZYjnD1HqLtz3FKKKddvBJhmqpG8Q== dependencies: tslib "^2.3.1" -"@aws-sdk/util-middleware@3.162.0": - version "3.162.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/util-middleware/-/util-middleware-3.162.0.tgz#5e38b45b52b731ec4be7b3eb65e8097e70a8a844" - integrity sha512-jDqZZ5nst+NtzvAPIQBdQqGY14Z3HeGANGm5NUoxWp8IlHnEV7GhTFDjFgubf8mgTBCzHnvbuBY1bfkzAeXWBA== +"@aws-sdk/util-middleware@3.168.0": + version "3.168.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/util-middleware/-/util-middleware-3.168.0.tgz#aadec886e3733fe0297b3e661a30e1b406df9cae" + integrity sha512-PInwsmxfXj4HhZytF5kZP6BYJ3mVW2QTzxSnKobkIfRnZHwBEGL74voaArfbbAfqvxzptDY6x4vo4N5Mo7M4hA== dependencies: tslib "^2.3.1" -"@aws-sdk/util-uri-escape@3.55.0": - version "3.55.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/util-uri-escape/-/util-uri-escape-3.55.0.tgz#ee57743c628a1c9f942dfe73205ce890ec011916" - integrity sha512-mmdDLUpFCN2nkfwlLdOM54lTD528GiGSPN1qb8XtGLgZsJUmg3uJSFIN2lPeSbEwJB3NFjVas/rnQC48i7mV8w== +"@aws-sdk/util-uri-escape@3.168.0": + version "3.168.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/util-uri-escape/-/util-uri-escape-3.168.0.tgz#82d479bd2f197bf25691371b1af5e66230b2e5e2" + integrity sha512-EnNdhxRif4B4PM+CQcq+2s+dRiYVBPMZHZepq6W/eSOvZfW/T8BvDjUzRW9NjGV/Ld3XKk6dMuoWmBKt7J6I7g== dependencies: tslib "^2.3.1" -"@aws-sdk/util-user-agent-browser@3.162.0": - version "3.162.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/util-user-agent-browser/-/util-user-agent-browser-3.162.0.tgz#735a3611e65df0c4b8a416bbb096e56d0b43f5c9" - integrity sha512-FNmC2ywy1u3tbUSVCSkCwLvcbjIvj5EzAtF6I2wrMTI5PfaxVIQapKn2EecoVQgf4lsZqvGjyTxbl7SYvf9fxw== +"@aws-sdk/util-user-agent-browser@3.168.0": + version "3.168.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/util-user-agent-browser/-/util-user-agent-browser-3.168.0.tgz#b8c019d801698e3e9cfbd5c2f6ce3d5d2c48030e" + integrity sha512-wh3E0FXLzCbpgsi/+NQn2dK/nD//lOKAndzyPsx1uXvKAiqQCkIqAPz5fiGuSkYBZHkjvRxTNSXjL+1tJn+lVQ== dependencies: - "@aws-sdk/types" "3.162.0" + "@aws-sdk/types" "3.168.0" bowser "^2.11.0" tslib "^2.3.1" -"@aws-sdk/util-user-agent-node@3.162.0": - version "3.162.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/util-user-agent-node/-/util-user-agent-node-3.162.0.tgz#3c589c1ad1ce2821c9568dd12bb5632b8eb776be" - integrity sha512-OIbZlccBFwITDQJoymU0V+yqqyPEbJUExJzeiP9bxJ58h7Jxj/da24cxCMaVDYvjhP/PoflOmC5Xblonaeg+oQ== +"@aws-sdk/util-user-agent-node@3.168.0": + version "3.168.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/util-user-agent-node/-/util-user-agent-node-3.168.0.tgz#a151c2328412f545ba9a5d28883c1a6fe1807faf" + integrity sha512-grL671IO1kkAD3BjofoN0SJE0ldrHjEbevIa4i9eif/Y3LIoCgmUP6tUtRzR7K9CDdjeGuvo0vJ9HfwZWH/B/g== dependencies: - "@aws-sdk/node-config-provider" "3.162.0" - "@aws-sdk/types" "3.162.0" + "@aws-sdk/node-config-provider" "3.168.0" + "@aws-sdk/types" "3.168.0" tslib "^2.3.1" -"@aws-sdk/util-utf8-browser@3.109.0", "@aws-sdk/util-utf8-browser@^3.0.0": - version "3.109.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/util-utf8-browser/-/util-utf8-browser-3.109.0.tgz#d013272e1981b23a4c84ac06f154db686c0cf84e" - integrity sha512-FmcGSz0v7Bqpl1SE8G1Gc0CtDpug+rvqNCG/szn86JApD/f5x8oByjbEiAyTU2ZH2VevUntx6EW68ulHyH+x+w== +"@aws-sdk/util-utf8-browser@3.168.0", "@aws-sdk/util-utf8-browser@^3.0.0": + version "3.168.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/util-utf8-browser/-/util-utf8-browser-3.168.0.tgz#28b3430c97410e2974dc2f26c2dbeddc4d028bfe" + integrity sha512-ZXEnVC/AcBdf2wQrITq4bkLnwiPKoBnhJwfPjZdpMHsDssKLquaHQf+QLOB/2s2U+jxl6c2Q7+rL4dv7x545Bg== dependencies: tslib "^2.3.1" -"@aws-sdk/util-utf8-node@3.109.0": - version "3.109.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/util-utf8-node/-/util-utf8-node-3.109.0.tgz#89e06d916f5b246c7265f59bac742973ac0767ac" - integrity sha512-Ti/ZBdvz2eSTElsucjzNmzpyg2MwfD1rXmxD0hZuIF8bPON/0+sZYnWd5CbDw9kgmhy28dmKue086tbZ1G0iLQ== +"@aws-sdk/util-utf8-node@3.168.0": + version "3.168.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/util-utf8-node/-/util-utf8-node-3.168.0.tgz#7b28e256ad24d82d85ba7de0fe40fa9ab6c08d81" + integrity sha512-m9EfLgh0QQrgJfuYowPQW2+a3f848F92cVTnCyeUtjiT59lkW9QPJhVVajRcfmNUUT4S/ikxvmkhzDzzMYH+gA== dependencies: - "@aws-sdk/util-buffer-from" "3.55.0" + "@aws-sdk/util-buffer-from" "3.168.0" tslib "^2.3.1" -"@aws-sdk/util-waiter@3.162.0": - version "3.162.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/util-waiter/-/util-waiter-3.162.0.tgz#369499ec934a47aa8f0340876a9228e6d8989736" - integrity sha512-RDMimLdgffkBiFjXyGO0DYjUhDisBHx5OZIaj57bCWRqvMj4lSz5+eS3fpVEZaRDFo/P3i/86lvjPEqXStTlZA== +"@aws-sdk/util-waiter@3.168.0": + version "3.168.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/util-waiter/-/util-waiter-3.168.0.tgz#0138d481d115dd99b3a1d42ccd59a284c2ee82c5" + integrity sha512-RdUapfJHeqjVeFtafKY+PLvKxEKi2IS+rt475YRoDGqzTegJLV1BO89j4wq/VWyGVljvpRI2/6RqG2Q0K/ozPA== dependencies: - "@aws-sdk/abort-controller" "3.162.0" - "@aws-sdk/types" "3.162.0" + "@aws-sdk/abort-controller" "3.168.0" + "@aws-sdk/types" "3.168.0" tslib "^2.3.1" "@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.18.6": @@ -735,47 +735,47 @@ dependencies: "@babel/highlight" "^7.18.6" -"@babel/compat-data@^7.18.8": - version "7.18.13" - resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.18.13.tgz#6aff7b350a1e8c3e40b029e46cbe78e24a913483" - integrity sha512-5yUzC5LqyTFp2HLmDoxGQelcdYgSpP9xsnMWBphAscOdFrHSAVbLNzWiy32sVNDqJRDiJK6klfDnAgu6PAGSHw== +"@babel/compat-data@^7.19.0": + version "7.19.0" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.19.0.tgz#2a592fd89bacb1fcde68de31bee4f2f2dacb0e86" + integrity sha512-y5rqgTTPTmaF5e2nVhOxw+Ur9HDJLsWb6U/KpgUzRZEdPfE6VOubXBKLdbcUTijzRptednSBDQbYZBOSqJxpJw== "@babel/core@^7.11.6", "@babel/core@^7.12.3": - version "7.18.13" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.18.13.tgz#9be8c44512751b05094a4d3ab05fc53a47ce00ac" - integrity sha512-ZisbOvRRusFktksHSG6pjj1CSvkPkcZq/KHD45LAkVP/oiHJkNBZWfpvlLmX8OtHDG8IuzsFlVRWo08w7Qxn0A== + version "7.19.0" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.19.0.tgz#d2f5f4f2033c00de8096be3c9f45772563e150c3" + integrity sha512-reM4+U7B9ss148rh2n1Qs9ASS+w94irYXga7c2jaQv9RVzpS7Mv1a9rnYYwuDa45G+DkORt9g6An2k/V4d9LbQ== dependencies: "@ampproject/remapping" "^2.1.0" "@babel/code-frame" "^7.18.6" - "@babel/generator" "^7.18.13" - "@babel/helper-compilation-targets" "^7.18.9" - "@babel/helper-module-transforms" "^7.18.9" - "@babel/helpers" "^7.18.9" - "@babel/parser" "^7.18.13" + "@babel/generator" "^7.19.0" + "@babel/helper-compilation-targets" "^7.19.0" + "@babel/helper-module-transforms" "^7.19.0" + "@babel/helpers" "^7.19.0" + "@babel/parser" "^7.19.0" "@babel/template" "^7.18.10" - "@babel/traverse" "^7.18.13" - "@babel/types" "^7.18.13" + "@babel/traverse" "^7.19.0" + "@babel/types" "^7.19.0" convert-source-map "^1.7.0" debug "^4.1.0" gensync "^1.0.0-beta.2" json5 "^2.2.1" semver "^6.3.0" -"@babel/generator@^7.18.13", "@babel/generator@^7.7.2": - version "7.18.13" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.18.13.tgz#59550cbb9ae79b8def15587bdfbaa388c4abf212" - integrity sha512-CkPg8ySSPuHTYPJYo7IRALdqyjM9HCbt/3uOBEFbzyGVP6Mn8bwFPB0jX6982JVNBlYzM1nnPkfjuXSOPtQeEQ== +"@babel/generator@^7.19.0", "@babel/generator@^7.7.2": + version "7.19.0" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.19.0.tgz#785596c06425e59334df2ccee63ab166b738419a" + integrity sha512-S1ahxf1gZ2dpoiFgA+ohK9DIpz50bJ0CWs7Zlzb54Z4sG8qmdIrGrVqmy1sAtTVRb+9CU6U8VqT9L0Zj7hxHVg== dependencies: - "@babel/types" "^7.18.13" + "@babel/types" "^7.19.0" "@jridgewell/gen-mapping" "^0.3.2" jsesc "^2.5.1" -"@babel/helper-compilation-targets@^7.18.9": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.18.9.tgz#69e64f57b524cde3e5ff6cc5a9f4a387ee5563bf" - integrity sha512-tzLCyVmqUiFlcFoAPLA/gL9TeYrF61VLNtb+hvkuVaB5SUjW7jcfrglBIX1vUIoT7CLP3bBlIMeyEsIl2eFQNg== +"@babel/helper-compilation-targets@^7.19.0": + version "7.19.0" + resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.19.0.tgz#537ec8339d53e806ed422f1e06c8f17d55b96bb0" + integrity sha512-Ai5bNWXIvwDvWM7njqsG3feMlL9hCVQsPYXodsZyLwshYkZVJt59Gftau4VrE8S9IT9asd2uSP1hG6wCNw+sXA== dependencies: - "@babel/compat-data" "^7.18.8" + "@babel/compat-data" "^7.19.0" "@babel/helper-validator-option" "^7.18.6" browserslist "^4.20.2" semver "^6.3.0" @@ -785,13 +785,13 @@ resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.9.tgz#0c0cee9b35d2ca190478756865bb3528422f51be" integrity sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg== -"@babel/helper-function-name@^7.18.9": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.18.9.tgz#940e6084a55dee867d33b4e487da2676365e86b0" - integrity sha512-fJgWlZt7nxGksJS9a0XdSaI4XvpExnNIgRP+rVefWh5U7BL8pPuir6SJUmFKRfjWQ51OtWSzwOxhaH/EBWWc0A== +"@babel/helper-function-name@^7.19.0": + version "7.19.0" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.19.0.tgz#941574ed5390682e872e52d3f38ce9d1bef4648c" + integrity sha512-WAwHBINyrpqywkUH0nTnNgI5ina5TFn85HKS0pbPDfxFfhyR/aNQEn4hGi1P1JyT//I0t4OgXUlofzWILRvS5w== dependencies: - "@babel/template" "^7.18.6" - "@babel/types" "^7.18.9" + "@babel/template" "^7.18.10" + "@babel/types" "^7.19.0" "@babel/helper-hoist-variables@^7.18.6": version "7.18.6" @@ -807,24 +807,24 @@ dependencies: "@babel/types" "^7.18.6" -"@babel/helper-module-transforms@^7.18.9": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.18.9.tgz#5a1079c005135ed627442df31a42887e80fcb712" - integrity sha512-KYNqY0ICwfv19b31XzvmI/mfcylOzbLtowkw+mfvGPAQ3kfCnMLYbED3YecL5tPd8nAYFQFAd6JHp2LxZk/J1g== +"@babel/helper-module-transforms@^7.19.0": + version "7.19.0" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.19.0.tgz#309b230f04e22c58c6a2c0c0c7e50b216d350c30" + integrity sha512-3HBZ377Fe14RbLIA+ac3sY4PTgpxHVkFrESaWhoI5PuyXPBBX8+C34qblV9G89ZtycGJCmCI/Ut+VUDK4bltNQ== dependencies: "@babel/helper-environment-visitor" "^7.18.9" "@babel/helper-module-imports" "^7.18.6" "@babel/helper-simple-access" "^7.18.6" "@babel/helper-split-export-declaration" "^7.18.6" "@babel/helper-validator-identifier" "^7.18.6" - "@babel/template" "^7.18.6" - "@babel/traverse" "^7.18.9" - "@babel/types" "^7.18.9" + "@babel/template" "^7.18.10" + "@babel/traverse" "^7.19.0" + "@babel/types" "^7.19.0" "@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.18.6", "@babel/helper-plugin-utils@^7.8.0": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.18.9.tgz#4b8aea3b069d8cb8a72cdfe28ddf5ceca695ef2f" - integrity sha512-aBXPT3bmtLryXaoJLyYPXPlSD4p1ld9aYeR+sJNOZjJJGiOpb+fKfh3NkcCu7J54nUJwCERPBExCCpyCOHnu/w== + version "7.19.0" + resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.19.0.tgz#4796bb14961521f0f8715990bee2fb6e51ce21bf" + integrity sha512-40Ryx7I8mT+0gaNxm8JGTZFUITNqdLAgdg0hXzeVZxVD6nFsdhQvip6v8dqkRHzsz1VFpFAaOCHNn0vKBL7Czw== "@babel/helper-simple-access@^7.18.6": version "7.18.6" @@ -855,14 +855,14 @@ resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.18.6.tgz#bf0d2b5a509b1f336099e4ff36e1a63aa5db4db8" integrity sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw== -"@babel/helpers@^7.18.9": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.18.9.tgz#4bef3b893f253a1eced04516824ede94dcfe7ff9" - integrity sha512-Jf5a+rbrLoR4eNdUmnFu8cN5eNJT6qdTdOg5IHIzq87WwyRw9PwguLFOWYgktN/60IP4fgDUawJvs7PjQIzELQ== +"@babel/helpers@^7.19.0": + version "7.19.0" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.19.0.tgz#f30534657faf246ae96551d88dd31e9d1fa1fc18" + integrity sha512-DRBCKGwIEdqY3+rPJgG/dKfQy9+08rHIAJx8q2p+HSWP87s2HCrQmaAMMyMll2kIXKCW0cO1RdQskx15Xakftg== dependencies: - "@babel/template" "^7.18.6" - "@babel/traverse" "^7.18.9" - "@babel/types" "^7.18.9" + "@babel/template" "^7.18.10" + "@babel/traverse" "^7.19.0" + "@babel/types" "^7.19.0" "@babel/highlight@^7.18.6": version "7.18.6" @@ -873,10 +873,10 @@ chalk "^2.0.0" js-tokens "^4.0.0" -"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.18.10", "@babel/parser@^7.18.13": - version "7.18.13" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.18.13.tgz#5b2dd21cae4a2c5145f1fbd8ca103f9313d3b7e4" - integrity sha512-dgXcIfMuQ0kgzLB2b9tRZs7TTFFaGM2AbtA4fJgUUYukzGH4jwsS7hzQHEGs67jdehpm22vkgKwvbU+aEflgwg== +"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.18.10", "@babel/parser@^7.19.0": + version "7.19.0" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.19.0.tgz#497fcafb1d5b61376959c1c338745ef0577aa02c" + integrity sha512-74bEXKX2h+8rrfQUfsBfuZZHzsEs6Eql4pqy/T4Nn6Y9wNPggQOqD6z6pn5Bl8ZfysKouFZT/UXEH94ummEeQw== "@babel/plugin-syntax-async-generators@^7.8.4": version "7.8.4" @@ -976,7 +976,7 @@ dependencies: "@babel/helper-plugin-utils" "^7.18.6" -"@babel/template@^7.18.10", "@babel/template@^7.18.6", "@babel/template@^7.3.3": +"@babel/template@^7.18.10", "@babel/template@^7.3.3": version "7.18.10" resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.18.10.tgz#6f9134835970d1dbf0835c0d100c9f38de0c5e71" integrity sha512-TI+rCtooWHr3QJ27kJxfjutghu44DLnasDMwpDqCXVTal9RLp3RSYNh4NdBrRP2cQAoG9A8juOQl6P6oZG4JxA== @@ -985,26 +985,26 @@ "@babel/parser" "^7.18.10" "@babel/types" "^7.18.10" -"@babel/traverse@^7.18.13", "@babel/traverse@^7.18.9", "@babel/traverse@^7.7.2": - version "7.18.13" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.18.13.tgz#5ab59ef51a997b3f10c4587d648b9696b6cb1a68" - integrity sha512-N6kt9X1jRMLPxxxPYWi7tgvJRH/rtoU+dbKAPDM44RFHiMH8igdsaSBgFeskhSl/kLWLDUvIh1RXCrTmg0/zvA== +"@babel/traverse@^7.19.0", "@babel/traverse@^7.7.2": + version "7.19.0" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.19.0.tgz#eb9c561c7360005c592cc645abafe0c3c4548eed" + integrity sha512-4pKpFRDh+utd2mbRC8JLnlsMUii3PMHjpL6a0SZ4NMZy7YFP9aXORxEhdMVOc9CpWtDF09IkciQLEhK7Ml7gRA== dependencies: "@babel/code-frame" "^7.18.6" - "@babel/generator" "^7.18.13" + "@babel/generator" "^7.19.0" "@babel/helper-environment-visitor" "^7.18.9" - "@babel/helper-function-name" "^7.18.9" + "@babel/helper-function-name" "^7.19.0" "@babel/helper-hoist-variables" "^7.18.6" "@babel/helper-split-export-declaration" "^7.18.6" - "@babel/parser" "^7.18.13" - "@babel/types" "^7.18.13" + "@babel/parser" "^7.19.0" + "@babel/types" "^7.19.0" debug "^4.1.0" globals "^11.1.0" -"@babel/types@^7.0.0", "@babel/types@^7.18.10", "@babel/types@^7.18.13", "@babel/types@^7.18.6", "@babel/types@^7.18.9", "@babel/types@^7.3.0", "@babel/types@^7.3.3": - version "7.18.13" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.18.13.tgz#30aeb9e514f4100f7c1cb6e5ba472b30e48f519a" - integrity sha512-ePqfTihzW0W6XAU+aMw2ykilisStJfDnsejDCXRchCcMJ4O0+8DhPXf2YUbZ6wjBlsEmZwLK/sPweWtu8hcJYQ== +"@babel/types@^7.0.0", "@babel/types@^7.18.10", "@babel/types@^7.18.6", "@babel/types@^7.19.0", "@babel/types@^7.3.0", "@babel/types@^7.3.3": + version "7.19.0" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.19.0.tgz#75f21d73d73dc0351f3368d28db73465f4814600" + integrity sha512-YuGopBq3ke25BVSiS6fgF49Ul9gH1x70Bcr6bqRLjWCkcX8Hre1/5+z+IiWOIerRMSSEfGZVB9z9kyq7wVs9YA== dependencies: "@babel/helper-string-parser" "^7.18.10" "@babel/helper-validator-identifier" "^7.18.6" @@ -1032,10 +1032,10 @@ resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.15.6.tgz#45be4184f00e505411bc265a05e709764114acd8" integrity sha512-hqmVU2mUjH6J2ZivHphJ/Pdse2ZD+uGCHK0uvsiLDk/JnSedEVj77CiVUnbMKuU4tih1TZZL8tG9DExQg/GZsw== -"@eslint/eslintrc@^1.3.1": - version "1.3.1" - resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-1.3.1.tgz#de0807bfeffc37b964a7d0400e0c348ce5a2543d" - integrity sha512-OhSY22oQQdw3zgPOOwdoj01l/Dzl1Z+xyUP33tkSN+aqyEhymJCcPHyXt+ylW8FSe0TfRC2VG+ROQOapD0aZSQ== +"@eslint/eslintrc@^1.3.2": + version "1.3.2" + resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-1.3.2.tgz#58b69582f3b7271d8fa67fe5251767a5b38ea356" + integrity sha512-AXYd23w1S/bv3fTs3Lz0vjiYemS08jWkI3hYyS9I1ry+0f+Yjs1wm+sU0BS8qDOPrBIkp4qHYC16I8uVtpLajQ== dependencies: ajv "^6.12.4" debug "^4.3.2" @@ -1094,9 +1094,9 @@ tslib "^2.4.0" "@graphql-tools/utils@^8.5.1": - version "8.10.1" - resolved "https://registry.yarnpkg.com/@graphql-tools/utils/-/utils-8.10.1.tgz#3224fe0611c9bb51e6a5c16472ae17afbd6c5465" - integrity sha512-UYi/afPvxZ8mz0LjplMxOSmGDPenVS/Q0zJ/6LOyF9yZdJYIDe+J+Qr/I9+rCYQmgBW4BJeRUUc7VoUzZPfZDA== + version "8.12.0" + resolved "https://registry.yarnpkg.com/@graphql-tools/utils/-/utils-8.12.0.tgz#243bc4f5fc2edbc9e8fd1038189e57d837cbe31f" + integrity sha512-TeO+MJWGXjUTS52qfK4R8HiPoF/R7X+qmgtOYd8DTH0l6b+5Y/tlg5aGeUJefqImRq7nvi93Ms40k/Uz4D5CWw== dependencies: tslib "^2.4.0" @@ -1537,9 +1537,9 @@ config-chain "^1.1.11" "@sinclair/typebox@^0.24.1": - version "0.24.34" - resolved "https://registry.yarnpkg.com/@sinclair/typebox/-/typebox-0.24.34.tgz#35b799cf98a203d1940c8ce06688f9a09fbc0f50" - integrity sha512-x3ejWKw7rpy30Bvm6U0AQMOHdjqe2E3YJrBHlTxH0KFsp77bBa+MH324nJxtXZFpnTy/JW2h5HPYVm0vG2WPnw== + version "0.24.41" + resolved "https://registry.yarnpkg.com/@sinclair/typebox/-/typebox-0.24.41.tgz#45470b8bae32a28f1e0501066d0bacbd8b772804" + integrity sha512-TJCgQurls4FipFvHeC+gfAzb+GGstL0TDwYJKQVtTeSvJIznWzP7g3bAd5gEBlr8+bIxqnWS9VGVWREDhmE8jA== "@sindresorhus/is@^5.2.0": version "5.3.0" @@ -1730,9 +1730,9 @@ integrity sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ== "@types/aws-lambda@^8.10.102", "@types/aws-lambda@^8.10.92": - version "8.10.102" - resolved "https://registry.yarnpkg.com/@types/aws-lambda/-/aws-lambda-8.10.102.tgz#d2402224ec30cdddfb669005c25b6ee01fd6f5be" - integrity sha512-BT05v46n9KtSHa9SgGuOvm49eSruJ9utD8iNXpdpuUVYk8wOcqmm1LEzpNRkrXxD0CULc38sdLpk6q3Wa2WOwg== + version "8.10.103" + resolved "https://registry.yarnpkg.com/@types/aws-lambda/-/aws-lambda-8.10.103.tgz#9f0d748036a206ebe4a3eb19febc53b52ee36352" + integrity sha512-mYWsrM5YPmnyJru7kMDX8RYSc486sDqVOP1kUdotthD3YjJ57iTBN3N7MMtL1qdVoPW2YmCnNnWscyidmPe6Gw== "@types/babel__core@^7.1.14": version "7.1.19" @@ -1851,9 +1851,9 @@ integrity sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ== "@types/node@*": - version "18.7.14" - resolved "https://registry.yarnpkg.com/@types/node/-/node-18.7.14.tgz#0fe081752a3333392d00586d815485a17c2cf3c9" - integrity sha512-6bbDaETVi8oyIARulOE9qF1/Qdi/23z6emrUh0fNJRUmjznqrixD4MpGDdgOFk5Xb0m2H6Xu42JGdvAxaJR/wA== + version "18.7.17" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.7.17.tgz#52438111ea98f77475470fc62d79b9eb96bb2c92" + integrity sha512-0UyfUnt02zIuqp7yC8RYtDkp/vo8bFaQ13KkSEvUAohPOAlnVNbj5Fi3fgPSuwzakS+EvvnnZ4x9y7i6ASaSPQ== "@types/node@^10.17.60": version "10.17.60" @@ -1861,9 +1861,9 @@ integrity sha512-F0KIgDJfy2nA3zMLmWGKxcH2ZVEtCZXHHdOQs2gSaQ27+lNeEfGxzkIw90aXswATX7AZ33tahPbzy6KAfUreVw== "@types/node@^14": - version "14.18.26" - resolved "https://registry.yarnpkg.com/@types/node/-/node-14.18.26.tgz#239e19f8b4ea1a9eb710528061c1d733dc561996" - integrity sha512-0b+utRBSYj8L7XAp0d+DX7lI4cSmowNaaTkk6/1SKzbKkG+doLuPusB9EOvzLJ8ahJSk03bTLIL6cWaEd4dBKA== + version "14.18.28" + resolved "https://registry.yarnpkg.com/@types/node/-/node-14.18.28.tgz#ddb82da2fff476a8e827e8773c84c19d9c235278" + integrity sha512-CK2fnrQlIgKlCV3N2kM+Gznb5USlwA1KFX3rJVHmgVk6NJxFPuQ86pAcvKnu37IA4BGlSRz7sEE1lHL1aLZ/eQ== "@types/normalize-package-data@^2.4.0": version "2.4.1" @@ -1875,7 +1875,7 @@ resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.7.0.tgz#ea03e9f0376a4446f44797ca19d9c46c36e352dc" integrity sha512-RI1L7N4JnW5gQw2spvL7Sllfuf1SaHdrZpCHiBlCXjIlufi1SMNnbu2teze3/QE67Fg2tBlH7W+mi4hVNk4p0A== -"@types/responselike@*", "@types/responselike@^1.0.0": +"@types/responselike@*", "@types/responselike@1.0.0", "@types/responselike@^1.0.0": version "1.0.0" resolved "https://registry.yarnpkg.com/@types/responselike/-/responselike-1.0.0.tgz#251f4fe7d154d2bad125abe1b429b23afd262e29" integrity sha512-85Y2BjiufFzaMIlvJDvTTB8Fxl2xfLo4HgmHzVBz08w4wDePCTjYw66PdrolO0kzli3yam/YCgRufyo1DdQVTA== @@ -1912,13 +1912,13 @@ "@types/yargs-parser" "*" "@typescript-eslint/eslint-plugin@^5": - version "5.36.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.36.1.tgz#471f64dc53600025e470dad2ca4a9f2864139019" - integrity sha512-iC40UK8q1tMepSDwiLbTbMXKDxzNy+4TfPWgIL661Ym0sD42vRcQU93IsZIrmi+x292DBr60UI/gSwfdVYexCA== + version "5.37.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.37.0.tgz#5ccdd5d9004120f28fc6e717fb4b5c9bddcfbc04" + integrity sha512-Fde6W0IafXktz1UlnhGkrrmnnGpAo1kyX7dnyHHVrmwJOn72Oqm3eYtddrpOwwel2W8PAK9F3pIL5S+lfoM0og== dependencies: - "@typescript-eslint/scope-manager" "5.36.1" - "@typescript-eslint/type-utils" "5.36.1" - "@typescript-eslint/utils" "5.36.1" + "@typescript-eslint/scope-manager" "5.37.0" + "@typescript-eslint/type-utils" "5.37.0" + "@typescript-eslint/utils" "5.37.0" debug "^4.3.4" functional-red-black-tree "^1.0.1" ignore "^5.2.0" @@ -1927,69 +1927,69 @@ tsutils "^3.21.0" "@typescript-eslint/parser@^5": - version "5.36.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.36.1.tgz#931c22c7bacefd17e29734628cdec8b2acdcf1ce" - integrity sha512-/IsgNGOkBi7CuDfUbwt1eOqUXF9WGVBW9dwEe1pi+L32XrTsZIgmDFIi2RxjzsvB/8i+MIf5JIoTEH8LOZ368A== + version "5.37.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.37.0.tgz#c382077973f3a4ede7453fb14cadcad3970cbf3b" + integrity sha512-01VzI/ipYKuaG5PkE5+qyJ6m02fVALmMPY3Qq5BHflDx3y4VobbLdHQkSMg9VPRS4KdNt4oYTMaomFoHonBGAw== dependencies: - "@typescript-eslint/scope-manager" "5.36.1" - "@typescript-eslint/types" "5.36.1" - "@typescript-eslint/typescript-estree" "5.36.1" + "@typescript-eslint/scope-manager" "5.37.0" + "@typescript-eslint/types" "5.37.0" + "@typescript-eslint/typescript-estree" "5.37.0" debug "^4.3.4" -"@typescript-eslint/scope-manager@5.36.1": - version "5.36.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.36.1.tgz#23c49b7ddbcffbe09082e6694c2524950766513f" - integrity sha512-pGC2SH3/tXdu9IH3ItoqciD3f3RRGCh7hb9zPdN2Drsr341zgd6VbhP5OHQO/reUqihNltfPpMpTNihFMarP2w== +"@typescript-eslint/scope-manager@5.37.0": + version "5.37.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.37.0.tgz#044980e4f1516a774a418dafe701a483a6c9f9ca" + integrity sha512-F67MqrmSXGd/eZnujjtkPgBQzgespu/iCZ+54Ok9X5tALb9L2v3G+QBSoWkXG0p3lcTJsL+iXz5eLUEdSiJU9Q== dependencies: - "@typescript-eslint/types" "5.36.1" - "@typescript-eslint/visitor-keys" "5.36.1" + "@typescript-eslint/types" "5.37.0" + "@typescript-eslint/visitor-keys" "5.37.0" -"@typescript-eslint/type-utils@5.36.1": - version "5.36.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.36.1.tgz#016fc2bff6679f54c0b2df848a493f0ca3d4f625" - integrity sha512-xfZhfmoQT6m3lmlqDvDzv9TiCYdw22cdj06xY0obSznBsT///GK5IEZQdGliXpAOaRL34o8phEvXzEo/VJx13Q== +"@typescript-eslint/type-utils@5.37.0": + version "5.37.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.37.0.tgz#43ed2f567ada49d7e33a6e4b6f9babd060445fe5" + integrity sha512-BSx/O0Z0SXOF5tY0bNTBcDEKz2Ec20GVYvq/H/XNKiUorUFilH7NPbFUuiiyzWaSdN3PA8JV0OvYx0gH/5aFAQ== dependencies: - "@typescript-eslint/typescript-estree" "5.36.1" - "@typescript-eslint/utils" "5.36.1" + "@typescript-eslint/typescript-estree" "5.37.0" + "@typescript-eslint/utils" "5.37.0" debug "^4.3.4" tsutils "^3.21.0" -"@typescript-eslint/types@5.36.1": - version "5.36.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.36.1.tgz#1cf0e28aed1cb3ee676917966eb23c2f8334ce2c" - integrity sha512-jd93ShpsIk1KgBTx9E+hCSEuLCUFwi9V/urhjOWnOaksGZFbTOxAT47OH2d4NLJnLhkVD+wDbB48BuaycZPLBg== +"@typescript-eslint/types@5.37.0": + version "5.37.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.37.0.tgz#09e4870a5f3af7af3f84e08d792644a87d232261" + integrity sha512-3frIJiTa5+tCb2iqR/bf7XwU20lnU05r/sgPJnRpwvfZaqCJBrl8Q/mw9vr3NrNdB/XtVyMA0eppRMMBqdJ1bA== -"@typescript-eslint/typescript-estree@5.36.1": - version "5.36.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.36.1.tgz#b857f38d6200f7f3f4c65cd0a5afd5ae723f2adb" - integrity sha512-ih7V52zvHdiX6WcPjsOdmADhYMDN15SylWRZrT2OMy80wzKbc79n8wFW0xpWpU0x3VpBz/oDgTm2xwDAnFTl+g== +"@typescript-eslint/typescript-estree@5.37.0": + version "5.37.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.37.0.tgz#956dcf5c98363bcb97bdd5463a0a86072ff79355" + integrity sha512-JkFoFIt/cx59iqEDSgIGnQpCTRv96MQnXCYvJi7QhBC24uyuzbD8wVbajMB1b9x4I0octYFJ3OwjAwNqk1AjDA== dependencies: - "@typescript-eslint/types" "5.36.1" - "@typescript-eslint/visitor-keys" "5.36.1" + "@typescript-eslint/types" "5.37.0" + "@typescript-eslint/visitor-keys" "5.37.0" debug "^4.3.4" globby "^11.1.0" is-glob "^4.0.3" semver "^7.3.7" tsutils "^3.21.0" -"@typescript-eslint/utils@5.36.1": - version "5.36.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.36.1.tgz#136d5208cc7a3314b11c646957f8f0b5c01e07ad" - integrity sha512-lNj4FtTiXm5c+u0pUehozaUWhh7UYKnwryku0nxJlYUEWetyG92uw2pr+2Iy4M/u0ONMKzfrx7AsGBTCzORmIg== +"@typescript-eslint/utils@5.37.0": + version "5.37.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.37.0.tgz#7784cb8e91390c4f90ccaffd24a0cf9874df81b2" + integrity sha512-jUEJoQrWbZhmikbcWSMDuUSxEE7ID2W/QCV/uz10WtQqfOuKZUqFGjqLJ+qhDd17rjgp+QJPqTdPIBWwoob2NQ== dependencies: "@types/json-schema" "^7.0.9" - "@typescript-eslint/scope-manager" "5.36.1" - "@typescript-eslint/types" "5.36.1" - "@typescript-eslint/typescript-estree" "5.36.1" + "@typescript-eslint/scope-manager" "5.37.0" + "@typescript-eslint/types" "5.37.0" + "@typescript-eslint/typescript-estree" "5.37.0" eslint-scope "^5.1.1" eslint-utils "^3.0.0" -"@typescript-eslint/visitor-keys@5.36.1": - version "5.36.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.36.1.tgz#7731175312d65738e501780f923896d200ad1615" - integrity sha512-ojB9aRyRFzVMN3b5joSYni6FAS10BBSCAfKJhjJAV08t/a95aM6tAhz+O1jF+EtgxktuSO3wJysp2R+Def/IWQ== +"@typescript-eslint/visitor-keys@5.37.0": + version "5.37.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.37.0.tgz#7b72dd343295ea11e89b624995abc7103c554eee" + integrity sha512-Hp7rT4cENBPIzMwrlehLW/28EVCOcE9U1Z1BQTc8EA8v5qpr7GRGuG+U58V5tTY48zvUOA3KHvw3rA8tY9fbdA== dependencies: - "@typescript-eslint/types" "5.36.1" + "@typescript-eslint/types" "5.37.0" eslint-visitor-keys "^3.3.0" JSONStream@^1.0.4: @@ -2164,9 +2164,9 @@ ansi-styles@^5.0.0: integrity sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA== ansi-styles@^6.1.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-6.1.0.tgz#87313c102b8118abd57371afab34618bf7350ed3" - integrity sha512-VbqNsoz55SYGczauuup0MFUyXNQviSpFTj1RQtFzmQLk18qbVSpTFFGMT293rmDaQuKCT6InmbuEyUne4mTuxQ== + version "6.1.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-6.1.1.tgz#63cd61c72283a71cb30bd881dbb60adada74bc70" + integrity sha512-qDOv24WjnYuL+wbwHdlsYZFy+cgPtrYw0Tn7GLORicQp9BkQLzrgI3Pm4VyR9ERZ41YTn7KlMPuL1n05WdZvmg== anymatch@^3.0.3: version "3.1.2" @@ -2352,9 +2352,9 @@ aws-cdk@2.28.1: fsevents "2.3.2" aws-sdk@^2, aws-sdk@^2.1079.0, aws-sdk@^2.1093.0, aws-sdk@^2.1113.0: - version "2.1209.0" - resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.1209.0.tgz#fd7b9efd4047ab6b45bba2c890529d4c296a4b85" - integrity sha512-m4Dd0HtyKeKBjwzP9rhe+NcmsRKR0wW+QXfpepu6vgXYhmcJuOB9TLUoeB7jiNDPimmwU+KxtL6eonRfeFhANw== + version "2.1214.0" + resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.1214.0.tgz#6a57945b5bc9db79f8ee5ed99128a06110a88f83" + integrity sha512-50WxqYgEDB5UxwPJ0IDFWXe3ipAHhHmqfRnMNaQaZhb2aJpprbT7c0zic8AH9E1xJ9s+6QkhYrwQf/vXEHnLwg== dependencies: buffer "4.9.2" events "1.1.1" @@ -2656,9 +2656,9 @@ camelcase@^7.0.0: integrity sha512-JToIvOmz6nhGsUhAYScbo2d6Py5wojjNfoxoc2mEVLUdJ70gJK2gnd+ABY1Tc3sVMyK7QDPtN0T/XdlCQWITyQ== caniuse-lite@^1.0.30001370: - version "1.0.30001388" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001388.tgz#88e01f4591cbd81f9f665f3f078c66b509fbe55d" - integrity sha512-znVbq4OUjqgLxMxoNX2ZeeLR0d7lcDiE5uJ4eUiWdml1J1EkxbnQq6opT9jb9SMfJxB0XA16/ziHwni4u1I3GQ== + version "1.0.30001397" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001397.tgz#010d9d56e3b8abcd8df261d0a94b22426271a15f" + integrity sha512-SW9N2TbCdLf0eiNDRrrQXx2sOkaakNZbCjgNpPyMJJbiOrU5QzMIrXOVMRM1myBXTD5iTkdrtU/EguCrBocHlA== case@1.6.3, case@^1.6.3: version "1.6.3" @@ -2716,9 +2716,9 @@ chownr@^2.0.0: integrity sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ== ci-info@^3.2.0: - version "3.3.2" - resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.3.2.tgz#6d2967ffa407466481c6c90b6e16b3098f080128" - integrity sha512-xmDt/QIAdeZ9+nfdPsaBCpMvHNLFiLdjj59qjqn+6iPe6YmHGQ35sBnQ8uslRBXFmXkiZQOJRjvQeoGppoTjjg== + version "3.4.0" + resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.4.0.tgz#b28484fd436cbc267900364f096c9dc185efb251" + integrity sha512-t5QdPT5jq3o262DOQ8zA6E1tlH2upmUc4Hlvrbx1pGYJuiiHl7O7rvVNI+l8HTVhd/q3Qc9vqimkNk5yiXsAug== cjs-module-lexer@^1.0.0: version "1.2.2" @@ -3363,9 +3363,9 @@ ee-first@1.1.1: integrity sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow== electron-to-chromium@^1.4.202: - version "1.4.241" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.241.tgz#5aa03ab94db590d8269f4518157c24b1efad34d6" - integrity sha512-e7Wsh4ilaioBZ5bMm6+F4V5c11dh56/5Jwz7Hl5Tu1J7cnB+Pqx5qIF2iC7HPpfyQMqGSvvLP5bBAIDd2gAtGw== + version "1.4.247" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.247.tgz#cc93859bc5fc521f611656e65ce17eae26a0fd3d" + integrity sha512-FLs6R4FQE+1JHM0hh3sfdxnYjKvJpHZyhQDjc2qFq/xFvmmRt/TATNToZhrcGUFzpF2XjeiuozrA8lI0PZmYYw== emittery@^0.10.2: version "0.10.2" @@ -3738,11 +3738,11 @@ eslint-visitor-keys@^3.3.0: integrity sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA== eslint@^8: - version "8.23.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.23.0.tgz#a184918d288820179c6041bb3ddcc99ce6eea040" - integrity sha512-pBG/XOn0MsJcKcTRLr27S5HpzQo4kLr+HjLQIyK4EiCsijDl/TB+h5uEuJU6bQ8Edvwz1XWOjpaP2qgnXGpTcA== + version "8.23.1" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.23.1.tgz#cfd7b3f7fdd07db8d16b4ac0516a29c8d8dca5dc" + integrity sha512-w7C1IXCc6fNqjpuYd0yPlcTKKmHlHHktRkzmBPZ+7cvNBQuiNjx0xaMTjAJGCafJhQkrFJooREv0CtrVzmHwqg== dependencies: - "@eslint/eslintrc" "^1.3.1" + "@eslint/eslintrc" "^1.3.2" "@humanwhocodes/config-array" "^0.10.4" "@humanwhocodes/gitignore-to-minimatch" "^1.0.2" "@humanwhocodes/module-importer" "^1.0.1" @@ -3761,7 +3761,6 @@ eslint@^8: fast-deep-equal "^3.1.3" file-entry-cache "^6.0.1" find-up "^5.0.0" - functional-red-black-tree "^1.0.1" glob-parent "^6.0.1" globals "^13.15.0" globby "^11.1.0" @@ -3770,6 +3769,7 @@ eslint@^8: import-fresh "^3.0.0" imurmurhash "^0.1.4" is-glob "^4.0.0" + js-sdsl "^4.1.4" js-yaml "^4.1.0" json-stable-stringify-without-jsonify "^1.0.1" levn "^0.4.1" @@ -3919,9 +3919,9 @@ fast-diff@^1.1.2: integrity sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w== fast-glob@^3.2.5, fast-glob@^3.2.9: - version "3.2.11" - resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.11.tgz#a1172ad95ceb8a16e20caa5c5e56480e5129c1d9" - integrity sha512-xrO3+1bxSo3ZVHAnqzyuewYT6aMFHRAd4Kcs92MAonjwQZLsK9d0SF1IyQ3k5PoirxTW0Oe/RqFgMQ6TcNE5Ew== + version "3.2.12" + resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.12.tgz#7f39ec99c2e6ab030337142da9e0c18f37afae80" + integrity sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w== dependencies: "@nodelib/fs.stat" "^2.0.2" "@nodelib/fs.walk" "^1.2.3" @@ -4422,7 +4422,7 @@ globby@^11.0.4, globby@^11.1.0: merge2 "^1.4.1" slash "^3.0.0" -got@^12.1.0: +got@12.3.1, got@^12.1.0: version "12.3.1" resolved "https://registry.yarnpkg.com/got/-/got-12.3.1.tgz#79d6ebc0cb8358c424165698ddb828be56e74684" integrity sha512-tS6+JMhBh4iXMSXF6KkIsRxmloPln31QHDlcb6Ec3bzxjjFJFr/8aXdpyuLmVc9I4i2HyBHYw1QU5K1ruUdpkw== @@ -4791,9 +4791,9 @@ is-buffer@~1.1.6: integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w== is-callable@^1.1.3, is-callable@^1.1.4, is-callable@^1.2.4: - version "1.2.4" - resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.4.tgz#47301d58dd0259407865547853df6d61fe471945" - integrity sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w== + version "1.2.5" + resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.5.tgz#6123e0b1fef5d7591514b371bb018204892f1a2b" + integrity sha512-ZIWRujF6MvYGkEuHMYtFRkL2wAtFw89EHfKlXrkPkjQZZRWeh9L1q3SV13NIfHnqxugjLvAOkEHx9mb1zcMnEw== is-ci@^3.0.1: version "3.0.1" @@ -5405,6 +5405,11 @@ jmespath@0.16.0: resolved "https://registry.yarnpkg.com/jmespath/-/jmespath-0.16.0.tgz#b15b0a85dfd4d930d43e69ed605943c802785076" integrity sha512-9FzQjJ7MATs1tSpnco1K6ayiYE3figslrXA72G2HQ/n76RzvYlofyi5QM+iX4YRs/pu3yzxlVQSST23+dMDknw== +js-sdsl@^4.1.4: + version "4.1.4" + resolved "https://registry.yarnpkg.com/js-sdsl/-/js-sdsl-4.1.4.tgz#78793c90f80e8430b7d8dc94515b6c77d98a26a6" + integrity sha512-Y2/yD55y5jteOAmY50JbUZYwk3CP3wnLPEZnlR1w9oKhITrBEtAxwuWKebFf8hMrPMgbYwFoWK/lH2sBkErELw== + js-string-escape@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/js-string-escape/-/js-string-escape-1.0.1.tgz#e2625badbc0d67c7533e9edc1068c587ae4137ef" @@ -6679,9 +6684,9 @@ progress@^2.0.3: integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA== projen@^0.61.41: - version "0.61.41" - resolved "https://registry.yarnpkg.com/projen/-/projen-0.61.41.tgz#dfb63e46ab6dc9dc497186d914d74d28017cf979" - integrity sha512-XoZ2HqG6XJayA0V1UHVXc0vdduLzBbk9WJxHKummjqR6Bbde0Xwl8a4xxsW89d6YSECZawmJ8DrEl7mZ9XEPmQ== + version "0.61.47" + resolved "https://registry.yarnpkg.com/projen/-/projen-0.61.47.tgz#33cf805d472eba713da70288cc4a25f0a540c718" + integrity sha512-ox5aKqXAzjXDHUERjZFq1jWWTu2fBOKfSKJYIkrEfZ3K7Fe1I+ivVFKOoiAbHK6kMTWRj7RA28eiE87h5YqL6w== dependencies: "@iarna/toml" "^2.2.5" case "^1.6.3" @@ -7354,7 +7359,7 @@ source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.1: resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== -source-map@^0.7.3: +source-map@^0.7.3, source-map@^0.7.4: version "0.7.4" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.7.4.tgz#a9bbe705c9d8846f4e08ff6765acf0f1b0898656" integrity sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA== @@ -7600,9 +7605,9 @@ supports-color@^8.0.0: has-flag "^4.0.0" supports-hyperlinks@^2.0.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/supports-hyperlinks/-/supports-hyperlinks-2.2.0.tgz#4f77b42488765891774b70c79babd87f9bd594bb" - integrity sha512-6sXEzV5+I5j8Bmq9/vUphGRM/RJNT9SCURJLjwfOg51heRtguGWDzcaBlgAzKhQa0EVNpPEKzQuBwZ8S8WaCeQ== + version "2.3.0" + resolved "https://registry.yarnpkg.com/supports-hyperlinks/-/supports-hyperlinks-2.3.0.tgz#3943544347c1ff90b15effb03fc14ae45ec10624" + integrity sha512-RpsAZlpWcDwOPQA22aCH4J0t7L8JmAvsCxfOSEwm7cQs3LshN36QaTkwd70DnBOXDWGssw2eUoc8CaRWT0XunA== dependencies: has-flag "^4.0.0" supports-color "^7.0.0" @@ -7947,9 +7952,9 @@ upath@^2.0.1: integrity sha512-1uEe95xksV1O0CYKXo8vQvN1JEbtJp7lb7C5U9HMsIp6IVwntkH/oNUzyVNQSd4S1sYk2FpSSW44FqMc8qee5w== update-browserslist-db@^1.0.5: - version "1.0.7" - resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.7.tgz#16279639cff1d0f800b14792de43d97df2d11b7d" - integrity sha512-iN/XYesmZ2RmmWAiI4Z5rq0YqSiv0brj9Ce9CfhNE4xIW2h+MFxcgkxIzZ+ShkFPUkjU3gQ+3oypadD3RAMtrg== + version "1.0.8" + resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.8.tgz#2f0b711327668eee01bbecddcf4a7c7954a7f8e2" + integrity sha512-GHg7C4M7oJSJYW/ED/5QOJ7nL/E0lwTOBGsOorA7jqHr8ExUhPfwAotIAmdSw/LWv3SMLSNpzTAgeLG9zaZKTA== dependencies: escalade "^3.1.1" picocolors "^1.0.0"