From 1e2cff19eec234e1d1f7f501230cba01b220a09b Mon Sep 17 00:00:00 2001 From: paulhcsun <47882901+paulhcsun@users.noreply.github.com> Date: Fri, 4 Oct 2024 11:51:40 -0700 Subject: [PATCH 01/11] chore(kinesisfirehose-alpha): replace`destinations` property with `destination` and change type from array to single IDestination (#31630) ### Reason for this change Setting a destination for your Delivery Stream was previously done by passing in an array of Destinations but with a restriction that there there could only be one Destination in that array. This property type does not make sense for the current user experience (have an array but can only specify one destination) and also does not align with the behaviour in the AWS Console which only allows you to select a single destination. If Kinesis Firehose ever supports multiple destinations in the future then we can add a new property to support that which will not be a breaking change. ### Description of changes BREAKING CHANGE: replaced `destinations` property with `destination` (singular) and changed the type from array of Destinations to a single Destination. Old behaviour would only allow an array with a single Destination to be passed in anyway. ### Description of how you validated changes unit tests + no integ snapshot changes. ### Checklist - [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../@aws-cdk/aws-iot-actions-alpha/README.md | 2 +- .../integ.firehose-put-record-action.ts | 2 +- .../aws-kinesisfirehose-alpha/README.md | 37 ++++++------ .../lib/delivery-stream.ts | 12 +--- .../test/delivery-stream.test.ts | 57 ++++++++---------- .../integ.delivery-stream.source-stream.ts | 4 +- .../test/integ.delivery-stream.ts | 4 +- .../integ.kinesis-stream-events-target.ts | 2 +- .../test/integ.s3-bucket.lit.ts | 8 +-- .../test/s3-bucket.test.ts | 60 +++++++++---------- packages/aws-cdk-lib/aws-logs/README.md | 2 +- 11 files changed, 86 insertions(+), 104 deletions(-) diff --git a/packages/@aws-cdk/aws-iot-actions-alpha/README.md b/packages/@aws-cdk/aws-iot-actions-alpha/README.md index c1a01bc1b10c2..3cd0a687f723d 100644 --- a/packages/@aws-cdk/aws-iot-actions-alpha/README.md +++ b/packages/@aws-cdk/aws-iot-actions-alpha/README.md @@ -243,7 +243,7 @@ import * as destinations from '@aws-cdk/aws-kinesisfirehose-destinations-alpha'; const bucket = new s3.Bucket(this, 'MyBucket'); const stream = new firehose.DeliveryStream(this, 'MyStream', { - destinations: [new destinations.S3Bucket(bucket)], + destination: new destinations.S3Bucket(bucket), }); const topicRule = new iot.TopicRule(this, 'TopicRule', { diff --git a/packages/@aws-cdk/aws-iot-actions-alpha/test/kinesis-firehose/integ.firehose-put-record-action.ts b/packages/@aws-cdk/aws-iot-actions-alpha/test/kinesis-firehose/integ.firehose-put-record-action.ts index d506a2d78e8f0..8dfb68be0d7ea 100644 --- a/packages/@aws-cdk/aws-iot-actions-alpha/test/kinesis-firehose/integ.firehose-put-record-action.ts +++ b/packages/@aws-cdk/aws-iot-actions-alpha/test/kinesis-firehose/integ.firehose-put-record-action.ts @@ -21,7 +21,7 @@ class TestStack extends cdk.Stack { removalPolicy: cdk.RemovalPolicy.DESTROY, }); const stream = new firehose.DeliveryStream(this, 'MyStream', { - destinations: [new destinations.S3Bucket(bucket)], + destination: new destinations.S3Bucket(bucket), }); topicRule.addAction( new actions.FirehosePutRecordAction(stream, { diff --git a/packages/@aws-cdk/aws-kinesisfirehose-alpha/README.md b/packages/@aws-cdk/aws-kinesisfirehose-alpha/README.md index 31f8195003d7f..c299eb018e3fb 100644 --- a/packages/@aws-cdk/aws-kinesisfirehose-alpha/README.md +++ b/packages/@aws-cdk/aws-kinesisfirehose-alpha/README.md @@ -41,7 +41,7 @@ used as a destination. More supported destinations are covered [below](#destinat ```ts const bucket = new s3.Bucket(this, 'Bucket'); new firehose.DeliveryStream(this, 'Delivery Stream', { - destinations: [new destinations.S3Bucket(bucket)], + destination: new destinations.S3Bucket(bucket), }); ``` @@ -71,7 +71,7 @@ declare const destination: firehose.IDestination; const sourceStream = new kinesis.Stream(this, 'Source Stream'); new firehose.DeliveryStream(this, 'Delivery Stream', { sourceStream: sourceStream, - destinations: [destination], + destination: destination, }); ``` @@ -108,7 +108,7 @@ declare const bucket: s3.Bucket; const s3Destination = new destinations.S3Bucket(bucket); new firehose.DeliveryStream(this, 'Delivery Stream', { - destinations: [s3Destination], + destination: s3Destination, }); ``` @@ -154,18 +154,18 @@ declare const destination: firehose.IDestination; // SSE with an AWS-owned key new firehose.DeliveryStream(this, 'Delivery Stream AWS Owned', { encryption: firehose.StreamEncryption.awsOwnedKey(), - destinations: [destination], + destination: destination, }); // SSE with an customer-managed key that is created automatically by the CDK new firehose.DeliveryStream(this, 'Delivery Stream Implicit Customer Managed', { encryption: firehose.StreamEncryption.customerManagedKey(), - destinations: [destination], + destination: destination, }); // SSE with an customer-managed key that is explicitly specified declare const key: kms.Key; new firehose.DeliveryStream(this, 'Delivery Stream Explicit Customer Managed', { encryption: firehose.StreamEncryption.customerManagedKey(key), - destinations: [destination], + destination: destination, }); ``` @@ -196,7 +196,7 @@ const destination = new destinations.S3Bucket(bucket, { }); new firehose.DeliveryStream(this, 'Delivery Stream', { - destinations: [destination], + destination: destination, }); ``` @@ -208,7 +208,7 @@ const destination = new destinations.S3Bucket(bucket, { loggingConfig: new destinations.DisableLogging(), }); new firehose.DeliveryStream(this, 'Delivery Stream', { - destinations: [destination], + destination: destination, }); ``` @@ -271,7 +271,7 @@ const s3Destination = new destinations.S3Bucket(bucket, { compression: destinations.Compression.SNAPPY, }); new firehose.DeliveryStream(this, 'Delivery Stream', { - destinations: [s3Destination], + destination: s3Destination, }); ``` @@ -292,7 +292,7 @@ const destination = new destinations.S3Bucket(bucket, { bufferingSize: Size.mebibytes(8), }); new firehose.DeliveryStream(this, 'Delivery Stream', { - destinations: [destination], + destination: destination, }); ``` @@ -309,7 +309,7 @@ const destination = new destinations.S3Bucket(bucket, { bufferingInterval: Duration.seconds(0), }); new firehose.DeliveryStream(this, 'ZeroBufferDeliveryStream', { - destinations: [destination], + destination: destination, }); ``` @@ -332,7 +332,7 @@ const destination = new destinations.S3Bucket(bucket, { encryptionKey: key, }); new firehose.DeliveryStream(this, 'Delivery Stream', { - destinations: [destination], + destination: destination, }); ``` @@ -350,35 +350,32 @@ backed up to S3. // Enable backup of all source records (to an S3 bucket created by CDK). declare const bucket: s3.Bucket; new firehose.DeliveryStream(this, 'Delivery Stream Backup All', { - destinations: [ + destination: new destinations.S3Bucket(bucket, { s3Backup: { mode: destinations.BackupMode.ALL, }, }), - ], }); // Explicitly provide an S3 bucket to which all source records will be backed up. declare const backupBucket: s3.Bucket; new firehose.DeliveryStream(this, 'Delivery Stream Backup All Explicit Bucket', { - destinations: [ + destination: new destinations.S3Bucket(bucket, { s3Backup: { bucket: backupBucket, }, }), - ], }); // Explicitly provide an S3 prefix under which all source records will be backed up. new firehose.DeliveryStream(this, 'Delivery Stream Backup All Explicit Prefix', { - destinations: [ + destination: new destinations.S3Bucket(bucket, { s3Backup: { mode: destinations.BackupMode.ALL, dataOutputPrefix: 'mybackup', }, }), - ], }); ``` @@ -431,7 +428,7 @@ const s3Destination = new destinations.S3Bucket(bucket, { processor: lambdaProcessor, }); new firehose.DeliveryStream(this, 'Delivery Stream', { - destinations: [s3Destination], + destination: s3Destination, }); ``` @@ -473,7 +470,7 @@ const destinationRole = new iam.Role(this, 'Destination Role', { declare const bucket: s3.Bucket; const destination = new destinations.S3Bucket(bucket, { role: destinationRole }); new firehose.DeliveryStream(this, 'Delivery Stream', { - destinations: [destination], + destination: destination, role: deliveryStreamRole, }); ``` diff --git a/packages/@aws-cdk/aws-kinesisfirehose-alpha/lib/delivery-stream.ts b/packages/@aws-cdk/aws-kinesisfirehose-alpha/lib/delivery-stream.ts index 4c97fa0aa6e96..737ba07d80574 100644 --- a/packages/@aws-cdk/aws-kinesisfirehose-alpha/lib/delivery-stream.ts +++ b/packages/@aws-cdk/aws-kinesisfirehose-alpha/lib/delivery-stream.ts @@ -185,11 +185,9 @@ export enum StreamEncryptionType { */ export interface DeliveryStreamProps { /** - * The destinations that this delivery stream will deliver data to. - * - * Only a singleton array is supported at this time. + * The destination that this delivery stream will deliver data to. */ - readonly destinations: IDestination[]; + readonly destination: IDestination; /** * A name for the delivery stream. @@ -324,10 +322,6 @@ export class DeliveryStream extends DeliveryStreamBase { this._role = props.role; - if (props.destinations.length !== 1) { - throw new Error(`Only one destination is allowed per delivery stream, given ${props.destinations.length}`); - } - if (props.encryption?.encryptionKey || props.sourceStream) { this._role = this._role ?? new iam.Role(this, 'Service Role', { assumedBy: new iam.ServicePrincipal('firehose.amazonaws.com'), @@ -369,7 +363,7 @@ export class DeliveryStream extends DeliveryStreamBase { readStreamGrant = props.sourceStream.grantRead(this._role); } - const destinationConfig = props.destinations[0].bind(this, {}); + const destinationConfig = props.destination.bind(this, {}); const resource = new CfnDeliveryStream(this, 'Resource', { deliveryStreamEncryptionConfigurationInput: encryptionConfig, diff --git a/packages/@aws-cdk/aws-kinesisfirehose-alpha/test/delivery-stream.test.ts b/packages/@aws-cdk/aws-kinesisfirehose-alpha/test/delivery-stream.test.ts index 6d4a7163be537..c9365eb2ee35e 100644 --- a/packages/@aws-cdk/aws-kinesisfirehose-alpha/test/delivery-stream.test.ts +++ b/packages/@aws-cdk/aws-kinesisfirehose-alpha/test/delivery-stream.test.ts @@ -46,7 +46,7 @@ describe('delivery stream', () => { test('creates stream with default values', () => { new firehose.DeliveryStream(stack, 'Delivery Stream', { - destinations: [mockS3Destination], + destination: mockS3Destination, }); Template.fromStack(stack).hasResourceProperties('AWS::KinesisFirehose::DeliveryStream', { @@ -63,7 +63,7 @@ describe('delivery stream', () => { test('creates stream with events target V2 class', () => { const stream = new firehose.DeliveryStream(stack, 'DeliveryStream', { - destinations: [mockS3Destination], + destination: mockS3Destination, }); new events.Rule(stack, 'rule', { @@ -102,7 +102,7 @@ describe('delivery stream', () => { }); const deliveryStream = new firehose.DeliveryStream(stack, 'Delivery Stream', { - destinations: [mockS3Destination], + destination: mockS3Destination, role: role, }); @@ -111,7 +111,7 @@ describe('delivery stream', () => { test('not providing sourceStream or encryptionKey creates only one role (used for S3 destination)', () => { new firehose.DeliveryStream(stack, 'Delivery Stream', { - destinations: [mockS3Destination], + destination: mockS3Destination, }); Template.fromStack(stack).hasResourceProperties('AWS::IAM::Role', { @@ -133,7 +133,7 @@ describe('delivery stream', () => { const sourceStream = new kinesis.Stream(stack, 'Source Stream'); new firehose.DeliveryStream(stack, 'Delivery Stream', { - destinations: [mockS3Destination], + destination: mockS3Destination, sourceStream: sourceStream, }); @@ -156,7 +156,7 @@ describe('delivery stream', () => { const key = new kms.Key(stack, 'Key'); new firehose.DeliveryStream(stack, 'Delivery Stream', { - destinations: [mockS3Destination], + destination: mockS3Destination, encryption: StreamEncryption.customerManagedKey(key), }); @@ -179,7 +179,7 @@ describe('delivery stream', () => { const sourceStream = new kinesis.Stream(stack, 'Source Stream'); new firehose.DeliveryStream(stack, 'Delivery Stream', { - destinations: [mockS3Destination], + destination: mockS3Destination, sourceStream: sourceStream, role: deliveryStreamRole, }); @@ -215,7 +215,7 @@ describe('delivery stream', () => { test('requesting customer-owned encryption creates key and configuration', () => { new firehose.DeliveryStream(stack, 'Delivery Stream', { - destinations: [mockS3Destination], + destination: mockS3Destination, encryption: firehose.StreamEncryption.customerManagedKey(), role: deliveryStreamRole, }); @@ -251,7 +251,7 @@ describe('delivery stream', () => { const key = new kms.Key(stack, 'Key'); new firehose.DeliveryStream(stack, 'Delivery Stream', { - destinations: [mockS3Destination], + destination: mockS3Destination, encryption: StreamEncryption.customerManagedKey(key), role: deliveryStreamRole, }); @@ -281,7 +281,7 @@ describe('delivery stream', () => { test('requesting AWS-owned key does not create key and creates configuration', () => { new firehose.DeliveryStream(stack, 'Delivery Stream', { - destinations: [mockS3Destination], + destination: mockS3Destination, encryption: firehose.StreamEncryption.awsOwnedKey(), role: deliveryStreamRole, }); @@ -299,7 +299,7 @@ describe('delivery stream', () => { test('requesting no encryption creates no configuration', () => { new firehose.DeliveryStream(stack, 'Delivery Stream', { - destinations: [mockS3Destination], + destination: mockS3Destination, encryption: firehose.StreamEncryption.unencrypted(), role: deliveryStreamRole, }); @@ -316,17 +316,17 @@ describe('delivery stream', () => { const sourceStream = new kinesis.Stream(stack, 'Source Stream'); expect(() => new firehose.DeliveryStream(stack, 'Delivery Stream 1', { - destinations: [mockS3Destination], + destination: mockS3Destination, encryption: firehose.StreamEncryption.awsOwnedKey(), sourceStream, })).toThrowError('Requested server-side encryption but delivery stream source is a Kinesis data stream. Specify server-side encryption on the data stream instead.'); expect(() => new firehose.DeliveryStream(stack, 'Delivery Stream 2', { - destinations: [mockS3Destination], + destination: mockS3Destination, encryption: firehose.StreamEncryption.customerManagedKey(), sourceStream, })).toThrowError('Requested server-side encryption but delivery stream source is a Kinesis data stream. Specify server-side encryption on the data stream instead.'); expect(() => new firehose.DeliveryStream(stack, 'Delivery Stream 3', { - destinations: [mockS3Destination], + destination: mockS3Destination, encryption: StreamEncryption.customerManagedKey(new kms.Key(stack, 'Key')), sourceStream, })).toThrowError('Requested server-side encryption but delivery stream source is a Kinesis data stream. Specify server-side encryption on the data stream instead.'); @@ -337,7 +337,7 @@ describe('delivery stream', () => { assumedBy: new iam.ServicePrincipal('lambda.amazonaws.com'), }); const deliveryStream = new firehose.DeliveryStream(stack, 'Delivery Stream', { - destinations: [mockS3Destination], + destination: mockS3Destination, }); deliveryStream.grant(role, 'firehose:PutRecord'); @@ -360,7 +360,7 @@ describe('delivery stream', () => { assumedBy: new iam.ServicePrincipal('lambda.amazonaws.com'), }); const deliveryStream = new firehose.DeliveryStream(stack, 'Delivery Stream', { - destinations: [mockS3Destination], + destination: mockS3Destination, }); deliveryStream.grantPutRecords(role); @@ -385,7 +385,7 @@ describe('delivery stream', () => { const dependableId = stack.resolve((Node.of(dependable).defaultChild as cdk.CfnResource).logicalId); new firehose.DeliveryStream(stack, 'Delivery Stream', { - destinations: [mockS3Destination], + destination: mockS3Destination, }); Template.fromStack(stack).hasResource('AWS::KinesisFirehose::DeliveryStream', { @@ -396,18 +396,9 @@ describe('delivery stream', () => { }); }); - test('supplying 0 or multiple destinations throws', () => { - expect(() => new firehose.DeliveryStream(stack, 'No Destinations', { - destinations: [], - })).toThrowError(/Only one destination is allowed per delivery stream/); - expect(() => new firehose.DeliveryStream(stack, 'Too Many Destinations', { - destinations: [mockS3Destination, mockS3Destination], - })).toThrowError(/Only one destination is allowed per delivery stream/); - }); - test('creating new stream should return IAM role when calling getter for grantPrincipal (backwards compatibility)', () => { const deliveryStream = new firehose.DeliveryStream(stack, 'Delivery Stream', { - destinations: [mockS3Destination], + destination: mockS3Destination, }); expect(deliveryStream.grantPrincipal).toBeInstanceOf(iam.Role); }); @@ -418,7 +409,7 @@ describe('delivery stream', () => { beforeEach(() => { stack = new cdk.Stack(undefined, undefined, { env: { account: '000000000000', region: 'us-west-1' } }); deliveryStream = new firehose.DeliveryStream(stack, 'Delivery Stream', { - destinations: [mockS3Destination], + destination: mockS3Destination, }); }); @@ -516,7 +507,7 @@ describe('delivery stream', () => { const vpc = new ec2.Vpc(stack, 'VPC'); const securityGroup = new ec2.SecurityGroup(stack, 'Security Group', { vpc }); const deliveryStream = new firehose.DeliveryStream(stack, 'Delivery Stream', { - destinations: [mockS3Destination], + destination: mockS3Destination, }); securityGroup.connections.allowFrom(deliveryStream, ec2.Port.allTcp()); @@ -542,7 +533,7 @@ describe('delivery stream', () => { const vpc = new ec2.Vpc(stack, 'VPC'); const securityGroup = new ec2.SecurityGroup(stack, 'Security Group', { vpc }); const deliveryStream = new firehose.DeliveryStream(stack, 'Delivery Stream', { - destinations: [mockS3Destination], + destination: mockS3Destination, }); securityGroup.connections.allowFrom(deliveryStream, ec2.Port.allTcp()); @@ -558,10 +549,10 @@ describe('delivery stream', () => { test('only adds one Firehose IP address mapping to stack even if multiple delivery streams defined', () => { new firehose.DeliveryStream(stack, 'Delivery Stream 1', { - destinations: [mockS3Destination], + destination: mockS3Destination, }); new firehose.DeliveryStream(stack, 'Delivery Stream 2', { - destinations: [mockS3Destination], + destination: mockS3Destination, }); Template.fromStack(stack).hasMapping('*', { @@ -573,7 +564,7 @@ describe('delivery stream', () => { test('can add tags', () => { const deliveryStream = new firehose.DeliveryStream(stack, 'Delivery Stream', { - destinations: [mockS3Destination], + destination: mockS3Destination, }); cdk.Tags.of(deliveryStream).add('tagKey', 'tagValue'); diff --git a/packages/@aws-cdk/aws-kinesisfirehose-alpha/test/integ.delivery-stream.source-stream.ts b/packages/@aws-cdk/aws-kinesisfirehose-alpha/test/integ.delivery-stream.source-stream.ts index a9455bedabf6e..facfd13a184d1 100644 --- a/packages/@aws-cdk/aws-kinesisfirehose-alpha/test/integ.delivery-stream.source-stream.ts +++ b/packages/@aws-cdk/aws-kinesisfirehose-alpha/test/integ.delivery-stream.source-stream.ts @@ -34,12 +34,12 @@ const mockS3Destination: firehose.IDestination = { const sourceStream = new kinesis.Stream(stack, 'Source Stream'); new firehose.DeliveryStream(stack, 'Delivery Stream', { - destinations: [mockS3Destination], + destination: mockS3Destination, sourceStream, }); new firehose.DeliveryStream(stack, 'Delivery Stream No Source Or Encryption Key', { - destinations: [mockS3Destination], + destination: mockS3Destination, }); app.synth(); diff --git a/packages/@aws-cdk/aws-kinesisfirehose-alpha/test/integ.delivery-stream.ts b/packages/@aws-cdk/aws-kinesisfirehose-alpha/test/integ.delivery-stream.ts index 52bacf832a664..633e1fc0b5b2d 100644 --- a/packages/@aws-cdk/aws-kinesisfirehose-alpha/test/integ.delivery-stream.ts +++ b/packages/@aws-cdk/aws-kinesisfirehose-alpha/test/integ.delivery-stream.ts @@ -36,12 +36,12 @@ const key = new kms.Key(stack, 'Key', { }); new firehose.DeliveryStream(stack, 'Delivery Stream', { - destinations: [mockS3Destination], + destination: mockS3Destination, encryption: firehose.StreamEncryption.customerManagedKey(key), }); new firehose.DeliveryStream(stack, 'Delivery Stream No Source Or Encryption Key', { - destinations: [mockS3Destination], + destination: mockS3Destination, }); app.synth(); diff --git a/packages/@aws-cdk/aws-kinesisfirehose-alpha/test/integ.kinesis-stream-events-target.ts b/packages/@aws-cdk/aws-kinesisfirehose-alpha/test/integ.kinesis-stream-events-target.ts index c3f39133b0b28..a3d65c30c589d 100644 --- a/packages/@aws-cdk/aws-kinesisfirehose-alpha/test/integ.kinesis-stream-events-target.ts +++ b/packages/@aws-cdk/aws-kinesisfirehose-alpha/test/integ.kinesis-stream-events-target.ts @@ -34,7 +34,7 @@ const mockS3Destination: firehose.IDestination = { }; const stream = new firehose.DeliveryStream(stack, 'Delivery Stream No Source Or Encryption Key', { - destinations: [mockS3Destination], + destination: mockS3Destination, }); new events.Rule(stack, 'rule', { diff --git a/packages/@aws-cdk/aws-kinesisfirehose-destinations-alpha/test/integ.s3-bucket.lit.ts b/packages/@aws-cdk/aws-kinesisfirehose-destinations-alpha/test/integ.s3-bucket.lit.ts index d86ce2aac648b..ce115b9af328e 100644 --- a/packages/@aws-cdk/aws-kinesisfirehose-destinations-alpha/test/integ.s3-bucket.lit.ts +++ b/packages/@aws-cdk/aws-kinesisfirehose-destinations-alpha/test/integ.s3-bucket.lit.ts @@ -45,7 +45,7 @@ const backupKey = new kms.Key(stack, 'BackupKey', { }); new firehose.DeliveryStream(stack, 'Delivery Stream', { - destinations: [new destinations.S3Bucket(bucket, { + destination: new destinations.S3Bucket(bucket, { loggingConfig: new destinations.EnableLogging(logGroup), processor: processor, compression: destinations.Compression.GZIP, @@ -64,16 +64,16 @@ new firehose.DeliveryStream(stack, 'Delivery Stream', { bufferingSize: cdk.Size.mebibytes(1), encryptionKey: backupKey, }, - })], + }), }); new firehose.DeliveryStream(stack, 'ZeroBufferingDeliveryStream', { - destinations: [new destinations.S3Bucket(bucket, { + destination: new destinations.S3Bucket(bucket, { compression: destinations.Compression.GZIP, dataOutputPrefix: 'regularPrefix', errorOutputPrefix: 'errorPrefix', bufferingInterval: cdk.Duration.seconds(0), - })], + }), }); app.synth(); diff --git a/packages/@aws-cdk/aws-kinesisfirehose-destinations-alpha/test/s3-bucket.test.ts b/packages/@aws-cdk/aws-kinesisfirehose-destinations-alpha/test/s3-bucket.test.ts index 43d385e72036e..9de3d5281fcf9 100644 --- a/packages/@aws-cdk/aws-kinesisfirehose-destinations-alpha/test/s3-bucket.test.ts +++ b/packages/@aws-cdk/aws-kinesisfirehose-destinations-alpha/test/s3-bucket.test.ts @@ -23,7 +23,7 @@ describe('S3 destination', () => { it('provides defaults when no configuration is provided', () => { new firehose.DeliveryStream(stack, 'DeliveryStream', { - destinations: [new firehosedestinations.S3Bucket(bucket, { role: destinationRole })], + destination: new firehosedestinations.S3Bucket(bucket, { role: destinationRole }), }); Template.fromStack(stack).hasResourceProperties('AWS::KinesisFirehose::DeliveryStream', { @@ -42,7 +42,7 @@ describe('S3 destination', () => { it('creates a role when none is provided', () => { new firehose.DeliveryStream(stack, 'DeliveryStream', { - destinations: [new firehosedestinations.S3Bucket(bucket)], + destination: new firehosedestinations.S3Bucket(bucket), }); Template.fromStack(stack).hasResourceProperties('AWS::KinesisFirehose::DeliveryStream', { @@ -74,7 +74,7 @@ describe('S3 destination', () => { const destination = new firehosedestinations.S3Bucket(bucket, { role: destinationRole }); new firehose.DeliveryStream(stack, 'DeliveryStream', { - destinations: [destination], + destination: destination, }); Template.fromStack(stack).hasResourceProperties('AWS::IAM::Policy', { @@ -111,7 +111,7 @@ describe('S3 destination', () => { role: destinationRole, loggingConfig: new firehosedestinations.EnableLogging(logGroup), }); new firehose.DeliveryStream(stack, 'DeliveryStream', { - destinations: [destination], + destination: destination, }); Template.fromStack(stack).hasResourceProperties('AWS::IAM::Policy', { @@ -157,7 +157,7 @@ describe('S3 destination', () => { describe('logging', () => { it('creates resources and configuration by default', () => { new firehose.DeliveryStream(stack, 'DeliveryStream', { - destinations: [new firehosedestinations.S3Bucket(bucket)], + destination: new firehosedestinations.S3Bucket(bucket), }); Template.fromStack(stack).resourceCountIs('AWS::Logs::LogGroup', 1); @@ -173,7 +173,7 @@ describe('S3 destination', () => { it('does not create resources or configuration if disabled', () => { new firehose.DeliveryStream(stack, 'DeliveryStream', { - destinations: [new firehosedestinations.S3Bucket(bucket, { loggingConfig: new firehosedestinations.DisableLogging() })], + destination: new firehosedestinations.S3Bucket(bucket, { loggingConfig: new firehosedestinations.DisableLogging() }), }); Template.fromStack(stack).resourceCountIs('AWS::Logs::LogGroup', 0); @@ -188,7 +188,7 @@ describe('S3 destination', () => { const logGroup = new logs.LogGroup(stack, 'Log Group'); new firehose.DeliveryStream(stack, 'DeliveryStream', { - destinations: [new firehosedestinations.S3Bucket(bucket, { loggingConfig: new firehosedestinations.EnableLogging(logGroup) })], + destination: new firehosedestinations.S3Bucket(bucket, { loggingConfig: new firehosedestinations.EnableLogging(logGroup) }), }); Template.fromStack(stack).resourceCountIs('AWS::Logs::LogGroup', 1); @@ -206,9 +206,9 @@ describe('S3 destination', () => { const logGroup = new logs.LogGroup(stack, 'Log Group'); new firehose.DeliveryStream(stack, 'DeliveryStream', { - destinations: [new firehosedestinations.S3Bucket(bucket, { + destination: new firehosedestinations.S3Bucket(bucket, { loggingConfig: new firehosedestinations.EnableLogging(logGroup), role: destinationRole, - })], + }), }); Template.fromStack(stack).hasResourceProperties('AWS::IAM::Policy', { @@ -249,7 +249,7 @@ describe('S3 destination', () => { it('creates configuration for LambdaFunctionProcessor', () => { new firehose.DeliveryStream(stack, 'DeliveryStream', { - destinations: [destinationWithBasicLambdaProcessor], + destination: destinationWithBasicLambdaProcessor, }); Template.fromStack(stack).resourceCountIs('AWS::Lambda::Function', 1); @@ -286,7 +286,7 @@ describe('S3 destination', () => { processor: processor, }); new firehose.DeliveryStream(stack, 'DeliveryStream', { - destinations: [destination], + destination: destination, }); Template.fromStack(stack).resourceCountIs('AWS::Lambda::Function', 1); @@ -326,7 +326,7 @@ describe('S3 destination', () => { it('grants invoke access to the lambda function and delivery stream depends on grant', () => { new firehose.DeliveryStream(stack, 'DeliveryStream', { - destinations: [destinationWithBasicLambdaProcessor], + destination: destinationWithBasicLambdaProcessor, }); Template.fromStack(stack).hasResourceProperties('AWS::IAM::Policy', { @@ -357,7 +357,7 @@ describe('S3 destination', () => { compression: firehosedestinations.Compression.GZIP, }); new firehose.DeliveryStream(stack, 'DeliveryStream', { - destinations: [destination], + destination: destination, }); Template.fromStack(stack).hasResourceProperties('AWS::KinesisFirehose::DeliveryStream', { @@ -372,7 +372,7 @@ describe('S3 destination', () => { compression: firehosedestinations.Compression.of('SNAZZY'), }); new firehose.DeliveryStream(stack, 'DeliveryStream', { - destinations: [destination], + destination: destination, }); Template.fromStack(stack).hasResourceProperties('AWS::KinesisFirehose::DeliveryStream', { @@ -386,10 +386,10 @@ describe('S3 destination', () => { describe('buffering', () => { it('creates configuration when interval and size provided', () => { new firehose.DeliveryStream(stack, 'DeliveryStream', { - destinations: [new firehosedestinations.S3Bucket(bucket, { + destination: new firehosedestinations.S3Bucket(bucket, { bufferingInterval: cdk.Duration.minutes(1), bufferingSize: cdk.Size.mebibytes(1), - })], + }), }); Template.fromStack(stack).hasResourceProperties('AWS::KinesisFirehose::DeliveryStream', { @@ -404,27 +404,27 @@ describe('S3 destination', () => { it('validates bufferingInterval', () => { expect(() => new firehose.DeliveryStream(stack, 'DeliveryStream2', { - destinations: [new firehosedestinations.S3Bucket(bucket, { + destination: new firehosedestinations.S3Bucket(bucket, { bufferingInterval: cdk.Duration.minutes(16), bufferingSize: cdk.Size.mebibytes(1), - })], + }), })).toThrowError('Buffering interval must be less than 900 seconds. Buffering interval provided was 960 seconds.'); }); it('validates bufferingSize', () => { expect(() => new firehose.DeliveryStream(stack, 'DeliveryStream', { - destinations: [new firehosedestinations.S3Bucket(bucket, { + destination: new firehosedestinations.S3Bucket(bucket, { bufferingInterval: cdk.Duration.minutes(1), bufferingSize: cdk.Size.mebibytes(0), - })], + }), })).toThrowError('Buffering size must be between 1 and 128 MiBs. Buffering size provided was 0 MiBs'); expect(() => new firehose.DeliveryStream(stack, 'DeliveryStream2', { - destinations: [new firehosedestinations.S3Bucket(bucket, { + destination: new firehosedestinations.S3Bucket(bucket, { bufferingInterval: cdk.Duration.minutes(1), bufferingSize: cdk.Size.mebibytes(256), - })], + }), })).toThrowError('Buffering size must be between 1 and 128 MiBs. Buffering size provided was 256 MiBs'); }); }); @@ -434,10 +434,10 @@ describe('S3 destination', () => { const key = new kms.Key(stack, 'Key'); new firehose.DeliveryStream(stack, 'DeliveryStream', { - destinations: [new firehosedestinations.S3Bucket(bucket, { + destination: new firehosedestinations.S3Bucket(bucket, { encryptionKey: key, role: destinationRole, - })], + }), }); Template.fromStack(stack).hasResourceProperties('AWS::KinesisFirehose::DeliveryStream', { @@ -455,10 +455,10 @@ describe('S3 destination', () => { const key = new kms.Key(stack, 'Key'); new firehose.DeliveryStream(stack, 'DeliveryStream', { - destinations: [new firehosedestinations.S3Bucket(bucket, { + destination: new firehosedestinations.S3Bucket(bucket, { encryptionKey: key, role: destinationRole, - })], + }), }); Template.fromStack(stack).hasResourceProperties('AWS::IAM::Policy', { @@ -488,7 +488,7 @@ describe('S3 destination', () => { }, }); new firehose.DeliveryStream(stack, 'DeliveryStream', { - destinations: [destination], + destination: destination, }); Template.fromStack(stack).hasResourceProperties('AWS::KinesisFirehose::DeliveryStream', { @@ -513,7 +513,7 @@ describe('S3 destination', () => { }, }); new firehose.DeliveryStream(stack, 'DeliveryStream', { - destinations: [destination], + destination: destination, }); Template.fromStack(stack).hasResourceProperties('AWS::KinesisFirehose::DeliveryStream', { @@ -542,7 +542,7 @@ describe('S3 destination', () => { it('by default does not create resources', () => { const destination = new firehosedestinations.S3Bucket(bucket); new firehose.DeliveryStream(stack, 'DeliveryStream', { - destinations: [destination], + destination: destination, }); Template.fromStack(stack).resourceCountIs('AWS::S3::Bucket', 1); @@ -572,7 +572,7 @@ describe('S3 destination', () => { }, }); new firehose.DeliveryStream(stack, 'DeliveryStream', { - destinations: [destination], + destination: destination, }); Template.fromStack(stack).hasResourceProperties('AWS::KinesisFirehose::DeliveryStream', { diff --git a/packages/aws-cdk-lib/aws-logs/README.md b/packages/aws-cdk-lib/aws-logs/README.md index 52dd9aaf84b1f..ef32158b051e5 100644 --- a/packages/aws-cdk-lib/aws-logs/README.md +++ b/packages/aws-cdk-lib/aws-logs/README.md @@ -417,7 +417,7 @@ const bucket = new s3.Bucket(this, 'audit-bucket'); const s3Destination = new destinations.S3Bucket(bucket); const deliveryStream = new kinesisfirehose.DeliveryStream(this, 'Delivery Stream', { - destinations: [s3Destination], + destination: s3Destination, }); const dataProtectionPolicy = new logs.DataProtectionPolicy({ From 6e9623493585ed05b2b4358d8df2f175191b6c4d Mon Sep 17 00:00:00 2001 From: Shikha Aggarwal Date: Fri, 4 Oct 2024 18:54:15 -0700 Subject: [PATCH 02/11] revert: feat(cli): cdk rollback (#31407) (#31657) ### Issue # (if applicable) Closes #[31654](https://github.com/aws/aws-cdk/issues/31654). ### Reason for this change This reverts commit 0755561b79d6be0744b0b21504fe54ffcf2b618a. ### Description of changes Changes introduced regression in amplify app for nested stacks, reverting it. ### Description of how you validated changes Validated with local build ### Checklist - [ ] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk-testing/cli-integ/README.md | 2 +- .../cli-integ/lib/with-cdk-app.ts | 19 +- .../cdk-apps/rollback-test-app/app.js | 100 ------ .../cdk-apps/rollback-test-app/cdk.json | 7 - .../cli-regression-patches/v2.161.0/NOTES.md | 1 + .../v2.161.0/skip-tests.txt | 5 + .../tests/cli-integ-tests/cli.integtest.ts | 81 +---- packages/aws-cdk/README.md | 63 ++-- .../lib/api/bootstrap/bootstrap-template.yaml | 4 +- packages/aws-cdk/lib/api/cxapp/exec.ts | 3 - packages/aws-cdk/lib/api/deployments.ts | 205 +---------- .../cloudformation/stack-activity-monitor.ts | 90 +++-- .../util/cloudformation/stack-event-poller.ts | 172 --------- .../api/util/cloudformation/stack-status.ts | 36 -- packages/aws-cdk/lib/cdk-toolkit.ts | 86 ----- packages/aws-cdk/lib/cli.ts | 31 -- .../api/cloudformation-deployments.test.ts | 334 ++++++------------ .../test/api/fake-cloudformation-stack.ts | 22 +- .../test/api/stack-activity-monitor.test.ts | 12 - packages/aws-cdk/test/cdk-toolkit.test.ts | 33 +- packages/aws-cdk/test/util/mock-sdk.ts | 14 +- .../aws-cdk/test/util/stack-monitor.test.ts | 27 +- 22 files changed, 225 insertions(+), 1122 deletions(-) delete mode 100644 packages/@aws-cdk-testing/cli-integ/resources/cdk-apps/rollback-test-app/app.js delete mode 100644 packages/@aws-cdk-testing/cli-integ/resources/cdk-apps/rollback-test-app/cdk.json create mode 100644 packages/@aws-cdk-testing/cli-integ/resources/cli-regression-patches/v2.161.0/NOTES.md create mode 100644 packages/@aws-cdk-testing/cli-integ/resources/cli-regression-patches/v2.161.0/skip-tests.txt delete mode 100644 packages/aws-cdk/lib/api/util/cloudformation/stack-event-poller.ts diff --git a/packages/@aws-cdk-testing/cli-integ/README.md b/packages/@aws-cdk-testing/cli-integ/README.md index d1dd485660151..2dc2e9c70d8cc 100644 --- a/packages/@aws-cdk-testing/cli-integ/README.md +++ b/packages/@aws-cdk-testing/cli-integ/README.md @@ -37,7 +37,7 @@ Test suites are written as a collection of Jest tests, and they are run using Je ### Setup -Building the @aws-cdk-testing package is not very different from building the rest of the CDK. However, If you are having issues with the tests, you can ensure your environment is built properly by following the steps below: +Building the @aws-cdk-testing package is not very different from building the rest of the CDK. However, If you are having issues with the tests, you can ensure your enviornment is built properly by following the steps below: ```shell yarn install # Install dependencies diff --git a/packages/@aws-cdk-testing/cli-integ/lib/with-cdk-app.ts b/packages/@aws-cdk-testing/cli-integ/lib/with-cdk-app.ts index 5e55ca9be74b9..13710b6c53b09 100644 --- a/packages/@aws-cdk-testing/cli-integ/lib/with-cdk-app.ts +++ b/packages/@aws-cdk-testing/cli-integ/lib/with-cdk-app.ts @@ -24,8 +24,7 @@ export const EXTENDED_TEST_TIMEOUT_S = 30 * 60; * For backwards compatibility with existing tests (so we don't have to change * too much) the inner block is expected to take a `TestFixture` object. */ -export function withSpecificCdkApp( - appName: string, +export function withCdkApp( block: (context: TestFixture) => Promise, ): (context: TestContext & AwsContext & DisableBootstrapContext) => Promise { return async (context: TestContext & AwsContext & DisableBootstrapContext) => { @@ -37,7 +36,7 @@ export function withSpecificCdkApp( context.output.write(` Test directory: ${integTestDir}\n`); context.output.write(` Region: ${context.aws.region}\n`); - await cloneDirectory(path.join(RESOURCES_DIR, 'cdk-apps', appName), integTestDir, context.output); + await cloneDirectory(path.join(RESOURCES_DIR, 'cdk-apps', 'app'), integTestDir, context.output); const fixture = new TestFixture( integTestDir, stackNamePrefix, @@ -88,16 +87,6 @@ export function withSpecificCdkApp( }; } -/** - * Like `withSpecificCdkApp`, but uses the default integration testing app with a million stacks in it - */ -export function withCdkApp( - block: (context: TestFixture) => Promise, -): (context: TestContext & AwsContext & DisableBootstrapContext) => Promise { - // 'app' is the name of the default integration app in the `cdk-apps` directory - return withSpecificCdkApp('app', block); -} - export function withCdkMigrateApp(language: string, block: (context: TestFixture) => Promise) { return async (context: A) => { const stackName = `cdk-migrate-${language}-integ-${context.randomString}`; @@ -199,10 +188,6 @@ export function withDefaultFixture(block: (context: TestFixture) => Promise Promise) { - return withAws(withTimeout(DEFAULT_TEST_TIMEOUT_S, withSpecificCdkApp(appName, block))); -} - export function withExtendedTimeoutFixture(block: (context: TestFixture) => Promise) { return withAws(withTimeout(EXTENDED_TEST_TIMEOUT_S, withCdkApp(block))); } diff --git a/packages/@aws-cdk-testing/cli-integ/resources/cdk-apps/rollback-test-app/app.js b/packages/@aws-cdk-testing/cli-integ/resources/cdk-apps/rollback-test-app/app.js deleted file mode 100644 index 419e30898c9bf..0000000000000 --- a/packages/@aws-cdk-testing/cli-integ/resources/cdk-apps/rollback-test-app/app.js +++ /dev/null @@ -1,100 +0,0 @@ -const cdk = require('aws-cdk-lib'); -const lambda = require('aws-cdk-lib/aws-lambda'); -const cr = require('aws-cdk-lib/custom-resources'); - -/** - * This stack will be deployed in multiple phases, to achieve a very specific effect - * - * It contains resources r1 and r2, where r1 gets deployed first. - * - * - PHASE = 1: both resources deploy regularly. - * - PHASE = 2a: r1 gets updated, r2 will fail to update - * - PHASE = 2b: r1 gets updated, r2 will fail to update, and r1 will fail its rollback. - * - * To exercise this app: - * - * ``` - * env PHASE=1 npx cdk deploy - * env PHASE=2b npx cdk deploy --no-rollback - * # This will leave the stack in UPDATE_FAILED - * - * env PHASE=2b npx cdk rollback - * # This will start a rollback that will fail because r1 fails its rollabck - * - * env PHASE=2b npx cdk rollback --force - * # This will retry the rollabck and skip r1 - * ``` - */ -class RollbacktestStack extends cdk.Stack { - constructor(scope, id, props) { - super(scope, id, props); - - let r1props = {}; - let r2props = {}; - - const phase = process.env.PHASE; - switch (phase) { - case '1': - // Normal deployment - break; - case '2a': - // r1 updates normally, r2 fails updating - r2props.FailUpdate = true; - break; - case '2b': - // r1 updates normally, r2 fails updating, r1 fails rollback - r1props.FailRollback = true; - r2props.FailUpdate = true; - break; - } - - const fn = new lambda.Function(this, 'Fun', { - runtime: lambda.Runtime.NODEJS_LATEST, - code: lambda.Code.fromInline(`exports.handler = async function(event, ctx) { - const key = \`Fail\${event.RequestType}\`; - if (event.ResourceProperties[key]) { - throw new Error(\`\${event.RequestType} fails!\`); - } - if (event.OldResourceProperties?.FailRollback) { - throw new Error('Failing rollback!'); - } - return {}; - }`), - handler: 'index.handler', - timeout: cdk.Duration.minutes(1), - }); - const provider = new cr.Provider(this, "MyProvider", { - onEventHandler: fn, - }); - - const r1 = new cdk.CustomResource(this, 'r1', { - serviceToken: provider.serviceToken, - properties: r1props, - }); - const r2 = new cdk.CustomResource(this, 'r2', { - serviceToken: provider.serviceToken, - properties: r2props, - }); - r2.node.addDependency(r1); - } -} - -const app = new cdk.App({ - context: { - '@aws-cdk/core:assetHashSalt': process.env.CODEBUILD_BUILD_ID, // Force all assets to be unique, but consistent in one build - }, -}); - -const defaultEnv = { - account: process.env.CDK_DEFAULT_ACCOUNT, - region: process.env.CDK_DEFAULT_REGION -}; - -const stackPrefix = process.env.STACK_NAME_PREFIX; -if (!stackPrefix) { - throw new Error(`the STACK_NAME_PREFIX environment variable is required`); -} - -// Sometimes we don't want to synthesize all stacks because it will impact the results -new RollbacktestStack(app, `${stackPrefix}-test-rollback`, { env: defaultEnv }); -app.synth(); \ No newline at end of file diff --git a/packages/@aws-cdk-testing/cli-integ/resources/cdk-apps/rollback-test-app/cdk.json b/packages/@aws-cdk-testing/cli-integ/resources/cdk-apps/rollback-test-app/cdk.json deleted file mode 100644 index 44809158dbdac..0000000000000 --- a/packages/@aws-cdk-testing/cli-integ/resources/cdk-apps/rollback-test-app/cdk.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "app": "node app.js", - "versionReporting": false, - "context": { - "aws-cdk:enableDiffNoFail": "true" - } -} diff --git a/packages/@aws-cdk-testing/cli-integ/resources/cli-regression-patches/v2.161.0/NOTES.md b/packages/@aws-cdk-testing/cli-integ/resources/cli-regression-patches/v2.161.0/NOTES.md new file mode 100644 index 0000000000000..8e21b44daec85 --- /dev/null +++ b/packages/@aws-cdk-testing/cli-integ/resources/cli-regression-patches/v2.161.0/NOTES.md @@ -0,0 +1 @@ +This patch brings the [fix](https://github.com/aws/aws-cdk/issues/31654) into the regression suite. \ No newline at end of file diff --git a/packages/@aws-cdk-testing/cli-integ/resources/cli-regression-patches/v2.161.0/skip-tests.txt b/packages/@aws-cdk-testing/cli-integ/resources/cli-regression-patches/v2.161.0/skip-tests.txt new file mode 100644 index 0000000000000..f681a64076c25 --- /dev/null +++ b/packages/@aws-cdk-testing/cli-integ/resources/cli-regression-patches/v2.161.0/skip-tests.txt @@ -0,0 +1,5 @@ +# Skipping the test to fix issue https://github.com/aws/aws-cdk/issues/31654. +# cli-integ tests failing for the old tests with the new cli changes for nested stacks. + +test cdk rollback +test cdk rollback --force \ No newline at end of file diff --git a/packages/@aws-cdk-testing/cli-integ/tests/cli-integ-tests/cli.integtest.ts b/packages/@aws-cdk-testing/cli-integ/tests/cli-integ-tests/cli.integtest.ts index 8efebdec07875..a38580d10714a 100644 --- a/packages/@aws-cdk-testing/cli-integ/tests/cli-integ-tests/cli.integtest.ts +++ b/packages/@aws-cdk-testing/cli-integ/tests/cli-integ-tests/cli.integtest.ts @@ -32,7 +32,6 @@ import { withCDKMigrateFixture, withExtendedTimeoutFixture, randomString, - withSpecificFixture, withoutBootstrap, } from '../../lib'; @@ -2285,85 +2284,7 @@ integTest( }), ); -integTest( - 'test cdk rollback', - withSpecificFixture('rollback-test-app', async (fixture) => { - let phase = '1'; - - // Should succeed - await fixture.cdkDeploy('test-rollback', { - options: ['--no-rollback'], - modEnv: { PHASE: phase }, - verbose: false, - }); - try { - phase = '2a'; - - // Should fail - const deployOutput = await fixture.cdkDeploy('test-rollback', { - options: ['--no-rollback'], - modEnv: { PHASE: phase }, - verbose: false, - allowErrExit: true, - }); - expect(deployOutput).toContain('UPDATE_FAILED'); - - // Rollback - await fixture.cdk(['rollback'], { - modEnv: { PHASE: phase }, - verbose: false, - }); - } finally { - await fixture.cdkDestroy('test-rollback'); - } - }), -); - -integTest( - 'test cdk rollback --force', - withSpecificFixture('rollback-test-app', async (fixture) => { - let phase = '1'; - - // Should succeed - await fixture.cdkDeploy('test-rollback', { - options: ['--no-rollback'], - modEnv: { PHASE: phase }, - verbose: false, - }); - try { - phase = '2b'; // Fail update and also fail rollback - - // Should fail - const deployOutput = await fixture.cdkDeploy('test-rollback', { - options: ['--no-rollback'], - modEnv: { PHASE: phase }, - verbose: false, - allowErrExit: true, - }); - - expect(deployOutput).toContain('UPDATE_FAILED'); - - // Should still fail - const rollbackOutput = await fixture.cdk(['rollback'], { - modEnv: { PHASE: phase }, - verbose: false, - allowErrExit: true, - }); - - expect(rollbackOutput).toContain('Failing rollback'); - - // Rollback and force cleanup - await fixture.cdk(['rollback', '--force'], { - modEnv: { PHASE: phase }, - verbose: false, - }); - } finally { - await fixture.cdkDestroy('test-rollback'); - } - }), -); - -integTest('cdk bootstrap notice is displayed correctly', withDefaultFixture(async (fixture) => { +integTest('cdk notices are displayed correctly', withDefaultFixture(async (fixture) => { const cache = { expiration: 4125963264000, // year 2100 so we never overwrite the cache diff --git a/packages/aws-cdk/README.md b/packages/aws-cdk/README.md index a5359727e06ad..57081731a7c4c 100644 --- a/packages/aws-cdk/README.md +++ b/packages/aws-cdk/README.md @@ -19,7 +19,6 @@ The AWS CDK Toolkit provides the `cdk` command-line interface that can be used t | [`cdk synth`](#cdk-synthesize) | Synthesize a CDK app to CloudFormation template(s) | | [`cdk diff`](#cdk-diff) | Diff stacks against current state | | [`cdk deploy`](#cdk-deploy) | Deploy a stack into an AWS account | -| [`cdk rollback`](#cdk-rollback) | Roll back a failed deployment | | [`cdk import`](#cdk-import) | Import existing AWS resources into a CDK stack | | [`cdk migrate`](#cdk-migrate) | Migrate AWS resources, CloudFormation stacks, and CloudFormation templates to CDK | | [`cdk watch`](#cdk-watch) | Watches a CDK app for deployable and hotswappable changes | @@ -203,10 +202,6 @@ $ cdk deploy --no-rollback $ cdk deploy -R ``` -If a deployment fails you can update your code and immediately retry the -deployment from the point of failure. If you would like to explicitly roll back a failed, paused deployment, -use `cdk rollback`. - NOTE: you cannot use `--no-rollback` for any updates that would cause a resource replacement, only for updates and creations of new resources. @@ -400,7 +395,7 @@ development, your prod app may not have any resources or the resources are comme out. In this scenario, you will receive an error message stating that the app has no stacks. -To bypass this error messages, you can pass the `--ignore-no-stacks` flag to the +To bypass this error messages, you can pass the `--ignore-no-stacks` flag to the `deploy` command: ```console @@ -471,24 +466,6 @@ and might have breaking changes in the future. > *: `Fn::GetAtt` is only partially supported. Refer to [this implementation](https://github.com/aws/aws-cdk/blob/main/packages/aws-cdk/lib/api/evaluate-cloudformation-template.ts#L477-L492) for supported resources and attributes. -### `cdk rollback` - -If a deployment performed using `cdk deploy --no-rollback` fails, your -deployment will be left in a failed, paused state. From this state you can -update your code and try the deployment again, or roll the deployment back to -the last stable state. - -To roll the deployment back, use `cdk rollback`. This will initiate a rollback -to the last stable state of your stack. - -Some resources may fail to roll back. If they do, you can try again by calling -`cdk rollback --orphan ` (can be specified multiple times). Or, run -`cdk rollback --force` to have the CDK CLI automatically orphan all failing -resources. - -(`cdk rollback` requires version 23 of the bootstrap stack, since it depends on -new permissions necessary to call the appropriate CloudFormation APIs) - ### `cdk watch` The `watch` command is similar to `deploy`, @@ -619,9 +596,9 @@ This feature currently has the following limitations: ### `cdk migrate` -⚠️**CAUTION**⚠️: CDK Migrate is currently experimental and may have breaking changes in the future. +⚠️**CAUTION**⚠️: CDK Migrate is currently experimental and may have breaking changes in the future. -CDK Migrate generates a CDK app from deployed AWS resources using `--from-scan`, deployed AWS CloudFormation stacks using `--from-stack`, and local AWS CloudFormation templates using `--from-path`. +CDK Migrate generates a CDK app from deployed AWS resources using `--from-scan`, deployed AWS CloudFormation stacks using `--from-stack`, and local AWS CloudFormation templates using `--from-path`. To learn more about the CDK Migrate feature, see [Migrate to AWS CDK](https://docs.aws.amazon.com/cdk/v2/guide/migrate.html). For more information on `cdk migrate` command options, see [cdk migrate command reference](https://docs.aws.amazon.com/cdk/v2/guide/ref-cli-cdk-migrate.html). @@ -653,7 +630,7 @@ Account and Region information are retrieved from default CDK CLI sources. Use ` $ cdk migrate --language typescript --from-scan --stack-name "myCloudFormationStack" ``` -Since CDK Migrate relies on the IaC generator service, any limitations of IaC generator will apply to CDK Migrate. For general limitations, see [Considerations](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/generate-IaC.html#generate-template-considerations). +Since CDK Migrate relies on the IaC generator service, any limitations of IaC generator will apply to CDK Migrate. For general limitations, see [Considerations](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/generate-IaC.html#generate-template-considerations). IaC generator limitations with discovering resource and property values will also apply here. As a result, CDK Migrate will only migrate resources supported by IaC generator. Some of your resources may not be supported and some property values may not be accessible. For more information, see [Iac generator and write-only properties](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/generate-IaC-write-only-properties.html) and [Supported resource types](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/generate-IaC-supported-resources.html). @@ -670,8 +647,8 @@ $ # template.json is a valid cloudformation template in the local directory $ cdk migrate --stack-name MyAwesomeApplication --language typescript --from-path MyTemplate.json ``` -This command generates a new directory named `MyAwesomeApplication` within your current working directory, and -then initializes a new CDK application within that directory. The CDK app contains a `MyAwesomeApplication` stack with resources configured to match those in your local CloudFormation template. +This command generates a new directory named `MyAwesomeApplication` within your current working directory, and +then initializes a new CDK application within that directory. The CDK app contains a `MyAwesomeApplication` stack with resources configured to match those in your local CloudFormation template. This results in a CDK application with the following structure, where the lib directory contains a stack definition with the same resource configuration as the provided template.json. @@ -701,13 +678,13 @@ This will generate a Python CDK app which will synthesize the same configuration ##### Generate a TypeScript CDK app from deployed AWS resources that are not associated with a stack -If you have resources in your account that were provisioned outside AWS IaC tools and would like to manage them with the CDK, you can use the `--from-scan` option to generate the application. +If you have resources in your account that were provisioned outside AWS IaC tools and would like to manage them with the CDK, you can use the `--from-scan` option to generate the application. In this example, we use the `--filter` option to specify which resources to migrate. You can filter resources to limit the number of resources migrated to only those specified by the `--filter` option, including any resources they depend on, or resources that depend on them (for example A filter which specifies a single Lambda Function, will find that specific table and any alarms that may monitor it). The `--filter` argument offers both AND as well as OR filtering. OR filtering can be specified by passing multiple `--filter` options, and AND filtering can be specified by passing a single `--filter` option with multiple comma separated key/value pairs as seen below (see below for examples). It is recommended to use the `--filter` option to limit the number of resources returned as some resource types provide sample resources by default in all accounts which can add to the resource limits. -`--from-scan` takes 3 potential arguments: `--new`, `most-recent`, and undefined. If `--new` is passed, CDK Migrate will initiate a new scan of the account and use that new scan to discover resources. If `--most-recent` is passed, CDK Migrate will use the most recent scan of the account to discover resources. If neither `--new` nor `--most-recent` are passed, CDK Migrate will take the most recent scan of the account to discover resources, unless there is no recent scan, in which case it will initiate a new scan. +`--from-scan` takes 3 potential arguments: `--new`, `most-recent`, and undefined. If `--new` is passed, CDK Migrate will initiate a new scan of the account and use that new scan to discover resources. If `--most-recent` is passed, CDK Migrate will use the most recent scan of the account to discover resources. If neither `--new` nor `--most-recent` are passed, CDK Migrate will take the most recent scan of the account to discover resources, unless there is no recent scan, in which case it will initiate a new scan. ```console # Filtering options @@ -740,14 +717,14 @@ $ cdk migrate --stack-name MyAwesomeApplication --language typescript --from-sca - CDK Migrate will only generate L1 constructs and does not currently support any higher level abstractions. - CDK Migrate successfully generating an application does *not* guarantee the application is immediately deployable. -It simply generates a CDK application which will synthesize a template that has identical resource configurations -to the provided template. +It simply generates a CDK application which will synthesize a template that has identical resource configurations +to the provided template. - - CDK Migrate does not interact with the CloudFormation service to verify the template -provided can deploy on its own. Although by default any CDK app generated using the `--from-scan` option exclude -CloudFormation managed resources, CDK Migrate will not verify prior to deployment that any resources scanned, or in the provided + - CDK Migrate does not interact with the CloudFormation service to verify the template +provided can deploy on its own. Although by default any CDK app generated using the `--from-scan` option exclude +CloudFormation managed resources, CDK Migrate will not verify prior to deployment that any resources scanned, or in the provided template are already managed in other CloudFormation templates, nor will it verify that the resources in the provided -template are available in the desired regions, which may impact ADC or Opt-In regions. +template are available in the desired regions, which may impact ADC or Opt-In regions. - If the provided template has parameters without default values, those will need to be provided before deploying the generated application. @@ -764,13 +741,13 @@ In practice this is how CDK Migrate generated applications will operate in the f ##### **The provided template is already deployed to CloudFormation in the account/region** -If the provided template came directly from a deployed CloudFormation stack, and that stack has not experienced any drift, +If the provided template came directly from a deployed CloudFormation stack, and that stack has not experienced any drift, then the generated application will be immediately deployable, and will not cause any changes to the deployed resources. Drift might occur if a resource in your template was modified outside of CloudFormation, namely via the AWS Console or AWS CLI. ##### **The provided template is not deployed to CloudFormation in the account/region, and there *is not* overlap with existing resources in the account/region** -If the provided template represents a set of resources that have no overlap with resources already deployed in the account/region, +If the provided template represents a set of resources that have no overlap with resources already deployed in the account/region, then the generated application will be immediately deployable. This could be because the stack has never been deployed, or the application was generated from a stack deployed in another account/region. @@ -787,16 +764,16 @@ In practice this means for any resource in the provided template, for example, } ``` -There must not exist a resource of that type with the same identifier in the desired region. In this example that identfier +There must not exist a resource of that type with the same identifier in the desired region. In this example that identfier would be "MyBucket" ##### **The provided template is not deployed to CloudFormation in the account/region, and there *is* overlap with existing resources in the account/region** -If the provided template represents a set of resources that overlap with resources already deployed in the account/region, -then the generated application will not be immediately deployable. If those overlapped resources are already managed by +If the provided template represents a set of resources that overlap with resources already deployed in the account/region, +then the generated application will not be immediately deployable. If those overlapped resources are already managed by another CloudFormation stack in that account/region, then those resources will need to be manually removed from the provided template. Otherwise, if the overlapped resources are not managed by another CloudFormation stack, then first remove those -resources from your CDK Application Stack, deploy the cdk application successfully, then re-add them and run `cdk import` +resources from your CDK Application Stack, deploy the cdk application successfully, then re-add them and run `cdk import` to import them into your deployed stack. ### `cdk destroy` diff --git a/packages/aws-cdk/lib/api/bootstrap/bootstrap-template.yaml b/packages/aws-cdk/lib/api/bootstrap/bootstrap-template.yaml index ad71c39535426..8ed4bb8595446 100644 --- a/packages/aws-cdk/lib/api/bootstrap/bootstrap-template.yaml +++ b/packages/aws-cdk/lib/api/bootstrap/bootstrap-template.yaml @@ -485,8 +485,6 @@ Resources: - cloudformation:ExecuteChangeSet - cloudformation:CreateStack - cloudformation:UpdateStack - - cloudformation:RollbackStack - - cloudformation:ContinueUpdateRollback Resource: "*" - Sid: PipelineCrossAccountArtifactsBucket # Read/write buckets in different accounts. Permissions to buckets in @@ -653,7 +651,7 @@ Resources: Type: String Name: Fn::Sub: '/cdk-bootstrap/${Qualifier}/version' - Value: '23' + Value: '22' Outputs: BucketName: Description: The name of the S3 bucket owned by the CDK toolkit stack diff --git a/packages/aws-cdk/lib/api/cxapp/exec.ts b/packages/aws-cdk/lib/api/cxapp/exec.ts index 6b62d7ae2527f..31f2fca029dd9 100644 --- a/packages/aws-cdk/lib/api/cxapp/exec.ts +++ b/packages/aws-cdk/lib/api/cxapp/exec.ts @@ -49,9 +49,6 @@ export async function execProgram(aws: SdkProvider, config: Configuration): Prom if (!outdir) { throw new Error('unexpected: --output is required'); } - if (typeof outdir !== 'string') { - throw new Error(`--output takes a string, got ${JSON.stringify(outdir)}`); - } try { await fs.mkdirp(outdir); } catch (error: any) { diff --git a/packages/aws-cdk/lib/api/deployments.ts b/packages/aws-cdk/lib/api/deployments.ts index d5b6f8a63e987..285dba5d29114 100644 --- a/packages/aws-cdk/lib/api/deployments.ts +++ b/packages/aws-cdk/lib/api/deployments.ts @@ -1,4 +1,3 @@ -import { randomUUID } from 'crypto'; import * as cxapi from '@aws-cdk/cx-api'; import * as cdk_assets from 'cdk-assets'; import { AssetManifest, IManifestEntry } from 'cdk-assets'; @@ -12,17 +11,13 @@ import { deployStack, DeployStackResult, destroyStack, DeploymentMethod } from ' import { EnvironmentResources, EnvironmentResourcesRegistry } from './environment-resources'; import { HotswapMode } from './hotswap/common'; import { loadCurrentTemplateWithNestedStacks, loadCurrentTemplate, RootTemplateWithNestedStacks } from './nested-stack-helpers'; -import { CloudFormationStack, Template, ResourcesToImport, ResourceIdentifierSummaries, stabilizeStack } from './util/cloudformation'; -import { StackActivityMonitor, StackActivityProgress } from './util/cloudformation/stack-activity-monitor'; -import { StackEventPoller } from './util/cloudformation/stack-event-poller'; -import { RollbackChoice } from './util/cloudformation/stack-status'; +import { CloudFormationStack, Template, ResourcesToImport, ResourceIdentifierSummaries } from './util/cloudformation'; +import { StackActivityProgress } from './util/cloudformation/stack-activity-monitor'; import { replaceEnvPlaceholders } from './util/placeholders'; import { makeBodyParameter } from './util/template-body-parameter'; import { AssetManifestBuilder } from '../util/asset-manifest-builder'; import { buildAssets, publishAssets, BuildAssetsOptions, PublishAssetsOptions, PublishingAws, EVENT_TO_LOGGER } from '../util/asset-publishing'; -const BOOTSTRAP_STACK_VERSION_FOR_ROLLBACK = 23; - /** * SDK obtained by assuming the lookup role * for a given environment @@ -215,77 +210,6 @@ export interface DeployStackOptions { ignoreNoStacks?: boolean; } -export interface RollbackStackOptions { - /** - * Stack to roll back - */ - readonly stack: cxapi.CloudFormationStackArtifact; - - /** - * Execution role for the deployment (pass through to CloudFormation) - * - * @default - Current role - */ - readonly roleArn?: string; - - /** - * Don't show stack deployment events, just wait - * - * @default false - */ - readonly quiet?: boolean; - - /** - * Whether we are on a CI system - * - * @default false - */ - readonly ci?: boolean; - - /** - * Name of the toolkit stack, if not the default name - * - * @default 'CDKToolkit' - */ - readonly toolkitStackName?: string; - - /** - * Whether to force a rollback or not - * - * Forcing a rollback will orphan all undeletable resources. - * - * @default false - */ - readonly force?: boolean; - - /** - * Orphan the resources with the given logical IDs - * - * @default - No orphaning - */ - readonly orphanLogicalIds?: string[]; - - /** - * Display mode for stack deployment progress. - * - * @default - StackActivityProgress.Bar - stack events will be displayed for - * the resource currently being deployed. - */ - readonly progress?: StackActivityProgress; - - /** - * Whether to validate the version of the bootstrap stack permissions - * - * @default true - */ - readonly validateBootstrapStackVersion?: boolean; -} - -export interface RollbackStackResult { - readonly notInRollbackableState?: boolean; - readonly success?: boolean; -} - interface AssetOptions { /** * Stack with assets to build. @@ -495,125 +419,6 @@ export class Deployments { }); } - public async rollbackStack(options: RollbackStackOptions): Promise { - let resourcesToSkip: string[] = options.orphanLogicalIds ?? []; - if (options.force && resourcesToSkip.length > 0) { - throw new Error('Cannot combine --force with --orphan'); - } - - const { - stackSdk, - resolvedEnvironment: _, - cloudFormationRoleArn, - envResources, - } = await this.prepareSdkFor(options.stack, options.roleArn, Mode.ForWriting); - - if (options.validateBootstrapStackVersion ?? true) { - // Do a verification of the bootstrap stack version - await this.validateBootstrapStackVersion( - options.stack.stackName, - BOOTSTRAP_STACK_VERSION_FOR_ROLLBACK, - options.stack.bootstrapStackVersionSsmParameter, - envResources); - } - - const cfn = stackSdk.cloudFormation(); - const deployName = options.stack.stackName; - - // We loop in case of `--force` and the stack ends up in `CONTINUE_UPDATE_ROLLBACK`. - let maxLoops = 10; - while (maxLoops--) { - let cloudFormationStack = await CloudFormationStack.lookup(cfn, deployName); - - switch (cloudFormationStack.stackStatus.rollbackChoice) { - case RollbackChoice.NONE: - warning(`Stack ${deployName} does not need a rollback: ${cloudFormationStack.stackStatus}`); - return { notInRollbackableState: true }; - - case RollbackChoice.START_ROLLBACK: - debug(`Initiating rollback of stack ${deployName}`); - await cfn.rollbackStack({ - StackName: deployName, - RoleARN: cloudFormationRoleArn, - ClientRequestToken: randomUUID(), - // Enabling this is just the better overall default, the only reason it isn't the upstream default is backwards compatibility - RetainExceptOnCreate: true, - }).promise(); - break; - - case RollbackChoice.CONTINUE_UPDATE_ROLLBACK: - if (options.force) { - // Find the failed resources from the deployment and automatically skip them - // (Using deployment log because we definitely have `DescribeStackEvents` permissions, and we might not have - // `DescribeStackResources` permissions). - const poller = new StackEventPoller(cfn, { - stackName: deployName, - stackStatuses: ['ROLLBACK_IN_PROGRESS', 'UPDATE_ROLLBACK_IN_PROGRESS'], - }); - await poller.poll(); - resourcesToSkip = poller.resourceErrors - .filter(r => !r.isStackEvent && r.parentStackLogicalIds.length === 0) - .map(r => r.event.LogicalResourceId ?? ''); - } - - const skipDescription = resourcesToSkip.length > 0 - ? ` (orphaning: ${resourcesToSkip.join(', ')})` - : ''; - warning(`Continuing rollback of stack ${deployName}${skipDescription}`); - await cfn.continueUpdateRollback({ - StackName: deployName, - ClientRequestToken: randomUUID(), - RoleARN: cloudFormationRoleArn, - ResourcesToSkip: resourcesToSkip, - }).promise(); - break; - - case RollbackChoice.ROLLBACK_FAILED: - warning(`Stack ${deployName} failed creation and rollback. This state cannot be rolled back. You can recreate this stack by running 'cdk deploy'.`); - return { notInRollbackableState: true }; - - default: - throw new Error(`Unexpected rollback choice: ${cloudFormationStack.stackStatus.rollbackChoice}`); - } - - const monitor = options.quiet ? undefined : StackActivityMonitor.withDefaultPrinter(cfn, deployName, options.stack, { - ci: options.ci, - }).start(); - - let stackErrorMessage: string | undefined = undefined; - let finalStackState = cloudFormationStack; - try { - const successStack = await stabilizeStack(cfn, deployName); - - // This shouldn't really happen, but catch it anyway. You never know. - if (!successStack) { throw new Error('Stack deploy failed (the stack disappeared while we were rolling it back)'); } - finalStackState = successStack; - - const errors = monitor?.errors?.join(', '); - if (errors) { - stackErrorMessage = errors; - } - } catch (e: any) { - stackErrorMessage = suffixWithErrors(e.message, monitor?.errors); - } finally { - await monitor?.stop(); - } - - if (finalStackState.stackStatus.isRollbackSuccess || !stackErrorMessage) { - return { success: true }; - } - - // Either we need to ignore some resources to continue the rollback, or something went wrong - if (finalStackState.stackStatus.rollbackChoice === RollbackChoice.CONTINUE_UPDATE_ROLLBACK && options.force) { - // Do another loop-de-loop - continue; - } - - throw new Error(`${stackErrorMessage} (fix problem and retry, or orphan these resources using --orphan or --force)`);; - } - throw new Error('Rollback did not finish after a large number of iterations; stopping because it looks like we\'re not making progress anymore. You can retry if rollback was progressing as expected.'); - } - public async destroyStack(options: DestroyStackOptions): Promise { const { stackSdk, cloudFormationRoleArn: roleArn } = await this.prepareSdkFor(options.stack, options.roleArn, Mode.ForWriting); @@ -925,9 +730,3 @@ class ParallelSafeAssetProgress implements cdk_assets.IPublishProgressListener { */ export class CloudFormationDeployments extends Deployments { } - -function suffixWithErrors(msg: string, errors?: string[]) { - return errors && errors.length > 0 - ? `${msg}: ${errors.join(', ')}` - : msg; -} \ No newline at end of file diff --git a/packages/aws-cdk/lib/api/util/cloudformation/stack-activity-monitor.ts b/packages/aws-cdk/lib/api/util/cloudformation/stack-activity-monitor.ts index 6db3b7f67941c..1b2422a219168 100644 --- a/packages/aws-cdk/lib/api/util/cloudformation/stack-activity-monitor.ts +++ b/packages/aws-cdk/lib/api/util/cloudformation/stack-activity-monitor.ts @@ -3,11 +3,11 @@ import * as cxschema from '@aws-cdk/cloud-assembly-schema'; import * as cxapi from '@aws-cdk/cx-api'; import * as aws from 'aws-sdk'; import * as chalk from 'chalk'; -import { ResourceEvent, StackEventPoller } from './stack-event-poller'; import { error, logLevel, LogLevel, setLogLevel } from '../../../logging'; import { RewritableBlock } from '../display'; -export interface StackActivity extends ResourceEvent { +export interface StackActivity { + readonly event: aws.CloudFormation.StackEvent; readonly metadata?: ResourceMetadata; } @@ -116,13 +116,17 @@ export class StackActivityMonitor { } /** - * The poller used to read stack events + * Resource errors found while monitoring the deployment */ - public readonly poller: StackEventPoller; - - public readonly errors: string[] = []; + public readonly errors = new Array(); private active = false; + private activity: { [eventId: string]: StackActivity } = { }; + + /** + * Determines which events not to display + */ + private readonly startTime: number; /** * Current tick timer @@ -135,16 +139,13 @@ export class StackActivityMonitor { private readPromise?: Promise; constructor( - cfn: aws.CloudFormation, + private readonly cfn: aws.CloudFormation, private readonly stackName: string, private readonly printer: IActivityPrinter, private readonly stack?: cxapi.CloudFormationStackArtifact, changeSetCreationTime?: Date, ) { - this.poller = new StackEventPoller(cfn, { - stackName, - startTime: changeSetCreationTime?.getTime() ?? Date.now(), - }); + this.startTime = changeSetCreationTime?.getTime() ?? Date.now(); } public start() { @@ -220,17 +221,61 @@ export class StackActivityMonitor { * see a next page and the last event in the page is new to us (and within the time window). * haven't seen the final event */ - private async readNewEvents(): Promise { - const pollEvents = await this.poller.poll(); + private async readNewEvents(stackName?: string): Promise { + const stackToPollForEvents = stackName ?? this.stackName; + const events: StackActivity[] = []; + const CFN_SUCCESS_STATUS = ['UPDATE_COMPLETE', 'CREATE_COMPLETE', 'DELETE_COMPLETE', 'DELETE_SKIPPED']; + try { + let nextToken: string | undefined; + let finished = false; + while (!finished) { + const response = await this.cfn.describeStackEvents({ StackName: stackToPollForEvents, NextToken: nextToken }).promise(); + const eventPage = response?.StackEvents ?? []; + + for (const event of eventPage) { + // Event from before we were interested in 'em + if (event.Timestamp.valueOf() < this.startTime) { + finished = true; + break; + } + + // Already seen this one + if (event.EventId in this.activity) { + finished = true; + break; + } + + // Fresh event + events.push(this.activity[event.EventId] = { + event: event, + metadata: this.findMetadataFor(event.LogicalResourceId), + }); + + if (event.ResourceType === 'AWS::CloudFormation::Stack' && !CFN_SUCCESS_STATUS.includes(event.ResourceStatus ?? '')) { + // If the event is not for `this` stack and has a physical resource Id, recursively call for events in the nested stack + if (event.PhysicalResourceId && event.PhysicalResourceId !== stackToPollForEvents) { + await this.readNewEvents(event.PhysicalResourceId); + } + } + } - const activities: StackActivity[] = pollEvents.map(event => ({ - ...event, - metadata: this.findMetadataFor(event.event.LogicalResourceId), - })); + // We're also done if there's nothing left to read + nextToken = response?.NextToken; + if (nextToken === undefined) { + finished = true; + } + } + } catch (e: any) { + if (e.code === 'ValidationError' && e.message === `Stack [${stackToPollForEvents}] does not exist`) { + return; + } + throw e; + } - for (const activity of activities) { - this.checkForErrors(activity); - this.printer.addActivity(activity ); + events.reverse(); + for (const event of events) { + this.checkForErrors(event); + this.printer.addActivity(event); } } @@ -253,7 +298,6 @@ export class StackActivityMonitor { } private checkForErrors(activity: StackActivity) { - if (hasErrorMessage(activity.event.ResourceStatus ?? '')) { const isCancelled = (activity.event.ResourceStatusReason ?? '').indexOf('cancelled') > -1; @@ -506,7 +550,7 @@ export class HistoryActivityPrinter extends ActivityPrinterBase { this.stream.write('\nFailed resources:\n'); for (const failure of this.failures) { // Root stack failures are not interesting - if (failure.isStackEvent) { + if (failure.event.StackName === failure.event.LogicalResourceId) { continue; } @@ -663,7 +707,7 @@ export class CurrentActivityPrinter extends ActivityPrinterBase { const lines = new Array(); for (const failure of this.failures) { // Root stack failures are not interesting - if (failure.isStackEvent) { + if (failure.event.StackName === failure.event.LogicalResourceId) { continue; } diff --git a/packages/aws-cdk/lib/api/util/cloudformation/stack-event-poller.ts b/packages/aws-cdk/lib/api/util/cloudformation/stack-event-poller.ts deleted file mode 100644 index 8bc218a568ac3..0000000000000 --- a/packages/aws-cdk/lib/api/util/cloudformation/stack-event-poller.ts +++ /dev/null @@ -1,172 +0,0 @@ -import * as aws from 'aws-sdk'; - -export interface StackEventPollerProps { - /** - * The stack to poll - */ - readonly stackName: string; - - /** - * IDs of parent stacks of this resource, in case of resources in nested stacks - */ - readonly parentStackLogicalIds?: string[]; - - /** - * Timestamp for the oldest event we're interested in - * - * @default - Read all events - */ - readonly startTime?: number; - - /** - * Stop reading when we see the stack entering this status - * - * Should be something like `CREATE_IN_PROGRESS`, `UPDATE_IN_PROGRESS`, - * `DELETE_IN_PROGRESS, `ROLLBACK_IN_PROGRESS`. - * - * @default - Read all events - */ - readonly stackStatuses?: string[]; -} - -export interface ResourceEvent { - readonly event: aws.CloudFormation.StackEvent; - readonly parentStackLogicalIds: string[]; - - /** - * Whether this event regards the root stack - * - * @default false - */ - readonly isStackEvent?: boolean; -} - -export class StackEventPoller { - public readonly events: ResourceEvent[] = []; - public complete: boolean = false; - - private readonly eventIds = new Set(); - private readonly nestedStackPollers: Record = {}; - - constructor(private readonly cfn: aws.CloudFormation, private readonly props: StackEventPollerProps) { - } - - /** - * From all accumulated events, return only the errors - */ - public get resourceErrors(): ResourceEvent[] { - return this.events.filter(e => e.event.ResourceStatus?.endsWith('_FAILED') && !e.isStackEvent); - } - - /** - * Poll for new stack events - * - * Will not return events older than events indicated by the constructor filters. - * - * Recurses into nested stacks, and returns events old-to-new. - */ - public async poll(): Promise { - const events: ResourceEvent[] = []; - try { - let nextToken: string | undefined; - let finished = false; - while (!finished) { - const response = await this.cfn.describeStackEvents({ StackName: this.props.stackName, NextToken: nextToken }).promise(); - const eventPage = response?.StackEvents ?? []; - - for (const event of eventPage) { - // Event from before we were interested in 'em - if (this.props.startTime !== undefined && event.Timestamp.valueOf() < this.props.startTime) { - finished = true; - break; - } - - // Already seen this one - if (this.eventIds.has(event.EventId)) { - finished = true; - break; - } - this.eventIds.add(event.EventId); - - // The events for the stack itself are also included next to events about resources; we can test for them in this way. - const isParentStackEvent = event.PhysicalResourceId === event.StackId; - - if (isParentStackEvent && this.props.stackStatuses?.includes(event.ResourceStatus ?? '')) { - finished = true; - break; - } - - // Fresh event - const resEvent: ResourceEvent = { - event: event, - parentStackLogicalIds: this.props.parentStackLogicalIds ?? [], - isStackEvent: isParentStackEvent, - }; - events.push(resEvent); - - if (!isParentStackEvent && event.ResourceType === 'AWS::CloudFormation::Stack' && isStackBeginOperationState(event.ResourceStatus)) { - // If the event is not for `this` stack and has a physical resource Id, recursively call for events in the nested stack - this.trackNestedStack(event, [...this.props.parentStackLogicalIds ?? [], event.LogicalResourceId ?? '']); - } - - if (isParentStackEvent && isStackTerminalState(event.ResourceStatus)) { - this.complete = true; - } - } - - // We're also done if there's nothing left to read - nextToken = response?.NextToken; - if (nextToken === undefined) { - finished = true; - } - } - } catch (e: any) { - if (e.code === 'ValidationError' && e.message === `Stack [${this.props.stackName}] does not exist`) { - // Ignore - } else { - throw e; - } - } - - // Also poll all nested stacks we're currently tracking - for (const [logicalId, poller] of Object.entries(this.nestedStackPollers)) { - events.push(...await poller.poll()); - if (poller.complete) { - delete this.nestedStackPollers[logicalId]; - } - } - - // Return what we have so far - events.sort((a, b) => a.event.Timestamp.valueOf() - b.event.Timestamp.valueOf()); - this.events.push(...events); - return events; - } - - /** - * On the CREATE_IN_PROGRESS, UPDATE_IN_PROGRESS, DELETE_IN_PROGRESS event of a nested stack, poll the nested stack updates - */ - private trackNestedStack(event: aws.CloudFormation.StackEvent, parentStackLogicalIds: string[]) { - const logicalId = event.LogicalResourceId ?? ''; - if (!this.nestedStackPollers[logicalId]) { - this.nestedStackPollers[logicalId] = new StackEventPoller(this.cfn, { - stackName: event.PhysicalResourceId ?? '', - parentStackLogicalIds: parentStackLogicalIds, - startTime: event.Timestamp.valueOf(), - }); - } - } -} - -function isStackBeginOperationState(state: string | undefined) { - return [ - 'CREATE_IN_PROGRESS', - 'UPDATE_IN_PROGRESS', - 'DELETE_IN_PROGRESS', - 'UPDATE_ROLLBACK_IN_PROGRESS', - 'ROLLBACK_IN_PROGRESS', - ].includes(state ?? ''); -} - -function isStackTerminalState(state: string | undefined) { - return !(state ?? '').endsWith('_IN_PROGRESS'); -} \ No newline at end of file diff --git a/packages/aws-cdk/lib/api/util/cloudformation/stack-status.ts b/packages/aws-cdk/lib/api/util/cloudformation/stack-status.ts index 4dd113aaa30db..473858b4bac18 100644 --- a/packages/aws-cdk/lib/api/util/cloudformation/stack-status.ts +++ b/packages/aws-cdk/lib/api/util/cloudformation/stack-status.ts @@ -46,43 +46,7 @@ export class StackStatus { || this.name === 'UPDATE_ROLLBACK_COMPLETE'; } - /** - * Whether the stack is in a paused state due to `--no-rollback`. - * - * The possible actions here are retrying a new `--no-rollback` deployment, or initiating a rollback. - */ - get rollbackChoice(): RollbackChoice { - switch (this.name) { - case 'CREATE_FAILED': - case 'UPDATE_FAILED': - return RollbackChoice.START_ROLLBACK; - case 'UPDATE_ROLLBACK_FAILED': - return RollbackChoice.CONTINUE_UPDATE_ROLLBACK; - case 'ROLLBACK_FAILED': - // Unfortunately there is no option to continue a failed rollback without - // a stable target state. - return RollbackChoice.ROLLBACK_FAILED; - default: - return RollbackChoice.NONE; - } - } - public toString(): string { return this.name + (this.reason ? ` (${this.reason})` : ''); } } - -/** - * Describe the current rollback options for this state - */ -export enum RollbackChoice { - START_ROLLBACK, - CONTINUE_UPDATE_ROLLBACK, - /** - * A sign that stack creation AND its rollback have failed. - * - * There is no way to recover from this, other than recreating the stack. - */ - ROLLBACK_FAILED, - NONE, -} \ No newline at end of file diff --git a/packages/aws-cdk/lib/cdk-toolkit.ts b/packages/aws-cdk/lib/cdk-toolkit.ts index 068f16dc1e12c..b0af703770d3f 100644 --- a/packages/aws-cdk/lib/cdk-toolkit.ts +++ b/packages/aws-cdk/lib/cdk-toolkit.ts @@ -434,50 +434,6 @@ export class CdkToolkit { }); } - /** - * Roll back the given stack or stacks. - */ - public async rollback(options: RollbackOptions) { - const startSynthTime = new Date().getTime(); - const stackCollection = await this.selectStacksForDeploy(options.selector, true); - const elapsedSynthTime = new Date().getTime() - startSynthTime; - print('\n✨ Synthesis time: %ss\n', formatTime(elapsedSynthTime)); - - if (stackCollection.stackCount === 0) { - // eslint-disable-next-line no-console - console.error('No stacks selected'); - return; - } - - let anyRollbackable = false; - - for (const stack of stackCollection.stackArtifacts) { - print('Rolling back %s', chalk.bold(stack.displayName)); - const startRollbackTime = new Date().getTime(); - try { - const result = await this.props.deployments.rollbackStack({ - stack, - roleArn: options.roleArn, - toolkitStackName: options.toolkitStackName, - force: options.force, - validateBootstrapStackVersion: options.validateBootstrapStackVersion, - orphanLogicalIds: options.orphanLogicalIds, - }); - if (!result.notInRollbackableState) { - anyRollbackable = true; - } - const elapsedRollbackTime = new Date().getTime() - startRollbackTime; - print('\n✨ Rollback time: %ss\n', formatTime(elapsedRollbackTime)); - } catch (e: any) { - error('\n ❌ %s failed: %s', chalk.bold(stack.displayName), e.message); - throw new Error('Rollback failed (use --force to orphan failing resources)'); - } - } - if (!anyRollbackable) { - throw new Error('No stacks were in a state that could be rolled back'); - } - } - public async watch(options: WatchOptions) { const rootDir = path.dirname(path.resolve(PROJECT_CONFIG)); debug("root directory used for 'watch' is: %s", rootDir); @@ -1396,48 +1352,6 @@ export interface DeployOptions extends CfnDeployOptions, WatchOptions { readonly ignoreNoStacks?: boolean; } -export interface RollbackOptions { - /** - * Criteria for selecting stacks to deploy - */ - readonly selector: StackSelector; - - /** - * Name of the toolkit stack to use/deploy - * - * @default CDKToolkit - */ - readonly toolkitStackName?: string; - - /** - * Role to pass to CloudFormation for deployment - * - * @default - Default stack role - */ - readonly roleArn?: string; - - /** - * Whether to force the rollback or not - * - * @default false - */ - readonly force?: boolean; - - /** - * Logical IDs of resources to orphan - * - * @default - No orphaning - */ - readonly orphanLogicalIds?: string[]; - - /** - * Whether to validate the version of the bootstrap stack permissions - * - * @default true - */ - readonly validateBootstrapStackVersion?: boolean; -} - export interface ImportOptions extends CfnDeployOptions { /** * Build a physical resource mapping and write it to the given file, without performing the actual import operation diff --git a/packages/aws-cdk/lib/cli.ts b/packages/aws-cdk/lib/cli.ts index 9a91e6257db76..9d61a448c9a91 100644 --- a/packages/aws-cdk/lib/cli.ts +++ b/packages/aws-cdk/lib/cli.ts @@ -176,27 +176,6 @@ async function parseCommandLineArguments(args: string[]) { .option('asset-prebuild', { type: 'boolean', desc: 'Whether to build all assets before deploying the first stack (useful for failing Docker builds)', default: true }) .option('ignore-no-stacks', { type: 'boolean', desc: 'Whether to deploy if the app contains no stacks', default: false }), ) - .command('rollback [STACKS..]', 'Rolls back the stack(s) named STACKS to their last stable state', (yargs: Argv) => yargs - .option('all', { type: 'boolean', default: false, desc: 'Roll back all available stacks' }) - .option('toolkit-stack-name', { type: 'string', desc: 'The name of the CDK toolkit stack the environment is bootstrapped with', requiresArg: true }) - .option('force', { - alias: 'f', - type: 'boolean', - desc: 'Orphan all resources for which the rollback operation fails.', - }) - .option('validate-bootstrap-version', { - type: 'boolean', - desc: 'Whether to validate the bootstrap stack version. Defaults to \'true\', disable with --no-validate-bootstrap-version.', - }) - .option('orphan', { - // alias: 'o' conflicts with --output - type: 'array', - nargs: 1, - requiresArg: true, - desc: 'Orphan the given resources, identified by their logical ID (can be specified multiple times)', - default: [], - }), - ) .command('import [STACK]', 'Import existing resource(s) into the given STACK', (yargs: Argv) => yargs .option('execute', { type: 'boolean', desc: 'Whether to execute ChangeSet (--no-execute will NOT execute the ChangeSet)', default: true }) .option('change-set-name', { type: 'string', desc: 'Name of the CloudFormation change set to create' }) @@ -617,16 +596,6 @@ export async function exec(args: string[], synthesizer?: Synthesizer): Promise = jest.fn(); -let mockContinueUpdateRollback: MockedHandlerType = jest.fn(); -let mockDescribeStackEvents: MockedHandlerType = jest.fn(); beforeEach(() => { jest.resetAllMocks(); sdkProvider = new MockSdkProvider(); @@ -38,9 +35,6 @@ beforeEach(() => { StackResourceSummaries: stackResources, }; }, - rollbackStack: mockRollbackStack, - continueUpdateRollback: mockContinueUpdateRollback, - describeStackEvents: mockDescribeStackEvents, }); ToolkitInfo.lookup = mockToolkitInfoLookup = jest.fn().mockResolvedValue(ToolkitInfo.bootstrapStackNotFoundInfo('TestBootstrapStack')); @@ -337,76 +331,90 @@ test('readCurrentTemplateWithNestedStacks() can handle non-Resources in the temp }); test('readCurrentTemplateWithNestedStacks() with a 3-level nested + sibling structure works', async () => { - givenStacks({ - MultiLevelRoot: { - template: { - Resources: { - NestedStack: { - Type: 'AWS::CloudFormation::Stack', - Properties: { - TemplateURL: 'https://www.magic-url.com', - }, - Metadata: { - 'aws:asset:path': 'one-resource-two-stacks-stack.nested.template.json', - }, - }, - }, - }, - }, - NestedStack: { - template: { - Resources: { - SomeResource: { - Type: 'AWS::Something', - Properties: { - Property: 'old-value', + const cfnStack = new FakeCloudformationStack({ + stackName: 'MultiLevelRoot', + stackId: 'StackId', + }); + CloudFormationStack.lookup = (async (_, stackName: string) => { + switch (stackName) { + case 'MultiLevelRoot': + cfnStack.template = async () => ({ + Resources: { + NestedStack: { + Type: 'AWS::CloudFormation::Stack', + Properties: { + TemplateURL: 'https://www.magic-url.com', + }, + Metadata: { + 'aws:asset:path': 'one-resource-two-stacks-stack.nested.template.json', + }, }, }, - GrandChildStackA: { - Type: 'AWS::CloudFormation::Stack', - Properties: { - TemplateURL: 'https://www.magic-url.com', - }, - Metadata: { - 'aws:asset:path': 'one-resource-stack.nested.template.json', + }); + break; + + case 'NestedStack': + cfnStack.template = async () => ({ + Resources: { + SomeResource: { + Type: 'AWS::Something', + Properties: { + Property: 'old-value', + }, }, - }, - GrandChildStackB: { - Type: 'AWS::CloudFormation::Stack', - Properties: { - TemplateURL: 'https://www.magic-url.com', + GrandChildStackA: { + Type: 'AWS::CloudFormation::Stack', + Properties: { + TemplateURL: 'https://www.magic-url.com', + }, + Metadata: { + 'aws:asset:path': 'one-resource-stack.nested.template.json', + }, }, - Metadata: { - 'aws:asset:path': 'one-resource-stack.nested.template.json', + GrandChildStackB: { + Type: 'AWS::CloudFormation::Stack', + Properties: { + TemplateURL: 'https://www.magic-url.com', + }, + Metadata: { + 'aws:asset:path': 'one-resource-stack.nested.template.json', + }, }, }, - }, - }, - }, - GrandChildStackA: { - template: { - Resources: { - SomeResource: { - Type: 'AWS::Something', - Properties: { - Property: 'old-value', + }); + break; + + case 'GrandChildStackA': + cfnStack.template = async () => ({ + Resources: { + SomeResource: { + Type: 'AWS::Something', + Properties: { + Property: 'old-value', + }, }, }, - }, - }, - }, - GrandChildStackB: { - template: { - Resources: { - SomeResource: { - Type: 'AWS::Something', - Properties: { - Property: 'old-value', + }); + break; + + case 'GrandChildStackB': + cfnStack.template = async () => ({ + Resources: { + SomeResource: { + Type: 'AWS::Something', + Properties: { + Property: 'old-value', + }, }, }, - }, - }, - }, + }); + break; + + default: + throw new Error('unknown stack name ' + stackName + ' found in deployments.test.ts'); + } + + return cfnStack; }); const rootStack = testStack({ @@ -674,31 +682,36 @@ test('readCurrentTemplateWithNestedStacks() on an undeployed parent stack with a test('readCurrentTemplateWithNestedStacks() caches calls to listStackResources()', async () => { // GIVEN - givenStacks({ - '*': { - template: { - Resources: { - NestedStackA: { - Type: 'AWS::CloudFormation::Stack', - Properties: { - TemplateURL: 'https://www.magic-url.com', - }, - Metadata: { - 'aws:asset:path': 'one-resource-stack.nested.template.json', - }, + const cfnStack = new FakeCloudformationStack({ + stackName: 'CachingRoot', + stackId: 'StackId', + }); + CloudFormationStack.lookup = (async (_cfn, _stackName: string) => { + cfnStack.template = async () => ({ + Resources: + { + NestedStackA: { + Type: 'AWS::CloudFormation::Stack', + Properties: { + TemplateURL: 'https://www.magic-url.com', }, - NestedStackB: { - Type: 'AWS::CloudFormation::Stack', - Properties: { - TemplateURL: 'https://www.magic-url.com', - }, - Metadata: { - 'aws:asset:path': 'one-resource-stack.nested.template.json', - }, + Metadata: { + 'aws:asset:path': 'one-resource-stack.nested.template.json', + }, + }, + NestedStackB: { + Type: 'AWS::CloudFormation::Stack', + Properties: { + TemplateURL: 'https://www.magic-url.com', + }, + Metadata: { + 'aws:asset:path': 'one-resource-stack.nested.template.json', }, }, }, - }, + }); + + return cfnStack; }); const rootStack = testStack({ @@ -743,112 +756,15 @@ test('readCurrentTemplateWithNestedStacks() caches calls to listStackResources() expect(numberOfTimesListStackResourcesWasCalled).toEqual(1); }); -test('rollback stack assumes role if necessary', async() => { - const mockForEnvironment = jest.fn().mockImplementation(() => { return { sdk: sdkProvider.sdk }; }); - sdkProvider.forEnvironment = mockForEnvironment; - givenStacks({ - '*': { template: {} }, - }); - - await deployments.rollbackStack({ - stack: testStack({ - stackName: 'boop', - properties: { - assumeRoleArn: 'bloop:${AWS::Region}:${AWS::AccountId}', - }, - }), - validateBootstrapStackVersion: false, - }); - - expect(mockForEnvironment).toHaveBeenCalledWith(expect.anything(), expect.anything(), expect.objectContaining({ - assumeRoleArn: 'bloop:here:123456789012', - })); -}); - -test('rollback stack allows rolling back from UPDATE_FAILED', async() => { - // GIVEN - givenStacks({ - '*': { template: {}, stackStatus: 'UPDATE_FAILED' }, - }); - - // WHEN - await deployments.rollbackStack({ - stack: testStack({ stackName: 'boop' }), - validateBootstrapStackVersion: false, - }); - - // THEN - expect(mockRollbackStack).toHaveBeenCalled(); -}); - -test('rollback stack allows continue rollback from UPDATE_ROLLBACK_FAILED', async() => { - // GIVEN - givenStacks({ - '*': { template: {}, stackStatus: 'UPDATE_ROLLBACK_FAILED' }, - }); - - // WHEN - await deployments.rollbackStack({ - stack: testStack({ stackName: 'boop' }), - validateBootstrapStackVersion: false, - }); - - // THEN - expect(mockContinueUpdateRollback).toHaveBeenCalled(); -}); - -test('rollback stack fails in UPDATE_COMPLETE state', async() => { - // GIVEN - givenStacks({ - '*': { template: {}, stackStatus: 'UPDATE_COMPLETE' }, - }); - - // WHEN - const response = await deployments.rollbackStack({ - stack: testStack({ stackName: 'boop' }), - validateBootstrapStackVersion: false, - }); - - // THEN - expect(response.notInRollbackableState).toBe(true); -}); - -test('continue rollback stack with force ignores any failed resources', async() => { - // GIVEN - givenStacks({ - '*': { template: {}, stackStatus: 'UPDATE_ROLLBACK_FAILED' }, - }); - mockDescribeStackEvents.mockReturnValue({ - StackEvents: [ - { - EventId: 'asdf', - StackId: 'stack/MyStack', - StackName: 'MyStack', - Timestamp: new Date(), - LogicalResourceId: 'Xyz', - ResourceStatus: 'UPDATE_FAILED', - }, - ], - }); - - // WHEN - await deployments.rollbackStack({ - stack: testStack({ stackName: 'boop' }), - validateBootstrapStackVersion: false, - force: true, - }); - - // THEN - expect(mockContinueUpdateRollback).toHaveBeenCalledWith(expect.objectContaining({ - ResourcesToSkip: ['Xyz'], - })); -}); - test('readCurrentTemplateWithNestedStacks() succesfully ignores stacks without metadata', async () => { // GIVEN - givenStacks({ - 'MetadataRoot': { - template: { + const cfnStack = new FakeCloudformationStack({ + stackName: 'MetadataRoot', + stackId: 'StackId', + }); + CloudFormationStack.lookup = (async (_, stackName: string) => { + if (stackName === 'MetadataRoot') { + cfnStack.template = async () => ({ Resources: { WithMetadata: { Type: 'AWS::CloudFormation::Stack', @@ -860,10 +776,10 @@ test('readCurrentTemplateWithNestedStacks() succesfully ignores stacks without m }, }, }, - }, - }, - '*': { - template: { + }); + + } else { + cfnStack.template = async () => ({ Resources: { SomeResource: { Type: 'AWS::Something', @@ -872,8 +788,10 @@ test('readCurrentTemplateWithNestedStacks() succesfully ignores stacks without m }, }, }, - }, - }, + }); + } + + return cfnStack; }); const rootStack = testStack({ @@ -1000,23 +918,3 @@ function stackSummaryOf(logicalId: string, resourceType: string, physicalResourc LastUpdatedTimestamp: new Date(), }; } - -function givenStacks(stacks: Record) { - jest.spyOn(CloudFormationStack, 'lookup').mockImplementation(async (_, stackName) => { - let stack = stacks[stackName]; - if (!stack) { - stack = stacks['*']; - } - if (stack) { - const cfnStack = new FakeCloudformationStack({ - stackName, - stackId: `stack/${stackName}`, - stackStatus: stack.stackStatus, - }); - cfnStack.setTemplate(stack.template); - return cfnStack; - } else { - return new FakeCloudformationStack({ stackName }); - } - }); -} \ No newline at end of file diff --git a/packages/aws-cdk/test/api/fake-cloudformation-stack.ts b/packages/aws-cdk/test/api/fake-cloudformation-stack.ts index 918d6c4d5bb37..1668ea0b55d33 100644 --- a/packages/aws-cdk/test/api/fake-cloudformation-stack.ts +++ b/packages/aws-cdk/test/api/fake-cloudformation-stack.ts @@ -2,12 +2,10 @@ import { CloudFormation } from 'aws-sdk'; import { CloudFormationStack, Template } from '../../lib/api/util/cloudformation'; import { instanceMockFrom } from '../util'; -import { StackStatus } from '../../lib/api/util/cloudformation/stack-status'; export interface FakeCloudFormationStackProps { readonly stackName: string; - readonly stackId?: string; - readonly stackStatus?: string; + readonly stackId: string; } export class FakeCloudformationStack extends CloudFormationStack { @@ -31,23 +29,7 @@ export class FakeCloudformationStack extends CloudFormationStack { return Promise.resolve(this.__template); } - public get exists() { - return this.props.stackId !== undefined; - } - - public get stackStatus() { - const status = this.props.stackStatus ?? 'UPDATE_COMPLETE'; - return new StackStatus(status, 'The test said so'); - } - - public get stackId() { - if (!this.props.stackId) { - throw new Error('Cannot retrieve stackId from a non-existent stack'); - } + public get stackId(): string { return this.props.stackId; } - - public get outputs(): Record { - return {}; - } } diff --git a/packages/aws-cdk/test/api/stack-activity-monitor.test.ts b/packages/aws-cdk/test/api/stack-activity-monitor.test.ts index a07ec99e40b38..6c5eddc7dd75e 100644 --- a/packages/aws-cdk/test/api/stack-activity-monitor.test.ts +++ b/packages/aws-cdk/test/api/stack-activity-monitor.test.ts @@ -29,7 +29,6 @@ test('prints 0/4 progress report, when addActivity is called with an "IN_PROGRES EventId: '', StackName: 'stack-name', }, - parentStackLogicalIds: [], }); }); @@ -54,7 +53,6 @@ test('prints 1/4 progress report, when addActivity is called with an "UPDATE_COM EventId: '', StackName: 'stack-name', }, - parentStackLogicalIds: [], }); }); @@ -79,7 +77,6 @@ test('prints 1/4 progress report, when addActivity is called with an "UPDATE_COM EventId: '', StackName: 'stack-name', }, - parentStackLogicalIds: [], }); }); @@ -104,7 +101,6 @@ test('prints 1/4 progress report, when addActivity is called with an "ROLLBACK_C EventId: '', StackName: 'stack-name', }, - parentStackLogicalIds: [], }); }); @@ -129,7 +125,6 @@ test('prints 0/4 progress report, when addActivity is called with an "UPDATE_FAI EventId: '', StackName: 'stack-name', }, - parentStackLogicalIds: [], }); }); @@ -154,7 +149,6 @@ test('does not print "Failed Resources:" list, when all deployments are successf EventId: '', StackName: 'stack-name', }, - parentStackLogicalIds: [], }); historyActivityPrinter.addActivity({ event: { @@ -166,7 +160,6 @@ test('does not print "Failed Resources:" list, when all deployments are successf EventId: '', StackName: 'stack-name', }, - parentStackLogicalIds: [], }); historyActivityPrinter.addActivity({ event: { @@ -178,7 +171,6 @@ test('does not print "Failed Resources:" list, when all deployments are successf EventId: '', StackName: 'stack-name', }, - parentStackLogicalIds: [], }); historyActivityPrinter.stop(); }); @@ -207,7 +199,6 @@ test('prints "Failed Resources:" list, when at least one deployment fails', () = EventId: '', StackName: 'stack-name', }, - parentStackLogicalIds: [], }); historyActivityPrinter.addActivity({ event: { @@ -219,7 +210,6 @@ test('prints "Failed Resources:" list, when at least one deployment fails', () = EventId: '', StackName: 'stack-name', }, - parentStackLogicalIds: [], }); historyActivityPrinter.stop(); }); @@ -252,7 +242,6 @@ test('print failed resources because of hook failures', () => { HookType: 'hook1', HookStatusReason: 'stack1 must obey certain rules', }, - parentStackLogicalIds: [], }); historyActivityPrinter.addActivity({ event: { @@ -265,7 +254,6 @@ test('print failed resources because of hook failures', () => { StackName: 'stack-name', ResourceStatusReason: 'The following hook(s) failed: hook1', }, - parentStackLogicalIds: [], }); historyActivityPrinter.stop(); }); diff --git a/packages/aws-cdk/test/cdk-toolkit.test.ts b/packages/aws-cdk/test/cdk-toolkit.test.ts index 248f6d615dfe7..4d1fee89b2362 100644 --- a/packages/aws-cdk/test/cdk-toolkit.test.ts +++ b/packages/aws-cdk/test/cdk-toolkit.test.ts @@ -64,7 +64,7 @@ import { instanceMockFrom, MockCloudExecutable, TestStackArtifact } from './util import { MockSdkProvider } from './util/mock-sdk'; import { Bootstrapper } from '../lib/api/bootstrap'; import { DeployStackResult } from '../lib/api/deploy-stack'; -import { Deployments, DeployStackOptions, DestroyStackOptions, RollbackStackOptions, RollbackStackResult } from '../lib/api/deployments'; +import { Deployments, DeployStackOptions, DestroyStackOptions } from '../lib/api/deployments'; import { HotswapMode } from '../lib/api/hotswap/common'; import { Template } from '../lib/api/util/cloudformation'; import { CdkToolkit, Tag } from '../lib/cdk-toolkit'; @@ -1226,31 +1226,6 @@ describe('synth', () => { expect(mockData.mock.calls.length).toEqual(1); expect(mockData.mock.calls[0][0]).toBeDefined(); }); - - test('rollback uses deployment role', async () => { - cloudExecutable = new MockCloudExecutable({ - stacks: [ - MockStack.MOCK_STACK_C, - ], - }); - - const mockedRollback = jest.spyOn(Deployments.prototype, 'rollbackStack').mockResolvedValue({ - success: true, - }); - - const toolkit = new CdkToolkit({ - cloudExecutable, - configuration: cloudExecutable.configuration, - sdkProvider: cloudExecutable.sdkProvider, - deployments: new Deployments({ sdkProvider: new MockSdkProvider() }), - }); - - await toolkit.rollback({ - selector: { patterns: [] }, - }); - - expect(mockedRollback).toHaveBeenCalled(); - }); }); class MockStack { @@ -1427,12 +1402,6 @@ class FakeCloudFormation extends Deployments { }); } - public rollbackStack(_options: RollbackStackOptions): Promise { - return Promise.resolve({ - success: true, - }); - } - public destroyStack(options: DestroyStackOptions): Promise { expect(options.stack).toBeDefined(); return Promise.resolve(); diff --git a/packages/aws-cdk/test/util/mock-sdk.ts b/packages/aws-cdk/test/util/mock-sdk.ts index d280ef9f02942..0d943fadb3dea 100644 --- a/packages/aws-cdk/test/util/mock-sdk.ts +++ b/packages/aws-cdk/test/util/mock-sdk.ts @@ -269,21 +269,11 @@ type AwsCallInputOutput = // Determine the type of the mock handler from the type of the Input/Output type pair. // Don't need to worry about the 'never', TypeScript will propagate it upwards making it // impossible to specify the field that has 'never' anywhere in its type. -type HandlerType = +type MockHandlerType = AI extends [any, any] ? (input: AI[0]) => AI[1] : AI; // Any subset of the full type that synchronously returns the output structure is okay -export type SyncHandlerSubsetOf = {[K in keyof S]?: HandlerType>}; - -/** - * A jest Mock function we can pass into SdkProvider.stubXXX - * - * Use as follows: - * - * ```ts - * const mockDescribeStackEvents: MockedHandlerType = jest.fn(); - */ -export type MockedHandlerType = AwsCallInputOutput extends [infer IN, infer OUT] ? jest.Mock : never; +export type SyncHandlerSubsetOf = {[K in keyof S]?: MockHandlerType>}; /** * Fake AWS response. diff --git a/packages/aws-cdk/test/util/stack-monitor.test.ts b/packages/aws-cdk/test/util/stack-monitor.test.ts index e0d9bb673fbd7..e32098a03a9ee 100644 --- a/packages/aws-cdk/test/util/stack-monitor.test.ts +++ b/packages/aws-cdk/test/util/stack-monitor.test.ts @@ -123,21 +123,12 @@ describe('stack monitor, collecting errors from events', () => { expect(request.StackName).toStrictEqual('StackName'); return { StackEvents: [ - addErrorToStackEvent( - event(102), { - logicalResourceId: 'nestedStackLogicalResourceId', - physicalResourceId: 'nestedStackPhysicalResourceId', - resourceType: 'AWS::CloudFormation::Stack', - resourceStatusReason: 'nested stack failed', - resourceStatus: 'UPDATE_FAILED', - }, - ), addErrorToStackEvent( event(100), { logicalResourceId: 'nestedStackLogicalResourceId', physicalResourceId: 'nestedStackPhysicalResourceId', resourceType: 'AWS::CloudFormation::Stack', - resourceStatus: 'UPDATE_IN_PROGRESS', + resourceStatusReason: 'nested stack failed', }, ), ], @@ -262,28 +253,18 @@ async function testMonitorWithEventCalls( let describeStackEvents = (jest.fn() as jest.Mock); let finished = false; - let error: Error | undefined = undefined; for (const invocation of beforeStopInvocations) { const invocation_ = invocation; // Capture loop variable in local because of closure semantics const isLast = invocation === beforeStopInvocations[beforeStopInvocations.length - 1]; describeStackEvents = describeStackEvents.mockImplementationOnce(request => { - try { - const ret = invocation_(request); - if (isLast) { - finished = true; - } - return ret; - } catch (e: any) { + const ret = invocation_(request); + if (isLast) { finished = true; - error = e; - throw e; } + return ret; }); } - if (error) { - throw error; - } for (const invocation of afterStopInvocations) { describeStackEvents = describeStackEvents.mockImplementationOnce(invocation); } From 29bf2233a33d3ded20639279fa712a5b036fe041 Mon Sep 17 00:00:00 2001 From: Shikha Aggarwal Date: Fri, 4 Oct 2024 18:54:15 -0700 Subject: [PATCH 03/11] revert: feat(cli): cdk rollback (#31407) (#31657) ### Issue # (if applicable) Closes #[31654](https://github.com/aws/aws-cdk/issues/31654). ### Reason for this change This reverts commit 0755561b79d6be0744b0b21504fe54ffcf2b618a. ### Description of changes Changes introduced regression in amplify app for nested stacks, reverting it. ### Description of how you validated changes Validated with local build ### Checklist - [ ] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk-testing/cli-integ/README.md | 2 +- .../cli-integ/lib/with-cdk-app.ts | 19 +- .../cdk-apps/rollback-test-app/app.js | 100 ------ .../cdk-apps/rollback-test-app/cdk.json | 7 - .../cli-regression-patches/v2.161.0/NOTES.md | 1 + .../v2.161.0/skip-tests.txt | 5 + .../tests/cli-integ-tests/cli.integtest.ts | 81 +---- packages/aws-cdk/README.md | 63 ++-- .../lib/api/bootstrap/bootstrap-template.yaml | 4 +- packages/aws-cdk/lib/api/cxapp/exec.ts | 3 - packages/aws-cdk/lib/api/deployments.ts | 205 +---------- .../cloudformation/stack-activity-monitor.ts | 90 +++-- .../util/cloudformation/stack-event-poller.ts | 172 --------- .../api/util/cloudformation/stack-status.ts | 36 -- packages/aws-cdk/lib/cdk-toolkit.ts | 86 ----- packages/aws-cdk/lib/cli.ts | 31 -- .../api/cloudformation-deployments.test.ts | 334 ++++++------------ .../test/api/fake-cloudformation-stack.ts | 22 +- .../test/api/stack-activity-monitor.test.ts | 12 - packages/aws-cdk/test/cdk-toolkit.test.ts | 33 +- packages/aws-cdk/test/util/mock-sdk.ts | 14 +- .../aws-cdk/test/util/stack-monitor.test.ts | 27 +- 22 files changed, 225 insertions(+), 1122 deletions(-) delete mode 100644 packages/@aws-cdk-testing/cli-integ/resources/cdk-apps/rollback-test-app/app.js delete mode 100644 packages/@aws-cdk-testing/cli-integ/resources/cdk-apps/rollback-test-app/cdk.json create mode 100644 packages/@aws-cdk-testing/cli-integ/resources/cli-regression-patches/v2.161.0/NOTES.md create mode 100644 packages/@aws-cdk-testing/cli-integ/resources/cli-regression-patches/v2.161.0/skip-tests.txt delete mode 100644 packages/aws-cdk/lib/api/util/cloudformation/stack-event-poller.ts diff --git a/packages/@aws-cdk-testing/cli-integ/README.md b/packages/@aws-cdk-testing/cli-integ/README.md index d1dd485660151..2dc2e9c70d8cc 100644 --- a/packages/@aws-cdk-testing/cli-integ/README.md +++ b/packages/@aws-cdk-testing/cli-integ/README.md @@ -37,7 +37,7 @@ Test suites are written as a collection of Jest tests, and they are run using Je ### Setup -Building the @aws-cdk-testing package is not very different from building the rest of the CDK. However, If you are having issues with the tests, you can ensure your environment is built properly by following the steps below: +Building the @aws-cdk-testing package is not very different from building the rest of the CDK. However, If you are having issues with the tests, you can ensure your enviornment is built properly by following the steps below: ```shell yarn install # Install dependencies diff --git a/packages/@aws-cdk-testing/cli-integ/lib/with-cdk-app.ts b/packages/@aws-cdk-testing/cli-integ/lib/with-cdk-app.ts index c28f5eccb4d4b..b5778a0d1af0d 100644 --- a/packages/@aws-cdk-testing/cli-integ/lib/with-cdk-app.ts +++ b/packages/@aws-cdk-testing/cli-integ/lib/with-cdk-app.ts @@ -24,8 +24,7 @@ export const EXTENDED_TEST_TIMEOUT_S = 30 * 60; * For backwards compatibility with existing tests (so we don't have to change * too much) the inner block is expected to take a `TestFixture` object. */ -export function withSpecificCdkApp( - appName: string, +export function withCdkApp( block: (context: TestFixture) => Promise, ): (context: TestContext & AwsContext & DisableBootstrapContext) => Promise { return async (context: TestContext & AwsContext & DisableBootstrapContext) => { @@ -37,7 +36,7 @@ export function withSpecificCdkApp( context.output.write(` Test directory: ${integTestDir}\n`); context.output.write(` Region: ${context.aws.region}\n`); - await cloneDirectory(path.join(RESOURCES_DIR, 'cdk-apps', appName), integTestDir, context.output); + await cloneDirectory(path.join(RESOURCES_DIR, 'cdk-apps', 'app'), integTestDir, context.output); const fixture = new TestFixture( integTestDir, stackNamePrefix, @@ -88,16 +87,6 @@ export function withSpecificCdkApp( }; } -/** - * Like `withSpecificCdkApp`, but uses the default integration testing app with a million stacks in it - */ -export function withCdkApp( - block: (context: TestFixture) => Promise, -): (context: TestContext & AwsContext & DisableBootstrapContext) => Promise { - // 'app' is the name of the default integration app in the `cdk-apps` directory - return withSpecificCdkApp('app', block); -} - export function withCdkMigrateApp(language: string, block: (context: TestFixture) => Promise) { return async (context: A) => { const stackName = `cdk-migrate-${language}-integ-${context.randomString}`; @@ -199,10 +188,6 @@ export function withDefaultFixture(block: (context: TestFixture) => Promise Promise) { - return withAws(withTimeout(DEFAULT_TEST_TIMEOUT_S, withSpecificCdkApp(appName, block))); -} - export function withExtendedTimeoutFixture(block: (context: TestFixture) => Promise) { return withAws(withTimeout(EXTENDED_TEST_TIMEOUT_S, withCdkApp(block))); } diff --git a/packages/@aws-cdk-testing/cli-integ/resources/cdk-apps/rollback-test-app/app.js b/packages/@aws-cdk-testing/cli-integ/resources/cdk-apps/rollback-test-app/app.js deleted file mode 100644 index 419e30898c9bf..0000000000000 --- a/packages/@aws-cdk-testing/cli-integ/resources/cdk-apps/rollback-test-app/app.js +++ /dev/null @@ -1,100 +0,0 @@ -const cdk = require('aws-cdk-lib'); -const lambda = require('aws-cdk-lib/aws-lambda'); -const cr = require('aws-cdk-lib/custom-resources'); - -/** - * This stack will be deployed in multiple phases, to achieve a very specific effect - * - * It contains resources r1 and r2, where r1 gets deployed first. - * - * - PHASE = 1: both resources deploy regularly. - * - PHASE = 2a: r1 gets updated, r2 will fail to update - * - PHASE = 2b: r1 gets updated, r2 will fail to update, and r1 will fail its rollback. - * - * To exercise this app: - * - * ``` - * env PHASE=1 npx cdk deploy - * env PHASE=2b npx cdk deploy --no-rollback - * # This will leave the stack in UPDATE_FAILED - * - * env PHASE=2b npx cdk rollback - * # This will start a rollback that will fail because r1 fails its rollabck - * - * env PHASE=2b npx cdk rollback --force - * # This will retry the rollabck and skip r1 - * ``` - */ -class RollbacktestStack extends cdk.Stack { - constructor(scope, id, props) { - super(scope, id, props); - - let r1props = {}; - let r2props = {}; - - const phase = process.env.PHASE; - switch (phase) { - case '1': - // Normal deployment - break; - case '2a': - // r1 updates normally, r2 fails updating - r2props.FailUpdate = true; - break; - case '2b': - // r1 updates normally, r2 fails updating, r1 fails rollback - r1props.FailRollback = true; - r2props.FailUpdate = true; - break; - } - - const fn = new lambda.Function(this, 'Fun', { - runtime: lambda.Runtime.NODEJS_LATEST, - code: lambda.Code.fromInline(`exports.handler = async function(event, ctx) { - const key = \`Fail\${event.RequestType}\`; - if (event.ResourceProperties[key]) { - throw new Error(\`\${event.RequestType} fails!\`); - } - if (event.OldResourceProperties?.FailRollback) { - throw new Error('Failing rollback!'); - } - return {}; - }`), - handler: 'index.handler', - timeout: cdk.Duration.minutes(1), - }); - const provider = new cr.Provider(this, "MyProvider", { - onEventHandler: fn, - }); - - const r1 = new cdk.CustomResource(this, 'r1', { - serviceToken: provider.serviceToken, - properties: r1props, - }); - const r2 = new cdk.CustomResource(this, 'r2', { - serviceToken: provider.serviceToken, - properties: r2props, - }); - r2.node.addDependency(r1); - } -} - -const app = new cdk.App({ - context: { - '@aws-cdk/core:assetHashSalt': process.env.CODEBUILD_BUILD_ID, // Force all assets to be unique, but consistent in one build - }, -}); - -const defaultEnv = { - account: process.env.CDK_DEFAULT_ACCOUNT, - region: process.env.CDK_DEFAULT_REGION -}; - -const stackPrefix = process.env.STACK_NAME_PREFIX; -if (!stackPrefix) { - throw new Error(`the STACK_NAME_PREFIX environment variable is required`); -} - -// Sometimes we don't want to synthesize all stacks because it will impact the results -new RollbacktestStack(app, `${stackPrefix}-test-rollback`, { env: defaultEnv }); -app.synth(); \ No newline at end of file diff --git a/packages/@aws-cdk-testing/cli-integ/resources/cdk-apps/rollback-test-app/cdk.json b/packages/@aws-cdk-testing/cli-integ/resources/cdk-apps/rollback-test-app/cdk.json deleted file mode 100644 index 44809158dbdac..0000000000000 --- a/packages/@aws-cdk-testing/cli-integ/resources/cdk-apps/rollback-test-app/cdk.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "app": "node app.js", - "versionReporting": false, - "context": { - "aws-cdk:enableDiffNoFail": "true" - } -} diff --git a/packages/@aws-cdk-testing/cli-integ/resources/cli-regression-patches/v2.161.0/NOTES.md b/packages/@aws-cdk-testing/cli-integ/resources/cli-regression-patches/v2.161.0/NOTES.md new file mode 100644 index 0000000000000..8e21b44daec85 --- /dev/null +++ b/packages/@aws-cdk-testing/cli-integ/resources/cli-regression-patches/v2.161.0/NOTES.md @@ -0,0 +1 @@ +This patch brings the [fix](https://github.com/aws/aws-cdk/issues/31654) into the regression suite. \ No newline at end of file diff --git a/packages/@aws-cdk-testing/cli-integ/resources/cli-regression-patches/v2.161.0/skip-tests.txt b/packages/@aws-cdk-testing/cli-integ/resources/cli-regression-patches/v2.161.0/skip-tests.txt new file mode 100644 index 0000000000000..f681a64076c25 --- /dev/null +++ b/packages/@aws-cdk-testing/cli-integ/resources/cli-regression-patches/v2.161.0/skip-tests.txt @@ -0,0 +1,5 @@ +# Skipping the test to fix issue https://github.com/aws/aws-cdk/issues/31654. +# cli-integ tests failing for the old tests with the new cli changes for nested stacks. + +test cdk rollback +test cdk rollback --force \ No newline at end of file diff --git a/packages/@aws-cdk-testing/cli-integ/tests/cli-integ-tests/cli.integtest.ts b/packages/@aws-cdk-testing/cli-integ/tests/cli-integ-tests/cli.integtest.ts index 8efebdec07875..a38580d10714a 100644 --- a/packages/@aws-cdk-testing/cli-integ/tests/cli-integ-tests/cli.integtest.ts +++ b/packages/@aws-cdk-testing/cli-integ/tests/cli-integ-tests/cli.integtest.ts @@ -32,7 +32,6 @@ import { withCDKMigrateFixture, withExtendedTimeoutFixture, randomString, - withSpecificFixture, withoutBootstrap, } from '../../lib'; @@ -2285,85 +2284,7 @@ integTest( }), ); -integTest( - 'test cdk rollback', - withSpecificFixture('rollback-test-app', async (fixture) => { - let phase = '1'; - - // Should succeed - await fixture.cdkDeploy('test-rollback', { - options: ['--no-rollback'], - modEnv: { PHASE: phase }, - verbose: false, - }); - try { - phase = '2a'; - - // Should fail - const deployOutput = await fixture.cdkDeploy('test-rollback', { - options: ['--no-rollback'], - modEnv: { PHASE: phase }, - verbose: false, - allowErrExit: true, - }); - expect(deployOutput).toContain('UPDATE_FAILED'); - - // Rollback - await fixture.cdk(['rollback'], { - modEnv: { PHASE: phase }, - verbose: false, - }); - } finally { - await fixture.cdkDestroy('test-rollback'); - } - }), -); - -integTest( - 'test cdk rollback --force', - withSpecificFixture('rollback-test-app', async (fixture) => { - let phase = '1'; - - // Should succeed - await fixture.cdkDeploy('test-rollback', { - options: ['--no-rollback'], - modEnv: { PHASE: phase }, - verbose: false, - }); - try { - phase = '2b'; // Fail update and also fail rollback - - // Should fail - const deployOutput = await fixture.cdkDeploy('test-rollback', { - options: ['--no-rollback'], - modEnv: { PHASE: phase }, - verbose: false, - allowErrExit: true, - }); - - expect(deployOutput).toContain('UPDATE_FAILED'); - - // Should still fail - const rollbackOutput = await fixture.cdk(['rollback'], { - modEnv: { PHASE: phase }, - verbose: false, - allowErrExit: true, - }); - - expect(rollbackOutput).toContain('Failing rollback'); - - // Rollback and force cleanup - await fixture.cdk(['rollback', '--force'], { - modEnv: { PHASE: phase }, - verbose: false, - }); - } finally { - await fixture.cdkDestroy('test-rollback'); - } - }), -); - -integTest('cdk bootstrap notice is displayed correctly', withDefaultFixture(async (fixture) => { +integTest('cdk notices are displayed correctly', withDefaultFixture(async (fixture) => { const cache = { expiration: 4125963264000, // year 2100 so we never overwrite the cache diff --git a/packages/aws-cdk/README.md b/packages/aws-cdk/README.md index 227a040cd5fb2..ca79343503706 100644 --- a/packages/aws-cdk/README.md +++ b/packages/aws-cdk/README.md @@ -19,7 +19,6 @@ The AWS CDK Toolkit provides the `cdk` command-line interface that can be used t | [`cdk synth`](#cdk-synthesize) | Synthesize a CDK app to CloudFormation template(s) | | [`cdk diff`](#cdk-diff) | Diff stacks against current state | | [`cdk deploy`](#cdk-deploy) | Deploy a stack into an AWS account | -| [`cdk rollback`](#cdk-rollback) | Roll back a failed deployment | | [`cdk import`](#cdk-import) | Import existing AWS resources into a CDK stack | | [`cdk migrate`](#cdk-migrate) | Migrate AWS resources, CloudFormation stacks, and CloudFormation templates to CDK | | [`cdk watch`](#cdk-watch) | Watches a CDK app for deployable and hotswappable changes | @@ -205,10 +204,6 @@ $ cdk deploy --no-rollback $ cdk deploy -R ``` -If a deployment fails you can update your code and immediately retry the -deployment from the point of failure. If you would like to explicitly roll back a failed, paused deployment, -use `cdk rollback`. - NOTE: you cannot use `--no-rollback` for any updates that would cause a resource replacement, only for updates and creations of new resources. @@ -402,7 +397,7 @@ development, your prod app may not have any resources or the resources are comme out. In this scenario, you will receive an error message stating that the app has no stacks. -To bypass this error messages, you can pass the `--ignore-no-stacks` flag to the +To bypass this error messages, you can pass the `--ignore-no-stacks` flag to the `deploy` command: ```console @@ -473,24 +468,6 @@ and might have breaking changes in the future. > *: `Fn::GetAtt` is only partially supported. Refer to [this implementation](https://github.com/aws/aws-cdk/blob/main/packages/aws-cdk/lib/api/evaluate-cloudformation-template.ts#L477-L492) for supported resources and attributes. -### `cdk rollback` - -If a deployment performed using `cdk deploy --no-rollback` fails, your -deployment will be left in a failed, paused state. From this state you can -update your code and try the deployment again, or roll the deployment back to -the last stable state. - -To roll the deployment back, use `cdk rollback`. This will initiate a rollback -to the last stable state of your stack. - -Some resources may fail to roll back. If they do, you can try again by calling -`cdk rollback --orphan ` (can be specified multiple times). Or, run -`cdk rollback --force` to have the CDK CLI automatically orphan all failing -resources. - -(`cdk rollback` requires version 23 of the bootstrap stack, since it depends on -new permissions necessary to call the appropriate CloudFormation APIs) - ### `cdk watch` The `watch` command is similar to `deploy`, @@ -621,9 +598,9 @@ This feature currently has the following limitations: ### `cdk migrate` -⚠️**CAUTION**⚠️: CDK Migrate is currently experimental and may have breaking changes in the future. +⚠️**CAUTION**⚠️: CDK Migrate is currently experimental and may have breaking changes in the future. -CDK Migrate generates a CDK app from deployed AWS resources using `--from-scan`, deployed AWS CloudFormation stacks using `--from-stack`, and local AWS CloudFormation templates using `--from-path`. +CDK Migrate generates a CDK app from deployed AWS resources using `--from-scan`, deployed AWS CloudFormation stacks using `--from-stack`, and local AWS CloudFormation templates using `--from-path`. To learn more about the CDK Migrate feature, see [Migrate to AWS CDK](https://docs.aws.amazon.com/cdk/v2/guide/migrate.html). For more information on `cdk migrate` command options, see [cdk migrate command reference](https://docs.aws.amazon.com/cdk/v2/guide/ref-cli-cdk-migrate.html). @@ -655,7 +632,7 @@ Account and Region information are retrieved from default CDK CLI sources. Use ` $ cdk migrate --language typescript --from-scan --stack-name "myCloudFormationStack" ``` -Since CDK Migrate relies on the IaC generator service, any limitations of IaC generator will apply to CDK Migrate. For general limitations, see [Considerations](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/generate-IaC.html#generate-template-considerations). +Since CDK Migrate relies on the IaC generator service, any limitations of IaC generator will apply to CDK Migrate. For general limitations, see [Considerations](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/generate-IaC.html#generate-template-considerations). IaC generator limitations with discovering resource and property values will also apply here. As a result, CDK Migrate will only migrate resources supported by IaC generator. Some of your resources may not be supported and some property values may not be accessible. For more information, see [Iac generator and write-only properties](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/generate-IaC-write-only-properties.html) and [Supported resource types](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/generate-IaC-supported-resources.html). @@ -672,8 +649,8 @@ $ # template.json is a valid cloudformation template in the local directory $ cdk migrate --stack-name MyAwesomeApplication --language typescript --from-path MyTemplate.json ``` -This command generates a new directory named `MyAwesomeApplication` within your current working directory, and -then initializes a new CDK application within that directory. The CDK app contains a `MyAwesomeApplication` stack with resources configured to match those in your local CloudFormation template. +This command generates a new directory named `MyAwesomeApplication` within your current working directory, and +then initializes a new CDK application within that directory. The CDK app contains a `MyAwesomeApplication` stack with resources configured to match those in your local CloudFormation template. This results in a CDK application with the following structure, where the lib directory contains a stack definition with the same resource configuration as the provided template.json. @@ -703,13 +680,13 @@ This will generate a Python CDK app which will synthesize the same configuration ##### Generate a TypeScript CDK app from deployed AWS resources that are not associated with a stack -If you have resources in your account that were provisioned outside AWS IaC tools and would like to manage them with the CDK, you can use the `--from-scan` option to generate the application. +If you have resources in your account that were provisioned outside AWS IaC tools and would like to manage them with the CDK, you can use the `--from-scan` option to generate the application. In this example, we use the `--filter` option to specify which resources to migrate. You can filter resources to limit the number of resources migrated to only those specified by the `--filter` option, including any resources they depend on, or resources that depend on them (for example A filter which specifies a single Lambda Function, will find that specific table and any alarms that may monitor it). The `--filter` argument offers both AND as well as OR filtering. OR filtering can be specified by passing multiple `--filter` options, and AND filtering can be specified by passing a single `--filter` option with multiple comma separated key/value pairs as seen below (see below for examples). It is recommended to use the `--filter` option to limit the number of resources returned as some resource types provide sample resources by default in all accounts which can add to the resource limits. -`--from-scan` takes 3 potential arguments: `--new`, `most-recent`, and undefined. If `--new` is passed, CDK Migrate will initiate a new scan of the account and use that new scan to discover resources. If `--most-recent` is passed, CDK Migrate will use the most recent scan of the account to discover resources. If neither `--new` nor `--most-recent` are passed, CDK Migrate will take the most recent scan of the account to discover resources, unless there is no recent scan, in which case it will initiate a new scan. +`--from-scan` takes 3 potential arguments: `--new`, `most-recent`, and undefined. If `--new` is passed, CDK Migrate will initiate a new scan of the account and use that new scan to discover resources. If `--most-recent` is passed, CDK Migrate will use the most recent scan of the account to discover resources. If neither `--new` nor `--most-recent` are passed, CDK Migrate will take the most recent scan of the account to discover resources, unless there is no recent scan, in which case it will initiate a new scan. ```console # Filtering options @@ -742,14 +719,14 @@ $ cdk migrate --stack-name MyAwesomeApplication --language typescript --from-sca - CDK Migrate will only generate L1 constructs and does not currently support any higher level abstractions. - CDK Migrate successfully generating an application does *not* guarantee the application is immediately deployable. -It simply generates a CDK application which will synthesize a template that has identical resource configurations -to the provided template. +It simply generates a CDK application which will synthesize a template that has identical resource configurations +to the provided template. - - CDK Migrate does not interact with the CloudFormation service to verify the template -provided can deploy on its own. Although by default any CDK app generated using the `--from-scan` option exclude -CloudFormation managed resources, CDK Migrate will not verify prior to deployment that any resources scanned, or in the provided + - CDK Migrate does not interact with the CloudFormation service to verify the template +provided can deploy on its own. Although by default any CDK app generated using the `--from-scan` option exclude +CloudFormation managed resources, CDK Migrate will not verify prior to deployment that any resources scanned, or in the provided template are already managed in other CloudFormation templates, nor will it verify that the resources in the provided -template are available in the desired regions, which may impact ADC or Opt-In regions. +template are available in the desired regions, which may impact ADC or Opt-In regions. - If the provided template has parameters without default values, those will need to be provided before deploying the generated application. @@ -766,13 +743,13 @@ In practice this is how CDK Migrate generated applications will operate in the f ##### **The provided template is already deployed to CloudFormation in the account/region** -If the provided template came directly from a deployed CloudFormation stack, and that stack has not experienced any drift, +If the provided template came directly from a deployed CloudFormation stack, and that stack has not experienced any drift, then the generated application will be immediately deployable, and will not cause any changes to the deployed resources. Drift might occur if a resource in your template was modified outside of CloudFormation, namely via the AWS Console or AWS CLI. ##### **The provided template is not deployed to CloudFormation in the account/region, and there *is not* overlap with existing resources in the account/region** -If the provided template represents a set of resources that have no overlap with resources already deployed in the account/region, +If the provided template represents a set of resources that have no overlap with resources already deployed in the account/region, then the generated application will be immediately deployable. This could be because the stack has never been deployed, or the application was generated from a stack deployed in another account/region. @@ -789,16 +766,16 @@ In practice this means for any resource in the provided template, for example, } ``` -There must not exist a resource of that type with the same identifier in the desired region. In this example that identfier +There must not exist a resource of that type with the same identifier in the desired region. In this example that identfier would be "MyBucket" ##### **The provided template is not deployed to CloudFormation in the account/region, and there *is* overlap with existing resources in the account/region** -If the provided template represents a set of resources that overlap with resources already deployed in the account/region, -then the generated application will not be immediately deployable. If those overlapped resources are already managed by +If the provided template represents a set of resources that overlap with resources already deployed in the account/region, +then the generated application will not be immediately deployable. If those overlapped resources are already managed by another CloudFormation stack in that account/region, then those resources will need to be manually removed from the provided template. Otherwise, if the overlapped resources are not managed by another CloudFormation stack, then first remove those -resources from your CDK Application Stack, deploy the cdk application successfully, then re-add them and run `cdk import` +resources from your CDK Application Stack, deploy the cdk application successfully, then re-add them and run `cdk import` to import them into your deployed stack. ### `cdk destroy` diff --git a/packages/aws-cdk/lib/api/bootstrap/bootstrap-template.yaml b/packages/aws-cdk/lib/api/bootstrap/bootstrap-template.yaml index ad71c39535426..8ed4bb8595446 100644 --- a/packages/aws-cdk/lib/api/bootstrap/bootstrap-template.yaml +++ b/packages/aws-cdk/lib/api/bootstrap/bootstrap-template.yaml @@ -485,8 +485,6 @@ Resources: - cloudformation:ExecuteChangeSet - cloudformation:CreateStack - cloudformation:UpdateStack - - cloudformation:RollbackStack - - cloudformation:ContinueUpdateRollback Resource: "*" - Sid: PipelineCrossAccountArtifactsBucket # Read/write buckets in different accounts. Permissions to buckets in @@ -653,7 +651,7 @@ Resources: Type: String Name: Fn::Sub: '/cdk-bootstrap/${Qualifier}/version' - Value: '23' + Value: '22' Outputs: BucketName: Description: The name of the S3 bucket owned by the CDK toolkit stack diff --git a/packages/aws-cdk/lib/api/cxapp/exec.ts b/packages/aws-cdk/lib/api/cxapp/exec.ts index 6b62d7ae2527f..31f2fca029dd9 100644 --- a/packages/aws-cdk/lib/api/cxapp/exec.ts +++ b/packages/aws-cdk/lib/api/cxapp/exec.ts @@ -49,9 +49,6 @@ export async function execProgram(aws: SdkProvider, config: Configuration): Prom if (!outdir) { throw new Error('unexpected: --output is required'); } - if (typeof outdir !== 'string') { - throw new Error(`--output takes a string, got ${JSON.stringify(outdir)}`); - } try { await fs.mkdirp(outdir); } catch (error: any) { diff --git a/packages/aws-cdk/lib/api/deployments.ts b/packages/aws-cdk/lib/api/deployments.ts index d5b6f8a63e987..285dba5d29114 100644 --- a/packages/aws-cdk/lib/api/deployments.ts +++ b/packages/aws-cdk/lib/api/deployments.ts @@ -1,4 +1,3 @@ -import { randomUUID } from 'crypto'; import * as cxapi from '@aws-cdk/cx-api'; import * as cdk_assets from 'cdk-assets'; import { AssetManifest, IManifestEntry } from 'cdk-assets'; @@ -12,17 +11,13 @@ import { deployStack, DeployStackResult, destroyStack, DeploymentMethod } from ' import { EnvironmentResources, EnvironmentResourcesRegistry } from './environment-resources'; import { HotswapMode } from './hotswap/common'; import { loadCurrentTemplateWithNestedStacks, loadCurrentTemplate, RootTemplateWithNestedStacks } from './nested-stack-helpers'; -import { CloudFormationStack, Template, ResourcesToImport, ResourceIdentifierSummaries, stabilizeStack } from './util/cloudformation'; -import { StackActivityMonitor, StackActivityProgress } from './util/cloudformation/stack-activity-monitor'; -import { StackEventPoller } from './util/cloudformation/stack-event-poller'; -import { RollbackChoice } from './util/cloudformation/stack-status'; +import { CloudFormationStack, Template, ResourcesToImport, ResourceIdentifierSummaries } from './util/cloudformation'; +import { StackActivityProgress } from './util/cloudformation/stack-activity-monitor'; import { replaceEnvPlaceholders } from './util/placeholders'; import { makeBodyParameter } from './util/template-body-parameter'; import { AssetManifestBuilder } from '../util/asset-manifest-builder'; import { buildAssets, publishAssets, BuildAssetsOptions, PublishAssetsOptions, PublishingAws, EVENT_TO_LOGGER } from '../util/asset-publishing'; -const BOOTSTRAP_STACK_VERSION_FOR_ROLLBACK = 23; - /** * SDK obtained by assuming the lookup role * for a given environment @@ -215,77 +210,6 @@ export interface DeployStackOptions { ignoreNoStacks?: boolean; } -export interface RollbackStackOptions { - /** - * Stack to roll back - */ - readonly stack: cxapi.CloudFormationStackArtifact; - - /** - * Execution role for the deployment (pass through to CloudFormation) - * - * @default - Current role - */ - readonly roleArn?: string; - - /** - * Don't show stack deployment events, just wait - * - * @default false - */ - readonly quiet?: boolean; - - /** - * Whether we are on a CI system - * - * @default false - */ - readonly ci?: boolean; - - /** - * Name of the toolkit stack, if not the default name - * - * @default 'CDKToolkit' - */ - readonly toolkitStackName?: string; - - /** - * Whether to force a rollback or not - * - * Forcing a rollback will orphan all undeletable resources. - * - * @default false - */ - readonly force?: boolean; - - /** - * Orphan the resources with the given logical IDs - * - * @default - No orphaning - */ - readonly orphanLogicalIds?: string[]; - - /** - * Display mode for stack deployment progress. - * - * @default - StackActivityProgress.Bar - stack events will be displayed for - * the resource currently being deployed. - */ - readonly progress?: StackActivityProgress; - - /** - * Whether to validate the version of the bootstrap stack permissions - * - * @default true - */ - readonly validateBootstrapStackVersion?: boolean; -} - -export interface RollbackStackResult { - readonly notInRollbackableState?: boolean; - readonly success?: boolean; -} - interface AssetOptions { /** * Stack with assets to build. @@ -495,125 +419,6 @@ export class Deployments { }); } - public async rollbackStack(options: RollbackStackOptions): Promise { - let resourcesToSkip: string[] = options.orphanLogicalIds ?? []; - if (options.force && resourcesToSkip.length > 0) { - throw new Error('Cannot combine --force with --orphan'); - } - - const { - stackSdk, - resolvedEnvironment: _, - cloudFormationRoleArn, - envResources, - } = await this.prepareSdkFor(options.stack, options.roleArn, Mode.ForWriting); - - if (options.validateBootstrapStackVersion ?? true) { - // Do a verification of the bootstrap stack version - await this.validateBootstrapStackVersion( - options.stack.stackName, - BOOTSTRAP_STACK_VERSION_FOR_ROLLBACK, - options.stack.bootstrapStackVersionSsmParameter, - envResources); - } - - const cfn = stackSdk.cloudFormation(); - const deployName = options.stack.stackName; - - // We loop in case of `--force` and the stack ends up in `CONTINUE_UPDATE_ROLLBACK`. - let maxLoops = 10; - while (maxLoops--) { - let cloudFormationStack = await CloudFormationStack.lookup(cfn, deployName); - - switch (cloudFormationStack.stackStatus.rollbackChoice) { - case RollbackChoice.NONE: - warning(`Stack ${deployName} does not need a rollback: ${cloudFormationStack.stackStatus}`); - return { notInRollbackableState: true }; - - case RollbackChoice.START_ROLLBACK: - debug(`Initiating rollback of stack ${deployName}`); - await cfn.rollbackStack({ - StackName: deployName, - RoleARN: cloudFormationRoleArn, - ClientRequestToken: randomUUID(), - // Enabling this is just the better overall default, the only reason it isn't the upstream default is backwards compatibility - RetainExceptOnCreate: true, - }).promise(); - break; - - case RollbackChoice.CONTINUE_UPDATE_ROLLBACK: - if (options.force) { - // Find the failed resources from the deployment and automatically skip them - // (Using deployment log because we definitely have `DescribeStackEvents` permissions, and we might not have - // `DescribeStackResources` permissions). - const poller = new StackEventPoller(cfn, { - stackName: deployName, - stackStatuses: ['ROLLBACK_IN_PROGRESS', 'UPDATE_ROLLBACK_IN_PROGRESS'], - }); - await poller.poll(); - resourcesToSkip = poller.resourceErrors - .filter(r => !r.isStackEvent && r.parentStackLogicalIds.length === 0) - .map(r => r.event.LogicalResourceId ?? ''); - } - - const skipDescription = resourcesToSkip.length > 0 - ? ` (orphaning: ${resourcesToSkip.join(', ')})` - : ''; - warning(`Continuing rollback of stack ${deployName}${skipDescription}`); - await cfn.continueUpdateRollback({ - StackName: deployName, - ClientRequestToken: randomUUID(), - RoleARN: cloudFormationRoleArn, - ResourcesToSkip: resourcesToSkip, - }).promise(); - break; - - case RollbackChoice.ROLLBACK_FAILED: - warning(`Stack ${deployName} failed creation and rollback. This state cannot be rolled back. You can recreate this stack by running 'cdk deploy'.`); - return { notInRollbackableState: true }; - - default: - throw new Error(`Unexpected rollback choice: ${cloudFormationStack.stackStatus.rollbackChoice}`); - } - - const monitor = options.quiet ? undefined : StackActivityMonitor.withDefaultPrinter(cfn, deployName, options.stack, { - ci: options.ci, - }).start(); - - let stackErrorMessage: string | undefined = undefined; - let finalStackState = cloudFormationStack; - try { - const successStack = await stabilizeStack(cfn, deployName); - - // This shouldn't really happen, but catch it anyway. You never know. - if (!successStack) { throw new Error('Stack deploy failed (the stack disappeared while we were rolling it back)'); } - finalStackState = successStack; - - const errors = monitor?.errors?.join(', '); - if (errors) { - stackErrorMessage = errors; - } - } catch (e: any) { - stackErrorMessage = suffixWithErrors(e.message, monitor?.errors); - } finally { - await monitor?.stop(); - } - - if (finalStackState.stackStatus.isRollbackSuccess || !stackErrorMessage) { - return { success: true }; - } - - // Either we need to ignore some resources to continue the rollback, or something went wrong - if (finalStackState.stackStatus.rollbackChoice === RollbackChoice.CONTINUE_UPDATE_ROLLBACK && options.force) { - // Do another loop-de-loop - continue; - } - - throw new Error(`${stackErrorMessage} (fix problem and retry, or orphan these resources using --orphan or --force)`);; - } - throw new Error('Rollback did not finish after a large number of iterations; stopping because it looks like we\'re not making progress anymore. You can retry if rollback was progressing as expected.'); - } - public async destroyStack(options: DestroyStackOptions): Promise { const { stackSdk, cloudFormationRoleArn: roleArn } = await this.prepareSdkFor(options.stack, options.roleArn, Mode.ForWriting); @@ -925,9 +730,3 @@ class ParallelSafeAssetProgress implements cdk_assets.IPublishProgressListener { */ export class CloudFormationDeployments extends Deployments { } - -function suffixWithErrors(msg: string, errors?: string[]) { - return errors && errors.length > 0 - ? `${msg}: ${errors.join(', ')}` - : msg; -} \ No newline at end of file diff --git a/packages/aws-cdk/lib/api/util/cloudformation/stack-activity-monitor.ts b/packages/aws-cdk/lib/api/util/cloudformation/stack-activity-monitor.ts index 6db3b7f67941c..1b2422a219168 100644 --- a/packages/aws-cdk/lib/api/util/cloudformation/stack-activity-monitor.ts +++ b/packages/aws-cdk/lib/api/util/cloudformation/stack-activity-monitor.ts @@ -3,11 +3,11 @@ import * as cxschema from '@aws-cdk/cloud-assembly-schema'; import * as cxapi from '@aws-cdk/cx-api'; import * as aws from 'aws-sdk'; import * as chalk from 'chalk'; -import { ResourceEvent, StackEventPoller } from './stack-event-poller'; import { error, logLevel, LogLevel, setLogLevel } from '../../../logging'; import { RewritableBlock } from '../display'; -export interface StackActivity extends ResourceEvent { +export interface StackActivity { + readonly event: aws.CloudFormation.StackEvent; readonly metadata?: ResourceMetadata; } @@ -116,13 +116,17 @@ export class StackActivityMonitor { } /** - * The poller used to read stack events + * Resource errors found while monitoring the deployment */ - public readonly poller: StackEventPoller; - - public readonly errors: string[] = []; + public readonly errors = new Array(); private active = false; + private activity: { [eventId: string]: StackActivity } = { }; + + /** + * Determines which events not to display + */ + private readonly startTime: number; /** * Current tick timer @@ -135,16 +139,13 @@ export class StackActivityMonitor { private readPromise?: Promise; constructor( - cfn: aws.CloudFormation, + private readonly cfn: aws.CloudFormation, private readonly stackName: string, private readonly printer: IActivityPrinter, private readonly stack?: cxapi.CloudFormationStackArtifact, changeSetCreationTime?: Date, ) { - this.poller = new StackEventPoller(cfn, { - stackName, - startTime: changeSetCreationTime?.getTime() ?? Date.now(), - }); + this.startTime = changeSetCreationTime?.getTime() ?? Date.now(); } public start() { @@ -220,17 +221,61 @@ export class StackActivityMonitor { * see a next page and the last event in the page is new to us (and within the time window). * haven't seen the final event */ - private async readNewEvents(): Promise { - const pollEvents = await this.poller.poll(); + private async readNewEvents(stackName?: string): Promise { + const stackToPollForEvents = stackName ?? this.stackName; + const events: StackActivity[] = []; + const CFN_SUCCESS_STATUS = ['UPDATE_COMPLETE', 'CREATE_COMPLETE', 'DELETE_COMPLETE', 'DELETE_SKIPPED']; + try { + let nextToken: string | undefined; + let finished = false; + while (!finished) { + const response = await this.cfn.describeStackEvents({ StackName: stackToPollForEvents, NextToken: nextToken }).promise(); + const eventPage = response?.StackEvents ?? []; + + for (const event of eventPage) { + // Event from before we were interested in 'em + if (event.Timestamp.valueOf() < this.startTime) { + finished = true; + break; + } + + // Already seen this one + if (event.EventId in this.activity) { + finished = true; + break; + } + + // Fresh event + events.push(this.activity[event.EventId] = { + event: event, + metadata: this.findMetadataFor(event.LogicalResourceId), + }); + + if (event.ResourceType === 'AWS::CloudFormation::Stack' && !CFN_SUCCESS_STATUS.includes(event.ResourceStatus ?? '')) { + // If the event is not for `this` stack and has a physical resource Id, recursively call for events in the nested stack + if (event.PhysicalResourceId && event.PhysicalResourceId !== stackToPollForEvents) { + await this.readNewEvents(event.PhysicalResourceId); + } + } + } - const activities: StackActivity[] = pollEvents.map(event => ({ - ...event, - metadata: this.findMetadataFor(event.event.LogicalResourceId), - })); + // We're also done if there's nothing left to read + nextToken = response?.NextToken; + if (nextToken === undefined) { + finished = true; + } + } + } catch (e: any) { + if (e.code === 'ValidationError' && e.message === `Stack [${stackToPollForEvents}] does not exist`) { + return; + } + throw e; + } - for (const activity of activities) { - this.checkForErrors(activity); - this.printer.addActivity(activity ); + events.reverse(); + for (const event of events) { + this.checkForErrors(event); + this.printer.addActivity(event); } } @@ -253,7 +298,6 @@ export class StackActivityMonitor { } private checkForErrors(activity: StackActivity) { - if (hasErrorMessage(activity.event.ResourceStatus ?? '')) { const isCancelled = (activity.event.ResourceStatusReason ?? '').indexOf('cancelled') > -1; @@ -506,7 +550,7 @@ export class HistoryActivityPrinter extends ActivityPrinterBase { this.stream.write('\nFailed resources:\n'); for (const failure of this.failures) { // Root stack failures are not interesting - if (failure.isStackEvent) { + if (failure.event.StackName === failure.event.LogicalResourceId) { continue; } @@ -663,7 +707,7 @@ export class CurrentActivityPrinter extends ActivityPrinterBase { const lines = new Array(); for (const failure of this.failures) { // Root stack failures are not interesting - if (failure.isStackEvent) { + if (failure.event.StackName === failure.event.LogicalResourceId) { continue; } diff --git a/packages/aws-cdk/lib/api/util/cloudformation/stack-event-poller.ts b/packages/aws-cdk/lib/api/util/cloudformation/stack-event-poller.ts deleted file mode 100644 index 8bc218a568ac3..0000000000000 --- a/packages/aws-cdk/lib/api/util/cloudformation/stack-event-poller.ts +++ /dev/null @@ -1,172 +0,0 @@ -import * as aws from 'aws-sdk'; - -export interface StackEventPollerProps { - /** - * The stack to poll - */ - readonly stackName: string; - - /** - * IDs of parent stacks of this resource, in case of resources in nested stacks - */ - readonly parentStackLogicalIds?: string[]; - - /** - * Timestamp for the oldest event we're interested in - * - * @default - Read all events - */ - readonly startTime?: number; - - /** - * Stop reading when we see the stack entering this status - * - * Should be something like `CREATE_IN_PROGRESS`, `UPDATE_IN_PROGRESS`, - * `DELETE_IN_PROGRESS, `ROLLBACK_IN_PROGRESS`. - * - * @default - Read all events - */ - readonly stackStatuses?: string[]; -} - -export interface ResourceEvent { - readonly event: aws.CloudFormation.StackEvent; - readonly parentStackLogicalIds: string[]; - - /** - * Whether this event regards the root stack - * - * @default false - */ - readonly isStackEvent?: boolean; -} - -export class StackEventPoller { - public readonly events: ResourceEvent[] = []; - public complete: boolean = false; - - private readonly eventIds = new Set(); - private readonly nestedStackPollers: Record = {}; - - constructor(private readonly cfn: aws.CloudFormation, private readonly props: StackEventPollerProps) { - } - - /** - * From all accumulated events, return only the errors - */ - public get resourceErrors(): ResourceEvent[] { - return this.events.filter(e => e.event.ResourceStatus?.endsWith('_FAILED') && !e.isStackEvent); - } - - /** - * Poll for new stack events - * - * Will not return events older than events indicated by the constructor filters. - * - * Recurses into nested stacks, and returns events old-to-new. - */ - public async poll(): Promise { - const events: ResourceEvent[] = []; - try { - let nextToken: string | undefined; - let finished = false; - while (!finished) { - const response = await this.cfn.describeStackEvents({ StackName: this.props.stackName, NextToken: nextToken }).promise(); - const eventPage = response?.StackEvents ?? []; - - for (const event of eventPage) { - // Event from before we were interested in 'em - if (this.props.startTime !== undefined && event.Timestamp.valueOf() < this.props.startTime) { - finished = true; - break; - } - - // Already seen this one - if (this.eventIds.has(event.EventId)) { - finished = true; - break; - } - this.eventIds.add(event.EventId); - - // The events for the stack itself are also included next to events about resources; we can test for them in this way. - const isParentStackEvent = event.PhysicalResourceId === event.StackId; - - if (isParentStackEvent && this.props.stackStatuses?.includes(event.ResourceStatus ?? '')) { - finished = true; - break; - } - - // Fresh event - const resEvent: ResourceEvent = { - event: event, - parentStackLogicalIds: this.props.parentStackLogicalIds ?? [], - isStackEvent: isParentStackEvent, - }; - events.push(resEvent); - - if (!isParentStackEvent && event.ResourceType === 'AWS::CloudFormation::Stack' && isStackBeginOperationState(event.ResourceStatus)) { - // If the event is not for `this` stack and has a physical resource Id, recursively call for events in the nested stack - this.trackNestedStack(event, [...this.props.parentStackLogicalIds ?? [], event.LogicalResourceId ?? '']); - } - - if (isParentStackEvent && isStackTerminalState(event.ResourceStatus)) { - this.complete = true; - } - } - - // We're also done if there's nothing left to read - nextToken = response?.NextToken; - if (nextToken === undefined) { - finished = true; - } - } - } catch (e: any) { - if (e.code === 'ValidationError' && e.message === `Stack [${this.props.stackName}] does not exist`) { - // Ignore - } else { - throw e; - } - } - - // Also poll all nested stacks we're currently tracking - for (const [logicalId, poller] of Object.entries(this.nestedStackPollers)) { - events.push(...await poller.poll()); - if (poller.complete) { - delete this.nestedStackPollers[logicalId]; - } - } - - // Return what we have so far - events.sort((a, b) => a.event.Timestamp.valueOf() - b.event.Timestamp.valueOf()); - this.events.push(...events); - return events; - } - - /** - * On the CREATE_IN_PROGRESS, UPDATE_IN_PROGRESS, DELETE_IN_PROGRESS event of a nested stack, poll the nested stack updates - */ - private trackNestedStack(event: aws.CloudFormation.StackEvent, parentStackLogicalIds: string[]) { - const logicalId = event.LogicalResourceId ?? ''; - if (!this.nestedStackPollers[logicalId]) { - this.nestedStackPollers[logicalId] = new StackEventPoller(this.cfn, { - stackName: event.PhysicalResourceId ?? '', - parentStackLogicalIds: parentStackLogicalIds, - startTime: event.Timestamp.valueOf(), - }); - } - } -} - -function isStackBeginOperationState(state: string | undefined) { - return [ - 'CREATE_IN_PROGRESS', - 'UPDATE_IN_PROGRESS', - 'DELETE_IN_PROGRESS', - 'UPDATE_ROLLBACK_IN_PROGRESS', - 'ROLLBACK_IN_PROGRESS', - ].includes(state ?? ''); -} - -function isStackTerminalState(state: string | undefined) { - return !(state ?? '').endsWith('_IN_PROGRESS'); -} \ No newline at end of file diff --git a/packages/aws-cdk/lib/api/util/cloudformation/stack-status.ts b/packages/aws-cdk/lib/api/util/cloudformation/stack-status.ts index 4dd113aaa30db..473858b4bac18 100644 --- a/packages/aws-cdk/lib/api/util/cloudformation/stack-status.ts +++ b/packages/aws-cdk/lib/api/util/cloudformation/stack-status.ts @@ -46,43 +46,7 @@ export class StackStatus { || this.name === 'UPDATE_ROLLBACK_COMPLETE'; } - /** - * Whether the stack is in a paused state due to `--no-rollback`. - * - * The possible actions here are retrying a new `--no-rollback` deployment, or initiating a rollback. - */ - get rollbackChoice(): RollbackChoice { - switch (this.name) { - case 'CREATE_FAILED': - case 'UPDATE_FAILED': - return RollbackChoice.START_ROLLBACK; - case 'UPDATE_ROLLBACK_FAILED': - return RollbackChoice.CONTINUE_UPDATE_ROLLBACK; - case 'ROLLBACK_FAILED': - // Unfortunately there is no option to continue a failed rollback without - // a stable target state. - return RollbackChoice.ROLLBACK_FAILED; - default: - return RollbackChoice.NONE; - } - } - public toString(): string { return this.name + (this.reason ? ` (${this.reason})` : ''); } } - -/** - * Describe the current rollback options for this state - */ -export enum RollbackChoice { - START_ROLLBACK, - CONTINUE_UPDATE_ROLLBACK, - /** - * A sign that stack creation AND its rollback have failed. - * - * There is no way to recover from this, other than recreating the stack. - */ - ROLLBACK_FAILED, - NONE, -} \ No newline at end of file diff --git a/packages/aws-cdk/lib/cdk-toolkit.ts b/packages/aws-cdk/lib/cdk-toolkit.ts index e8f59b2fbda5b..51c0b47a35b0f 100644 --- a/packages/aws-cdk/lib/cdk-toolkit.ts +++ b/packages/aws-cdk/lib/cdk-toolkit.ts @@ -430,50 +430,6 @@ export class CdkToolkit { }); } - /** - * Roll back the given stack or stacks. - */ - public async rollback(options: RollbackOptions) { - const startSynthTime = new Date().getTime(); - const stackCollection = await this.selectStacksForDeploy(options.selector, true); - const elapsedSynthTime = new Date().getTime() - startSynthTime; - print('\n✨ Synthesis time: %ss\n', formatTime(elapsedSynthTime)); - - if (stackCollection.stackCount === 0) { - // eslint-disable-next-line no-console - console.error('No stacks selected'); - return; - } - - let anyRollbackable = false; - - for (const stack of stackCollection.stackArtifacts) { - print('Rolling back %s', chalk.bold(stack.displayName)); - const startRollbackTime = new Date().getTime(); - try { - const result = await this.props.deployments.rollbackStack({ - stack, - roleArn: options.roleArn, - toolkitStackName: options.toolkitStackName, - force: options.force, - validateBootstrapStackVersion: options.validateBootstrapStackVersion, - orphanLogicalIds: options.orphanLogicalIds, - }); - if (!result.notInRollbackableState) { - anyRollbackable = true; - } - const elapsedRollbackTime = new Date().getTime() - startRollbackTime; - print('\n✨ Rollback time: %ss\n', formatTime(elapsedRollbackTime)); - } catch (e: any) { - error('\n ❌ %s failed: %s', chalk.bold(stack.displayName), e.message); - throw new Error('Rollback failed (use --force to orphan failing resources)'); - } - } - if (!anyRollbackable) { - throw new Error('No stacks were in a state that could be rolled back'); - } - } - public async watch(options: WatchOptions) { const rootDir = path.dirname(path.resolve(PROJECT_CONFIG)); debug("root directory used for 'watch' is: %s", rootDir); @@ -1389,48 +1345,6 @@ export interface DeployOptions extends CfnDeployOptions, WatchOptions { readonly ignoreNoStacks?: boolean; } -export interface RollbackOptions { - /** - * Criteria for selecting stacks to deploy - */ - readonly selector: StackSelector; - - /** - * Name of the toolkit stack to use/deploy - * - * @default CDKToolkit - */ - readonly toolkitStackName?: string; - - /** - * Role to pass to CloudFormation for deployment - * - * @default - Default stack role - */ - readonly roleArn?: string; - - /** - * Whether to force the rollback or not - * - * @default false - */ - readonly force?: boolean; - - /** - * Logical IDs of resources to orphan - * - * @default - No orphaning - */ - readonly orphanLogicalIds?: string[]; - - /** - * Whether to validate the version of the bootstrap stack permissions - * - * @default true - */ - readonly validateBootstrapStackVersion?: boolean; -} - export interface ImportOptions extends CfnDeployOptions { /** * Build a physical resource mapping and write it to the given file, without performing the actual import operation diff --git a/packages/aws-cdk/lib/cli.ts b/packages/aws-cdk/lib/cli.ts index 9a91e6257db76..9d61a448c9a91 100644 --- a/packages/aws-cdk/lib/cli.ts +++ b/packages/aws-cdk/lib/cli.ts @@ -176,27 +176,6 @@ async function parseCommandLineArguments(args: string[]) { .option('asset-prebuild', { type: 'boolean', desc: 'Whether to build all assets before deploying the first stack (useful for failing Docker builds)', default: true }) .option('ignore-no-stacks', { type: 'boolean', desc: 'Whether to deploy if the app contains no stacks', default: false }), ) - .command('rollback [STACKS..]', 'Rolls back the stack(s) named STACKS to their last stable state', (yargs: Argv) => yargs - .option('all', { type: 'boolean', default: false, desc: 'Roll back all available stacks' }) - .option('toolkit-stack-name', { type: 'string', desc: 'The name of the CDK toolkit stack the environment is bootstrapped with', requiresArg: true }) - .option('force', { - alias: 'f', - type: 'boolean', - desc: 'Orphan all resources for which the rollback operation fails.', - }) - .option('validate-bootstrap-version', { - type: 'boolean', - desc: 'Whether to validate the bootstrap stack version. Defaults to \'true\', disable with --no-validate-bootstrap-version.', - }) - .option('orphan', { - // alias: 'o' conflicts with --output - type: 'array', - nargs: 1, - requiresArg: true, - desc: 'Orphan the given resources, identified by their logical ID (can be specified multiple times)', - default: [], - }), - ) .command('import [STACK]', 'Import existing resource(s) into the given STACK', (yargs: Argv) => yargs .option('execute', { type: 'boolean', desc: 'Whether to execute ChangeSet (--no-execute will NOT execute the ChangeSet)', default: true }) .option('change-set-name', { type: 'string', desc: 'Name of the CloudFormation change set to create' }) @@ -617,16 +596,6 @@ export async function exec(args: string[], synthesizer?: Synthesizer): Promise = jest.fn(); -let mockContinueUpdateRollback: MockedHandlerType = jest.fn(); -let mockDescribeStackEvents: MockedHandlerType = jest.fn(); beforeEach(() => { jest.resetAllMocks(); sdkProvider = new MockSdkProvider(); @@ -38,9 +35,6 @@ beforeEach(() => { StackResourceSummaries: stackResources, }; }, - rollbackStack: mockRollbackStack, - continueUpdateRollback: mockContinueUpdateRollback, - describeStackEvents: mockDescribeStackEvents, }); ToolkitInfo.lookup = mockToolkitInfoLookup = jest.fn().mockResolvedValue(ToolkitInfo.bootstrapStackNotFoundInfo('TestBootstrapStack')); @@ -337,76 +331,90 @@ test('readCurrentTemplateWithNestedStacks() can handle non-Resources in the temp }); test('readCurrentTemplateWithNestedStacks() with a 3-level nested + sibling structure works', async () => { - givenStacks({ - MultiLevelRoot: { - template: { - Resources: { - NestedStack: { - Type: 'AWS::CloudFormation::Stack', - Properties: { - TemplateURL: 'https://www.magic-url.com', - }, - Metadata: { - 'aws:asset:path': 'one-resource-two-stacks-stack.nested.template.json', - }, - }, - }, - }, - }, - NestedStack: { - template: { - Resources: { - SomeResource: { - Type: 'AWS::Something', - Properties: { - Property: 'old-value', + const cfnStack = new FakeCloudformationStack({ + stackName: 'MultiLevelRoot', + stackId: 'StackId', + }); + CloudFormationStack.lookup = (async (_, stackName: string) => { + switch (stackName) { + case 'MultiLevelRoot': + cfnStack.template = async () => ({ + Resources: { + NestedStack: { + Type: 'AWS::CloudFormation::Stack', + Properties: { + TemplateURL: 'https://www.magic-url.com', + }, + Metadata: { + 'aws:asset:path': 'one-resource-two-stacks-stack.nested.template.json', + }, }, }, - GrandChildStackA: { - Type: 'AWS::CloudFormation::Stack', - Properties: { - TemplateURL: 'https://www.magic-url.com', - }, - Metadata: { - 'aws:asset:path': 'one-resource-stack.nested.template.json', + }); + break; + + case 'NestedStack': + cfnStack.template = async () => ({ + Resources: { + SomeResource: { + Type: 'AWS::Something', + Properties: { + Property: 'old-value', + }, }, - }, - GrandChildStackB: { - Type: 'AWS::CloudFormation::Stack', - Properties: { - TemplateURL: 'https://www.magic-url.com', + GrandChildStackA: { + Type: 'AWS::CloudFormation::Stack', + Properties: { + TemplateURL: 'https://www.magic-url.com', + }, + Metadata: { + 'aws:asset:path': 'one-resource-stack.nested.template.json', + }, }, - Metadata: { - 'aws:asset:path': 'one-resource-stack.nested.template.json', + GrandChildStackB: { + Type: 'AWS::CloudFormation::Stack', + Properties: { + TemplateURL: 'https://www.magic-url.com', + }, + Metadata: { + 'aws:asset:path': 'one-resource-stack.nested.template.json', + }, }, }, - }, - }, - }, - GrandChildStackA: { - template: { - Resources: { - SomeResource: { - Type: 'AWS::Something', - Properties: { - Property: 'old-value', + }); + break; + + case 'GrandChildStackA': + cfnStack.template = async () => ({ + Resources: { + SomeResource: { + Type: 'AWS::Something', + Properties: { + Property: 'old-value', + }, }, }, - }, - }, - }, - GrandChildStackB: { - template: { - Resources: { - SomeResource: { - Type: 'AWS::Something', - Properties: { - Property: 'old-value', + }); + break; + + case 'GrandChildStackB': + cfnStack.template = async () => ({ + Resources: { + SomeResource: { + Type: 'AWS::Something', + Properties: { + Property: 'old-value', + }, }, }, - }, - }, - }, + }); + break; + + default: + throw new Error('unknown stack name ' + stackName + ' found in deployments.test.ts'); + } + + return cfnStack; }); const rootStack = testStack({ @@ -674,31 +682,36 @@ test('readCurrentTemplateWithNestedStacks() on an undeployed parent stack with a test('readCurrentTemplateWithNestedStacks() caches calls to listStackResources()', async () => { // GIVEN - givenStacks({ - '*': { - template: { - Resources: { - NestedStackA: { - Type: 'AWS::CloudFormation::Stack', - Properties: { - TemplateURL: 'https://www.magic-url.com', - }, - Metadata: { - 'aws:asset:path': 'one-resource-stack.nested.template.json', - }, + const cfnStack = new FakeCloudformationStack({ + stackName: 'CachingRoot', + stackId: 'StackId', + }); + CloudFormationStack.lookup = (async (_cfn, _stackName: string) => { + cfnStack.template = async () => ({ + Resources: + { + NestedStackA: { + Type: 'AWS::CloudFormation::Stack', + Properties: { + TemplateURL: 'https://www.magic-url.com', }, - NestedStackB: { - Type: 'AWS::CloudFormation::Stack', - Properties: { - TemplateURL: 'https://www.magic-url.com', - }, - Metadata: { - 'aws:asset:path': 'one-resource-stack.nested.template.json', - }, + Metadata: { + 'aws:asset:path': 'one-resource-stack.nested.template.json', + }, + }, + NestedStackB: { + Type: 'AWS::CloudFormation::Stack', + Properties: { + TemplateURL: 'https://www.magic-url.com', + }, + Metadata: { + 'aws:asset:path': 'one-resource-stack.nested.template.json', }, }, }, - }, + }); + + return cfnStack; }); const rootStack = testStack({ @@ -743,112 +756,15 @@ test('readCurrentTemplateWithNestedStacks() caches calls to listStackResources() expect(numberOfTimesListStackResourcesWasCalled).toEqual(1); }); -test('rollback stack assumes role if necessary', async() => { - const mockForEnvironment = jest.fn().mockImplementation(() => { return { sdk: sdkProvider.sdk }; }); - sdkProvider.forEnvironment = mockForEnvironment; - givenStacks({ - '*': { template: {} }, - }); - - await deployments.rollbackStack({ - stack: testStack({ - stackName: 'boop', - properties: { - assumeRoleArn: 'bloop:${AWS::Region}:${AWS::AccountId}', - }, - }), - validateBootstrapStackVersion: false, - }); - - expect(mockForEnvironment).toHaveBeenCalledWith(expect.anything(), expect.anything(), expect.objectContaining({ - assumeRoleArn: 'bloop:here:123456789012', - })); -}); - -test('rollback stack allows rolling back from UPDATE_FAILED', async() => { - // GIVEN - givenStacks({ - '*': { template: {}, stackStatus: 'UPDATE_FAILED' }, - }); - - // WHEN - await deployments.rollbackStack({ - stack: testStack({ stackName: 'boop' }), - validateBootstrapStackVersion: false, - }); - - // THEN - expect(mockRollbackStack).toHaveBeenCalled(); -}); - -test('rollback stack allows continue rollback from UPDATE_ROLLBACK_FAILED', async() => { - // GIVEN - givenStacks({ - '*': { template: {}, stackStatus: 'UPDATE_ROLLBACK_FAILED' }, - }); - - // WHEN - await deployments.rollbackStack({ - stack: testStack({ stackName: 'boop' }), - validateBootstrapStackVersion: false, - }); - - // THEN - expect(mockContinueUpdateRollback).toHaveBeenCalled(); -}); - -test('rollback stack fails in UPDATE_COMPLETE state', async() => { - // GIVEN - givenStacks({ - '*': { template: {}, stackStatus: 'UPDATE_COMPLETE' }, - }); - - // WHEN - const response = await deployments.rollbackStack({ - stack: testStack({ stackName: 'boop' }), - validateBootstrapStackVersion: false, - }); - - // THEN - expect(response.notInRollbackableState).toBe(true); -}); - -test('continue rollback stack with force ignores any failed resources', async() => { - // GIVEN - givenStacks({ - '*': { template: {}, stackStatus: 'UPDATE_ROLLBACK_FAILED' }, - }); - mockDescribeStackEvents.mockReturnValue({ - StackEvents: [ - { - EventId: 'asdf', - StackId: 'stack/MyStack', - StackName: 'MyStack', - Timestamp: new Date(), - LogicalResourceId: 'Xyz', - ResourceStatus: 'UPDATE_FAILED', - }, - ], - }); - - // WHEN - await deployments.rollbackStack({ - stack: testStack({ stackName: 'boop' }), - validateBootstrapStackVersion: false, - force: true, - }); - - // THEN - expect(mockContinueUpdateRollback).toHaveBeenCalledWith(expect.objectContaining({ - ResourcesToSkip: ['Xyz'], - })); -}); - test('readCurrentTemplateWithNestedStacks() succesfully ignores stacks without metadata', async () => { // GIVEN - givenStacks({ - 'MetadataRoot': { - template: { + const cfnStack = new FakeCloudformationStack({ + stackName: 'MetadataRoot', + stackId: 'StackId', + }); + CloudFormationStack.lookup = (async (_, stackName: string) => { + if (stackName === 'MetadataRoot') { + cfnStack.template = async () => ({ Resources: { WithMetadata: { Type: 'AWS::CloudFormation::Stack', @@ -860,10 +776,10 @@ test('readCurrentTemplateWithNestedStacks() succesfully ignores stacks without m }, }, }, - }, - }, - '*': { - template: { + }); + + } else { + cfnStack.template = async () => ({ Resources: { SomeResource: { Type: 'AWS::Something', @@ -872,8 +788,10 @@ test('readCurrentTemplateWithNestedStacks() succesfully ignores stacks without m }, }, }, - }, - }, + }); + } + + return cfnStack; }); const rootStack = testStack({ @@ -1000,23 +918,3 @@ function stackSummaryOf(logicalId: string, resourceType: string, physicalResourc LastUpdatedTimestamp: new Date(), }; } - -function givenStacks(stacks: Record) { - jest.spyOn(CloudFormationStack, 'lookup').mockImplementation(async (_, stackName) => { - let stack = stacks[stackName]; - if (!stack) { - stack = stacks['*']; - } - if (stack) { - const cfnStack = new FakeCloudformationStack({ - stackName, - stackId: `stack/${stackName}`, - stackStatus: stack.stackStatus, - }); - cfnStack.setTemplate(stack.template); - return cfnStack; - } else { - return new FakeCloudformationStack({ stackName }); - } - }); -} \ No newline at end of file diff --git a/packages/aws-cdk/test/api/fake-cloudformation-stack.ts b/packages/aws-cdk/test/api/fake-cloudformation-stack.ts index 918d6c4d5bb37..1668ea0b55d33 100644 --- a/packages/aws-cdk/test/api/fake-cloudformation-stack.ts +++ b/packages/aws-cdk/test/api/fake-cloudformation-stack.ts @@ -2,12 +2,10 @@ import { CloudFormation } from 'aws-sdk'; import { CloudFormationStack, Template } from '../../lib/api/util/cloudformation'; import { instanceMockFrom } from '../util'; -import { StackStatus } from '../../lib/api/util/cloudformation/stack-status'; export interface FakeCloudFormationStackProps { readonly stackName: string; - readonly stackId?: string; - readonly stackStatus?: string; + readonly stackId: string; } export class FakeCloudformationStack extends CloudFormationStack { @@ -31,23 +29,7 @@ export class FakeCloudformationStack extends CloudFormationStack { return Promise.resolve(this.__template); } - public get exists() { - return this.props.stackId !== undefined; - } - - public get stackStatus() { - const status = this.props.stackStatus ?? 'UPDATE_COMPLETE'; - return new StackStatus(status, 'The test said so'); - } - - public get stackId() { - if (!this.props.stackId) { - throw new Error('Cannot retrieve stackId from a non-existent stack'); - } + public get stackId(): string { return this.props.stackId; } - - public get outputs(): Record { - return {}; - } } diff --git a/packages/aws-cdk/test/api/stack-activity-monitor.test.ts b/packages/aws-cdk/test/api/stack-activity-monitor.test.ts index a07ec99e40b38..6c5eddc7dd75e 100644 --- a/packages/aws-cdk/test/api/stack-activity-monitor.test.ts +++ b/packages/aws-cdk/test/api/stack-activity-monitor.test.ts @@ -29,7 +29,6 @@ test('prints 0/4 progress report, when addActivity is called with an "IN_PROGRES EventId: '', StackName: 'stack-name', }, - parentStackLogicalIds: [], }); }); @@ -54,7 +53,6 @@ test('prints 1/4 progress report, when addActivity is called with an "UPDATE_COM EventId: '', StackName: 'stack-name', }, - parentStackLogicalIds: [], }); }); @@ -79,7 +77,6 @@ test('prints 1/4 progress report, when addActivity is called with an "UPDATE_COM EventId: '', StackName: 'stack-name', }, - parentStackLogicalIds: [], }); }); @@ -104,7 +101,6 @@ test('prints 1/4 progress report, when addActivity is called with an "ROLLBACK_C EventId: '', StackName: 'stack-name', }, - parentStackLogicalIds: [], }); }); @@ -129,7 +125,6 @@ test('prints 0/4 progress report, when addActivity is called with an "UPDATE_FAI EventId: '', StackName: 'stack-name', }, - parentStackLogicalIds: [], }); }); @@ -154,7 +149,6 @@ test('does not print "Failed Resources:" list, when all deployments are successf EventId: '', StackName: 'stack-name', }, - parentStackLogicalIds: [], }); historyActivityPrinter.addActivity({ event: { @@ -166,7 +160,6 @@ test('does not print "Failed Resources:" list, when all deployments are successf EventId: '', StackName: 'stack-name', }, - parentStackLogicalIds: [], }); historyActivityPrinter.addActivity({ event: { @@ -178,7 +171,6 @@ test('does not print "Failed Resources:" list, when all deployments are successf EventId: '', StackName: 'stack-name', }, - parentStackLogicalIds: [], }); historyActivityPrinter.stop(); }); @@ -207,7 +199,6 @@ test('prints "Failed Resources:" list, when at least one deployment fails', () = EventId: '', StackName: 'stack-name', }, - parentStackLogicalIds: [], }); historyActivityPrinter.addActivity({ event: { @@ -219,7 +210,6 @@ test('prints "Failed Resources:" list, when at least one deployment fails', () = EventId: '', StackName: 'stack-name', }, - parentStackLogicalIds: [], }); historyActivityPrinter.stop(); }); @@ -252,7 +242,6 @@ test('print failed resources because of hook failures', () => { HookType: 'hook1', HookStatusReason: 'stack1 must obey certain rules', }, - parentStackLogicalIds: [], }); historyActivityPrinter.addActivity({ event: { @@ -265,7 +254,6 @@ test('print failed resources because of hook failures', () => { StackName: 'stack-name', ResourceStatusReason: 'The following hook(s) failed: hook1', }, - parentStackLogicalIds: [], }); historyActivityPrinter.stop(); }); diff --git a/packages/aws-cdk/test/cdk-toolkit.test.ts b/packages/aws-cdk/test/cdk-toolkit.test.ts index d2c46cc15698d..f67c35ad8dae7 100644 --- a/packages/aws-cdk/test/cdk-toolkit.test.ts +++ b/packages/aws-cdk/test/cdk-toolkit.test.ts @@ -64,7 +64,7 @@ import { instanceMockFrom, MockCloudExecutable, TestStackArtifact } from './util import { MockSdkProvider } from './util/mock-sdk'; import { Bootstrapper } from '../lib/api/bootstrap'; import { DeployStackResult } from '../lib/api/deploy-stack'; -import { Deployments, DeployStackOptions, DestroyStackOptions, RollbackStackOptions, RollbackStackResult } from '../lib/api/deployments'; +import { Deployments, DeployStackOptions, DestroyStackOptions } from '../lib/api/deployments'; import { HotswapMode } from '../lib/api/hotswap/common'; import { Template } from '../lib/api/util/cloudformation'; import { CdkToolkit, Tag } from '../lib/cdk-toolkit'; @@ -1224,31 +1224,6 @@ describe('synth', () => { expect(mockData.mock.calls.length).toEqual(1); expect(mockData.mock.calls[0][0]).toBeDefined(); }); - - test('rollback uses deployment role', async () => { - cloudExecutable = new MockCloudExecutable({ - stacks: [ - MockStack.MOCK_STACK_C, - ], - }); - - const mockedRollback = jest.spyOn(Deployments.prototype, 'rollbackStack').mockResolvedValue({ - success: true, - }); - - const toolkit = new CdkToolkit({ - cloudExecutable, - configuration: cloudExecutable.configuration, - sdkProvider: cloudExecutable.sdkProvider, - deployments: new Deployments({ sdkProvider: new MockSdkProvider() }), - }); - - await toolkit.rollback({ - selector: { patterns: [] }, - }); - - expect(mockedRollback).toHaveBeenCalled(); - }); }); class MockStack { @@ -1425,12 +1400,6 @@ class FakeCloudFormation extends Deployments { }); } - public rollbackStack(_options: RollbackStackOptions): Promise { - return Promise.resolve({ - success: true, - }); - } - public destroyStack(options: DestroyStackOptions): Promise { expect(options.stack).toBeDefined(); return Promise.resolve(); diff --git a/packages/aws-cdk/test/util/mock-sdk.ts b/packages/aws-cdk/test/util/mock-sdk.ts index d280ef9f02942..0d943fadb3dea 100644 --- a/packages/aws-cdk/test/util/mock-sdk.ts +++ b/packages/aws-cdk/test/util/mock-sdk.ts @@ -269,21 +269,11 @@ type AwsCallInputOutput = // Determine the type of the mock handler from the type of the Input/Output type pair. // Don't need to worry about the 'never', TypeScript will propagate it upwards making it // impossible to specify the field that has 'never' anywhere in its type. -type HandlerType = +type MockHandlerType = AI extends [any, any] ? (input: AI[0]) => AI[1] : AI; // Any subset of the full type that synchronously returns the output structure is okay -export type SyncHandlerSubsetOf = {[K in keyof S]?: HandlerType>}; - -/** - * A jest Mock function we can pass into SdkProvider.stubXXX - * - * Use as follows: - * - * ```ts - * const mockDescribeStackEvents: MockedHandlerType = jest.fn(); - */ -export type MockedHandlerType = AwsCallInputOutput extends [infer IN, infer OUT] ? jest.Mock : never; +export type SyncHandlerSubsetOf = {[K in keyof S]?: MockHandlerType>}; /** * Fake AWS response. diff --git a/packages/aws-cdk/test/util/stack-monitor.test.ts b/packages/aws-cdk/test/util/stack-monitor.test.ts index e0d9bb673fbd7..e32098a03a9ee 100644 --- a/packages/aws-cdk/test/util/stack-monitor.test.ts +++ b/packages/aws-cdk/test/util/stack-monitor.test.ts @@ -123,21 +123,12 @@ describe('stack monitor, collecting errors from events', () => { expect(request.StackName).toStrictEqual('StackName'); return { StackEvents: [ - addErrorToStackEvent( - event(102), { - logicalResourceId: 'nestedStackLogicalResourceId', - physicalResourceId: 'nestedStackPhysicalResourceId', - resourceType: 'AWS::CloudFormation::Stack', - resourceStatusReason: 'nested stack failed', - resourceStatus: 'UPDATE_FAILED', - }, - ), addErrorToStackEvent( event(100), { logicalResourceId: 'nestedStackLogicalResourceId', physicalResourceId: 'nestedStackPhysicalResourceId', resourceType: 'AWS::CloudFormation::Stack', - resourceStatus: 'UPDATE_IN_PROGRESS', + resourceStatusReason: 'nested stack failed', }, ), ], @@ -262,28 +253,18 @@ async function testMonitorWithEventCalls( let describeStackEvents = (jest.fn() as jest.Mock); let finished = false; - let error: Error | undefined = undefined; for (const invocation of beforeStopInvocations) { const invocation_ = invocation; // Capture loop variable in local because of closure semantics const isLast = invocation === beforeStopInvocations[beforeStopInvocations.length - 1]; describeStackEvents = describeStackEvents.mockImplementationOnce(request => { - try { - const ret = invocation_(request); - if (isLast) { - finished = true; - } - return ret; - } catch (e: any) { + const ret = invocation_(request); + if (isLast) { finished = true; - error = e; - throw e; } + return ret; }); } - if (error) { - throw error; - } for (const invocation of afterStopInvocations) { describeStackEvents = describeStackEvents.mockImplementationOnce(invocation); } From 681664efe3c97f2099bec05d54e8fcff1bb7f17b Mon Sep 17 00:00:00 2001 From: shikha372 Date: Fri, 4 Oct 2024 19:05:46 -0700 Subject: [PATCH 04/11] chore(release): 2.161.1 --- CHANGELOG.v2.alpha.md | 2 ++ CHANGELOG.v2.md | 7 +++++++ version.v2.json | 4 ++-- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.v2.alpha.md b/CHANGELOG.v2.alpha.md index 71887f060141a..53e9ede390270 100644 --- a/CHANGELOG.v2.alpha.md +++ b/CHANGELOG.v2.alpha.md @@ -2,6 +2,8 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +## [2.161.1-alpha.0](https://github.com/aws/aws-cdk/compare/v2.161.0-alpha.0...v2.161.1-alpha.0) (2024-10-05) + ## [2.161.0-alpha.0](https://github.com/aws/aws-cdk/compare/v2.160.0-alpha.0...v2.161.0-alpha.0) (2024-10-03) diff --git a/CHANGELOG.v2.md b/CHANGELOG.v2.md index 8d997f77a4eeb..8a8330236f6b6 100644 --- a/CHANGELOG.v2.md +++ b/CHANGELOG.v2.md @@ -2,6 +2,13 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +## [2.161.1](https://github.com/aws/aws-cdk/compare/v2.161.0...v2.161.1) (2024-10-05) + + +### Reverts + +* feat(cli): cdk rollback ([#31407](https://github.com/aws/aws-cdk/issues/31407)) ([#31657](https://github.com/aws/aws-cdk/issues/31657)) ([29bf223](https://github.com/aws/aws-cdk/commit/29bf2233a33d3ded20639279fa712a5b036fe041)) + ## [2.161.0](https://github.com/aws/aws-cdk/compare/v2.160.0...v2.161.0) (2024-10-03) diff --git a/version.v2.json b/version.v2.json index fa129890d6ad2..226f0caf5d561 100644 --- a/version.v2.json +++ b/version.v2.json @@ -1,4 +1,4 @@ { - "version": "2.161.0", - "alphaVersion": "2.161.0-alpha.0" + "version": "2.161.1", + "alphaVersion": "2.161.1-alpha.0" } \ No newline at end of file From f603c97bc82172219d3715505fe228c1bb02f475 Mon Sep 17 00:00:00 2001 From: Sumu Pitchayan <35242245+sumupitchayan@users.noreply.github.com> Date: Sun, 6 Oct 2024 23:56:27 -0400 Subject: [PATCH 05/11] fix(core): `cdk diff` on large templates fails when passing in `toolkitStackName` and `qualifier` (#31636) Closes #29179 ### Reason for this change If your account is bootstrapped with a custom `toolkitStackName` or `qualifier`, then running `cdk diff` does not work for large diff templates of over 50 KiB in size. ### Description of changes The `toolkitStackName` was not passed down all the way through the `cdk diff` code path - this PR fixes the issue by adding the optional `toolkitStackName` property to the `DiffOptions` interface in `cdk-toolkit.ts` and passing that value all the way through the diff code path to the `uploadBodyParameterAndCreateChangeSet` function in `cloudformation.ts`, where the template asset is built and published. ### Description of how you validated changes I created a CDK app locally and ran the commands (exactly following the reproduction steps from the original issue) using the CLI build from this PR and was able to successfully run `cdk diff` without needing to pass in the `--toolkit-stack-name` flag. ### Checklist - [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../cli-integ/lib/with-cdk-app.ts | 7 +++- .../cli-integ/resources/cdk-apps/app/app.js | 11 ++++- .../tests/cli-integ-tests/cli.integtest.ts | 40 +++++++++++++++++-- .../aws-cdk/lib/api/util/cloudformation.ts | 3 ++ packages/aws-cdk/lib/cdk-toolkit.ts | 8 ++++ packages/aws-cdk/lib/cli.ts | 1 + 6 files changed, 65 insertions(+), 5 deletions(-) diff --git a/packages/@aws-cdk-testing/cli-integ/lib/with-cdk-app.ts b/packages/@aws-cdk-testing/cli-integ/lib/with-cdk-app.ts index 13710b6c53b09..3ad02171d750f 100644 --- a/packages/@aws-cdk-testing/cli-integ/lib/with-cdk-app.ts +++ b/packages/@aws-cdk-testing/cli-integ/lib/with-cdk-app.ts @@ -258,6 +258,11 @@ interface CommonCdkBootstrapCommandOptions { * @default - none */ readonly tags?: string; + + /** + * @default - the default CDK qualifier + */ + readonly qualifier?: string; } export interface CdkLegacyBootstrapCommandOptions extends CommonCdkBootstrapCommandOptions { @@ -408,7 +413,7 @@ export class TestFixture extends ShellHelper { if (options.bootstrapBucketName) { args.push('--bootstrap-bucket-name', options.bootstrapBucketName); } - args.push('--qualifier', this.qualifier); + args.push('--qualifier', options.qualifier ?? this.qualifier); if (options.cfnExecutionPolicy) { args.push('--cloudformation-execution-policies', options.cfnExecutionPolicy); } diff --git a/packages/@aws-cdk-testing/cli-integ/resources/cdk-apps/app/app.js b/packages/@aws-cdk-testing/cli-integ/resources/cdk-apps/app/app.js index dd2797823198f..6ac252b4ac5aa 100755 --- a/packages/@aws-cdk-testing/cli-integ/resources/cdk-apps/app/app.js +++ b/packages/@aws-cdk-testing/cli-integ/resources/cdk-apps/app/app.js @@ -438,9 +438,17 @@ class IamRolesStack extends cdk.Stack { // Environment variabile is used to create a bunch of roles to test // that large diff templates are uploaded to S3 to create the changeset. for(let i = 1; i <= Number(process.env.NUMBER_OF_ROLES) ; i++) { - new iam.Role(this, `Role${i}`, { + const role = new iam.Role(this, `Role${i}`, { assumedBy: new iam.ServicePrincipal('lambda.amazonaws.com'), }); + const cfnRole = role.node.defaultChild; + + // For any extra IAM roles created, add a ton of metadata so that the template size is > 50 KiB. + if (i > 1) { + for(let i = 1; i <= 30 ; i++) { + cfnRole.addMetadata('a'.repeat(1000), 'v'); + } + } } } } @@ -792,6 +800,7 @@ switch (stackSet) { new LambdaStack(app, `${stackPrefix}-lambda`); + // This stack is used to test diff with large templates by creating a role with a ton of metadata new IamRolesStack(app, `${stackPrefix}-iam-roles`); if (process.env.ENABLE_VPC_TESTING == 'IMPORT') { diff --git a/packages/@aws-cdk-testing/cli-integ/tests/cli-integ-tests/cli.integtest.ts b/packages/@aws-cdk-testing/cli-integ/tests/cli-integ-tests/cli.integtest.ts index a38580d10714a..6e98a1a7e6654 100644 --- a/packages/@aws-cdk-testing/cli-integ/tests/cli-integ-tests/cli.integtest.ts +++ b/packages/@aws-cdk-testing/cli-integ/tests/cli-integ-tests/cli.integtest.ts @@ -1034,18 +1034,18 @@ integTest( integTest( 'cdk diff with large changeset does not fail', withDefaultFixture(async (fixture) => { - // GIVEN - small initial stack with only ane IAM role + // GIVEN - small initial stack with only one IAM role await fixture.cdkDeploy('iam-roles', { modEnv: { NUMBER_OF_ROLES: '1', }, }); - // WHEN - adding 200 roles to the same stack to create a large diff + // WHEN - adding an additional role with a ton of metadata to create a large diff const diff = await fixture.cdk(['diff', fixture.fullStackName('iam-roles')], { verbose: true, modEnv: { - NUMBER_OF_ROLES: '200', + NUMBER_OF_ROLES: '2', }, }); @@ -1055,6 +1055,40 @@ integTest( }), ); +integTest('cdk diff with large changeset and custom toolkit stack name and qualifier does not fail', withoutBootstrap(async (fixture) => { + // Bootstrapping with custom toolkit stack name and qualifier + const qualifier = 'abc1111'; + const toolkitStackName = 'custom-stack2'; + await fixture.cdkBootstrapModern({ + verbose: true, + toolkitStackName: toolkitStackName, + qualifier: qualifier, + }); + + // Deploying small initial stack with only one IAM role + await fixture.cdkDeploy('iam-roles', { + modEnv: { + NUMBER_OF_ROLES: '1', + }, + options: [ + '--toolkit-stack-name', toolkitStackName, + '--context', `@aws-cdk/core:bootstrapQualifier=${qualifier}`, + ], + }); + + // WHEN - adding a role with a ton of metadata to create a large diff + const diff = await fixture.cdk(['diff', '--toolkit-stack-name', toolkitStackName, '--context', `@aws-cdk/core:bootstrapQualifier=${qualifier}`, fixture.fullStackName('iam-roles')], { + verbose: true, + modEnv: { + NUMBER_OF_ROLES: '2', + }, + }); + + // Assert that the CLI assumes the file publishing role: + expect(diff).toMatch(/Assuming role .*file-publishing-role/); + expect(diff).toContain('success: Published'); +})); + integTest( 'cdk diff --security-only successfully outputs sso-permission-set-without-managed-policy information', withDefaultFixture(async (fixture) => { diff --git a/packages/aws-cdk/lib/api/util/cloudformation.ts b/packages/aws-cdk/lib/api/util/cloudformation.ts index 27822ca4c8378..85a2742449da0 100644 --- a/packages/aws-cdk/lib/api/util/cloudformation.ts +++ b/packages/aws-cdk/lib/api/util/cloudformation.ts @@ -305,6 +305,7 @@ export type PrepareChangeSetOptions = { sdkProvider: SdkProvider; stream: NodeJS.WritableStream; parameters: { [name: string]: string | undefined }; + toolkitStackName?: string; resourcesToImport?: ResourcesToImport; } @@ -375,9 +376,11 @@ async function uploadBodyParameterAndCreateChangeSet(options: PrepareChangeSetOp for (const entry of file_entries) { await options.deployments.buildSingleAsset(artifact, assetManifest, entry, { stack: options.stack, + toolkitStackName: options.toolkitStackName, }); await options.deployments.publishSingleAsset(assetManifest, entry, { stack: options.stack, + toolkitStackName: options.toolkitStackName, }); } } diff --git a/packages/aws-cdk/lib/cdk-toolkit.ts b/packages/aws-cdk/lib/cdk-toolkit.ts index b0af703770d3f..4f07c3ed7a4ff 100644 --- a/packages/aws-cdk/lib/cdk-toolkit.ts +++ b/packages/aws-cdk/lib/cdk-toolkit.ts @@ -186,6 +186,7 @@ export class CdkToolkit { parameters: Object.assign({}, parameterMap['*'], parameterMap[stack.stackName]), resourcesToImport, stream, + toolkitStackName: options.toolkitStackName, }); } else { debug(`the stack '${stack.stackName}' has not been deployed to CloudFormation or describeStacks call failed, skipping changeset creation.`); @@ -1062,6 +1063,13 @@ export interface DiffOptions { */ stackNames: string[]; + /** + * Name of the toolkit stack, if not the default name + * + * @default 'CDKToolkit' + */ + readonly toolkitStackName?: string; + /** * Only select the given stack * diff --git a/packages/aws-cdk/lib/cli.ts b/packages/aws-cdk/lib/cli.ts index 9d61a448c9a91..ea2ae08c013cb 100644 --- a/packages/aws-cdk/lib/cli.ts +++ b/packages/aws-cdk/lib/cli.ts @@ -505,6 +505,7 @@ export async function exec(args: string[], synthesizer?: Synthesizer): Promise Date: Sun, 6 Oct 2024 23:37:08 -0700 Subject: [PATCH 06/11] chore: upgrade sdkv3 to the newest version used by lambda distributions (#31658) https://github.com/aws/aws-cdk/pull/31624 is too big so I'm splitting out the parts that I can without causing type conflicts. This upgrades all sdk v3 versions to the most recent version used in every region by lambda's node18 and node20 runtime bundle. Closes #. ### Reason for this change ### Description of changes ### Description of how you validated changes ### Checklist - [ ] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- package.json | 3 +- .../@aws-cdk-testing/cli-integ/lib/aws.ts | 8 +- .../@aws-cdk-testing/cli-integ/package.json | 26 +- .../framework-integ/package.json | 7 +- ...efaultTestDeployAssert62638412.assets.json | 2 +- .../__entrypoint__.js | 0 .../index.js | 1 + .../index.js | 1 - ...teg-delete-existing-record-set.assets.json | 12 +- ...g-delete-existing-record-set.template.json | 2 +- .../cdk.out | 2 +- .../integ.json | 2 +- .../manifest.json | 12 +- .../MyStack.assets.json | 12 +- .../MyStack.template.json | 2 +- ...efaultTestDeployAssert61636546.assets.json | 12 +- ...aultTestDeployAssert61636546.template.json | 8 +- .../index.js | 43467 +++++++++------- .../__entrypoint__.js | 0 .../index.js | 4 + .../index.js | 2 - .../test/integ.triggers.js.snapshot/cdk.out | 2 +- .../integ.triggers.js.snapshot/integ.json | 2 +- .../integ.triggers.js.snapshot/manifest.json | 14 +- .../@aws-cdk/aws-amplify-alpha/package.json | 6 +- .../package.json | 4 +- .../@aws-cdk/aws-redshift-alpha/package.json | 6 +- .../@aws-cdk/cloudformation-diff/package.json | 2 +- .../aws-eks/cluster-resource-handler/index.ts | 2 +- .../index.ts | 4 +- .../lib/triggers/lambda/index.ts | 6 +- .../custom-resource-handlers/package.json | 50 +- .../@aws-cdk/integ-tests-alpha/package.json | 12 +- packages/aws-cdk-lib/package.json | 42 +- .../cdk-build-tools/config/jest.config.js | 31 +- yarn.lock | 5672 +- 36 files changed, 25586 insertions(+), 23854 deletions(-) rename packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.delete-existing-record-set.js.snapshot/{asset.e0e799a729f2e647a95d0ba4e1b63e93839a8f3034bfcb17ba52ea561cafba19 => asset.782a34c2ce2f5bc5e5b90304f41348680a6f9ba7a0eb2de6f03658640f67ff15}/__entrypoint__.js (100%) create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.delete-existing-record-set.js.snapshot/asset.782a34c2ce2f5bc5e5b90304f41348680a6f9ba7a0eb2de6f03658640f67ff15/index.js delete mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.delete-existing-record-set.js.snapshot/asset.e0e799a729f2e647a95d0ba4e1b63e93839a8f3034bfcb17ba52ea561cafba19/index.js rename packages/@aws-cdk-testing/framework-integ/test/triggers/test/integ.triggers.js.snapshot/{asset.eafc02f6925151c95ac6a6ae81a3e36d4cf4e77db52eec8e467ce2a69454a41a.bundle => asset.332b43dd64df92147f3af7fe53689eb20106f7158d60d220b0b10b126035713b.bundle}/index.js (71%) rename packages/@aws-cdk-testing/framework-integ/test/triggers/test/integ.triggers.js.snapshot/{asset.ac5727a1b8e23c42dabba9ff5155c8fb26ae68568e083beac0908af8e70fc606 => asset.6e5c0f63875937fea22d274138fc297c2a753e7516d437661017ee38ced6816c}/__entrypoint__.js (100%) create mode 100644 packages/@aws-cdk-testing/framework-integ/test/triggers/test/integ.triggers.js.snapshot/asset.6e5c0f63875937fea22d274138fc297c2a753e7516d437661017ee38ced6816c/index.js delete mode 100644 packages/@aws-cdk-testing/framework-integ/test/triggers/test/integ.triggers.js.snapshot/asset.ac5727a1b8e23c42dabba9ff5155c8fb26ae68568e083beac0908af8e70fc606/index.js diff --git a/package.json b/package.json index 81541f5989b1f..8aa3df7c5e5ae 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,8 @@ "colors": "1.4.0", "markdown-it": "^12.3.2", "string-width": "^4.2.3", - "@types/babel__traverse": "7.18.2" + "@types/babel__traverse": "7.18.2", + "@smithy/types": "3.5.0" }, "repository": { "type": "git", diff --git a/packages/@aws-cdk-testing/cli-integ/lib/aws.ts b/packages/@aws-cdk-testing/cli-integ/lib/aws.ts index ff62196022b1a..64719eac155f0 100644 --- a/packages/@aws-cdk-testing/cli-integ/lib/aws.ts +++ b/packages/@aws-cdk-testing/cli-integ/lib/aws.ts @@ -3,7 +3,7 @@ import { DeleteStackCommand, DescribeStacksCommand, UpdateTerminationProtectionCommand, - Stack, + type Stack, } from '@aws-sdk/client-cloudformation'; import { DeleteRepositoryCommand, ECRClient } from '@aws-sdk/client-ecr'; import { ECSClient } from '@aws-sdk/client-ecs'; @@ -13,14 +13,14 @@ import { S3Client, DeleteObjectsCommand, ListObjectVersionsCommand, - ObjectIdentifier, + type ObjectIdentifier, DeleteBucketCommand, } from '@aws-sdk/client-s3'; import { SNSClient } from '@aws-sdk/client-sns'; import { SSOClient } from '@aws-sdk/client-sso'; import { STSClient, GetCallerIdentityCommand } from '@aws-sdk/client-sts'; import { fromIni } from '@aws-sdk/credential-providers'; -import { AwsCredentialIdentityProvider } from '@smithy/types'; +import type { AwsCredentialIdentityProvider } from '@smithy/types'; import { ConfiguredRetryStrategy } from '@smithy/util-retry'; interface ClientConfig { readonly credentials?: AwsCredentialIdentityProvider; @@ -75,7 +75,7 @@ export class AwsClients { maxAttempts: 2, }); - return (await stsClient.send(new GetCallerIdentityCommand())).Account!; + return (await stsClient.send(new GetCallerIdentityCommand({}))).Account!; } public async deleteStacks(...stackNames: string[]) { diff --git a/packages/@aws-cdk-testing/cli-integ/package.json b/packages/@aws-cdk-testing/cli-integ/package.json index bccce1243ee28..6ae321d493f43 100644 --- a/packages/@aws-cdk-testing/cli-integ/package.json +++ b/packages/@aws-cdk-testing/cli-integ/package.json @@ -39,19 +39,19 @@ }, "dependencies": { "@octokit/rest": "^18.12.0", - "@aws-sdk/client-codeartifact": "3.637.0", - "@aws-sdk/client-cloudformation": "3.637.0", - "@aws-sdk/client-ecr": "3.637.0", - "@aws-sdk/client-ecs": "3.637.0", - "@aws-sdk/client-iam": "3.637.0", - "@aws-sdk/client-lambda": "3.637.0", - "@aws-sdk/client-s3": "3.637.0", - "@aws-sdk/client-sns": "3.637.0", - "@aws-sdk/client-sso": "3.637.0", - "@aws-sdk/client-sts": "3.637.0", - "@aws-sdk/credential-providers": "3.637.0", - "@smithy/util-retry": "3.0.4", - "@smithy/types": "3.4.0", + "@aws-sdk/client-codeartifact": "3.632.0", + "@aws-sdk/client-cloudformation": "3.632.0", + "@aws-sdk/client-ecr": "3.632.0", + "@aws-sdk/client-ecs": "3.632.0", + "@aws-sdk/client-iam": "3.632.0", + "@aws-sdk/client-lambda": "3.632.0", + "@aws-sdk/client-s3": "3.632.0", + "@aws-sdk/client-sns": "3.632.0", + "@aws-sdk/client-sso": "3.632.0", + "@aws-sdk/client-sts": "3.632.0", + "@aws-sdk/credential-providers": "3.632.0", + "@smithy/util-retry": "3.0.7", + "@smithy/types": "3.5.0", "axios": "^1.7.7", "chalk": "^4", "fs-extra": "^9.1.0", diff --git a/packages/@aws-cdk-testing/framework-integ/package.json b/packages/@aws-cdk-testing/framework-integ/package.json index 4baa3c0d1031c..6159f0535e2fe 100644 --- a/packages/@aws-cdk-testing/framework-integ/package.json +++ b/packages/@aws-cdk-testing/framework-integ/package.json @@ -32,9 +32,9 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/integ-runner": "^0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@aws-sdk/client-acm": "3.421.0", - "@aws-sdk/client-rds": "3.421.0", - "@aws-sdk/client-s3": "3.421.0", + "@aws-sdk/client-acm": "3.632.0", + "@aws-sdk/client-rds": "3.632.0", + "@aws-sdk/client-s3": "3.632.0", "delay": "5.0.0" }, "dependencies": { @@ -43,7 +43,6 @@ "@aws-cdk/lambda-layer-kubectl-v29": "^2.1.0", "@aws-cdk/lambda-layer-kubectl-v30": "^2.0.1", "aws-cdk-lib": "0.0.0", - "aws-sdk-mock": "5.6.0", "cdk8s": "2.69.0", "cdk8s-plus-27": "2.9.5", "constructs": "^10.0.0" diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.delete-existing-record-set.js.snapshot/Rooute53DeleteExistingRecordSetIntegDefaultTestDeployAssert62638412.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.delete-existing-record-set.js.snapshot/Rooute53DeleteExistingRecordSetIntegDefaultTestDeployAssert62638412.assets.json index d8dfcb5407df9..d32c8c8bb455b 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.delete-existing-record-set.js.snapshot/Rooute53DeleteExistingRecordSetIntegDefaultTestDeployAssert62638412.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.delete-existing-record-set.js.snapshot/Rooute53DeleteExistingRecordSetIntegDefaultTestDeployAssert62638412.assets.json @@ -1,5 +1,5 @@ { - "version": "36.0.0", + "version": "38.0.1", "files": { "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { "source": { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.delete-existing-record-set.js.snapshot/asset.e0e799a729f2e647a95d0ba4e1b63e93839a8f3034bfcb17ba52ea561cafba19/__entrypoint__.js b/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.delete-existing-record-set.js.snapshot/asset.782a34c2ce2f5bc5e5b90304f41348680a6f9ba7a0eb2de6f03658640f67ff15/__entrypoint__.js similarity index 100% rename from packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.delete-existing-record-set.js.snapshot/asset.e0e799a729f2e647a95d0ba4e1b63e93839a8f3034bfcb17ba52ea561cafba19/__entrypoint__.js rename to packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.delete-existing-record-set.js.snapshot/asset.782a34c2ce2f5bc5e5b90304f41348680a6f9ba7a0eb2de6f03658640f67ff15/__entrypoint__.js diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.delete-existing-record-set.js.snapshot/asset.782a34c2ce2f5bc5e5b90304f41348680a6f9ba7a0eb2de6f03658640f67ff15/index.js b/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.delete-existing-record-set.js.snapshot/asset.782a34c2ce2f5bc5e5b90304f41348680a6f9ba7a0eb2de6f03658640f67ff15/index.js new file mode 100644 index 0000000000000..a0e15439300ce --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.delete-existing-record-set.js.snapshot/asset.782a34c2ce2f5bc5e5b90304f41348680a6f9ba7a0eb2de6f03658640f67ff15/index.js @@ -0,0 +1 @@ +"use strict";var c=Object.defineProperty;var R=Object.getOwnPropertyDescriptor;var i=Object.getOwnPropertyNames;var u=Object.prototype.hasOwnProperty;var T=(r,e)=>{for(var t in e)c(r,t,{get:e[t],enumerable:!0})},y=(r,e,t,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of i(e))!u.call(r,o)&&o!==t&&c(r,o,{get:()=>e[o],enumerable:!(s=R(e,o))||s.enumerable});return r};var p=r=>y(c({},"__esModule",{value:!0}),r);var f={};T(f,{handler:()=>m});module.exports=p(f);var n=require("@aws-sdk/client-route-53");async function m(r){let e=r.ResourceProperties;if(r.RequestType!=="Create")return;let t=new n.Route53,o=(await t.listResourceRecordSets({HostedZoneId:e.HostedZoneId,StartRecordName:e.RecordName,StartRecordType:e.RecordType})).ResourceRecordSets?.find(a=>a.Name===e.RecordName&&a.Type===e.RecordType);if(!o)return;let d=await t.changeResourceRecordSets({HostedZoneId:e.HostedZoneId,ChangeBatch:{Changes:[{Action:"DELETE",ResourceRecordSet:g({Name:o.Name,Type:o.Type,TTL:o.TTL,AliasTarget:o.AliasTarget,ResourceRecords:o.ResourceRecords})}]}});return await(0,n.waitUntilResourceRecordSetsChanged)({client:t,maxWaitTime:890},{Id:d?.ChangeInfo?.Id}),{PhysicalResourceId:`${o.Name}-${o.Type}`}}function g(r){let e={};for(let[t,s]of Object.entries(r))s&&(!Array.isArray(s)||s.length!==0)&&(e[t]=s);return e}0&&(module.exports={handler}); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.delete-existing-record-set.js.snapshot/asset.e0e799a729f2e647a95d0ba4e1b63e93839a8f3034bfcb17ba52ea561cafba19/index.js b/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.delete-existing-record-set.js.snapshot/asset.e0e799a729f2e647a95d0ba4e1b63e93839a8f3034bfcb17ba52ea561cafba19/index.js deleted file mode 100644 index 2b06a8b1e264c..0000000000000 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.delete-existing-record-set.js.snapshot/asset.e0e799a729f2e647a95d0ba4e1b63e93839a8f3034bfcb17ba52ea561cafba19/index.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";var c=Object.defineProperty;var i=Object.getOwnPropertyDescriptor;var R=Object.getOwnPropertyNames;var u=Object.prototype.hasOwnProperty;var T=(o,e)=>{for(var t in e)c(o,t,{get:e[t],enumerable:!0})},m=(o,e,t,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of R(e))!u.call(o,r)&&r!==t&&c(o,r,{get:()=>e[r],enumerable:!(s=i(e,r))||s.enumerable});return o};var y=o=>m(c({},"__esModule",{value:!0}),o);var f={};T(f,{handler:()=>p});module.exports=y(f);var n=require("@aws-sdk/client-route-53");async function p(o){let e=o.ResourceProperties;if(o.RequestType!=="Create")return;let t=new n.Route53,r=(await t.listResourceRecordSets({HostedZoneId:e.HostedZoneId,StartRecordName:e.RecordName,StartRecordType:e.RecordType})).ResourceRecordSets?.find(a=>a.Name===e.RecordName&&a.Type===e.RecordType);if(!r)return;let d=await t.changeResourceRecordSets({HostedZoneId:e.HostedZoneId,ChangeBatch:{Changes:[{Action:"DELETE",ResourceRecordSet:g({Name:r.Name,Type:r.Type,TTL:r.TTL,AliasTarget:r.AliasTarget,ResourceRecords:r.ResourceRecords})}]}});return await(0,n.waitUntilResourceRecordSetsChanged)({client:t,maxWaitTime:890},{Id:d?.ChangeInfo?.Id}),{PhysicalResourceId:`${r.Name}-${r.Type}`}}function g(o){let e={};for(let[t,s]of Object.entries(o))s&&(!Array.isArray(s)||s.length!==0)&&(e[t]=s);return e}0&&(module.exports={handler}); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.delete-existing-record-set.js.snapshot/cdk-route53-integ-delete-existing-record-set.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.delete-existing-record-set.js.snapshot/cdk-route53-integ-delete-existing-record-set.assets.json index 90713a61507c3..399a2fbe9e616 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.delete-existing-record-set.js.snapshot/cdk-route53-integ-delete-existing-record-set.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.delete-existing-record-set.js.snapshot/cdk-route53-integ-delete-existing-record-set.assets.json @@ -1,20 +1,20 @@ { - "version": "36.0.0", + "version": "38.0.1", "files": { - "e0e799a729f2e647a95d0ba4e1b63e93839a8f3034bfcb17ba52ea561cafba19": { + "782a34c2ce2f5bc5e5b90304f41348680a6f9ba7a0eb2de6f03658640f67ff15": { "source": { - "path": "asset.e0e799a729f2e647a95d0ba4e1b63e93839a8f3034bfcb17ba52ea561cafba19", + "path": "asset.782a34c2ce2f5bc5e5b90304f41348680a6f9ba7a0eb2de6f03658640f67ff15", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "e0e799a729f2e647a95d0ba4e1b63e93839a8f3034bfcb17ba52ea561cafba19.zip", + "objectKey": "782a34c2ce2f5bc5e5b90304f41348680a6f9ba7a0eb2de6f03658640f67ff15.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "6ecffa6038b5bc3f9355f75a284bd57390b5bbecf06b801a47933fc572a081b1": { + "d93b59e0a4526a43009ed8bbba643a91892d67d7145637612c1661561871ca69": { "source": { "path": "cdk-route53-integ-delete-existing-record-set.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "6ecffa6038b5bc3f9355f75a284bd57390b5bbecf06b801a47933fc572a081b1.json", + "objectKey": "d93b59e0a4526a43009ed8bbba643a91892d67d7145637612c1661561871ca69.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.delete-existing-record-set.js.snapshot/cdk-route53-integ-delete-existing-record-set.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.delete-existing-record-set.js.snapshot/cdk-route53-integ-delete-existing-record-set.template.json index cd08c4e9acd27..b9afb7f79b3ec 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.delete-existing-record-set.js.snapshot/cdk-route53-integ-delete-existing-record-set.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.delete-existing-record-set.js.snapshot/cdk-route53-integ-delete-existing-record-set.template.json @@ -151,7 +151,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "e0e799a729f2e647a95d0ba4e1b63e93839a8f3034bfcb17ba52ea561cafba19.zip" + "S3Key": "782a34c2ce2f5bc5e5b90304f41348680a6f9ba7a0eb2de6f03658640f67ff15.zip" }, "Timeout": 900, "MemorySize": 128, diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.delete-existing-record-set.js.snapshot/cdk.out b/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.delete-existing-record-set.js.snapshot/cdk.out index 1f0068d32659a..c6e612584e352 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.delete-existing-record-set.js.snapshot/cdk.out +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.delete-existing-record-set.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"36.0.0"} \ No newline at end of file +{"version":"38.0.1"} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.delete-existing-record-set.js.snapshot/integ.json b/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.delete-existing-record-set.js.snapshot/integ.json index 2a2e30c000360..01efa88c628a1 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.delete-existing-record-set.js.snapshot/integ.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.delete-existing-record-set.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "36.0.0", + "version": "38.0.1", "testCases": { "Rooute53DeleteExistingRecordSetInteg/DefaultTest": { "stacks": [ diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.delete-existing-record-set.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.delete-existing-record-set.js.snapshot/manifest.json index 1123e8b36f020..9110a86c09835 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.delete-existing-record-set.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.delete-existing-record-set.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "36.0.0", + "version": "38.0.1", "artifacts": { "cdk-route53-integ-delete-existing-record-set.assets": { "type": "cdk:asset-manifest", @@ -16,9 +16,10 @@ "templateFile": "cdk-route53-integ-delete-existing-record-set.template.json", "terminationProtection": false, "validateOnSynth": false, + "notificationArns": [], "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/6ecffa6038b5bc3f9355f75a284bd57390b5bbecf06b801a47933fc572a081b1.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/d93b59e0a4526a43009ed8bbba643a91892d67d7145637612c1661561871ca69.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -64,6 +65,12 @@ "data": "LatestNodeRuntimeMap" } ], + "/cdk-route53-integ-delete-existing-record-set/Custom::DeleteExistingRecordSetCustomResourceProvider": [ + { + "type": "aws:cdk:is-custom-resource-handler-customResourceProvider", + "data": true + } + ], "/cdk-route53-integ-delete-existing-record-set/Custom::DeleteExistingRecordSetCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", @@ -106,6 +113,7 @@ "templateFile": "Rooute53DeleteExistingRecordSetIntegDefaultTestDeployAssert62638412.template.json", "terminationProtection": false, "validateOnSynth": false, + "notificationArns": [], "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json", diff --git a/packages/@aws-cdk-testing/framework-integ/test/triggers/test/integ.triggers.js.snapshot/MyStack.assets.json b/packages/@aws-cdk-testing/framework-integ/test/triggers/test/integ.triggers.js.snapshot/MyStack.assets.json index 5d45ccbb2b00f..96c9c1671fd90 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/triggers/test/integ.triggers.js.snapshot/MyStack.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/triggers/test/integ.triggers.js.snapshot/MyStack.assets.json @@ -1,15 +1,15 @@ { - "version": "36.0.0", + "version": "38.0.1", "files": { - "ac5727a1b8e23c42dabba9ff5155c8fb26ae68568e083beac0908af8e70fc606": { + "6e5c0f63875937fea22d274138fc297c2a753e7516d437661017ee38ced6816c": { "source": { - "path": "asset.ac5727a1b8e23c42dabba9ff5155c8fb26ae68568e083beac0908af8e70fc606", + "path": "asset.6e5c0f63875937fea22d274138fc297c2a753e7516d437661017ee38ced6816c", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "ac5727a1b8e23c42dabba9ff5155c8fb26ae68568e083beac0908af8e70fc606.zip", + "objectKey": "6e5c0f63875937fea22d274138fc297c2a753e7516d437661017ee38ced6816c.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } @@ -27,7 +27,7 @@ } } }, - "ce264f57d80761f1f09f852c9e7ac4a647536bdd6e8875070887a405e2e9d3c4": { + "405096350538d9b2fd4362846aa7b97d1b919746d8755a37b122474e26ec33df": { "source": { "path": "MyStack.template.json", "packaging": "file" @@ -35,7 +35,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "ce264f57d80761f1f09f852c9e7ac4a647536bdd6e8875070887a405e2e9d3c4.json", + "objectKey": "405096350538d9b2fd4362846aa7b97d1b919746d8755a37b122474e26ec33df.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk-testing/framework-integ/test/triggers/test/integ.triggers.js.snapshot/MyStack.template.json b/packages/@aws-cdk-testing/framework-integ/test/triggers/test/integ.triggers.js.snapshot/MyStack.template.json index f6481b5006d88..946269bd379ff 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/triggers/test/integ.triggers.js.snapshot/MyStack.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/triggers/test/integ.triggers.js.snapshot/MyStack.template.json @@ -238,7 +238,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "ac5727a1b8e23c42dabba9ff5155c8fb26ae68568e083beac0908af8e70fc606.zip" + "S3Key": "6e5c0f63875937fea22d274138fc297c2a753e7516d437661017ee38ced6816c.zip" }, "Timeout": 900, "MemorySize": 128, diff --git a/packages/@aws-cdk-testing/framework-integ/test/triggers/test/integ.triggers.js.snapshot/TriggerTestDefaultTestDeployAssert61636546.assets.json b/packages/@aws-cdk-testing/framework-integ/test/triggers/test/integ.triggers.js.snapshot/TriggerTestDefaultTestDeployAssert61636546.assets.json index 59bbe90bcb2e7..d94f5fe36215e 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/triggers/test/integ.triggers.js.snapshot/TriggerTestDefaultTestDeployAssert61636546.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/triggers/test/integ.triggers.js.snapshot/TriggerTestDefaultTestDeployAssert61636546.assets.json @@ -1,20 +1,20 @@ { - "version": "36.0.0", + "version": "38.0.1", "files": { - "eafc02f6925151c95ac6a6ae81a3e36d4cf4e77db52eec8e467ce2a69454a41a": { + "332b43dd64df92147f3af7fe53689eb20106f7158d60d220b0b10b126035713b": { "source": { - "path": "asset.eafc02f6925151c95ac6a6ae81a3e36d4cf4e77db52eec8e467ce2a69454a41a.bundle", + "path": "asset.332b43dd64df92147f3af7fe53689eb20106f7158d60d220b0b10b126035713b.bundle", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "eafc02f6925151c95ac6a6ae81a3e36d4cf4e77db52eec8e467ce2a69454a41a.zip", + "objectKey": "332b43dd64df92147f3af7fe53689eb20106f7158d60d220b0b10b126035713b.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "beca986e0d699d3ab910f77655b15b9ed94483e459af80f1c4028d1a510111e6": { + "fe34876576f78090d8652805e3567a392266c4b5cdb1c80c49c6aba3334bc86f": { "source": { "path": "TriggerTestDefaultTestDeployAssert61636546.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "beca986e0d699d3ab910f77655b15b9ed94483e459af80f1c4028d1a510111e6.json", + "objectKey": "fe34876576f78090d8652805e3567a392266c4b5cdb1c80c49c6aba3334bc86f.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk-testing/framework-integ/test/triggers/test/integ.triggers.js.snapshot/TriggerTestDefaultTestDeployAssert61636546.template.json b/packages/@aws-cdk-testing/framework-integ/test/triggers/test/integ.triggers.js.snapshot/TriggerTestDefaultTestDeployAssert61636546.template.json index f9dc15a653b0b..4dff2f625c011 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/triggers/test/integ.triggers.js.snapshot/TriggerTestDefaultTestDeployAssert61636546.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/triggers/test/integ.triggers.js.snapshot/TriggerTestDefaultTestDeployAssert61636546.template.json @@ -35,7 +35,7 @@ "outputPaths": [ "Messages.0.Body" ], - "salt": "1720058861755" + "salt": "1728083660991" }, "UpdateReplacePolicy": "Delete", "DeletionPolicy": "Delete" @@ -223,7 +223,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "eafc02f6925151c95ac6a6ae81a3e36d4cf4e77db52eec8e467ce2a69454a41a.zip" + "S3Key": "332b43dd64df92147f3af7fe53689eb20106f7158d60d220b0b10b126035713b.zip" }, "Timeout": 120, "Handler": "index.handler", @@ -292,7 +292,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "eafc02f6925151c95ac6a6ae81a3e36d4cf4e77db52eec8e467ce2a69454a41a.zip" + "S3Key": "332b43dd64df92147f3af7fe53689eb20106f7158d60d220b0b10b126035713b.zip" }, "Timeout": 120, "Handler": "index.isComplete", @@ -342,7 +342,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "eafc02f6925151c95ac6a6ae81a3e36d4cf4e77db52eec8e467ce2a69454a41a.zip" + "S3Key": "332b43dd64df92147f3af7fe53689eb20106f7158d60d220b0b10b126035713b.zip" }, "Timeout": 120, "Handler": "index.onTimeout", diff --git a/packages/@aws-cdk-testing/framework-integ/test/triggers/test/integ.triggers.js.snapshot/asset.eafc02f6925151c95ac6a6ae81a3e36d4cf4e77db52eec8e467ce2a69454a41a.bundle/index.js b/packages/@aws-cdk-testing/framework-integ/test/triggers/test/integ.triggers.js.snapshot/asset.332b43dd64df92147f3af7fe53689eb20106f7158d60d220b0b10b126035713b.bundle/index.js similarity index 71% rename from packages/@aws-cdk-testing/framework-integ/test/triggers/test/integ.triggers.js.snapshot/asset.eafc02f6925151c95ac6a6ae81a3e36d4cf4e77db52eec8e467ce2a69454a41a.bundle/index.js rename to packages/@aws-cdk-testing/framework-integ/test/triggers/test/integ.triggers.js.snapshot/asset.332b43dd64df92147f3af7fe53689eb20106f7158d60d220b0b10b126035713b.bundle/index.js index b29fadc70c1e6..e398ebfb58b8c 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/triggers/test/integ.triggers.js.snapshot/asset.eafc02f6925151c95ac6a6ae81a3e36d4cf4e77db52eec8e467ce2a69454a41a.bundle/index.js +++ b/packages/@aws-cdk-testing/framework-integ/test/triggers/test/integ.triggers.js.snapshot/asset.332b43dd64df92147f3af7fe53689eb20106f7158d60d220b0b10b126035713b.bundle/index.js @@ -815,652 +815,154 @@ var require_helpers_internal = __commonJS({ } }); -// ../../../node_modules/tslib/tslib.es6.mjs -var tslib_es6_exports = {}; -__export(tslib_es6_exports, { - __addDisposableResource: () => __addDisposableResource, - __assign: () => __assign, - __asyncDelegator: () => __asyncDelegator, - __asyncGenerator: () => __asyncGenerator, - __asyncValues: () => __asyncValues, - __await: () => __await, - __awaiter: () => __awaiter, - __classPrivateFieldGet: () => __classPrivateFieldGet, - __classPrivateFieldIn: () => __classPrivateFieldIn, - __classPrivateFieldSet: () => __classPrivateFieldSet, - __createBinding: () => __createBinding, - __decorate: () => __decorate, - __disposeResources: () => __disposeResources, - __esDecorate: () => __esDecorate, - __exportStar: () => __exportStar, - __extends: () => __extends, - __generator: () => __generator, - __importDefault: () => __importDefault, - __importStar: () => __importStar, - __makeTemplateObject: () => __makeTemplateObject, - __metadata: () => __metadata, - __param: () => __param, - __propKey: () => __propKey, - __read: () => __read, - __rest: () => __rest, - __runInitializers: () => __runInitializers, - __setFunctionName: () => __setFunctionName, - __spread: () => __spread, - __spreadArray: () => __spreadArray, - __spreadArrays: () => __spreadArrays, - __values: () => __values, - default: () => tslib_es6_default -}); -function __extends(d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { - this.constructor = d; - } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -} -function __rest(s, e) { - var t = {}; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) - t[p] = s[p]; - if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) - t[p[i]] = s[p[i]]; - } - return t; -} -function __decorate(decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -} -function __param(paramIndex, decorator) { - return function(target, key) { - decorator(target, key, paramIndex); - }; -} -function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) { - function accept(f) { - if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); - return f; - } - var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value"; - var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null; - var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {}); - var _, done = false; - for (var i = decorators.length - 1; i >= 0; i--) { - var context = {}; - for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p]; - for (var p in contextIn.access) context.access[p] = contextIn.access[p]; - context.addInitializer = function(f) { - if (done) throw new TypeError("Cannot add initializers after decoration has completed"); - extraInitializers.push(accept(f || null)); +// ../../../node_modules/@smithy/types/dist-cjs/index.js +var require_dist_cjs = __commonJS({ + "../../../node_modules/@smithy/types/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all) => { + for (var name in all) + __defProp2(target, name, { get: all[name], enumerable: true }); }; - var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context); - if (kind === "accessor") { - if (result === void 0) continue; - if (result === null || typeof result !== "object") throw new TypeError("Object expected"); - if (_ = accept(result.get)) descriptor.get = _; - if (_ = accept(result.set)) descriptor.set = _; - if (_ = accept(result.init)) initializers.unshift(_); - } else if (_ = accept(result)) { - if (kind === "field") initializers.unshift(_); - else descriptor[key] = _; - } - } - if (target) Object.defineProperty(target, contextIn.name, descriptor); - done = true; -} -function __runInitializers(thisArg, initializers, value) { - var useValue = arguments.length > 2; - for (var i = 0; i < initializers.length; i++) { - value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg); - } - return useValue ? value : void 0; -} -function __propKey(x) { - return typeof x === "symbol" ? x : "".concat(x); -} -function __setFunctionName(f, name, prefix) { - if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : ""; - return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name }); -} -function __metadata(metadataKey, metadataValue) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); -} -function __awaiter(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve) { - resolve(value); + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + AlgorithmId: () => AlgorithmId, + EndpointURLScheme: () => EndpointURLScheme, + FieldPosition: () => FieldPosition, + HttpApiKeyAuthLocation: () => HttpApiKeyAuthLocation2, + HttpAuthLocation: () => HttpAuthLocation, + IniSectionType: () => IniSectionType, + RequestHandlerProtocol: () => RequestHandlerProtocol, + SMITHY_CONTEXT_KEY: () => SMITHY_CONTEXT_KEY4, + getDefaultClientConfiguration: () => getDefaultClientConfiguration, + resolveDefaultRuntimeConfig: () => resolveDefaultRuntimeConfig }); - } - return new (P || (P = Promise))(function(resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); + module2.exports = __toCommonJS2(src_exports); + var HttpAuthLocation = /* @__PURE__ */ ((HttpAuthLocation2) => { + HttpAuthLocation2["HEADER"] = "header"; + HttpAuthLocation2["QUERY"] = "query"; + return HttpAuthLocation2; + })(HttpAuthLocation || {}); + var HttpApiKeyAuthLocation2 = /* @__PURE__ */ ((HttpApiKeyAuthLocation22) => { + HttpApiKeyAuthLocation22["HEADER"] = "header"; + HttpApiKeyAuthLocation22["QUERY"] = "query"; + return HttpApiKeyAuthLocation22; + })(HttpApiKeyAuthLocation2 || {}); + var EndpointURLScheme = /* @__PURE__ */ ((EndpointURLScheme2) => { + EndpointURLScheme2["HTTP"] = "http"; + EndpointURLScheme2["HTTPS"] = "https"; + return EndpointURLScheme2; + })(EndpointURLScheme || {}); + var AlgorithmId = /* @__PURE__ */ ((AlgorithmId2) => { + AlgorithmId2["MD5"] = "md5"; + AlgorithmId2["CRC32"] = "crc32"; + AlgorithmId2["CRC32C"] = "crc32c"; + AlgorithmId2["SHA1"] = "sha1"; + AlgorithmId2["SHA256"] = "sha256"; + return AlgorithmId2; + })(AlgorithmId || {}); + var getChecksumConfiguration = /* @__PURE__ */ __name((runtimeConfig) => { + const checksumAlgorithms = []; + if (runtimeConfig.sha256 !== void 0) { + checksumAlgorithms.push({ + algorithmId: () => "sha256", + checksumConstructor: () => runtimeConfig.sha256 + }); } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); + if (runtimeConfig.md5 != void 0) { + checksumAlgorithms.push({ + algorithmId: () => "md5", + checksumConstructor: () => runtimeConfig.md5 + }); } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -} -function __generator(thisArg, body) { - var _ = { label: 0, sent: function() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { - return this; - }), g; - function verb(n) { - return function(v) { - return step([n, v]); - }; + return { + _checksumAlgorithms: checksumAlgorithms, + addChecksumAlgorithm(algo) { + this._checksumAlgorithms.push(algo); + }, + checksumAlgorithms() { + return this._checksumAlgorithms; + } + }; + }, "getChecksumConfiguration"); + var resolveChecksumRuntimeConfig = /* @__PURE__ */ __name((clientConfig) => { + const runtimeConfig = {}; + clientConfig.checksumAlgorithms().forEach((checksumAlgorithm) => { + runtimeConfig[checksumAlgorithm.algorithmId()] = checksumAlgorithm.checksumConstructor(); + }); + return runtimeConfig; + }, "resolveChecksumRuntimeConfig"); + var getDefaultClientConfiguration = /* @__PURE__ */ __name((runtimeConfig) => { + return { + ...getChecksumConfiguration(runtimeConfig) + }; + }, "getDefaultClientConfiguration"); + var resolveDefaultRuntimeConfig = /* @__PURE__ */ __name((config) => { + return { + ...resolveChecksumRuntimeConfig(config) + }; + }, "resolveDefaultRuntimeConfig"); + var FieldPosition = /* @__PURE__ */ ((FieldPosition2) => { + FieldPosition2[FieldPosition2["HEADER"] = 0] = "HEADER"; + FieldPosition2[FieldPosition2["TRAILER"] = 1] = "TRAILER"; + return FieldPosition2; + })(FieldPosition || {}); + var SMITHY_CONTEXT_KEY4 = "__smithy_context"; + var IniSectionType = /* @__PURE__ */ ((IniSectionType2) => { + IniSectionType2["PROFILE"] = "profile"; + IniSectionType2["SSO_SESSION"] = "sso-session"; + IniSectionType2["SERVICES"] = "services"; + return IniSectionType2; + })(IniSectionType || {}); + var RequestHandlerProtocol = /* @__PURE__ */ ((RequestHandlerProtocol2) => { + RequestHandlerProtocol2["HTTP_0_9"] = "http/0.9"; + RequestHandlerProtocol2["HTTP_1_0"] = "http/1.0"; + RequestHandlerProtocol2["TDS_8_0"] = "tds/8.0"; + return RequestHandlerProtocol2; + })(RequestHandlerProtocol || {}); } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (g && (g = 0, op[0] && (_ = 0)), _) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: - case 1: - t = op; - break; - case 4: - _.label++; - return { value: op[1], done: false }; - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; - case 7: - op = _.ops.pop(); - _.trys.pop(); - continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } - if (t && _.label < t[2]) { - _.label = t[2]; - _.ops.push(op); - break; - } - if (t[2]) _.ops.pop(); - _.trys.pop(); - continue; - } - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - if (op[0] & 5) throw op[1]; - return { value: op[0] ? op[1] : void 0, done: true }; - } -} -function __exportStar(m, o) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); -} -function __values(o) { - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function() { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); -} -function __read(o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } catch (error) { - e = { error }; - } finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } finally { - if (e) throw e.error; - } - } - return ar; -} -function __spread() { - for (var ar = [], i = 0; i < arguments.length; i++) - ar = ar.concat(__read(arguments[i])); - return ar; -} -function __spreadArrays() { - for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; - for (var r = Array(s), k = 0, i = 0; i < il; i++) - for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) - r[k] = a[j]; - return r; -} -function __spreadArray(to, from, pack) { - if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { - if (ar || !(i in from)) { - if (!ar) ar = Array.prototype.slice.call(from, 0, i); - ar[i] = from[i]; - } - } - return to.concat(ar || Array.prototype.slice.call(from)); -} -function __await(v) { - return this instanceof __await ? (this.v = v, this) : new __await(v); -} -function __asyncGenerator(thisArg, _arguments, generator) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function() { - return this; - }, i; - function awaitReturn(f) { - return function(v) { - return Promise.resolve(v).then(f, reject); - }; - } - function verb(n, f) { - if (g[n]) { - i[n] = function(v) { - return new Promise(function(a, b) { - q.push([n, v, a, b]) > 1 || resume(n, v); - }); - }; - if (f) i[n] = f(i[n]); - } - } - function resume(n, v) { - try { - step(g[n](v)); - } catch (e) { - settle(q[0][3], e); - } - } - function step(r) { - r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); - } - function fulfill(value) { - resume("next", value); - } - function reject(value) { - resume("throw", value); - } - function settle(f, v) { - if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); - } -} -function __asyncDelegator(o) { - var i, p; - return i = {}, verb("next"), verb("throw", function(e) { - throw e; - }), verb("return"), i[Symbol.iterator] = function() { - return this; - }, i; - function verb(n, f) { - i[n] = o[n] ? function(v) { - return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; - } : f; - } -} -function __asyncValues(o) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var m = o[Symbol.asyncIterator], i; - return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { - return this; - }, i); - function verb(n) { - i[n] = o[n] && function(v) { - return new Promise(function(resolve, reject) { - v = o[n](v), settle(resolve, reject, v.done, v.value); - }); +}); + +// ../../../node_modules/@smithy/protocol-http/dist-cjs/index.js +var require_dist_cjs2 = __commonJS({ + "../../../node_modules/@smithy/protocol-http/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all) => { + for (var name in all) + __defProp2(target, name, { get: all[name], enumerable: true }); }; - } - function settle(resolve, reject, d, v) { - Promise.resolve(v).then(function(v2) { - resolve({ value: v2, done: d }); - }, reject); - } -} -function __makeTemplateObject(cooked, raw) { - if (Object.defineProperty) { - Object.defineProperty(cooked, "raw", { value: raw }); - } else { - cooked.raw = raw; - } - return cooked; -} -function __importStar(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - } - __setModuleDefault(result, mod); - return result; -} -function __importDefault(mod) { - return mod && mod.__esModule ? mod : { default: mod }; -} -function __classPrivateFieldGet(receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); -} -function __classPrivateFieldSet(receiver, state, value, kind, f) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value; -} -function __classPrivateFieldIn(state, receiver) { - if (receiver === null || typeof receiver !== "object" && typeof receiver !== "function") throw new TypeError("Cannot use 'in' operator on non-object"); - return typeof state === "function" ? receiver === state : state.has(receiver); -} -function __addDisposableResource(env, value, async) { - if (value !== null && value !== void 0) { - if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); - var dispose, inner; - if (async) { - if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); - dispose = value[Symbol.asyncDispose]; - } - if (dispose === void 0) { - if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); - dispose = value[Symbol.dispose]; - if (async) inner = dispose; - } - if (typeof dispose !== "function") throw new TypeError("Object not disposable."); - if (inner) dispose = function() { - try { - inner.call(this); - } catch (e) { - return Promise.reject(e); + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); } - }; - env.stack.push({ value, dispose, async }); - } else if (async) { - env.stack.push({ async: true }); - } - return value; -} -function __disposeResources(env) { - function fail(e) { - env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e; - env.hasError = true; - } - function next() { - while (env.stack.length) { - var rec = env.stack.pop(); - try { - var result = rec.dispose && rec.dispose.call(rec.value); - if (rec.async) return Promise.resolve(result).then(next, function(e) { - fail(e); - return next(); - }); - } catch (e) { - fail(e); - } - } - if (env.hasError) throw env.error; - } - return next(); -} -var extendStatics, __assign, __createBinding, __setModuleDefault, _SuppressedError, tslib_es6_default; -var init_tslib_es6 = __esm({ - "../../../node_modules/tslib/tslib.es6.mjs"() { - extendStatics = function(d, b) { - extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { - d2.__proto__ = b2; - } || function(d2, b2) { - for (var p in b2) if (Object.prototype.hasOwnProperty.call(b2, p)) d2[p] = b2[p]; - }; - return extendStatics(d, b); - }; - __assign = function() { - __assign = Object.assign || function __assign2(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); - }; - __createBinding = Object.create ? function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - } : function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - }; - __setModuleDefault = Object.create ? function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - } : function(o, v) { - o["default"] = v; - }; - _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function(error, suppressed, message) { - var e = new Error(message); - return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; - }; - tslib_es6_default = { - __extends, - __assign, - __rest, - __decorate, - __param, - __metadata, - __awaiter, - __generator, - __createBinding, - __exportStar, - __values, - __read, - __spread, - __spreadArrays, - __spreadArray, - __await, - __asyncGenerator, - __asyncDelegator, - __asyncValues, - __makeTemplateObject, - __importStar, - __importDefault, - __classPrivateFieldGet, - __classPrivateFieldSet, - __classPrivateFieldIn, - __addDisposableResource, - __disposeResources - }; - } -}); - -// ../../../node_modules/@smithy/types/dist-cjs/index.js -var require_dist_cjs = __commonJS({ - "../../../node_modules/@smithy/types/dist-cjs/index.js"(exports2, module2) { - var __defProp2 = Object.defineProperty; - var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; - var __getOwnPropNames2 = Object.getOwnPropertyNames; - var __hasOwnProp2 = Object.prototype.hasOwnProperty; - var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); - var __export2 = (target, all) => { - for (var name in all) - __defProp2(target, name, { get: all[name], enumerable: true }); - }; - var __copyProps2 = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames2(from)) - if (!__hasOwnProp2.call(to, key) && key !== except) - __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); - } - return to; - }; - var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); - var src_exports = {}; - __export2(src_exports, { - AlgorithmId: () => AlgorithmId, - EndpointURLScheme: () => EndpointURLScheme, - FieldPosition: () => FieldPosition, - HttpApiKeyAuthLocation: () => HttpApiKeyAuthLocation, - HttpAuthLocation: () => HttpAuthLocation, - IniSectionType: () => IniSectionType, - RequestHandlerProtocol: () => RequestHandlerProtocol, - SMITHY_CONTEXT_KEY: () => SMITHY_CONTEXT_KEY, - getDefaultClientConfiguration: () => getDefaultClientConfiguration, - resolveDefaultRuntimeConfig: () => resolveDefaultRuntimeConfig - }); - module2.exports = __toCommonJS2(src_exports); - var HttpAuthLocation = /* @__PURE__ */ ((HttpAuthLocation2) => { - HttpAuthLocation2["HEADER"] = "header"; - HttpAuthLocation2["QUERY"] = "query"; - return HttpAuthLocation2; - })(HttpAuthLocation || {}); - var HttpApiKeyAuthLocation = /* @__PURE__ */ ((HttpApiKeyAuthLocation2) => { - HttpApiKeyAuthLocation2["HEADER"] = "header"; - HttpApiKeyAuthLocation2["QUERY"] = "query"; - return HttpApiKeyAuthLocation2; - })(HttpApiKeyAuthLocation || {}); - var EndpointURLScheme = /* @__PURE__ */ ((EndpointURLScheme2) => { - EndpointURLScheme2["HTTP"] = "http"; - EndpointURLScheme2["HTTPS"] = "https"; - return EndpointURLScheme2; - })(EndpointURLScheme || {}); - var AlgorithmId = /* @__PURE__ */ ((AlgorithmId2) => { - AlgorithmId2["MD5"] = "md5"; - AlgorithmId2["CRC32"] = "crc32"; - AlgorithmId2["CRC32C"] = "crc32c"; - AlgorithmId2["SHA1"] = "sha1"; - AlgorithmId2["SHA256"] = "sha256"; - return AlgorithmId2; - })(AlgorithmId || {}); - var getChecksumConfiguration = /* @__PURE__ */ __name((runtimeConfig) => { - const checksumAlgorithms = []; - if (runtimeConfig.sha256 !== void 0) { - checksumAlgorithms.push({ - algorithmId: () => "sha256", - checksumConstructor: () => runtimeConfig.sha256 - }); - } - if (runtimeConfig.md5 != void 0) { - checksumAlgorithms.push({ - algorithmId: () => "md5", - checksumConstructor: () => runtimeConfig.md5 - }); - } - return { - _checksumAlgorithms: checksumAlgorithms, - addChecksumAlgorithm(algo) { - this._checksumAlgorithms.push(algo); - }, - checksumAlgorithms() { - return this._checksumAlgorithms; - } - }; - }, "getChecksumConfiguration"); - var resolveChecksumRuntimeConfig = /* @__PURE__ */ __name((clientConfig) => { - const runtimeConfig = {}; - clientConfig.checksumAlgorithms().forEach((checksumAlgorithm) => { - runtimeConfig[checksumAlgorithm.algorithmId()] = checksumAlgorithm.checksumConstructor(); - }); - return runtimeConfig; - }, "resolveChecksumRuntimeConfig"); - var getDefaultClientConfiguration = /* @__PURE__ */ __name((runtimeConfig) => { - return { - ...getChecksumConfiguration(runtimeConfig) - }; - }, "getDefaultClientConfiguration"); - var resolveDefaultRuntimeConfig = /* @__PURE__ */ __name((config) => { - return { - ...resolveChecksumRuntimeConfig(config) - }; - }, "resolveDefaultRuntimeConfig"); - var FieldPosition = /* @__PURE__ */ ((FieldPosition2) => { - FieldPosition2[FieldPosition2["HEADER"] = 0] = "HEADER"; - FieldPosition2[FieldPosition2["TRAILER"] = 1] = "TRAILER"; - return FieldPosition2; - })(FieldPosition || {}); - var SMITHY_CONTEXT_KEY = "__smithy_context"; - var IniSectionType = /* @__PURE__ */ ((IniSectionType2) => { - IniSectionType2["PROFILE"] = "profile"; - IniSectionType2["SSO_SESSION"] = "sso-session"; - IniSectionType2["SERVICES"] = "services"; - return IniSectionType2; - })(IniSectionType || {}); - var RequestHandlerProtocol = /* @__PURE__ */ ((RequestHandlerProtocol2) => { - RequestHandlerProtocol2["HTTP_0_9"] = "http/0.9"; - RequestHandlerProtocol2["HTTP_1_0"] = "http/1.0"; - RequestHandlerProtocol2["TDS_8_0"] = "tds/8.0"; - return RequestHandlerProtocol2; - })(RequestHandlerProtocol || {}); - } -}); - -// ../../../node_modules/@smithy/protocol-http/dist-cjs/index.js -var require_dist_cjs2 = __commonJS({ - "../../../node_modules/@smithy/protocol-http/dist-cjs/index.js"(exports2, module2) { - var __defProp2 = Object.defineProperty; - var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; - var __getOwnPropNames2 = Object.getOwnPropertyNames; - var __hasOwnProp2 = Object.prototype.hasOwnProperty; - var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); - var __export2 = (target, all) => { - for (var name in all) - __defProp2(target, name, { get: all[name], enumerable: true }); - }; - var __copyProps2 = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames2(from)) - if (!__hasOwnProp2.call(to, key) && key !== except) - __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); - } - return to; + return to; }; var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); var src_exports = {}; __export2(src_exports, { Field: () => Field, Fields: () => Fields, - HttpRequest: () => HttpRequest, - HttpResponse: () => HttpResponse, + HttpRequest: () => HttpRequest7, + HttpResponse: () => HttpResponse2, + IHttpRequest: () => import_types5.HttpRequest, getHttpHandlerExtensionConfiguration: () => getHttpHandlerExtensionConfiguration, isValidHostname: () => isValidHostname, resolveHttpHandlerRuntimeConfig: () => resolveHttpHandlerRuntimeConfig @@ -1488,9 +990,9 @@ var require_dist_cjs2 = __commonJS({ httpHandler: httpHandlerExtensionConfiguration.httpHandler() }; }, "resolveHttpHandlerRuntimeConfig"); - var import_types = require_dist_cjs(); + var import_types5 = require_dist_cjs(); var _Field = class _Field { - constructor({ name, kind = import_types.FieldPosition.HEADER, values = [] }) { + constructor({ name, kind = import_types5.FieldPosition.HEADER, values = [] }) { this.name = name; this.kind = kind; this.values = values; @@ -1599,24 +1101,44 @@ var require_dist_cjs2 = __commonJS({ this.password = options.password; this.fragment = options.fragment; } + /** + * Note: this does not deep-clone the body. + */ + static clone(request2) { + const cloned = new _HttpRequest2({ + ...request2, + headers: { ...request2.headers } + }); + if (cloned.query) { + cloned.query = cloneQuery(cloned.query); + } + return cloned; + } + /** + * This method only actually asserts that request is the interface {@link IHttpRequest}, + * and not necessarily this concrete class. Left in place for API stability. + * + * Do not call instance methods on the input of this function, and + * do not assume it has the HttpRequest prototype. + */ static isInstance(request2) { - if (!request2) + if (!request2) { return false; + } const req = request2; return "method" in req && "protocol" in req && "hostname" in req && "path" in req && typeof req["query"] === "object" && typeof req["headers"] === "object"; } + /** + * @deprecated use static HttpRequest.clone(request) instead. It's not safe to call + * this method because {@link HttpRequest.isInstance} incorrectly + * asserts that IHttpRequest (interface) objects are of type HttpRequest (class). + */ clone() { - const cloned = new _HttpRequest2({ - ...this, - headers: { ...this.headers } - }); - if (cloned.query) - cloned.query = cloneQuery(cloned.query); - return cloned; + return _HttpRequest2.clone(this); } }; __name(_HttpRequest, "HttpRequest"); - var HttpRequest = _HttpRequest; + var HttpRequest7 = _HttpRequest; function cloneQuery(query) { return Object.keys(query).reduce((carry, paramName) => { const param = query[paramName]; @@ -1642,7 +1164,7 @@ var require_dist_cjs2 = __commonJS({ } }; __name(_HttpResponse, "HttpResponse"); - var HttpResponse = _HttpResponse; + var HttpResponse2 = _HttpResponse; function isValidHostname(hostname) { const hostPattern = /^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/; return hostPattern.test(hostname); @@ -1653,64 +1175,109 @@ var require_dist_cjs2 = __commonJS({ // ../../../node_modules/@aws-sdk/middleware-host-header/dist-cjs/index.js var require_dist_cjs3 = __commonJS({ - "../../../node_modules/@aws-sdk/middleware-host-header/dist-cjs/index.js"(exports2) { + "../../../node_modules/@aws-sdk/middleware-host-header/dist-cjs/index.js"(exports2, module2) { "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getHostHeaderPlugin = exports2.hostHeaderMiddlewareOptions = exports2.hostHeaderMiddleware = exports2.resolveHostHeaderConfig = void 0; - var protocol_http_1 = require_dist_cjs2(); - function resolveHostHeaderConfig(input) { - return input; - } - exports2.resolveHostHeaderConfig = resolveHostHeaderConfig; - var hostHeaderMiddleware = (options) => (next) => async (args) => { - if (!protocol_http_1.HttpRequest.isInstance(args.request)) - return next(args); - const { request: request2 } = args; - const { handlerProtocol = "" } = options.requestHandler.metadata || {}; - if (handlerProtocol.indexOf("h2") >= 0 && !request2.headers[":authority"]) { - delete request2.headers["host"]; - request2.headers[":authority"] = ""; - } else if (!request2.headers["host"]) { - let host = request2.hostname; + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all) => { + for (var name in all) + __defProp2(target, name, { get: all[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + getHostHeaderPlugin: () => getHostHeaderPlugin, + hostHeaderMiddleware: () => hostHeaderMiddleware, + hostHeaderMiddlewareOptions: () => hostHeaderMiddlewareOptions, + resolveHostHeaderConfig: () => resolveHostHeaderConfig + }); + module2.exports = __toCommonJS2(src_exports); + var import_protocol_http8 = require_dist_cjs2(); + function resolveHostHeaderConfig(input) { + return input; + } + __name(resolveHostHeaderConfig, "resolveHostHeaderConfig"); + var hostHeaderMiddleware = /* @__PURE__ */ __name((options) => (next) => async (args) => { + if (!import_protocol_http8.HttpRequest.isInstance(args.request)) + return next(args); + const { request: request2 } = args; + const { handlerProtocol = "" } = options.requestHandler.metadata || {}; + if (handlerProtocol.indexOf("h2") >= 0 && !request2.headers[":authority"]) { + delete request2.headers["host"]; + request2.headers[":authority"] = request2.hostname + (request2.port ? ":" + request2.port : ""); + } else if (!request2.headers["host"]) { + let host = request2.hostname; if (request2.port != null) host += `:${request2.port}`; request2.headers["host"] = host; } return next(args); - }; - exports2.hostHeaderMiddleware = hostHeaderMiddleware; - exports2.hostHeaderMiddlewareOptions = { + }, "hostHeaderMiddleware"); + var hostHeaderMiddlewareOptions = { name: "hostHeaderMiddleware", step: "build", priority: "low", tags: ["HOST"], override: true }; - var getHostHeaderPlugin = (options) => ({ + var getHostHeaderPlugin = /* @__PURE__ */ __name((options) => ({ applyToStack: (clientStack) => { - clientStack.add((0, exports2.hostHeaderMiddleware)(options), exports2.hostHeaderMiddlewareOptions); + clientStack.add(hostHeaderMiddleware(options), hostHeaderMiddlewareOptions); } - }); - exports2.getHostHeaderPlugin = getHostHeaderPlugin; + }), "getHostHeaderPlugin"); } }); -// ../../../node_modules/@aws-sdk/middleware-logger/dist-cjs/loggerMiddleware.js -var require_loggerMiddleware = __commonJS({ - "../../../node_modules/@aws-sdk/middleware-logger/dist-cjs/loggerMiddleware.js"(exports2) { +// ../../../node_modules/@aws-sdk/middleware-logger/dist-cjs/index.js +var require_dist_cjs4 = __commonJS({ + "../../../node_modules/@aws-sdk/middleware-logger/dist-cjs/index.js"(exports2, module2) { "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getLoggerPlugin = exports2.loggerMiddlewareOptions = exports2.loggerMiddleware = void 0; - var loggerMiddleware = () => (next, context) => async (args) => { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all) => { + for (var name in all) + __defProp2(target, name, { get: all[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + getLoggerPlugin: () => getLoggerPlugin, + loggerMiddleware: () => loggerMiddleware, + loggerMiddlewareOptions: () => loggerMiddlewareOptions + }); + module2.exports = __toCommonJS2(src_exports); + var loggerMiddleware = /* @__PURE__ */ __name(() => (next, context) => async (args) => { var _a, _b; try { const response = await next(args); const { clientName, commandName, logger, dynamoDbDocumentClientOptions = {} } = context; const { overrideInputFilterSensitiveLog, overrideOutputFilterSensitiveLog } = dynamoDbDocumentClientOptions; - const inputFilterSensitiveLog = overrideInputFilterSensitiveLog !== null && overrideInputFilterSensitiveLog !== void 0 ? overrideInputFilterSensitiveLog : context.inputFilterSensitiveLog; - const outputFilterSensitiveLog = overrideOutputFilterSensitiveLog !== null && overrideOutputFilterSensitiveLog !== void 0 ? overrideOutputFilterSensitiveLog : context.outputFilterSensitiveLog; + const inputFilterSensitiveLog = overrideInputFilterSensitiveLog ?? context.inputFilterSensitiveLog; + const outputFilterSensitiveLog = overrideOutputFilterSensitiveLog ?? context.outputFilterSensitiveLog; const { $metadata, ...outputWithoutMetadata } = response.output; - (_a = logger === null || logger === void 0 ? void 0 : logger.info) === null || _a === void 0 ? void 0 : _a.call(logger, { + (_a = logger == null ? void 0 : logger.info) == null ? void 0 : _a.call(logger, { clientName, commandName, input: inputFilterSensitiveLog(args.input), @@ -1721,8 +1288,8 @@ var require_loggerMiddleware = __commonJS({ } catch (error) { const { clientName, commandName, logger, dynamoDbDocumentClientOptions = {} } = context; const { overrideInputFilterSensitiveLog } = dynamoDbDocumentClientOptions; - const inputFilterSensitiveLog = overrideInputFilterSensitiveLog !== null && overrideInputFilterSensitiveLog !== void 0 ? overrideInputFilterSensitiveLog : context.inputFilterSensitiveLog; - (_b = logger === null || logger === void 0 ? void 0 : logger.error) === null || _b === void 0 ? void 0 : _b.call(logger, { + const inputFilterSensitiveLog = overrideInputFilterSensitiveLog ?? context.inputFilterSensitiveLog; + (_b = logger == null ? void 0 : logger.error) == null ? void 0 : _b.call(logger, { clientName, commandName, input: inputFilterSensitiveLog(args.input), @@ -1731,51 +1298,62 @@ var require_loggerMiddleware = __commonJS({ }); throw error; } - }; - exports2.loggerMiddleware = loggerMiddleware; - exports2.loggerMiddlewareOptions = { + }, "loggerMiddleware"); + var loggerMiddlewareOptions = { name: "loggerMiddleware", tags: ["LOGGER"], step: "initialize", override: true }; - var getLoggerPlugin = (options) => ({ + var getLoggerPlugin = /* @__PURE__ */ __name((options) => ({ applyToStack: (clientStack) => { - clientStack.add((0, exports2.loggerMiddleware)(), exports2.loggerMiddlewareOptions); + clientStack.add(loggerMiddleware(), loggerMiddlewareOptions); } - }); - exports2.getLoggerPlugin = getLoggerPlugin; - } -}); - -// ../../../node_modules/@aws-sdk/middleware-logger/dist-cjs/index.js -var require_dist_cjs4 = __commonJS({ - "../../../node_modules/@aws-sdk/middleware-logger/dist-cjs/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); - tslib_1.__exportStar(require_loggerMiddleware(), exports2); + }), "getLoggerPlugin"); } }); // ../../../node_modules/@aws-sdk/middleware-recursion-detection/dist-cjs/index.js var require_dist_cjs5 = __commonJS({ - "../../../node_modules/@aws-sdk/middleware-recursion-detection/dist-cjs/index.js"(exports2) { + "../../../node_modules/@aws-sdk/middleware-recursion-detection/dist-cjs/index.js"(exports2, module2) { "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getRecursionDetectionPlugin = exports2.addRecursionDetectionMiddlewareOptions = exports2.recursionDetectionMiddleware = void 0; - var protocol_http_1 = require_dist_cjs2(); + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all) => { + for (var name in all) + __defProp2(target, name, { get: all[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + addRecursionDetectionMiddlewareOptions: () => addRecursionDetectionMiddlewareOptions, + getRecursionDetectionPlugin: () => getRecursionDetectionPlugin, + recursionDetectionMiddleware: () => recursionDetectionMiddleware + }); + module2.exports = __toCommonJS2(src_exports); + var import_protocol_http8 = require_dist_cjs2(); var TRACE_ID_HEADER_NAME = "X-Amzn-Trace-Id"; var ENV_LAMBDA_FUNCTION_NAME = "AWS_LAMBDA_FUNCTION_NAME"; var ENV_TRACE_ID = "_X_AMZN_TRACE_ID"; - var recursionDetectionMiddleware = (options) => (next) => async (args) => { + var recursionDetectionMiddleware = /* @__PURE__ */ __name((options) => (next) => async (args) => { const { request: request2 } = args; - if (!protocol_http_1.HttpRequest.isInstance(request2) || options.runtime !== "node" || request2.headers.hasOwnProperty(TRACE_ID_HEADER_NAME)) { + if (!import_protocol_http8.HttpRequest.isInstance(request2) || options.runtime !== "node" || request2.headers.hasOwnProperty(TRACE_ID_HEADER_NAME)) { return next(args); } const functionName = process.env[ENV_LAMBDA_FUNCTION_NAME]; const traceId = process.env[ENV_TRACE_ID]; - const nonEmptyString = (str) => typeof str === "string" && str.length > 0; + const nonEmptyString = /* @__PURE__ */ __name((str) => typeof str === "string" && str.length > 0, "nonEmptyString"); if (nonEmptyString(functionName) && nonEmptyString(traceId)) { request2.headers[TRACE_ID_HEADER_NAME] = traceId; } @@ -1783,27 +1361,25 @@ var require_dist_cjs5 = __commonJS({ ...args, request: request2 }); - }; - exports2.recursionDetectionMiddleware = recursionDetectionMiddleware; - exports2.addRecursionDetectionMiddlewareOptions = { + }, "recursionDetectionMiddleware"); + var addRecursionDetectionMiddlewareOptions = { step: "build", tags: ["RECURSION_DETECTION"], name: "recursionDetectionMiddleware", override: true, priority: "low" }; - var getRecursionDetectionPlugin = (options) => ({ + var getRecursionDetectionPlugin = /* @__PURE__ */ __name((options) => ({ applyToStack: (clientStack) => { - clientStack.add((0, exports2.recursionDetectionMiddleware)(options), exports2.addRecursionDetectionMiddlewareOptions); + clientStack.add(recursionDetectionMiddleware(options), addRecursionDetectionMiddlewareOptions); } - }); - exports2.getRecursionDetectionPlugin = getRecursionDetectionPlugin; + }), "getRecursionDetectionPlugin"); } }); -// ../../../node_modules/@smithy/property-provider/dist-cjs/index.js +// ../../../node_modules/@smithy/util-endpoints/dist-cjs/index.js var require_dist_cjs6 = __commonJS({ - "../../../node_modules/@smithy/property-provider/dist-cjs/index.js"(exports2, module2) { + "../../../node_modules/@smithy/util-endpoints/dist-cjs/index.js"(exports2, module2) { var __defProp2 = Object.defineProperty; var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; var __getOwnPropNames2 = Object.getOwnPropertyNames; @@ -1824,185 +1400,462 @@ var require_dist_cjs6 = __commonJS({ var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); var src_exports = {}; __export2(src_exports, { - CredentialsProviderError: () => CredentialsProviderError, - ProviderError: () => ProviderError, - TokenProviderError: () => TokenProviderError, - chain: () => chain, - fromStatic: () => fromStatic, - memoize: () => memoize + EndpointCache: () => EndpointCache, + EndpointError: () => EndpointError2, + customEndpointFunctions: () => customEndpointFunctions, + isIpAddress: () => isIpAddress2, + isValidHostLabel: () => isValidHostLabel, + resolveEndpoint: () => resolveEndpoint2 }); module2.exports = __toCommonJS2(src_exports); - var _ProviderError = class _ProviderError2 extends Error { - constructor(message, tryNextLink = true) { - super(message); - this.tryNextLink = tryNextLink; - this.name = "ProviderError"; - Object.setPrototypeOf(this, _ProviderError2.prototype); + var _EndpointCache = class _EndpointCache { + /** + * @param [size] - desired average maximum capacity. A buffer of 10 additional keys will be allowed + * before keys are dropped. + * @param [params] - list of params to consider as part of the cache key. + * + * If the params list is not populated, no caching will happen. + * This may be out of order depending on how the object is created and arrives to this class. + */ + constructor({ size, params }) { + this.data = /* @__PURE__ */ new Map(); + this.parameters = []; + this.capacity = size ?? 50; + if (params) { + this.parameters = params; + } } - static from(error, tryNextLink = true) { - return Object.assign(new this(error.message, tryNextLink), error); + /** + * @param endpointParams - query for endpoint. + * @param resolver - provider of the value if not present. + * @returns endpoint corresponding to the query. + */ + get(endpointParams, resolver) { + const key = this.hash(endpointParams); + if (key === false) { + return resolver(); + } + if (!this.data.has(key)) { + if (this.data.size > this.capacity + 10) { + const keys = this.data.keys(); + let i = 0; + while (true) { + const { value, done } = keys.next(); + this.data.delete(value); + if (done || ++i > 10) { + break; + } + } + } + this.data.set(key, resolver()); + } + return this.data.get(key); } - }; - __name(_ProviderError, "ProviderError"); - var ProviderError = _ProviderError; - var _CredentialsProviderError = class _CredentialsProviderError2 extends ProviderError { - constructor(message, tryNextLink = true) { - super(message, tryNextLink); - this.tryNextLink = tryNextLink; - this.name = "CredentialsProviderError"; - Object.setPrototypeOf(this, _CredentialsProviderError2.prototype); + size() { + return this.data.size; } - }; - __name(_CredentialsProviderError, "CredentialsProviderError"); - var CredentialsProviderError = _CredentialsProviderError; - var _TokenProviderError = class _TokenProviderError2 extends ProviderError { - constructor(message, tryNextLink = true) { - super(message, tryNextLink); - this.tryNextLink = tryNextLink; - this.name = "TokenProviderError"; - Object.setPrototypeOf(this, _TokenProviderError2.prototype); + /** + * @returns cache key or false if not cachable. + */ + hash(endpointParams) { + let buffer = ""; + const { parameters } = this; + if (parameters.length === 0) { + return false; + } + for (const param of parameters) { + const val2 = String(endpointParams[param] ?? ""); + if (val2.includes("|;")) { + return false; + } + buffer += val2 + "|;"; + } + return buffer; } }; - __name(_TokenProviderError, "TokenProviderError"); - var TokenProviderError = _TokenProviderError; - var chain = /* @__PURE__ */ __name((...providers) => async () => { - if (providers.length === 0) { - throw new ProviderError("No providers in chain"); + __name(_EndpointCache, "EndpointCache"); + var EndpointCache = _EndpointCache; + var IP_V4_REGEX = new RegExp( + `^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}$` + ); + var isIpAddress2 = /* @__PURE__ */ __name((value) => IP_V4_REGEX.test(value) || value.startsWith("[") && value.endsWith("]"), "isIpAddress"); + var VALID_HOST_LABEL_REGEX = new RegExp(`^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$`); + var isValidHostLabel = /* @__PURE__ */ __name((value, allowSubDomains = false) => { + if (!allowSubDomains) { + return VALID_HOST_LABEL_REGEX.test(value); } - let lastProviderError; - for (const provider of providers) { - try { - const credentials = await provider(); - return credentials; - } catch (err) { - lastProviderError = err; - if (err == null ? void 0 : err.tryNextLink) { - continue; - } - throw err; + const labels = value.split("."); + for (const label of labels) { + if (!isValidHostLabel(label)) { + return false; } } - throw lastProviderError; - }, "chain"); - var fromStatic = /* @__PURE__ */ __name((staticValue) => () => Promise.resolve(staticValue), "fromStatic"); - var memoize = /* @__PURE__ */ __name((provider, isExpired, requiresRefresh) => { - let resolved; - let pending; - let hasResult; - let isConstant = false; - const coalesceProvider = /* @__PURE__ */ __name(async () => { - if (!pending) { - pending = provider(); + return true; + }, "isValidHostLabel"); + var customEndpointFunctions = {}; + var debugId = "endpoints"; + function toDebugString(input) { + if (typeof input !== "object" || input == null) { + return input; + } + if ("ref" in input) { + return `$${toDebugString(input.ref)}`; + } + if ("fn" in input) { + return `${input.fn}(${(input.argv || []).map(toDebugString).join(", ")})`; + } + return JSON.stringify(input, null, 2); + } + __name(toDebugString, "toDebugString"); + var _EndpointError = class _EndpointError extends Error { + constructor(message) { + super(message); + this.name = "EndpointError"; + } + }; + __name(_EndpointError, "EndpointError"); + var EndpointError2 = _EndpointError; + var booleanEquals = /* @__PURE__ */ __name((value1, value2) => value1 === value2, "booleanEquals"); + var getAttrPathList = /* @__PURE__ */ __name((path) => { + const parts = path.split("."); + const pathList = []; + for (const part of parts) { + const squareBracketIndex = part.indexOf("["); + if (squareBracketIndex !== -1) { + if (part.indexOf("]") !== part.length - 1) { + throw new EndpointError2(`Path: '${path}' does not end with ']'`); + } + const arrayIndex = part.slice(squareBracketIndex + 1, -1); + if (Number.isNaN(parseInt(arrayIndex))) { + throw new EndpointError2(`Invalid array index: '${arrayIndex}' in path: '${path}'`); + } + if (squareBracketIndex !== 0) { + pathList.push(part.slice(0, squareBracketIndex)); + } + pathList.push(arrayIndex); + } else { + pathList.push(part); } + } + return pathList; + }, "getAttrPathList"); + var getAttr = /* @__PURE__ */ __name((value, path) => getAttrPathList(path).reduce((acc, index) => { + if (typeof acc !== "object") { + throw new EndpointError2(`Index '${index}' in '${path}' not found in '${JSON.stringify(value)}'`); + } else if (Array.isArray(acc)) { + return acc[parseInt(index)]; + } + return acc[index]; + }, value), "getAttr"); + var isSet = /* @__PURE__ */ __name((value) => value != null, "isSet"); + var not = /* @__PURE__ */ __name((value) => !value, "not"); + var import_types32 = require_dist_cjs(); + var DEFAULT_PORTS = { + [import_types32.EndpointURLScheme.HTTP]: 80, + [import_types32.EndpointURLScheme.HTTPS]: 443 + }; + var parseURL = /* @__PURE__ */ __name((value) => { + const whatwgURL = (() => { try { - resolved = await pending; - hasResult = true; - isConstant = false; - } finally { - pending = void 0; - } - return resolved; - }, "coalesceProvider"); - if (isExpired === void 0) { - return async (options) => { - if (!hasResult || (options == null ? void 0 : options.forceRefresh)) { - resolved = await coalesceProvider(); + if (value instanceof URL) { + return value; } - return resolved; - }; - } - return async (options) => { - if (!hasResult || (options == null ? void 0 : options.forceRefresh)) { - resolved = await coalesceProvider(); - } - if (isConstant) { - return resolved; - } - if (requiresRefresh && !requiresRefresh(resolved)) { - isConstant = true; - return resolved; + if (typeof value === "object" && "hostname" in value) { + const { hostname: hostname2, port, protocol: protocol2 = "", path = "", query = {} } = value; + const url2 = new URL(`${protocol2}//${hostname2}${port ? `:${port}` : ""}${path}`); + url2.search = Object.entries(query).map(([k, v]) => `${k}=${v}`).join("&"); + return url2; + } + return new URL(value); + } catch (error) { + return null; } - if (isExpired(resolved)) { - await coalesceProvider(); - return resolved; + })(); + if (!whatwgURL) { + console.error(`Unable to parse ${JSON.stringify(value)} as a whatwg URL.`); + return null; + } + const urlString = whatwgURL.href; + const { host, hostname, pathname, protocol, search } = whatwgURL; + if (search) { + return null; + } + const scheme = protocol.slice(0, -1); + if (!Object.values(import_types32.EndpointURLScheme).includes(scheme)) { + return null; + } + const isIp = isIpAddress2(hostname); + const inputContainsDefaultPort = urlString.includes(`${host}:${DEFAULT_PORTS[scheme]}`) || typeof value === "string" && value.includes(`${host}:${DEFAULT_PORTS[scheme]}`); + const authority = `${host}${inputContainsDefaultPort ? `:${DEFAULT_PORTS[scheme]}` : ``}`; + return { + scheme, + authority, + path: pathname, + normalizedPath: pathname.endsWith("/") ? pathname : `${pathname}/`, + isIp + }; + }, "parseURL"); + var stringEquals = /* @__PURE__ */ __name((value1, value2) => value1 === value2, "stringEquals"); + var substring = /* @__PURE__ */ __name((input, start, stop, reverse) => { + if (start >= stop || input.length < stop) { + return null; + } + if (!reverse) { + return input.substring(start, stop); + } + return input.substring(input.length - stop, input.length - start); + }, "substring"); + var uriEncode = /* @__PURE__ */ __name((value) => encodeURIComponent(value).replace(/[!*'()]/g, (c) => `%${c.charCodeAt(0).toString(16).toUpperCase()}`), "uriEncode"); + var endpointFunctions = { + booleanEquals, + getAttr, + isSet, + isValidHostLabel, + not, + parseURL, + stringEquals, + substring, + uriEncode + }; + var evaluateTemplate = /* @__PURE__ */ __name((template, options) => { + const evaluatedTemplateArr = []; + const templateContext = { + ...options.endpointParams, + ...options.referenceRecord + }; + let currentIndex = 0; + while (currentIndex < template.length) { + const openingBraceIndex = template.indexOf("{", currentIndex); + if (openingBraceIndex === -1) { + evaluatedTemplateArr.push(template.slice(currentIndex)); + break; } - return resolved; + evaluatedTemplateArr.push(template.slice(currentIndex, openingBraceIndex)); + const closingBraceIndex = template.indexOf("}", openingBraceIndex); + if (closingBraceIndex === -1) { + evaluatedTemplateArr.push(template.slice(openingBraceIndex)); + break; + } + if (template[openingBraceIndex + 1] === "{" && template[closingBraceIndex + 1] === "}") { + evaluatedTemplateArr.push(template.slice(openingBraceIndex + 1, closingBraceIndex)); + currentIndex = closingBraceIndex + 2; + } + const parameterName = template.substring(openingBraceIndex + 1, closingBraceIndex); + if (parameterName.includes("#")) { + const [refName, attrName] = parameterName.split("#"); + evaluatedTemplateArr.push(getAttr(templateContext[refName], attrName)); + } else { + evaluatedTemplateArr.push(templateContext[parameterName]); + } + currentIndex = closingBraceIndex + 1; + } + return evaluatedTemplateArr.join(""); + }, "evaluateTemplate"); + var getReferenceValue = /* @__PURE__ */ __name(({ ref }, options) => { + const referenceRecord = { + ...options.endpointParams, + ...options.referenceRecord }; - }, "memoize"); - } -}); - -// ../../../node_modules/@smithy/util-middleware/dist-cjs/index.js -var require_dist_cjs7 = __commonJS({ - "../../../node_modules/@smithy/util-middleware/dist-cjs/index.js"(exports2, module2) { - var __defProp2 = Object.defineProperty; - var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; - var __getOwnPropNames2 = Object.getOwnPropertyNames; - var __hasOwnProp2 = Object.prototype.hasOwnProperty; - var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); - var __export2 = (target, all) => { - for (var name in all) - __defProp2(target, name, { get: all[name], enumerable: true }); - }; - var __copyProps2 = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames2(from)) - if (!__hasOwnProp2.call(to, key) && key !== except) - __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + return referenceRecord[ref]; + }, "getReferenceValue"); + var evaluateExpression = /* @__PURE__ */ __name((obj, keyName, options) => { + if (typeof obj === "string") { + return evaluateTemplate(obj, options); + } else if (obj["fn"]) { + return callFunction(obj, options); + } else if (obj["ref"]) { + return getReferenceValue(obj, options); } - return to; - }; - var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); - var src_exports = {}; - __export2(src_exports, { - getSmithyContext: () => getSmithyContext, - normalizeProvider: () => normalizeProvider - }); - module2.exports = __toCommonJS2(src_exports); - var import_types = require_dist_cjs(); - var getSmithyContext = /* @__PURE__ */ __name((context) => context[import_types.SMITHY_CONTEXT_KEY] || (context[import_types.SMITHY_CONTEXT_KEY] = {}), "getSmithyContext"); - var normalizeProvider = /* @__PURE__ */ __name((input) => { - if (typeof input === "function") - return input; - const promisified = Promise.resolve(input); - return () => promisified; - }, "normalizeProvider"); - } -}); - -// ../../../node_modules/@smithy/is-array-buffer/dist-cjs/index.js -var require_dist_cjs8 = __commonJS({ - "../../../node_modules/@smithy/is-array-buffer/dist-cjs/index.js"(exports2, module2) { - var __defProp2 = Object.defineProperty; - var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; - var __getOwnPropNames2 = Object.getOwnPropertyNames; - var __hasOwnProp2 = Object.prototype.hasOwnProperty; - var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); - var __export2 = (target, all) => { - for (var name in all) - __defProp2(target, name, { get: all[name], enumerable: true }); - }; - var __copyProps2 = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames2(from)) - if (!__hasOwnProp2.call(to, key) && key !== except) - __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + throw new EndpointError2(`'${keyName}': ${String(obj)} is not a string, function or reference.`); + }, "evaluateExpression"); + var callFunction = /* @__PURE__ */ __name(({ fn, argv }, options) => { + const evaluatedArgs = argv.map( + (arg) => ["boolean", "number"].includes(typeof arg) ? arg : evaluateExpression(arg, "arg", options) + ); + const fnSegments = fn.split("."); + if (fnSegments[0] in customEndpointFunctions && fnSegments[1] != null) { + return customEndpointFunctions[fnSegments[0]][fnSegments[1]](...evaluatedArgs); } - return to; - }; - var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); - var src_exports = {}; - __export2(src_exports, { - isArrayBuffer: () => isArrayBuffer - }); - module2.exports = __toCommonJS2(src_exports); - var isArrayBuffer = /* @__PURE__ */ __name((arg) => typeof ArrayBuffer === "function" && arg instanceof ArrayBuffer || Object.prototype.toString.call(arg) === "[object ArrayBuffer]", "isArrayBuffer"); + return endpointFunctions[fn](...evaluatedArgs); + }, "callFunction"); + var evaluateCondition = /* @__PURE__ */ __name(({ assign, ...fnArgs }, options) => { + var _a, _b; + if (assign && assign in options.referenceRecord) { + throw new EndpointError2(`'${assign}' is already defined in Reference Record.`); + } + const value = callFunction(fnArgs, options); + (_b = (_a = options.logger) == null ? void 0 : _a.debug) == null ? void 0 : _b.call(_a, `${debugId} evaluateCondition: ${toDebugString(fnArgs)} = ${toDebugString(value)}`); + return { + result: value === "" ? true : !!value, + ...assign != null && { toAssign: { name: assign, value } } + }; + }, "evaluateCondition"); + var evaluateConditions = /* @__PURE__ */ __name((conditions = [], options) => { + var _a, _b; + const conditionsReferenceRecord = {}; + for (const condition of conditions) { + const { result, toAssign } = evaluateCondition(condition, { + ...options, + referenceRecord: { + ...options.referenceRecord, + ...conditionsReferenceRecord + } + }); + if (!result) { + return { result }; + } + if (toAssign) { + conditionsReferenceRecord[toAssign.name] = toAssign.value; + (_b = (_a = options.logger) == null ? void 0 : _a.debug) == null ? void 0 : _b.call(_a, `${debugId} assign: ${toAssign.name} := ${toDebugString(toAssign.value)}`); + } + } + return { result: true, referenceRecord: conditionsReferenceRecord }; + }, "evaluateConditions"); + var getEndpointHeaders = /* @__PURE__ */ __name((headers, options) => Object.entries(headers).reduce( + (acc, [headerKey, headerVal]) => ({ + ...acc, + [headerKey]: headerVal.map((headerValEntry) => { + const processedExpr = evaluateExpression(headerValEntry, "Header value entry", options); + if (typeof processedExpr !== "string") { + throw new EndpointError2(`Header '${headerKey}' value '${processedExpr}' is not a string`); + } + return processedExpr; + }) + }), + {} + ), "getEndpointHeaders"); + var getEndpointProperty = /* @__PURE__ */ __name((property, options) => { + if (Array.isArray(property)) { + return property.map((propertyEntry) => getEndpointProperty(propertyEntry, options)); + } + switch (typeof property) { + case "string": + return evaluateTemplate(property, options); + case "object": + if (property === null) { + throw new EndpointError2(`Unexpected endpoint property: ${property}`); + } + return getEndpointProperties(property, options); + case "boolean": + return property; + default: + throw new EndpointError2(`Unexpected endpoint property type: ${typeof property}`); + } + }, "getEndpointProperty"); + var getEndpointProperties = /* @__PURE__ */ __name((properties, options) => Object.entries(properties).reduce( + (acc, [propertyKey, propertyVal]) => ({ + ...acc, + [propertyKey]: getEndpointProperty(propertyVal, options) + }), + {} + ), "getEndpointProperties"); + var getEndpointUrl = /* @__PURE__ */ __name((endpointUrl, options) => { + const expression = evaluateExpression(endpointUrl, "Endpoint URL", options); + if (typeof expression === "string") { + try { + return new URL(expression); + } catch (error) { + console.error(`Failed to construct URL with ${expression}`, error); + throw error; + } + } + throw new EndpointError2(`Endpoint URL must be a string, got ${typeof expression}`); + }, "getEndpointUrl"); + var evaluateEndpointRule = /* @__PURE__ */ __name((endpointRule, options) => { + var _a, _b; + const { conditions, endpoint } = endpointRule; + const { result, referenceRecord } = evaluateConditions(conditions, options); + if (!result) { + return; + } + const endpointRuleOptions = { + ...options, + referenceRecord: { ...options.referenceRecord, ...referenceRecord } + }; + const { url: url2, properties, headers } = endpoint; + (_b = (_a = options.logger) == null ? void 0 : _a.debug) == null ? void 0 : _b.call(_a, `${debugId} Resolving endpoint from template: ${toDebugString(endpoint)}`); + return { + ...headers != void 0 && { + headers: getEndpointHeaders(headers, endpointRuleOptions) + }, + ...properties != void 0 && { + properties: getEndpointProperties(properties, endpointRuleOptions) + }, + url: getEndpointUrl(url2, endpointRuleOptions) + }; + }, "evaluateEndpointRule"); + var evaluateErrorRule = /* @__PURE__ */ __name((errorRule, options) => { + const { conditions, error } = errorRule; + const { result, referenceRecord } = evaluateConditions(conditions, options); + if (!result) { + return; + } + throw new EndpointError2( + evaluateExpression(error, "Error", { + ...options, + referenceRecord: { ...options.referenceRecord, ...referenceRecord } + }) + ); + }, "evaluateErrorRule"); + var evaluateTreeRule = /* @__PURE__ */ __name((treeRule, options) => { + const { conditions, rules } = treeRule; + const { result, referenceRecord } = evaluateConditions(conditions, options); + if (!result) { + return; + } + return evaluateRules(rules, { + ...options, + referenceRecord: { ...options.referenceRecord, ...referenceRecord } + }); + }, "evaluateTreeRule"); + var evaluateRules = /* @__PURE__ */ __name((rules, options) => { + for (const rule of rules) { + if (rule.type === "endpoint") { + const endpointOrUndefined = evaluateEndpointRule(rule, options); + if (endpointOrUndefined) { + return endpointOrUndefined; + } + } else if (rule.type === "error") { + evaluateErrorRule(rule, options); + } else if (rule.type === "tree") { + const endpointOrUndefined = evaluateTreeRule(rule, options); + if (endpointOrUndefined) { + return endpointOrUndefined; + } + } else { + throw new EndpointError2(`Unknown endpoint rule: ${rule}`); + } + } + throw new EndpointError2(`Rules evaluation failed`); + }, "evaluateRules"); + var resolveEndpoint2 = /* @__PURE__ */ __name((ruleSetObject, options) => { + var _a, _b, _c, _d; + const { endpointParams, logger } = options; + const { parameters, rules } = ruleSetObject; + (_b = (_a = options.logger) == null ? void 0 : _a.debug) == null ? void 0 : _b.call(_a, `${debugId} Initial EndpointParams: ${toDebugString(endpointParams)}`); + const paramsWithDefault = Object.entries(parameters).filter(([, v]) => v.default != null).map(([k, v]) => [k, v.default]); + if (paramsWithDefault.length > 0) { + for (const [paramKey, paramDefaultValue] of paramsWithDefault) { + endpointParams[paramKey] = endpointParams[paramKey] ?? paramDefaultValue; + } + } + const requiredParams = Object.entries(parameters).filter(([, v]) => v.required).map(([k]) => k); + for (const requiredParam of requiredParams) { + if (endpointParams[requiredParam] == null) { + throw new EndpointError2(`Missing required parameter: '${requiredParam}'`); + } + } + const endpoint = evaluateRules(rules, { endpointParams, logger, referenceRecord: {} }); + (_d = (_c = options.logger) == null ? void 0 : _c.debug) == null ? void 0 : _d.call(_c, `${debugId} Resolved endpoint: ${toDebugString(endpoint)}`); + return endpoint; + }, "resolveEndpoint"); } }); -// ../../../node_modules/@smithy/util-buffer-from/dist-cjs/index.js -var require_dist_cjs9 = __commonJS({ - "../../../node_modules/@smithy/util-buffer-from/dist-cjs/index.js"(exports2, module2) { +// ../../../node_modules/@aws-sdk/util-endpoints/dist-cjs/index.js +var require_dist_cjs7 = __commonJS({ + "../../../node_modules/@aws-sdk/util-endpoints/dist-cjs/index.js"(exports2, module2) { + "use strict"; var __defProp2 = Object.defineProperty; var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; var __getOwnPropNames2 = Object.getOwnPropertyNames; @@ -2023,184 +1876,352 @@ var require_dist_cjs9 = __commonJS({ var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); var src_exports = {}; __export2(src_exports, { - fromArrayBuffer: () => fromArrayBuffer, - fromString: () => fromString + ConditionObject: () => import_util_endpoints.ConditionObject, + DeprecatedObject: () => import_util_endpoints.DeprecatedObject, + EndpointError: () => import_util_endpoints.EndpointError, + EndpointObject: () => import_util_endpoints.EndpointObject, + EndpointObjectHeaders: () => import_util_endpoints.EndpointObjectHeaders, + EndpointObjectProperties: () => import_util_endpoints.EndpointObjectProperties, + EndpointParams: () => import_util_endpoints.EndpointParams, + EndpointResolverOptions: () => import_util_endpoints.EndpointResolverOptions, + EndpointRuleObject: () => import_util_endpoints.EndpointRuleObject, + ErrorRuleObject: () => import_util_endpoints.ErrorRuleObject, + EvaluateOptions: () => import_util_endpoints.EvaluateOptions, + Expression: () => import_util_endpoints.Expression, + FunctionArgv: () => import_util_endpoints.FunctionArgv, + FunctionObject: () => import_util_endpoints.FunctionObject, + FunctionReturn: () => import_util_endpoints.FunctionReturn, + ParameterObject: () => import_util_endpoints.ParameterObject, + ReferenceObject: () => import_util_endpoints.ReferenceObject, + ReferenceRecord: () => import_util_endpoints.ReferenceRecord, + RuleSetObject: () => import_util_endpoints.RuleSetObject, + RuleSetRules: () => import_util_endpoints.RuleSetRules, + TreeRuleObject: () => import_util_endpoints.TreeRuleObject, + awsEndpointFunctions: () => awsEndpointFunctions, + getUserAgentPrefix: () => getUserAgentPrefix, + isIpAddress: () => import_util_endpoints.isIpAddress, + partition: () => partition, + resolveEndpoint: () => import_util_endpoints.resolveEndpoint, + setPartitionInfo: () => setPartitionInfo, + useDefaultPartitionInfo: () => useDefaultPartitionInfo }); module2.exports = __toCommonJS2(src_exports); - var import_is_array_buffer = require_dist_cjs8(); - var import_buffer = require("buffer"); - var fromArrayBuffer = /* @__PURE__ */ __name((input, offset = 0, length = input.byteLength - offset) => { - if (!(0, import_is_array_buffer.isArrayBuffer)(input)) { - throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof input} (${input})`); + var import_util_endpoints = require_dist_cjs6(); + var isVirtualHostableS3Bucket = /* @__PURE__ */ __name((value, allowSubDomains = false) => { + if (allowSubDomains) { + for (const label of value.split(".")) { + if (!isVirtualHostableS3Bucket(label)) { + return false; + } + } + return true; } - return import_buffer.Buffer.from(input, offset, length); - }, "fromArrayBuffer"); - var fromString = /* @__PURE__ */ __name((input, encoding) => { - if (typeof input !== "string") { - throw new TypeError(`The "input" argument must be of type string. Received type ${typeof input} (${input})`); + if (!(0, import_util_endpoints.isValidHostLabel)(value)) { + return false; } - return encoding ? import_buffer.Buffer.from(input, encoding) : import_buffer.Buffer.from(input); - }, "fromString"); - } -}); - -// ../../../node_modules/@smithy/util-utf8/dist-cjs/index.js -var require_dist_cjs10 = __commonJS({ - "../../../node_modules/@smithy/util-utf8/dist-cjs/index.js"(exports2, module2) { - var __defProp2 = Object.defineProperty; - var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; - var __getOwnPropNames2 = Object.getOwnPropertyNames; - var __hasOwnProp2 = Object.prototype.hasOwnProperty; - var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); - var __export2 = (target, all) => { - for (var name in all) - __defProp2(target, name, { get: all[name], enumerable: true }); - }; - var __copyProps2 = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames2(from)) - if (!__hasOwnProp2.call(to, key) && key !== except) - __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); - } - return to; - }; - var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); - var src_exports = {}; - __export2(src_exports, { - fromUtf8: () => fromUtf8, - toUint8Array: () => toUint8Array, - toUtf8: () => toUtf8 - }); - module2.exports = __toCommonJS2(src_exports); - var import_util_buffer_from = require_dist_cjs9(); - var fromUtf8 = /* @__PURE__ */ __name((input) => { - const buf = (0, import_util_buffer_from.fromString)(input, "utf8"); - return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength / Uint8Array.BYTES_PER_ELEMENT); - }, "fromUtf8"); - var toUint8Array = /* @__PURE__ */ __name((data) => { - if (typeof data === "string") { - return fromUtf8(data); - } - if (ArrayBuffer.isView(data)) { - return new Uint8Array(data.buffer, data.byteOffset, data.byteLength / Uint8Array.BYTES_PER_ELEMENT); - } - return new Uint8Array(data); - }, "toUint8Array"); - var toUtf8 = /* @__PURE__ */ __name((input) => { - if (typeof input === "string") { - return input; - } - if (typeof input !== "object" || typeof input.byteOffset !== "number" || typeof input.byteLength !== "number") { - throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array."); - } - return (0, import_util_buffer_from.fromArrayBuffer)(input.buffer, input.byteOffset, input.byteLength).toString("utf8"); - }, "toUtf8"); - } -}); - -// ../../../node_modules/@smithy/util-hex-encoding/dist-cjs/index.js -var require_dist_cjs11 = __commonJS({ - "../../../node_modules/@smithy/util-hex-encoding/dist-cjs/index.js"(exports2, module2) { - var __defProp2 = Object.defineProperty; - var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; - var __getOwnPropNames2 = Object.getOwnPropertyNames; - var __hasOwnProp2 = Object.prototype.hasOwnProperty; - var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); - var __export2 = (target, all) => { - for (var name in all) - __defProp2(target, name, { get: all[name], enumerable: true }); - }; - var __copyProps2 = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames2(from)) - if (!__hasOwnProp2.call(to, key) && key !== except) - __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + if (value.length < 3 || value.length > 63) { + return false; } - return to; - }; - var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); - var src_exports = {}; - __export2(src_exports, { - fromHex: () => fromHex, - toHex: () => toHex - }); - module2.exports = __toCommonJS2(src_exports); - var SHORT_TO_HEX = {}; - var HEX_TO_SHORT = {}; - for (let i = 0; i < 256; i++) { - let encodedByte = i.toString(16).toLowerCase(); - if (encodedByte.length === 1) { - encodedByte = `0${encodedByte}`; + if (value !== value.toLowerCase()) { + return false; } - SHORT_TO_HEX[i] = encodedByte; - HEX_TO_SHORT[encodedByte] = i; - } - function fromHex(encoded) { - if (encoded.length % 2 !== 0) { - throw new Error("Hex encoded strings must have an even number length"); + if ((0, import_util_endpoints.isIpAddress)(value)) { + return false; } - const out = new Uint8Array(encoded.length / 2); - for (let i = 0; i < encoded.length; i += 2) { - const encodedByte = encoded.slice(i, i + 2).toLowerCase(); - if (encodedByte in HEX_TO_SHORT) { - out[i / 2] = HEX_TO_SHORT[encodedByte]; - } else { - throw new Error(`Cannot decode unrecognized sequence ${encodedByte} as hexadecimal`); + return true; + }, "isVirtualHostableS3Bucket"); + var ARN_DELIMITER = ":"; + var RESOURCE_DELIMITER = "/"; + var parseArn = /* @__PURE__ */ __name((value) => { + const segments = value.split(ARN_DELIMITER); + if (segments.length < 6) + return null; + const [arn, partition2, service, region, accountId, ...resourcePath] = segments; + if (arn !== "arn" || partition2 === "" || service === "" || resourcePath.join(ARN_DELIMITER) === "") + return null; + const resourceId = resourcePath.map((resource) => resource.split(RESOURCE_DELIMITER)).flat(); + return { + partition: partition2, + service, + region, + accountId, + resourceId + }; + }, "parseArn"); + var partitions_default = { + partitions: [{ + id: "aws", + outputs: { + dnsSuffix: "amazonaws.com", + dualStackDnsSuffix: "api.aws", + implicitGlobalRegion: "us-east-1", + name: "aws", + supportsDualStack: true, + supportsFIPS: true + }, + regionRegex: "^(us|eu|ap|sa|ca|me|af|il)\\-\\w+\\-\\d+$", + regions: { + "af-south-1": { + description: "Africa (Cape Town)" + }, + "ap-east-1": { + description: "Asia Pacific (Hong Kong)" + }, + "ap-northeast-1": { + description: "Asia Pacific (Tokyo)" + }, + "ap-northeast-2": { + description: "Asia Pacific (Seoul)" + }, + "ap-northeast-3": { + description: "Asia Pacific (Osaka)" + }, + "ap-south-1": { + description: "Asia Pacific (Mumbai)" + }, + "ap-south-2": { + description: "Asia Pacific (Hyderabad)" + }, + "ap-southeast-1": { + description: "Asia Pacific (Singapore)" + }, + "ap-southeast-2": { + description: "Asia Pacific (Sydney)" + }, + "ap-southeast-3": { + description: "Asia Pacific (Jakarta)" + }, + "ap-southeast-4": { + description: "Asia Pacific (Melbourne)" + }, + "aws-global": { + description: "AWS Standard global region" + }, + "ca-central-1": { + description: "Canada (Central)" + }, + "ca-west-1": { + description: "Canada West (Calgary)" + }, + "eu-central-1": { + description: "Europe (Frankfurt)" + }, + "eu-central-2": { + description: "Europe (Zurich)" + }, + "eu-north-1": { + description: "Europe (Stockholm)" + }, + "eu-south-1": { + description: "Europe (Milan)" + }, + "eu-south-2": { + description: "Europe (Spain)" + }, + "eu-west-1": { + description: "Europe (Ireland)" + }, + "eu-west-2": { + description: "Europe (London)" + }, + "eu-west-3": { + description: "Europe (Paris)" + }, + "il-central-1": { + description: "Israel (Tel Aviv)" + }, + "me-central-1": { + description: "Middle East (UAE)" + }, + "me-south-1": { + description: "Middle East (Bahrain)" + }, + "sa-east-1": { + description: "South America (Sao Paulo)" + }, + "us-east-1": { + description: "US East (N. Virginia)" + }, + "us-east-2": { + description: "US East (Ohio)" + }, + "us-west-1": { + description: "US West (N. California)" + }, + "us-west-2": { + description: "US West (Oregon)" + } } - } - return out; - } - __name(fromHex, "fromHex"); - function toHex(bytes) { - let out = ""; - for (let i = 0; i < bytes.byteLength; i++) { - out += SHORT_TO_HEX[bytes[i]]; - } - return out; - } - __name(toHex, "toHex"); - } -}); - -// ../../../node_modules/@smithy/util-uri-escape/dist-cjs/index.js -var require_dist_cjs12 = __commonJS({ - "../../../node_modules/@smithy/util-uri-escape/dist-cjs/index.js"(exports2, module2) { - var __defProp2 = Object.defineProperty; - var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; - var __getOwnPropNames2 = Object.getOwnPropertyNames; - var __hasOwnProp2 = Object.prototype.hasOwnProperty; - var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); - var __export2 = (target, all) => { - for (var name in all) - __defProp2(target, name, { get: all[name], enumerable: true }); - }; - var __copyProps2 = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames2(from)) - if (!__hasOwnProp2.call(to, key) && key !== except) - __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); - } - return to; - }; - var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); - var src_exports = {}; - __export2(src_exports, { - escapeUri: () => escapeUri, - escapeUriPath: () => escapeUriPath - }); - module2.exports = __toCommonJS2(src_exports); - var escapeUri = /* @__PURE__ */ __name((uri) => ( - // AWS percent-encodes some extra non-standard characters in a URI - encodeURIComponent(uri).replace(/[!'()*]/g, hexEncode) - ), "escapeUri"); - var hexEncode = /* @__PURE__ */ __name((c) => `%${c.charCodeAt(0).toString(16).toUpperCase()}`, "hexEncode"); - var escapeUriPath = /* @__PURE__ */ __name((uri) => uri.split("/").map(escapeUri).join("/"), "escapeUriPath"); + }, { + id: "aws-cn", + outputs: { + dnsSuffix: "amazonaws.com.cn", + dualStackDnsSuffix: "api.amazonwebservices.com.cn", + implicitGlobalRegion: "cn-northwest-1", + name: "aws-cn", + supportsDualStack: true, + supportsFIPS: true + }, + regionRegex: "^cn\\-\\w+\\-\\d+$", + regions: { + "aws-cn-global": { + description: "AWS China global region" + }, + "cn-north-1": { + description: "China (Beijing)" + }, + "cn-northwest-1": { + description: "China (Ningxia)" + } + } + }, { + id: "aws-us-gov", + outputs: { + dnsSuffix: "amazonaws.com", + dualStackDnsSuffix: "api.aws", + implicitGlobalRegion: "us-gov-west-1", + name: "aws-us-gov", + supportsDualStack: true, + supportsFIPS: true + }, + regionRegex: "^us\\-gov\\-\\w+\\-\\d+$", + regions: { + "aws-us-gov-global": { + description: "AWS GovCloud (US) global region" + }, + "us-gov-east-1": { + description: "AWS GovCloud (US-East)" + }, + "us-gov-west-1": { + description: "AWS GovCloud (US-West)" + } + } + }, { + id: "aws-iso", + outputs: { + dnsSuffix: "c2s.ic.gov", + dualStackDnsSuffix: "c2s.ic.gov", + implicitGlobalRegion: "us-iso-east-1", + name: "aws-iso", + supportsDualStack: false, + supportsFIPS: true + }, + regionRegex: "^us\\-iso\\-\\w+\\-\\d+$", + regions: { + "aws-iso-global": { + description: "AWS ISO (US) global region" + }, + "us-iso-east-1": { + description: "US ISO East" + }, + "us-iso-west-1": { + description: "US ISO WEST" + } + } + }, { + id: "aws-iso-b", + outputs: { + dnsSuffix: "sc2s.sgov.gov", + dualStackDnsSuffix: "sc2s.sgov.gov", + implicitGlobalRegion: "us-isob-east-1", + name: "aws-iso-b", + supportsDualStack: false, + supportsFIPS: true + }, + regionRegex: "^us\\-isob\\-\\w+\\-\\d+$", + regions: { + "aws-iso-b-global": { + description: "AWS ISOB (US) global region" + }, + "us-isob-east-1": { + description: "US ISOB East (Ohio)" + } + } + }, { + id: "aws-iso-e", + outputs: { + dnsSuffix: "cloud.adc-e.uk", + dualStackDnsSuffix: "cloud.adc-e.uk", + implicitGlobalRegion: "eu-isoe-west-1", + name: "aws-iso-e", + supportsDualStack: false, + supportsFIPS: true + }, + regionRegex: "^eu\\-isoe\\-\\w+\\-\\d+$", + regions: { + "eu-isoe-west-1": { + description: "EU ISOE West" + } + } + }, { + id: "aws-iso-f", + outputs: { + dnsSuffix: "csp.hci.ic.gov", + dualStackDnsSuffix: "csp.hci.ic.gov", + implicitGlobalRegion: "us-isof-south-1", + name: "aws-iso-f", + supportsDualStack: false, + supportsFIPS: true + }, + regionRegex: "^us\\-isof\\-\\w+\\-\\d+$", + regions: {} + }], + version: "1.1" + }; + var selectedPartitionsInfo = partitions_default; + var selectedUserAgentPrefix = ""; + var partition = /* @__PURE__ */ __name((value) => { + const { partitions } = selectedPartitionsInfo; + for (const partition2 of partitions) { + const { regions, outputs } = partition2; + for (const [region, regionData] of Object.entries(regions)) { + if (region === value) { + return { + ...outputs, + ...regionData + }; + } + } + } + for (const partition2 of partitions) { + const { regionRegex, outputs } = partition2; + if (new RegExp(regionRegex).test(value)) { + return { + ...outputs + }; + } + } + const DEFAULT_PARTITION = partitions.find((partition2) => partition2.id === "aws"); + if (!DEFAULT_PARTITION) { + throw new Error( + "Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist." + ); + } + return { + ...DEFAULT_PARTITION.outputs + }; + }, "partition"); + var setPartitionInfo = /* @__PURE__ */ __name((partitionsInfo, userAgentPrefix = "") => { + selectedPartitionsInfo = partitionsInfo; + selectedUserAgentPrefix = userAgentPrefix; + }, "setPartitionInfo"); + var useDefaultPartitionInfo = /* @__PURE__ */ __name(() => { + setPartitionInfo(partitions_default, ""); + }, "useDefaultPartitionInfo"); + var getUserAgentPrefix = /* @__PURE__ */ __name(() => selectedUserAgentPrefix, "getUserAgentPrefix"); + var awsEndpointFunctions = { + isVirtualHostableS3Bucket, + parseArn, + partition + }; + import_util_endpoints.customEndpointFunctions.aws = awsEndpointFunctions; } }); -// ../../../node_modules/@smithy/signature-v4/dist-cjs/index.js -var require_dist_cjs13 = __commonJS({ - "../../../node_modules/@smithy/signature-v4/dist-cjs/index.js"(exports2, module2) { +// ../../../node_modules/@aws-sdk/middleware-user-agent/dist-cjs/index.js +var require_dist_cjs8 = __commonJS({ + "../../../node_modules/@aws-sdk/middleware-user-agent/dist-cjs/index.js"(exports2, module2) { + "use strict"; var __defProp2 = Object.defineProperty; var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; var __getOwnPropNames2 = Object.getOwnPropertyNames; @@ -2221,2442 +2242,1766 @@ var require_dist_cjs13 = __commonJS({ var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); var src_exports = {}; __export2(src_exports, { - SignatureV4: () => SignatureV4, - clearCredentialCache: () => clearCredentialCache, - createScope: () => createScope, - getCanonicalHeaders: () => getCanonicalHeaders, - getCanonicalQuery: () => getCanonicalQuery, - getPayloadHash: () => getPayloadHash, - getSigningKey: () => getSigningKey, - moveHeadersToQuery: () => moveHeadersToQuery, - prepareRequest: () => prepareRequest + getUserAgentMiddlewareOptions: () => getUserAgentMiddlewareOptions, + getUserAgentPlugin: () => getUserAgentPlugin, + resolveUserAgentConfig: () => resolveUserAgentConfig, + userAgentMiddleware: () => userAgentMiddleware }); module2.exports = __toCommonJS2(src_exports); - var import_util_middleware = require_dist_cjs7(); - var import_util_utf84 = require_dist_cjs10(); - var ALGORITHM_QUERY_PARAM = "X-Amz-Algorithm"; - var CREDENTIAL_QUERY_PARAM = "X-Amz-Credential"; - var AMZ_DATE_QUERY_PARAM = "X-Amz-Date"; - var SIGNED_HEADERS_QUERY_PARAM = "X-Amz-SignedHeaders"; - var EXPIRES_QUERY_PARAM = "X-Amz-Expires"; - var SIGNATURE_QUERY_PARAM = "X-Amz-Signature"; - var TOKEN_QUERY_PARAM = "X-Amz-Security-Token"; - var AUTH_HEADER = "authorization"; - var AMZ_DATE_HEADER = AMZ_DATE_QUERY_PARAM.toLowerCase(); - var DATE_HEADER = "date"; - var GENERATED_HEADERS = [AUTH_HEADER, AMZ_DATE_HEADER, DATE_HEADER]; - var SIGNATURE_HEADER = SIGNATURE_QUERY_PARAM.toLowerCase(); - var SHA256_HEADER = "x-amz-content-sha256"; - var TOKEN_HEADER = TOKEN_QUERY_PARAM.toLowerCase(); - var ALWAYS_UNSIGNABLE_HEADERS = { - authorization: true, - "cache-control": true, - connection: true, - expect: true, - from: true, - "keep-alive": true, - "max-forwards": true, - pragma: true, - referer: true, - te: true, - trailer: true, - "transfer-encoding": true, - upgrade: true, - "user-agent": true, - "x-amzn-trace-id": true - }; - var PROXY_HEADER_PATTERN = /^proxy-/; - var SEC_HEADER_PATTERN = /^sec-/; - var ALGORITHM_IDENTIFIER = "AWS4-HMAC-SHA256"; - var EVENT_ALGORITHM_IDENTIFIER = "AWS4-HMAC-SHA256-PAYLOAD"; - var UNSIGNED_PAYLOAD = "UNSIGNED-PAYLOAD"; - var MAX_CACHE_SIZE = 50; - var KEY_TYPE_IDENTIFIER = "aws4_request"; - var MAX_PRESIGNED_TTL = 60 * 60 * 24 * 7; - var import_util_hex_encoding = require_dist_cjs11(); - var import_util_utf8 = require_dist_cjs10(); - var signingKeyCache = {}; - var cacheQueue = []; - var createScope = /* @__PURE__ */ __name((shortDate, region, service) => `${shortDate}/${region}/${service}/${KEY_TYPE_IDENTIFIER}`, "createScope"); - var getSigningKey = /* @__PURE__ */ __name(async (sha256Constructor, credentials, shortDate, region, service) => { - const credsHash = await hmac(sha256Constructor, credentials.secretAccessKey, credentials.accessKeyId); - const cacheKey = `${shortDate}:${region}:${service}:${(0, import_util_hex_encoding.toHex)(credsHash)}:${credentials.sessionToken}`; - if (cacheKey in signingKeyCache) { - return signingKeyCache[cacheKey]; - } - cacheQueue.push(cacheKey); - while (cacheQueue.length > MAX_CACHE_SIZE) { - delete signingKeyCache[cacheQueue.shift()]; - } - let key = `AWS4${credentials.secretAccessKey}`; - for (const signable of [shortDate, region, service, KEY_TYPE_IDENTIFIER]) { - key = await hmac(sha256Constructor, key, signable); + function resolveUserAgentConfig(input) { + return { + ...input, + customUserAgent: typeof input.customUserAgent === "string" ? [[input.customUserAgent]] : input.customUserAgent + }; + } + __name(resolveUserAgentConfig, "resolveUserAgentConfig"); + var import_util_endpoints = require_dist_cjs7(); + var import_protocol_http8 = require_dist_cjs2(); + var USER_AGENT = "user-agent"; + var X_AMZ_USER_AGENT = "x-amz-user-agent"; + var SPACE = " "; + var UA_NAME_SEPARATOR = "/"; + var UA_NAME_ESCAPE_REGEX = /[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g; + var UA_VALUE_ESCAPE_REGEX = /[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g; + var UA_ESCAPE_CHAR = "-"; + var userAgentMiddleware = /* @__PURE__ */ __name((options) => (next, context) => async (args) => { + var _a, _b; + const { request: request2 } = args; + if (!import_protocol_http8.HttpRequest.isInstance(request2)) + return next(args); + const { headers } = request2; + const userAgent = ((_a = context == null ? void 0 : context.userAgent) == null ? void 0 : _a.map(escapeUserAgent)) || []; + const defaultUserAgent = (await options.defaultUserAgentProvider()).map(escapeUserAgent); + const customUserAgent = ((_b = options == null ? void 0 : options.customUserAgent) == null ? void 0 : _b.map(escapeUserAgent)) || []; + const prefix = (0, import_util_endpoints.getUserAgentPrefix)(); + const sdkUserAgentValue = (prefix ? [prefix] : []).concat([...defaultUserAgent, ...userAgent, ...customUserAgent]).join(SPACE); + const normalUAValue = [ + ...defaultUserAgent.filter((section) => section.startsWith("aws-sdk-")), + ...customUserAgent + ].join(SPACE); + if (options.runtime !== "browser") { + if (normalUAValue) { + headers[X_AMZ_USER_AGENT] = headers[X_AMZ_USER_AGENT] ? `${headers[USER_AGENT]} ${normalUAValue}` : normalUAValue; + } + headers[USER_AGENT] = sdkUserAgentValue; + } else { + headers[X_AMZ_USER_AGENT] = sdkUserAgentValue; } - return signingKeyCache[cacheKey] = key; - }, "getSigningKey"); - var clearCredentialCache = /* @__PURE__ */ __name(() => { - cacheQueue.length = 0; - Object.keys(signingKeyCache).forEach((cacheKey) => { - delete signingKeyCache[cacheKey]; + return next({ + ...args, + request: request2 }); - }, "clearCredentialCache"); - var hmac = /* @__PURE__ */ __name((ctor, secret, data) => { - const hash = new ctor(secret); - hash.update((0, import_util_utf8.toUint8Array)(data)); - return hash.digest(); - }, "hmac"); - var getCanonicalHeaders = /* @__PURE__ */ __name(({ headers }, unsignableHeaders, signableHeaders) => { - const canonical = {}; - for (const headerName of Object.keys(headers).sort()) { - if (headers[headerName] == void 0) { - continue; - } - const canonicalHeaderName = headerName.toLowerCase(); - if (canonicalHeaderName in ALWAYS_UNSIGNABLE_HEADERS || (unsignableHeaders == null ? void 0 : unsignableHeaders.has(canonicalHeaderName)) || PROXY_HEADER_PATTERN.test(canonicalHeaderName) || SEC_HEADER_PATTERN.test(canonicalHeaderName)) { - if (!signableHeaders || signableHeaders && !signableHeaders.has(canonicalHeaderName)) { - continue; - } - } - canonical[canonicalHeaderName] = headers[headerName].trim().replace(/\s+/g, " "); + }, "userAgentMiddleware"); + var escapeUserAgent = /* @__PURE__ */ __name((userAgentPair) => { + var _a; + const name = userAgentPair[0].split(UA_NAME_SEPARATOR).map((part) => part.replace(UA_NAME_ESCAPE_REGEX, UA_ESCAPE_CHAR)).join(UA_NAME_SEPARATOR); + const version2 = (_a = userAgentPair[1]) == null ? void 0 : _a.replace(UA_VALUE_ESCAPE_REGEX, UA_ESCAPE_CHAR); + const prefixSeparatorIndex = name.indexOf(UA_NAME_SEPARATOR); + const prefix = name.substring(0, prefixSeparatorIndex); + let uaName = name.substring(prefixSeparatorIndex + 1); + if (prefix === "api") { + uaName = uaName.toLowerCase(); } - return canonical; - }, "getCanonicalHeaders"); - var import_util_uri_escape = require_dist_cjs12(); - var getCanonicalQuery = /* @__PURE__ */ __name(({ query = {} }) => { - const keys = []; - const serialized = {}; - for (const key of Object.keys(query).sort()) { - if (key.toLowerCase() === SIGNATURE_HEADER) { - continue; - } - keys.push(key); - const value = query[key]; - if (typeof value === "string") { - serialized[key] = `${(0, import_util_uri_escape.escapeUri)(key)}=${(0, import_util_uri_escape.escapeUri)(value)}`; - } else if (Array.isArray(value)) { - serialized[key] = value.slice(0).reduce( - (encoded, value2) => encoded.concat([`${(0, import_util_uri_escape.escapeUri)(key)}=${(0, import_util_uri_escape.escapeUri)(value2)}`]), - [] - ).sort().join("&"); + return [prefix, uaName, version2].filter((item) => item && item.length > 0).reduce((acc, item, index) => { + switch (index) { + case 0: + return item; + case 1: + return `${acc}/${item}`; + default: + return `${acc}#${item}`; } + }, ""); + }, "escapeUserAgent"); + var getUserAgentMiddlewareOptions = { + name: "getUserAgentMiddleware", + step: "build", + priority: "low", + tags: ["SET_USER_AGENT", "USER_AGENT"], + override: true + }; + var getUserAgentPlugin = /* @__PURE__ */ __name((config) => ({ + applyToStack: (clientStack) => { + clientStack.add(userAgentMiddleware(config), getUserAgentMiddlewareOptions); } - return keys.map((key) => serialized[key]).filter((serialized2) => serialized2).join("&"); - }, "getCanonicalQuery"); - var import_is_array_buffer = require_dist_cjs8(); - var import_util_utf82 = require_dist_cjs10(); - var getPayloadHash = /* @__PURE__ */ __name(async ({ headers, body }, hashConstructor) => { - for (const headerName of Object.keys(headers)) { - if (headerName.toLowerCase() === SHA256_HEADER) { - return headers[headerName]; - } + }), "getUserAgentPlugin"); + } +}); + +// ../../../node_modules/@smithy/util-config-provider/dist-cjs/index.js +var require_dist_cjs9 = __commonJS({ + "../../../node_modules/@smithy/util-config-provider/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all) => { + for (var name in all) + __defProp2(target, name, { get: all[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); } - if (body == void 0) { - return "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"; - } else if (typeof body === "string" || ArrayBuffer.isView(body) || (0, import_is_array_buffer.isArrayBuffer)(body)) { - const hashCtor = new hashConstructor(); - hashCtor.update((0, import_util_utf82.toUint8Array)(body)); - return (0, import_util_hex_encoding.toHex)(await hashCtor.digest()); + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + SelectorType: () => SelectorType, + booleanSelector: () => booleanSelector, + numberSelector: () => numberSelector + }); + module2.exports = __toCommonJS2(src_exports); + var booleanSelector = /* @__PURE__ */ __name((obj, key, type) => { + if (!(key in obj)) + return void 0; + if (obj[key] === "true") + return true; + if (obj[key] === "false") + return false; + throw new Error(`Cannot load ${type} "${key}". Expected "true" or "false", got ${obj[key]}.`); + }, "booleanSelector"); + var numberSelector = /* @__PURE__ */ __name((obj, key, type) => { + if (!(key in obj)) + return void 0; + const numberValue = parseInt(obj[key], 10); + if (Number.isNaN(numberValue)) { + throw new TypeError(`Cannot load ${type} '${key}'. Expected number, got '${obj[key]}'.`); } - return UNSIGNED_PAYLOAD; - }, "getPayloadHash"); - var import_util_utf83 = require_dist_cjs10(); - var _HeaderFormatter = class _HeaderFormatter { - format(headers) { - const chunks = []; - for (const headerName of Object.keys(headers)) { - const bytes = (0, import_util_utf83.fromUtf8)(headerName); - chunks.push(Uint8Array.from([bytes.byteLength]), bytes, this.formatHeaderValue(headers[headerName])); - } - const out = new Uint8Array(chunks.reduce((carry, bytes) => carry + bytes.byteLength, 0)); - let position = 0; - for (const chunk of chunks) { - out.set(chunk, position); - position += chunk.byteLength; - } - return out; + return numberValue; + }, "numberSelector"); + var SelectorType = /* @__PURE__ */ ((SelectorType2) => { + SelectorType2["ENV"] = "env"; + SelectorType2["CONFIG"] = "shared config entry"; + return SelectorType2; + })(SelectorType || {}); + } +}); + +// ../../../node_modules/@smithy/util-middleware/dist-cjs/index.js +var require_dist_cjs10 = __commonJS({ + "../../../node_modules/@smithy/util-middleware/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all) => { + for (var name in all) + __defProp2(target, name, { get: all[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); } - formatHeaderValue(header) { - switch (header.type) { - case "boolean": - return Uint8Array.from([ - header.value ? 0 : 1 - /* boolFalse */ - ]); - case "byte": - return Uint8Array.from([2, header.value]); - case "short": - const shortView = new DataView(new ArrayBuffer(3)); - shortView.setUint8( - 0, - 3 - /* short */ - ); - shortView.setInt16(1, header.value, false); - return new Uint8Array(shortView.buffer); - case "integer": - const intView = new DataView(new ArrayBuffer(5)); - intView.setUint8( - 0, - 4 - /* integer */ - ); - intView.setInt32(1, header.value, false); - return new Uint8Array(intView.buffer); - case "long": - const longBytes = new Uint8Array(9); - longBytes[0] = 5; - longBytes.set(header.value.bytes, 1); - return longBytes; - case "binary": - const binView = new DataView(new ArrayBuffer(3 + header.value.byteLength)); - binView.setUint8( - 0, - 6 - /* byteArray */ - ); - binView.setUint16(1, header.value.byteLength, false); - const binBytes = new Uint8Array(binView.buffer); - binBytes.set(header.value, 3); - return binBytes; - case "string": - const utf8Bytes = (0, import_util_utf83.fromUtf8)(header.value); - const strView = new DataView(new ArrayBuffer(3 + utf8Bytes.byteLength)); - strView.setUint8( - 0, - 7 - /* string */ - ); - strView.setUint16(1, utf8Bytes.byteLength, false); - const strBytes = new Uint8Array(strView.buffer); - strBytes.set(utf8Bytes, 3); - return strBytes; - case "timestamp": - const tsBytes = new Uint8Array(9); - tsBytes[0] = 8; - tsBytes.set(Int64.fromNumber(header.value.valueOf()).bytes, 1); - return tsBytes; - case "uuid": - if (!UUID_PATTERN.test(header.value)) { - throw new Error(`Invalid UUID received: ${header.value}`); - } - const uuidBytes = new Uint8Array(17); - uuidBytes[0] = 9; - uuidBytes.set((0, import_util_hex_encoding.fromHex)(header.value.replace(/\-/g, "")), 1); - return uuidBytes; - } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + getSmithyContext: () => getSmithyContext4, + normalizeProvider: () => normalizeProvider2 + }); + module2.exports = __toCommonJS2(src_exports); + var import_types5 = require_dist_cjs(); + var getSmithyContext4 = /* @__PURE__ */ __name((context) => context[import_types5.SMITHY_CONTEXT_KEY] || (context[import_types5.SMITHY_CONTEXT_KEY] = {}), "getSmithyContext"); + var normalizeProvider2 = /* @__PURE__ */ __name((input) => { + if (typeof input === "function") + return input; + const promisified = Promise.resolve(input); + return () => promisified; + }, "normalizeProvider"); + } +}); + +// ../../../node_modules/@smithy/config-resolver/dist-cjs/index.js +var require_dist_cjs11 = __commonJS({ + "../../../node_modules/@smithy/config-resolver/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all) => { + for (var name in all) + __defProp2(target, name, { get: all[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); } + return to; }; - __name(_HeaderFormatter, "HeaderFormatter"); - var HeaderFormatter = _HeaderFormatter; - var UUID_PATTERN = /^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/; - var _Int64 = class _Int642 { - constructor(bytes) { - this.bytes = bytes; - if (bytes.byteLength !== 8) { - throw new Error("Int64 buffers must be exactly 8 bytes"); - } - } - static fromNumber(number) { - if (number > 9223372036854776e3 || number < -9223372036854776e3) { - throw new Error(`${number} is too large (or, if negative, too small) to represent as an Int64`); - } - const bytes = new Uint8Array(8); - for (let i = 7, remaining = Math.abs(Math.round(number)); i > -1 && remaining > 0; i--, remaining /= 256) { - bytes[i] = remaining; - } - if (number < 0) { - negate(bytes); - } - return new _Int642(bytes); + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + CONFIG_USE_DUALSTACK_ENDPOINT: () => CONFIG_USE_DUALSTACK_ENDPOINT, + CONFIG_USE_FIPS_ENDPOINT: () => CONFIG_USE_FIPS_ENDPOINT, + DEFAULT_USE_DUALSTACK_ENDPOINT: () => DEFAULT_USE_DUALSTACK_ENDPOINT, + DEFAULT_USE_FIPS_ENDPOINT: () => DEFAULT_USE_FIPS_ENDPOINT, + ENV_USE_DUALSTACK_ENDPOINT: () => ENV_USE_DUALSTACK_ENDPOINT, + ENV_USE_FIPS_ENDPOINT: () => ENV_USE_FIPS_ENDPOINT, + NODE_REGION_CONFIG_FILE_OPTIONS: () => NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS: () => NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS: () => NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS: () => NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, + REGION_ENV_NAME: () => REGION_ENV_NAME, + REGION_INI_NAME: () => REGION_INI_NAME, + getRegionInfo: () => getRegionInfo, + resolveCustomEndpointsConfig: () => resolveCustomEndpointsConfig, + resolveEndpointsConfig: () => resolveEndpointsConfig, + resolveRegionConfig: () => resolveRegionConfig + }); + module2.exports = __toCommonJS2(src_exports); + var import_util_config_provider = require_dist_cjs9(); + var ENV_USE_DUALSTACK_ENDPOINT = "AWS_USE_DUALSTACK_ENDPOINT"; + var CONFIG_USE_DUALSTACK_ENDPOINT = "use_dualstack_endpoint"; + var DEFAULT_USE_DUALSTACK_ENDPOINT = false; + var NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS = { + environmentVariableSelector: (env) => (0, import_util_config_provider.booleanSelector)(env, ENV_USE_DUALSTACK_ENDPOINT, import_util_config_provider.SelectorType.ENV), + configFileSelector: (profile) => (0, import_util_config_provider.booleanSelector)(profile, CONFIG_USE_DUALSTACK_ENDPOINT, import_util_config_provider.SelectorType.CONFIG), + default: false + }; + var ENV_USE_FIPS_ENDPOINT = "AWS_USE_FIPS_ENDPOINT"; + var CONFIG_USE_FIPS_ENDPOINT = "use_fips_endpoint"; + var DEFAULT_USE_FIPS_ENDPOINT = false; + var NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS = { + environmentVariableSelector: (env) => (0, import_util_config_provider.booleanSelector)(env, ENV_USE_FIPS_ENDPOINT, import_util_config_provider.SelectorType.ENV), + configFileSelector: (profile) => (0, import_util_config_provider.booleanSelector)(profile, CONFIG_USE_FIPS_ENDPOINT, import_util_config_provider.SelectorType.CONFIG), + default: false + }; + var import_util_middleware3 = require_dist_cjs10(); + var resolveCustomEndpointsConfig = /* @__PURE__ */ __name((input) => { + const { endpoint, urlParser } = input; + return { + ...input, + tls: input.tls ?? true, + endpoint: (0, import_util_middleware3.normalizeProvider)(typeof endpoint === "string" ? urlParser(endpoint) : endpoint), + isCustomEndpoint: true, + useDualstackEndpoint: (0, import_util_middleware3.normalizeProvider)(input.useDualstackEndpoint ?? false) + }; + }, "resolveCustomEndpointsConfig"); + var getEndpointFromRegion = /* @__PURE__ */ __name(async (input) => { + const { tls = true } = input; + const region = await input.region(); + const dnsHostRegex = new RegExp(/^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9])$/); + if (!dnsHostRegex.test(region)) { + throw new Error("Invalid region in client config"); } - /** - * Called implicitly by infix arithmetic operators. - */ - valueOf() { - const bytes = this.bytes.slice(0); - const negative = bytes[0] & 128; - if (negative) { - negate(bytes); - } - return parseInt((0, import_util_hex_encoding.toHex)(bytes), 16) * (negative ? -1 : 1); + const useDualstackEndpoint = await input.useDualstackEndpoint(); + const useFipsEndpoint = await input.useFipsEndpoint(); + const { hostname } = await input.regionInfoProvider(region, { useDualstackEndpoint, useFipsEndpoint }) ?? {}; + if (!hostname) { + throw new Error("Cannot resolve hostname from client config"); } - toString() { - return String(this.valueOf()); + return input.urlParser(`${tls ? "https:" : "http:"}//${hostname}`); + }, "getEndpointFromRegion"); + var resolveEndpointsConfig = /* @__PURE__ */ __name((input) => { + const useDualstackEndpoint = (0, import_util_middleware3.normalizeProvider)(input.useDualstackEndpoint ?? false); + const { endpoint, useFipsEndpoint, urlParser } = input; + return { + ...input, + tls: input.tls ?? true, + endpoint: endpoint ? (0, import_util_middleware3.normalizeProvider)(typeof endpoint === "string" ? urlParser(endpoint) : endpoint) : () => getEndpointFromRegion({ ...input, useDualstackEndpoint, useFipsEndpoint }), + isCustomEndpoint: !!endpoint, + useDualstackEndpoint + }; + }, "resolveEndpointsConfig"); + var REGION_ENV_NAME = "AWS_REGION"; + var REGION_INI_NAME = "region"; + var NODE_REGION_CONFIG_OPTIONS = { + environmentVariableSelector: (env) => env[REGION_ENV_NAME], + configFileSelector: (profile) => profile[REGION_INI_NAME], + default: () => { + throw new Error("Region is missing"); } }; - __name(_Int64, "Int64"); - var Int64 = _Int64; - function negate(bytes) { - for (let i = 0; i < 8; i++) { - bytes[i] ^= 255; - } - for (let i = 7; i > -1; i--) { - bytes[i]++; - if (bytes[i] !== 0) - break; - } - } - __name(negate, "negate"); - var hasHeader = /* @__PURE__ */ __name((soughtHeader, headers) => { - soughtHeader = soughtHeader.toLowerCase(); - for (const headerName of Object.keys(headers)) { - if (soughtHeader === headerName.toLowerCase()) { - return true; - } + var NODE_REGION_CONFIG_FILE_OPTIONS = { + preferredFile: "credentials" + }; + var isFipsRegion = /* @__PURE__ */ __name((region) => typeof region === "string" && (region.startsWith("fips-") || region.endsWith("-fips")), "isFipsRegion"); + var getRealRegion = /* @__PURE__ */ __name((region) => isFipsRegion(region) ? ["fips-aws-global", "aws-fips"].includes(region) ? "us-east-1" : region.replace(/fips-(dkr-|prod-)?|-fips/, "") : region, "getRealRegion"); + var resolveRegionConfig = /* @__PURE__ */ __name((input) => { + const { region, useFipsEndpoint } = input; + if (!region) { + throw new Error("Region is missing"); } - return false; - }, "hasHeader"); - var cloneRequest = /* @__PURE__ */ __name(({ headers, query, ...rest }) => ({ - ...rest, - headers: { ...headers }, - query: query ? cloneQuery(query) : void 0 - }), "cloneRequest"); - var cloneQuery = /* @__PURE__ */ __name((query) => Object.keys(query).reduce((carry, paramName) => { - const param = query[paramName]; return { - ...carry, - [paramName]: Array.isArray(param) ? [...param] : param + ...input, + region: async () => { + if (typeof region === "string") { + return getRealRegion(region); + } + const providedRegion = await region(); + return getRealRegion(providedRegion); + }, + useFipsEndpoint: async () => { + const providedRegion = typeof region === "string" ? region : await region(); + if (isFipsRegion(providedRegion)) { + return true; + } + return typeof useFipsEndpoint !== "function" ? Promise.resolve(!!useFipsEndpoint) : useFipsEndpoint(); + } }; - }, {}), "cloneQuery"); - var moveHeadersToQuery = /* @__PURE__ */ __name((request2, options = {}) => { + }, "resolveRegionConfig"); + var getHostnameFromVariants = /* @__PURE__ */ __name((variants = [], { useFipsEndpoint, useDualstackEndpoint }) => { var _a; - const { headers, query = {} } = typeof request2.clone === "function" ? request2.clone() : cloneRequest(request2); - for (const name of Object.keys(headers)) { - const lname = name.toLowerCase(); - if (lname.slice(0, 6) === "x-amz-" && !((_a = options.unhoistableHeaders) == null ? void 0 : _a.has(lname))) { - query[name] = headers[name]; - delete headers[name]; + return (_a = variants.find( + ({ tags }) => useFipsEndpoint === tags.includes("fips") && useDualstackEndpoint === tags.includes("dualstack") + )) == null ? void 0 : _a.hostname; + }, "getHostnameFromVariants"); + var getResolvedHostname = /* @__PURE__ */ __name((resolvedRegion, { regionHostname, partitionHostname }) => regionHostname ? regionHostname : partitionHostname ? partitionHostname.replace("{region}", resolvedRegion) : void 0, "getResolvedHostname"); + var getResolvedPartition = /* @__PURE__ */ __name((region, { partitionHash }) => Object.keys(partitionHash || {}).find((key) => partitionHash[key].regions.includes(region)) ?? "aws", "getResolvedPartition"); + var getResolvedSigningRegion = /* @__PURE__ */ __name((hostname, { signingRegion, regionRegex, useFipsEndpoint }) => { + if (signingRegion) { + return signingRegion; + } else if (useFipsEndpoint) { + const regionRegexJs = regionRegex.replace("\\\\", "\\").replace(/^\^/g, "\\.").replace(/\$$/g, "\\."); + const regionRegexmatchArray = hostname.match(regionRegexJs); + if (regionRegexmatchArray) { + return regionRegexmatchArray[0].slice(1, -1); } } + }, "getResolvedSigningRegion"); + var getRegionInfo = /* @__PURE__ */ __name((region, { + useFipsEndpoint = false, + useDualstackEndpoint = false, + signingService, + regionHash, + partitionHash + }) => { + var _a, _b, _c, _d, _e; + const partition = getResolvedPartition(region, { partitionHash }); + const resolvedRegion = region in regionHash ? region : ((_a = partitionHash[partition]) == null ? void 0 : _a.endpoint) ?? region; + const hostnameOptions = { useFipsEndpoint, useDualstackEndpoint }; + const regionHostname = getHostnameFromVariants((_b = regionHash[resolvedRegion]) == null ? void 0 : _b.variants, hostnameOptions); + const partitionHostname = getHostnameFromVariants((_c = partitionHash[partition]) == null ? void 0 : _c.variants, hostnameOptions); + const hostname = getResolvedHostname(resolvedRegion, { regionHostname, partitionHostname }); + if (hostname === void 0) { + throw new Error(`Endpoint resolution failed for: ${{ resolvedRegion, useFipsEndpoint, useDualstackEndpoint }}`); + } + const signingRegion = getResolvedSigningRegion(hostname, { + signingRegion: (_d = regionHash[resolvedRegion]) == null ? void 0 : _d.signingRegion, + regionRegex: partitionHash[partition].regionRegex, + useFipsEndpoint + }); return { - ...request2, - headers, - query + partition, + signingService, + hostname, + ...signingRegion && { signingRegion }, + ...((_e = regionHash[resolvedRegion]) == null ? void 0 : _e.signingService) && { + signingService: regionHash[resolvedRegion].signingService + } }; - }, "moveHeadersToQuery"); - var prepareRequest = /* @__PURE__ */ __name((request2) => { - request2 = typeof request2.clone === "function" ? request2.clone() : cloneRequest(request2); - for (const headerName of Object.keys(request2.headers)) { - if (GENERATED_HEADERS.indexOf(headerName.toLowerCase()) > -1) { - delete request2.headers[headerName]; + }, "getRegionInfo"); + } +}); + +// ../../../node_modules/@smithy/core/node_modules/@smithy/util-middleware/dist-cjs/index.js +var require_dist_cjs12 = __commonJS({ + "../../../node_modules/@smithy/core/node_modules/@smithy/util-middleware/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all) => { + for (var name in all) + __defProp2(target, name, { get: all[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + getSmithyContext: () => getSmithyContext4, + normalizeProvider: () => normalizeProvider2 + }); + module2.exports = __toCommonJS2(src_exports); + var import_types5 = require_dist_cjs(); + var getSmithyContext4 = /* @__PURE__ */ __name((context) => context[import_types5.SMITHY_CONTEXT_KEY] || (context[import_types5.SMITHY_CONTEXT_KEY] = {}), "getSmithyContext"); + var normalizeProvider2 = /* @__PURE__ */ __name((input) => { + if (typeof input === "function") + return input; + const promisified = Promise.resolve(input); + return () => promisified; + }, "normalizeProvider"); + } +}); + +// ../../../node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/httpAuthSchemeMiddleware.js +function convertHttpAuthSchemesToMap(httpAuthSchemes) { + const map = /* @__PURE__ */ new Map(); + for (const scheme of httpAuthSchemes) { + map.set(scheme.schemeId, scheme); + } + return map; +} +var import_types, import_util_middleware, httpAuthSchemeMiddleware; +var init_httpAuthSchemeMiddleware = __esm({ + "../../../node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/httpAuthSchemeMiddleware.js"() { + import_types = __toESM(require_dist_cjs()); + import_util_middleware = __toESM(require_dist_cjs12()); + httpAuthSchemeMiddleware = (config, mwOptions) => (next, context) => async (args) => { + const options = config.httpAuthSchemeProvider(await mwOptions.httpAuthSchemeParametersProvider(config, context, args.input)); + const authSchemes = convertHttpAuthSchemesToMap(config.httpAuthSchemes); + const smithyContext = (0, import_util_middleware.getSmithyContext)(context); + const failureReasons = []; + for (const option of options) { + const scheme = authSchemes.get(option.schemeId); + if (!scheme) { + failureReasons.push(`HttpAuthScheme \`${option.schemeId}\` was not enabled for this service.`); + continue; + } + const identityProvider = scheme.identityProvider(await mwOptions.identityProviderConfigProvider(config)); + if (!identityProvider) { + failureReasons.push(`HttpAuthScheme \`${option.schemeId}\` did not have an IdentityProvider configured.`); + continue; } + const { identityProperties = {}, signingProperties = {} } = option.propertiesExtractor?.(config, context) || {}; + option.identityProperties = Object.assign(option.identityProperties || {}, identityProperties); + option.signingProperties = Object.assign(option.signingProperties || {}, signingProperties); + smithyContext.selectedHttpAuthScheme = { + httpAuthOption: option, + identity: await identityProvider(option.identityProperties), + signer: scheme.signer + }; + break; } - return request2; - }, "prepareRequest"); - var iso8601 = /* @__PURE__ */ __name((time) => toDate(time).toISOString().replace(/\.\d{3}Z$/, "Z"), "iso8601"); - var toDate = /* @__PURE__ */ __name((time) => { - if (typeof time === "number") { - return new Date(time * 1e3); + if (!smithyContext.selectedHttpAuthScheme) { + throw new Error(failureReasons.join("\n")); } - if (typeof time === "string") { - if (Number(time)) { - return new Date(Number(time) * 1e3); + return next(args); + }; + } +}); + +// ../../../node_modules/@smithy/core/node_modules/@smithy/property-provider/dist-cjs/index.js +var require_dist_cjs13 = __commonJS({ + "../../../node_modules/@smithy/core/node_modules/@smithy/property-provider/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all) => { + for (var name in all) + __defProp2(target, name, { get: all[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + CredentialsProviderError: () => CredentialsProviderError, + ProviderError: () => ProviderError2, + TokenProviderError: () => TokenProviderError, + chain: () => chain, + fromStatic: () => fromStatic, + memoize: () => memoize + }); + module2.exports = __toCommonJS2(src_exports); + var _ProviderError = class _ProviderError2 extends Error { + constructor(message, options = true) { + var _a; + let logger; + let tryNextLink = true; + if (typeof options === "boolean") { + logger = void 0; + tryNextLink = options; + } else if (options != null && typeof options === "object") { + logger = options.logger; + tryNextLink = options.tryNextLink ?? true; } - return new Date(time); + super(message); + this.name = "ProviderError"; + this.tryNextLink = tryNextLink; + Object.setPrototypeOf(this, _ProviderError2.prototype); + (_a = logger == null ? void 0 : logger.debug) == null ? void 0 : _a.call(logger, `@smithy/property-provider ${tryNextLink ? "->" : "(!)"} ${message}`); } - return time; - }, "toDate"); - var _SignatureV4 = class _SignatureV4 { - constructor({ - applyChecksum, - credentials, - region, - service, - sha256, - uriEscapePath = true - }) { - this.headerFormatter = new HeaderFormatter(); - this.service = service; - this.sha256 = sha256; - this.uriEscapePath = uriEscapePath; - this.applyChecksum = typeof applyChecksum === "boolean" ? applyChecksum : true; - this.regionProvider = (0, import_util_middleware.normalizeProvider)(region); - this.credentialProvider = (0, import_util_middleware.normalizeProvider)(credentials); + /** + * @deprecated use new operator. + */ + static from(error, options = true) { + return Object.assign(new this(error.message, options), error); } - async presign(originalRequest, options = {}) { - const { - signingDate = /* @__PURE__ */ new Date(), - expiresIn = 3600, - unsignableHeaders, - unhoistableHeaders, - signableHeaders, - signingRegion, - signingService - } = options; - const credentials = await this.credentialProvider(); - this.validateResolvedCredentials(credentials); - const region = signingRegion ?? await this.regionProvider(); - const { longDate, shortDate } = formatDate(signingDate); - if (expiresIn > MAX_PRESIGNED_TTL) { - return Promise.reject( - "Signature version 4 presigned URLs must have an expiration date less than one week in the future" - ); - } - const scope = createScope(shortDate, region, signingService ?? this.service); - const request2 = moveHeadersToQuery(prepareRequest(originalRequest), { unhoistableHeaders }); - if (credentials.sessionToken) { - request2.query[TOKEN_QUERY_PARAM] = credentials.sessionToken; - } - request2.query[ALGORITHM_QUERY_PARAM] = ALGORITHM_IDENTIFIER; - request2.query[CREDENTIAL_QUERY_PARAM] = `${credentials.accessKeyId}/${scope}`; - request2.query[AMZ_DATE_QUERY_PARAM] = longDate; - request2.query[EXPIRES_QUERY_PARAM] = expiresIn.toString(10); - const canonicalHeaders = getCanonicalHeaders(request2, unsignableHeaders, signableHeaders); - request2.query[SIGNED_HEADERS_QUERY_PARAM] = getCanonicalHeaderList(canonicalHeaders); - request2.query[SIGNATURE_QUERY_PARAM] = await this.getSignature( - longDate, - scope, - this.getSigningKey(credentials, region, shortDate, signingService), - this.createCanonicalRequest(request2, canonicalHeaders, await getPayloadHash(originalRequest, this.sha256)) - ); - return request2; + }; + __name(_ProviderError, "ProviderError"); + var ProviderError2 = _ProviderError; + var _CredentialsProviderError = class _CredentialsProviderError2 extends ProviderError2 { + /** + * @override + */ + constructor(message, options = true) { + super(message, options); + this.name = "CredentialsProviderError"; + Object.setPrototypeOf(this, _CredentialsProviderError2.prototype); } - async sign(toSign, options) { - if (typeof toSign === "string") { - return this.signString(toSign, options); - } else if (toSign.headers && toSign.payload) { - return this.signEvent(toSign, options); - } else if (toSign.message) { - return this.signMessage(toSign, options); - } else { - return this.signRequest(toSign, options); - } + }; + __name(_CredentialsProviderError, "CredentialsProviderError"); + var CredentialsProviderError = _CredentialsProviderError; + var _TokenProviderError = class _TokenProviderError2 extends ProviderError2 { + /** + * @override + */ + constructor(message, options = true) { + super(message, options); + this.name = "TokenProviderError"; + Object.setPrototypeOf(this, _TokenProviderError2.prototype); } - async signEvent({ headers, payload }, { signingDate = /* @__PURE__ */ new Date(), priorSignature, signingRegion, signingService }) { - const region = signingRegion ?? await this.regionProvider(); - const { shortDate, longDate } = formatDate(signingDate); - const scope = createScope(shortDate, region, signingService ?? this.service); - const hashedPayload = await getPayloadHash({ headers: {}, body: payload }, this.sha256); - const hash = new this.sha256(); - hash.update(headers); - const hashedHeaders = (0, import_util_hex_encoding.toHex)(await hash.digest()); - const stringToSign = [ - EVENT_ALGORITHM_IDENTIFIER, - longDate, - scope, - priorSignature, - hashedHeaders, - hashedPayload - ].join("\n"); - return this.signString(stringToSign, { signingDate, signingRegion: region, signingService }); + }; + __name(_TokenProviderError, "TokenProviderError"); + var TokenProviderError = _TokenProviderError; + var chain = /* @__PURE__ */ __name((...providers) => async () => { + if (providers.length === 0) { + throw new ProviderError2("No providers in chain"); } - async signMessage(signableMessage, { signingDate = /* @__PURE__ */ new Date(), signingRegion, signingService }) { - const promise = this.signEvent( - { - headers: this.headerFormatter.format(signableMessage.message.headers), - payload: signableMessage.message.body - }, - { - signingDate, - signingRegion, - signingService, - priorSignature: signableMessage.priorSignature + let lastProviderError; + for (const provider of providers) { + try { + const credentials = await provider(); + return credentials; + } catch (err) { + lastProviderError = err; + if (err == null ? void 0 : err.tryNextLink) { + continue; } - ); - return promise.then((signature) => { - return { message: signableMessage.message, signature }; - }); - } - async signString(stringToSign, { signingDate = /* @__PURE__ */ new Date(), signingRegion, signingService } = {}) { - const credentials = await this.credentialProvider(); - this.validateResolvedCredentials(credentials); - const region = signingRegion ?? await this.regionProvider(); - const { shortDate } = formatDate(signingDate); - const hash = new this.sha256(await this.getSigningKey(credentials, region, shortDate, signingService)); - hash.update((0, import_util_utf84.toUint8Array)(stringToSign)); - return (0, import_util_hex_encoding.toHex)(await hash.digest()); + throw err; + } } - async signRequest(requestToSign, { - signingDate = /* @__PURE__ */ new Date(), - signableHeaders, - unsignableHeaders, - signingRegion, - signingService - } = {}) { - const credentials = await this.credentialProvider(); - this.validateResolvedCredentials(credentials); - const region = signingRegion ?? await this.regionProvider(); - const request2 = prepareRequest(requestToSign); - const { longDate, shortDate } = formatDate(signingDate); - const scope = createScope(shortDate, region, signingService ?? this.service); - request2.headers[AMZ_DATE_HEADER] = longDate; - if (credentials.sessionToken) { - request2.headers[TOKEN_HEADER] = credentials.sessionToken; + throw lastProviderError; + }, "chain"); + var fromStatic = /* @__PURE__ */ __name((staticValue) => () => Promise.resolve(staticValue), "fromStatic"); + var memoize = /* @__PURE__ */ __name((provider, isExpired, requiresRefresh) => { + let resolved; + let pending; + let hasResult; + let isConstant = false; + const coalesceProvider = /* @__PURE__ */ __name(async () => { + if (!pending) { + pending = provider(); } - const payloadHash = await getPayloadHash(request2, this.sha256); - if (!hasHeader(SHA256_HEADER, request2.headers) && this.applyChecksum) { - request2.headers[SHA256_HEADER] = payloadHash; + try { + resolved = await pending; + hasResult = true; + isConstant = false; + } finally { + pending = void 0; } - const canonicalHeaders = getCanonicalHeaders(request2, unsignableHeaders, signableHeaders); - const signature = await this.getSignature( - longDate, - scope, - this.getSigningKey(credentials, region, shortDate, signingService), - this.createCanonicalRequest(request2, canonicalHeaders, payloadHash) - ); - request2.headers[AUTH_HEADER] = `${ALGORITHM_IDENTIFIER} Credential=${credentials.accessKeyId}/${scope}, SignedHeaders=${getCanonicalHeaderList(canonicalHeaders)}, Signature=${signature}`; - return request2; - } - createCanonicalRequest(request2, canonicalHeaders, payloadHash) { - const sortedHeaders = Object.keys(canonicalHeaders).sort(); - return `${request2.method} -${this.getCanonicalPath(request2)} -${getCanonicalQuery(request2)} -${sortedHeaders.map((name) => `${name}:${canonicalHeaders[name]}`).join("\n")} - -${sortedHeaders.join(";")} -${payloadHash}`; - } - async createStringToSign(longDate, credentialScope, canonicalRequest) { - const hash = new this.sha256(); - hash.update((0, import_util_utf84.toUint8Array)(canonicalRequest)); - const hashedRequest = await hash.digest(); - return `${ALGORITHM_IDENTIFIER} -${longDate} -${credentialScope} -${(0, import_util_hex_encoding.toHex)(hashedRequest)}`; + return resolved; + }, "coalesceProvider"); + if (isExpired === void 0) { + return async (options) => { + if (!hasResult || (options == null ? void 0 : options.forceRefresh)) { + resolved = await coalesceProvider(); + } + return resolved; + }; } - getCanonicalPath({ path }) { - if (this.uriEscapePath) { - const normalizedPathSegments = []; - for (const pathSegment of path.split("/")) { - if ((pathSegment == null ? void 0 : pathSegment.length) === 0) - continue; - if (pathSegment === ".") - continue; - if (pathSegment === "..") { - normalizedPathSegments.pop(); - } else { - normalizedPathSegments.push(pathSegment); - } - } - const normalizedPath = `${(path == null ? void 0 : path.startsWith("/")) ? "/" : ""}${normalizedPathSegments.join("/")}${normalizedPathSegments.length > 0 && (path == null ? void 0 : path.endsWith("/")) ? "/" : ""}`; - const doubleEncoded = (0, import_util_uri_escape.escapeUri)(normalizedPath); - return doubleEncoded.replace(/%2F/g, "/"); + return async (options) => { + if (!hasResult || (options == null ? void 0 : options.forceRefresh)) { + resolved = await coalesceProvider(); } - return path; - } - async getSignature(longDate, credentialScope, keyPromise, canonicalRequest) { - const stringToSign = await this.createStringToSign(longDate, credentialScope, canonicalRequest); - const hash = new this.sha256(await keyPromise); - hash.update((0, import_util_utf84.toUint8Array)(stringToSign)); - return (0, import_util_hex_encoding.toHex)(await hash.digest()); - } - getSigningKey(credentials, region, shortDate, service) { - return getSigningKey(this.sha256, credentials, shortDate, region, service || this.service); - } - validateResolvedCredentials(credentials) { - if (typeof credentials !== "object" || // @ts-expect-error: Property 'accessKeyId' does not exist on type 'object'.ts(2339) - typeof credentials.accessKeyId !== "string" || // @ts-expect-error: Property 'secretAccessKey' does not exist on type 'object'.ts(2339) - typeof credentials.secretAccessKey !== "string") { - throw new Error("Resolved credential object is not valid"); + if (isConstant) { + return resolved; } - } - }; - __name(_SignatureV4, "SignatureV4"); - var SignatureV4 = _SignatureV4; - var formatDate = /* @__PURE__ */ __name((now) => { - const longDate = iso8601(now).replace(/[\-:]/g, ""); - return { - longDate, - shortDate: longDate.slice(0, 8) + if (requiresRefresh && !requiresRefresh(resolved)) { + isConstant = true; + return resolved; + } + if (isExpired(resolved)) { + await coalesceProvider(); + return resolved; + } + return resolved; }; - }, "formatDate"); - var getCanonicalHeaderList = /* @__PURE__ */ __name((headers) => Object.keys(headers).sort().join(";"), "getCanonicalHeaderList"); + }, "memoize"); } }); -// ../../../node_modules/@aws-sdk/middleware-signing/dist-cjs/awsAuthConfiguration.js -var require_awsAuthConfiguration = __commonJS({ - "../../../node_modules/@aws-sdk/middleware-signing/dist-cjs/awsAuthConfiguration.js"(exports2) { +// ../../../node_modules/@smithy/core/node_modules/@smithy/shared-ini-file-loader/dist-cjs/getHomeDir.js +var require_getHomeDir = __commonJS({ + "../../../node_modules/@smithy/core/node_modules/@smithy/shared-ini-file-loader/dist-cjs/getHomeDir.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.resolveSigV4AuthConfig = exports2.resolveAwsAuthConfig = void 0; - var property_provider_1 = require_dist_cjs6(); - var signature_v4_1 = require_dist_cjs13(); - var util_middleware_1 = require_dist_cjs7(); - var CREDENTIAL_EXPIRE_WINDOW = 3e5; - var resolveAwsAuthConfig = (input) => { - const normalizedCreds = input.credentials ? normalizeCredentialProvider(input.credentials) : input.credentialDefaultProvider(input); - const { signingEscapePath = true, systemClockOffset = input.systemClockOffset || 0, sha256 } = input; - let signer; - if (input.signer) { - signer = (0, util_middleware_1.normalizeProvider)(input.signer); - } else if (input.regionInfoProvider) { - signer = () => (0, util_middleware_1.normalizeProvider)(input.region)().then(async (region) => [ - await input.regionInfoProvider(region, { - useFipsEndpoint: await input.useFipsEndpoint(), - useDualstackEndpoint: await input.useDualstackEndpoint() - }) || {}, - region - ]).then(([regionInfo, region]) => { - const { signingRegion, signingService } = regionInfo; - input.signingRegion = input.signingRegion || signingRegion || region; - input.signingName = input.signingName || signingService || input.serviceId; - const params = { - ...input, - credentials: normalizedCreds, - region: input.signingRegion, - service: input.signingName, - sha256, - uriEscapePath: signingEscapePath - }; - const SignerCtor = input.signerConstructor || signature_v4_1.SignatureV4; - return new SignerCtor(params); - }); - } else { - signer = async (authScheme) => { - authScheme = Object.assign({}, { - name: "sigv4", - signingName: input.signingName || input.defaultSigningName, - signingRegion: await (0, util_middleware_1.normalizeProvider)(input.region)(), - properties: {} - }, authScheme); - const signingRegion = authScheme.signingRegion; - const signingService = authScheme.signingName; - input.signingRegion = input.signingRegion || signingRegion; - input.signingName = input.signingName || signingService || input.serviceId; - const params = { - ...input, - credentials: normalizedCreds, - region: input.signingRegion, - service: input.signingName, - sha256, - uriEscapePath: signingEscapePath - }; - const SignerCtor = input.signerConstructor || signature_v4_1.SignatureV4; - return new SignerCtor(params); - }; - } - return { - ...input, - systemClockOffset, - signingEscapePath, - credentials: normalizedCreds, - signer - }; - }; - exports2.resolveAwsAuthConfig = resolveAwsAuthConfig; - var resolveSigV4AuthConfig = (input) => { - const normalizedCreds = input.credentials ? normalizeCredentialProvider(input.credentials) : input.credentialDefaultProvider(input); - const { signingEscapePath = true, systemClockOffset = input.systemClockOffset || 0, sha256 } = input; - let signer; - if (input.signer) { - signer = (0, util_middleware_1.normalizeProvider)(input.signer); - } else { - signer = (0, util_middleware_1.normalizeProvider)(new signature_v4_1.SignatureV4({ - credentials: normalizedCreds, - region: input.region, - service: input.signingName, - sha256, - uriEscapePath: signingEscapePath - })); + exports2.getHomeDir = void 0; + var os_1 = require("os"); + var path_1 = require("path"); + var homeDirCache = {}; + var getHomeDirCacheKey = () => { + if (process && process.geteuid) { + return `${process.geteuid()}`; } - return { - ...input, - systemClockOffset, - signingEscapePath, - credentials: normalizedCreds, - signer - }; + return "DEFAULT"; }; - exports2.resolveSigV4AuthConfig = resolveSigV4AuthConfig; - var normalizeCredentialProvider = (credentials) => { - if (typeof credentials === "function") { - return (0, property_provider_1.memoize)(credentials, (credentials2) => credentials2.expiration !== void 0 && credentials2.expiration.getTime() - Date.now() < CREDENTIAL_EXPIRE_WINDOW, (credentials2) => credentials2.expiration !== void 0); - } - return (0, util_middleware_1.normalizeProvider)(credentials); + var getHomeDir2 = () => { + const { HOME, USERPROFILE, HOMEPATH, HOMEDRIVE = `C:${path_1.sep}` } = process.env; + if (HOME) + return HOME; + if (USERPROFILE) + return USERPROFILE; + if (HOMEPATH) + return `${HOMEDRIVE}${HOMEPATH}`; + const homeDirCacheKey = getHomeDirCacheKey(); + if (!homeDirCache[homeDirCacheKey]) + homeDirCache[homeDirCacheKey] = (0, os_1.homedir)(); + return homeDirCache[homeDirCacheKey]; }; + exports2.getHomeDir = getHomeDir2; } }); -// ../../../node_modules/@aws-sdk/middleware-signing/dist-cjs/utils/getSkewCorrectedDate.js -var require_getSkewCorrectedDate = __commonJS({ - "../../../node_modules/@aws-sdk/middleware-signing/dist-cjs/utils/getSkewCorrectedDate.js"(exports2) { +// ../../../node_modules/@smithy/core/node_modules/@smithy/shared-ini-file-loader/dist-cjs/getSSOTokenFilepath.js +var require_getSSOTokenFilepath = __commonJS({ + "../../../node_modules/@smithy/core/node_modules/@smithy/shared-ini-file-loader/dist-cjs/getSSOTokenFilepath.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getSkewCorrectedDate = void 0; - var getSkewCorrectedDate = (systemClockOffset) => new Date(Date.now() + systemClockOffset); - exports2.getSkewCorrectedDate = getSkewCorrectedDate; + exports2.getSSOTokenFilepath = void 0; + var crypto_1 = require("crypto"); + var path_1 = require("path"); + var getHomeDir_1 = require_getHomeDir(); + var getSSOTokenFilepath2 = (id) => { + const hasher = (0, crypto_1.createHash)("sha1"); + const cacheName = hasher.update(id).digest("hex"); + return (0, path_1.join)((0, getHomeDir_1.getHomeDir)(), ".aws", "sso", "cache", `${cacheName}.json`); + }; + exports2.getSSOTokenFilepath = getSSOTokenFilepath2; } }); -// ../../../node_modules/@aws-sdk/middleware-signing/dist-cjs/utils/isClockSkewed.js -var require_isClockSkewed = __commonJS({ - "../../../node_modules/@aws-sdk/middleware-signing/dist-cjs/utils/isClockSkewed.js"(exports2) { +// ../../../node_modules/@smithy/core/node_modules/@smithy/shared-ini-file-loader/dist-cjs/getSSOTokenFromFile.js +var require_getSSOTokenFromFile = __commonJS({ + "../../../node_modules/@smithy/core/node_modules/@smithy/shared-ini-file-loader/dist-cjs/getSSOTokenFromFile.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.isClockSkewed = void 0; - var getSkewCorrectedDate_1 = require_getSkewCorrectedDate(); - var isClockSkewed = (clockTime, systemClockOffset) => Math.abs((0, getSkewCorrectedDate_1.getSkewCorrectedDate)(systemClockOffset).getTime() - clockTime) >= 3e5; - exports2.isClockSkewed = isClockSkewed; + exports2.getSSOTokenFromFile = void 0; + var fs_1 = require("fs"); + var getSSOTokenFilepath_1 = require_getSSOTokenFilepath(); + var { readFile } = fs_1.promises; + var getSSOTokenFromFile2 = async (id) => { + const ssoTokenFilepath = (0, getSSOTokenFilepath_1.getSSOTokenFilepath)(id); + const ssoTokenText = await readFile(ssoTokenFilepath, "utf8"); + return JSON.parse(ssoTokenText); + }; + exports2.getSSOTokenFromFile = getSSOTokenFromFile2; } }); -// ../../../node_modules/@aws-sdk/middleware-signing/dist-cjs/utils/getUpdatedSystemClockOffset.js -var require_getUpdatedSystemClockOffset = __commonJS({ - "../../../node_modules/@aws-sdk/middleware-signing/dist-cjs/utils/getUpdatedSystemClockOffset.js"(exports2) { +// ../../../node_modules/@smithy/core/node_modules/@smithy/shared-ini-file-loader/dist-cjs/slurpFile.js +var require_slurpFile = __commonJS({ + "../../../node_modules/@smithy/core/node_modules/@smithy/shared-ini-file-loader/dist-cjs/slurpFile.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getUpdatedSystemClockOffset = void 0; - var isClockSkewed_1 = require_isClockSkewed(); - var getUpdatedSystemClockOffset = (clockTime, currentSystemClockOffset) => { - const clockTimeInMs = Date.parse(clockTime); - if ((0, isClockSkewed_1.isClockSkewed)(clockTimeInMs, currentSystemClockOffset)) { - return clockTimeInMs - Date.now(); + exports2.slurpFile = void 0; + var fs_1 = require("fs"); + var { readFile } = fs_1.promises; + var filePromisesHash = {}; + var slurpFile = (path, options) => { + if (!filePromisesHash[path] || (options === null || options === void 0 ? void 0 : options.ignoreCache)) { + filePromisesHash[path] = readFile(path, "utf8"); } - return currentSystemClockOffset; + return filePromisesHash[path]; }; - exports2.getUpdatedSystemClockOffset = getUpdatedSystemClockOffset; + exports2.slurpFile = slurpFile; } }); -// ../../../node_modules/@aws-sdk/middleware-signing/dist-cjs/awsAuthMiddleware.js -var require_awsAuthMiddleware = __commonJS({ - "../../../node_modules/@aws-sdk/middleware-signing/dist-cjs/awsAuthMiddleware.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getSigV4AuthPlugin = exports2.getAwsAuthPlugin = exports2.awsAuthMiddlewareOptions = exports2.awsAuthMiddleware = void 0; - var protocol_http_1 = require_dist_cjs2(); - var getSkewCorrectedDate_1 = require_getSkewCorrectedDate(); - var getUpdatedSystemClockOffset_1 = require_getUpdatedSystemClockOffset(); - var awsAuthMiddleware = (options) => (next, context) => async function(args) { - var _a, _b, _c, _d; - if (!protocol_http_1.HttpRequest.isInstance(args.request)) - return next(args); - const authScheme = (_c = (_b = (_a = context.endpointV2) === null || _a === void 0 ? void 0 : _a.properties) === null || _b === void 0 ? void 0 : _b.authSchemes) === null || _c === void 0 ? void 0 : _c[0]; - const multiRegionOverride = (authScheme === null || authScheme === void 0 ? void 0 : authScheme.name) === "sigv4a" ? (_d = authScheme === null || authScheme === void 0 ? void 0 : authScheme.signingRegionSet) === null || _d === void 0 ? void 0 : _d.join(",") : void 0; - const signer = await options.signer(authScheme); - const output = await next({ - ...args, - request: await signer.sign(args.request, { - signingDate: (0, getSkewCorrectedDate_1.getSkewCorrectedDate)(options.systemClockOffset), - signingRegion: multiRegionOverride || context["signing_region"], - signingService: context["signing_service"] - }) - }).catch((error) => { - var _a2; - const serverTime = (_a2 = error.ServerTime) !== null && _a2 !== void 0 ? _a2 : getDateHeader(error.$response); - if (serverTime) { - options.systemClockOffset = (0, getUpdatedSystemClockOffset_1.getUpdatedSystemClockOffset)(serverTime, options.systemClockOffset); - } - throw error; - }); - const dateHeader = getDateHeader(output.response); - if (dateHeader) { - options.systemClockOffset = (0, getUpdatedSystemClockOffset_1.getUpdatedSystemClockOffset)(dateHeader, options.systemClockOffset); - } - return output; - }; - exports2.awsAuthMiddleware = awsAuthMiddleware; - var getDateHeader = (response) => { - var _a, _b, _c; - return protocol_http_1.HttpResponse.isInstance(response) ? (_b = (_a = response.headers) === null || _a === void 0 ? void 0 : _a.date) !== null && _b !== void 0 ? _b : (_c = response.headers) === null || _c === void 0 ? void 0 : _c.Date : void 0; - }; - exports2.awsAuthMiddlewareOptions = { - name: "awsAuthMiddleware", - tags: ["SIGNATURE", "AWSAUTH"], - relation: "after", - toMiddleware: "retryMiddleware", - override: true +// ../../../node_modules/@smithy/core/node_modules/@smithy/shared-ini-file-loader/dist-cjs/index.js +var require_dist_cjs14 = __commonJS({ + "../../../node_modules/@smithy/core/node_modules/@smithy/shared-ini-file-loader/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all) => { + for (var name in all) + __defProp2(target, name, { get: all[name], enumerable: true }); }; - var getAwsAuthPlugin = (options) => ({ - applyToStack: (clientStack) => { - clientStack.addRelativeTo((0, exports2.awsAuthMiddleware)(options), exports2.awsAuthMiddlewareOptions); + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); } + return to; + }; + var __reExport = (target, mod, secondTarget) => (__copyProps2(target, mod, "default"), secondTarget && __copyProps2(secondTarget, mod, "default")); + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + CONFIG_PREFIX_SEPARATOR: () => CONFIG_PREFIX_SEPARATOR, + DEFAULT_PROFILE: () => DEFAULT_PROFILE, + ENV_PROFILE: () => ENV_PROFILE, + getProfileName: () => getProfileName, + loadSharedConfigFiles: () => loadSharedConfigFiles, + loadSsoSessionData: () => loadSsoSessionData, + parseKnownFiles: () => parseKnownFiles }); - exports2.getAwsAuthPlugin = getAwsAuthPlugin; - exports2.getSigV4AuthPlugin = exports2.getAwsAuthPlugin; - } -}); - -// ../../../node_modules/@aws-sdk/middleware-signing/dist-cjs/index.js -var require_dist_cjs14 = __commonJS({ - "../../../node_modules/@aws-sdk/middleware-signing/dist-cjs/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); - tslib_1.__exportStar(require_awsAuthConfiguration(), exports2); - tslib_1.__exportStar(require_awsAuthMiddleware(), exports2); - } -}); - -// ../../../node_modules/@aws-sdk/middleware-user-agent/dist-cjs/configurations.js -var require_configurations = __commonJS({ - "../../../node_modules/@aws-sdk/middleware-user-agent/dist-cjs/configurations.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.resolveUserAgentConfig = void 0; - function resolveUserAgentConfig(input) { - return { - ...input, - customUserAgent: typeof input.customUserAgent === "string" ? [[input.customUserAgent]] : input.customUserAgent - }; - } - exports2.resolveUserAgentConfig = resolveUserAgentConfig; - } -}); - -// ../../../node_modules/@aws-sdk/util-endpoints/dist-cjs/lib/aws/partitions.json -var require_partitions = __commonJS({ - "../../../node_modules/@aws-sdk/util-endpoints/dist-cjs/lib/aws/partitions.json"(exports2, module2) { - module2.exports = { - partitions: [{ - id: "aws", - outputs: { - dnsSuffix: "amazonaws.com", - dualStackDnsSuffix: "api.aws", - implicitGlobalRegion: "us-east-1", - name: "aws", - supportsDualStack: true, - supportsFIPS: true - }, - regionRegex: "^(us|eu|ap|sa|ca|me|af|il)\\-\\w+\\-\\d+$", - regions: { - "af-south-1": { - description: "Africa (Cape Town)" - }, - "ap-east-1": { - description: "Asia Pacific (Hong Kong)" - }, - "ap-northeast-1": { - description: "Asia Pacific (Tokyo)" - }, - "ap-northeast-2": { - description: "Asia Pacific (Seoul)" - }, - "ap-northeast-3": { - description: "Asia Pacific (Osaka)" - }, - "ap-south-1": { - description: "Asia Pacific (Mumbai)" - }, - "ap-south-2": { - description: "Asia Pacific (Hyderabad)" - }, - "ap-southeast-1": { - description: "Asia Pacific (Singapore)" - }, - "ap-southeast-2": { - description: "Asia Pacific (Sydney)" - }, - "ap-southeast-3": { - description: "Asia Pacific (Jakarta)" - }, - "ap-southeast-4": { - description: "Asia Pacific (Melbourne)" - }, - "aws-global": { - description: "AWS Standard global region" - }, - "ca-central-1": { - description: "Canada (Central)" - }, - "eu-central-1": { - description: "Europe (Frankfurt)" - }, - "eu-central-2": { - description: "Europe (Zurich)" - }, - "eu-north-1": { - description: "Europe (Stockholm)" - }, - "eu-south-1": { - description: "Europe (Milan)" - }, - "eu-south-2": { - description: "Europe (Spain)" - }, - "eu-west-1": { - description: "Europe (Ireland)" - }, - "eu-west-2": { - description: "Europe (London)" - }, - "eu-west-3": { - description: "Europe (Paris)" - }, - "il-central-1": { - description: "Israel (Tel Aviv)" - }, - "me-central-1": { - description: "Middle East (UAE)" - }, - "me-south-1": { - description: "Middle East (Bahrain)" - }, - "sa-east-1": { - description: "South America (Sao Paulo)" - }, - "us-east-1": { - description: "US East (N. Virginia)" - }, - "us-east-2": { - description: "US East (Ohio)" - }, - "us-west-1": { - description: "US West (N. California)" - }, - "us-west-2": { - description: "US West (Oregon)" - } - } - }, { - id: "aws-cn", - outputs: { - dnsSuffix: "amazonaws.com.cn", - dualStackDnsSuffix: "api.amazonwebservices.com.cn", - implicitGlobalRegion: "cn-northwest-1", - name: "aws-cn", - supportsDualStack: true, - supportsFIPS: true - }, - regionRegex: "^cn\\-\\w+\\-\\d+$", - regions: { - "aws-cn-global": { - description: "AWS China global region" - }, - "cn-north-1": { - description: "China (Beijing)" - }, - "cn-northwest-1": { - description: "China (Ningxia)" + module2.exports = __toCommonJS2(src_exports); + __reExport(src_exports, require_getHomeDir(), module2.exports); + var ENV_PROFILE = "AWS_PROFILE"; + var DEFAULT_PROFILE = "default"; + var getProfileName = /* @__PURE__ */ __name((init) => init.profile || process.env[ENV_PROFILE] || DEFAULT_PROFILE, "getProfileName"); + __reExport(src_exports, require_getSSOTokenFilepath(), module2.exports); + __reExport(src_exports, require_getSSOTokenFromFile(), module2.exports); + var import_types5 = require_dist_cjs(); + var getConfigData = /* @__PURE__ */ __name((data) => Object.entries(data).filter(([key]) => { + const indexOfSeparator = key.indexOf(CONFIG_PREFIX_SEPARATOR); + if (indexOfSeparator === -1) { + return false; + } + return Object.values(import_types5.IniSectionType).includes(key.substring(0, indexOfSeparator)); + }).reduce( + (acc, [key, value]) => { + const indexOfSeparator = key.indexOf(CONFIG_PREFIX_SEPARATOR); + const updatedKey = key.substring(0, indexOfSeparator) === import_types5.IniSectionType.PROFILE ? key.substring(indexOfSeparator + 1) : key; + acc[updatedKey] = value; + return acc; + }, + { + // Populate default profile, if present. + ...data.default && { default: data.default } + } + ), "getConfigData"); + var import_path = require("path"); + var import_getHomeDir = require_getHomeDir(); + var ENV_CONFIG_PATH = "AWS_CONFIG_FILE"; + var getConfigFilepath = /* @__PURE__ */ __name(() => process.env[ENV_CONFIG_PATH] || (0, import_path.join)((0, import_getHomeDir.getHomeDir)(), ".aws", "config"), "getConfigFilepath"); + var import_getHomeDir2 = require_getHomeDir(); + var ENV_CREDENTIALS_PATH = "AWS_SHARED_CREDENTIALS_FILE"; + var getCredentialsFilepath = /* @__PURE__ */ __name(() => process.env[ENV_CREDENTIALS_PATH] || (0, import_path.join)((0, import_getHomeDir2.getHomeDir)(), ".aws", "credentials"), "getCredentialsFilepath"); + var import_getHomeDir3 = require_getHomeDir(); + var prefixKeyRegex = /^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/; + var profileNameBlockList = ["__proto__", "profile __proto__"]; + var parseIni = /* @__PURE__ */ __name((iniData) => { + const map = {}; + let currentSection; + let currentSubSection; + for (const iniLine of iniData.split(/\r?\n/)) { + const trimmedLine = iniLine.split(/(^|\s)[;#]/)[0].trim(); + const isSection = trimmedLine[0] === "[" && trimmedLine[trimmedLine.length - 1] === "]"; + if (isSection) { + currentSection = void 0; + currentSubSection = void 0; + const sectionName = trimmedLine.substring(1, trimmedLine.length - 1); + const matches = prefixKeyRegex.exec(sectionName); + if (matches) { + const [, prefix, , name] = matches; + if (Object.values(import_types5.IniSectionType).includes(prefix)) { + currentSection = [prefix, name].join(CONFIG_PREFIX_SEPARATOR); + } + } else { + currentSection = sectionName; } - } - }, { - id: "aws-us-gov", - outputs: { - dnsSuffix: "amazonaws.com", - dualStackDnsSuffix: "api.aws", - implicitGlobalRegion: "us-gov-west-1", - name: "aws-us-gov", - supportsDualStack: true, - supportsFIPS: true - }, - regionRegex: "^us\\-gov\\-\\w+\\-\\d+$", - regions: { - "aws-us-gov-global": { - description: "AWS GovCloud (US) global region" - }, - "us-gov-east-1": { - description: "AWS GovCloud (US-East)" - }, - "us-gov-west-1": { - description: "AWS GovCloud (US-West)" + if (profileNameBlockList.includes(sectionName)) { + throw new Error(`Found invalid profile name "${sectionName}"`); } - } - }, { - id: "aws-iso", - outputs: { - dnsSuffix: "c2s.ic.gov", - dualStackDnsSuffix: "c2s.ic.gov", - implicitGlobalRegion: "us-iso-east-1", - name: "aws-iso", - supportsDualStack: false, - supportsFIPS: true - }, - regionRegex: "^us\\-iso\\-\\w+\\-\\d+$", - regions: { - "aws-iso-global": { - description: "AWS ISO (US) global region" - }, - "us-iso-east-1": { - description: "US ISO East" - }, - "us-iso-west-1": { - description: "US ISO WEST" + } else if (currentSection) { + const indexOfEqualsSign = trimmedLine.indexOf("="); + if (![0, -1].includes(indexOfEqualsSign)) { + const [name, value] = [ + trimmedLine.substring(0, indexOfEqualsSign).trim(), + trimmedLine.substring(indexOfEqualsSign + 1).trim() + ]; + if (value === "") { + currentSubSection = name; + } else { + if (currentSubSection && iniLine.trimStart() === iniLine) { + currentSubSection = void 0; + } + map[currentSection] = map[currentSection] || {}; + const key = currentSubSection ? [currentSubSection, name].join(CONFIG_PREFIX_SEPARATOR) : name; + map[currentSection][key] = value; + } } } - }, { - id: "aws-iso-b", - outputs: { - dnsSuffix: "sc2s.sgov.gov", - dualStackDnsSuffix: "sc2s.sgov.gov", - implicitGlobalRegion: "us-isob-east-1", - name: "aws-iso-b", - supportsDualStack: false, - supportsFIPS: true - }, - regionRegex: "^us\\-isob\\-\\w+\\-\\d+$", - regions: { - "aws-iso-b-global": { - description: "AWS ISOB (US) global region" - }, - "us-isob-east-1": { - description: "US ISOB East (Ohio)" + } + return map; + }, "parseIni"); + var import_slurpFile = require_slurpFile(); + var swallowError = /* @__PURE__ */ __name(() => ({}), "swallowError"); + var CONFIG_PREFIX_SEPARATOR = "."; + var loadSharedConfigFiles = /* @__PURE__ */ __name(async (init = {}) => { + const { filepath = getCredentialsFilepath(), configFilepath = getConfigFilepath() } = init; + const homeDir = (0, import_getHomeDir3.getHomeDir)(); + const relativeHomeDirPrefix = "~/"; + let resolvedFilepath = filepath; + if (filepath.startsWith(relativeHomeDirPrefix)) { + resolvedFilepath = (0, import_path.join)(homeDir, filepath.slice(2)); + } + let resolvedConfigFilepath = configFilepath; + if (configFilepath.startsWith(relativeHomeDirPrefix)) { + resolvedConfigFilepath = (0, import_path.join)(homeDir, configFilepath.slice(2)); + } + const parsedFiles = await Promise.all([ + (0, import_slurpFile.slurpFile)(resolvedConfigFilepath, { + ignoreCache: init.ignoreCache + }).then(parseIni).then(getConfigData).catch(swallowError), + (0, import_slurpFile.slurpFile)(resolvedFilepath, { + ignoreCache: init.ignoreCache + }).then(parseIni).catch(swallowError) + ]); + return { + configFile: parsedFiles[0], + credentialsFile: parsedFiles[1] + }; + }, "loadSharedConfigFiles"); + var getSsoSessionData = /* @__PURE__ */ __name((data) => Object.entries(data).filter(([key]) => key.startsWith(import_types5.IniSectionType.SSO_SESSION + CONFIG_PREFIX_SEPARATOR)).reduce((acc, [key, value]) => ({ ...acc, [key.substring(key.indexOf(CONFIG_PREFIX_SEPARATOR) + 1)]: value }), {}), "getSsoSessionData"); + var import_slurpFile2 = require_slurpFile(); + var swallowError2 = /* @__PURE__ */ __name(() => ({}), "swallowError"); + var loadSsoSessionData = /* @__PURE__ */ __name(async (init = {}) => (0, import_slurpFile2.slurpFile)(init.configFilepath ?? getConfigFilepath()).then(parseIni).then(getSsoSessionData).catch(swallowError2), "loadSsoSessionData"); + var mergeConfigFiles = /* @__PURE__ */ __name((...files) => { + const merged = {}; + for (const file of files) { + for (const [key, values] of Object.entries(file)) { + if (merged[key] !== void 0) { + Object.assign(merged[key], values); + } else { + merged[key] = values; } } - }, { - id: "aws-iso-e", - outputs: { - dnsSuffix: "cloud.adc-e.uk", - dualStackDnsSuffix: "cloud.adc-e.uk", - implicitGlobalRegion: "eu-isoe-west-1", - name: "aws-iso-e", - supportsDualStack: false, - supportsFIPS: true - }, - regionRegex: "^eu\\-isoe\\-\\w+\\-\\d+$", - regions: {} - }, { - id: "aws-iso-f", - outputs: { - dnsSuffix: "csp.hci.ic.gov", - dualStackDnsSuffix: "csp.hci.ic.gov", - implicitGlobalRegion: "us-isof-south-1", - name: "aws-iso-f", - supportsDualStack: false, - supportsFIPS: true - }, - regionRegex: "^us\\-isof\\-\\w+\\-\\d+$", - regions: {} - }], - version: "1.1" - }; + } + return merged; + }, "mergeConfigFiles"); + var parseKnownFiles = /* @__PURE__ */ __name(async (init) => { + const parsedFiles = await loadSharedConfigFiles(init); + return mergeConfigFiles(parsedFiles.configFile, parsedFiles.credentialsFile); + }, "parseKnownFiles"); } }); -// ../../../node_modules/@aws-sdk/util-endpoints/dist-cjs/lib/aws/partition.js -var require_partition = __commonJS({ - "../../../node_modules/@aws-sdk/util-endpoints/dist-cjs/lib/aws/partition.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getUserAgentPrefix = exports2.useDefaultPartitionInfo = exports2.setPartitionInfo = exports2.partition = void 0; - var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); - var partitions_json_1 = tslib_1.__importDefault(require_partitions()); - var selectedPartitionsInfo = partitions_json_1.default; - var selectedUserAgentPrefix = ""; - var partition = (value) => { - const { partitions } = selectedPartitionsInfo; - for (const partition2 of partitions) { - const { regions, outputs } = partition2; - for (const [region, regionData] of Object.entries(regions)) { - if (region === value) { - return { - ...outputs, - ...regionData - }; - } - } +// ../../../node_modules/@smithy/core/node_modules/@smithy/node-config-provider/dist-cjs/index.js +var require_dist_cjs15 = __commonJS({ + "../../../node_modules/@smithy/core/node_modules/@smithy/node-config-provider/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all) => { + for (var name in all) + __defProp2(target, name, { get: all[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); } - for (const partition2 of partitions) { - const { regionRegex, outputs } = partition2; - if (new RegExp(regionRegex).test(value)) { - return { - ...outputs - }; + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + loadConfig: () => loadConfig + }); + module2.exports = __toCommonJS2(src_exports); + var import_property_provider2 = require_dist_cjs13(); + function getSelectorName(functionString) { + try { + const constants = new Set(Array.from(functionString.match(/([A-Z_]){3,}/g) ?? [])); + constants.delete("CONFIG"); + constants.delete("CONFIG_PREFIX_SEPARATOR"); + constants.delete("ENV"); + return [...constants].join(", "); + } catch (e) { + return functionString; + } + } + __name(getSelectorName, "getSelectorName"); + var fromEnv = /* @__PURE__ */ __name((envVarSelector, logger) => async () => { + try { + const config = envVarSelector(process.env); + if (config === void 0) { + throw new Error(); } + return config; + } catch (e) { + throw new import_property_provider2.CredentialsProviderError( + e.message || `Not found in ENV: ${getSelectorName(envVarSelector.toString())}`, + { logger } + ); } - const DEFAULT_PARTITION = partitions.find((partition2) => partition2.id === "aws"); - if (!DEFAULT_PARTITION) { - throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist."); + }, "fromEnv"); + var import_shared_ini_file_loader = require_dist_cjs14(); + var fromSharedConfigFiles = /* @__PURE__ */ __name((configSelector, { preferredFile = "config", ...init } = {}) => async () => { + const profile = (0, import_shared_ini_file_loader.getProfileName)(init); + const { configFile, credentialsFile } = await (0, import_shared_ini_file_loader.loadSharedConfigFiles)(init); + const profileFromCredentials = credentialsFile[profile] || {}; + const profileFromConfig = configFile[profile] || {}; + const mergedProfile = preferredFile === "config" ? { ...profileFromCredentials, ...profileFromConfig } : { ...profileFromConfig, ...profileFromCredentials }; + try { + const cfgFile = preferredFile === "config" ? configFile : credentialsFile; + const configValue = configSelector(mergedProfile, cfgFile); + if (configValue === void 0) { + throw new Error(); + } + return configValue; + } catch (e) { + throw new import_property_provider2.CredentialsProviderError( + e.message || `Not found in config files w/ profile [${profile}]: ${getSelectorName(configSelector.toString())}`, + { logger: init.logger } + ); } - return { - ...DEFAULT_PARTITION.outputs - }; - }; - exports2.partition = partition; - var setPartitionInfo = (partitionsInfo, userAgentPrefix = "") => { - selectedPartitionsInfo = partitionsInfo; - selectedUserAgentPrefix = userAgentPrefix; - }; - exports2.setPartitionInfo = setPartitionInfo; - var useDefaultPartitionInfo = () => { - (0, exports2.setPartitionInfo)(partitions_json_1.default, ""); - }; - exports2.useDefaultPartitionInfo = useDefaultPartitionInfo; - var getUserAgentPrefix = () => selectedUserAgentPrefix; - exports2.getUserAgentPrefix = getUserAgentPrefix; + }, "fromSharedConfigFiles"); + var isFunction = /* @__PURE__ */ __name((func) => typeof func === "function", "isFunction"); + var fromStatic = /* @__PURE__ */ __name((defaultValue) => isFunction(defaultValue) ? async () => await defaultValue() : (0, import_property_provider2.fromStatic)(defaultValue), "fromStatic"); + var loadConfig = /* @__PURE__ */ __name(({ environmentVariableSelector, configFileSelector, default: defaultValue }, configuration = {}) => (0, import_property_provider2.memoize)( + (0, import_property_provider2.chain)( + fromEnv(environmentVariableSelector), + fromSharedConfigFiles(configFileSelector, configuration), + fromStatic(defaultValue) + ) + ), "loadConfig"); } }); -// ../../../node_modules/@aws-sdk/util-endpoints/dist-cjs/lib/isIpAddress.js -var require_isIpAddress = __commonJS({ - "../../../node_modules/@aws-sdk/util-endpoints/dist-cjs/lib/isIpAddress.js"(exports2) { +// ../../../node_modules/@smithy/core/node_modules/@smithy/middleware-endpoint/dist-cjs/adaptors/getEndpointUrlConfig.js +var require_getEndpointUrlConfig = __commonJS({ + "../../../node_modules/@smithy/core/node_modules/@smithy/middleware-endpoint/dist-cjs/adaptors/getEndpointUrlConfig.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.isIpAddress = void 0; - var IP_V4_REGEX = new RegExp(`^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}$`); - var isIpAddress = (value) => IP_V4_REGEX.test(value) || value.startsWith("[") && value.endsWith("]"); - exports2.isIpAddress = isIpAddress; + exports2.getEndpointUrlConfig = void 0; + var shared_ini_file_loader_1 = require_dist_cjs14(); + var ENV_ENDPOINT_URL = "AWS_ENDPOINT_URL"; + var CONFIG_ENDPOINT_URL = "endpoint_url"; + var getEndpointUrlConfig = (serviceId) => ({ + environmentVariableSelector: (env) => { + const serviceSuffixParts = serviceId.split(" ").map((w) => w.toUpperCase()); + const serviceEndpointUrl = env[[ENV_ENDPOINT_URL, ...serviceSuffixParts].join("_")]; + if (serviceEndpointUrl) + return serviceEndpointUrl; + const endpointUrl = env[ENV_ENDPOINT_URL]; + if (endpointUrl) + return endpointUrl; + return void 0; + }, + configFileSelector: (profile, config) => { + if (config && profile.services) { + const servicesSection = config[["services", profile.services].join(shared_ini_file_loader_1.CONFIG_PREFIX_SEPARATOR)]; + if (servicesSection) { + const servicePrefixParts = serviceId.split(" ").map((w) => w.toLowerCase()); + const endpointUrl2 = servicesSection[[servicePrefixParts.join("_"), CONFIG_ENDPOINT_URL].join(shared_ini_file_loader_1.CONFIG_PREFIX_SEPARATOR)]; + if (endpointUrl2) + return endpointUrl2; + } + } + const endpointUrl = profile[CONFIG_ENDPOINT_URL]; + if (endpointUrl) + return endpointUrl; + return void 0; + }, + default: void 0 + }); + exports2.getEndpointUrlConfig = getEndpointUrlConfig; } }); -// ../../../node_modules/@aws-sdk/util-endpoints/dist-cjs/debug/debugId.js -var require_debugId = __commonJS({ - "../../../node_modules/@aws-sdk/util-endpoints/dist-cjs/debug/debugId.js"(exports2) { +// ../../../node_modules/@smithy/core/node_modules/@smithy/middleware-endpoint/dist-cjs/adaptors/getEndpointFromConfig.js +var require_getEndpointFromConfig = __commonJS({ + "../../../node_modules/@smithy/core/node_modules/@smithy/middleware-endpoint/dist-cjs/adaptors/getEndpointFromConfig.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.debugId = void 0; - exports2.debugId = "endpoints"; + exports2.getEndpointFromConfig = void 0; + var node_config_provider_1 = require_dist_cjs15(); + var getEndpointUrlConfig_1 = require_getEndpointUrlConfig(); + var getEndpointFromConfig = async (serviceId) => (0, node_config_provider_1.loadConfig)((0, getEndpointUrlConfig_1.getEndpointUrlConfig)(serviceId !== null && serviceId !== void 0 ? serviceId : ""))(); + exports2.getEndpointFromConfig = getEndpointFromConfig; } }); -// ../../../node_modules/@aws-sdk/util-endpoints/dist-cjs/debug/toDebugString.js -var require_toDebugString = __commonJS({ - "../../../node_modules/@aws-sdk/util-endpoints/dist-cjs/debug/toDebugString.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.toDebugString = void 0; - function toDebugString(input) { - if (typeof input !== "object" || input == null) { - return input; - } - if ("ref" in input) { - return `$${toDebugString(input.ref)}`; +// ../../../node_modules/@smithy/core/node_modules/@smithy/querystring-parser/dist-cjs/index.js +var require_dist_cjs16 = __commonJS({ + "../../../node_modules/@smithy/core/node_modules/@smithy/querystring-parser/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all) => { + for (var name in all) + __defProp2(target, name, { get: all[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); } - if ("fn" in input) { - return `${input.fn}(${(input.argv || []).map(toDebugString).join(", ")})`; + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + parseQueryString: () => parseQueryString + }); + module2.exports = __toCommonJS2(src_exports); + function parseQueryString(querystring) { + const query = {}; + querystring = querystring.replace(/^\?/, ""); + if (querystring) { + for (const pair of querystring.split("&")) { + let [key, value = null] = pair.split("="); + key = decodeURIComponent(key); + if (value) { + value = decodeURIComponent(value); + } + if (!(key in query)) { + query[key] = value; + } else if (Array.isArray(query[key])) { + query[key].push(value); + } else { + query[key] = [query[key], value]; + } + } } - return JSON.stringify(input, null, 2); + return query; } - exports2.toDebugString = toDebugString; + __name(parseQueryString, "parseQueryString"); } }); -// ../../../node_modules/@aws-sdk/util-endpoints/dist-cjs/debug/index.js -var require_debug = __commonJS({ - "../../../node_modules/@aws-sdk/util-endpoints/dist-cjs/debug/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); - tslib_1.__exportStar(require_debugId(), exports2); - tslib_1.__exportStar(require_toDebugString(), exports2); +// ../../../node_modules/@smithy/core/node_modules/@smithy/url-parser/dist-cjs/index.js +var require_dist_cjs17 = __commonJS({ + "../../../node_modules/@smithy/core/node_modules/@smithy/url-parser/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all) => { + for (var name in all) + __defProp2(target, name, { get: all[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + parseUrl: () => parseUrl + }); + module2.exports = __toCommonJS2(src_exports); + var import_querystring_parser = require_dist_cjs16(); + var parseUrl = /* @__PURE__ */ __name((url2) => { + if (typeof url2 === "string") { + return parseUrl(new URL(url2)); + } + const { hostname, pathname, port, protocol, search } = url2; + let query; + if (search) { + query = (0, import_querystring_parser.parseQueryString)(search); + } + return { + hostname, + port: port ? parseInt(port) : void 0, + protocol, + path: pathname, + query + }; + }, "parseUrl"); } }); -// ../../../node_modules/@aws-sdk/util-endpoints/dist-cjs/types/EndpointError.js -var require_EndpointError = __commonJS({ - "../../../node_modules/@aws-sdk/util-endpoints/dist-cjs/types/EndpointError.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.EndpointError = void 0; - var EndpointError = class extends Error { - constructor(message) { - super(message); - this.name = "EndpointError"; - } +// ../../../node_modules/@smithy/core/node_modules/@smithy/middleware-serde/dist-cjs/index.js +var require_dist_cjs18 = __commonJS({ + "../../../node_modules/@smithy/core/node_modules/@smithy/middleware-serde/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all) => { + for (var name in all) + __defProp2(target, name, { get: all[name], enumerable: true }); }; - exports2.EndpointError = EndpointError; - } -}); - -// ../../../node_modules/@aws-sdk/util-endpoints/dist-cjs/types/EndpointRuleObject.js -var require_EndpointRuleObject = __commonJS({ - "../../../node_modules/@aws-sdk/util-endpoints/dist-cjs/types/EndpointRuleObject.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - } -}); - -// ../../../node_modules/@aws-sdk/util-endpoints/dist-cjs/types/ErrorRuleObject.js -var require_ErrorRuleObject = __commonJS({ - "../../../node_modules/@aws-sdk/util-endpoints/dist-cjs/types/ErrorRuleObject.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - } -}); - -// ../../../node_modules/@aws-sdk/util-endpoints/dist-cjs/types/RuleSetObject.js -var require_RuleSetObject = __commonJS({ - "../../../node_modules/@aws-sdk/util-endpoints/dist-cjs/types/RuleSetObject.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - } -}); - -// ../../../node_modules/@aws-sdk/util-endpoints/dist-cjs/types/TreeRuleObject.js -var require_TreeRuleObject = __commonJS({ - "../../../node_modules/@aws-sdk/util-endpoints/dist-cjs/types/TreeRuleObject.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - } -}); - -// ../../../node_modules/@aws-sdk/util-endpoints/dist-cjs/types/shared.js -var require_shared = __commonJS({ - "../../../node_modules/@aws-sdk/util-endpoints/dist-cjs/types/shared.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - } -}); - -// ../../../node_modules/@aws-sdk/util-endpoints/dist-cjs/types/index.js -var require_types = __commonJS({ - "../../../node_modules/@aws-sdk/util-endpoints/dist-cjs/types/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); - tslib_1.__exportStar(require_EndpointError(), exports2); - tslib_1.__exportStar(require_EndpointRuleObject(), exports2); - tslib_1.__exportStar(require_ErrorRuleObject(), exports2); - tslib_1.__exportStar(require_RuleSetObject(), exports2); - tslib_1.__exportStar(require_TreeRuleObject(), exports2); - tslib_1.__exportStar(require_shared(), exports2); - } -}); - -// ../../../node_modules/@aws-sdk/util-endpoints/dist-cjs/lib/isValidHostLabel.js -var require_isValidHostLabel = __commonJS({ - "../../../node_modules/@aws-sdk/util-endpoints/dist-cjs/lib/isValidHostLabel.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.isValidHostLabel = void 0; - var VALID_HOST_LABEL_REGEX = new RegExp(`^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$`); - var isValidHostLabel = (value, allowSubDomains = false) => { - if (!allowSubDomains) { - return VALID_HOST_LABEL_REGEX.test(value); - } - const labels = value.split("."); - for (const label of labels) { - if (!(0, exports2.isValidHostLabel)(label)) { - return false; - } + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); } - return true; + return to; }; - exports2.isValidHostLabel = isValidHostLabel; - } -}); - -// ../../../node_modules/@aws-sdk/util-endpoints/dist-cjs/lib/aws/isVirtualHostableS3Bucket.js -var require_isVirtualHostableS3Bucket = __commonJS({ - "../../../node_modules/@aws-sdk/util-endpoints/dist-cjs/lib/aws/isVirtualHostableS3Bucket.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.isVirtualHostableS3Bucket = void 0; - var isIpAddress_1 = require_isIpAddress(); - var isValidHostLabel_1 = require_isValidHostLabel(); - var isVirtualHostableS3Bucket = (value, allowSubDomains = false) => { - if (allowSubDomains) { - for (const label of value.split(".")) { - if (!(0, exports2.isVirtualHostableS3Bucket)(label)) { - return false; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + deserializerMiddleware: () => deserializerMiddleware, + deserializerMiddlewareOption: () => deserializerMiddlewareOption, + getSerdePlugin: () => getSerdePlugin, + serializerMiddleware: () => serializerMiddleware, + serializerMiddlewareOption: () => serializerMiddlewareOption2 + }); + module2.exports = __toCommonJS2(src_exports); + var deserializerMiddleware = /* @__PURE__ */ __name((options, deserializer) => (next) => async (args) => { + const { response } = await next(args); + try { + const parsed = await deserializer(response, options); + return { + response, + output: parsed + }; + } catch (error) { + Object.defineProperty(error, "$response", { + value: response + }); + if (!("$metadata" in error)) { + const hint = `Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.`; + error.message += "\n " + hint; + if (typeof error.$responseBodyText !== "undefined") { + if (error.$response) { + error.$response.body = error.$responseBodyText; + } } } - return true; - } - if (!(0, isValidHostLabel_1.isValidHostLabel)(value)) { - return false; - } - if (value.length < 3 || value.length > 63) { - return false; - } - if (value !== value.toLowerCase()) { - return false; + throw error; } - if ((0, isIpAddress_1.isIpAddress)(value)) { - return false; + }, "deserializerMiddleware"); + var serializerMiddleware = /* @__PURE__ */ __name((options, serializer) => (next, context) => async (args) => { + var _a; + const endpoint = ((_a = context.endpointV2) == null ? void 0 : _a.url) && options.urlParser ? async () => options.urlParser(context.endpointV2.url) : options.endpoint; + if (!endpoint) { + throw new Error("No valid endpoint provider available."); } - return true; + const request2 = await serializer(args.input, { ...options, endpoint }); + return next({ + ...args, + request: request2 + }); + }, "serializerMiddleware"); + var deserializerMiddlewareOption = { + name: "deserializerMiddleware", + step: "deserialize", + tags: ["DESERIALIZER"], + override: true }; - exports2.isVirtualHostableS3Bucket = isVirtualHostableS3Bucket; - } -}); - -// ../../../node_modules/@aws-sdk/util-endpoints/dist-cjs/lib/aws/parseArn.js -var require_parseArn = __commonJS({ - "../../../node_modules/@aws-sdk/util-endpoints/dist-cjs/lib/aws/parseArn.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.parseArn = void 0; - var parseArn = (value) => { - const segments = value.split(":"); - if (segments.length < 6) - return null; - const [arn, partition, service, region, accountId, ...resourceId] = segments; - if (arn !== "arn" || partition === "" || service === "" || resourceId[0] === "") - return null; + var serializerMiddlewareOption2 = { + name: "serializerMiddleware", + step: "serialize", + tags: ["SERIALIZER"], + override: true + }; + function getSerdePlugin(config, serializer, deserializer) { return { - partition, - service, - region, - accountId, - resourceId: resourceId[0].includes("/") ? resourceId[0].split("/") : resourceId + applyToStack: (commandStack) => { + commandStack.add(deserializerMiddleware(config, deserializer), deserializerMiddlewareOption); + commandStack.add(serializerMiddleware(config, serializer), serializerMiddlewareOption2); + } }; - }; - exports2.parseArn = parseArn; - } -}); - -// ../../../node_modules/@aws-sdk/util-endpoints/dist-cjs/lib/aws/index.js -var require_aws = __commonJS({ - "../../../node_modules/@aws-sdk/util-endpoints/dist-cjs/lib/aws/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); - tslib_1.__exportStar(require_isVirtualHostableS3Bucket(), exports2); - tslib_1.__exportStar(require_parseArn(), exports2); - tslib_1.__exportStar(require_partition(), exports2); - } -}); - -// ../../../node_modules/@aws-sdk/util-endpoints/dist-cjs/lib/booleanEquals.js -var require_booleanEquals = __commonJS({ - "../../../node_modules/@aws-sdk/util-endpoints/dist-cjs/lib/booleanEquals.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.booleanEquals = void 0; - var booleanEquals = (value1, value2) => value1 === value2; - exports2.booleanEquals = booleanEquals; + } + __name(getSerdePlugin, "getSerdePlugin"); } }); -// ../../../node_modules/@aws-sdk/util-endpoints/dist-cjs/lib/getAttrPathList.js -var require_getAttrPathList = __commonJS({ - "../../../node_modules/@aws-sdk/util-endpoints/dist-cjs/lib/getAttrPathList.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getAttrPathList = void 0; - var types_1 = require_types(); - var getAttrPathList = (path) => { - const parts = path.split("."); - const pathList = []; - for (const part of parts) { - const squareBracketIndex = part.indexOf("["); - if (squareBracketIndex !== -1) { - if (part.indexOf("]") !== part.length - 1) { - throw new types_1.EndpointError(`Path: '${path}' does not end with ']'`); - } - const arrayIndex = part.slice(squareBracketIndex + 1, -1); - if (Number.isNaN(parseInt(arrayIndex))) { - throw new types_1.EndpointError(`Invalid array index: '${arrayIndex}' in path: '${path}'`); - } - if (squareBracketIndex !== 0) { - pathList.push(part.slice(0, squareBracketIndex)); - } - pathList.push(arrayIndex); - } else { - pathList.push(part); - } +// ../../../node_modules/@smithy/core/node_modules/@smithy/middleware-endpoint/dist-cjs/index.js +var require_dist_cjs19 = __commonJS({ + "../../../node_modules/@smithy/core/node_modules/@smithy/middleware-endpoint/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all) => { + for (var name in all) + __defProp2(target, name, { get: all[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); } - return pathList; + return to; }; - exports2.getAttrPathList = getAttrPathList; - } -}); - -// ../../../node_modules/@aws-sdk/util-endpoints/dist-cjs/lib/getAttr.js -var require_getAttr = __commonJS({ - "../../../node_modules/@aws-sdk/util-endpoints/dist-cjs/lib/getAttr.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getAttr = void 0; - var types_1 = require_types(); - var getAttrPathList_1 = require_getAttrPathList(); - var getAttr = (value, path) => (0, getAttrPathList_1.getAttrPathList)(path).reduce((acc, index) => { - if (typeof acc !== "object") { - throw new types_1.EndpointError(`Index '${index}' in '${path}' not found in '${JSON.stringify(value)}'`); - } else if (Array.isArray(acc)) { - return acc[parseInt(index)]; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + endpointMiddleware: () => endpointMiddleware, + endpointMiddlewareOptions: () => endpointMiddlewareOptions2, + getEndpointFromInstructions: () => getEndpointFromInstructions, + getEndpointPlugin: () => getEndpointPlugin, + resolveEndpointConfig: () => resolveEndpointConfig, + resolveParams: () => resolveParams, + toEndpointV1: () => toEndpointV1 + }); + module2.exports = __toCommonJS2(src_exports); + var resolveParamsForS3 = /* @__PURE__ */ __name(async (endpointParams) => { + const bucket = (endpointParams == null ? void 0 : endpointParams.Bucket) || ""; + if (typeof endpointParams.Bucket === "string") { + endpointParams.Bucket = bucket.replace(/#/g, encodeURIComponent("#")).replace(/\?/g, encodeURIComponent("?")); } - return acc[index]; - }, value); - exports2.getAttr = getAttr; - } -}); - -// ../../../node_modules/@aws-sdk/util-endpoints/dist-cjs/lib/isSet.js -var require_isSet = __commonJS({ - "../../../node_modules/@aws-sdk/util-endpoints/dist-cjs/lib/isSet.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.isSet = void 0; - var isSet = (value) => value != null; - exports2.isSet = isSet; - } -}); - -// ../../../node_modules/@aws-sdk/util-endpoints/dist-cjs/lib/not.js -var require_not = __commonJS({ - "../../../node_modules/@aws-sdk/util-endpoints/dist-cjs/lib/not.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.not = void 0; - var not = (value) => !value; - exports2.not = not; - } -}); - -// ../../../node_modules/@aws-sdk/types/dist-cjs/abort.js -var require_abort = __commonJS({ - "../../../node_modules/@aws-sdk/types/dist-cjs/abort.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - } -}); - -// ../../../node_modules/@aws-sdk/types/dist-cjs/auth.js -var require_auth = __commonJS({ - "../../../node_modules/@aws-sdk/types/dist-cjs/auth.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.HttpAuthLocation = void 0; - var types_1 = require_dist_cjs(); - Object.defineProperty(exports2, "HttpAuthLocation", { enumerable: true, get: function() { - return types_1.HttpAuthLocation; - } }); - } -}); - -// ../../../node_modules/@aws-sdk/types/dist-cjs/blob/blob-types.js -var require_blob_types = __commonJS({ - "../../../node_modules/@aws-sdk/types/dist-cjs/blob/blob-types.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - } -}); - -// ../../../node_modules/@aws-sdk/types/dist-cjs/checksum.js -var require_checksum = __commonJS({ - "../../../node_modules/@aws-sdk/types/dist-cjs/checksum.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - } -}); - -// ../../../node_modules/@aws-sdk/types/dist-cjs/client.js -var require_client = __commonJS({ - "../../../node_modules/@aws-sdk/types/dist-cjs/client.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - } -}); - -// ../../../node_modules/@aws-sdk/types/dist-cjs/command.js -var require_command = __commonJS({ - "../../../node_modules/@aws-sdk/types/dist-cjs/command.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - } -}); - -// ../../../node_modules/@aws-sdk/types/dist-cjs/connection.js -var require_connection = __commonJS({ - "../../../node_modules/@aws-sdk/types/dist-cjs/connection.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - } -}); - -// ../../../node_modules/@aws-sdk/types/dist-cjs/credentials.js -var require_credentials = __commonJS({ - "../../../node_modules/@aws-sdk/types/dist-cjs/credentials.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - } -}); - -// ../../../node_modules/@aws-sdk/types/dist-cjs/crypto.js -var require_crypto = __commonJS({ - "../../../node_modules/@aws-sdk/types/dist-cjs/crypto.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - } -}); - -// ../../../node_modules/@aws-sdk/types/dist-cjs/dns.js -var require_dns = __commonJS({ - "../../../node_modules/@aws-sdk/types/dist-cjs/dns.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.HostAddressType = void 0; - var HostAddressType; - (function(HostAddressType2) { - HostAddressType2["AAAA"] = "AAAA"; - HostAddressType2["A"] = "A"; - })(HostAddressType = exports2.HostAddressType || (exports2.HostAddressType = {})); - } -}); - -// ../../../node_modules/@aws-sdk/types/dist-cjs/encode.js -var require_encode = __commonJS({ - "../../../node_modules/@aws-sdk/types/dist-cjs/encode.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - } -}); - -// ../../../node_modules/@aws-sdk/types/dist-cjs/endpoint.js -var require_endpoint = __commonJS({ - "../../../node_modules/@aws-sdk/types/dist-cjs/endpoint.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.EndpointURLScheme = void 0; - var types_1 = require_dist_cjs(); - Object.defineProperty(exports2, "EndpointURLScheme", { enumerable: true, get: function() { - return types_1.EndpointURLScheme; - } }); - } -}); - -// ../../../node_modules/@aws-sdk/types/dist-cjs/eventStream.js -var require_eventStream = __commonJS({ - "../../../node_modules/@aws-sdk/types/dist-cjs/eventStream.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - } -}); - -// ../../../node_modules/@aws-sdk/types/dist-cjs/extensions/index.js -var require_extensions = __commonJS({ - "../../../node_modules/@aws-sdk/types/dist-cjs/extensions/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); + if (isArnBucketName(bucket)) { + if (endpointParams.ForcePathStyle === true) { + throw new Error("Path-style addressing cannot be used with ARN buckets"); + } + } else if (!isDnsCompatibleBucketName(bucket) || bucket.indexOf(".") !== -1 && !String(endpointParams.Endpoint).startsWith("http:") || bucket.toLowerCase() !== bucket || bucket.length < 3) { + endpointParams.ForcePathStyle = true; + } + if (endpointParams.DisableMultiRegionAccessPoints) { + endpointParams.disableMultiRegionAccessPoints = true; + endpointParams.DisableMRAP = true; + } + return endpointParams; + }, "resolveParamsForS3"); + var DOMAIN_PATTERN = /^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/; + var IP_ADDRESS_PATTERN = /(\d+\.){3}\d+/; + var DOTS_PATTERN = /\.\./; + var isDnsCompatibleBucketName = /* @__PURE__ */ __name((bucketName) => DOMAIN_PATTERN.test(bucketName) && !IP_ADDRESS_PATTERN.test(bucketName) && !DOTS_PATTERN.test(bucketName), "isDnsCompatibleBucketName"); + var isArnBucketName = /* @__PURE__ */ __name((bucketName) => { + const [arn, partition, service, , , bucket] = bucketName.split(":"); + const isArn = arn === "arn" && bucketName.split(":").length >= 6; + const isValidArn = Boolean(isArn && partition && service && bucket); + if (isArn && !isValidArn) { + throw new Error(`Invalid ARN: ${bucketName} was an invalid ARN.`); + } + return isValidArn; + }, "isArnBucketName"); + var createConfigValueProvider = /* @__PURE__ */ __name((configKey, canonicalEndpointParamKey, config) => { + const configProvider = /* @__PURE__ */ __name(async () => { + const configValue = config[configKey] ?? config[canonicalEndpointParamKey]; + if (typeof configValue === "function") { + return configValue(); + } + return configValue; + }, "configProvider"); + if (configKey === "credentialScope" || canonicalEndpointParamKey === "CredentialScope") { + return async () => { + const credentials = typeof config.credentials === "function" ? await config.credentials() : config.credentials; + const configValue = (credentials == null ? void 0 : credentials.credentialScope) ?? (credentials == null ? void 0 : credentials.CredentialScope); + return configValue; + }; + } + if (configKey === "accountId" || canonicalEndpointParamKey === "AccountId") { + return async () => { + const credentials = typeof config.credentials === "function" ? await config.credentials() : config.credentials; + const configValue = (credentials == null ? void 0 : credentials.accountId) ?? (credentials == null ? void 0 : credentials.AccountId); + return configValue; + }; + } + if (configKey === "endpoint" || canonicalEndpointParamKey === "endpoint") { + return async () => { + const endpoint = await configProvider(); + if (endpoint && typeof endpoint === "object") { + if ("url" in endpoint) { + return endpoint.url.href; + } + if ("hostname" in endpoint) { + const { protocol, hostname, port, path } = endpoint; + return `${protocol}//${hostname}${port ? ":" + port : ""}${path}`; + } + } + return endpoint; + }; + } + return configProvider; + }, "createConfigValueProvider"); + var import_getEndpointFromConfig = require_getEndpointFromConfig(); + var import_url_parser = require_dist_cjs17(); + var toEndpointV1 = /* @__PURE__ */ __name((endpoint) => { + if (typeof endpoint === "object") { + if ("url" in endpoint) { + return (0, import_url_parser.parseUrl)(endpoint.url); + } + return endpoint; + } + return (0, import_url_parser.parseUrl)(endpoint); + }, "toEndpointV1"); + var getEndpointFromInstructions = /* @__PURE__ */ __name(async (commandInput, instructionsSupplier, clientConfig, context) => { + if (!clientConfig.endpoint) { + let endpointFromConfig; + if (clientConfig.serviceConfiguredEndpoint) { + endpointFromConfig = await clientConfig.serviceConfiguredEndpoint(); + } else { + endpointFromConfig = await (0, import_getEndpointFromConfig.getEndpointFromConfig)(clientConfig.serviceId); + } + if (endpointFromConfig) { + clientConfig.endpoint = () => Promise.resolve(toEndpointV1(endpointFromConfig)); + } + } + const endpointParams = await resolveParams(commandInput, instructionsSupplier, clientConfig); + if (typeof clientConfig.endpointProvider !== "function") { + throw new Error("config.endpointProvider is not set."); + } + const endpoint = clientConfig.endpointProvider(endpointParams, context); + return endpoint; + }, "getEndpointFromInstructions"); + var resolveParams = /* @__PURE__ */ __name(async (commandInput, instructionsSupplier, clientConfig) => { + var _a; + const endpointParams = {}; + const instructions = ((_a = instructionsSupplier == null ? void 0 : instructionsSupplier.getEndpointParameterInstructions) == null ? void 0 : _a.call(instructionsSupplier)) || {}; + for (const [name, instruction] of Object.entries(instructions)) { + switch (instruction.type) { + case "staticContextParams": + endpointParams[name] = instruction.value; + break; + case "contextParams": + endpointParams[name] = commandInput[instruction.name]; + break; + case "clientContextParams": + case "builtInParams": + endpointParams[name] = await createConfigValueProvider(instruction.name, name, clientConfig)(); + break; + default: + throw new Error("Unrecognized endpoint parameter instruction: " + JSON.stringify(instruction)); + } + } + if (Object.keys(instructions).length === 0) { + Object.assign(endpointParams, clientConfig); + } + if (String(clientConfig.serviceId).toLowerCase() === "s3") { + await resolveParamsForS3(endpointParams); + } + return endpointParams; + }, "resolveParams"); + var import_util_middleware3 = require_dist_cjs12(); + var endpointMiddleware = /* @__PURE__ */ __name(({ + config, + instructions + }) => { + return (next, context) => async (args) => { + var _a, _b, _c; + const endpoint = await getEndpointFromInstructions( + args.input, + { + getEndpointParameterInstructions() { + return instructions; + } + }, + { ...config }, + context + ); + context.endpointV2 = endpoint; + context.authSchemes = (_a = endpoint.properties) == null ? void 0 : _a.authSchemes; + const authScheme = (_b = context.authSchemes) == null ? void 0 : _b[0]; + if (authScheme) { + context["signing_region"] = authScheme.signingRegion; + context["signing_service"] = authScheme.signingName; + const smithyContext = (0, import_util_middleware3.getSmithyContext)(context); + const httpAuthOption = (_c = smithyContext == null ? void 0 : smithyContext.selectedHttpAuthScheme) == null ? void 0 : _c.httpAuthOption; + if (httpAuthOption) { + httpAuthOption.signingProperties = Object.assign( + httpAuthOption.signingProperties || {}, + { + signing_region: authScheme.signingRegion, + signingRegion: authScheme.signingRegion, + signing_service: authScheme.signingName, + signingName: authScheme.signingName, + signingRegionSet: authScheme.signingRegionSet + }, + authScheme.properties + ); + } + } + return next({ + ...args + }); + }; + }, "endpointMiddleware"); + var import_middleware_serde2 = require_dist_cjs18(); + var endpointMiddlewareOptions2 = { + step: "serialize", + tags: ["ENDPOINT_PARAMETERS", "ENDPOINT_V2", "ENDPOINT"], + name: "endpointV2Middleware", + override: true, + relation: "before", + toMiddleware: import_middleware_serde2.serializerMiddlewareOption.name + }; + var getEndpointPlugin = /* @__PURE__ */ __name((config, instructions) => ({ + applyToStack: (clientStack) => { + clientStack.addRelativeTo( + endpointMiddleware({ + config, + instructions + }), + endpointMiddlewareOptions2 + ); + } + }), "getEndpointPlugin"); + var import_getEndpointFromConfig2 = require_getEndpointFromConfig(); + var resolveEndpointConfig = /* @__PURE__ */ __name((input) => { + const tls = input.tls ?? true; + const { endpoint } = input; + const customEndpointProvider = endpoint != null ? async () => toEndpointV1(await (0, import_util_middleware3.normalizeProvider)(endpoint)()) : void 0; + const isCustomEndpoint = !!endpoint; + const resolvedConfig = { + ...input, + endpoint: customEndpointProvider, + tls, + isCustomEndpoint, + useDualstackEndpoint: (0, import_util_middleware3.normalizeProvider)(input.useDualstackEndpoint ?? false), + useFipsEndpoint: (0, import_util_middleware3.normalizeProvider)(input.useFipsEndpoint ?? false) + }; + let configuredEndpointPromise = void 0; + resolvedConfig.serviceConfiguredEndpoint = async () => { + if (input.serviceId && !configuredEndpointPromise) { + configuredEndpointPromise = (0, import_getEndpointFromConfig2.getEndpointFromConfig)(input.serviceId); + } + return configuredEndpointPromise; + }; + return resolvedConfig; + }, "resolveEndpointConfig"); } }); -// ../../../node_modules/@aws-sdk/types/dist-cjs/http.js -var require_http = __commonJS({ - "../../../node_modules/@aws-sdk/types/dist-cjs/http.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); +// ../../../node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/getHttpAuthSchemeEndpointRuleSetPlugin.js +var import_middleware_endpoint, httpAuthSchemeEndpointRuleSetMiddlewareOptions, getHttpAuthSchemeEndpointRuleSetPlugin; +var init_getHttpAuthSchemeEndpointRuleSetPlugin = __esm({ + "../../../node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/getHttpAuthSchemeEndpointRuleSetPlugin.js"() { + import_middleware_endpoint = __toESM(require_dist_cjs19()); + init_httpAuthSchemeMiddleware(); + httpAuthSchemeEndpointRuleSetMiddlewareOptions = { + step: "serialize", + tags: ["HTTP_AUTH_SCHEME"], + name: "httpAuthSchemeMiddleware", + override: true, + relation: "before", + toMiddleware: import_middleware_endpoint.endpointMiddlewareOptions.name + }; + getHttpAuthSchemeEndpointRuleSetPlugin = (config, { httpAuthSchemeParametersProvider, identityProviderConfigProvider }) => ({ + applyToStack: (clientStack) => { + clientStack.addRelativeTo(httpAuthSchemeMiddleware(config, { + httpAuthSchemeParametersProvider, + identityProviderConfigProvider + }), httpAuthSchemeEndpointRuleSetMiddlewareOptions); + } + }); } }); -// ../../../node_modules/@aws-sdk/types/dist-cjs/identity/AnonymousIdentity.js -var require_AnonymousIdentity = __commonJS({ - "../../../node_modules/@aws-sdk/types/dist-cjs/identity/AnonymousIdentity.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); +// ../../../node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/getHttpAuthSchemePlugin.js +var import_middleware_serde, httpAuthSchemeMiddlewareOptions, getHttpAuthSchemePlugin; +var init_getHttpAuthSchemePlugin = __esm({ + "../../../node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/getHttpAuthSchemePlugin.js"() { + import_middleware_serde = __toESM(require_dist_cjs18()); + init_httpAuthSchemeMiddleware(); + httpAuthSchemeMiddlewareOptions = { + step: "serialize", + tags: ["HTTP_AUTH_SCHEME"], + name: "httpAuthSchemeMiddleware", + override: true, + relation: "before", + toMiddleware: import_middleware_serde.serializerMiddlewareOption.name + }; + getHttpAuthSchemePlugin = (config, { httpAuthSchemeParametersProvider, identityProviderConfigProvider }) => ({ + applyToStack: (clientStack) => { + clientStack.addRelativeTo(httpAuthSchemeMiddleware(config, { + httpAuthSchemeParametersProvider, + identityProviderConfigProvider + }), httpAuthSchemeMiddlewareOptions); + } + }); } }); -// ../../../node_modules/@aws-sdk/types/dist-cjs/identity/AwsCredentialIdentity.js -var require_AwsCredentialIdentity = __commonJS({ - "../../../node_modules/@aws-sdk/types/dist-cjs/identity/AwsCredentialIdentity.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); +// ../../../node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/index.js +var init_middleware_http_auth_scheme = __esm({ + "../../../node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/index.js"() { + init_httpAuthSchemeMiddleware(); + init_getHttpAuthSchemeEndpointRuleSetPlugin(); + init_getHttpAuthSchemePlugin(); } }); -// ../../../node_modules/@aws-sdk/types/dist-cjs/identity/Identity.js -var require_Identity = __commonJS({ - "../../../node_modules/@aws-sdk/types/dist-cjs/identity/Identity.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - } -}); - -// ../../../node_modules/@aws-sdk/types/dist-cjs/identity/LoginIdentity.js -var require_LoginIdentity = __commonJS({ - "../../../node_modules/@aws-sdk/types/dist-cjs/identity/LoginIdentity.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - } -}); - -// ../../../node_modules/@aws-sdk/types/dist-cjs/identity/TokenIdentity.js -var require_TokenIdentity = __commonJS({ - "../../../node_modules/@aws-sdk/types/dist-cjs/identity/TokenIdentity.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - } -}); - -// ../../../node_modules/@aws-sdk/types/dist-cjs/identity/index.js -var require_identity = __commonJS({ - "../../../node_modules/@aws-sdk/types/dist-cjs/identity/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); - tslib_1.__exportStar(require_AnonymousIdentity(), exports2); - tslib_1.__exportStar(require_AwsCredentialIdentity(), exports2); - tslib_1.__exportStar(require_Identity(), exports2); - tslib_1.__exportStar(require_LoginIdentity(), exports2); - tslib_1.__exportStar(require_TokenIdentity(), exports2); - } -}); - -// ../../../node_modules/@aws-sdk/types/dist-cjs/logger.js -var require_logger = __commonJS({ - "../../../node_modules/@aws-sdk/types/dist-cjs/logger.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - } -}); - -// ../../../node_modules/@aws-sdk/types/dist-cjs/middleware.js -var require_middleware = __commonJS({ - "../../../node_modules/@aws-sdk/types/dist-cjs/middleware.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - } -}); - -// ../../../node_modules/@aws-sdk/types/dist-cjs/pagination.js -var require_pagination = __commonJS({ - "../../../node_modules/@aws-sdk/types/dist-cjs/pagination.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - } -}); - -// ../../../node_modules/@aws-sdk/types/dist-cjs/profile.js -var require_profile = __commonJS({ - "../../../node_modules/@aws-sdk/types/dist-cjs/profile.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - } -}); - -// ../../../node_modules/@aws-sdk/types/dist-cjs/request.js -var require_request = __commonJS({ - "../../../node_modules/@aws-sdk/types/dist-cjs/request.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - } -}); - -// ../../../node_modules/@aws-sdk/types/dist-cjs/response.js -var require_response = __commonJS({ - "../../../node_modules/@aws-sdk/types/dist-cjs/response.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - } -}); - -// ../../../node_modules/@aws-sdk/types/dist-cjs/retry.js -var require_retry = __commonJS({ - "../../../node_modules/@aws-sdk/types/dist-cjs/retry.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - } -}); - -// ../../../node_modules/@aws-sdk/types/dist-cjs/serde.js -var require_serde = __commonJS({ - "../../../node_modules/@aws-sdk/types/dist-cjs/serde.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - } -}); - -// ../../../node_modules/@aws-sdk/types/dist-cjs/shapes.js -var require_shapes = __commonJS({ - "../../../node_modules/@aws-sdk/types/dist-cjs/shapes.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - } -}); - -// ../../../node_modules/@aws-sdk/types/dist-cjs/signature.js -var require_signature = __commonJS({ - "../../../node_modules/@aws-sdk/types/dist-cjs/signature.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - } -}); - -// ../../../node_modules/@aws-sdk/types/dist-cjs/stream.js -var require_stream = __commonJS({ - "../../../node_modules/@aws-sdk/types/dist-cjs/stream.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - } -}); - -// ../../../node_modules/@aws-sdk/types/dist-cjs/token.js -var require_token = __commonJS({ - "../../../node_modules/@aws-sdk/types/dist-cjs/token.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - } -}); - -// ../../../node_modules/@aws-sdk/types/dist-cjs/transfer.js -var require_transfer = __commonJS({ - "../../../node_modules/@aws-sdk/types/dist-cjs/transfer.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.RequestHandlerProtocol = void 0; - var types_1 = require_dist_cjs(); - Object.defineProperty(exports2, "RequestHandlerProtocol", { enumerable: true, get: function() { - return types_1.RequestHandlerProtocol; - } }); - } -}); - -// ../../../node_modules/@aws-sdk/types/dist-cjs/uri.js -var require_uri = __commonJS({ - "../../../node_modules/@aws-sdk/types/dist-cjs/uri.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - } -}); - -// ../../../node_modules/@aws-sdk/types/dist-cjs/util.js -var require_util = __commonJS({ - "../../../node_modules/@aws-sdk/types/dist-cjs/util.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - } -}); - -// ../../../node_modules/@aws-sdk/types/dist-cjs/waiter.js -var require_waiter = __commonJS({ - "../../../node_modules/@aws-sdk/types/dist-cjs/waiter.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - } -}); - -// ../../../node_modules/@aws-sdk/types/dist-cjs/index.js -var require_dist_cjs15 = __commonJS({ - "../../../node_modules/@aws-sdk/types/dist-cjs/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); - tslib_1.__exportStar(require_abort(), exports2); - tslib_1.__exportStar(require_auth(), exports2); - tslib_1.__exportStar(require_blob_types(), exports2); - tslib_1.__exportStar(require_checksum(), exports2); - tslib_1.__exportStar(require_client(), exports2); - tslib_1.__exportStar(require_command(), exports2); - tslib_1.__exportStar(require_connection(), exports2); - tslib_1.__exportStar(require_credentials(), exports2); - tslib_1.__exportStar(require_crypto(), exports2); - tslib_1.__exportStar(require_dns(), exports2); - tslib_1.__exportStar(require_encode(), exports2); - tslib_1.__exportStar(require_endpoint(), exports2); - tslib_1.__exportStar(require_eventStream(), exports2); - tslib_1.__exportStar(require_extensions(), exports2); - tslib_1.__exportStar(require_http(), exports2); - tslib_1.__exportStar(require_identity(), exports2); - tslib_1.__exportStar(require_logger(), exports2); - tslib_1.__exportStar(require_middleware(), exports2); - tslib_1.__exportStar(require_pagination(), exports2); - tslib_1.__exportStar(require_profile(), exports2); - tslib_1.__exportStar(require_request(), exports2); - tslib_1.__exportStar(require_response(), exports2); - tslib_1.__exportStar(require_retry(), exports2); - tslib_1.__exportStar(require_serde(), exports2); - tslib_1.__exportStar(require_shapes(), exports2); - tslib_1.__exportStar(require_signature(), exports2); - tslib_1.__exportStar(require_stream(), exports2); - tslib_1.__exportStar(require_token(), exports2); - tslib_1.__exportStar(require_transfer(), exports2); - tslib_1.__exportStar(require_uri(), exports2); - tslib_1.__exportStar(require_util(), exports2); - tslib_1.__exportStar(require_waiter(), exports2); - } -}); - -// ../../../node_modules/@aws-sdk/util-endpoints/dist-cjs/lib/parseURL.js -var require_parseURL = __commonJS({ - "../../../node_modules/@aws-sdk/util-endpoints/dist-cjs/lib/parseURL.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.parseURL = void 0; - var types_1 = require_dist_cjs15(); - var isIpAddress_1 = require_isIpAddress(); - var DEFAULT_PORTS = { - [types_1.EndpointURLScheme.HTTP]: 80, - [types_1.EndpointURLScheme.HTTPS]: 443 +// ../../../node_modules/@smithy/core/node_modules/@smithy/protocol-http/dist-cjs/index.js +var require_dist_cjs20 = __commonJS({ + "../../../node_modules/@smithy/core/node_modules/@smithy/protocol-http/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all) => { + for (var name in all) + __defProp2(target, name, { get: all[name], enumerable: true }); }; - var parseURL = (value) => { - const whatwgURL = (() => { - try { - if (value instanceof URL) { - return value; - } - if (typeof value === "object" && "hostname" in value) { - const { hostname: hostname2, port, protocol: protocol2 = "", path = "", query = {} } = value; - const url2 = new URL(`${protocol2}//${hostname2}${port ? `:${port}` : ""}${path}`); - url2.search = Object.entries(query).map(([k, v]) => `${k}=${v}`).join("&"); - return url2; - } - return new URL(value); - } catch (error) { - return null; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + Field: () => Field, + Fields: () => Fields, + HttpRequest: () => HttpRequest7, + HttpResponse: () => HttpResponse2, + IHttpRequest: () => import_types5.HttpRequest, + getHttpHandlerExtensionConfiguration: () => getHttpHandlerExtensionConfiguration, + isValidHostname: () => isValidHostname, + resolveHttpHandlerRuntimeConfig: () => resolveHttpHandlerRuntimeConfig + }); + module2.exports = __toCommonJS2(src_exports); + var getHttpHandlerExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => { + let httpHandler = runtimeConfig.httpHandler; + return { + setHttpHandler(handler2) { + httpHandler = handler2; + }, + httpHandler() { + return httpHandler; + }, + updateHttpClientConfig(key, value) { + httpHandler.updateHttpClientConfig(key, value); + }, + httpHandlerConfigs() { + return httpHandler.httpHandlerConfigs(); } - })(); - if (!whatwgURL) { - console.error(`Unable to parse ${JSON.stringify(value)} as a whatwg URL.`); - return null; + }; + }, "getHttpHandlerExtensionConfiguration"); + var resolveHttpHandlerRuntimeConfig = /* @__PURE__ */ __name((httpHandlerExtensionConfiguration) => { + return { + httpHandler: httpHandlerExtensionConfiguration.httpHandler() + }; + }, "resolveHttpHandlerRuntimeConfig"); + var import_types5 = require_dist_cjs(); + var _Field = class _Field { + constructor({ name, kind = import_types5.FieldPosition.HEADER, values = [] }) { + this.name = name; + this.kind = kind; + this.values = values; } - const urlString = whatwgURL.href; - const { host, hostname, pathname, protocol, search } = whatwgURL; - if (search) { - return null; + /** + * Appends a value to the field. + * + * @param value The value to append. + */ + add(value) { + this.values.push(value); } - const scheme = protocol.slice(0, -1); - if (!Object.values(types_1.EndpointURLScheme).includes(scheme)) { - return null; + /** + * Overwrite existing field values. + * + * @param values The new field values. + */ + set(values) { + this.values = values; } - const isIp = (0, isIpAddress_1.isIpAddress)(hostname); - const inputContainsDefaultPort = urlString.includes(`${host}:${DEFAULT_PORTS[scheme]}`) || typeof value === "string" && value.includes(`${host}:${DEFAULT_PORTS[scheme]}`); - const authority = `${host}${inputContainsDefaultPort ? `:${DEFAULT_PORTS[scheme]}` : ``}`; - return { - scheme, - authority, - path: pathname, - normalizedPath: pathname.endsWith("/") ? pathname : `${pathname}/`, - isIp - }; - }; - exports2.parseURL = parseURL; - } -}); - -// ../../../node_modules/@aws-sdk/util-endpoints/dist-cjs/lib/stringEquals.js -var require_stringEquals = __commonJS({ - "../../../node_modules/@aws-sdk/util-endpoints/dist-cjs/lib/stringEquals.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.stringEquals = void 0; - var stringEquals = (value1, value2) => value1 === value2; - exports2.stringEquals = stringEquals; - } -}); - -// ../../../node_modules/@aws-sdk/util-endpoints/dist-cjs/lib/substring.js -var require_substring = __commonJS({ - "../../../node_modules/@aws-sdk/util-endpoints/dist-cjs/lib/substring.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.substring = void 0; - var substring = (input, start, stop, reverse) => { - if (start >= stop || input.length < stop) { - return null; + /** + * Remove all matching entries from list. + * + * @param value Value to remove. + */ + remove(value) { + this.values = this.values.filter((v) => v !== value); } - if (!reverse) { - return input.substring(start, stop); + /** + * Get comma-delimited string. + * + * @returns String representation of {@link Field}. + */ + toString() { + return this.values.map((v) => v.includes(",") || v.includes(" ") ? `"${v}"` : v).join(", "); + } + /** + * Get string values as a list + * + * @returns Values in {@link Field} as a list. + */ + get() { + return this.values; } - return input.substring(input.length - stop, input.length - start); }; - exports2.substring = substring; - } -}); - -// ../../../node_modules/@aws-sdk/util-endpoints/dist-cjs/lib/uriEncode.js -var require_uriEncode = __commonJS({ - "../../../node_modules/@aws-sdk/util-endpoints/dist-cjs/lib/uriEncode.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.uriEncode = void 0; - var uriEncode = (value) => encodeURIComponent(value).replace(/[!*'()]/g, (c) => `%${c.charCodeAt(0).toString(16).toUpperCase()}`); - exports2.uriEncode = uriEncode; - } -}); - -// ../../../node_modules/@aws-sdk/util-endpoints/dist-cjs/lib/index.js -var require_lib = __commonJS({ - "../../../node_modules/@aws-sdk/util-endpoints/dist-cjs/lib/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.aws = void 0; - var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); - exports2.aws = tslib_1.__importStar(require_aws()); - tslib_1.__exportStar(require_booleanEquals(), exports2); - tslib_1.__exportStar(require_getAttr(), exports2); - tslib_1.__exportStar(require_isSet(), exports2); - tslib_1.__exportStar(require_isValidHostLabel(), exports2); - tslib_1.__exportStar(require_not(), exports2); - tslib_1.__exportStar(require_parseURL(), exports2); - tslib_1.__exportStar(require_stringEquals(), exports2); - tslib_1.__exportStar(require_substring(), exports2); - tslib_1.__exportStar(require_uriEncode(), exports2); - } -}); - -// ../../../node_modules/@aws-sdk/util-endpoints/dist-cjs/utils/evaluateTemplate.js -var require_evaluateTemplate = __commonJS({ - "../../../node_modules/@aws-sdk/util-endpoints/dist-cjs/utils/evaluateTemplate.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.evaluateTemplate = void 0; - var lib_1 = require_lib(); - var evaluateTemplate = (template, options) => { - const evaluatedTemplateArr = []; - const templateContext = { - ...options.endpointParams, - ...options.referenceRecord - }; - let currentIndex = 0; - while (currentIndex < template.length) { - const openingBraceIndex = template.indexOf("{", currentIndex); - if (openingBraceIndex === -1) { - evaluatedTemplateArr.push(template.slice(currentIndex)); - break; - } - evaluatedTemplateArr.push(template.slice(currentIndex, openingBraceIndex)); - const closingBraceIndex = template.indexOf("}", openingBraceIndex); - if (closingBraceIndex === -1) { - evaluatedTemplateArr.push(template.slice(openingBraceIndex)); - break; - } - if (template[openingBraceIndex + 1] === "{" && template[closingBraceIndex + 1] === "}") { - evaluatedTemplateArr.push(template.slice(openingBraceIndex + 1, closingBraceIndex)); - currentIndex = closingBraceIndex + 2; - } - const parameterName = template.substring(openingBraceIndex + 1, closingBraceIndex); - if (parameterName.includes("#")) { - const [refName, attrName] = parameterName.split("#"); - evaluatedTemplateArr.push((0, lib_1.getAttr)(templateContext[refName], attrName)); - } else { - evaluatedTemplateArr.push(templateContext[parameterName]); - } - currentIndex = closingBraceIndex + 1; + __name(_Field, "Field"); + var Field = _Field; + var _Fields = class _Fields { + constructor({ fields = [], encoding = "utf-8" }) { + this.entries = {}; + fields.forEach(this.setField.bind(this)); + this.encoding = encoding; } - return evaluatedTemplateArr.join(""); - }; - exports2.evaluateTemplate = evaluateTemplate; - } -}); - -// ../../../node_modules/@aws-sdk/util-endpoints/dist-cjs/utils/getReferenceValue.js -var require_getReferenceValue = __commonJS({ - "../../../node_modules/@aws-sdk/util-endpoints/dist-cjs/utils/getReferenceValue.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getReferenceValue = void 0; - var getReferenceValue = ({ ref }, options) => { - const referenceRecord = { - ...options.endpointParams, - ...options.referenceRecord - }; - return referenceRecord[ref]; - }; - exports2.getReferenceValue = getReferenceValue; - } -}); - -// ../../../node_modules/@aws-sdk/util-endpoints/dist-cjs/utils/evaluateExpression.js -var require_evaluateExpression = __commonJS({ - "../../../node_modules/@aws-sdk/util-endpoints/dist-cjs/utils/evaluateExpression.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.evaluateExpression = void 0; - var types_1 = require_types(); - var callFunction_1 = require_callFunction(); - var evaluateTemplate_1 = require_evaluateTemplate(); - var getReferenceValue_1 = require_getReferenceValue(); - var evaluateExpression = (obj, keyName, options) => { - if (typeof obj === "string") { - return (0, evaluateTemplate_1.evaluateTemplate)(obj, options); - } else if (obj["fn"]) { - return (0, callFunction_1.callFunction)(obj, options); - } else if (obj["ref"]) { - return (0, getReferenceValue_1.getReferenceValue)(obj, options); + /** + * Set entry for a {@link Field} name. The `name` + * attribute will be used to key the collection. + * + * @param field The {@link Field} to set. + */ + setField(field) { + this.entries[field.name.toLowerCase()] = field; } - throw new types_1.EndpointError(`'${keyName}': ${String(obj)} is not a string, function or reference.`); - }; - exports2.evaluateExpression = evaluateExpression; - } -}); - -// ../../../node_modules/@aws-sdk/util-endpoints/dist-cjs/utils/callFunction.js -var require_callFunction = __commonJS({ - "../../../node_modules/@aws-sdk/util-endpoints/dist-cjs/utils/callFunction.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.callFunction = void 0; - var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); - var lib = tslib_1.__importStar(require_lib()); - var evaluateExpression_1 = require_evaluateExpression(); - var callFunction = ({ fn, argv }, options) => { - const evaluatedArgs = argv.map((arg) => ["boolean", "number"].includes(typeof arg) ? arg : (0, evaluateExpression_1.evaluateExpression)(arg, "arg", options)); - return fn.split(".").reduce((acc, key) => acc[key], lib)(...evaluatedArgs); - }; - exports2.callFunction = callFunction; - } -}); - -// ../../../node_modules/@aws-sdk/util-endpoints/dist-cjs/utils/evaluateCondition.js -var require_evaluateCondition = __commonJS({ - "../../../node_modules/@aws-sdk/util-endpoints/dist-cjs/utils/evaluateCondition.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.evaluateCondition = void 0; - var debug_1 = require_debug(); - var types_1 = require_types(); - var callFunction_1 = require_callFunction(); - var evaluateCondition = ({ assign, ...fnArgs }, options) => { - var _a, _b; - if (assign && assign in options.referenceRecord) { - throw new types_1.EndpointError(`'${assign}' is already defined in Reference Record.`); + /** + * Retrieve {@link Field} entry by name. + * + * @param name The name of the {@link Field} entry + * to retrieve + * @returns The {@link Field} if it exists. + */ + getField(name) { + return this.entries[name.toLowerCase()]; + } + /** + * Delete entry from collection. + * + * @param name Name of the entry to delete. + */ + removeField(name) { + delete this.entries[name.toLowerCase()]; + } + /** + * Helper function for retrieving specific types of fields. + * Used to grab all headers or all trailers. + * + * @param kind {@link FieldPosition} of entries to retrieve. + * @returns The {@link Field} entries with the specified + * {@link FieldPosition}. + */ + getByType(kind) { + return Object.values(this.entries).filter((field) => field.kind === kind); } - const value = (0, callFunction_1.callFunction)(fnArgs, options); - (_b = (_a = options.logger) === null || _a === void 0 ? void 0 : _a.debug) === null || _b === void 0 ? void 0 : _b.call(_a, debug_1.debugId, `evaluateCondition: ${(0, debug_1.toDebugString)(fnArgs)} = ${(0, debug_1.toDebugString)(value)}`); - return { - result: value === "" ? true : !!value, - ...assign != null && { toAssign: { name: assign, value } } - }; }; - exports2.evaluateCondition = evaluateCondition; - } -}); - -// ../../../node_modules/@aws-sdk/util-endpoints/dist-cjs/utils/evaluateConditions.js -var require_evaluateConditions = __commonJS({ - "../../../node_modules/@aws-sdk/util-endpoints/dist-cjs/utils/evaluateConditions.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.evaluateConditions = void 0; - var debug_1 = require_debug(); - var evaluateCondition_1 = require_evaluateCondition(); - var evaluateConditions = (conditions = [], options) => { - var _a, _b; - const conditionsReferenceRecord = {}; - for (const condition of conditions) { - const { result, toAssign } = (0, evaluateCondition_1.evaluateCondition)(condition, { - ...options, - referenceRecord: { - ...options.referenceRecord, - ...conditionsReferenceRecord - } + __name(_Fields, "Fields"); + var Fields = _Fields; + var _HttpRequest = class _HttpRequest2 { + constructor(options) { + this.method = options.method || "GET"; + this.hostname = options.hostname || "localhost"; + this.port = options.port; + this.query = options.query || {}; + this.headers = options.headers || {}; + this.body = options.body; + this.protocol = options.protocol ? options.protocol.slice(-1) !== ":" ? `${options.protocol}:` : options.protocol : "https:"; + this.path = options.path ? options.path.charAt(0) !== "/" ? `/${options.path}` : options.path : "/"; + this.username = options.username; + this.password = options.password; + this.fragment = options.fragment; + } + /** + * Note: this does not deep-clone the body. + */ + static clone(request2) { + const cloned = new _HttpRequest2({ + ...request2, + headers: { ...request2.headers } }); - if (!result) { - return { result }; + if (cloned.query) { + cloned.query = cloneQuery(cloned.query); } - if (toAssign) { - conditionsReferenceRecord[toAssign.name] = toAssign.value; - (_b = (_a = options.logger) === null || _a === void 0 ? void 0 : _a.debug) === null || _b === void 0 ? void 0 : _b.call(_a, debug_1.debugId, `assign: ${toAssign.name} := ${(0, debug_1.toDebugString)(toAssign.value)}`); + return cloned; + } + /** + * This method only actually asserts that request is the interface {@link IHttpRequest}, + * and not necessarily this concrete class. Left in place for API stability. + * + * Do not call instance methods on the input of this function, and + * do not assume it has the HttpRequest prototype. + */ + static isInstance(request2) { + if (!request2) { + return false; } + const req = request2; + return "method" in req && "protocol" in req && "hostname" in req && "path" in req && typeof req["query"] === "object" && typeof req["headers"] === "object"; + } + /** + * @deprecated use static HttpRequest.clone(request) instead. It's not safe to call + * this method because {@link HttpRequest.isInstance} incorrectly + * asserts that IHttpRequest (interface) objects are of type HttpRequest (class). + */ + clone() { + return _HttpRequest2.clone(this); } - return { result: true, referenceRecord: conditionsReferenceRecord }; }; - exports2.evaluateConditions = evaluateConditions; - } -}); - -// ../../../node_modules/@aws-sdk/util-endpoints/dist-cjs/utils/getEndpointHeaders.js -var require_getEndpointHeaders = __commonJS({ - "../../../node_modules/@aws-sdk/util-endpoints/dist-cjs/utils/getEndpointHeaders.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getEndpointHeaders = void 0; - var types_1 = require_types(); - var evaluateExpression_1 = require_evaluateExpression(); - var getEndpointHeaders = (headers, options) => Object.entries(headers).reduce((acc, [headerKey, headerVal]) => ({ - ...acc, - [headerKey]: headerVal.map((headerValEntry) => { - const processedExpr = (0, evaluateExpression_1.evaluateExpression)(headerValEntry, "Header value entry", options); - if (typeof processedExpr !== "string") { - throw new types_1.EndpointError(`Header '${headerKey}' value '${processedExpr}' is not a string`); - } - return processedExpr; - }) - }), {}); - exports2.getEndpointHeaders = getEndpointHeaders; - } -}); - -// ../../../node_modules/@aws-sdk/util-endpoints/dist-cjs/utils/getEndpointProperty.js -var require_getEndpointProperty = __commonJS({ - "../../../node_modules/@aws-sdk/util-endpoints/dist-cjs/utils/getEndpointProperty.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getEndpointProperty = void 0; - var types_1 = require_types(); - var evaluateTemplate_1 = require_evaluateTemplate(); - var getEndpointProperties_1 = require_getEndpointProperties(); - var getEndpointProperty = (property, options) => { - if (Array.isArray(property)) { - return property.map((propertyEntry) => (0, exports2.getEndpointProperty)(propertyEntry, options)); + __name(_HttpRequest, "HttpRequest"); + var HttpRequest7 = _HttpRequest; + function cloneQuery(query) { + return Object.keys(query).reduce((carry, paramName) => { + const param = query[paramName]; + return { + ...carry, + [paramName]: Array.isArray(param) ? [...param] : param + }; + }, {}); + } + __name(cloneQuery, "cloneQuery"); + var _HttpResponse = class _HttpResponse { + constructor(options) { + this.statusCode = options.statusCode; + this.reason = options.reason; + this.headers = options.headers || {}; + this.body = options.body; } - switch (typeof property) { - case "string": - return (0, evaluateTemplate_1.evaluateTemplate)(property, options); - case "object": - if (property === null) { - throw new types_1.EndpointError(`Unexpected endpoint property: ${property}`); - } - return (0, getEndpointProperties_1.getEndpointProperties)(property, options); - case "boolean": - return property; - default: - throw new types_1.EndpointError(`Unexpected endpoint property type: ${typeof property}`); + static isInstance(response) { + if (!response) + return false; + const resp = response; + return typeof resp.statusCode === "number" && typeof resp.headers === "object"; } }; - exports2.getEndpointProperty = getEndpointProperty; - } -}); - -// ../../../node_modules/@aws-sdk/util-endpoints/dist-cjs/utils/getEndpointProperties.js -var require_getEndpointProperties = __commonJS({ - "../../../node_modules/@aws-sdk/util-endpoints/dist-cjs/utils/getEndpointProperties.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getEndpointProperties = void 0; - var getEndpointProperty_1 = require_getEndpointProperty(); - var getEndpointProperties = (properties, options) => Object.entries(properties).reduce((acc, [propertyKey, propertyVal]) => ({ - ...acc, - [propertyKey]: (0, getEndpointProperty_1.getEndpointProperty)(propertyVal, options) - }), {}); - exports2.getEndpointProperties = getEndpointProperties; + __name(_HttpResponse, "HttpResponse"); + var HttpResponse2 = _HttpResponse; + function isValidHostname(hostname) { + const hostPattern = /^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/; + return hostPattern.test(hostname); + } + __name(isValidHostname, "isValidHostname"); } }); -// ../../../node_modules/@aws-sdk/util-endpoints/dist-cjs/utils/getEndpointUrl.js -var require_getEndpointUrl = __commonJS({ - "../../../node_modules/@aws-sdk/util-endpoints/dist-cjs/utils/getEndpointUrl.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getEndpointUrl = void 0; - var types_1 = require_types(); - var evaluateExpression_1 = require_evaluateExpression(); - var getEndpointUrl = (endpointUrl, options) => { - const expression = (0, evaluateExpression_1.evaluateExpression)(endpointUrl, "Endpoint URL", options); - if (typeof expression === "string") { - try { - return new URL(expression); - } catch (error) { - console.error(`Failed to construct URL with ${expression}`, error); - throw error; - } - } - throw new types_1.EndpointError(`Endpoint URL must be a string, got ${typeof expression}`); +// ../../../node_modules/@smithy/core/dist-es/middleware-http-signing/httpSigningMiddleware.js +var import_protocol_http, import_types2, import_util_middleware2, defaultErrorHandler, defaultSuccessHandler, httpSigningMiddleware; +var init_httpSigningMiddleware = __esm({ + "../../../node_modules/@smithy/core/dist-es/middleware-http-signing/httpSigningMiddleware.js"() { + import_protocol_http = __toESM(require_dist_cjs20()); + import_types2 = __toESM(require_dist_cjs()); + import_util_middleware2 = __toESM(require_dist_cjs12()); + defaultErrorHandler = (signingProperties) => (error) => { + throw error; }; - exports2.getEndpointUrl = getEndpointUrl; - } -}); - -// ../../../node_modules/@aws-sdk/util-endpoints/dist-cjs/utils/evaluateEndpointRule.js -var require_evaluateEndpointRule = __commonJS({ - "../../../node_modules/@aws-sdk/util-endpoints/dist-cjs/utils/evaluateEndpointRule.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.evaluateEndpointRule = void 0; - var debug_1 = require_debug(); - var evaluateConditions_1 = require_evaluateConditions(); - var getEndpointHeaders_1 = require_getEndpointHeaders(); - var getEndpointProperties_1 = require_getEndpointProperties(); - var getEndpointUrl_1 = require_getEndpointUrl(); - var evaluateEndpointRule = (endpointRule, options) => { - var _a, _b; - const { conditions, endpoint } = endpointRule; - const { result, referenceRecord } = (0, evaluateConditions_1.evaluateConditions)(conditions, options); - if (!result) { - return; + defaultSuccessHandler = (httpResponse, signingProperties) => { + }; + httpSigningMiddleware = (config) => (next, context) => async (args) => { + if (!import_protocol_http.HttpRequest.isInstance(args.request)) { + return next(args); } - const endpointRuleOptions = { - ...options, - referenceRecord: { ...options.referenceRecord, ...referenceRecord } - }; - const { url: url2, properties, headers } = endpoint; - (_b = (_a = options.logger) === null || _a === void 0 ? void 0 : _a.debug) === null || _b === void 0 ? void 0 : _b.call(_a, debug_1.debugId, `Resolving endpoint from template: ${(0, debug_1.toDebugString)(endpoint)}`); - return { - ...headers != void 0 && { - headers: (0, getEndpointHeaders_1.getEndpointHeaders)(headers, endpointRuleOptions) - }, - ...properties != void 0 && { - properties: (0, getEndpointProperties_1.getEndpointProperties)(properties, endpointRuleOptions) - }, - url: (0, getEndpointUrl_1.getEndpointUrl)(url2, endpointRuleOptions) - }; + const smithyContext = (0, import_util_middleware2.getSmithyContext)(context); + const scheme = smithyContext.selectedHttpAuthScheme; + if (!scheme) { + throw new Error(`No HttpAuthScheme was selected: unable to sign request`); + } + const { httpAuthOption: { signingProperties = {} }, identity, signer } = scheme; + const output = await next({ + ...args, + request: await signer.sign(args.request, identity, signingProperties) + }).catch((signer.errorHandler || defaultErrorHandler)(signingProperties)); + (signer.successHandler || defaultSuccessHandler)(output.response, signingProperties); + return output; }; - exports2.evaluateEndpointRule = evaluateEndpointRule; } }); -// ../../../node_modules/@aws-sdk/util-endpoints/dist-cjs/utils/evaluateErrorRule.js -var require_evaluateErrorRule = __commonJS({ - "../../../node_modules/@aws-sdk/util-endpoints/dist-cjs/utils/evaluateErrorRule.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.evaluateErrorRule = void 0; - var types_1 = require_types(); - var evaluateConditions_1 = require_evaluateConditions(); - var evaluateExpression_1 = require_evaluateExpression(); - var evaluateErrorRule = (errorRule, options) => { - const { conditions, error } = errorRule; - const { result, referenceRecord } = (0, evaluateConditions_1.evaluateConditions)(conditions, options); - if (!result) { - return; - } - throw new types_1.EndpointError((0, evaluateExpression_1.evaluateExpression)(error, "Error", { - ...options, - referenceRecord: { ...options.referenceRecord, ...referenceRecord } - })); - }; - exports2.evaluateErrorRule = evaluateErrorRule; - } -}); - -// ../../../node_modules/@aws-sdk/util-endpoints/dist-cjs/utils/evaluateTreeRule.js -var require_evaluateTreeRule = __commonJS({ - "../../../node_modules/@aws-sdk/util-endpoints/dist-cjs/utils/evaluateTreeRule.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.evaluateTreeRule = void 0; - var evaluateConditions_1 = require_evaluateConditions(); - var evaluateRules_1 = require_evaluateRules(); - var evaluateTreeRule = (treeRule, options) => { - const { conditions, rules } = treeRule; - const { result, referenceRecord } = (0, evaluateConditions_1.evaluateConditions)(conditions, options); - if (!result) { - return; - } - return (0, evaluateRules_1.evaluateRules)(rules, { - ...options, - referenceRecord: { ...options.referenceRecord, ...referenceRecord } - }); - }; - exports2.evaluateTreeRule = evaluateTreeRule; - } -}); - -// ../../../node_modules/@aws-sdk/util-endpoints/dist-cjs/utils/evaluateRules.js -var require_evaluateRules = __commonJS({ - "../../../node_modules/@aws-sdk/util-endpoints/dist-cjs/utils/evaluateRules.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.evaluateRules = void 0; - var types_1 = require_types(); - var evaluateEndpointRule_1 = require_evaluateEndpointRule(); - var evaluateErrorRule_1 = require_evaluateErrorRule(); - var evaluateTreeRule_1 = require_evaluateTreeRule(); - var evaluateRules = (rules, options) => { - for (const rule of rules) { - if (rule.type === "endpoint") { - const endpointOrUndefined = (0, evaluateEndpointRule_1.evaluateEndpointRule)(rule, options); - if (endpointOrUndefined) { - return endpointOrUndefined; - } - } else if (rule.type === "error") { - (0, evaluateErrorRule_1.evaluateErrorRule)(rule, options); - } else if (rule.type === "tree") { - const endpointOrUndefined = (0, evaluateTreeRule_1.evaluateTreeRule)(rule, options); - if (endpointOrUndefined) { - return endpointOrUndefined; - } - } else { - throw new types_1.EndpointError(`Unknown endpoint rule: ${rule}`); - } - } - throw new types_1.EndpointError(`Rules evaluation failed`); - }; - exports2.evaluateRules = evaluateRules; - } -}); - -// ../../../node_modules/@aws-sdk/util-endpoints/dist-cjs/utils/index.js -var require_utils = __commonJS({ - "../../../node_modules/@aws-sdk/util-endpoints/dist-cjs/utils/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); - tslib_1.__exportStar(require_evaluateRules(), exports2); - } -}); - -// ../../../node_modules/@aws-sdk/util-endpoints/dist-cjs/resolveEndpoint.js -var require_resolveEndpoint = __commonJS({ - "../../../node_modules/@aws-sdk/util-endpoints/dist-cjs/resolveEndpoint.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.resolveEndpoint = void 0; - var debug_1 = require_debug(); - var types_1 = require_types(); - var utils_1 = require_utils(); - var resolveEndpoint = (ruleSetObject, options) => { - var _a, _b, _c, _d, _e, _f; - const { endpointParams, logger } = options; - const { parameters, rules } = ruleSetObject; - (_b = (_a = options.logger) === null || _a === void 0 ? void 0 : _a.debug) === null || _b === void 0 ? void 0 : _b.call(_a, `${debug_1.debugId} Initial EndpointParams: ${(0, debug_1.toDebugString)(endpointParams)}`); - const paramsWithDefault = Object.entries(parameters).filter(([, v]) => v.default != null).map(([k, v]) => [k, v.default]); - if (paramsWithDefault.length > 0) { - for (const [paramKey, paramDefaultValue] of paramsWithDefault) { - endpointParams[paramKey] = (_c = endpointParams[paramKey]) !== null && _c !== void 0 ? _c : paramDefaultValue; - } - } - const requiredParams = Object.entries(parameters).filter(([, v]) => v.required).map(([k]) => k); - for (const requiredParam of requiredParams) { - if (endpointParams[requiredParam] == null) { - throw new types_1.EndpointError(`Missing required parameter: '${requiredParam}'`); - } - } - const endpoint = (0, utils_1.evaluateRules)(rules, { endpointParams, logger, referenceRecord: {} }); - if ((_d = options.endpointParams) === null || _d === void 0 ? void 0 : _d.Endpoint) { - try { - const givenEndpoint = new URL(options.endpointParams.Endpoint); - const { protocol, port } = givenEndpoint; - endpoint.url.protocol = protocol; - endpoint.url.port = port; - } catch (e) { - } - } - (_f = (_e = options.logger) === null || _e === void 0 ? void 0 : _e.debug) === null || _f === void 0 ? void 0 : _f.call(_e, `${debug_1.debugId} Resolved endpoint: ${(0, debug_1.toDebugString)(endpoint)}`); - return endpoint; - }; - exports2.resolveEndpoint = resolveEndpoint; - } -}); - -// ../../../node_modules/@aws-sdk/util-endpoints/dist-cjs/index.js -var require_dist_cjs16 = __commonJS({ - "../../../node_modules/@aws-sdk/util-endpoints/dist-cjs/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); - tslib_1.__exportStar(require_partition(), exports2); - tslib_1.__exportStar(require_isIpAddress(), exports2); - tslib_1.__exportStar(require_resolveEndpoint(), exports2); - tslib_1.__exportStar(require_types(), exports2); - } -}); - -// ../../../node_modules/@aws-sdk/middleware-user-agent/dist-cjs/constants.js -var require_constants = __commonJS({ - "../../../node_modules/@aws-sdk/middleware-user-agent/dist-cjs/constants.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.UA_ESCAPE_CHAR = exports2.UA_VALUE_ESCAPE_REGEX = exports2.UA_NAME_ESCAPE_REGEX = exports2.UA_NAME_SEPARATOR = exports2.SPACE = exports2.X_AMZ_USER_AGENT = exports2.USER_AGENT = void 0; - exports2.USER_AGENT = "user-agent"; - exports2.X_AMZ_USER_AGENT = "x-amz-user-agent"; - exports2.SPACE = " "; - exports2.UA_NAME_SEPARATOR = "/"; - exports2.UA_NAME_ESCAPE_REGEX = /[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g; - exports2.UA_VALUE_ESCAPE_REGEX = /[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g; - exports2.UA_ESCAPE_CHAR = "-"; - } -}); - -// ../../../node_modules/@aws-sdk/middleware-user-agent/dist-cjs/user-agent-middleware.js -var require_user_agent_middleware = __commonJS({ - "../../../node_modules/@aws-sdk/middleware-user-agent/dist-cjs/user-agent-middleware.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getUserAgentPlugin = exports2.getUserAgentMiddlewareOptions = exports2.userAgentMiddleware = void 0; - var util_endpoints_1 = require_dist_cjs16(); - var protocol_http_1 = require_dist_cjs2(); - var constants_1 = require_constants(); - var userAgentMiddleware = (options) => (next, context) => async (args) => { - var _a, _b; - const { request: request2 } = args; - if (!protocol_http_1.HttpRequest.isInstance(request2)) - return next(args); - const { headers } = request2; - const userAgent = ((_a = context === null || context === void 0 ? void 0 : context.userAgent) === null || _a === void 0 ? void 0 : _a.map(escapeUserAgent)) || []; - const defaultUserAgent = (await options.defaultUserAgentProvider()).map(escapeUserAgent); - const customUserAgent = ((_b = options === null || options === void 0 ? void 0 : options.customUserAgent) === null || _b === void 0 ? void 0 : _b.map(escapeUserAgent)) || []; - const prefix = (0, util_endpoints_1.getUserAgentPrefix)(); - const sdkUserAgentValue = (prefix ? [prefix] : []).concat([...defaultUserAgent, ...userAgent, ...customUserAgent]).join(constants_1.SPACE); - const normalUAValue = [ - ...defaultUserAgent.filter((section) => section.startsWith("aws-sdk-")), - ...customUserAgent - ].join(constants_1.SPACE); - if (options.runtime !== "browser") { - if (normalUAValue) { - headers[constants_1.X_AMZ_USER_AGENT] = headers[constants_1.X_AMZ_USER_AGENT] ? `${headers[constants_1.USER_AGENT]} ${normalUAValue}` : normalUAValue; - } - headers[constants_1.USER_AGENT] = sdkUserAgentValue; - } else { - headers[constants_1.X_AMZ_USER_AGENT] = sdkUserAgentValue; - } - return next({ - ...args, - request: request2 - }); - }; - exports2.userAgentMiddleware = userAgentMiddleware; - var escapeUserAgent = (userAgentPair) => { - var _a; - const name = userAgentPair[0].split(constants_1.UA_NAME_SEPARATOR).map((part) => part.replace(constants_1.UA_NAME_ESCAPE_REGEX, constants_1.UA_ESCAPE_CHAR)).join(constants_1.UA_NAME_SEPARATOR); - const version2 = (_a = userAgentPair[1]) === null || _a === void 0 ? void 0 : _a.replace(constants_1.UA_VALUE_ESCAPE_REGEX, constants_1.UA_ESCAPE_CHAR); - const prefixSeparatorIndex = name.indexOf(constants_1.UA_NAME_SEPARATOR); - const prefix = name.substring(0, prefixSeparatorIndex); - let uaName = name.substring(prefixSeparatorIndex + 1); - if (prefix === "api") { - uaName = uaName.toLowerCase(); - } - return [prefix, uaName, version2].filter((item) => item && item.length > 0).reduce((acc, item, index) => { - switch (index) { - case 0: - return item; - case 1: - return `${acc}/${item}`; - default: - return `${acc}#${item}`; - } - }, ""); - }; - exports2.getUserAgentMiddlewareOptions = { - name: "getUserAgentMiddleware", - step: "build", - priority: "low", - tags: ["SET_USER_AGENT", "USER_AGENT"], - override: true - }; - var getUserAgentPlugin = (config) => ({ - applyToStack: (clientStack) => { - clientStack.add((0, exports2.userAgentMiddleware)(config), exports2.getUserAgentMiddlewareOptions); - } - }); - exports2.getUserAgentPlugin = getUserAgentPlugin; - } -}); - -// ../../../node_modules/@aws-sdk/middleware-user-agent/dist-cjs/index.js -var require_dist_cjs17 = __commonJS({ - "../../../node_modules/@aws-sdk/middleware-user-agent/dist-cjs/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); - tslib_1.__exportStar(require_configurations(), exports2); - tslib_1.__exportStar(require_user_agent_middleware(), exports2); - } -}); - -// ../../../node_modules/@smithy/util-config-provider/dist-cjs/index.js -var require_dist_cjs18 = __commonJS({ - "../../../node_modules/@smithy/util-config-provider/dist-cjs/index.js"(exports2, module2) { - var __defProp2 = Object.defineProperty; - var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; - var __getOwnPropNames2 = Object.getOwnPropertyNames; - var __hasOwnProp2 = Object.prototype.hasOwnProperty; - var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); - var __export2 = (target, all) => { - for (var name in all) - __defProp2(target, name, { get: all[name], enumerable: true }); - }; - var __copyProps2 = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames2(from)) - if (!__hasOwnProp2.call(to, key) && key !== except) - __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); - } - return to; - }; - var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); - var src_exports = {}; - __export2(src_exports, { - SelectorType: () => SelectorType, - booleanSelector: () => booleanSelector, - numberSelector: () => numberSelector - }); - module2.exports = __toCommonJS2(src_exports); - var booleanSelector = /* @__PURE__ */ __name((obj, key, type) => { - if (!(key in obj)) - return void 0; - if (obj[key] === "true") - return true; - if (obj[key] === "false") - return false; - throw new Error(`Cannot load ${type} "${key}". Expected "true" or "false", got ${obj[key]}.`); - }, "booleanSelector"); - var numberSelector = /* @__PURE__ */ __name((obj, key, type) => { - if (!(key in obj)) - return void 0; - const numberValue = parseInt(obj[key], 10); - if (Number.isNaN(numberValue)) { - throw new TypeError(`Cannot load ${type} '${key}'. Expected number, got '${obj[key]}'.`); - } - return numberValue; - }, "numberSelector"); - var SelectorType = /* @__PURE__ */ ((SelectorType2) => { - SelectorType2["ENV"] = "env"; - SelectorType2["CONFIG"] = "shared config entry"; - return SelectorType2; - })(SelectorType || {}); - } -}); - -// ../../../node_modules/@smithy/config-resolver/dist-cjs/index.js -var require_dist_cjs19 = __commonJS({ - "../../../node_modules/@smithy/config-resolver/dist-cjs/index.js"(exports2, module2) { +// ../../../node_modules/@smithy/middleware-retry/node_modules/@smithy/protocol-http/dist-cjs/index.js +var require_dist_cjs21 = __commonJS({ + "../../../node_modules/@smithy/middleware-retry/node_modules/@smithy/protocol-http/dist-cjs/index.js"(exports2, module2) { var __defProp2 = Object.defineProperty; var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; var __getOwnPropNames2 = Object.getOwnPropertyNames; @@ -4677,657 +4022,576 @@ var require_dist_cjs19 = __commonJS({ var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); var src_exports = {}; __export2(src_exports, { - CONFIG_USE_DUALSTACK_ENDPOINT: () => CONFIG_USE_DUALSTACK_ENDPOINT, - CONFIG_USE_FIPS_ENDPOINT: () => CONFIG_USE_FIPS_ENDPOINT, - DEFAULT_USE_DUALSTACK_ENDPOINT: () => DEFAULT_USE_DUALSTACK_ENDPOINT, - DEFAULT_USE_FIPS_ENDPOINT: () => DEFAULT_USE_FIPS_ENDPOINT, - ENV_USE_DUALSTACK_ENDPOINT: () => ENV_USE_DUALSTACK_ENDPOINT, - ENV_USE_FIPS_ENDPOINT: () => ENV_USE_FIPS_ENDPOINT, - NODE_REGION_CONFIG_FILE_OPTIONS: () => NODE_REGION_CONFIG_FILE_OPTIONS, - NODE_REGION_CONFIG_OPTIONS: () => NODE_REGION_CONFIG_OPTIONS, - NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS: () => NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, - NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS: () => NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, - REGION_ENV_NAME: () => REGION_ENV_NAME, - REGION_INI_NAME: () => REGION_INI_NAME, - getRegionInfo: () => getRegionInfo, - resolveCustomEndpointsConfig: () => resolveCustomEndpointsConfig, - resolveEndpointsConfig: () => resolveEndpointsConfig, - resolveRegionConfig: () => resolveRegionConfig + Field: () => Field, + Fields: () => Fields, + HttpRequest: () => HttpRequest7, + HttpResponse: () => HttpResponse2, + IHttpRequest: () => import_types5.HttpRequest, + getHttpHandlerExtensionConfiguration: () => getHttpHandlerExtensionConfiguration, + isValidHostname: () => isValidHostname, + resolveHttpHandlerRuntimeConfig: () => resolveHttpHandlerRuntimeConfig }); module2.exports = __toCommonJS2(src_exports); - var import_util_config_provider = require_dist_cjs18(); - var ENV_USE_DUALSTACK_ENDPOINT = "AWS_USE_DUALSTACK_ENDPOINT"; - var CONFIG_USE_DUALSTACK_ENDPOINT = "use_dualstack_endpoint"; - var DEFAULT_USE_DUALSTACK_ENDPOINT = false; - var NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS = { - environmentVariableSelector: (env) => (0, import_util_config_provider.booleanSelector)(env, ENV_USE_DUALSTACK_ENDPOINT, import_util_config_provider.SelectorType.ENV), - configFileSelector: (profile) => (0, import_util_config_provider.booleanSelector)(profile, CONFIG_USE_DUALSTACK_ENDPOINT, import_util_config_provider.SelectorType.CONFIG), - default: false - }; - var ENV_USE_FIPS_ENDPOINT = "AWS_USE_FIPS_ENDPOINT"; - var CONFIG_USE_FIPS_ENDPOINT = "use_fips_endpoint"; - var DEFAULT_USE_FIPS_ENDPOINT = false; - var NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS = { - environmentVariableSelector: (env) => (0, import_util_config_provider.booleanSelector)(env, ENV_USE_FIPS_ENDPOINT, import_util_config_provider.SelectorType.ENV), - configFileSelector: (profile) => (0, import_util_config_provider.booleanSelector)(profile, CONFIG_USE_FIPS_ENDPOINT, import_util_config_provider.SelectorType.CONFIG), - default: false - }; - var import_util_middleware = require_dist_cjs7(); - var resolveCustomEndpointsConfig = /* @__PURE__ */ __name((input) => { - const { endpoint, urlParser } = input; + var getHttpHandlerExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => { + let httpHandler = runtimeConfig.httpHandler; return { - ...input, - tls: input.tls ?? true, - endpoint: (0, import_util_middleware.normalizeProvider)(typeof endpoint === "string" ? urlParser(endpoint) : endpoint), - isCustomEndpoint: true, - useDualstackEndpoint: (0, import_util_middleware.normalizeProvider)(input.useDualstackEndpoint ?? false) + setHttpHandler(handler2) { + httpHandler = handler2; + }, + httpHandler() { + return httpHandler; + }, + updateHttpClientConfig(key, value) { + httpHandler.updateHttpClientConfig(key, value); + }, + httpHandlerConfigs() { + return httpHandler.httpHandlerConfigs(); + } }; - }, "resolveCustomEndpointsConfig"); - var getEndpointFromRegion = /* @__PURE__ */ __name(async (input) => { - const { tls = true } = input; - const region = await input.region(); - const dnsHostRegex = new RegExp(/^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9])$/); - if (!dnsHostRegex.test(region)) { - throw new Error("Invalid region in client config"); - } - const useDualstackEndpoint = await input.useDualstackEndpoint(); - const useFipsEndpoint = await input.useFipsEndpoint(); - const { hostname } = await input.regionInfoProvider(region, { useDualstackEndpoint, useFipsEndpoint }) ?? {}; - if (!hostname) { - throw new Error("Cannot resolve hostname from client config"); - } - return input.urlParser(`${tls ? "https:" : "http:"}//${hostname}`); - }, "getEndpointFromRegion"); - var resolveEndpointsConfig = /* @__PURE__ */ __name((input) => { - const useDualstackEndpoint = (0, import_util_middleware.normalizeProvider)(input.useDualstackEndpoint ?? false); - const { endpoint, useFipsEndpoint, urlParser } = input; + }, "getHttpHandlerExtensionConfiguration"); + var resolveHttpHandlerRuntimeConfig = /* @__PURE__ */ __name((httpHandlerExtensionConfiguration) => { return { - ...input, - tls: input.tls ?? true, - endpoint: endpoint ? (0, import_util_middleware.normalizeProvider)(typeof endpoint === "string" ? urlParser(endpoint) : endpoint) : () => getEndpointFromRegion({ ...input, useDualstackEndpoint, useFipsEndpoint }), - isCustomEndpoint: !!endpoint, - useDualstackEndpoint + httpHandler: httpHandlerExtensionConfiguration.httpHandler() }; - }, "resolveEndpointsConfig"); - var REGION_ENV_NAME = "AWS_REGION"; - var REGION_INI_NAME = "region"; - var NODE_REGION_CONFIG_OPTIONS = { - environmentVariableSelector: (env) => env[REGION_ENV_NAME], - configFileSelector: (profile) => profile[REGION_INI_NAME], - default: () => { - throw new Error("Region is missing"); + }, "resolveHttpHandlerRuntimeConfig"); + var import_types5 = require_dist_cjs(); + var _Field = class _Field { + constructor({ name, kind = import_types5.FieldPosition.HEADER, values = [] }) { + this.name = name; + this.kind = kind; + this.values = values; + } + /** + * Appends a value to the field. + * + * @param value The value to append. + */ + add(value) { + this.values.push(value); + } + /** + * Overwrite existing field values. + * + * @param values The new field values. + */ + set(values) { + this.values = values; + } + /** + * Remove all matching entries from list. + * + * @param value Value to remove. + */ + remove(value) { + this.values = this.values.filter((v) => v !== value); + } + /** + * Get comma-delimited string. + * + * @returns String representation of {@link Field}. + */ + toString() { + return this.values.map((v) => v.includes(",") || v.includes(" ") ? `"${v}"` : v).join(", "); + } + /** + * Get string values as a list + * + * @returns Values in {@link Field} as a list. + */ + get() { + return this.values; } }; - var NODE_REGION_CONFIG_FILE_OPTIONS = { - preferredFile: "credentials" + __name(_Field, "Field"); + var Field = _Field; + var _Fields = class _Fields { + constructor({ fields = [], encoding = "utf-8" }) { + this.entries = {}; + fields.forEach(this.setField.bind(this)); + this.encoding = encoding; + } + /** + * Set entry for a {@link Field} name. The `name` + * attribute will be used to key the collection. + * + * @param field The {@link Field} to set. + */ + setField(field) { + this.entries[field.name.toLowerCase()] = field; + } + /** + * Retrieve {@link Field} entry by name. + * + * @param name The name of the {@link Field} entry + * to retrieve + * @returns The {@link Field} if it exists. + */ + getField(name) { + return this.entries[name.toLowerCase()]; + } + /** + * Delete entry from collection. + * + * @param name Name of the entry to delete. + */ + removeField(name) { + delete this.entries[name.toLowerCase()]; + } + /** + * Helper function for retrieving specific types of fields. + * Used to grab all headers or all trailers. + * + * @param kind {@link FieldPosition} of entries to retrieve. + * @returns The {@link Field} entries with the specified + * {@link FieldPosition}. + */ + getByType(kind) { + return Object.values(this.entries).filter((field) => field.kind === kind); + } }; - var isFipsRegion = /* @__PURE__ */ __name((region) => typeof region === "string" && (region.startsWith("fips-") || region.endsWith("-fips")), "isFipsRegion"); - var getRealRegion = /* @__PURE__ */ __name((region) => isFipsRegion(region) ? ["fips-aws-global", "aws-fips"].includes(region) ? "us-east-1" : region.replace(/fips-(dkr-|prod-)?|-fips/, "") : region, "getRealRegion"); - var resolveRegionConfig = /* @__PURE__ */ __name((input) => { - const { region, useFipsEndpoint } = input; - if (!region) { - throw new Error("Region is missing"); + __name(_Fields, "Fields"); + var Fields = _Fields; + var _HttpRequest = class _HttpRequest2 { + constructor(options) { + this.method = options.method || "GET"; + this.hostname = options.hostname || "localhost"; + this.port = options.port; + this.query = options.query || {}; + this.headers = options.headers || {}; + this.body = options.body; + this.protocol = options.protocol ? options.protocol.slice(-1) !== ":" ? `${options.protocol}:` : options.protocol : "https:"; + this.path = options.path ? options.path.charAt(0) !== "/" ? `/${options.path}` : options.path : "/"; + this.username = options.username; + this.password = options.password; + this.fragment = options.fragment; } - return { - ...input, - region: async () => { - if (typeof region === "string") { - return getRealRegion(region); - } - const providedRegion = await region(); - return getRealRegion(providedRegion); - }, - useFipsEndpoint: async () => { - const providedRegion = typeof region === "string" ? region : await region(); - if (isFipsRegion(providedRegion)) { - return true; - } - return typeof useFipsEndpoint !== "function" ? Promise.resolve(!!useFipsEndpoint) : useFipsEndpoint(); - } - }; - }, "resolveRegionConfig"); - var getHostnameFromVariants = /* @__PURE__ */ __name((variants = [], { useFipsEndpoint, useDualstackEndpoint }) => { - var _a; - return (_a = variants.find( - ({ tags }) => useFipsEndpoint === tags.includes("fips") && useDualstackEndpoint === tags.includes("dualstack") - )) == null ? void 0 : _a.hostname; - }, "getHostnameFromVariants"); - var getResolvedHostname = /* @__PURE__ */ __name((resolvedRegion, { regionHostname, partitionHostname }) => regionHostname ? regionHostname : partitionHostname ? partitionHostname.replace("{region}", resolvedRegion) : void 0, "getResolvedHostname"); - var getResolvedPartition = /* @__PURE__ */ __name((region, { partitionHash }) => Object.keys(partitionHash || {}).find((key) => partitionHash[key].regions.includes(region)) ?? "aws", "getResolvedPartition"); - var getResolvedSigningRegion = /* @__PURE__ */ __name((hostname, { signingRegion, regionRegex, useFipsEndpoint }) => { - if (signingRegion) { - return signingRegion; - } else if (useFipsEndpoint) { - const regionRegexJs = regionRegex.replace("\\\\", "\\").replace(/^\^/g, "\\.").replace(/\$$/g, "\\."); - const regionRegexmatchArray = hostname.match(regionRegexJs); - if (regionRegexmatchArray) { - return regionRegexmatchArray[0].slice(1, -1); + /** + * Note: this does not deep-clone the body. + */ + static clone(request2) { + const cloned = new _HttpRequest2({ + ...request2, + headers: { ...request2.headers } + }); + if (cloned.query) { + cloned.query = cloneQuery(cloned.query); } + return cloned; } - }, "getResolvedSigningRegion"); - var getRegionInfo = /* @__PURE__ */ __name((region, { - useFipsEndpoint = false, - useDualstackEndpoint = false, - signingService, - regionHash, - partitionHash - }) => { - var _a, _b, _c, _d, _e; - const partition = getResolvedPartition(region, { partitionHash }); - const resolvedRegion = region in regionHash ? region : ((_a = partitionHash[partition]) == null ? void 0 : _a.endpoint) ?? region; - const hostnameOptions = { useFipsEndpoint, useDualstackEndpoint }; - const regionHostname = getHostnameFromVariants((_b = regionHash[resolvedRegion]) == null ? void 0 : _b.variants, hostnameOptions); - const partitionHostname = getHostnameFromVariants((_c = partitionHash[partition]) == null ? void 0 : _c.variants, hostnameOptions); - const hostname = getResolvedHostname(resolvedRegion, { regionHostname, partitionHostname }); - if (hostname === void 0) { - throw new Error(`Endpoint resolution failed for: ${{ resolvedRegion, useFipsEndpoint, useDualstackEndpoint }}`); - } - const signingRegion = getResolvedSigningRegion(hostname, { - signingRegion: (_d = regionHash[resolvedRegion]) == null ? void 0 : _d.signingRegion, - regionRegex: partitionHash[partition].regionRegex, - useFipsEndpoint - }); - return { - partition, - signingService, - hostname, - ...signingRegion && { signingRegion }, - ...((_e = regionHash[resolvedRegion]) == null ? void 0 : _e.signingService) && { - signingService: regionHash[resolvedRegion].signingService + /** + * This method only actually asserts that request is the interface {@link IHttpRequest}, + * and not necessarily this concrete class. Left in place for API stability. + * + * Do not call instance methods on the input of this function, and + * do not assume it has the HttpRequest prototype. + */ + static isInstance(request2) { + if (!request2) { + return false; } - }; - }, "getRegionInfo"); - } -}); - -// ../../../node_modules/@smithy/middleware-content-length/dist-cjs/index.js -var require_dist_cjs20 = __commonJS({ - "../../../node_modules/@smithy/middleware-content-length/dist-cjs/index.js"(exports2, module2) { - var __defProp2 = Object.defineProperty; - var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; - var __getOwnPropNames2 = Object.getOwnPropertyNames; - var __hasOwnProp2 = Object.prototype.hasOwnProperty; - var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); - var __export2 = (target, all) => { - for (var name in all) - __defProp2(target, name, { get: all[name], enumerable: true }); - }; - var __copyProps2 = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames2(from)) - if (!__hasOwnProp2.call(to, key) && key !== except) - __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + const req = request2; + return "method" in req && "protocol" in req && "hostname" in req && "path" in req && typeof req["query"] === "object" && typeof req["headers"] === "object"; + } + /** + * @deprecated use static HttpRequest.clone(request) instead. It's not safe to call + * this method because {@link HttpRequest.isInstance} incorrectly + * asserts that IHttpRequest (interface) objects are of type HttpRequest (class). + */ + clone() { + return _HttpRequest2.clone(this); } - return to; }; - var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); - var src_exports = {}; - __export2(src_exports, { - contentLengthMiddleware: () => contentLengthMiddleware, - contentLengthMiddlewareOptions: () => contentLengthMiddlewareOptions, - getContentLengthPlugin: () => getContentLengthPlugin - }); - module2.exports = __toCommonJS2(src_exports); - var import_protocol_http = require_dist_cjs2(); - var CONTENT_LENGTH_HEADER = "content-length"; - function contentLengthMiddleware(bodyLengthChecker) { - return (next) => async (args) => { - const request2 = args.request; - if (import_protocol_http.HttpRequest.isInstance(request2)) { - const { body, headers } = request2; - if (body && Object.keys(headers).map((str) => str.toLowerCase()).indexOf(CONTENT_LENGTH_HEADER) === -1) { - try { - const length = bodyLengthChecker(body); - request2.headers = { - ...request2.headers, - [CONTENT_LENGTH_HEADER]: String(length) - }; - } catch (error) { - } - } - } - return next({ - ...args, - request: request2 - }); - }; + __name(_HttpRequest, "HttpRequest"); + var HttpRequest7 = _HttpRequest; + function cloneQuery(query) { + return Object.keys(query).reduce((carry, paramName) => { + const param = query[paramName]; + return { + ...carry, + [paramName]: Array.isArray(param) ? [...param] : param + }; + }, {}); } - __name(contentLengthMiddleware, "contentLengthMiddleware"); - var contentLengthMiddlewareOptions = { - step: "build", - tags: ["SET_CONTENT_LENGTH", "CONTENT_LENGTH"], - name: "contentLengthMiddleware", - override: true - }; - var getContentLengthPlugin = /* @__PURE__ */ __name((options) => ({ - applyToStack: (clientStack) => { - clientStack.add(contentLengthMiddleware(options.bodyLengthChecker), contentLengthMiddlewareOptions); + __name(cloneQuery, "cloneQuery"); + var _HttpResponse = class _HttpResponse { + constructor(options) { + this.statusCode = options.statusCode; + this.reason = options.reason; + this.headers = options.headers || {}; + this.body = options.body; } - }), "getContentLengthPlugin"); + static isInstance(response) { + if (!response) + return false; + const resp = response; + return typeof resp.statusCode === "number" && typeof resp.headers === "object"; + } + }; + __name(_HttpResponse, "HttpResponse"); + var HttpResponse2 = _HttpResponse; + function isValidHostname(hostname) { + const hostPattern = /^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/; + return hostPattern.test(hostname); + } + __name(isValidHostname, "isValidHostname"); } }); -// ../../../node_modules/@smithy/shared-ini-file-loader/dist-cjs/getHomeDir.js -var require_getHomeDir = __commonJS({ - "../../../node_modules/@smithy/shared-ini-file-loader/dist-cjs/getHomeDir.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getHomeDir = void 0; - var os_1 = require("os"); - var path_1 = require("path"); - var homeDirCache = {}; - var getHomeDirCacheKey = () => { - if (process && process.geteuid) { - return `${process.geteuid()}`; - } - return "DEFAULT"; - }; - var getHomeDir2 = () => { - const { HOME, USERPROFILE, HOMEPATH, HOMEDRIVE = `C:${path_1.sep}` } = process.env; - if (HOME) - return HOME; - if (USERPROFILE) - return USERPROFILE; - if (HOMEPATH) - return `${HOMEDRIVE}${HOMEPATH}`; - const homeDirCacheKey = getHomeDirCacheKey(); - if (!homeDirCache[homeDirCacheKey]) - homeDirCache[homeDirCacheKey] = (0, os_1.homedir)(); - return homeDirCache[homeDirCacheKey]; - }; - exports2.getHomeDir = getHomeDir2; +// ../../../node_modules/uuid/dist/esm-node/rng.js +function rng() { + if (poolPtr > rnds8Pool.length - 16) { + import_crypto.default.randomFillSync(rnds8Pool); + poolPtr = 0; + } + return rnds8Pool.slice(poolPtr, poolPtr += 16); +} +var import_crypto, rnds8Pool, poolPtr; +var init_rng = __esm({ + "../../../node_modules/uuid/dist/esm-node/rng.js"() { + import_crypto = __toESM(require("crypto")); + rnds8Pool = new Uint8Array(256); + poolPtr = rnds8Pool.length; } }); -// ../../../node_modules/@smithy/shared-ini-file-loader/dist-cjs/getSSOTokenFilepath.js -var require_getSSOTokenFilepath = __commonJS({ - "../../../node_modules/@smithy/shared-ini-file-loader/dist-cjs/getSSOTokenFilepath.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getSSOTokenFilepath = void 0; - var crypto_1 = require("crypto"); - var path_1 = require("path"); - var getHomeDir_1 = require_getHomeDir(); - var getSSOTokenFilepath2 = (id) => { - const hasher = (0, crypto_1.createHash)("sha1"); - const cacheName = hasher.update(id).digest("hex"); - return (0, path_1.join)((0, getHomeDir_1.getHomeDir)(), ".aws", "sso", "cache", `${cacheName}.json`); - }; - exports2.getSSOTokenFilepath = getSSOTokenFilepath2; +// ../../../node_modules/uuid/dist/esm-node/regex.js +var regex_default; +var init_regex = __esm({ + "../../../node_modules/uuid/dist/esm-node/regex.js"() { + regex_default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i; } }); -// ../../../node_modules/@smithy/shared-ini-file-loader/dist-cjs/getSSOTokenFromFile.js -var require_getSSOTokenFromFile = __commonJS({ - "../../../node_modules/@smithy/shared-ini-file-loader/dist-cjs/getSSOTokenFromFile.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getSSOTokenFromFile = void 0; - var fs_1 = require("fs"); - var getSSOTokenFilepath_1 = require_getSSOTokenFilepath(); - var { readFile } = fs_1.promises; - var getSSOTokenFromFile2 = async (id) => { - const ssoTokenFilepath = (0, getSSOTokenFilepath_1.getSSOTokenFilepath)(id); - const ssoTokenText = await readFile(ssoTokenFilepath, "utf8"); - return JSON.parse(ssoTokenText); - }; - exports2.getSSOTokenFromFile = getSSOTokenFromFile2; +// ../../../node_modules/uuid/dist/esm-node/validate.js +function validate(uuid) { + return typeof uuid === "string" && regex_default.test(uuid); +} +var validate_default; +var init_validate = __esm({ + "../../../node_modules/uuid/dist/esm-node/validate.js"() { + init_regex(); + validate_default = validate; } }); -// ../../../node_modules/@smithy/shared-ini-file-loader/dist-cjs/slurpFile.js -var require_slurpFile = __commonJS({ - "../../../node_modules/@smithy/shared-ini-file-loader/dist-cjs/slurpFile.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.slurpFile = void 0; - var fs_1 = require("fs"); - var { readFile } = fs_1.promises; - var filePromisesHash = {}; - var slurpFile = (path, options) => { - if (!filePromisesHash[path] || (options === null || options === void 0 ? void 0 : options.ignoreCache)) { - filePromisesHash[path] = readFile(path, "utf8"); - } - return filePromisesHash[path]; - }; - exports2.slurpFile = slurpFile; +// ../../../node_modules/uuid/dist/esm-node/stringify.js +function unsafeStringify(arr, offset = 0) { + return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + "-" + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + "-" + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + "-" + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + "-" + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]; +} +function stringify(arr, offset = 0) { + const uuid = unsafeStringify(arr, offset); + if (!validate_default(uuid)) { + throw TypeError("Stringified UUID is invalid"); + } + return uuid; +} +var byteToHex, stringify_default; +var init_stringify = __esm({ + "../../../node_modules/uuid/dist/esm-node/stringify.js"() { + init_validate(); + byteToHex = []; + for (let i = 0; i < 256; ++i) { + byteToHex.push((i + 256).toString(16).slice(1)); + } + stringify_default = stringify; } }); -// ../../../node_modules/@smithy/shared-ini-file-loader/dist-cjs/index.js -var require_dist_cjs21 = __commonJS({ - "../../../node_modules/@smithy/shared-ini-file-loader/dist-cjs/index.js"(exports2, module2) { - var __defProp2 = Object.defineProperty; - var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; - var __getOwnPropNames2 = Object.getOwnPropertyNames; - var __hasOwnProp2 = Object.prototype.hasOwnProperty; - var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); - var __export2 = (target, all) => { - for (var name in all) - __defProp2(target, name, { get: all[name], enumerable: true }); - }; - var __copyProps2 = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames2(from)) - if (!__hasOwnProp2.call(to, key) && key !== except) - __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); - } - return to; - }; - var __reExport = (target, mod, secondTarget) => (__copyProps2(target, mod, "default"), secondTarget && __copyProps2(secondTarget, mod, "default")); - var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); - var src_exports = {}; - __export2(src_exports, { - CONFIG_PREFIX_SEPARATOR: () => CONFIG_PREFIX_SEPARATOR, - DEFAULT_PROFILE: () => DEFAULT_PROFILE, - ENV_PROFILE: () => ENV_PROFILE, - getProfileName: () => getProfileName, - loadSharedConfigFiles: () => loadSharedConfigFiles, - loadSsoSessionData: () => loadSsoSessionData, - parseKnownFiles: () => parseKnownFiles - }); - module2.exports = __toCommonJS2(src_exports); - __reExport(src_exports, require_getHomeDir(), module2.exports); - var ENV_PROFILE = "AWS_PROFILE"; - var DEFAULT_PROFILE = "default"; - var getProfileName = /* @__PURE__ */ __name((init) => init.profile || process.env[ENV_PROFILE] || DEFAULT_PROFILE, "getProfileName"); - __reExport(src_exports, require_getSSOTokenFilepath(), module2.exports); - __reExport(src_exports, require_getSSOTokenFromFile(), module2.exports); - var import_types = require_dist_cjs(); - var getConfigData = /* @__PURE__ */ __name((data) => Object.entries(data).filter(([key]) => { - const indexOfSeparator = key.indexOf(CONFIG_PREFIX_SEPARATOR); - if (indexOfSeparator === -1) { - return false; - } - return Object.values(import_types.IniSectionType).includes(key.substring(0, indexOfSeparator)); - }).reduce( - (acc, [key, value]) => { - const indexOfSeparator = key.indexOf(CONFIG_PREFIX_SEPARATOR); - const updatedKey = key.substring(0, indexOfSeparator) === import_types.IniSectionType.PROFILE ? key.substring(indexOfSeparator + 1) : key; - acc[updatedKey] = value; - return acc; - }, - { - // Populate default profile, if present. - ...data.default && { default: data.default } - } - ), "getConfigData"); - var import_path = require("path"); - var import_getHomeDir = require_getHomeDir(); - var ENV_CONFIG_PATH = "AWS_CONFIG_FILE"; - var getConfigFilepath = /* @__PURE__ */ __name(() => process.env[ENV_CONFIG_PATH] || (0, import_path.join)((0, import_getHomeDir.getHomeDir)(), ".aws", "config"), "getConfigFilepath"); - var import_getHomeDir2 = require_getHomeDir(); - var ENV_CREDENTIALS_PATH = "AWS_SHARED_CREDENTIALS_FILE"; - var getCredentialsFilepath = /* @__PURE__ */ __name(() => process.env[ENV_CREDENTIALS_PATH] || (0, import_path.join)((0, import_getHomeDir2.getHomeDir)(), ".aws", "credentials"), "getCredentialsFilepath"); - var prefixKeyRegex = /^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/; - var profileNameBlockList = ["__proto__", "profile __proto__"]; - var parseIni = /* @__PURE__ */ __name((iniData) => { - const map = {}; - let currentSection; - let currentSubSection; - for (const iniLine of iniData.split(/\r?\n/)) { - const trimmedLine = iniLine.split(/(^|\s)[;#]/)[0].trim(); - const isSection = trimmedLine[0] === "[" && trimmedLine[trimmedLine.length - 1] === "]"; - if (isSection) { - currentSection = void 0; - currentSubSection = void 0; - const sectionName = trimmedLine.substring(1, trimmedLine.length - 1); - const matches = prefixKeyRegex.exec(sectionName); - if (matches) { - const [, prefix, , name] = matches; - if (Object.values(import_types.IniSectionType).includes(prefix)) { - currentSection = [prefix, name].join(CONFIG_PREFIX_SEPARATOR); - } - } else { - currentSection = sectionName; - } - if (profileNameBlockList.includes(sectionName)) { - throw new Error(`Found invalid profile name "${sectionName}"`); - } - } else if (currentSection) { - const indexOfEqualsSign = trimmedLine.indexOf("="); - if (![0, -1].includes(indexOfEqualsSign)) { - const [name, value] = [ - trimmedLine.substring(0, indexOfEqualsSign).trim(), - trimmedLine.substring(indexOfEqualsSign + 1).trim() - ]; - if (value === "") { - currentSubSection = name; - } else { - if (currentSubSection && iniLine.trimStart() === iniLine) { - currentSubSection = void 0; - } - map[currentSection] = map[currentSection] || {}; - const key = currentSubSection ? [currentSubSection, name].join(CONFIG_PREFIX_SEPARATOR) : name; - map[currentSection][key] = value; - } - } - } - } - return map; - }, "parseIni"); - var import_slurpFile = require_slurpFile(); - var swallowError = /* @__PURE__ */ __name(() => ({}), "swallowError"); - var CONFIG_PREFIX_SEPARATOR = "."; - var loadSharedConfigFiles = /* @__PURE__ */ __name(async (init = {}) => { - const { filepath = getCredentialsFilepath(), configFilepath = getConfigFilepath() } = init; - const parsedFiles = await Promise.all([ - (0, import_slurpFile.slurpFile)(configFilepath, { - ignoreCache: init.ignoreCache - }).then(parseIni).then(getConfigData).catch(swallowError), - (0, import_slurpFile.slurpFile)(filepath, { - ignoreCache: init.ignoreCache - }).then(parseIni).catch(swallowError) - ]); - return { - configFile: parsedFiles[0], - credentialsFile: parsedFiles[1] - }; - }, "loadSharedConfigFiles"); - var getSsoSessionData = /* @__PURE__ */ __name((data) => Object.entries(data).filter(([key]) => key.startsWith(import_types.IniSectionType.SSO_SESSION + CONFIG_PREFIX_SEPARATOR)).reduce((acc, [key, value]) => ({ ...acc, [key.substring(key.indexOf(CONFIG_PREFIX_SEPARATOR) + 1)]: value }), {}), "getSsoSessionData"); - var import_slurpFile2 = require_slurpFile(); - var swallowError2 = /* @__PURE__ */ __name(() => ({}), "swallowError"); - var loadSsoSessionData = /* @__PURE__ */ __name(async (init = {}) => (0, import_slurpFile2.slurpFile)(init.configFilepath ?? getConfigFilepath()).then(parseIni).then(getSsoSessionData).catch(swallowError2), "loadSsoSessionData"); - var mergeConfigFiles = /* @__PURE__ */ __name((...files) => { - const merged = {}; - for (const file of files) { - for (const [key, values] of Object.entries(file)) { - if (merged[key] !== void 0) { - Object.assign(merged[key], values); - } else { - merged[key] = values; - } - } - } - return merged; - }, "mergeConfigFiles"); - var parseKnownFiles = /* @__PURE__ */ __name(async (init) => { - const parsedFiles = await loadSharedConfigFiles(init); - return mergeConfigFiles(parsedFiles.configFile, parsedFiles.credentialsFile); - }, "parseKnownFiles"); +// ../../../node_modules/uuid/dist/esm-node/v1.js +function v1(options, buf, offset) { + let i = buf && offset || 0; + const b = buf || new Array(16); + options = options || {}; + let node = options.node || _nodeId; + let clockseq = options.clockseq !== void 0 ? options.clockseq : _clockseq; + if (node == null || clockseq == null) { + const seedBytes = options.random || (options.rng || rng)(); + if (node == null) { + node = _nodeId = [seedBytes[0] | 1, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]]; + } + if (clockseq == null) { + clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 16383; + } } -}); - -// ../../../node_modules/@smithy/node-config-provider/dist-cjs/index.js -var require_dist_cjs22 = __commonJS({ - "../../../node_modules/@smithy/node-config-provider/dist-cjs/index.js"(exports2, module2) { - var __defProp2 = Object.defineProperty; - var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; - var __getOwnPropNames2 = Object.getOwnPropertyNames; - var __hasOwnProp2 = Object.prototype.hasOwnProperty; - var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); - var __export2 = (target, all) => { - for (var name in all) - __defProp2(target, name, { get: all[name], enumerable: true }); - }; - var __copyProps2 = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames2(from)) - if (!__hasOwnProp2.call(to, key) && key !== except) - __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); - } - return to; - }; - var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); - var src_exports = {}; - __export2(src_exports, { - loadConfig: () => loadConfig - }); - module2.exports = __toCommonJS2(src_exports); - var import_property_provider = require_dist_cjs6(); - var fromEnv = /* @__PURE__ */ __name((envVarSelector) => async () => { - try { - const config = envVarSelector(process.env); - if (config === void 0) { - throw new Error(); - } - return config; - } catch (e) { - throw new import_property_provider.CredentialsProviderError( - e.message || `Cannot load config from environment variables with getter: ${envVarSelector}` - ); - } - }, "fromEnv"); - var import_shared_ini_file_loader = require_dist_cjs21(); - var fromSharedConfigFiles = /* @__PURE__ */ __name((configSelector, { preferredFile = "config", ...init } = {}) => async () => { - const profile = (0, import_shared_ini_file_loader.getProfileName)(init); - const { configFile, credentialsFile } = await (0, import_shared_ini_file_loader.loadSharedConfigFiles)(init); - const profileFromCredentials = credentialsFile[profile] || {}; - const profileFromConfig = configFile[profile] || {}; - const mergedProfile = preferredFile === "config" ? { ...profileFromCredentials, ...profileFromConfig } : { ...profileFromConfig, ...profileFromCredentials }; - try { - const cfgFile = preferredFile === "config" ? configFile : credentialsFile; - const configValue = configSelector(mergedProfile, cfgFile); - if (configValue === void 0) { - throw new Error(); - } - return configValue; - } catch (e) { - throw new import_property_provider.CredentialsProviderError( - e.message || `Cannot load config for profile ${profile} in SDK configuration files with getter: ${configSelector}` - ); - } - }, "fromSharedConfigFiles"); - var isFunction = /* @__PURE__ */ __name((func) => typeof func === "function", "isFunction"); - var fromStatic = /* @__PURE__ */ __name((defaultValue) => isFunction(defaultValue) ? async () => await defaultValue() : (0, import_property_provider.fromStatic)(defaultValue), "fromStatic"); - var loadConfig = /* @__PURE__ */ __name(({ environmentVariableSelector, configFileSelector, default: defaultValue }, configuration = {}) => (0, import_property_provider.memoize)( - (0, import_property_provider.chain)( - fromEnv(environmentVariableSelector), - fromSharedConfigFiles(configFileSelector, configuration), - fromStatic(defaultValue) - ) - ), "loadConfig"); + let msecs = options.msecs !== void 0 ? options.msecs : Date.now(); + let nsecs = options.nsecs !== void 0 ? options.nsecs : _lastNSecs + 1; + const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 1e4; + if (dt < 0 && options.clockseq === void 0) { + clockseq = clockseq + 1 & 16383; } -}); - -// ../../../node_modules/@smithy/middleware-endpoint/dist-cjs/adaptors/getEndpointUrlConfig.js -var require_getEndpointUrlConfig = __commonJS({ - "../../../node_modules/@smithy/middleware-endpoint/dist-cjs/adaptors/getEndpointUrlConfig.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getEndpointUrlConfig = void 0; - var shared_ini_file_loader_1 = require_dist_cjs21(); - var ENV_ENDPOINT_URL = "AWS_ENDPOINT_URL"; - var CONFIG_ENDPOINT_URL = "endpoint_url"; - var getEndpointUrlConfig = (serviceId) => ({ - environmentVariableSelector: (env) => { - const serviceSuffixParts = serviceId.split(" ").map((w) => w.toUpperCase()); - const serviceEndpointUrl = env[[ENV_ENDPOINT_URL, ...serviceSuffixParts].join("_")]; - if (serviceEndpointUrl) - return serviceEndpointUrl; - const endpointUrl = env[ENV_ENDPOINT_URL]; - if (endpointUrl) - return endpointUrl; - return void 0; - }, - configFileSelector: (profile, config) => { - if (config && profile.services) { - const servicesSection = config[["services", profile.services].join(shared_ini_file_loader_1.CONFIG_PREFIX_SEPARATOR)]; - if (servicesSection) { - const servicePrefixParts = serviceId.split(" ").map((w) => w.toLowerCase()); - const endpointUrl2 = servicesSection[[servicePrefixParts.join("_"), CONFIG_ENDPOINT_URL].join(shared_ini_file_loader_1.CONFIG_PREFIX_SEPARATOR)]; - if (endpointUrl2) - return endpointUrl2; - } - } - const endpointUrl = profile[CONFIG_ENDPOINT_URL]; - if (endpointUrl) - return endpointUrl; - return void 0; - }, - default: void 0 - }); - exports2.getEndpointUrlConfig = getEndpointUrlConfig; + if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === void 0) { + nsecs = 0; + } + if (nsecs >= 1e4) { + throw new Error("uuid.v1(): Can't create more than 10M uuids/sec"); + } + _lastMSecs = msecs; + _lastNSecs = nsecs; + _clockseq = clockseq; + msecs += 122192928e5; + const tl = ((msecs & 268435455) * 1e4 + nsecs) % 4294967296; + b[i++] = tl >>> 24 & 255; + b[i++] = tl >>> 16 & 255; + b[i++] = tl >>> 8 & 255; + b[i++] = tl & 255; + const tmh = msecs / 4294967296 * 1e4 & 268435455; + b[i++] = tmh >>> 8 & 255; + b[i++] = tmh & 255; + b[i++] = tmh >>> 24 & 15 | 16; + b[i++] = tmh >>> 16 & 255; + b[i++] = clockseq >>> 8 | 128; + b[i++] = clockseq & 255; + for (let n = 0; n < 6; ++n) { + b[i + n] = node[n]; + } + return buf || unsafeStringify(b); +} +var _nodeId, _clockseq, _lastMSecs, _lastNSecs, v1_default; +var init_v1 = __esm({ + "../../../node_modules/uuid/dist/esm-node/v1.js"() { + init_rng(); + init_stringify(); + _lastMSecs = 0; + _lastNSecs = 0; + v1_default = v1; } }); -// ../../../node_modules/@smithy/middleware-endpoint/dist-cjs/adaptors/getEndpointFromConfig.js -var require_getEndpointFromConfig = __commonJS({ - "../../../node_modules/@smithy/middleware-endpoint/dist-cjs/adaptors/getEndpointFromConfig.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getEndpointFromConfig = void 0; - var node_config_provider_1 = require_dist_cjs22(); - var getEndpointUrlConfig_1 = require_getEndpointUrlConfig(); - var getEndpointFromConfig = async (serviceId) => (0, node_config_provider_1.loadConfig)((0, getEndpointUrlConfig_1.getEndpointUrlConfig)(serviceId))(); - exports2.getEndpointFromConfig = getEndpointFromConfig; +// ../../../node_modules/uuid/dist/esm-node/parse.js +function parse(uuid) { + if (!validate_default(uuid)) { + throw TypeError("Invalid UUID"); + } + let v; + const arr = new Uint8Array(16); + arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24; + arr[1] = v >>> 16 & 255; + arr[2] = v >>> 8 & 255; + arr[3] = v & 255; + arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8; + arr[5] = v & 255; + arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8; + arr[7] = v & 255; + arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8; + arr[9] = v & 255; + arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 1099511627776 & 255; + arr[11] = v / 4294967296 & 255; + arr[12] = v >>> 24 & 255; + arr[13] = v >>> 16 & 255; + arr[14] = v >>> 8 & 255; + arr[15] = v & 255; + return arr; +} +var parse_default; +var init_parse = __esm({ + "../../../node_modules/uuid/dist/esm-node/parse.js"() { + init_validate(); + parse_default = parse; } }); -// ../../../node_modules/@smithy/querystring-parser/dist-cjs/index.js -var require_dist_cjs23 = __commonJS({ - "../../../node_modules/@smithy/querystring-parser/dist-cjs/index.js"(exports2, module2) { - var __defProp2 = Object.defineProperty; - var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; - var __getOwnPropNames2 = Object.getOwnPropertyNames; - var __hasOwnProp2 = Object.prototype.hasOwnProperty; - var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); - var __export2 = (target, all) => { - for (var name in all) - __defProp2(target, name, { get: all[name], enumerable: true }); - }; - var __copyProps2 = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames2(from)) - if (!__hasOwnProp2.call(to, key) && key !== except) - __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); +// ../../../node_modules/uuid/dist/esm-node/v35.js +function stringToBytes(str) { + str = unescape(encodeURIComponent(str)); + const bytes = []; + for (let i = 0; i < str.length; ++i) { + bytes.push(str.charCodeAt(i)); + } + return bytes; +} +function v35(name, version2, hashfunc) { + function generateUUID(value, namespace, buf, offset) { + var _namespace; + if (typeof value === "string") { + value = stringToBytes(value); + } + if (typeof namespace === "string") { + namespace = parse_default(namespace); + } + if (((_namespace = namespace) === null || _namespace === void 0 ? void 0 : _namespace.length) !== 16) { + throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)"); + } + let bytes = new Uint8Array(16 + value.length); + bytes.set(namespace); + bytes.set(value, namespace.length); + bytes = hashfunc(bytes); + bytes[6] = bytes[6] & 15 | version2; + bytes[8] = bytes[8] & 63 | 128; + if (buf) { + offset = offset || 0; + for (let i = 0; i < 16; ++i) { + buf[offset + i] = bytes[i]; } - return to; + return buf; + } + return unsafeStringify(bytes); + } + try { + generateUUID.name = name; + } catch (err) { + } + generateUUID.DNS = DNS; + generateUUID.URL = URL2; + return generateUUID; +} +var DNS, URL2; +var init_v35 = __esm({ + "../../../node_modules/uuid/dist/esm-node/v35.js"() { + init_stringify(); + init_parse(); + DNS = "6ba7b810-9dad-11d1-80b4-00c04fd430c8"; + URL2 = "6ba7b811-9dad-11d1-80b4-00c04fd430c8"; + } +}); + +// ../../../node_modules/uuid/dist/esm-node/md5.js +function md5(bytes) { + if (Array.isArray(bytes)) { + bytes = Buffer.from(bytes); + } else if (typeof bytes === "string") { + bytes = Buffer.from(bytes, "utf8"); + } + return import_crypto2.default.createHash("md5").update(bytes).digest(); +} +var import_crypto2, md5_default; +var init_md5 = __esm({ + "../../../node_modules/uuid/dist/esm-node/md5.js"() { + import_crypto2 = __toESM(require("crypto")); + md5_default = md5; + } +}); + +// ../../../node_modules/uuid/dist/esm-node/v3.js +var v3, v3_default; +var init_v3 = __esm({ + "../../../node_modules/uuid/dist/esm-node/v3.js"() { + init_v35(); + init_md5(); + v3 = v35("v3", 48, md5_default); + v3_default = v3; + } +}); + +// ../../../node_modules/uuid/dist/esm-node/native.js +var import_crypto3, native_default; +var init_native = __esm({ + "../../../node_modules/uuid/dist/esm-node/native.js"() { + import_crypto3 = __toESM(require("crypto")); + native_default = { + randomUUID: import_crypto3.default.randomUUID }; - var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); - var src_exports = {}; - __export2(src_exports, { - parseQueryString: () => parseQueryString - }); - module2.exports = __toCommonJS2(src_exports); - function parseQueryString(querystring) { - const query = {}; - querystring = querystring.replace(/^\?/, ""); - if (querystring) { - for (const pair of querystring.split("&")) { - let [key, value = null] = pair.split("="); - key = decodeURIComponent(key); - if (value) { - value = decodeURIComponent(value); - } - if (!(key in query)) { - query[key] = value; - } else if (Array.isArray(query[key])) { - query[key].push(value); - } else { - query[key] = [query[key], value]; - } - } - } - return query; + } +}); + +// ../../../node_modules/uuid/dist/esm-node/v4.js +function v4(options, buf, offset) { + if (native_default.randomUUID && !buf && !options) { + return native_default.randomUUID(); + } + options = options || {}; + const rnds = options.random || (options.rng || rng)(); + rnds[6] = rnds[6] & 15 | 64; + rnds[8] = rnds[8] & 63 | 128; + if (buf) { + offset = offset || 0; + for (let i = 0; i < 16; ++i) { + buf[offset + i] = rnds[i]; } - __name(parseQueryString, "parseQueryString"); + return buf; + } + return unsafeStringify(rnds); +} +var v4_default; +var init_v4 = __esm({ + "../../../node_modules/uuid/dist/esm-node/v4.js"() { + init_native(); + init_rng(); + init_stringify(); + v4_default = v4; } }); -// ../../../node_modules/@smithy/url-parser/dist-cjs/index.js -var require_dist_cjs24 = __commonJS({ - "../../../node_modules/@smithy/url-parser/dist-cjs/index.js"(exports2, module2) { +// ../../../node_modules/uuid/dist/esm-node/sha1.js +function sha1(bytes) { + if (Array.isArray(bytes)) { + bytes = Buffer.from(bytes); + } else if (typeof bytes === "string") { + bytes = Buffer.from(bytes, "utf8"); + } + return import_crypto4.default.createHash("sha1").update(bytes).digest(); +} +var import_crypto4, sha1_default; +var init_sha1 = __esm({ + "../../../node_modules/uuid/dist/esm-node/sha1.js"() { + import_crypto4 = __toESM(require("crypto")); + sha1_default = sha1; + } +}); + +// ../../../node_modules/uuid/dist/esm-node/v5.js +var v5, v5_default; +var init_v5 = __esm({ + "../../../node_modules/uuid/dist/esm-node/v5.js"() { + init_v35(); + init_sha1(); + v5 = v35("v5", 80, sha1_default); + v5_default = v5; + } +}); + +// ../../../node_modules/uuid/dist/esm-node/nil.js +var nil_default; +var init_nil = __esm({ + "../../../node_modules/uuid/dist/esm-node/nil.js"() { + nil_default = "00000000-0000-0000-0000-000000000000"; + } +}); + +// ../../../node_modules/uuid/dist/esm-node/version.js +function version(uuid) { + if (!validate_default(uuid)) { + throw TypeError("Invalid UUID"); + } + return parseInt(uuid.slice(14, 15), 16); +} +var version_default; +var init_version = __esm({ + "../../../node_modules/uuid/dist/esm-node/version.js"() { + init_validate(); + version_default = version; + } +}); + +// ../../../node_modules/uuid/dist/esm-node/index.js +var esm_node_exports = {}; +__export(esm_node_exports, { + NIL: () => nil_default, + parse: () => parse_default, + stringify: () => stringify_default, + v1: () => v1_default, + v3: () => v3_default, + v4: () => v4_default, + v5: () => v5_default, + validate: () => validate_default, + version: () => version_default +}); +var init_esm_node = __esm({ + "../../../node_modules/uuid/dist/esm-node/index.js"() { + init_v1(); + init_v3(); + init_v4(); + init_v5(); + init_nil(); + init_version(); + init_validate(); + init_stringify(); + init_parse(); + } +}); + +// ../../../node_modules/@smithy/service-error-classification/dist-cjs/index.js +var require_dist_cjs22 = __commonJS({ + "../../../node_modules/@smithy/service-error-classification/dist-cjs/index.js"(exports2, module2) { var __defProp2 = Object.defineProperty; var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; var __getOwnPropNames2 = Object.getOwnPropertyNames; @@ -5348,123 +4612,73 @@ var require_dist_cjs24 = __commonJS({ var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); var src_exports = {}; __export2(src_exports, { - parseUrl: () => parseUrl + isClockSkewCorrectedError: () => isClockSkewCorrectedError, + isClockSkewError: () => isClockSkewError, + isRetryableByTrait: () => isRetryableByTrait, + isServerError: () => isServerError, + isThrottlingError: () => isThrottlingError, + isTransientError: () => isTransientError }); module2.exports = __toCommonJS2(src_exports); - var import_querystring_parser = require_dist_cjs23(); - var parseUrl = /* @__PURE__ */ __name((url2) => { - if (typeof url2 === "string") { - return parseUrl(new URL(url2)); - } - const { hostname, pathname, port, protocol, search } = url2; - let query; - if (search) { - query = (0, import_querystring_parser.parseQueryString)(search); - } - return { - hostname, - port: port ? parseInt(port) : void 0, - protocol, - path: pathname, - query - }; - }, "parseUrl"); - } -}); - -// ../../../node_modules/@smithy/middleware-serde/dist-cjs/index.js -var require_dist_cjs25 = __commonJS({ - "../../../node_modules/@smithy/middleware-serde/dist-cjs/index.js"(exports2, module2) { - var __defProp2 = Object.defineProperty; - var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; - var __getOwnPropNames2 = Object.getOwnPropertyNames; - var __hasOwnProp2 = Object.prototype.hasOwnProperty; - var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); - var __export2 = (target, all) => { - for (var name in all) - __defProp2(target, name, { get: all[name], enumerable: true }); - }; - var __copyProps2 = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames2(from)) - if (!__hasOwnProp2.call(to, key) && key !== except) - __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); - } - return to; - }; - var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); - var src_exports = {}; - __export2(src_exports, { - deserializerMiddleware: () => deserializerMiddleware, - deserializerMiddlewareOption: () => deserializerMiddlewareOption, - getSerdePlugin: () => getSerdePlugin, - serializerMiddleware: () => serializerMiddleware, - serializerMiddlewareOption: () => serializerMiddlewareOption - }); - module2.exports = __toCommonJS2(src_exports); - var deserializerMiddleware = /* @__PURE__ */ __name((options, deserializer) => (next, context) => async (args) => { - const { response } = await next(args); - try { - const parsed = await deserializer(response, options); - return { - response, - output: parsed - }; - } catch (error) { - Object.defineProperty(error, "$response", { - value: response - }); - if (!("$metadata" in error)) { - const hint = `Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.`; - error.message += "\n " + hint; - if (typeof error.$responseBodyText !== "undefined") { - if (error.$response) { - error.$response.body = error.$responseBodyText; - } - } - } - throw error; - } - }, "deserializerMiddleware"); - var serializerMiddleware = /* @__PURE__ */ __name((options, serializer) => (next, context) => async (args) => { + var CLOCK_SKEW_ERROR_CODES = [ + "AuthFailure", + "InvalidSignatureException", + "RequestExpired", + "RequestInTheFuture", + "RequestTimeTooSkewed", + "SignatureDoesNotMatch" + ]; + var THROTTLING_ERROR_CODES = [ + "BandwidthLimitExceeded", + "EC2ThrottledException", + "LimitExceededException", + "PriorRequestNotComplete", + "ProvisionedThroughputExceededException", + "RequestLimitExceeded", + "RequestThrottled", + "RequestThrottledException", + "SlowDown", + "ThrottledException", + "Throttling", + "ThrottlingException", + "TooManyRequestsException", + "TransactionInProgressException" + // DynamoDB + ]; + var TRANSIENT_ERROR_CODES = ["TimeoutError", "RequestTimeout", "RequestTimeoutException"]; + var TRANSIENT_ERROR_STATUS_CODES = [500, 502, 503, 504]; + var NODEJS_TIMEOUT_ERROR_CODES = ["ECONNRESET", "ECONNREFUSED", "EPIPE", "ETIMEDOUT"]; + var isRetryableByTrait = /* @__PURE__ */ __name((error) => error.$retryable !== void 0, "isRetryableByTrait"); + var isClockSkewError = /* @__PURE__ */ __name((error) => CLOCK_SKEW_ERROR_CODES.includes(error.name), "isClockSkewError"); + var isClockSkewCorrectedError = /* @__PURE__ */ __name((error) => { var _a; - const endpoint = ((_a = context.endpointV2) == null ? void 0 : _a.url) && options.urlParser ? async () => options.urlParser(context.endpointV2.url) : options.endpoint; - if (!endpoint) { - throw new Error("No valid endpoint provider available."); - } - const request2 = await serializer(args.input, { ...options, endpoint }); - return next({ - ...args, - request: request2 - }); - }, "serializerMiddleware"); - var deserializerMiddlewareOption = { - name: "deserializerMiddleware", - step: "deserialize", - tags: ["DESERIALIZER"], - override: true - }; - var serializerMiddlewareOption = { - name: "serializerMiddleware", - step: "serialize", - tags: ["SERIALIZER"], - override: true - }; - function getSerdePlugin(config, serializer, deserializer) { - return { - applyToStack: (commandStack) => { - commandStack.add(deserializerMiddleware(config, deserializer), deserializerMiddlewareOption); - commandStack.add(serializerMiddleware(config, serializer), serializerMiddlewareOption); + return (_a = error.$metadata) == null ? void 0 : _a.clockSkewCorrected; + }, "isClockSkewCorrectedError"); + var isThrottlingError = /* @__PURE__ */ __name((error) => { + var _a, _b; + return ((_a = error.$metadata) == null ? void 0 : _a.httpStatusCode) === 429 || THROTTLING_ERROR_CODES.includes(error.name) || ((_b = error.$retryable) == null ? void 0 : _b.throttling) == true; + }, "isThrottlingError"); + var isTransientError = /* @__PURE__ */ __name((error) => { + var _a; + return isClockSkewCorrectedError(error) || TRANSIENT_ERROR_CODES.includes(error.name) || NODEJS_TIMEOUT_ERROR_CODES.includes((error == null ? void 0 : error.code) || "") || TRANSIENT_ERROR_STATUS_CODES.includes(((_a = error.$metadata) == null ? void 0 : _a.httpStatusCode) || 0); + }, "isTransientError"); + var isServerError = /* @__PURE__ */ __name((error) => { + var _a; + if (((_a = error.$metadata) == null ? void 0 : _a.httpStatusCode) !== void 0) { + const statusCode = error.$metadata.httpStatusCode; + if (500 <= statusCode && statusCode <= 599 && !isTransientError(error)) { + return true; } - }; - } - __name(getSerdePlugin, "getSerdePlugin"); + return false; + } + return false; + }, "isServerError"); } }); -// ../../../node_modules/@smithy/middleware-endpoint/dist-cjs/index.js -var require_dist_cjs26 = __commonJS({ - "../../../node_modules/@smithy/middleware-endpoint/dist-cjs/index.js"(exports2, module2) { +// ../../../node_modules/@smithy/middleware-retry/node_modules/@smithy/util-retry/dist-cjs/index.js +var require_dist_cjs23 = __commonJS({ + "../../../node_modules/@smithy/middleware-retry/node_modules/@smithy/util-retry/dist-cjs/index.js"(exports2, module2) { var __defProp2 = Object.defineProperty; var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; var __getOwnPropNames2 = Object.getOwnPropertyNames; @@ -5485,567 +4699,338 @@ var require_dist_cjs26 = __commonJS({ var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); var src_exports = {}; __export2(src_exports, { - endpointMiddleware: () => endpointMiddleware, - endpointMiddlewareOptions: () => endpointMiddlewareOptions, - getEndpointFromInstructions: () => getEndpointFromInstructions, - getEndpointPlugin: () => getEndpointPlugin, - resolveEndpointConfig: () => resolveEndpointConfig, - resolveParams: () => resolveParams, - toEndpointV1: () => toEndpointV1 + AdaptiveRetryStrategy: () => AdaptiveRetryStrategy, + ConfiguredRetryStrategy: () => ConfiguredRetryStrategy, + DEFAULT_MAX_ATTEMPTS: () => DEFAULT_MAX_ATTEMPTS, + DEFAULT_RETRY_DELAY_BASE: () => DEFAULT_RETRY_DELAY_BASE, + DEFAULT_RETRY_MODE: () => DEFAULT_RETRY_MODE, + DefaultRateLimiter: () => DefaultRateLimiter, + INITIAL_RETRY_TOKENS: () => INITIAL_RETRY_TOKENS, + INVOCATION_ID_HEADER: () => INVOCATION_ID_HEADER, + MAXIMUM_RETRY_DELAY: () => MAXIMUM_RETRY_DELAY, + NO_RETRY_INCREMENT: () => NO_RETRY_INCREMENT, + REQUEST_HEADER: () => REQUEST_HEADER, + RETRY_COST: () => RETRY_COST, + RETRY_MODES: () => RETRY_MODES, + StandardRetryStrategy: () => StandardRetryStrategy, + THROTTLING_RETRY_DELAY_BASE: () => THROTTLING_RETRY_DELAY_BASE, + TIMEOUT_RETRY_COST: () => TIMEOUT_RETRY_COST }); module2.exports = __toCommonJS2(src_exports); - var resolveParamsForS3 = /* @__PURE__ */ __name(async (endpointParams) => { - const bucket = (endpointParams == null ? void 0 : endpointParams.Bucket) || ""; - if (typeof endpointParams.Bucket === "string") { - endpointParams.Bucket = bucket.replace(/#/g, encodeURIComponent("#")).replace(/\?/g, encodeURIComponent("?")); - } - if (isArnBucketName(bucket)) { - if (endpointParams.ForcePathStyle === true) { - throw new Error("Path-style addressing cannot be used with ARN buckets"); - } - } else if (!isDnsCompatibleBucketName(bucket) || bucket.indexOf(".") !== -1 && !String(endpointParams.Endpoint).startsWith("http:") || bucket.toLowerCase() !== bucket || bucket.length < 3) { - endpointParams.ForcePathStyle = true; + var RETRY_MODES = /* @__PURE__ */ ((RETRY_MODES2) => { + RETRY_MODES2["STANDARD"] = "standard"; + RETRY_MODES2["ADAPTIVE"] = "adaptive"; + return RETRY_MODES2; + })(RETRY_MODES || {}); + var DEFAULT_MAX_ATTEMPTS = 3; + var DEFAULT_RETRY_MODE = "standard"; + var import_service_error_classification = require_dist_cjs22(); + var _DefaultRateLimiter = class _DefaultRateLimiter { + constructor(options) { + this.currentCapacity = 0; + this.enabled = false; + this.lastMaxRate = 0; + this.measuredTxRate = 0; + this.requestCount = 0; + this.lastTimestamp = 0; + this.timeWindow = 0; + this.beta = (options == null ? void 0 : options.beta) ?? 0.7; + this.minCapacity = (options == null ? void 0 : options.minCapacity) ?? 1; + this.minFillRate = (options == null ? void 0 : options.minFillRate) ?? 0.5; + this.scaleConstant = (options == null ? void 0 : options.scaleConstant) ?? 0.4; + this.smooth = (options == null ? void 0 : options.smooth) ?? 0.8; + const currentTimeInSeconds = this.getCurrentTimeInSeconds(); + this.lastThrottleTime = currentTimeInSeconds; + this.lastTxRateBucket = Math.floor(this.getCurrentTimeInSeconds()); + this.fillRate = this.minFillRate; + this.maxCapacity = this.minCapacity; } - if (endpointParams.DisableMultiRegionAccessPoints) { - endpointParams.disableMultiRegionAccessPoints = true; - endpointParams.DisableMRAP = true; + getCurrentTimeInSeconds() { + return Date.now() / 1e3; } - return endpointParams; - }, "resolveParamsForS3"); - var DOMAIN_PATTERN = /^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/; - var IP_ADDRESS_PATTERN = /(\d+\.){3}\d+/; - var DOTS_PATTERN = /\.\./; - var isDnsCompatibleBucketName = /* @__PURE__ */ __name((bucketName) => DOMAIN_PATTERN.test(bucketName) && !IP_ADDRESS_PATTERN.test(bucketName) && !DOTS_PATTERN.test(bucketName), "isDnsCompatibleBucketName"); - var isArnBucketName = /* @__PURE__ */ __name((bucketName) => { - const [arn, partition, service, , , bucket] = bucketName.split(":"); - const isArn = arn === "arn" && bucketName.split(":").length >= 6; - const isValidArn = Boolean(isArn && partition && service && bucket); - if (isArn && !isValidArn) { - throw new Error(`Invalid ARN: ${bucketName} was an invalid ARN.`); + async getSendToken() { + return this.acquireTokenBucket(1); } - return isValidArn; - }, "isArnBucketName"); - var createConfigValueProvider = /* @__PURE__ */ __name((configKey, canonicalEndpointParamKey, config) => { - const configProvider = /* @__PURE__ */ __name(async () => { - const configValue = config[configKey] ?? config[canonicalEndpointParamKey]; - if (typeof configValue === "function") { - return configValue(); + async acquireTokenBucket(amount) { + if (!this.enabled) { + return; } - return configValue; - }, "configProvider"); - if (configKey === "credentialScope" || canonicalEndpointParamKey === "CredentialScope") { - return async () => { - const credentials = typeof config.credentials === "function" ? await config.credentials() : config.credentials; - const configValue = (credentials == null ? void 0 : credentials.credentialScope) ?? (credentials == null ? void 0 : credentials.CredentialScope); - return configValue; - }; - } - if (configKey === "endpoint" || canonicalEndpointParamKey === "endpoint") { - return async () => { - const endpoint = await configProvider(); - if (endpoint && typeof endpoint === "object") { - if ("url" in endpoint) { - return endpoint.url.href; - } - if ("hostname" in endpoint) { - const { protocol, hostname, port, path } = endpoint; - return `${protocol}//${hostname}${port ? ":" + port : ""}${path}`; - } - } - return endpoint; - }; - } - return configProvider; - }, "createConfigValueProvider"); - var import_getEndpointFromConfig = require_getEndpointFromConfig(); - var import_url_parser = require_dist_cjs24(); - var toEndpointV1 = /* @__PURE__ */ __name((endpoint) => { - if (typeof endpoint === "object") { - if ("url" in endpoint) { - return (0, import_url_parser.parseUrl)(endpoint.url); + this.refillTokenBucket(); + if (amount > this.currentCapacity) { + const delay = (amount - this.currentCapacity) / this.fillRate * 1e3; + await new Promise((resolve) => setTimeout(resolve, delay)); } - return endpoint; + this.currentCapacity = this.currentCapacity - amount; } - return (0, import_url_parser.parseUrl)(endpoint); - }, "toEndpointV1"); - var getEndpointFromInstructions = /* @__PURE__ */ __name(async (commandInput, instructionsSupplier, clientConfig, context) => { - if (!clientConfig.endpoint) { - const endpointFromConfig = await (0, import_getEndpointFromConfig.getEndpointFromConfig)(clientConfig.serviceId || ""); - if (endpointFromConfig) { - clientConfig.endpoint = () => Promise.resolve(toEndpointV1(endpointFromConfig)); + refillTokenBucket() { + const timestamp = this.getCurrentTimeInSeconds(); + if (!this.lastTimestamp) { + this.lastTimestamp = timestamp; + return; } + const fillAmount = (timestamp - this.lastTimestamp) * this.fillRate; + this.currentCapacity = Math.min(this.maxCapacity, this.currentCapacity + fillAmount); + this.lastTimestamp = timestamp; } - const endpointParams = await resolveParams(commandInput, instructionsSupplier, clientConfig); - if (typeof clientConfig.endpointProvider !== "function") { - throw new Error("config.endpointProvider is not set."); - } - const endpoint = clientConfig.endpointProvider(endpointParams, context); - return endpoint; - }, "getEndpointFromInstructions"); - var resolveParams = /* @__PURE__ */ __name(async (commandInput, instructionsSupplier, clientConfig) => { - var _a; - const endpointParams = {}; - const instructions = ((_a = instructionsSupplier == null ? void 0 : instructionsSupplier.getEndpointParameterInstructions) == null ? void 0 : _a.call(instructionsSupplier)) || {}; - for (const [name, instruction] of Object.entries(instructions)) { - switch (instruction.type) { - case "staticContextParams": - endpointParams[name] = instruction.value; - break; - case "contextParams": - endpointParams[name] = commandInput[instruction.name]; - break; - case "clientContextParams": - case "builtInParams": - endpointParams[name] = await createConfigValueProvider(instruction.name, name, clientConfig)(); - break; - default: - throw new Error("Unrecognized endpoint parameter instruction: " + JSON.stringify(instruction)); + updateClientSendingRate(response) { + let calculatedRate; + this.updateMeasuredRate(); + if ((0, import_service_error_classification.isThrottlingError)(response)) { + const rateToUse = !this.enabled ? this.measuredTxRate : Math.min(this.measuredTxRate, this.fillRate); + this.lastMaxRate = rateToUse; + this.calculateTimeWindow(); + this.lastThrottleTime = this.getCurrentTimeInSeconds(); + calculatedRate = this.cubicThrottle(rateToUse); + this.enableTokenBucket(); + } else { + this.calculateTimeWindow(); + calculatedRate = this.cubicSuccess(this.getCurrentTimeInSeconds()); } + const newRate = Math.min(calculatedRate, 2 * this.measuredTxRate); + this.updateTokenBucketRate(newRate); } - if (Object.keys(instructions).length === 0) { - Object.assign(endpointParams, clientConfig); + calculateTimeWindow() { + this.timeWindow = this.getPrecise(Math.pow(this.lastMaxRate * (1 - this.beta) / this.scaleConstant, 1 / 3)); } - if (String(clientConfig.serviceId).toLowerCase() === "s3") { - await resolveParamsForS3(endpointParams); + cubicThrottle(rateToUse) { + return this.getPrecise(rateToUse * this.beta); } - return endpointParams; - }, "resolveParams"); - var import_util_middleware = require_dist_cjs7(); - var endpointMiddleware = /* @__PURE__ */ __name(({ - config, - instructions - }) => { - return (next, context) => async (args) => { - var _a, _b, _c; - const endpoint = await getEndpointFromInstructions( - args.input, - { - getEndpointParameterInstructions() { - return instructions; - } - }, - { ...config }, - context + cubicSuccess(timestamp) { + return this.getPrecise( + this.scaleConstant * Math.pow(timestamp - this.lastThrottleTime - this.timeWindow, 3) + this.lastMaxRate ); - context.endpointV2 = endpoint; - context.authSchemes = (_a = endpoint.properties) == null ? void 0 : _a.authSchemes; - const authScheme = (_b = context.authSchemes) == null ? void 0 : _b[0]; - if (authScheme) { - context["signing_region"] = authScheme.signingRegion; - context["signing_service"] = authScheme.signingName; - const smithyContext = (0, import_util_middleware.getSmithyContext)(context); - const httpAuthOption = (_c = smithyContext == null ? void 0 : smithyContext.selectedHttpAuthScheme) == null ? void 0 : _c.httpAuthOption; - if (httpAuthOption) { - httpAuthOption.signingProperties = Object.assign( - httpAuthOption.signingProperties || {}, - { - signing_region: authScheme.signingRegion, - signingRegion: authScheme.signingRegion, - signing_service: authScheme.signingName, - signingName: authScheme.signingName, - signingRegionSet: authScheme.signingRegionSet - }, - authScheme.properties - ); - } + } + enableTokenBucket() { + this.enabled = true; + } + updateTokenBucketRate(newRate) { + this.refillTokenBucket(); + this.fillRate = Math.max(newRate, this.minFillRate); + this.maxCapacity = Math.max(newRate, this.minCapacity); + this.currentCapacity = Math.min(this.currentCapacity, this.maxCapacity); + } + updateMeasuredRate() { + const t = this.getCurrentTimeInSeconds(); + const timeBucket = Math.floor(t * 2) / 2; + this.requestCount++; + if (timeBucket > this.lastTxRateBucket) { + const currentRate = this.requestCount / (timeBucket - this.lastTxRateBucket); + this.measuredTxRate = this.getPrecise(currentRate * this.smooth + this.measuredTxRate * (1 - this.smooth)); + this.requestCount = 0; + this.lastTxRateBucket = timeBucket; } - return next({ - ...args - }); - }; - }, "endpointMiddleware"); - var import_middleware_serde = require_dist_cjs25(); - var endpointMiddlewareOptions = { - step: "serialize", - tags: ["ENDPOINT_PARAMETERS", "ENDPOINT_V2", "ENDPOINT"], - name: "endpointV2Middleware", - override: true, - relation: "before", - toMiddleware: import_middleware_serde.serializerMiddlewareOption.name - }; - var getEndpointPlugin = /* @__PURE__ */ __name((config, instructions) => ({ - applyToStack: (clientStack) => { - clientStack.addRelativeTo( - endpointMiddleware({ - config, - instructions - }), - endpointMiddlewareOptions - ); } - }), "getEndpointPlugin"); - var resolveEndpointConfig = /* @__PURE__ */ __name((input) => { - const tls = input.tls ?? true; - const { endpoint } = input; - const customEndpointProvider = endpoint != null ? async () => toEndpointV1(await (0, import_util_middleware.normalizeProvider)(endpoint)()) : void 0; - const isCustomEndpoint = !!endpoint; + getPrecise(num) { + return parseFloat(num.toFixed(8)); + } + }; + __name(_DefaultRateLimiter, "DefaultRateLimiter"); + var DefaultRateLimiter = _DefaultRateLimiter; + var DEFAULT_RETRY_DELAY_BASE = 100; + var MAXIMUM_RETRY_DELAY = 20 * 1e3; + var THROTTLING_RETRY_DELAY_BASE = 500; + var INITIAL_RETRY_TOKENS = 500; + var RETRY_COST = 5; + var TIMEOUT_RETRY_COST = 10; + var NO_RETRY_INCREMENT = 1; + var INVOCATION_ID_HEADER = "amz-sdk-invocation-id"; + var REQUEST_HEADER = "amz-sdk-request"; + var getDefaultRetryBackoffStrategy = /* @__PURE__ */ __name(() => { + let delayBase = DEFAULT_RETRY_DELAY_BASE; + const computeNextBackoffDelay = /* @__PURE__ */ __name((attempts) => { + return Math.floor(Math.min(MAXIMUM_RETRY_DELAY, Math.random() * 2 ** attempts * delayBase)); + }, "computeNextBackoffDelay"); + const setDelayBase = /* @__PURE__ */ __name((delay) => { + delayBase = delay; + }, "setDelayBase"); return { - ...input, - endpoint: customEndpointProvider, - tls, - isCustomEndpoint, - useDualstackEndpoint: (0, import_util_middleware.normalizeProvider)(input.useDualstackEndpoint ?? false), - useFipsEndpoint: (0, import_util_middleware.normalizeProvider)(input.useFipsEndpoint ?? false) + computeNextBackoffDelay, + setDelayBase }; - }, "resolveEndpointConfig"); - } -}); - -// ../../../node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/rng.js -function rng() { - if (poolPtr > rnds8Pool.length - 16) { - import_crypto.default.randomFillSync(rnds8Pool); - poolPtr = 0; - } - return rnds8Pool.slice(poolPtr, poolPtr += 16); -} -var import_crypto, rnds8Pool, poolPtr; -var init_rng = __esm({ - "../../../node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/rng.js"() { - import_crypto = __toESM(require("crypto")); - rnds8Pool = new Uint8Array(256); - poolPtr = rnds8Pool.length; - } -}); - -// ../../../node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/regex.js -var regex_default; -var init_regex = __esm({ - "../../../node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/regex.js"() { - regex_default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i; - } -}); - -// ../../../node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/validate.js -function validate(uuid) { - return typeof uuid === "string" && regex_default.test(uuid); -} -var validate_default; -var init_validate = __esm({ - "../../../node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/validate.js"() { - init_regex(); - validate_default = validate; - } -}); - -// ../../../node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/stringify.js -function unsafeStringify(arr, offset = 0) { - return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + "-" + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + "-" + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + "-" + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + "-" + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]; -} -function stringify(arr, offset = 0) { - const uuid = unsafeStringify(arr, offset); - if (!validate_default(uuid)) { - throw TypeError("Stringified UUID is invalid"); - } - return uuid; -} -var byteToHex, stringify_default; -var init_stringify = __esm({ - "../../../node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/stringify.js"() { - init_validate(); - byteToHex = []; - for (let i = 0; i < 256; ++i) { - byteToHex.push((i + 256).toString(16).slice(1)); - } - stringify_default = stringify; - } -}); - -// ../../../node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/v1.js -function v1(options, buf, offset) { - let i = buf && offset || 0; - const b = buf || new Array(16); - options = options || {}; - let node = options.node || _nodeId; - let clockseq = options.clockseq !== void 0 ? options.clockseq : _clockseq; - if (node == null || clockseq == null) { - const seedBytes = options.random || (options.rng || rng)(); - if (node == null) { - node = _nodeId = [seedBytes[0] | 1, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]]; - } - if (clockseq == null) { - clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 16383; - } - } - let msecs = options.msecs !== void 0 ? options.msecs : Date.now(); - let nsecs = options.nsecs !== void 0 ? options.nsecs : _lastNSecs + 1; - const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 1e4; - if (dt < 0 && options.clockseq === void 0) { - clockseq = clockseq + 1 & 16383; - } - if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === void 0) { - nsecs = 0; - } - if (nsecs >= 1e4) { - throw new Error("uuid.v1(): Can't create more than 10M uuids/sec"); - } - _lastMSecs = msecs; - _lastNSecs = nsecs; - _clockseq = clockseq; - msecs += 122192928e5; - const tl = ((msecs & 268435455) * 1e4 + nsecs) % 4294967296; - b[i++] = tl >>> 24 & 255; - b[i++] = tl >>> 16 & 255; - b[i++] = tl >>> 8 & 255; - b[i++] = tl & 255; - const tmh = msecs / 4294967296 * 1e4 & 268435455; - b[i++] = tmh >>> 8 & 255; - b[i++] = tmh & 255; - b[i++] = tmh >>> 24 & 15 | 16; - b[i++] = tmh >>> 16 & 255; - b[i++] = clockseq >>> 8 | 128; - b[i++] = clockseq & 255; - for (let n = 0; n < 6; ++n) { - b[i + n] = node[n]; - } - return buf || unsafeStringify(b); -} -var _nodeId, _clockseq, _lastMSecs, _lastNSecs, v1_default; -var init_v1 = __esm({ - "../../../node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/v1.js"() { - init_rng(); - init_stringify(); - _lastMSecs = 0; - _lastNSecs = 0; - v1_default = v1; + }, "getDefaultRetryBackoffStrategy"); + var createDefaultRetryToken = /* @__PURE__ */ __name(({ + retryDelay, + retryCount, + retryCost + }) => { + const getRetryCount = /* @__PURE__ */ __name(() => retryCount, "getRetryCount"); + const getRetryDelay = /* @__PURE__ */ __name(() => Math.min(MAXIMUM_RETRY_DELAY, retryDelay), "getRetryDelay"); + const getRetryCost = /* @__PURE__ */ __name(() => retryCost, "getRetryCost"); + return { + getRetryCount, + getRetryDelay, + getRetryCost + }; + }, "createDefaultRetryToken"); + var _StandardRetryStrategy = class _StandardRetryStrategy { + constructor(maxAttempts) { + this.maxAttempts = maxAttempts; + this.mode = "standard"; + this.capacity = INITIAL_RETRY_TOKENS; + this.retryBackoffStrategy = getDefaultRetryBackoffStrategy(); + this.maxAttemptsProvider = typeof maxAttempts === "function" ? maxAttempts : async () => maxAttempts; + } + // eslint-disable-next-line @typescript-eslint/no-unused-vars + async acquireInitialRetryToken(retryTokenScope) { + return createDefaultRetryToken({ + retryDelay: DEFAULT_RETRY_DELAY_BASE, + retryCount: 0 + }); + } + async refreshRetryTokenForRetry(token, errorInfo) { + const maxAttempts = await this.getMaxAttempts(); + if (this.shouldRetry(token, errorInfo, maxAttempts)) { + const errorType = errorInfo.errorType; + this.retryBackoffStrategy.setDelayBase( + errorType === "THROTTLING" ? THROTTLING_RETRY_DELAY_BASE : DEFAULT_RETRY_DELAY_BASE + ); + const delayFromErrorType = this.retryBackoffStrategy.computeNextBackoffDelay(token.getRetryCount()); + const retryDelay = errorInfo.retryAfterHint ? Math.max(errorInfo.retryAfterHint.getTime() - Date.now() || 0, delayFromErrorType) : delayFromErrorType; + const capacityCost = this.getCapacityCost(errorType); + this.capacity -= capacityCost; + return createDefaultRetryToken({ + retryDelay, + retryCount: token.getRetryCount() + 1, + retryCost: capacityCost + }); + } + throw new Error("No retry token available"); + } + recordSuccess(token) { + this.capacity = Math.max(INITIAL_RETRY_TOKENS, this.capacity + (token.getRetryCost() ?? NO_RETRY_INCREMENT)); + } + /** + * @returns the current available retry capacity. + * + * This number decreases when retries are executed and refills when requests or retries succeed. + */ + getCapacity() { + return this.capacity; + } + async getMaxAttempts() { + try { + return await this.maxAttemptsProvider(); + } catch (error) { + console.warn(`Max attempts provider could not resolve. Using default of ${DEFAULT_MAX_ATTEMPTS}`); + return DEFAULT_MAX_ATTEMPTS; + } + } + shouldRetry(tokenToRenew, errorInfo, maxAttempts) { + const attempts = tokenToRenew.getRetryCount() + 1; + return attempts < maxAttempts && this.capacity >= this.getCapacityCost(errorInfo.errorType) && this.isRetryableError(errorInfo.errorType); + } + getCapacityCost(errorType) { + return errorType === "TRANSIENT" ? TIMEOUT_RETRY_COST : RETRY_COST; + } + isRetryableError(errorType) { + return errorType === "THROTTLING" || errorType === "TRANSIENT"; + } + }; + __name(_StandardRetryStrategy, "StandardRetryStrategy"); + var StandardRetryStrategy = _StandardRetryStrategy; + var _AdaptiveRetryStrategy = class _AdaptiveRetryStrategy { + constructor(maxAttemptsProvider, options) { + this.maxAttemptsProvider = maxAttemptsProvider; + this.mode = "adaptive"; + const { rateLimiter } = options ?? {}; + this.rateLimiter = rateLimiter ?? new DefaultRateLimiter(); + this.standardRetryStrategy = new StandardRetryStrategy(maxAttemptsProvider); + } + async acquireInitialRetryToken(retryTokenScope) { + await this.rateLimiter.getSendToken(); + return this.standardRetryStrategy.acquireInitialRetryToken(retryTokenScope); + } + async refreshRetryTokenForRetry(tokenToRenew, errorInfo) { + this.rateLimiter.updateClientSendingRate(errorInfo); + return this.standardRetryStrategy.refreshRetryTokenForRetry(tokenToRenew, errorInfo); + } + recordSuccess(token) { + this.rateLimiter.updateClientSendingRate({}); + this.standardRetryStrategy.recordSuccess(token); + } + }; + __name(_AdaptiveRetryStrategy, "AdaptiveRetryStrategy"); + var AdaptiveRetryStrategy = _AdaptiveRetryStrategy; + var _ConfiguredRetryStrategy = class _ConfiguredRetryStrategy extends StandardRetryStrategy { + /** + * @param maxAttempts - the maximum number of retry attempts allowed. + * e.g., if set to 3, then 4 total requests are possible. + * @param computeNextBackoffDelay - a millisecond delay for each retry or a function that takes the retry attempt + * and returns the delay. + * + * @example exponential backoff. + * ```js + * new Client({ + * retryStrategy: new ConfiguredRetryStrategy(3, (attempt) => attempt ** 2) + * }); + * ``` + * @example constant delay. + * ```js + * new Client({ + * retryStrategy: new ConfiguredRetryStrategy(3, 2000) + * }); + * ``` + */ + constructor(maxAttempts, computeNextBackoffDelay = DEFAULT_RETRY_DELAY_BASE) { + super(typeof maxAttempts === "function" ? maxAttempts : async () => maxAttempts); + if (typeof computeNextBackoffDelay === "number") { + this.computeNextBackoffDelay = () => computeNextBackoffDelay; + } else { + this.computeNextBackoffDelay = computeNextBackoffDelay; + } + } + async refreshRetryTokenForRetry(tokenToRenew, errorInfo) { + const token = await super.refreshRetryTokenForRetry(tokenToRenew, errorInfo); + token.getRetryDelay = () => this.computeNextBackoffDelay(token.getRetryCount()); + return token; + } + }; + __name(_ConfiguredRetryStrategy, "ConfiguredRetryStrategy"); + var ConfiguredRetryStrategy = _ConfiguredRetryStrategy; } }); -// ../../../node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/parse.js -function parse(uuid) { - if (!validate_default(uuid)) { - throw TypeError("Invalid UUID"); - } - let v; - const arr = new Uint8Array(16); - arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24; - arr[1] = v >>> 16 & 255; - arr[2] = v >>> 8 & 255; - arr[3] = v & 255; - arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8; - arr[5] = v & 255; - arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8; - arr[7] = v & 255; - arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8; - arr[9] = v & 255; - arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 1099511627776 & 255; - arr[11] = v / 4294967296 & 255; - arr[12] = v >>> 24 & 255; - arr[13] = v >>> 16 & 255; - arr[14] = v >>> 8 & 255; - arr[15] = v & 255; - return arr; -} -var parse_default; -var init_parse = __esm({ - "../../../node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/parse.js"() { - init_validate(); - parse_default = parse; +// ../../../node_modules/@smithy/middleware-retry/node_modules/@smithy/util-middleware/dist-cjs/index.js +var require_dist_cjs24 = __commonJS({ + "../../../node_modules/@smithy/middleware-retry/node_modules/@smithy/util-middleware/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all) => { + for (var name in all) + __defProp2(target, name, { get: all[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + getSmithyContext: () => getSmithyContext4, + normalizeProvider: () => normalizeProvider2 + }); + module2.exports = __toCommonJS2(src_exports); + var import_types5 = require_dist_cjs(); + var getSmithyContext4 = /* @__PURE__ */ __name((context) => context[import_types5.SMITHY_CONTEXT_KEY] || (context[import_types5.SMITHY_CONTEXT_KEY] = {}), "getSmithyContext"); + var normalizeProvider2 = /* @__PURE__ */ __name((input) => { + if (typeof input === "function") + return input; + const promisified = Promise.resolve(input); + return () => promisified; + }, "normalizeProvider"); } }); -// ../../../node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/v35.js -function stringToBytes(str) { - str = unescape(encodeURIComponent(str)); - const bytes = []; - for (let i = 0; i < str.length; ++i) { - bytes.push(str.charCodeAt(i)); - } - return bytes; -} -function v35(name, version2, hashfunc) { - function generateUUID(value, namespace, buf, offset) { - var _namespace; - if (typeof value === "string") { - value = stringToBytes(value); - } - if (typeof namespace === "string") { - namespace = parse_default(namespace); - } - if (((_namespace = namespace) === null || _namespace === void 0 ? void 0 : _namespace.length) !== 16) { - throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)"); - } - let bytes = new Uint8Array(16 + value.length); - bytes.set(namespace); - bytes.set(value, namespace.length); - bytes = hashfunc(bytes); - bytes[6] = bytes[6] & 15 | version2; - bytes[8] = bytes[8] & 63 | 128; - if (buf) { - offset = offset || 0; - for (let i = 0; i < 16; ++i) { - buf[offset + i] = bytes[i]; - } - return buf; - } - return unsafeStringify(bytes); - } - try { - generateUUID.name = name; - } catch (err) { - } - generateUUID.DNS = DNS; - generateUUID.URL = URL2; - return generateUUID; -} -var DNS, URL2; -var init_v35 = __esm({ - "../../../node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/v35.js"() { - init_stringify(); - init_parse(); - DNS = "6ba7b810-9dad-11d1-80b4-00c04fd430c8"; - URL2 = "6ba7b811-9dad-11d1-80b4-00c04fd430c8"; - } -}); - -// ../../../node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/md5.js -function md5(bytes) { - if (Array.isArray(bytes)) { - bytes = Buffer.from(bytes); - } else if (typeof bytes === "string") { - bytes = Buffer.from(bytes, "utf8"); - } - return import_crypto2.default.createHash("md5").update(bytes).digest(); -} -var import_crypto2, md5_default; -var init_md5 = __esm({ - "../../../node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/md5.js"() { - import_crypto2 = __toESM(require("crypto")); - md5_default = md5; - } -}); - -// ../../../node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/v3.js -var v3, v3_default; -var init_v3 = __esm({ - "../../../node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/v3.js"() { - init_v35(); - init_md5(); - v3 = v35("v3", 48, md5_default); - v3_default = v3; - } -}); - -// ../../../node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/native.js -var import_crypto3, native_default; -var init_native = __esm({ - "../../../node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/native.js"() { - import_crypto3 = __toESM(require("crypto")); - native_default = { - randomUUID: import_crypto3.default.randomUUID - }; - } -}); - -// ../../../node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/v4.js -function v4(options, buf, offset) { - if (native_default.randomUUID && !buf && !options) { - return native_default.randomUUID(); - } - options = options || {}; - const rnds = options.random || (options.rng || rng)(); - rnds[6] = rnds[6] & 15 | 64; - rnds[8] = rnds[8] & 63 | 128; - if (buf) { - offset = offset || 0; - for (let i = 0; i < 16; ++i) { - buf[offset + i] = rnds[i]; - } - return buf; - } - return unsafeStringify(rnds); -} -var v4_default; -var init_v4 = __esm({ - "../../../node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/v4.js"() { - init_native(); - init_rng(); - init_stringify(); - v4_default = v4; - } -}); - -// ../../../node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/sha1.js -function sha1(bytes) { - if (Array.isArray(bytes)) { - bytes = Buffer.from(bytes); - } else if (typeof bytes === "string") { - bytes = Buffer.from(bytes, "utf8"); - } - return import_crypto4.default.createHash("sha1").update(bytes).digest(); -} -var import_crypto4, sha1_default; -var init_sha1 = __esm({ - "../../../node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/sha1.js"() { - import_crypto4 = __toESM(require("crypto")); - sha1_default = sha1; - } -}); - -// ../../../node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/v5.js -var v5, v5_default; -var init_v5 = __esm({ - "../../../node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/v5.js"() { - init_v35(); - init_sha1(); - v5 = v35("v5", 80, sha1_default); - v5_default = v5; - } -}); - -// ../../../node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/nil.js -var nil_default; -var init_nil = __esm({ - "../../../node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/nil.js"() { - nil_default = "00000000-0000-0000-0000-000000000000"; - } -}); - -// ../../../node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/version.js -function version(uuid) { - if (!validate_default(uuid)) { - throw TypeError("Invalid UUID"); - } - return parseInt(uuid.slice(14, 15), 16); -} -var version_default; -var init_version = __esm({ - "../../../node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/version.js"() { - init_validate(); - version_default = version; - } -}); - -// ../../../node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/index.js -var esm_node_exports = {}; -__export(esm_node_exports, { - NIL: () => nil_default, - parse: () => parse_default, - stringify: () => stringify_default, - v1: () => v1_default, - v3: () => v3_default, - v4: () => v4_default, - v5: () => v5_default, - validate: () => validate_default, - version: () => version_default -}); -var init_esm_node = __esm({ - "../../../node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/index.js"() { - init_v1(); - init_v3(); - init_v4(); - init_v5(); - init_nil(); - init_version(); - init_validate(); - init_stringify(); - init_parse(); - } -}); - -// ../../../node_modules/@smithy/service-error-classification/dist-cjs/index.js -var require_dist_cjs27 = __commonJS({ - "../../../node_modules/@smithy/service-error-classification/dist-cjs/index.js"(exports2, module2) { +// ../../../node_modules/@smithy/smithy-client/node_modules/@smithy/middleware-stack/dist-cjs/index.js +var require_dist_cjs25 = __commonJS({ + "../../../node_modules/@smithy/smithy-client/node_modules/@smithy/middleware-stack/dist-cjs/index.js"(exports2, module2) { var __defProp2 = Object.defineProperty; var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; var __getOwnPropNames2 = Object.getOwnPropertyNames; @@ -6066,1561 +5051,399 @@ var require_dist_cjs27 = __commonJS({ var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); var src_exports = {}; __export2(src_exports, { - isClockSkewCorrectedError: () => isClockSkewCorrectedError, - isClockSkewError: () => isClockSkewError, - isRetryableByTrait: () => isRetryableByTrait, - isServerError: () => isServerError, - isThrottlingError: () => isThrottlingError, - isTransientError: () => isTransientError + constructStack: () => constructStack }); module2.exports = __toCommonJS2(src_exports); - var CLOCK_SKEW_ERROR_CODES = [ - "AuthFailure", - "InvalidSignatureException", - "RequestExpired", - "RequestInTheFuture", - "RequestTimeTooSkewed", - "SignatureDoesNotMatch" - ]; - var THROTTLING_ERROR_CODES = [ - "BandwidthLimitExceeded", - "EC2ThrottledException", - "LimitExceededException", - "PriorRequestNotComplete", - "ProvisionedThroughputExceededException", - "RequestLimitExceeded", - "RequestThrottled", - "RequestThrottledException", - "SlowDown", - "ThrottledException", - "Throttling", - "ThrottlingException", - "TooManyRequestsException", - "TransactionInProgressException" - // DynamoDB - ]; - var TRANSIENT_ERROR_CODES = ["TimeoutError", "RequestTimeout", "RequestTimeoutException"]; - var TRANSIENT_ERROR_STATUS_CODES = [500, 502, 503, 504]; - var NODEJS_TIMEOUT_ERROR_CODES = ["ECONNRESET", "ECONNREFUSED", "EPIPE", "ETIMEDOUT"]; - var isRetryableByTrait = /* @__PURE__ */ __name((error) => error.$retryable !== void 0, "isRetryableByTrait"); - var isClockSkewError = /* @__PURE__ */ __name((error) => CLOCK_SKEW_ERROR_CODES.includes(error.name), "isClockSkewError"); - var isClockSkewCorrectedError = /* @__PURE__ */ __name((error) => { - var _a; - return (_a = error.$metadata) == null ? void 0 : _a.clockSkewCorrected; - }, "isClockSkewCorrectedError"); - var isThrottlingError = /* @__PURE__ */ __name((error) => { - var _a, _b; - return ((_a = error.$metadata) == null ? void 0 : _a.httpStatusCode) === 429 || THROTTLING_ERROR_CODES.includes(error.name) || ((_b = error.$retryable) == null ? void 0 : _b.throttling) == true; - }, "isThrottlingError"); - var isTransientError = /* @__PURE__ */ __name((error) => { - var _a; - return isClockSkewCorrectedError(error) || TRANSIENT_ERROR_CODES.includes(error.name) || NODEJS_TIMEOUT_ERROR_CODES.includes((error == null ? void 0 : error.code) || "") || TRANSIENT_ERROR_STATUS_CODES.includes(((_a = error.$metadata) == null ? void 0 : _a.httpStatusCode) || 0); - }, "isTransientError"); - var isServerError = /* @__PURE__ */ __name((error) => { - var _a; - if (((_a = error.$metadata) == null ? void 0 : _a.httpStatusCode) !== void 0) { - const statusCode = error.$metadata.httpStatusCode; - if (500 <= statusCode && statusCode <= 599 && !isTransientError(error)) { - return true; - } - return false; + var getAllAliases = /* @__PURE__ */ __name((name, aliases) => { + const _aliases = []; + if (name) { + _aliases.push(name); } - return false; - }, "isServerError"); - } -}); - -// ../../../node_modules/@smithy/util-retry/dist-cjs/index.js -var require_dist_cjs28 = __commonJS({ - "../../../node_modules/@smithy/util-retry/dist-cjs/index.js"(exports2, module2) { - var __defProp2 = Object.defineProperty; - var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; - var __getOwnPropNames2 = Object.getOwnPropertyNames; - var __hasOwnProp2 = Object.prototype.hasOwnProperty; - var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); - var __export2 = (target, all) => { - for (var name in all) - __defProp2(target, name, { get: all[name], enumerable: true }); - }; - var __copyProps2 = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames2(from)) - if (!__hasOwnProp2.call(to, key) && key !== except) - __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + if (aliases) { + for (const alias of aliases) { + _aliases.push(alias); + } } - return to; - }; - var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); - var src_exports = {}; - __export2(src_exports, { - AdaptiveRetryStrategy: () => AdaptiveRetryStrategy, - ConfiguredRetryStrategy: () => ConfiguredRetryStrategy, - DEFAULT_MAX_ATTEMPTS: () => DEFAULT_MAX_ATTEMPTS, - DEFAULT_RETRY_DELAY_BASE: () => DEFAULT_RETRY_DELAY_BASE, - DEFAULT_RETRY_MODE: () => DEFAULT_RETRY_MODE, - DefaultRateLimiter: () => DefaultRateLimiter, - INITIAL_RETRY_TOKENS: () => INITIAL_RETRY_TOKENS, - INVOCATION_ID_HEADER: () => INVOCATION_ID_HEADER, - MAXIMUM_RETRY_DELAY: () => MAXIMUM_RETRY_DELAY, - NO_RETRY_INCREMENT: () => NO_RETRY_INCREMENT, - REQUEST_HEADER: () => REQUEST_HEADER, - RETRY_COST: () => RETRY_COST, - RETRY_MODES: () => RETRY_MODES, - StandardRetryStrategy: () => StandardRetryStrategy, - THROTTLING_RETRY_DELAY_BASE: () => THROTTLING_RETRY_DELAY_BASE, - TIMEOUT_RETRY_COST: () => TIMEOUT_RETRY_COST - }); - module2.exports = __toCommonJS2(src_exports); - var RETRY_MODES = /* @__PURE__ */ ((RETRY_MODES2) => { - RETRY_MODES2["STANDARD"] = "standard"; - RETRY_MODES2["ADAPTIVE"] = "adaptive"; - return RETRY_MODES2; - })(RETRY_MODES || {}); - var DEFAULT_MAX_ATTEMPTS = 3; - var DEFAULT_RETRY_MODE = "standard"; - var import_service_error_classification = require_dist_cjs27(); - var _DefaultRateLimiter = class _DefaultRateLimiter { - constructor(options) { - this.currentCapacity = 0; - this.enabled = false; - this.lastMaxRate = 0; - this.measuredTxRate = 0; - this.requestCount = 0; - this.lastTimestamp = 0; - this.timeWindow = 0; - this.beta = (options == null ? void 0 : options.beta) ?? 0.7; - this.minCapacity = (options == null ? void 0 : options.minCapacity) ?? 1; - this.minFillRate = (options == null ? void 0 : options.minFillRate) ?? 0.5; - this.scaleConstant = (options == null ? void 0 : options.scaleConstant) ?? 0.4; - this.smooth = (options == null ? void 0 : options.smooth) ?? 0.8; - const currentTimeInSeconds = this.getCurrentTimeInSeconds(); - this.lastThrottleTime = currentTimeInSeconds; - this.lastTxRateBucket = Math.floor(this.getCurrentTimeInSeconds()); - this.fillRate = this.minFillRate; - this.maxCapacity = this.minCapacity; - } - getCurrentTimeInSeconds() { - return Date.now() / 1e3; - } - async getSendToken() { - return this.acquireTokenBucket(1); - } - async acquireTokenBucket(amount) { - if (!this.enabled) { - return; - } - this.refillTokenBucket(); - if (amount > this.currentCapacity) { - const delay = (amount - this.currentCapacity) / this.fillRate * 1e3; - await new Promise((resolve) => setTimeout(resolve, delay)); - } - this.currentCapacity = this.currentCapacity - amount; - } - refillTokenBucket() { - const timestamp = this.getCurrentTimeInSeconds(); - if (!this.lastTimestamp) { - this.lastTimestamp = timestamp; - return; - } - const fillAmount = (timestamp - this.lastTimestamp) * this.fillRate; - this.currentCapacity = Math.min(this.maxCapacity, this.currentCapacity + fillAmount); - this.lastTimestamp = timestamp; - } - updateClientSendingRate(response) { - let calculatedRate; - this.updateMeasuredRate(); - if ((0, import_service_error_classification.isThrottlingError)(response)) { - const rateToUse = !this.enabled ? this.measuredTxRate : Math.min(this.measuredTxRate, this.fillRate); - this.lastMaxRate = rateToUse; - this.calculateTimeWindow(); - this.lastThrottleTime = this.getCurrentTimeInSeconds(); - calculatedRate = this.cubicThrottle(rateToUse); - this.enableTokenBucket(); - } else { - this.calculateTimeWindow(); - calculatedRate = this.cubicSuccess(this.getCurrentTimeInSeconds()); - } - const newRate = Math.min(calculatedRate, 2 * this.measuredTxRate); - this.updateTokenBucketRate(newRate); - } - calculateTimeWindow() { - this.timeWindow = this.getPrecise(Math.pow(this.lastMaxRate * (1 - this.beta) / this.scaleConstant, 1 / 3)); - } - cubicThrottle(rateToUse) { - return this.getPrecise(rateToUse * this.beta); - } - cubicSuccess(timestamp) { - return this.getPrecise( - this.scaleConstant * Math.pow(timestamp - this.lastThrottleTime - this.timeWindow, 3) + this.lastMaxRate - ); - } - enableTokenBucket() { - this.enabled = true; - } - updateTokenBucketRate(newRate) { - this.refillTokenBucket(); - this.fillRate = Math.max(newRate, this.minFillRate); - this.maxCapacity = Math.max(newRate, this.minCapacity); - this.currentCapacity = Math.min(this.currentCapacity, this.maxCapacity); - } - updateMeasuredRate() { - const t = this.getCurrentTimeInSeconds(); - const timeBucket = Math.floor(t * 2) / 2; - this.requestCount++; - if (timeBucket > this.lastTxRateBucket) { - const currentRate = this.requestCount / (timeBucket - this.lastTxRateBucket); - this.measuredTxRate = this.getPrecise(currentRate * this.smooth + this.measuredTxRate * (1 - this.smooth)); - this.requestCount = 0; - this.lastTxRateBucket = timeBucket; - } - } - getPrecise(num) { - return parseFloat(num.toFixed(8)); - } - }; - __name(_DefaultRateLimiter, "DefaultRateLimiter"); - var DefaultRateLimiter = _DefaultRateLimiter; - var DEFAULT_RETRY_DELAY_BASE = 100; - var MAXIMUM_RETRY_DELAY = 20 * 1e3; - var THROTTLING_RETRY_DELAY_BASE = 500; - var INITIAL_RETRY_TOKENS = 500; - var RETRY_COST = 5; - var TIMEOUT_RETRY_COST = 10; - var NO_RETRY_INCREMENT = 1; - var INVOCATION_ID_HEADER = "amz-sdk-invocation-id"; - var REQUEST_HEADER = "amz-sdk-request"; - var getDefaultRetryBackoffStrategy = /* @__PURE__ */ __name(() => { - let delayBase = DEFAULT_RETRY_DELAY_BASE; - const computeNextBackoffDelay = /* @__PURE__ */ __name((attempts) => { - return Math.floor(Math.min(MAXIMUM_RETRY_DELAY, Math.random() * 2 ** attempts * delayBase)); - }, "computeNextBackoffDelay"); - const setDelayBase = /* @__PURE__ */ __name((delay) => { - delayBase = delay; - }, "setDelayBase"); - return { - computeNextBackoffDelay, - setDelayBase - }; - }, "getDefaultRetryBackoffStrategy"); - var createDefaultRetryToken = /* @__PURE__ */ __name(({ - retryDelay, - retryCount, - retryCost - }) => { - const getRetryCount = /* @__PURE__ */ __name(() => retryCount, "getRetryCount"); - const getRetryDelay = /* @__PURE__ */ __name(() => Math.min(MAXIMUM_RETRY_DELAY, retryDelay), "getRetryDelay"); - const getRetryCost = /* @__PURE__ */ __name(() => retryCost, "getRetryCost"); - return { - getRetryCount, - getRetryDelay, - getRetryCost - }; - }, "createDefaultRetryToken"); - var _StandardRetryStrategy = class _StandardRetryStrategy { - constructor(maxAttempts) { - this.maxAttempts = maxAttempts; - this.mode = "standard"; - this.capacity = INITIAL_RETRY_TOKENS; - this.retryBackoffStrategy = getDefaultRetryBackoffStrategy(); - this.maxAttemptsProvider = typeof maxAttempts === "function" ? maxAttempts : async () => maxAttempts; - } - async acquireInitialRetryToken(retryTokenScope) { - return createDefaultRetryToken({ - retryDelay: DEFAULT_RETRY_DELAY_BASE, - retryCount: 0 - }); - } - async refreshRetryTokenForRetry(token, errorInfo) { - const maxAttempts = await this.getMaxAttempts(); - if (this.shouldRetry(token, errorInfo, maxAttempts)) { - const errorType = errorInfo.errorType; - this.retryBackoffStrategy.setDelayBase( - errorType === "THROTTLING" ? THROTTLING_RETRY_DELAY_BASE : DEFAULT_RETRY_DELAY_BASE - ); - const delayFromErrorType = this.retryBackoffStrategy.computeNextBackoffDelay(token.getRetryCount()); - const retryDelay = errorInfo.retryAfterHint ? Math.max(errorInfo.retryAfterHint.getTime() - Date.now() || 0, delayFromErrorType) : delayFromErrorType; - const capacityCost = this.getCapacityCost(errorType); - this.capacity -= capacityCost; - return createDefaultRetryToken({ - retryDelay, - retryCount: token.getRetryCount() + 1, - retryCost: capacityCost - }); - } - throw new Error("No retry token available"); - } - recordSuccess(token) { - this.capacity = Math.max(INITIAL_RETRY_TOKENS, this.capacity + (token.getRetryCost() ?? NO_RETRY_INCREMENT)); - } - /** - * @returns the current available retry capacity. - * - * This number decreases when retries are executed and refills when requests or retries succeed. - */ - getCapacity() { - return this.capacity; - } - async getMaxAttempts() { - try { - return await this.maxAttemptsProvider(); - } catch (error) { - console.warn(`Max attempts provider could not resolve. Using default of ${DEFAULT_MAX_ATTEMPTS}`); - return DEFAULT_MAX_ATTEMPTS; - } - } - shouldRetry(tokenToRenew, errorInfo, maxAttempts) { - const attempts = tokenToRenew.getRetryCount() + 1; - return attempts < maxAttempts && this.capacity >= this.getCapacityCost(errorInfo.errorType) && this.isRetryableError(errorInfo.errorType); - } - getCapacityCost(errorType) { - return errorType === "TRANSIENT" ? TIMEOUT_RETRY_COST : RETRY_COST; - } - isRetryableError(errorType) { - return errorType === "THROTTLING" || errorType === "TRANSIENT"; - } - }; - __name(_StandardRetryStrategy, "StandardRetryStrategy"); - var StandardRetryStrategy = _StandardRetryStrategy; - var _AdaptiveRetryStrategy = class _AdaptiveRetryStrategy { - constructor(maxAttemptsProvider, options) { - this.maxAttemptsProvider = maxAttemptsProvider; - this.mode = "adaptive"; - const { rateLimiter } = options ?? {}; - this.rateLimiter = rateLimiter ?? new DefaultRateLimiter(); - this.standardRetryStrategy = new StandardRetryStrategy(maxAttemptsProvider); - } - async acquireInitialRetryToken(retryTokenScope) { - await this.rateLimiter.getSendToken(); - return this.standardRetryStrategy.acquireInitialRetryToken(retryTokenScope); - } - async refreshRetryTokenForRetry(tokenToRenew, errorInfo) { - this.rateLimiter.updateClientSendingRate(errorInfo); - return this.standardRetryStrategy.refreshRetryTokenForRetry(tokenToRenew, errorInfo); - } - recordSuccess(token) { - this.rateLimiter.updateClientSendingRate({}); - this.standardRetryStrategy.recordSuccess(token); - } - }; - __name(_AdaptiveRetryStrategy, "AdaptiveRetryStrategy"); - var AdaptiveRetryStrategy = _AdaptiveRetryStrategy; - var _ConfiguredRetryStrategy = class _ConfiguredRetryStrategy extends StandardRetryStrategy { - /** - * @param maxAttempts - the maximum number of retry attempts allowed. - * e.g., if set to 3, then 4 total requests are possible. - * @param computeNextBackoffDelay - a millisecond delay for each retry or a function that takes the retry attempt - * and returns the delay. - * - * @example exponential backoff. - * ```js - * new Client({ - * retryStrategy: new ConfiguredRetryStrategy(3, (attempt) => attempt ** 2) - * }); - * ``` - * @example constant delay. - * ```js - * new Client({ - * retryStrategy: new ConfiguredRetryStrategy(3, 2000) - * }); - * ``` - */ - constructor(maxAttempts, computeNextBackoffDelay = DEFAULT_RETRY_DELAY_BASE) { - super(typeof maxAttempts === "function" ? maxAttempts : async () => maxAttempts); - if (typeof computeNextBackoffDelay === "number") { - this.computeNextBackoffDelay = () => computeNextBackoffDelay; - } else { - this.computeNextBackoffDelay = computeNextBackoffDelay; - } - } - async refreshRetryTokenForRetry(tokenToRenew, errorInfo) { - const token = await super.refreshRetryTokenForRetry(tokenToRenew, errorInfo); - token.getRetryDelay = () => this.computeNextBackoffDelay(token.getRetryCount()); - return token; - } - }; - __name(_ConfiguredRetryStrategy, "ConfiguredRetryStrategy"); - var ConfiguredRetryStrategy = _ConfiguredRetryStrategy; - } -}); - -// ../../../node_modules/@smithy/middleware-stack/dist-cjs/index.js -var require_dist_cjs29 = __commonJS({ - "../../../node_modules/@smithy/middleware-stack/dist-cjs/index.js"(exports2, module2) { - var __defProp2 = Object.defineProperty; - var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; - var __getOwnPropNames2 = Object.getOwnPropertyNames; - var __hasOwnProp2 = Object.prototype.hasOwnProperty; - var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); - var __export2 = (target, all) => { - for (var name in all) - __defProp2(target, name, { get: all[name], enumerable: true }); - }; - var __copyProps2 = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames2(from)) - if (!__hasOwnProp2.call(to, key) && key !== except) - __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); - } - return to; - }; - var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); - var src_exports = {}; - __export2(src_exports, { - constructStack: () => constructStack - }); - module2.exports = __toCommonJS2(src_exports); - var getAllAliases = /* @__PURE__ */ __name((name, aliases) => { - const _aliases = []; - if (name) { - _aliases.push(name); - } - if (aliases) { - for (const alias of aliases) { - _aliases.push(alias); - } - } - return _aliases; - }, "getAllAliases"); - var getMiddlewareNameWithAliases = /* @__PURE__ */ __name((name, aliases) => { - return `${name || "anonymous"}${aliases && aliases.length > 0 ? ` (a.k.a. ${aliases.join(",")})` : ""}`; - }, "getMiddlewareNameWithAliases"); - var constructStack = /* @__PURE__ */ __name(() => { - let absoluteEntries = []; - let relativeEntries = []; - let identifyOnResolve = false; - const entriesNameSet = /* @__PURE__ */ new Set(); - const sort = /* @__PURE__ */ __name((entries) => entries.sort( - (a, b) => stepWeights[b.step] - stepWeights[a.step] || priorityWeights[b.priority || "normal"] - priorityWeights[a.priority || "normal"] - ), "sort"); - const removeByName = /* @__PURE__ */ __name((toRemove) => { - let isRemoved = false; - const filterCb = /* @__PURE__ */ __name((entry) => { - const aliases = getAllAliases(entry.name, entry.aliases); - if (aliases.includes(toRemove)) { - isRemoved = true; - for (const alias of aliases) { - entriesNameSet.delete(alias); - } - return false; - } - return true; - }, "filterCb"); - absoluteEntries = absoluteEntries.filter(filterCb); - relativeEntries = relativeEntries.filter(filterCb); - return isRemoved; - }, "removeByName"); - const removeByReference = /* @__PURE__ */ __name((toRemove) => { - let isRemoved = false; - const filterCb = /* @__PURE__ */ __name((entry) => { - if (entry.middleware === toRemove) { - isRemoved = true; - for (const alias of getAllAliases(entry.name, entry.aliases)) { - entriesNameSet.delete(alias); - } - return false; - } - return true; - }, "filterCb"); - absoluteEntries = absoluteEntries.filter(filterCb); - relativeEntries = relativeEntries.filter(filterCb); - return isRemoved; - }, "removeByReference"); - const cloneTo = /* @__PURE__ */ __name((toStack) => { - var _a; - absoluteEntries.forEach((entry) => { - toStack.add(entry.middleware, { ...entry }); - }); - relativeEntries.forEach((entry) => { - toStack.addRelativeTo(entry.middleware, { ...entry }); - }); - (_a = toStack.identifyOnResolve) == null ? void 0 : _a.call(toStack, stack.identifyOnResolve()); - return toStack; - }, "cloneTo"); - const expandRelativeMiddlewareList = /* @__PURE__ */ __name((from) => { - const expandedMiddlewareList = []; - from.before.forEach((entry) => { - if (entry.before.length === 0 && entry.after.length === 0) { - expandedMiddlewareList.push(entry); - } else { - expandedMiddlewareList.push(...expandRelativeMiddlewareList(entry)); - } - }); - expandedMiddlewareList.push(from); - from.after.reverse().forEach((entry) => { - if (entry.before.length === 0 && entry.after.length === 0) { - expandedMiddlewareList.push(entry); - } else { - expandedMiddlewareList.push(...expandRelativeMiddlewareList(entry)); - } - }); - return expandedMiddlewareList; - }, "expandRelativeMiddlewareList"); - const getMiddlewareList = /* @__PURE__ */ __name((debug = false) => { - const normalizedAbsoluteEntries = []; - const normalizedRelativeEntries = []; - const normalizedEntriesNameMap = {}; - absoluteEntries.forEach((entry) => { - const normalizedEntry = { - ...entry, - before: [], - after: [] - }; - for (const alias of getAllAliases(normalizedEntry.name, normalizedEntry.aliases)) { - normalizedEntriesNameMap[alias] = normalizedEntry; - } - normalizedAbsoluteEntries.push(normalizedEntry); - }); - relativeEntries.forEach((entry) => { - const normalizedEntry = { - ...entry, - before: [], - after: [] - }; - for (const alias of getAllAliases(normalizedEntry.name, normalizedEntry.aliases)) { - normalizedEntriesNameMap[alias] = normalizedEntry; - } - normalizedRelativeEntries.push(normalizedEntry); - }); - normalizedRelativeEntries.forEach((entry) => { - if (entry.toMiddleware) { - const toMiddleware = normalizedEntriesNameMap[entry.toMiddleware]; - if (toMiddleware === void 0) { - if (debug) { - return; - } - throw new Error( - `${entry.toMiddleware} is not found when adding ${getMiddlewareNameWithAliases(entry.name, entry.aliases)} middleware ${entry.relation} ${entry.toMiddleware}` - ); - } - if (entry.relation === "after") { - toMiddleware.after.push(entry); - } - if (entry.relation === "before") { - toMiddleware.before.push(entry); - } - } - }); - const mainChain = sort(normalizedAbsoluteEntries).map(expandRelativeMiddlewareList).reduce((wholeList, expandedMiddlewareList) => { - wholeList.push(...expandedMiddlewareList); - return wholeList; - }, []); - return mainChain; - }, "getMiddlewareList"); - const stack = { - add: (middleware, options = {}) => { - const { name, override, aliases: _aliases } = options; - const entry = { - step: "initialize", - priority: "normal", - middleware, - ...options - }; - const aliases = getAllAliases(name, _aliases); - if (aliases.length > 0) { - if (aliases.some((alias) => entriesNameSet.has(alias))) { - if (!override) - throw new Error(`Duplicate middleware name '${getMiddlewareNameWithAliases(name, _aliases)}'`); - for (const alias of aliases) { - const toOverrideIndex = absoluteEntries.findIndex( - (entry2) => { - var _a; - return entry2.name === alias || ((_a = entry2.aliases) == null ? void 0 : _a.some((a) => a === alias)); - } - ); - if (toOverrideIndex === -1) { - continue; - } - const toOverride = absoluteEntries[toOverrideIndex]; - if (toOverride.step !== entry.step || entry.priority !== toOverride.priority) { - throw new Error( - `"${getMiddlewareNameWithAliases(toOverride.name, toOverride.aliases)}" middleware with ${toOverride.priority} priority in ${toOverride.step} step cannot be overridden by "${getMiddlewareNameWithAliases(name, _aliases)}" middleware with ${entry.priority} priority in ${entry.step} step.` - ); - } - absoluteEntries.splice(toOverrideIndex, 1); - } - } - for (const alias of aliases) { - entriesNameSet.add(alias); - } - } - absoluteEntries.push(entry); - }, - addRelativeTo: (middleware, options) => { - const { name, override, aliases: _aliases } = options; - const entry = { - middleware, - ...options - }; - const aliases = getAllAliases(name, _aliases); - if (aliases.length > 0) { - if (aliases.some((alias) => entriesNameSet.has(alias))) { - if (!override) - throw new Error(`Duplicate middleware name '${getMiddlewareNameWithAliases(name, _aliases)}'`); - for (const alias of aliases) { - const toOverrideIndex = relativeEntries.findIndex( - (entry2) => { - var _a; - return entry2.name === alias || ((_a = entry2.aliases) == null ? void 0 : _a.some((a) => a === alias)); - } - ); - if (toOverrideIndex === -1) { - continue; - } - const toOverride = relativeEntries[toOverrideIndex]; - if (toOverride.toMiddleware !== entry.toMiddleware || toOverride.relation !== entry.relation) { - throw new Error( - `"${getMiddlewareNameWithAliases(toOverride.name, toOverride.aliases)}" middleware ${toOverride.relation} "${toOverride.toMiddleware}" middleware cannot be overridden by "${getMiddlewareNameWithAliases(name, _aliases)}" middleware ${entry.relation} "${entry.toMiddleware}" middleware.` - ); - } - relativeEntries.splice(toOverrideIndex, 1); - } - } - for (const alias of aliases) { - entriesNameSet.add(alias); - } - } - relativeEntries.push(entry); - }, - clone: () => cloneTo(constructStack()), - use: (plugin) => { - plugin.applyToStack(stack); - }, - remove: (toRemove) => { - if (typeof toRemove === "string") - return removeByName(toRemove); - else - return removeByReference(toRemove); - }, - removeByTag: (toRemove) => { - let isRemoved = false; - const filterCb = /* @__PURE__ */ __name((entry) => { - const { tags, name, aliases: _aliases } = entry; - if (tags && tags.includes(toRemove)) { - const aliases = getAllAliases(name, _aliases); - for (const alias of aliases) { - entriesNameSet.delete(alias); - } - isRemoved = true; - return false; - } - return true; - }, "filterCb"); - absoluteEntries = absoluteEntries.filter(filterCb); - relativeEntries = relativeEntries.filter(filterCb); - return isRemoved; - }, - concat: (from) => { - var _a; - const cloned = cloneTo(constructStack()); - cloned.use(from); - cloned.identifyOnResolve( - identifyOnResolve || cloned.identifyOnResolve() || (((_a = from.identifyOnResolve) == null ? void 0 : _a.call(from)) ?? false) - ); - return cloned; - }, - applyToStack: cloneTo, - identify: () => { - return getMiddlewareList(true).map((mw) => { - const step = mw.step ?? mw.relation + " " + mw.toMiddleware; - return getMiddlewareNameWithAliases(mw.name, mw.aliases) + " - " + step; - }); - }, - identifyOnResolve(toggle) { - if (typeof toggle === "boolean") - identifyOnResolve = toggle; - return identifyOnResolve; - }, - resolve: (handler2, context) => { - for (const middleware of getMiddlewareList().map((entry) => entry.middleware).reverse()) { - handler2 = middleware(handler2, context); - } - if (identifyOnResolve) { - console.log(stack.identify()); - } - return handler2; - } - }; - return stack; - }, "constructStack"); - var stepWeights = { - initialize: 5, - serialize: 4, - build: 3, - finalizeRequest: 2, - deserialize: 1 - }; - var priorityWeights = { - high: 3, - normal: 2, - low: 1 - }; - } -}); - -// ../../../node_modules/@smithy/util-base64/dist-cjs/fromBase64.js -var require_fromBase64 = __commonJS({ - "../../../node_modules/@smithy/util-base64/dist-cjs/fromBase64.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.fromBase64 = void 0; - var util_buffer_from_1 = require_dist_cjs9(); - var BASE64_REGEX = /^[A-Za-z0-9+/]*={0,2}$/; - var fromBase642 = (input) => { - if (input.length * 3 % 4 !== 0) { - throw new TypeError(`Incorrect padding on base64 string.`); - } - if (!BASE64_REGEX.exec(input)) { - throw new TypeError(`Invalid base64 string.`); - } - const buffer = (0, util_buffer_from_1.fromString)(input, "base64"); - return new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength); - }; - exports2.fromBase64 = fromBase642; - } -}); - -// ../../../node_modules/@smithy/util-base64/dist-cjs/toBase64.js -var require_toBase64 = __commonJS({ - "../../../node_modules/@smithy/util-base64/dist-cjs/toBase64.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.toBase64 = void 0; - var util_buffer_from_1 = require_dist_cjs9(); - var util_utf8_1 = require_dist_cjs10(); - var toBase642 = (_input) => { - let input; - if (typeof _input === "string") { - input = (0, util_utf8_1.fromUtf8)(_input); - } else { - input = _input; - } - if (typeof input !== "object" || typeof input.byteOffset !== "number" || typeof input.byteLength !== "number") { - throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array."); - } - return (0, util_buffer_from_1.fromArrayBuffer)(input.buffer, input.byteOffset, input.byteLength).toString("base64"); - }; - exports2.toBase64 = toBase642; - } -}); - -// ../../../node_modules/@smithy/util-base64/dist-cjs/index.js -var require_dist_cjs30 = __commonJS({ - "../../../node_modules/@smithy/util-base64/dist-cjs/index.js"(exports2, module2) { - var __defProp2 = Object.defineProperty; - var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; - var __getOwnPropNames2 = Object.getOwnPropertyNames; - var __hasOwnProp2 = Object.prototype.hasOwnProperty; - var __copyProps2 = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames2(from)) - if (!__hasOwnProp2.call(to, key) && key !== except) - __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); - } - return to; - }; - var __reExport = (target, mod, secondTarget) => (__copyProps2(target, mod, "default"), secondTarget && __copyProps2(secondTarget, mod, "default")); - var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); - var src_exports = {}; - module2.exports = __toCommonJS2(src_exports); - __reExport(src_exports, require_fromBase64(), module2.exports); - __reExport(src_exports, require_toBase64(), module2.exports); - } -}); - -// ../../../node_modules/@smithy/util-stream/dist-cjs/getAwsChunkedEncodingStream.js -var require_getAwsChunkedEncodingStream = __commonJS({ - "../../../node_modules/@smithy/util-stream/dist-cjs/getAwsChunkedEncodingStream.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getAwsChunkedEncodingStream = void 0; - var stream_1 = require("stream"); - var getAwsChunkedEncodingStream2 = (readableStream, options) => { - const { base64Encoder, bodyLengthChecker, checksumAlgorithmFn, checksumLocationName, streamHasher } = options; - const checksumRequired = base64Encoder !== void 0 && checksumAlgorithmFn !== void 0 && checksumLocationName !== void 0 && streamHasher !== void 0; - const digest = checksumRequired ? streamHasher(checksumAlgorithmFn, readableStream) : void 0; - const awsChunkedEncodingStream = new stream_1.Readable({ read: () => { - } }); - readableStream.on("data", (data) => { - const length = bodyLengthChecker(data) || 0; - awsChunkedEncodingStream.push(`${length.toString(16)}\r -`); - awsChunkedEncodingStream.push(data); - awsChunkedEncodingStream.push("\r\n"); - }); - readableStream.on("end", async () => { - awsChunkedEncodingStream.push(`0\r -`); - if (checksumRequired) { - const checksum = base64Encoder(await digest); - awsChunkedEncodingStream.push(`${checksumLocationName}:${checksum}\r -`); - awsChunkedEncodingStream.push(`\r -`); - } - awsChunkedEncodingStream.push(null); - }); - return awsChunkedEncodingStream; - }; - exports2.getAwsChunkedEncodingStream = getAwsChunkedEncodingStream2; - } -}); - -// ../../../node_modules/@smithy/querystring-builder/dist-cjs/index.js -var require_dist_cjs31 = __commonJS({ - "../../../node_modules/@smithy/querystring-builder/dist-cjs/index.js"(exports2, module2) { - var __defProp2 = Object.defineProperty; - var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; - var __getOwnPropNames2 = Object.getOwnPropertyNames; - var __hasOwnProp2 = Object.prototype.hasOwnProperty; - var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); - var __export2 = (target, all) => { - for (var name in all) - __defProp2(target, name, { get: all[name], enumerable: true }); - }; - var __copyProps2 = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames2(from)) - if (!__hasOwnProp2.call(to, key) && key !== except) - __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); - } - return to; - }; - var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); - var src_exports = {}; - __export2(src_exports, { - buildQueryString: () => buildQueryString - }); - module2.exports = __toCommonJS2(src_exports); - var import_util_uri_escape = require_dist_cjs12(); - function buildQueryString(query) { - const parts = []; - for (let key of Object.keys(query).sort()) { - const value = query[key]; - key = (0, import_util_uri_escape.escapeUri)(key); - if (Array.isArray(value)) { - for (let i = 0, iLen = value.length; i < iLen; i++) { - parts.push(`${key}=${(0, import_util_uri_escape.escapeUri)(value[i])}`); - } - } else { - let qsEntry = key; - if (value || typeof value === "string") { - qsEntry += `=${(0, import_util_uri_escape.escapeUri)(value)}`; - } - parts.push(qsEntry); - } - } - return parts.join("&"); - } - __name(buildQueryString, "buildQueryString"); - } -}); - -// ../../../node_modules/@smithy/node-http-handler/dist-cjs/index.js -var require_dist_cjs32 = __commonJS({ - "../../../node_modules/@smithy/node-http-handler/dist-cjs/index.js"(exports2, module2) { - var __create2 = Object.create; - var __defProp2 = Object.defineProperty; - var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; - var __getOwnPropNames2 = Object.getOwnPropertyNames; - var __getProtoOf2 = Object.getPrototypeOf; - var __hasOwnProp2 = Object.prototype.hasOwnProperty; - var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); - var __export2 = (target, all) => { - for (var name in all) - __defProp2(target, name, { get: all[name], enumerable: true }); - }; - var __copyProps2 = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames2(from)) - if (!__hasOwnProp2.call(to, key) && key !== except) - __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); - } - return to; - }; - var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2( - // If the importer is in node compatibility mode or this is not an ESM - // file that has been converted to a CommonJS file using a Babel- - // compatible transform (i.e. "__esModule" has not been set), then set - // "default" to the CommonJS "module.exports" for node compatibility. - isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target, - mod - )); - var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); - var src_exports = {}; - __export2(src_exports, { - DEFAULT_REQUEST_TIMEOUT: () => DEFAULT_REQUEST_TIMEOUT, - NodeHttp2Handler: () => NodeHttp2Handler, - NodeHttpHandler: () => NodeHttpHandler, - streamCollector: () => streamCollector - }); - module2.exports = __toCommonJS2(src_exports); - var import_protocol_http = require_dist_cjs2(); - var import_querystring_builder = require_dist_cjs31(); - var import_http2 = require("http"); - var import_https = require("https"); - var NODEJS_TIMEOUT_ERROR_CODES = ["ECONNRESET", "EPIPE", "ETIMEDOUT"]; - var getTransformedHeaders = /* @__PURE__ */ __name((headers) => { - const transformedHeaders = {}; - for (const name of Object.keys(headers)) { - const headerValues = headers[name]; - transformedHeaders[name] = Array.isArray(headerValues) ? headerValues.join(",") : headerValues; - } - return transformedHeaders; - }, "getTransformedHeaders"); - var setConnectionTimeout = /* @__PURE__ */ __name((request2, reject, timeoutInMs = 0) => { - if (!timeoutInMs) { - return; - } - const timeoutId = setTimeout(() => { - request2.destroy(); - reject( - Object.assign(new Error(`Socket timed out without establishing a connection within ${timeoutInMs} ms`), { - name: "TimeoutError" - }) - ); - }, timeoutInMs); - request2.on("socket", (socket) => { - if (socket.connecting) { - socket.on("connect", () => { - clearTimeout(timeoutId); - }); - } else { - clearTimeout(timeoutId); - } - }); - }, "setConnectionTimeout"); - var setSocketKeepAlive = /* @__PURE__ */ __name((request2, { keepAlive, keepAliveMsecs }) => { - if (keepAlive !== true) { - return; - } - request2.on("socket", (socket) => { - socket.setKeepAlive(keepAlive, keepAliveMsecs || 0); - }); - }, "setSocketKeepAlive"); - var setSocketTimeout = /* @__PURE__ */ __name((request2, reject, timeoutInMs = 0) => { - request2.setTimeout(timeoutInMs, () => { - request2.destroy(); - reject(Object.assign(new Error(`Connection timed out after ${timeoutInMs} ms`), { name: "TimeoutError" })); - }); - }, "setSocketTimeout"); - var import_stream = require("stream"); - var MIN_WAIT_TIME = 1e3; - async function writeRequestBody(httpRequest, request2, maxContinueTimeoutMs = MIN_WAIT_TIME) { - const headers = request2.headers ?? {}; - const expect = headers["Expect"] || headers["expect"]; - let timeoutId = -1; - let hasError = false; - if (expect === "100-continue") { - await Promise.race([ - new Promise((resolve) => { - timeoutId = Number(setTimeout(resolve, Math.max(MIN_WAIT_TIME, maxContinueTimeoutMs))); - }), - new Promise((resolve) => { - httpRequest.on("continue", () => { - clearTimeout(timeoutId); - resolve(); - }); - httpRequest.on("error", () => { - hasError = true; - clearTimeout(timeoutId); - resolve(); - }); - }) - ]); - } - if (!hasError) { - writeBody(httpRequest, request2.body); - } - } - __name(writeRequestBody, "writeRequestBody"); - function writeBody(httpRequest, body) { - if (body instanceof import_stream.Readable) { - body.pipe(httpRequest); - return; - } - if (body) { - if (Buffer.isBuffer(body) || typeof body === "string") { - httpRequest.end(body); - return; - } - const uint8 = body; - if (typeof uint8 === "object" && uint8.buffer && typeof uint8.byteOffset === "number" && typeof uint8.byteLength === "number") { - httpRequest.end(Buffer.from(uint8.buffer, uint8.byteOffset, uint8.byteLength)); - return; - } - httpRequest.end(Buffer.from(body)); - return; - } - httpRequest.end(); - } - __name(writeBody, "writeBody"); - var DEFAULT_REQUEST_TIMEOUT = 0; - var _NodeHttpHandler = class _NodeHttpHandler2 { - constructor(options) { - this.socketWarningTimestamp = 0; - this.metadata = { handlerProtocol: "http/1.1" }; - this.configProvider = new Promise((resolve, reject) => { - if (typeof options === "function") { - options().then((_options) => { - resolve(this.resolveDefaultConfig(_options)); - }).catch(reject); - } else { - resolve(this.resolveDefaultConfig(options)); - } - }); - } - /** - * @returns the input if it is an HttpHandler of any class, - * or instantiates a new instance of this handler. - */ - static create(instanceOrOptions) { - if (typeof (instanceOrOptions == null ? void 0 : instanceOrOptions.handle) === "function") { - return instanceOrOptions; - } - return new _NodeHttpHandler2(instanceOrOptions); - } - /** - * @internal - * - * @param agent - http(s) agent in use by the NodeHttpHandler instance. - * @returns timestamp of last emitted warning. - */ - static checkSocketUsage(agent, socketWarningTimestamp) { - var _a, _b; - const { sockets, requests, maxSockets } = agent; - if (typeof maxSockets !== "number" || maxSockets === Infinity) { - return socketWarningTimestamp; - } - const interval = 15e3; - if (Date.now() - interval < socketWarningTimestamp) { - return socketWarningTimestamp; - } - if (sockets && requests) { - for (const origin in sockets) { - const socketsInUse = ((_a = sockets[origin]) == null ? void 0 : _a.length) ?? 0; - const requestsEnqueued = ((_b = requests[origin]) == null ? void 0 : _b.length) ?? 0; - if (socketsInUse >= maxSockets && requestsEnqueued >= 2 * maxSockets) { - console.warn( - "@smithy/node-http-handler:WARN", - `socket usage at capacity=${socketsInUse} and ${requestsEnqueued} additional requests are enqueued.`, - "See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html", - "or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config." - ); - return Date.now(); - } - } - } - return socketWarningTimestamp; - } - resolveDefaultConfig(options) { - const { requestTimeout, connectionTimeout, socketTimeout, httpAgent, httpsAgent } = options || {}; - const keepAlive = true; - const maxSockets = 50; - return { - connectionTimeout, - requestTimeout: requestTimeout ?? socketTimeout, - httpAgent: (() => { - if (httpAgent instanceof import_http2.Agent || typeof (httpAgent == null ? void 0 : httpAgent.destroy) === "function") { - return httpAgent; - } - return new import_http2.Agent({ keepAlive, maxSockets, ...httpAgent }); - })(), - httpsAgent: (() => { - if (httpsAgent instanceof import_https.Agent || typeof (httpsAgent == null ? void 0 : httpsAgent.destroy) === "function") { - return httpsAgent; - } - return new import_https.Agent({ keepAlive, maxSockets, ...httpsAgent }); - })() - }; - } - destroy() { - var _a, _b, _c, _d; - (_b = (_a = this.config) == null ? void 0 : _a.httpAgent) == null ? void 0 : _b.destroy(); - (_d = (_c = this.config) == null ? void 0 : _c.httpsAgent) == null ? void 0 : _d.destroy(); - } - async handle(request2, { abortSignal } = {}) { - if (!this.config) { - this.config = await this.configProvider; - } - let socketCheckTimeoutId; - return new Promise((_resolve, _reject) => { - let writeRequestBodyPromise = void 0; - const resolve = /* @__PURE__ */ __name(async (arg) => { - await writeRequestBodyPromise; - clearTimeout(socketCheckTimeoutId); - _resolve(arg); - }, "resolve"); - const reject = /* @__PURE__ */ __name(async (arg) => { - await writeRequestBodyPromise; - _reject(arg); - }, "reject"); - if (!this.config) { - throw new Error("Node HTTP request handler config is not resolved"); - } - if (abortSignal == null ? void 0 : abortSignal.aborted) { - const abortError = new Error("Request aborted"); - abortError.name = "AbortError"; - reject(abortError); - return; - } - const isSSL = request2.protocol === "https:"; - const agent = isSSL ? this.config.httpsAgent : this.config.httpAgent; - socketCheckTimeoutId = setTimeout(() => { - this.socketWarningTimestamp = _NodeHttpHandler2.checkSocketUsage(agent, this.socketWarningTimestamp); - }, this.config.socketAcquisitionWarningTimeout ?? (this.config.requestTimeout ?? 2e3) + (this.config.connectionTimeout ?? 1e3)); - const queryString = (0, import_querystring_builder.buildQueryString)(request2.query || {}); - let auth = void 0; - if (request2.username != null || request2.password != null) { - const username = request2.username ?? ""; - const password = request2.password ?? ""; - auth = `${username}:${password}`; - } - let path = request2.path; - if (queryString) { - path += `?${queryString}`; - } - if (request2.fragment) { - path += `#${request2.fragment}`; - } - const nodeHttpsOptions = { - headers: request2.headers, - host: request2.hostname, - method: request2.method, - path, - port: request2.port, - agent, - auth - }; - const requestFunc = isSSL ? import_https.request : import_http2.request; - const req = requestFunc(nodeHttpsOptions, (res) => { - const httpResponse = new import_protocol_http.HttpResponse({ - statusCode: res.statusCode || -1, - reason: res.statusMessage, - headers: getTransformedHeaders(res.headers), - body: res - }); - resolve({ response: httpResponse }); - }); - req.on("error", (err) => { - if (NODEJS_TIMEOUT_ERROR_CODES.includes(err.code)) { - reject(Object.assign(err, { name: "TimeoutError" })); - } else { - reject(err); - } - }); - setConnectionTimeout(req, reject, this.config.connectionTimeout); - setSocketTimeout(req, reject, this.config.requestTimeout); - if (abortSignal) { - abortSignal.onabort = () => { - req.abort(); - const abortError = new Error("Request aborted"); - abortError.name = "AbortError"; - reject(abortError); - }; - } - const httpAgent = nodeHttpsOptions.agent; - if (typeof httpAgent === "object" && "keepAlive" in httpAgent) { - setSocketKeepAlive(req, { - // @ts-expect-error keepAlive is not public on httpAgent. - keepAlive: httpAgent.keepAlive, - // @ts-expect-error keepAliveMsecs is not public on httpAgent. - keepAliveMsecs: httpAgent.keepAliveMsecs - }); - } - writeRequestBodyPromise = writeRequestBody(req, request2, this.config.requestTimeout).catch(_reject); - }); - } - updateHttpClientConfig(key, value) { - this.config = void 0; - this.configProvider = this.configProvider.then((config) => { - return { - ...config, - [key]: value - }; - }); - } - httpHandlerConfigs() { - return this.config ?? {}; - } - }; - __name(_NodeHttpHandler, "NodeHttpHandler"); - var NodeHttpHandler = _NodeHttpHandler; - var import_http22 = require("http2"); - var import_http23 = __toESM2(require("http2")); - var _NodeHttp2ConnectionPool = class _NodeHttp2ConnectionPool { - constructor(sessions) { - this.sessions = []; - this.sessions = sessions ?? []; - } - poll() { - if (this.sessions.length > 0) { - return this.sessions.shift(); - } - } - offerLast(session) { - this.sessions.push(session); - } - contains(session) { - return this.sessions.includes(session); - } - remove(session) { - this.sessions = this.sessions.filter((s) => s !== session); - } - [Symbol.iterator]() { - return this.sessions[Symbol.iterator](); - } - destroy(connection) { - for (const session of this.sessions) { - if (session === connection) { - if (!session.destroyed) { - session.destroy(); + return _aliases; + }, "getAllAliases"); + var getMiddlewareNameWithAliases = /* @__PURE__ */ __name((name, aliases) => { + return `${name || "anonymous"}${aliases && aliases.length > 0 ? ` (a.k.a. ${aliases.join(",")})` : ""}`; + }, "getMiddlewareNameWithAliases"); + var constructStack = /* @__PURE__ */ __name(() => { + let absoluteEntries = []; + let relativeEntries = []; + let identifyOnResolve = false; + const entriesNameSet = /* @__PURE__ */ new Set(); + const sort = /* @__PURE__ */ __name((entries) => entries.sort( + (a, b) => stepWeights[b.step] - stepWeights[a.step] || priorityWeights[b.priority || "normal"] - priorityWeights[a.priority || "normal"] + ), "sort"); + const removeByName = /* @__PURE__ */ __name((toRemove) => { + let isRemoved = false; + const filterCb = /* @__PURE__ */ __name((entry) => { + const aliases = getAllAliases(entry.name, entry.aliases); + if (aliases.includes(toRemove)) { + isRemoved = true; + for (const alias of aliases) { + entriesNameSet.delete(alias); } + return false; } - } - } - }; - __name(_NodeHttp2ConnectionPool, "NodeHttp2ConnectionPool"); - var NodeHttp2ConnectionPool = _NodeHttp2ConnectionPool; - var _NodeHttp2ConnectionManager = class _NodeHttp2ConnectionManager { - constructor(config) { - this.sessionCache = /* @__PURE__ */ new Map(); - this.config = config; - if (this.config.maxConcurrency && this.config.maxConcurrency <= 0) { - throw new RangeError("maxConcurrency must be greater than zero."); - } - } - lease(requestContext, connectionConfiguration) { - const url2 = this.getUrlString(requestContext); - const existingPool = this.sessionCache.get(url2); - if (existingPool) { - const existingSession = existingPool.poll(); - if (existingSession && !this.config.disableConcurrency) { - return existingSession; - } - } - const session = import_http23.default.connect(url2); - if (this.config.maxConcurrency) { - session.settings({ maxConcurrentStreams: this.config.maxConcurrency }, (err) => { - if (err) { - throw new Error( - "Fail to set maxConcurrentStreams to " + this.config.maxConcurrency + "when creating new session for " + requestContext.destination.toString() - ); - } - }); - } - session.unref(); - const destroySessionCb = /* @__PURE__ */ __name(() => { - session.destroy(); - this.deleteSession(url2, session); - }, "destroySessionCb"); - session.on("goaway", destroySessionCb); - session.on("error", destroySessionCb); - session.on("frameError", destroySessionCb); - session.on("close", () => this.deleteSession(url2, session)); - if (connectionConfiguration.requestTimeout) { - session.setTimeout(connectionConfiguration.requestTimeout, destroySessionCb); - } - const connectionPool = this.sessionCache.get(url2) || new NodeHttp2ConnectionPool(); - connectionPool.offerLast(session); - this.sessionCache.set(url2, connectionPool); - return session; - } - /** - * Delete a session from the connection pool. - * @param authority The authority of the session to delete. - * @param session The session to delete. - */ - deleteSession(authority, session) { - const existingConnectionPool = this.sessionCache.get(authority); - if (!existingConnectionPool) { - return; - } - if (!existingConnectionPool.contains(session)) { - return; - } - existingConnectionPool.remove(session); - this.sessionCache.set(authority, existingConnectionPool); - } - release(requestContext, session) { - var _a; - const cacheKey = this.getUrlString(requestContext); - (_a = this.sessionCache.get(cacheKey)) == null ? void 0 : _a.offerLast(session); - } - destroy() { - for (const [key, connectionPool] of this.sessionCache) { - for (const session of connectionPool) { - if (!session.destroyed) { - session.destroy(); + return true; + }, "filterCb"); + absoluteEntries = absoluteEntries.filter(filterCb); + relativeEntries = relativeEntries.filter(filterCb); + return isRemoved; + }, "removeByName"); + const removeByReference = /* @__PURE__ */ __name((toRemove) => { + let isRemoved = false; + const filterCb = /* @__PURE__ */ __name((entry) => { + if (entry.middleware === toRemove) { + isRemoved = true; + for (const alias of getAllAliases(entry.name, entry.aliases)) { + entriesNameSet.delete(alias); } - connectionPool.remove(session); - } - this.sessionCache.delete(key); - } - } - setMaxConcurrentStreams(maxConcurrentStreams) { - if (this.config.maxConcurrency && this.config.maxConcurrency <= 0) { - throw new RangeError("maxConcurrentStreams must be greater than zero."); - } - this.config.maxConcurrency = maxConcurrentStreams; - } - setDisableConcurrentStreams(disableConcurrentStreams) { - this.config.disableConcurrency = disableConcurrentStreams; - } - getUrlString(request2) { - return request2.destination.toString(); - } - }; - __name(_NodeHttp2ConnectionManager, "NodeHttp2ConnectionManager"); - var NodeHttp2ConnectionManager = _NodeHttp2ConnectionManager; - var _NodeHttp2Handler = class _NodeHttp2Handler2 { - constructor(options) { - this.metadata = { handlerProtocol: "h2" }; - this.connectionManager = new NodeHttp2ConnectionManager({}); - this.configProvider = new Promise((resolve, reject) => { - if (typeof options === "function") { - options().then((opts) => { - resolve(opts || {}); - }).catch(reject); - } else { - resolve(options || {}); - } - }); - } - /** - * @returns the input if it is an HttpHandler of any class, - * or instantiates a new instance of this handler. - */ - static create(instanceOrOptions) { - if (typeof (instanceOrOptions == null ? void 0 : instanceOrOptions.handle) === "function") { - return instanceOrOptions; - } - return new _NodeHttp2Handler2(instanceOrOptions); - } - destroy() { - this.connectionManager.destroy(); - } - async handle(request2, { abortSignal } = {}) { - if (!this.config) { - this.config = await this.configProvider; - this.connectionManager.setDisableConcurrentStreams(this.config.disableConcurrentStreams || false); - if (this.config.maxConcurrentStreams) { - this.connectionManager.setMaxConcurrentStreams(this.config.maxConcurrentStreams); + return false; } - } - const { requestTimeout, disableConcurrentStreams } = this.config; - return new Promise((_resolve, _reject) => { - var _a; - let fulfilled = false; - let writeRequestBodyPromise = void 0; - const resolve = /* @__PURE__ */ __name(async (arg) => { - await writeRequestBodyPromise; - _resolve(arg); - }, "resolve"); - const reject = /* @__PURE__ */ __name(async (arg) => { - await writeRequestBodyPromise; - _reject(arg); - }, "reject"); - if (abortSignal == null ? void 0 : abortSignal.aborted) { - fulfilled = true; - const abortError = new Error("Request aborted"); - abortError.name = "AbortError"; - reject(abortError); - return; + return true; + }, "filterCb"); + absoluteEntries = absoluteEntries.filter(filterCb); + relativeEntries = relativeEntries.filter(filterCb); + return isRemoved; + }, "removeByReference"); + const cloneTo = /* @__PURE__ */ __name((toStack) => { + var _a; + absoluteEntries.forEach((entry) => { + toStack.add(entry.middleware, { ...entry }); + }); + relativeEntries.forEach((entry) => { + toStack.addRelativeTo(entry.middleware, { ...entry }); + }); + (_a = toStack.identifyOnResolve) == null ? void 0 : _a.call(toStack, stack.identifyOnResolve()); + return toStack; + }, "cloneTo"); + const expandRelativeMiddlewareList = /* @__PURE__ */ __name((from) => { + const expandedMiddlewareList = []; + from.before.forEach((entry) => { + if (entry.before.length === 0 && entry.after.length === 0) { + expandedMiddlewareList.push(entry); + } else { + expandedMiddlewareList.push(...expandRelativeMiddlewareList(entry)); } - const { hostname, method, port, protocol, query } = request2; - let auth = ""; - if (request2.username != null || request2.password != null) { - const username = request2.username ?? ""; - const password = request2.password ?? ""; - auth = `${username}:${password}@`; + }); + expandedMiddlewareList.push(from); + from.after.reverse().forEach((entry) => { + if (entry.before.length === 0 && entry.after.length === 0) { + expandedMiddlewareList.push(entry); + } else { + expandedMiddlewareList.push(...expandRelativeMiddlewareList(entry)); } - const authority = `${protocol}//${auth}${hostname}${port ? `:${port}` : ""}`; - const requestContext = { destination: new URL(authority) }; - const session = this.connectionManager.lease(requestContext, { - requestTimeout: (_a = this.config) == null ? void 0 : _a.sessionTimeout, - disableConcurrentStreams: disableConcurrentStreams || false - }); - const rejectWithDestroy = /* @__PURE__ */ __name((err) => { - if (disableConcurrentStreams) { - this.destroySession(session); - } - fulfilled = true; - reject(err); - }, "rejectWithDestroy"); - const queryString = (0, import_querystring_builder.buildQueryString)(query || {}); - let path = request2.path; - if (queryString) { - path += `?${queryString}`; + }); + return expandedMiddlewareList; + }, "expandRelativeMiddlewareList"); + const getMiddlewareList = /* @__PURE__ */ __name((debug = false) => { + const normalizedAbsoluteEntries = []; + const normalizedRelativeEntries = []; + const normalizedEntriesNameMap = {}; + absoluteEntries.forEach((entry) => { + const normalizedEntry = { + ...entry, + before: [], + after: [] + }; + for (const alias of getAllAliases(normalizedEntry.name, normalizedEntry.aliases)) { + normalizedEntriesNameMap[alias] = normalizedEntry; } - if (request2.fragment) { - path += `#${request2.fragment}`; + normalizedAbsoluteEntries.push(normalizedEntry); + }); + relativeEntries.forEach((entry) => { + const normalizedEntry = { + ...entry, + before: [], + after: [] + }; + for (const alias of getAllAliases(normalizedEntry.name, normalizedEntry.aliases)) { + normalizedEntriesNameMap[alias] = normalizedEntry; } - const req = session.request({ - ...request2.headers, - [import_http22.constants.HTTP2_HEADER_PATH]: path, - [import_http22.constants.HTTP2_HEADER_METHOD]: method - }); - session.ref(); - req.on("response", (headers) => { - const httpResponse = new import_protocol_http.HttpResponse({ - statusCode: headers[":status"] || -1, - headers: getTransformedHeaders(headers), - body: req - }); - fulfilled = true; - resolve({ response: httpResponse }); - if (disableConcurrentStreams) { - session.close(); - this.connectionManager.deleteSession(authority, session); + normalizedRelativeEntries.push(normalizedEntry); + }); + normalizedRelativeEntries.forEach((entry) => { + if (entry.toMiddleware) { + const toMiddleware = normalizedEntriesNameMap[entry.toMiddleware]; + if (toMiddleware === void 0) { + if (debug) { + return; + } + throw new Error( + `${entry.toMiddleware} is not found when adding ${getMiddlewareNameWithAliases(entry.name, entry.aliases)} middleware ${entry.relation} ${entry.toMiddleware}` + ); + } + if (entry.relation === "after") { + toMiddleware.after.push(entry); + } + if (entry.relation === "before") { + toMiddleware.before.push(entry); } - }); - if (requestTimeout) { - req.setTimeout(requestTimeout, () => { - req.close(); - const timeoutError = new Error(`Stream timed out because of no activity for ${requestTimeout} ms`); - timeoutError.name = "TimeoutError"; - rejectWithDestroy(timeoutError); - }); } - if (abortSignal) { - abortSignal.onabort = () => { - req.close(); - const abortError = new Error("Request aborted"); - abortError.name = "AbortError"; - rejectWithDestroy(abortError); - }; + }); + const mainChain = sort(normalizedAbsoluteEntries).map(expandRelativeMiddlewareList).reduce( + (wholeList, expandedMiddlewareList) => { + wholeList.push(...expandedMiddlewareList); + return wholeList; + }, + [] + ); + return mainChain; + }, "getMiddlewareList"); + const stack = { + add: (middleware, options = {}) => { + const { name, override, aliases: _aliases } = options; + const entry = { + step: "initialize", + priority: "normal", + middleware, + ...options + }; + const aliases = getAllAliases(name, _aliases); + if (aliases.length > 0) { + if (aliases.some((alias) => entriesNameSet.has(alias))) { + if (!override) + throw new Error(`Duplicate middleware name '${getMiddlewareNameWithAliases(name, _aliases)}'`); + for (const alias of aliases) { + const toOverrideIndex = absoluteEntries.findIndex( + (entry2) => { + var _a; + return entry2.name === alias || ((_a = entry2.aliases) == null ? void 0 : _a.some((a) => a === alias)); + } + ); + if (toOverrideIndex === -1) { + continue; + } + const toOverride = absoluteEntries[toOverrideIndex]; + if (toOverride.step !== entry.step || entry.priority !== toOverride.priority) { + throw new Error( + `"${getMiddlewareNameWithAliases(toOverride.name, toOverride.aliases)}" middleware with ${toOverride.priority} priority in ${toOverride.step} step cannot be overridden by "${getMiddlewareNameWithAliases(name, _aliases)}" middleware with ${entry.priority} priority in ${entry.step} step.` + ); + } + absoluteEntries.splice(toOverrideIndex, 1); + } + } + for (const alias of aliases) { + entriesNameSet.add(alias); + } } - req.on("frameError", (type, code, id) => { - rejectWithDestroy(new Error(`Frame type id ${type} in stream id ${id} has failed with code ${code}.`)); - }); - req.on("error", rejectWithDestroy); - req.on("aborted", () => { - rejectWithDestroy( - new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${req.rstCode}.`) - ); - }); - req.on("close", () => { - session.unref(); - if (disableConcurrentStreams) { - session.destroy(); + absoluteEntries.push(entry); + }, + addRelativeTo: (middleware, options) => { + const { name, override, aliases: _aliases } = options; + const entry = { + middleware, + ...options + }; + const aliases = getAllAliases(name, _aliases); + if (aliases.length > 0) { + if (aliases.some((alias) => entriesNameSet.has(alias))) { + if (!override) + throw new Error(`Duplicate middleware name '${getMiddlewareNameWithAliases(name, _aliases)}'`); + for (const alias of aliases) { + const toOverrideIndex = relativeEntries.findIndex( + (entry2) => { + var _a; + return entry2.name === alias || ((_a = entry2.aliases) == null ? void 0 : _a.some((a) => a === alias)); + } + ); + if (toOverrideIndex === -1) { + continue; + } + const toOverride = relativeEntries[toOverrideIndex]; + if (toOverride.toMiddleware !== entry.toMiddleware || toOverride.relation !== entry.relation) { + throw new Error( + `"${getMiddlewareNameWithAliases(toOverride.name, toOverride.aliases)}" middleware ${toOverride.relation} "${toOverride.toMiddleware}" middleware cannot be overridden by "${getMiddlewareNameWithAliases(name, _aliases)}" middleware ${entry.relation} "${entry.toMiddleware}" middleware.` + ); + } + relativeEntries.splice(toOverrideIndex, 1); + } } - if (!fulfilled) { - rejectWithDestroy(new Error("Unexpected error: http2 request did not get a response")); + for (const alias of aliases) { + entriesNameSet.add(alias); + } + } + relativeEntries.push(entry); + }, + clone: () => cloneTo(constructStack()), + use: (plugin) => { + plugin.applyToStack(stack); + }, + remove: (toRemove) => { + if (typeof toRemove === "string") + return removeByName(toRemove); + else + return removeByReference(toRemove); + }, + removeByTag: (toRemove) => { + let isRemoved = false; + const filterCb = /* @__PURE__ */ __name((entry) => { + const { tags, name, aliases: _aliases } = entry; + if (tags && tags.includes(toRemove)) { + const aliases = getAllAliases(name, _aliases); + for (const alias of aliases) { + entriesNameSet.delete(alias); + } + isRemoved = true; + return false; } + return true; + }, "filterCb"); + absoluteEntries = absoluteEntries.filter(filterCb); + relativeEntries = relativeEntries.filter(filterCb); + return isRemoved; + }, + concat: (from) => { + var _a; + const cloned = cloneTo(constructStack()); + cloned.use(from); + cloned.identifyOnResolve( + identifyOnResolve || cloned.identifyOnResolve() || (((_a = from.identifyOnResolve) == null ? void 0 : _a.call(from)) ?? false) + ); + return cloned; + }, + applyToStack: cloneTo, + identify: () => { + return getMiddlewareList(true).map((mw) => { + const step = mw.step ?? mw.relation + " " + mw.toMiddleware; + return getMiddlewareNameWithAliases(mw.name, mw.aliases) + " - " + step; }); - writeRequestBodyPromise = writeRequestBody(req, request2, requestTimeout); - }); - } - updateHttpClientConfig(key, value) { - this.config = void 0; - this.configProvider = this.configProvider.then((config) => { - return { - ...config, - [key]: value - }; - }); - } - httpHandlerConfigs() { - return this.config ?? {}; - } - /** - * Destroys a session. - * @param session The session to destroy. - */ - destroySession(session) { - if (!session.destroyed) { - session.destroy(); + }, + identifyOnResolve(toggle) { + if (typeof toggle === "boolean") + identifyOnResolve = toggle; + return identifyOnResolve; + }, + resolve: (handler2, context) => { + for (const middleware of getMiddlewareList().map((entry) => entry.middleware).reverse()) { + handler2 = middleware(handler2, context); + } + if (identifyOnResolve) { + console.log(stack.identify()); + } + return handler2; } - } + }; + return stack; + }, "constructStack"); + var stepWeights = { + initialize: 5, + serialize: 4, + build: 3, + finalizeRequest: 2, + deserialize: 1 }; - __name(_NodeHttp2Handler, "NodeHttp2Handler"); - var NodeHttp2Handler = _NodeHttp2Handler; - var _Collector = class _Collector extends import_stream.Writable { - constructor() { - super(...arguments); - this.bufferedBytes = []; + var priorityWeights = { + high: 3, + normal: 2, + low: 1 + }; + } +}); + +// ../../../node_modules/@smithy/is-array-buffer/dist-cjs/index.js +var require_dist_cjs26 = __commonJS({ + "../../../node_modules/@smithy/is-array-buffer/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all) => { + for (var name in all) + __defProp2(target, name, { get: all[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); } - _write(chunk, encoding, callback) { - this.bufferedBytes.push(chunk); - callback(); + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + isArrayBuffer: () => isArrayBuffer + }); + module2.exports = __toCommonJS2(src_exports); + var isArrayBuffer = /* @__PURE__ */ __name((arg) => typeof ArrayBuffer === "function" && arg instanceof ArrayBuffer || Object.prototype.toString.call(arg) === "[object ArrayBuffer]", "isArrayBuffer"); + } +}); + +// ../../../node_modules/@smithy/util-buffer-from/dist-cjs/index.js +var require_dist_cjs27 = __commonJS({ + "../../../node_modules/@smithy/util-buffer-from/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all) => { + for (var name in all) + __defProp2(target, name, { get: all[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); } + return to; }; - __name(_Collector, "Collector"); - var Collector = _Collector; - var streamCollector = /* @__PURE__ */ __name((stream) => new Promise((resolve, reject) => { - const collector = new Collector(); - stream.pipe(collector); - stream.on("error", (err) => { - collector.end(); - reject(err); - }); - collector.on("error", reject); - collector.on("finish", function() { - const bytes = new Uint8Array(Buffer.concat(this.bufferedBytes)); - resolve(bytes); - }); - }), "streamCollector"); + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + fromArrayBuffer: () => fromArrayBuffer, + fromString: () => fromString + }); + module2.exports = __toCommonJS2(src_exports); + var import_is_array_buffer = require_dist_cjs26(); + var import_buffer = require("buffer"); + var fromArrayBuffer = /* @__PURE__ */ __name((input, offset = 0, length = input.byteLength - offset) => { + if (!(0, import_is_array_buffer.isArrayBuffer)(input)) { + throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof input} (${input})`); + } + return import_buffer.Buffer.from(input, offset, length); + }, "fromArrayBuffer"); + var fromString = /* @__PURE__ */ __name((input, encoding) => { + if (typeof input !== "string") { + throw new TypeError(`The "input" argument must be of type string. Received type ${typeof input} (${input})`); + } + return encoding ? import_buffer.Buffer.from(input, encoding) : import_buffer.Buffer.from(input); + }, "fromString"); } }); -// ../../../node_modules/@smithy/util-stream/dist-cjs/sdk-stream-mixin.js -var require_sdk_stream_mixin = __commonJS({ - "../../../node_modules/@smithy/util-stream/dist-cjs/sdk-stream-mixin.js"(exports2) { +// ../../../node_modules/@smithy/util-base64/dist-cjs/fromBase64.js +var require_fromBase64 = __commonJS({ + "../../../node_modules/@smithy/util-base64/dist-cjs/fromBase64.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.sdkStreamMixin = void 0; - var node_http_handler_1 = require_dist_cjs32(); - var util_buffer_from_1 = require_dist_cjs9(); - var stream_1 = require("stream"); - var util_1 = require("util"); - var ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED = "The stream has already been transformed."; - var sdkStreamMixin2 = (stream) => { - var _a, _b; - if (!(stream instanceof stream_1.Readable)) { - const name = ((_b = (_a = stream === null || stream === void 0 ? void 0 : stream.__proto__) === null || _a === void 0 ? void 0 : _a.constructor) === null || _b === void 0 ? void 0 : _b.name) || stream; - throw new Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${name}`); + exports2.fromBase64 = void 0; + var util_buffer_from_1 = require_dist_cjs27(); + var BASE64_REGEX = /^[A-Za-z0-9+/]*={0,2}$/; + var fromBase642 = (input) => { + if (input.length * 3 % 4 !== 0) { + throw new TypeError(`Incorrect padding on base64 string.`); } - let transformed = false; - const transformToByteArray = async () => { - if (transformed) { - throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED); - } - transformed = true; - return await (0, node_http_handler_1.streamCollector)(stream); - }; - return Object.assign(stream, { - transformToByteArray, - transformToString: async (encoding) => { - const buf = await transformToByteArray(); - if (encoding === void 0 || Buffer.isEncoding(encoding)) { - return (0, util_buffer_from_1.fromArrayBuffer)(buf.buffer, buf.byteOffset, buf.byteLength).toString(encoding); - } else { - const decoder2 = new util_1.TextDecoder(encoding); - return decoder2.decode(buf); - } - }, - transformToWebStream: () => { - if (transformed) { - throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED); - } - if (stream.readableFlowing !== null) { - throw new Error("The stream has been consumed by other callbacks."); - } - if (typeof stream_1.Readable.toWeb !== "function") { - throw new Error("Readable.toWeb() is not supported. Please make sure you are using Node.js >= 17.0.0, or polyfill is available."); - } - transformed = true; - return stream_1.Readable.toWeb(stream); - } - }); + if (!BASE64_REGEX.exec(input)) { + throw new TypeError(`Invalid base64 string.`); + } + const buffer = (0, util_buffer_from_1.fromString)(input, "base64"); + return new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength); }; - exports2.sdkStreamMixin = sdkStreamMixin2; + exports2.fromBase64 = fromBase642; } }); -// ../../../node_modules/@smithy/util-stream/dist-cjs/index.js -var require_dist_cjs33 = __commonJS({ - "../../../node_modules/@smithy/util-stream/dist-cjs/index.js"(exports2, module2) { +// ../../../node_modules/@smithy/util-utf8/dist-cjs/index.js +var require_dist_cjs28 = __commonJS({ + "../../../node_modules/@smithy/util-utf8/dist-cjs/index.js"(exports2, module2) { var __defProp2 = Object.defineProperty; var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; var __getOwnPropNames2 = Object.getOwnPropertyNames; @@ -7638,77 +5461,71 @@ var require_dist_cjs33 = __commonJS({ } return to; }; - var __reExport = (target, mod, secondTarget) => (__copyProps2(target, mod, "default"), secondTarget && __copyProps2(secondTarget, mod, "default")); var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); var src_exports = {}; __export2(src_exports, { - Uint8ArrayBlobAdapter: () => Uint8ArrayBlobAdapter + fromUtf8: () => fromUtf8, + toUint8Array: () => toUint8Array, + toUtf8: () => toUtf8 }); module2.exports = __toCommonJS2(src_exports); - var import_util_base64 = require_dist_cjs30(); - var import_util_utf8 = require_dist_cjs10(); - function transformToString(payload, encoding = "utf-8") { - if (encoding === "base64") { - return (0, import_util_base64.toBase64)(payload); + var import_util_buffer_from = require_dist_cjs27(); + var fromUtf8 = /* @__PURE__ */ __name((input) => { + const buf = (0, import_util_buffer_from.fromString)(input, "utf8"); + return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength / Uint8Array.BYTES_PER_ELEMENT); + }, "fromUtf8"); + var toUint8Array = /* @__PURE__ */ __name((data) => { + if (typeof data === "string") { + return fromUtf8(data); } - return (0, import_util_utf8.toUtf8)(payload); - } - __name(transformToString, "transformToString"); - function transformFromString(str, encoding) { - if (encoding === "base64") { - return Uint8ArrayBlobAdapter.mutate((0, import_util_base64.fromBase64)(str)); + if (ArrayBuffer.isView(data)) { + return new Uint8Array(data.buffer, data.byteOffset, data.byteLength / Uint8Array.BYTES_PER_ELEMENT); } - return Uint8ArrayBlobAdapter.mutate((0, import_util_utf8.fromUtf8)(str)); - } - __name(transformFromString, "transformFromString"); - var _Uint8ArrayBlobAdapter = class _Uint8ArrayBlobAdapter2 extends Uint8Array { - /** - * @param source - such as a string or Stream. - * @returns a new Uint8ArrayBlobAdapter extending Uint8Array. - */ - static fromString(source, encoding = "utf-8") { - switch (typeof source) { - case "string": - return transformFromString(source, encoding); - default: - throw new Error(`Unsupported conversion from ${typeof source} to Uint8ArrayBlobAdapter.`); - } + return new Uint8Array(data); + }, "toUint8Array"); + var toUtf8 = /* @__PURE__ */ __name((input) => { + if (typeof input === "string") { + return input; } - /** - * @param source - Uint8Array to be mutated. - * @returns the same Uint8Array but with prototype switched to Uint8ArrayBlobAdapter. - */ - static mutate(source) { - Object.setPrototypeOf(source, _Uint8ArrayBlobAdapter2.prototype); - return source; + if (typeof input !== "object" || typeof input.byteOffset !== "number" || typeof input.byteLength !== "number") { + throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array."); } - /** - * @param encoding - default 'utf-8'. - * @returns the blob as string. - */ - transformToString(encoding = "utf-8") { - return transformToString(this, encoding); + return (0, import_util_buffer_from.fromArrayBuffer)(input.buffer, input.byteOffset, input.byteLength).toString("utf8"); + }, "toUtf8"); + } +}); + +// ../../../node_modules/@smithy/util-base64/dist-cjs/toBase64.js +var require_toBase64 = __commonJS({ + "../../../node_modules/@smithy/util-base64/dist-cjs/toBase64.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.toBase64 = void 0; + var util_buffer_from_1 = require_dist_cjs27(); + var util_utf8_1 = require_dist_cjs28(); + var toBase642 = (_input) => { + let input; + if (typeof _input === "string") { + input = (0, util_utf8_1.fromUtf8)(_input); + } else { + input = _input; + } + if (typeof input !== "object" || typeof input.byteOffset !== "number" || typeof input.byteLength !== "number") { + throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array."); } + return (0, util_buffer_from_1.fromArrayBuffer)(input.buffer, input.byteOffset, input.byteLength).toString("base64"); }; - __name(_Uint8ArrayBlobAdapter, "Uint8ArrayBlobAdapter"); - var Uint8ArrayBlobAdapter = _Uint8ArrayBlobAdapter; - __reExport(src_exports, require_getAwsChunkedEncodingStream(), module2.exports); - __reExport(src_exports, require_sdk_stream_mixin(), module2.exports); + exports2.toBase64 = toBase642; } }); -// ../../../node_modules/@smithy/smithy-client/dist-cjs/index.js -var require_dist_cjs34 = __commonJS({ - "../../../node_modules/@smithy/smithy-client/dist-cjs/index.js"(exports2, module2) { +// ../../../node_modules/@smithy/util-base64/dist-cjs/index.js +var require_dist_cjs29 = __commonJS({ + "../../../node_modules/@smithy/util-base64/dist-cjs/index.js"(exports2, module2) { var __defProp2 = Object.defineProperty; var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; var __getOwnPropNames2 = Object.getOwnPropertyNames; var __hasOwnProp2 = Object.prototype.hasOwnProperty; - var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); - var __export2 = (target, all) => { - for (var name in all) - __defProp2(target, name, { get: all[name], enumerable: true }); - }; var __copyProps2 = (to, from, except, desc) => { if (from && typeof from === "object" || typeof from === "function") { for (let key of __getOwnPropNames2(from)) @@ -7717,11293 +5534,13107 @@ var require_dist_cjs34 = __commonJS({ } return to; }; + var __reExport = (target, mod, secondTarget) => (__copyProps2(target, mod, "default"), secondTarget && __copyProps2(secondTarget, mod, "default")); var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); var src_exports = {}; - __export2(src_exports, { - Client: () => Client, - Command: () => Command, - LazyJsonString: () => LazyJsonString, - NoOpLogger: () => NoOpLogger, - SENSITIVE_STRING: () => SENSITIVE_STRING, - ServiceException: () => ServiceException, - StringWrapper: () => StringWrapper, - _json: () => _json, - collectBody: () => collectBody, - convertMap: () => convertMap, - createAggregatedClient: () => createAggregatedClient, - dateToUtcString: () => dateToUtcString, - decorateServiceException: () => decorateServiceException, - emitWarningIfUnsupportedVersion: () => emitWarningIfUnsupportedVersion, - expectBoolean: () => expectBoolean, - expectByte: () => expectByte, - expectFloat32: () => expectFloat32, - expectInt: () => expectInt, - expectInt32: () => expectInt32, - expectLong: () => expectLong, - expectNonNull: () => expectNonNull, - expectNumber: () => expectNumber, - expectObject: () => expectObject, - expectShort: () => expectShort, - expectString: () => expectString, - expectUnion: () => expectUnion, - extendedEncodeURIComponent: () => extendedEncodeURIComponent, - getArrayIfSingleItem: () => getArrayIfSingleItem, - getDefaultClientConfiguration: () => getDefaultClientConfiguration, - getDefaultExtensionConfiguration: () => getDefaultExtensionConfiguration, - getValueFromTextNode: () => getValueFromTextNode, - handleFloat: () => handleFloat, - limitedParseDouble: () => limitedParseDouble, - limitedParseFloat: () => limitedParseFloat, - limitedParseFloat32: () => limitedParseFloat32, - loadConfigsForDefaultMode: () => loadConfigsForDefaultMode, - logger: () => logger, - map: () => map, - parseBoolean: () => parseBoolean, - parseEpochTimestamp: () => parseEpochTimestamp, - parseRfc3339DateTime: () => parseRfc3339DateTime, - parseRfc3339DateTimeWithOffset: () => parseRfc3339DateTimeWithOffset, - parseRfc7231DateTime: () => parseRfc7231DateTime, - resolveDefaultRuntimeConfig: () => resolveDefaultRuntimeConfig, - resolvedPath: () => resolvedPath, - serializeFloat: () => serializeFloat, - splitEvery: () => splitEvery, - strictParseByte: () => strictParseByte, - strictParseDouble: () => strictParseDouble, - strictParseFloat: () => strictParseFloat, - strictParseFloat32: () => strictParseFloat32, - strictParseInt: () => strictParseInt, - strictParseInt32: () => strictParseInt32, - strictParseLong: () => strictParseLong, - strictParseShort: () => strictParseShort, - take: () => take, - throwDefaultError: () => throwDefaultError, - withBaseException: () => withBaseException - }); module2.exports = __toCommonJS2(src_exports); - var _NoOpLogger = class _NoOpLogger { - trace() { - } - debug() { - } - info() { - } - warn() { - } - error() { - } - }; - __name(_NoOpLogger, "NoOpLogger"); - var NoOpLogger = _NoOpLogger; - var import_middleware_stack = require_dist_cjs29(); - var _Client = class _Client { - constructor(config) { - this.middlewareStack = (0, import_middleware_stack.constructStack)(); - this.config = config; - } - send(command, optionsOrCb, cb) { - const options = typeof optionsOrCb !== "function" ? optionsOrCb : void 0; - const callback = typeof optionsOrCb === "function" ? optionsOrCb : cb; - const handler2 = command.resolveMiddleware(this.middlewareStack, this.config, options); - if (callback) { - handler2(command).then( - (result) => callback(null, result.output), - (err) => callback(err) - ).catch( - // prevent any errors thrown in the callback from triggering an - // unhandled promise rejection - () => { - } - ); - } else { - return handler2(command).then((result) => result.output); - } - } - destroy() { - if (this.config.requestHandler.destroy) - this.config.requestHandler.destroy(); - } - }; - __name(_Client, "Client"); - var Client = _Client; - var import_util_stream = require_dist_cjs33(); - var collectBody = /* @__PURE__ */ __name(async (streamBody = new Uint8Array(), context) => { - if (streamBody instanceof Uint8Array) { - return import_util_stream.Uint8ArrayBlobAdapter.mutate(streamBody); - } - if (!streamBody) { - return import_util_stream.Uint8ArrayBlobAdapter.mutate(new Uint8Array()); - } - const fromContext = context.streamCollector(streamBody); - return import_util_stream.Uint8ArrayBlobAdapter.mutate(await fromContext); - }, "collectBody"); - var import_types = require_dist_cjs(); - var _Command = class _Command { - constructor() { - this.middlewareStack = (0, import_middleware_stack.constructStack)(); - } - /** - * Factory for Command ClassBuilder. - * @internal - */ - static classBuilder() { - return new ClassBuilder(); - } - /** - * @internal - */ - resolveMiddlewareWithContext(clientStack, configuration, options, { - middlewareFn, - clientName, - commandName, - inputFilterSensitiveLog, - outputFilterSensitiveLog, - smithyContext, - additionalContext, - CommandCtor - }) { - for (const mw of middlewareFn.bind(this)(CommandCtor, clientStack, configuration, options)) { - this.middlewareStack.use(mw); + __reExport(src_exports, require_fromBase64(), module2.exports); + __reExport(src_exports, require_toBase64(), module2.exports); + } +}); + +// ../../../node_modules/@smithy/smithy-client/node_modules/@smithy/util-stream/dist-cjs/getAwsChunkedEncodingStream.js +var require_getAwsChunkedEncodingStream = __commonJS({ + "../../../node_modules/@smithy/smithy-client/node_modules/@smithy/util-stream/dist-cjs/getAwsChunkedEncodingStream.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getAwsChunkedEncodingStream = void 0; + var stream_1 = require("stream"); + var getAwsChunkedEncodingStream2 = (readableStream, options) => { + const { base64Encoder, bodyLengthChecker, checksumAlgorithmFn, checksumLocationName, streamHasher } = options; + const checksumRequired = base64Encoder !== void 0 && checksumAlgorithmFn !== void 0 && checksumLocationName !== void 0 && streamHasher !== void 0; + const digest = checksumRequired ? streamHasher(checksumAlgorithmFn, readableStream) : void 0; + const awsChunkedEncodingStream = new stream_1.Readable({ read: () => { + } }); + readableStream.on("data", (data) => { + const length = bodyLengthChecker(data) || 0; + awsChunkedEncodingStream.push(`${length.toString(16)}\r +`); + awsChunkedEncodingStream.push(data); + awsChunkedEncodingStream.push("\r\n"); + }); + readableStream.on("end", async () => { + awsChunkedEncodingStream.push(`0\r +`); + if (checksumRequired) { + const checksum = base64Encoder(await digest); + awsChunkedEncodingStream.push(`${checksumLocationName}:${checksum}\r +`); + awsChunkedEncodingStream.push(`\r +`); } - const stack = clientStack.concat(this.middlewareStack); - const { logger: logger2 } = configuration; - const handlerExecutionContext = { - logger: logger2, - clientName, - commandName, - inputFilterSensitiveLog, - outputFilterSensitiveLog, - [import_types.SMITHY_CONTEXT_KEY]: { - ...smithyContext - }, - ...additionalContext - }; - const { requestHandler } = configuration; - return stack.resolve( - (request2) => requestHandler.handle(request2.request, options || {}), - handlerExecutionContext - ); - } + awsChunkedEncodingStream.push(null); + }); + return awsChunkedEncodingStream; }; - __name(_Command, "Command"); - var Command = _Command; - var _ClassBuilder = class _ClassBuilder { - constructor() { - this._init = () => { - }; - this._ep = {}; - this._middlewareFn = () => []; - this._commandName = ""; - this._clientName = ""; - this._additionalContext = {}; - this._smithyContext = {}; - this._inputFilterSensitiveLog = (_) => _; - this._outputFilterSensitiveLog = (_) => _; - this._serializer = null; - this._deserializer = null; - } - /** - * Optional init callback. - */ - init(cb) { - this._init = cb; + exports2.getAwsChunkedEncodingStream = getAwsChunkedEncodingStream2; + } +}); + +// ../../../node_modules/@smithy/smithy-client/node_modules/@smithy/protocol-http/dist-cjs/index.js +var require_dist_cjs30 = __commonJS({ + "../../../node_modules/@smithy/smithy-client/node_modules/@smithy/protocol-http/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all) => { + for (var name in all) + __defProp2(target, name, { get: all[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); } - /** - * Set the endpoint parameter instructions. - */ - ep(endpointParameterInstructions) { - this._ep = endpointParameterInstructions; - return this; + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + Field: () => Field, + Fields: () => Fields, + HttpRequest: () => HttpRequest7, + HttpResponse: () => HttpResponse2, + IHttpRequest: () => import_types5.HttpRequest, + getHttpHandlerExtensionConfiguration: () => getHttpHandlerExtensionConfiguration, + isValidHostname: () => isValidHostname, + resolveHttpHandlerRuntimeConfig: () => resolveHttpHandlerRuntimeConfig + }); + module2.exports = __toCommonJS2(src_exports); + var getHttpHandlerExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => { + let httpHandler = runtimeConfig.httpHandler; + return { + setHttpHandler(handler2) { + httpHandler = handler2; + }, + httpHandler() { + return httpHandler; + }, + updateHttpClientConfig(key, value) { + httpHandler.updateHttpClientConfig(key, value); + }, + httpHandlerConfigs() { + return httpHandler.httpHandlerConfigs(); + } + }; + }, "getHttpHandlerExtensionConfiguration"); + var resolveHttpHandlerRuntimeConfig = /* @__PURE__ */ __name((httpHandlerExtensionConfiguration) => { + return { + httpHandler: httpHandlerExtensionConfiguration.httpHandler() + }; + }, "resolveHttpHandlerRuntimeConfig"); + var import_types5 = require_dist_cjs(); + var _Field = class _Field { + constructor({ name, kind = import_types5.FieldPosition.HEADER, values = [] }) { + this.name = name; + this.kind = kind; + this.values = values; } /** - * Add any number of middleware. + * Appends a value to the field. + * + * @param value The value to append. */ - m(middlewareSupplier) { - this._middlewareFn = middlewareSupplier; - return this; + add(value) { + this.values.push(value); } /** - * Set the initial handler execution context Smithy field. + * Overwrite existing field values. + * + * @param values The new field values. */ - s(service, operation, smithyContext = {}) { - this._smithyContext = { - service, - operation, - ...smithyContext - }; - return this; + set(values) { + this.values = values; } /** - * Set the initial handler execution context. + * Remove all matching entries from list. + * + * @param value Value to remove. */ - c(additionalContext = {}) { - this._additionalContext = additionalContext; - return this; + remove(value) { + this.values = this.values.filter((v) => v !== value); } /** - * Set constant string identifiers for the operation. + * Get comma-delimited string. + * + * @returns String representation of {@link Field}. */ - n(clientName, commandName) { - this._clientName = clientName; - this._commandName = commandName; - return this; + toString() { + return this.values.map((v) => v.includes(",") || v.includes(" ") ? `"${v}"` : v).join(", "); } /** - * Set the input and output sensistive log filters. + * Get string values as a list + * + * @returns Values in {@link Field} as a list. */ - f(inputFilter = (_) => _, outputFilter = (_) => _) { - this._inputFilterSensitiveLog = inputFilter; - this._outputFilterSensitiveLog = outputFilter; - return this; + get() { + return this.values; } - /** - * Sets the serializer. - */ - ser(serializer) { - this._serializer = serializer; - return this; + }; + __name(_Field, "Field"); + var Field = _Field; + var _Fields = class _Fields { + constructor({ fields = [], encoding = "utf-8" }) { + this.entries = {}; + fields.forEach(this.setField.bind(this)); + this.encoding = encoding; } /** - * Sets the deserializer. + * Set entry for a {@link Field} name. The `name` + * attribute will be used to key the collection. + * + * @param field The {@link Field} to set. */ - de(deserializer) { - this._deserializer = deserializer; - return this; + setField(field) { + this.entries[field.name.toLowerCase()] = field; } /** - * @returns a Command class with the classBuilder properties. + * Retrieve {@link Field} entry by name. + * + * @param name The name of the {@link Field} entry + * to retrieve + * @returns The {@link Field} if it exists. */ - build() { - var _a; - const closure = this; - let CommandRef; - return CommandRef = (_a = class extends Command { - /** - * @public - */ - constructor(...[input]) { - super(); - this.serialize = closure._serializer; - this.deserialize = closure._deserializer; - this.input = input ?? {}; - closure._init(this); - } - /** - * @public - */ - static getEndpointParameterInstructions() { - return closure._ep; - } - /** - * @internal - */ - resolveMiddleware(stack, configuration, options) { - return this.resolveMiddlewareWithContext(stack, configuration, options, { - CommandCtor: CommandRef, - middlewareFn: closure._middlewareFn, - clientName: closure._clientName, - commandName: closure._commandName, - inputFilterSensitiveLog: closure._inputFilterSensitiveLog, - outputFilterSensitiveLog: closure._outputFilterSensitiveLog, - smithyContext: closure._smithyContext, - additionalContext: closure._additionalContext - }); - } - }, __name(_a, "CommandRef"), _a); - } - }; - __name(_ClassBuilder, "ClassBuilder"); - var ClassBuilder = _ClassBuilder; - var SENSITIVE_STRING = "***SensitiveInformation***"; - var createAggregatedClient = /* @__PURE__ */ __name((commands, Client2) => { - for (const command of Object.keys(commands)) { - const CommandCtor = commands[command]; - const methodImpl = /* @__PURE__ */ __name(async function(args, optionsOrCb, cb) { - const command2 = new CommandCtor(args); - if (typeof optionsOrCb === "function") { - this.send(command2, optionsOrCb); - } else if (typeof cb === "function") { - if (typeof optionsOrCb !== "object") - throw new Error(`Expected http options but got ${typeof optionsOrCb}`); - this.send(command2, optionsOrCb || {}, cb); - } else { - return this.send(command2, optionsOrCb); - } - }, "methodImpl"); - const methodName = (command[0].toLowerCase() + command.slice(1)).replace(/Command$/, ""); - Client2.prototype[methodName] = methodImpl; - } - }, "createAggregatedClient"); - var parseBoolean = /* @__PURE__ */ __name((value) => { - switch (value) { - case "true": - return true; - case "false": - return false; - default: - throw new Error(`Unable to parse boolean value "${value}"`); - } - }, "parseBoolean"); - var expectBoolean = /* @__PURE__ */ __name((value) => { - if (value === null || value === void 0) { - return void 0; - } - if (typeof value === "number") { - if (value === 0 || value === 1) { - logger.warn(stackTraceWarning(`Expected boolean, got ${typeof value}: ${value}`)); - } - if (value === 0) { - return false; - } - if (value === 1) { - return true; - } - } - if (typeof value === "string") { - const lower = value.toLowerCase(); - if (lower === "false" || lower === "true") { - logger.warn(stackTraceWarning(`Expected boolean, got ${typeof value}: ${value}`)); - } - if (lower === "false") { - return false; - } - if (lower === "true") { - return true; - } - } - if (typeof value === "boolean") { - return value; - } - throw new TypeError(`Expected boolean, got ${typeof value}: ${value}`); - }, "expectBoolean"); - var expectNumber = /* @__PURE__ */ __name((value) => { - if (value === null || value === void 0) { - return void 0; - } - if (typeof value === "string") { - const parsed = parseFloat(value); - if (!Number.isNaN(parsed)) { - if (String(parsed) !== String(value)) { - logger.warn(stackTraceWarning(`Expected number but observed string: ${value}`)); - } - return parsed; - } + getField(name) { + return this.entries[name.toLowerCase()]; } - if (typeof value === "number") { - return value; + /** + * Delete entry from collection. + * + * @param name Name of the entry to delete. + */ + removeField(name) { + delete this.entries[name.toLowerCase()]; } - throw new TypeError(`Expected number, got ${typeof value}: ${value}`); - }, "expectNumber"); - var MAX_FLOAT = Math.ceil(2 ** 127 * (2 - 2 ** -23)); - var expectFloat32 = /* @__PURE__ */ __name((value) => { - const expected = expectNumber(value); - if (expected !== void 0 && !Number.isNaN(expected) && expected !== Infinity && expected !== -Infinity) { - if (Math.abs(expected) > MAX_FLOAT) { - throw new TypeError(`Expected 32-bit float, got ${value}`); - } + /** + * Helper function for retrieving specific types of fields. + * Used to grab all headers or all trailers. + * + * @param kind {@link FieldPosition} of entries to retrieve. + * @returns The {@link Field} entries with the specified + * {@link FieldPosition}. + */ + getByType(kind) { + return Object.values(this.entries).filter((field) => field.kind === kind); } - return expected; - }, "expectFloat32"); - var expectLong = /* @__PURE__ */ __name((value) => { - if (value === null || value === void 0) { - return void 0; + }; + __name(_Fields, "Fields"); + var Fields = _Fields; + var _HttpRequest = class _HttpRequest2 { + constructor(options) { + this.method = options.method || "GET"; + this.hostname = options.hostname || "localhost"; + this.port = options.port; + this.query = options.query || {}; + this.headers = options.headers || {}; + this.body = options.body; + this.protocol = options.protocol ? options.protocol.slice(-1) !== ":" ? `${options.protocol}:` : options.protocol : "https:"; + this.path = options.path ? options.path.charAt(0) !== "/" ? `/${options.path}` : options.path : "/"; + this.username = options.username; + this.password = options.password; + this.fragment = options.fragment; } - if (Number.isInteger(value) && !Number.isNaN(value)) { - return value; + /** + * Note: this does not deep-clone the body. + */ + static clone(request2) { + const cloned = new _HttpRequest2({ + ...request2, + headers: { ...request2.headers } + }); + if (cloned.query) { + cloned.query = cloneQuery(cloned.query); + } + return cloned; } - throw new TypeError(`Expected integer, got ${typeof value}: ${value}`); - }, "expectLong"); - var expectInt = expectLong; - var expectInt32 = /* @__PURE__ */ __name((value) => expectSizedInt(value, 32), "expectInt32"); - var expectShort = /* @__PURE__ */ __name((value) => expectSizedInt(value, 16), "expectShort"); - var expectByte = /* @__PURE__ */ __name((value) => expectSizedInt(value, 8), "expectByte"); - var expectSizedInt = /* @__PURE__ */ __name((value, size) => { - const expected = expectLong(value); - if (expected !== void 0 && castInt(expected, size) !== expected) { - throw new TypeError(`Expected ${size}-bit integer, got ${value}`); + /** + * This method only actually asserts that request is the interface {@link IHttpRequest}, + * and not necessarily this concrete class. Left in place for API stability. + * + * Do not call instance methods on the input of this function, and + * do not assume it has the HttpRequest prototype. + */ + static isInstance(request2) { + if (!request2) { + return false; + } + const req = request2; + return "method" in req && "protocol" in req && "hostname" in req && "path" in req && typeof req["query"] === "object" && typeof req["headers"] === "object"; } - return expected; - }, "expectSizedInt"); - var castInt = /* @__PURE__ */ __name((value, size) => { - switch (size) { - case 32: - return Int32Array.of(value)[0]; - case 16: - return Int16Array.of(value)[0]; - case 8: - return Int8Array.of(value)[0]; + /** + * @deprecated use static HttpRequest.clone(request) instead. It's not safe to call + * this method because {@link HttpRequest.isInstance} incorrectly + * asserts that IHttpRequest (interface) objects are of type HttpRequest (class). + */ + clone() { + return _HttpRequest2.clone(this); } - }, "castInt"); - var expectNonNull = /* @__PURE__ */ __name((value, location) => { - if (value === null || value === void 0) { - if (location) { - throw new TypeError(`Expected a non-null value for ${location}`); - } - throw new TypeError("Expected a non-null value"); + }; + __name(_HttpRequest, "HttpRequest"); + var HttpRequest7 = _HttpRequest; + function cloneQuery(query) { + return Object.keys(query).reduce((carry, paramName) => { + const param = query[paramName]; + return { + ...carry, + [paramName]: Array.isArray(param) ? [...param] : param + }; + }, {}); + } + __name(cloneQuery, "cloneQuery"); + var _HttpResponse = class _HttpResponse { + constructor(options) { + this.statusCode = options.statusCode; + this.reason = options.reason; + this.headers = options.headers || {}; + this.body = options.body; } - return value; - }, "expectNonNull"); - var expectObject = /* @__PURE__ */ __name((value) => { - if (value === null || value === void 0) { - return void 0; + static isInstance(response) { + if (!response) + return false; + const resp = response; + return typeof resp.statusCode === "number" && typeof resp.headers === "object"; } - if (typeof value === "object" && !Array.isArray(value)) { - return value; + }; + __name(_HttpResponse, "HttpResponse"); + var HttpResponse2 = _HttpResponse; + function isValidHostname(hostname) { + const hostPattern = /^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/; + return hostPattern.test(hostname); + } + __name(isValidHostname, "isValidHostname"); + } +}); + +// ../../../node_modules/@smithy/util-uri-escape/dist-cjs/index.js +var require_dist_cjs31 = __commonJS({ + "../../../node_modules/@smithy/util-uri-escape/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all) => { + for (var name in all) + __defProp2(target, name, { get: all[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); } - const receivedType = Array.isArray(value) ? "array" : typeof value; - throw new TypeError(`Expected object, got ${receivedType}: ${value}`); - }, "expectObject"); - var expectString = /* @__PURE__ */ __name((value) => { - if (value === null || value === void 0) { - return void 0; + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + escapeUri: () => escapeUri, + escapeUriPath: () => escapeUriPath + }); + module2.exports = __toCommonJS2(src_exports); + var escapeUri = /* @__PURE__ */ __name((uri) => ( + // AWS percent-encodes some extra non-standard characters in a URI + encodeURIComponent(uri).replace(/[!'()*]/g, hexEncode) + ), "escapeUri"); + var hexEncode = /* @__PURE__ */ __name((c) => `%${c.charCodeAt(0).toString(16).toUpperCase()}`, "hexEncode"); + var escapeUriPath = /* @__PURE__ */ __name((uri) => uri.split("/").map(escapeUri).join("/"), "escapeUriPath"); + } +}); + +// ../../../node_modules/@smithy/querystring-builder/dist-cjs/index.js +var require_dist_cjs32 = __commonJS({ + "../../../node_modules/@smithy/querystring-builder/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all) => { + for (var name in all) + __defProp2(target, name, { get: all[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); } - if (typeof value === "string") { - return value; + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + buildQueryString: () => buildQueryString + }); + module2.exports = __toCommonJS2(src_exports); + var import_util_uri_escape = require_dist_cjs31(); + function buildQueryString(query) { + const parts = []; + for (let key of Object.keys(query).sort()) { + const value = query[key]; + key = (0, import_util_uri_escape.escapeUri)(key); + if (Array.isArray(value)) { + for (let i = 0, iLen = value.length; i < iLen; i++) { + parts.push(`${key}=${(0, import_util_uri_escape.escapeUri)(value[i])}`); + } + } else { + let qsEntry = key; + if (value || typeof value === "string") { + qsEntry += `=${(0, import_util_uri_escape.escapeUri)(value)}`; + } + parts.push(qsEntry); + } } - if (["boolean", "number", "bigint"].includes(typeof value)) { - logger.warn(stackTraceWarning(`Expected string, got ${typeof value}: ${value}`)); - return String(value); + return parts.join("&"); + } + __name(buildQueryString, "buildQueryString"); + } +}); + +// ../../../node_modules/@smithy/smithy-client/node_modules/@smithy/node-http-handler/dist-cjs/index.js +var require_dist_cjs33 = __commonJS({ + "../../../node_modules/@smithy/smithy-client/node_modules/@smithy/node-http-handler/dist-cjs/index.js"(exports2, module2) { + var __create2 = Object.create; + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __getProtoOf2 = Object.getPrototypeOf; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all) => { + for (var name in all) + __defProp2(target, name, { get: all[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); } - throw new TypeError(`Expected string, got ${typeof value}: ${value}`); - }, "expectString"); - var expectUnion = /* @__PURE__ */ __name((value) => { - if (value === null || value === void 0) { - return void 0; + return to; + }; + var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target, + mod + )); + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + DEFAULT_REQUEST_TIMEOUT: () => DEFAULT_REQUEST_TIMEOUT, + NodeHttp2Handler: () => NodeHttp2Handler, + NodeHttpHandler: () => NodeHttpHandler, + streamCollector: () => streamCollector + }); + module2.exports = __toCommonJS2(src_exports); + var import_protocol_http8 = require_dist_cjs30(); + var import_querystring_builder = require_dist_cjs32(); + var import_http2 = require("http"); + var import_https = require("https"); + var NODEJS_TIMEOUT_ERROR_CODES = ["ECONNRESET", "EPIPE", "ETIMEDOUT"]; + var getTransformedHeaders = /* @__PURE__ */ __name((headers) => { + const transformedHeaders = {}; + for (const name of Object.keys(headers)) { + const headerValues = headers[name]; + transformedHeaders[name] = Array.isArray(headerValues) ? headerValues.join(",") : headerValues; } - const asObject = expectObject(value); - const setKeys = Object.entries(asObject).filter(([, v]) => v != null).map(([k]) => k); - if (setKeys.length === 0) { - throw new TypeError(`Unions must have exactly one non-null member. None were found.`); + return transformedHeaders; + }, "getTransformedHeaders"); + var DEFER_EVENT_LISTENER_TIME = 1e3; + var setConnectionTimeout = /* @__PURE__ */ __name((request2, reject, timeoutInMs = 0) => { + if (!timeoutInMs) { + return -1; } - if (setKeys.length > 1) { - throw new TypeError(`Unions must have exactly one non-null member. Keys ${setKeys} were not null.`); + const registerTimeout = /* @__PURE__ */ __name((offset) => { + const timeoutId = setTimeout(() => { + request2.destroy(); + reject( + Object.assign(new Error(`Socket timed out without establishing a connection within ${timeoutInMs} ms`), { + name: "TimeoutError" + }) + ); + }, timeoutInMs - offset); + const doWithSocket = /* @__PURE__ */ __name((socket) => { + if (socket == null ? void 0 : socket.connecting) { + socket.on("connect", () => { + clearTimeout(timeoutId); + }); + } else { + clearTimeout(timeoutId); + } + }, "doWithSocket"); + if (request2.socket) { + doWithSocket(request2.socket); + } else { + request2.on("socket", doWithSocket); + } + }, "registerTimeout"); + if (timeoutInMs < 2e3) { + registerTimeout(0); + return 0; } - return asObject; - }, "expectUnion"); - var strictParseDouble = /* @__PURE__ */ __name((value) => { - if (typeof value == "string") { - return expectNumber(parseNumber(value)); + return setTimeout(registerTimeout.bind(null, DEFER_EVENT_LISTENER_TIME), DEFER_EVENT_LISTENER_TIME); + }, "setConnectionTimeout"); + var DEFER_EVENT_LISTENER_TIME2 = 3e3; + var setSocketKeepAlive = /* @__PURE__ */ __name((request2, { keepAlive, keepAliveMsecs }, deferTimeMs = DEFER_EVENT_LISTENER_TIME2) => { + if (keepAlive !== true) { + return -1; } - return expectNumber(value); - }, "strictParseDouble"); - var strictParseFloat = strictParseDouble; - var strictParseFloat32 = /* @__PURE__ */ __name((value) => { - if (typeof value == "string") { - return expectFloat32(parseNumber(value)); + const registerListener = /* @__PURE__ */ __name(() => { + if (request2.socket) { + request2.socket.setKeepAlive(keepAlive, keepAliveMsecs || 0); + } else { + request2.on("socket", (socket) => { + socket.setKeepAlive(keepAlive, keepAliveMsecs || 0); + }); + } + }, "registerListener"); + if (deferTimeMs === 0) { + registerListener(); + return 0; } - return expectFloat32(value); - }, "strictParseFloat32"); - var NUMBER_REGEX = /(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g; - var parseNumber = /* @__PURE__ */ __name((value) => { - const matches = value.match(NUMBER_REGEX); - if (matches === null || matches[0].length !== value.length) { - throw new TypeError(`Expected real number, got implicit NaN`); + return setTimeout(registerListener, deferTimeMs); + }, "setSocketKeepAlive"); + var DEFER_EVENT_LISTENER_TIME3 = 3e3; + var setSocketTimeout = /* @__PURE__ */ __name((request2, reject, timeoutInMs = 0) => { + const registerTimeout = /* @__PURE__ */ __name((offset) => { + request2.setTimeout(timeoutInMs - offset, () => { + request2.destroy(); + reject(Object.assign(new Error(`Connection timed out after ${timeoutInMs} ms`), { name: "TimeoutError" })); + }); + }, "registerTimeout"); + if (0 < timeoutInMs && timeoutInMs < 6e3) { + registerTimeout(0); + return 0; } - return parseFloat(value); - }, "parseNumber"); - var limitedParseDouble = /* @__PURE__ */ __name((value) => { - if (typeof value == "string") { - return parseFloatString(value); + return setTimeout( + registerTimeout.bind(null, timeoutInMs === 0 ? 0 : DEFER_EVENT_LISTENER_TIME3), + DEFER_EVENT_LISTENER_TIME3 + ); + }, "setSocketTimeout"); + var import_stream = require("stream"); + var MIN_WAIT_TIME = 1e3; + async function writeRequestBody(httpRequest, request2, maxContinueTimeoutMs = MIN_WAIT_TIME) { + const headers = request2.headers ?? {}; + const expect = headers["Expect"] || headers["expect"]; + let timeoutId = -1; + let hasError = false; + if (expect === "100-continue") { + await Promise.race([ + new Promise((resolve) => { + timeoutId = Number(setTimeout(resolve, Math.max(MIN_WAIT_TIME, maxContinueTimeoutMs))); + }), + new Promise((resolve) => { + httpRequest.on("continue", () => { + clearTimeout(timeoutId); + resolve(); + }); + httpRequest.on("error", () => { + hasError = true; + clearTimeout(timeoutId); + resolve(); + }); + }) + ]); } - return expectNumber(value); - }, "limitedParseDouble"); - var handleFloat = limitedParseDouble; - var limitedParseFloat = limitedParseDouble; - var limitedParseFloat32 = /* @__PURE__ */ __name((value) => { - if (typeof value == "string") { - return parseFloatString(value); + if (!hasError) { + writeBody(httpRequest, request2.body); } - return expectFloat32(value); - }, "limitedParseFloat32"); - var parseFloatString = /* @__PURE__ */ __name((value) => { - switch (value) { - case "NaN": - return NaN; - case "Infinity": - return Infinity; - case "-Infinity": - return -Infinity; - default: - throw new Error(`Unable to parse float value: ${value}`); + } + __name(writeRequestBody, "writeRequestBody"); + function writeBody(httpRequest, body) { + if (body instanceof import_stream.Readable) { + body.pipe(httpRequest); + return; } - }, "parseFloatString"); - var strictParseLong = /* @__PURE__ */ __name((value) => { - if (typeof value === "string") { - return expectLong(parseNumber(value)); + if (body) { + if (Buffer.isBuffer(body) || typeof body === "string") { + httpRequest.end(body); + return; + } + const uint8 = body; + if (typeof uint8 === "object" && uint8.buffer && typeof uint8.byteOffset === "number" && typeof uint8.byteLength === "number") { + httpRequest.end(Buffer.from(uint8.buffer, uint8.byteOffset, uint8.byteLength)); + return; + } + httpRequest.end(Buffer.from(body)); + return; } - return expectLong(value); - }, "strictParseLong"); - var strictParseInt = strictParseLong; - var strictParseInt32 = /* @__PURE__ */ __name((value) => { - if (typeof value === "string") { - return expectInt32(parseNumber(value)); + httpRequest.end(); + } + __name(writeBody, "writeBody"); + var DEFAULT_REQUEST_TIMEOUT = 0; + var _NodeHttpHandler = class _NodeHttpHandler2 { + constructor(options) { + this.socketWarningTimestamp = 0; + this.metadata = { handlerProtocol: "http/1.1" }; + this.configProvider = new Promise((resolve, reject) => { + if (typeof options === "function") { + options().then((_options) => { + resolve(this.resolveDefaultConfig(_options)); + }).catch(reject); + } else { + resolve(this.resolveDefaultConfig(options)); + } + }); } - return expectInt32(value); - }, "strictParseInt32"); - var strictParseShort = /* @__PURE__ */ __name((value) => { - if (typeof value === "string") { - return expectShort(parseNumber(value)); + /** + * @returns the input if it is an HttpHandler of any class, + * or instantiates a new instance of this handler. + */ + static create(instanceOrOptions) { + if (typeof (instanceOrOptions == null ? void 0 : instanceOrOptions.handle) === "function") { + return instanceOrOptions; + } + return new _NodeHttpHandler2(instanceOrOptions); } - return expectShort(value); - }, "strictParseShort"); - var strictParseByte = /* @__PURE__ */ __name((value) => { - if (typeof value === "string") { - return expectByte(parseNumber(value)); + /** + * @internal + * + * @param agent - http(s) agent in use by the NodeHttpHandler instance. + * @param socketWarningTimestamp - last socket usage check timestamp. + * @param logger - channel for the warning. + * @returns timestamp of last emitted warning. + */ + static checkSocketUsage(agent, socketWarningTimestamp, logger = console) { + var _a, _b, _c; + const { sockets, requests, maxSockets } = agent; + if (typeof maxSockets !== "number" || maxSockets === Infinity) { + return socketWarningTimestamp; + } + const interval = 15e3; + if (Date.now() - interval < socketWarningTimestamp) { + return socketWarningTimestamp; + } + if (sockets && requests) { + for (const origin in sockets) { + const socketsInUse = ((_a = sockets[origin]) == null ? void 0 : _a.length) ?? 0; + const requestsEnqueued = ((_b = requests[origin]) == null ? void 0 : _b.length) ?? 0; + if (socketsInUse >= maxSockets && requestsEnqueued >= 2 * maxSockets) { + (_c = logger == null ? void 0 : logger.warn) == null ? void 0 : _c.call( + logger, + `@smithy/node-http-handler:WARN - socket usage at capacity=${socketsInUse} and ${requestsEnqueued} additional requests are enqueued. +See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html +or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.` + ); + return Date.now(); + } + } + } + return socketWarningTimestamp; } - return expectByte(value); - }, "strictParseByte"); - var stackTraceWarning = /* @__PURE__ */ __name((message) => { - return String(new TypeError(message).stack || message).split("\n").slice(0, 5).filter((s) => !s.includes("stackTraceWarning")).join("\n"); - }, "stackTraceWarning"); - var logger = { - warn: console.warn - }; - var DAYS = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]; - var MONTHS = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]; - function dateToUtcString(date) { - const year = date.getUTCFullYear(); - const month = date.getUTCMonth(); - const dayOfWeek = date.getUTCDay(); - const dayOfMonthInt = date.getUTCDate(); - const hoursInt = date.getUTCHours(); - const minutesInt = date.getUTCMinutes(); - const secondsInt = date.getUTCSeconds(); - const dayOfMonthString = dayOfMonthInt < 10 ? `0${dayOfMonthInt}` : `${dayOfMonthInt}`; - const hoursString = hoursInt < 10 ? `0${hoursInt}` : `${hoursInt}`; - const minutesString = minutesInt < 10 ? `0${minutesInt}` : `${minutesInt}`; - const secondsString = secondsInt < 10 ? `0${secondsInt}` : `${secondsInt}`; - return `${DAYS[dayOfWeek]}, ${dayOfMonthString} ${MONTHS[month]} ${year} ${hoursString}:${minutesString}:${secondsString} GMT`; - } - __name(dateToUtcString, "dateToUtcString"); - var RFC3339 = new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/); - var parseRfc3339DateTime = /* @__PURE__ */ __name((value) => { - if (value === null || value === void 0) { - return void 0; + resolveDefaultConfig(options) { + const { requestTimeout, connectionTimeout, socketTimeout, httpAgent, httpsAgent } = options || {}; + const keepAlive = true; + const maxSockets = 50; + return { + connectionTimeout, + requestTimeout: requestTimeout ?? socketTimeout, + httpAgent: (() => { + if (httpAgent instanceof import_http2.Agent || typeof (httpAgent == null ? void 0 : httpAgent.destroy) === "function") { + return httpAgent; + } + return new import_http2.Agent({ keepAlive, maxSockets, ...httpAgent }); + })(), + httpsAgent: (() => { + if (httpsAgent instanceof import_https.Agent || typeof (httpsAgent == null ? void 0 : httpsAgent.destroy) === "function") { + return httpsAgent; + } + return new import_https.Agent({ keepAlive, maxSockets, ...httpsAgent }); + })(), + logger: console + }; } - if (typeof value !== "string") { - throw new TypeError("RFC-3339 date-times must be expressed as strings"); + destroy() { + var _a, _b, _c, _d; + (_b = (_a = this.config) == null ? void 0 : _a.httpAgent) == null ? void 0 : _b.destroy(); + (_d = (_c = this.config) == null ? void 0 : _c.httpsAgent) == null ? void 0 : _d.destroy(); } - const match = RFC3339.exec(value); - if (!match) { - throw new TypeError("Invalid RFC-3339 date-time value"); + async handle(request2, { abortSignal } = {}) { + if (!this.config) { + this.config = await this.configProvider; + } + return new Promise((_resolve, _reject) => { + let writeRequestBodyPromise = void 0; + const timeouts = []; + const resolve = /* @__PURE__ */ __name(async (arg) => { + await writeRequestBodyPromise; + timeouts.forEach(clearTimeout); + _resolve(arg); + }, "resolve"); + const reject = /* @__PURE__ */ __name(async (arg) => { + await writeRequestBodyPromise; + timeouts.forEach(clearTimeout); + _reject(arg); + }, "reject"); + if (!this.config) { + throw new Error("Node HTTP request handler config is not resolved"); + } + if (abortSignal == null ? void 0 : abortSignal.aborted) { + const abortError = new Error("Request aborted"); + abortError.name = "AbortError"; + reject(abortError); + return; + } + const isSSL = request2.protocol === "https:"; + const agent = isSSL ? this.config.httpsAgent : this.config.httpAgent; + timeouts.push( + setTimeout( + () => { + this.socketWarningTimestamp = _NodeHttpHandler2.checkSocketUsage( + agent, + this.socketWarningTimestamp, + this.config.logger + ); + }, + this.config.socketAcquisitionWarningTimeout ?? (this.config.requestTimeout ?? 2e3) + (this.config.connectionTimeout ?? 1e3) + ) + ); + const queryString = (0, import_querystring_builder.buildQueryString)(request2.query || {}); + let auth = void 0; + if (request2.username != null || request2.password != null) { + const username = request2.username ?? ""; + const password = request2.password ?? ""; + auth = `${username}:${password}`; + } + let path = request2.path; + if (queryString) { + path += `?${queryString}`; + } + if (request2.fragment) { + path += `#${request2.fragment}`; + } + let hostname = request2.hostname ?? ""; + if (hostname[0] === "[" && hostname.endsWith("]")) { + hostname = request2.hostname.slice(1, -1); + } else { + hostname = request2.hostname; + } + const nodeHttpsOptions = { + headers: request2.headers, + host: hostname, + method: request2.method, + path, + port: request2.port, + agent, + auth + }; + const requestFunc = isSSL ? import_https.request : import_http2.request; + const req = requestFunc(nodeHttpsOptions, (res) => { + const httpResponse = new import_protocol_http8.HttpResponse({ + statusCode: res.statusCode || -1, + reason: res.statusMessage, + headers: getTransformedHeaders(res.headers), + body: res + }); + resolve({ response: httpResponse }); + }); + req.on("error", (err) => { + if (NODEJS_TIMEOUT_ERROR_CODES.includes(err.code)) { + reject(Object.assign(err, { name: "TimeoutError" })); + } else { + reject(err); + } + }); + if (abortSignal) { + const onAbort = /* @__PURE__ */ __name(() => { + req.destroy(); + const abortError = new Error("Request aborted"); + abortError.name = "AbortError"; + reject(abortError); + }, "onAbort"); + if (typeof abortSignal.addEventListener === "function") { + const signal = abortSignal; + signal.addEventListener("abort", onAbort, { once: true }); + req.once("close", () => signal.removeEventListener("abort", onAbort)); + } else { + abortSignal.onabort = onAbort; + } + } + timeouts.push(setConnectionTimeout(req, reject, this.config.connectionTimeout)); + timeouts.push(setSocketTimeout(req, reject, this.config.requestTimeout)); + const httpAgent = nodeHttpsOptions.agent; + if (typeof httpAgent === "object" && "keepAlive" in httpAgent) { + timeouts.push( + setSocketKeepAlive(req, { + // @ts-expect-error keepAlive is not public on httpAgent. + keepAlive: httpAgent.keepAlive, + // @ts-expect-error keepAliveMsecs is not public on httpAgent. + keepAliveMsecs: httpAgent.keepAliveMsecs + }) + ); + } + writeRequestBodyPromise = writeRequestBody(req, request2, this.config.requestTimeout).catch((e) => { + timeouts.forEach(clearTimeout); + return _reject(e); + }); + }); } - const [_, yearStr, monthStr, dayStr, hours, minutes, seconds, fractionalMilliseconds] = match; - const year = strictParseShort(stripLeadingZeroes(yearStr)); - const month = parseDateValue(monthStr, "month", 1, 12); - const day = parseDateValue(dayStr, "day", 1, 31); - return buildDate(year, month, day, { hours, minutes, seconds, fractionalMilliseconds }); - }, "parseRfc3339DateTime"); - var RFC3339_WITH_OFFSET = new RegExp( - /^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/ - ); - var parseRfc3339DateTimeWithOffset = /* @__PURE__ */ __name((value) => { - if (value === null || value === void 0) { - return void 0; + updateHttpClientConfig(key, value) { + this.config = void 0; + this.configProvider = this.configProvider.then((config) => { + return { + ...config, + [key]: value + }; + }); } - if (typeof value !== "string") { - throw new TypeError("RFC-3339 date-times must be expressed as strings"); + httpHandlerConfigs() { + return this.config ?? {}; } - const match = RFC3339_WITH_OFFSET.exec(value); - if (!match) { - throw new TypeError("Invalid RFC-3339 date-time value"); + }; + __name(_NodeHttpHandler, "NodeHttpHandler"); + var NodeHttpHandler = _NodeHttpHandler; + var import_http22 = require("http2"); + var import_http23 = __toESM2(require("http2")); + var _NodeHttp2ConnectionPool = class _NodeHttp2ConnectionPool { + constructor(sessions) { + this.sessions = []; + this.sessions = sessions ?? []; } - const [_, yearStr, monthStr, dayStr, hours, minutes, seconds, fractionalMilliseconds, offsetStr] = match; - const year = strictParseShort(stripLeadingZeroes(yearStr)); - const month = parseDateValue(monthStr, "month", 1, 12); - const day = parseDateValue(dayStr, "day", 1, 31); - const date = buildDate(year, month, day, { hours, minutes, seconds, fractionalMilliseconds }); - if (offsetStr.toUpperCase() != "Z") { - date.setTime(date.getTime() - parseOffsetToMilliseconds(offsetStr)); + poll() { + if (this.sessions.length > 0) { + return this.sessions.shift(); + } } - return date; - }, "parseRfc3339DateTimeWithOffset"); - var IMF_FIXDATE = new RegExp( - /^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d{2}) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/ - ); - var RFC_850_DATE = new RegExp( - /^(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d{2})-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/ - ); - var ASC_TIME = new RegExp( - /^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( [1-9]|\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? (\d{4})$/ - ); - var parseRfc7231DateTime = /* @__PURE__ */ __name((value) => { - if (value === null || value === void 0) { - return void 0; + offerLast(session) { + this.sessions.push(session); } - if (typeof value !== "string") { - throw new TypeError("RFC-7231 date-times must be expressed as strings"); + contains(session) { + return this.sessions.includes(session); } - let match = IMF_FIXDATE.exec(value); - if (match) { - const [_, dayStr, monthStr, yearStr, hours, minutes, seconds, fractionalMilliseconds] = match; - return buildDate( - strictParseShort(stripLeadingZeroes(yearStr)), - parseMonthByShortName(monthStr), - parseDateValue(dayStr, "day", 1, 31), - { hours, minutes, seconds, fractionalMilliseconds } - ); + remove(session) { + this.sessions = this.sessions.filter((s) => s !== session); } - match = RFC_850_DATE.exec(value); - if (match) { - const [_, dayStr, monthStr, yearStr, hours, minutes, seconds, fractionalMilliseconds] = match; - return adjustRfc850Year( - buildDate(parseTwoDigitYear(yearStr), parseMonthByShortName(monthStr), parseDateValue(dayStr, "day", 1, 31), { - hours, - minutes, - seconds, - fractionalMilliseconds - }) - ); + [Symbol.iterator]() { + return this.sessions[Symbol.iterator](); } - match = ASC_TIME.exec(value); - if (match) { - const [_, monthStr, dayStr, hours, minutes, seconds, fractionalMilliseconds, yearStr] = match; - return buildDate( - strictParseShort(stripLeadingZeroes(yearStr)), - parseMonthByShortName(monthStr), - parseDateValue(dayStr.trimLeft(), "day", 1, 31), - { hours, minutes, seconds, fractionalMilliseconds } - ); + destroy(connection) { + for (const session of this.sessions) { + if (session === connection) { + if (!session.destroyed) { + session.destroy(); + } + } + } } - throw new TypeError("Invalid RFC-7231 date-time value"); - }, "parseRfc7231DateTime"); - var parseEpochTimestamp = /* @__PURE__ */ __name((value) => { - if (value === null || value === void 0) { - return void 0; + }; + __name(_NodeHttp2ConnectionPool, "NodeHttp2ConnectionPool"); + var NodeHttp2ConnectionPool = _NodeHttp2ConnectionPool; + var _NodeHttp2ConnectionManager = class _NodeHttp2ConnectionManager { + constructor(config) { + this.sessionCache = /* @__PURE__ */ new Map(); + this.config = config; + if (this.config.maxConcurrency && this.config.maxConcurrency <= 0) { + throw new RangeError("maxConcurrency must be greater than zero."); + } } - let valueAsDouble; - if (typeof value === "number") { - valueAsDouble = value; - } else if (typeof value === "string") { - valueAsDouble = strictParseDouble(value); - } else { - throw new TypeError("Epoch timestamps must be expressed as floating point numbers or their string representation"); + lease(requestContext, connectionConfiguration) { + const url2 = this.getUrlString(requestContext); + const existingPool = this.sessionCache.get(url2); + if (existingPool) { + const existingSession = existingPool.poll(); + if (existingSession && !this.config.disableConcurrency) { + return existingSession; + } + } + const session = import_http23.default.connect(url2); + if (this.config.maxConcurrency) { + session.settings({ maxConcurrentStreams: this.config.maxConcurrency }, (err) => { + if (err) { + throw new Error( + "Fail to set maxConcurrentStreams to " + this.config.maxConcurrency + "when creating new session for " + requestContext.destination.toString() + ); + } + }); + } + session.unref(); + const destroySessionCb = /* @__PURE__ */ __name(() => { + session.destroy(); + this.deleteSession(url2, session); + }, "destroySessionCb"); + session.on("goaway", destroySessionCb); + session.on("error", destroySessionCb); + session.on("frameError", destroySessionCb); + session.on("close", () => this.deleteSession(url2, session)); + if (connectionConfiguration.requestTimeout) { + session.setTimeout(connectionConfiguration.requestTimeout, destroySessionCb); + } + const connectionPool = this.sessionCache.get(url2) || new NodeHttp2ConnectionPool(); + connectionPool.offerLast(session); + this.sessionCache.set(url2, connectionPool); + return session; } - if (Number.isNaN(valueAsDouble) || valueAsDouble === Infinity || valueAsDouble === -Infinity) { - throw new TypeError("Epoch timestamps must be valid, non-Infinite, non-NaN numerics"); + /** + * Delete a session from the connection pool. + * @param authority The authority of the session to delete. + * @param session The session to delete. + */ + deleteSession(authority, session) { + const existingConnectionPool = this.sessionCache.get(authority); + if (!existingConnectionPool) { + return; + } + if (!existingConnectionPool.contains(session)) { + return; + } + existingConnectionPool.remove(session); + this.sessionCache.set(authority, existingConnectionPool); } - return new Date(Math.round(valueAsDouble * 1e3)); - }, "parseEpochTimestamp"); - var buildDate = /* @__PURE__ */ __name((year, month, day, time) => { - const adjustedMonth = month - 1; - validateDayOfMonth(year, adjustedMonth, day); - return new Date( - Date.UTC( - year, - adjustedMonth, - day, - parseDateValue(time.hours, "hour", 0, 23), - parseDateValue(time.minutes, "minute", 0, 59), - // seconds can go up to 60 for leap seconds - parseDateValue(time.seconds, "seconds", 0, 60), - parseMilliseconds(time.fractionalMilliseconds) - ) - ); - }, "buildDate"); - var parseTwoDigitYear = /* @__PURE__ */ __name((value) => { - const thisYear = (/* @__PURE__ */ new Date()).getUTCFullYear(); - const valueInThisCentury = Math.floor(thisYear / 100) * 100 + strictParseShort(stripLeadingZeroes(value)); - if (valueInThisCentury < thisYear) { - return valueInThisCentury + 100; + release(requestContext, session) { + var _a; + const cacheKey = this.getUrlString(requestContext); + (_a = this.sessionCache.get(cacheKey)) == null ? void 0 : _a.offerLast(session); } - return valueInThisCentury; - }, "parseTwoDigitYear"); - var FIFTY_YEARS_IN_MILLIS = 50 * 365 * 24 * 60 * 60 * 1e3; - var adjustRfc850Year = /* @__PURE__ */ __name((input) => { - if (input.getTime() - (/* @__PURE__ */ new Date()).getTime() > FIFTY_YEARS_IN_MILLIS) { - return new Date( - Date.UTC( - input.getUTCFullYear() - 100, - input.getUTCMonth(), - input.getUTCDate(), - input.getUTCHours(), - input.getUTCMinutes(), - input.getUTCSeconds(), - input.getUTCMilliseconds() - ) - ); + destroy() { + for (const [key, connectionPool] of this.sessionCache) { + for (const session of connectionPool) { + if (!session.destroyed) { + session.destroy(); + } + connectionPool.remove(session); + } + this.sessionCache.delete(key); + } } - return input; - }, "adjustRfc850Year"); - var parseMonthByShortName = /* @__PURE__ */ __name((value) => { - const monthIdx = MONTHS.indexOf(value); - if (monthIdx < 0) { - throw new TypeError(`Invalid month: ${value}`); + setMaxConcurrentStreams(maxConcurrentStreams) { + if (this.config.maxConcurrency && this.config.maxConcurrency <= 0) { + throw new RangeError("maxConcurrentStreams must be greater than zero."); + } + this.config.maxConcurrency = maxConcurrentStreams; } - return monthIdx + 1; - }, "parseMonthByShortName"); - var DAYS_IN_MONTH = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; - var validateDayOfMonth = /* @__PURE__ */ __name((year, month, day) => { - let maxDays = DAYS_IN_MONTH[month]; - if (month === 1 && isLeapYear(year)) { - maxDays = 29; + setDisableConcurrentStreams(disableConcurrentStreams) { + this.config.disableConcurrency = disableConcurrentStreams; } - if (day > maxDays) { - throw new TypeError(`Invalid day for ${MONTHS[month]} in ${year}: ${day}`); + getUrlString(request2) { + return request2.destination.toString(); } - }, "validateDayOfMonth"); - var isLeapYear = /* @__PURE__ */ __name((year) => { - return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0); - }, "isLeapYear"); - var parseDateValue = /* @__PURE__ */ __name((value, type, lower, upper) => { - const dateVal = strictParseByte(stripLeadingZeroes(value)); - if (dateVal < lower || dateVal > upper) { - throw new TypeError(`${type} must be between ${lower} and ${upper}, inclusive`); + }; + __name(_NodeHttp2ConnectionManager, "NodeHttp2ConnectionManager"); + var NodeHttp2ConnectionManager = _NodeHttp2ConnectionManager; + var _NodeHttp2Handler = class _NodeHttp2Handler2 { + constructor(options) { + this.metadata = { handlerProtocol: "h2" }; + this.connectionManager = new NodeHttp2ConnectionManager({}); + this.configProvider = new Promise((resolve, reject) => { + if (typeof options === "function") { + options().then((opts) => { + resolve(opts || {}); + }).catch(reject); + } else { + resolve(options || {}); + } + }); } - return dateVal; - }, "parseDateValue"); - var parseMilliseconds = /* @__PURE__ */ __name((value) => { - if (value === null || value === void 0) { - return 0; + /** + * @returns the input if it is an HttpHandler of any class, + * or instantiates a new instance of this handler. + */ + static create(instanceOrOptions) { + if (typeof (instanceOrOptions == null ? void 0 : instanceOrOptions.handle) === "function") { + return instanceOrOptions; + } + return new _NodeHttp2Handler2(instanceOrOptions); } - return strictParseFloat32("0." + value) * 1e3; - }, "parseMilliseconds"); - var parseOffsetToMilliseconds = /* @__PURE__ */ __name((value) => { - const directionStr = value[0]; - let direction = 1; - if (directionStr == "+") { - direction = 1; - } else if (directionStr == "-") { - direction = -1; - } else { - throw new TypeError(`Offset direction, ${directionStr}, must be "+" or "-"`); + destroy() { + this.connectionManager.destroy(); + } + async handle(request2, { abortSignal } = {}) { + if (!this.config) { + this.config = await this.configProvider; + this.connectionManager.setDisableConcurrentStreams(this.config.disableConcurrentStreams || false); + if (this.config.maxConcurrentStreams) { + this.connectionManager.setMaxConcurrentStreams(this.config.maxConcurrentStreams); + } + } + const { requestTimeout, disableConcurrentStreams } = this.config; + return new Promise((_resolve, _reject) => { + var _a; + let fulfilled = false; + let writeRequestBodyPromise = void 0; + const resolve = /* @__PURE__ */ __name(async (arg) => { + await writeRequestBodyPromise; + _resolve(arg); + }, "resolve"); + const reject = /* @__PURE__ */ __name(async (arg) => { + await writeRequestBodyPromise; + _reject(arg); + }, "reject"); + if (abortSignal == null ? void 0 : abortSignal.aborted) { + fulfilled = true; + const abortError = new Error("Request aborted"); + abortError.name = "AbortError"; + reject(abortError); + return; + } + const { hostname, method, port, protocol, query } = request2; + let auth = ""; + if (request2.username != null || request2.password != null) { + const username = request2.username ?? ""; + const password = request2.password ?? ""; + auth = `${username}:${password}@`; + } + const authority = `${protocol}//${auth}${hostname}${port ? `:${port}` : ""}`; + const requestContext = { destination: new URL(authority) }; + const session = this.connectionManager.lease(requestContext, { + requestTimeout: (_a = this.config) == null ? void 0 : _a.sessionTimeout, + disableConcurrentStreams: disableConcurrentStreams || false + }); + const rejectWithDestroy = /* @__PURE__ */ __name((err) => { + if (disableConcurrentStreams) { + this.destroySession(session); + } + fulfilled = true; + reject(err); + }, "rejectWithDestroy"); + const queryString = (0, import_querystring_builder.buildQueryString)(query || {}); + let path = request2.path; + if (queryString) { + path += `?${queryString}`; + } + if (request2.fragment) { + path += `#${request2.fragment}`; + } + const req = session.request({ + ...request2.headers, + [import_http22.constants.HTTP2_HEADER_PATH]: path, + [import_http22.constants.HTTP2_HEADER_METHOD]: method + }); + session.ref(); + req.on("response", (headers) => { + const httpResponse = new import_protocol_http8.HttpResponse({ + statusCode: headers[":status"] || -1, + headers: getTransformedHeaders(headers), + body: req + }); + fulfilled = true; + resolve({ response: httpResponse }); + if (disableConcurrentStreams) { + session.close(); + this.connectionManager.deleteSession(authority, session); + } + }); + if (requestTimeout) { + req.setTimeout(requestTimeout, () => { + req.close(); + const timeoutError = new Error(`Stream timed out because of no activity for ${requestTimeout} ms`); + timeoutError.name = "TimeoutError"; + rejectWithDestroy(timeoutError); + }); + } + if (abortSignal) { + const onAbort = /* @__PURE__ */ __name(() => { + req.close(); + const abortError = new Error("Request aborted"); + abortError.name = "AbortError"; + rejectWithDestroy(abortError); + }, "onAbort"); + if (typeof abortSignal.addEventListener === "function") { + const signal = abortSignal; + signal.addEventListener("abort", onAbort, { once: true }); + req.once("close", () => signal.removeEventListener("abort", onAbort)); + } else { + abortSignal.onabort = onAbort; + } + } + req.on("frameError", (type, code, id) => { + rejectWithDestroy(new Error(`Frame type id ${type} in stream id ${id} has failed with code ${code}.`)); + }); + req.on("error", rejectWithDestroy); + req.on("aborted", () => { + rejectWithDestroy( + new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${req.rstCode}.`) + ); + }); + req.on("close", () => { + session.unref(); + if (disableConcurrentStreams) { + session.destroy(); + } + if (!fulfilled) { + rejectWithDestroy(new Error("Unexpected error: http2 request did not get a response")); + } + }); + writeRequestBodyPromise = writeRequestBody(req, request2, requestTimeout); + }); } - const hour = Number(value.substring(1, 3)); - const minute = Number(value.substring(4, 6)); - return direction * (hour * 60 + minute) * 60 * 1e3; - }, "parseOffsetToMilliseconds"); - var stripLeadingZeroes = /* @__PURE__ */ __name((value) => { - let idx = 0; - while (idx < value.length - 1 && value.charAt(idx) === "0") { - idx++; + updateHttpClientConfig(key, value) { + this.config = void 0; + this.configProvider = this.configProvider.then((config) => { + return { + ...config, + [key]: value + }; + }); } - if (idx === 0) { - return value; + httpHandlerConfigs() { + return this.config ?? {}; } - return value.slice(idx); - }, "stripLeadingZeroes"); - var _ServiceException = class _ServiceException2 extends Error { - constructor(options) { - super(options.message); - Object.setPrototypeOf(this, _ServiceException2.prototype); - this.name = options.name; - this.$fault = options.$fault; - this.$metadata = options.$metadata; + /** + * Destroys a session. + * @param session The session to destroy. + */ + destroySession(session) { + if (!session.destroyed) { + session.destroy(); + } } }; - __name(_ServiceException, "ServiceException"); - var ServiceException = _ServiceException; - var decorateServiceException = /* @__PURE__ */ __name((exception, additions = {}) => { - Object.entries(additions).filter(([, v]) => v !== void 0).forEach(([k, v]) => { - if (exception[k] == void 0 || exception[k] === "") { - exception[k] = v; - } - }); - const message = exception.message || exception.Message || "UnknownError"; - exception.message = message; - delete exception.Message; - return exception; - }, "decorateServiceException"); - var throwDefaultError = /* @__PURE__ */ __name(({ output, parsedBody, exceptionCtor, errorCode }) => { - const $metadata = deserializeMetadata(output); - const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : void 0; - const response = new exceptionCtor({ - name: (parsedBody == null ? void 0 : parsedBody.code) || (parsedBody == null ? void 0 : parsedBody.Code) || errorCode || statusCode || "UnknownError", - $fault: "client", - $metadata - }); - throw decorateServiceException(response, parsedBody); - }, "throwDefaultError"); - var withBaseException = /* @__PURE__ */ __name((ExceptionCtor) => { - return ({ output, parsedBody, errorCode }) => { - throwDefaultError({ output, parsedBody, exceptionCtor: ExceptionCtor, errorCode }); - }; - }, "withBaseException"); - var deserializeMetadata = /* @__PURE__ */ __name((output) => ({ - httpStatusCode: output.statusCode, - requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"], - extendedRequestId: output.headers["x-amz-id-2"], - cfId: output.headers["x-amz-cf-id"] - }), "deserializeMetadata"); - var loadConfigsForDefaultMode = /* @__PURE__ */ __name((mode) => { - switch (mode) { - case "standard": - return { - retryMode: "standard", - connectionTimeout: 3100 - }; - case "in-region": - return { - retryMode: "standard", - connectionTimeout: 1100 - }; - case "cross-region": - return { - retryMode: "standard", - connectionTimeout: 3100 - }; - case "mobile": - return { - retryMode: "standard", - connectionTimeout: 3e4 - }; - default: - return {}; + __name(_NodeHttp2Handler, "NodeHttp2Handler"); + var NodeHttp2Handler = _NodeHttp2Handler; + var _Collector = class _Collector extends import_stream.Writable { + constructor() { + super(...arguments); + this.bufferedBytes = []; } - }, "loadConfigsForDefaultMode"); - var warningEmitted = false; - var emitWarningIfUnsupportedVersion = /* @__PURE__ */ __name((version2) => { - if (version2 && !warningEmitted && parseInt(version2.substring(1, version2.indexOf("."))) < 14) { - warningEmitted = true; + _write(chunk, encoding, callback) { + this.bufferedBytes.push(chunk); + callback(); } - }, "emitWarningIfUnsupportedVersion"); - var getChecksumConfiguration = /* @__PURE__ */ __name((runtimeConfig) => { - const checksumAlgorithms = []; - for (const id in import_types.AlgorithmId) { - const algorithmId = import_types.AlgorithmId[id]; - if (runtimeConfig[algorithmId] === void 0) { - continue; - } - checksumAlgorithms.push({ - algorithmId: () => algorithmId, - checksumConstructor: () => runtimeConfig[algorithmId] - }); + }; + __name(_Collector, "Collector"); + var Collector = _Collector; + var streamCollector = /* @__PURE__ */ __name((stream) => { + if (isReadableStreamInstance(stream)) { + return collectReadableStream(stream); } - return { - _checksumAlgorithms: checksumAlgorithms, - addChecksumAlgorithm(algo) { - this._checksumAlgorithms.push(algo); - }, - checksumAlgorithms() { - return this._checksumAlgorithms; - } - }; - }, "getChecksumConfiguration"); - var resolveChecksumRuntimeConfig = /* @__PURE__ */ __name((clientConfig) => { - const runtimeConfig = {}; - clientConfig.checksumAlgorithms().forEach((checksumAlgorithm) => { - runtimeConfig[checksumAlgorithm.algorithmId()] = checksumAlgorithm.checksumConstructor(); + return new Promise((resolve, reject) => { + const collector = new Collector(); + stream.pipe(collector); + stream.on("error", (err) => { + collector.end(); + reject(err); + }); + collector.on("error", reject); + collector.on("finish", function() { + const bytes = new Uint8Array(Buffer.concat(this.bufferedBytes)); + resolve(bytes); + }); }); - return runtimeConfig; - }, "resolveChecksumRuntimeConfig"); - var getRetryConfiguration = /* @__PURE__ */ __name((runtimeConfig) => { - let _retryStrategy = runtimeConfig.retryStrategy; - return { - setRetryStrategy(retryStrategy) { - _retryStrategy = retryStrategy; - }, - retryStrategy() { - return _retryStrategy; + }, "streamCollector"); + var isReadableStreamInstance = /* @__PURE__ */ __name((stream) => typeof ReadableStream === "function" && stream instanceof ReadableStream, "isReadableStreamInstance"); + async function collectReadableStream(stream) { + const chunks = []; + const reader = stream.getReader(); + let isDone = false; + let length = 0; + while (!isDone) { + const { done, value } = await reader.read(); + if (value) { + chunks.push(value); + length += value.length; + } + isDone = done; + } + const collected = new Uint8Array(length); + let offset = 0; + for (const chunk of chunks) { + collected.set(chunk, offset); + offset += chunk.length; + } + return collected; + } + __name(collectReadableStream, "collectReadableStream"); + } +}); + +// ../../../node_modules/@smithy/smithy-client/node_modules/@smithy/fetch-http-handler/dist-cjs/index.js +var require_dist_cjs34 = __commonJS({ + "../../../node_modules/@smithy/smithy-client/node_modules/@smithy/fetch-http-handler/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all) => { + for (var name in all) + __defProp2(target, name, { get: all[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + FetchHttpHandler: () => FetchHttpHandler, + keepAliveSupport: () => keepAliveSupport, + streamCollector: () => streamCollector + }); + module2.exports = __toCommonJS2(src_exports); + var import_protocol_http8 = require_dist_cjs30(); + var import_querystring_builder = require_dist_cjs32(); + function requestTimeout(timeoutInMs = 0) { + return new Promise((resolve, reject) => { + if (timeoutInMs) { + setTimeout(() => { + const timeoutError = new Error(`Request did not complete within ${timeoutInMs} ms`); + timeoutError.name = "TimeoutError"; + reject(timeoutError); + }, timeoutInMs); } - }; - }, "getRetryConfiguration"); - var resolveRetryRuntimeConfig = /* @__PURE__ */ __name((retryStrategyConfiguration) => { - const runtimeConfig = {}; - runtimeConfig.retryStrategy = retryStrategyConfiguration.retryStrategy(); - return runtimeConfig; - }, "resolveRetryRuntimeConfig"); - var getDefaultExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => { - return { - ...getChecksumConfiguration(runtimeConfig), - ...getRetryConfiguration(runtimeConfig) - }; - }, "getDefaultExtensionConfiguration"); - var getDefaultClientConfiguration = getDefaultExtensionConfiguration; - var resolveDefaultRuntimeConfig = /* @__PURE__ */ __name((config) => { - return { - ...resolveChecksumRuntimeConfig(config), - ...resolveRetryRuntimeConfig(config) - }; - }, "resolveDefaultRuntimeConfig"); - function extendedEncodeURIComponent(str) { - return encodeURIComponent(str).replace(/[!'()*]/g, function(c) { - return "%" + c.charCodeAt(0).toString(16).toUpperCase(); }); } - __name(extendedEncodeURIComponent, "extendedEncodeURIComponent"); - var getArrayIfSingleItem = /* @__PURE__ */ __name((mayBeArray) => Array.isArray(mayBeArray) ? mayBeArray : [mayBeArray], "getArrayIfSingleItem"); - var getValueFromTextNode = /* @__PURE__ */ __name((obj) => { - const textNodeName = "#text"; - for (const key in obj) { - if (obj.hasOwnProperty(key) && obj[key][textNodeName] !== void 0) { - obj[key] = obj[key][textNodeName]; - } else if (typeof obj[key] === "object" && obj[key] !== null) { - obj[key] = getValueFromTextNode(obj[key]); + __name(requestTimeout, "requestTimeout"); + var keepAliveSupport = { + supported: void 0 + }; + var _FetchHttpHandler = class _FetchHttpHandler2 { + /** + * @returns the input if it is an HttpHandler of any class, + * or instantiates a new instance of this handler. + */ + static create(instanceOrOptions) { + if (typeof (instanceOrOptions == null ? void 0 : instanceOrOptions.handle) === "function") { + return instanceOrOptions; } + return new _FetchHttpHandler2(instanceOrOptions); } - return obj; - }, "getValueFromTextNode"); - var StringWrapper = /* @__PURE__ */ __name(function() { - const Class = Object.getPrototypeOf(this).constructor; - const Constructor = Function.bind.apply(String, [null, ...arguments]); - const instance = new Constructor(); - Object.setPrototypeOf(instance, Class.prototype); - return instance; - }, "StringWrapper"); - StringWrapper.prototype = Object.create(String.prototype, { - constructor: { - value: StringWrapper, - enumerable: false, - writable: true, - configurable: true + constructor(options) { + if (typeof options === "function") { + this.configProvider = options().then((opts) => opts || {}); + } else { + this.config = options ?? {}; + this.configProvider = Promise.resolve(this.config); + } + if (keepAliveSupport.supported === void 0) { + keepAliveSupport.supported = Boolean( + typeof Request !== "undefined" && "keepalive" in new Request("https://[::1]") + ); + } + } + destroy() { + } + async handle(request2, { abortSignal } = {}) { + var _a; + if (!this.config) { + this.config = await this.configProvider; + } + const requestTimeoutInMs = this.config.requestTimeout; + const keepAlive = this.config.keepAlive === true; + const credentials = this.config.credentials; + if (abortSignal == null ? void 0 : abortSignal.aborted) { + const abortError = new Error("Request aborted"); + abortError.name = "AbortError"; + return Promise.reject(abortError); + } + let path = request2.path; + const queryString = (0, import_querystring_builder.buildQueryString)(request2.query || {}); + if (queryString) { + path += `?${queryString}`; + } + if (request2.fragment) { + path += `#${request2.fragment}`; + } + let auth = ""; + if (request2.username != null || request2.password != null) { + const username = request2.username ?? ""; + const password = request2.password ?? ""; + auth = `${username}:${password}@`; + } + const { port, method } = request2; + const url2 = `${request2.protocol}//${auth}${request2.hostname}${port ? `:${port}` : ""}${path}`; + const body = method === "GET" || method === "HEAD" ? void 0 : request2.body; + const requestOptions = { + body, + headers: new Headers(request2.headers), + method, + credentials + }; + if ((_a = this.config) == null ? void 0 : _a.cache) { + requestOptions.cache = this.config.cache; + } + if (body) { + requestOptions.duplex = "half"; + } + if (typeof AbortController !== "undefined") { + requestOptions.signal = abortSignal; + } + if (keepAliveSupport.supported) { + requestOptions.keepalive = keepAlive; + } + if (typeof this.config.requestInit === "function") { + Object.assign(requestOptions, this.config.requestInit(request2)); + } + let removeSignalEventListener = /* @__PURE__ */ __name(() => { + }, "removeSignalEventListener"); + const fetchRequest = new Request(url2, requestOptions); + const raceOfPromises = [ + fetch(fetchRequest).then((response) => { + const fetchHeaders = response.headers; + const transformedHeaders = {}; + for (const pair of fetchHeaders.entries()) { + transformedHeaders[pair[0]] = pair[1]; + } + const hasReadableStream = response.body != void 0; + if (!hasReadableStream) { + return response.blob().then((body2) => ({ + response: new import_protocol_http8.HttpResponse({ + headers: transformedHeaders, + reason: response.statusText, + statusCode: response.status, + body: body2 + }) + })); + } + return { + response: new import_protocol_http8.HttpResponse({ + headers: transformedHeaders, + reason: response.statusText, + statusCode: response.status, + body: response.body + }) + }; + }), + requestTimeout(requestTimeoutInMs) + ]; + if (abortSignal) { + raceOfPromises.push( + new Promise((resolve, reject) => { + const onAbort = /* @__PURE__ */ __name(() => { + const abortError = new Error("Request aborted"); + abortError.name = "AbortError"; + reject(abortError); + }, "onAbort"); + if (typeof abortSignal.addEventListener === "function") { + const signal = abortSignal; + signal.addEventListener("abort", onAbort, { once: true }); + removeSignalEventListener = /* @__PURE__ */ __name(() => signal.removeEventListener("abort", onAbort), "removeSignalEventListener"); + } else { + abortSignal.onabort = onAbort; + } + }) + ); + } + return Promise.race(raceOfPromises).finally(removeSignalEventListener); } - }); - Object.setPrototypeOf(StringWrapper, String); - var _LazyJsonString = class _LazyJsonString2 extends StringWrapper { - deserializeJSON() { - return JSON.parse(super.toString()); + updateHttpClientConfig(key, value) { + this.config = void 0; + this.configProvider = this.configProvider.then((config) => { + config[key] = value; + return config; + }); } - toJSON() { - return super.toString(); + httpHandlerConfigs() { + return this.config ?? {}; } - static fromObject(object) { - if (object instanceof _LazyJsonString2) { - return object; - } else if (object instanceof String || typeof object === "string") { - return new _LazyJsonString2(object); - } - return new _LazyJsonString2(JSON.stringify(object)); + }; + __name(_FetchHttpHandler, "FetchHttpHandler"); + var FetchHttpHandler = _FetchHttpHandler; + var import_util_base64 = require_dist_cjs29(); + var streamCollector = /* @__PURE__ */ __name((stream) => { + if (typeof Blob === "function" && stream instanceof Blob) { + return collectBlob(stream); } + return collectStream(stream); + }, "streamCollector"); + async function collectBlob(blob) { + const base64 = await readToBase64(blob); + const arrayBuffer = (0, import_util_base64.fromBase64)(base64); + return new Uint8Array(arrayBuffer); + } + __name(collectBlob, "collectBlob"); + async function collectStream(stream) { + const chunks = []; + const reader = stream.getReader(); + let isDone = false; + let length = 0; + while (!isDone) { + const { done, value } = await reader.read(); + if (value) { + chunks.push(value); + length += value.length; + } + isDone = done; + } + const collected = new Uint8Array(length); + let offset = 0; + for (const chunk of chunks) { + collected.set(chunk, offset); + offset += chunk.length; + } + return collected; + } + __name(collectStream, "collectStream"); + function readToBase64(blob) { + return new Promise((resolve, reject) => { + const reader = new FileReader(); + reader.onloadend = () => { + if (reader.readyState !== 2) { + return reject(new Error("Reader aborted too early")); + } + const result = reader.result ?? ""; + const commaIndex = result.indexOf(","); + const dataOffset = commaIndex > -1 ? commaIndex + 1 : result.length; + resolve(result.substring(dataOffset)); + }; + reader.onabort = () => reject(new Error("Read aborted")); + reader.onerror = () => reject(reader.error); + reader.readAsDataURL(blob); + }); + } + __name(readToBase64, "readToBase64"); + } +}); + +// ../../../node_modules/@smithy/util-hex-encoding/dist-cjs/index.js +var require_dist_cjs35 = __commonJS({ + "../../../node_modules/@smithy/util-hex-encoding/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all) => { + for (var name in all) + __defProp2(target, name, { get: all[name], enumerable: true }); }; - __name(_LazyJsonString, "LazyJsonString"); - var LazyJsonString = _LazyJsonString; - function map(arg0, arg1, arg2) { - let target; - let filter; - let instructions; - if (typeof arg1 === "undefined" && typeof arg2 === "undefined") { - target = {}; - instructions = arg0; - } else { - target = arg0; - if (typeof arg1 === "function") { - filter = arg1; - instructions = arg2; - return mapWithFilter(target, filter, instructions); + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + fromHex: () => fromHex, + toHex: () => toHex + }); + module2.exports = __toCommonJS2(src_exports); + var SHORT_TO_HEX = {}; + var HEX_TO_SHORT = {}; + for (let i = 0; i < 256; i++) { + let encodedByte = i.toString(16).toLowerCase(); + if (encodedByte.length === 1) { + encodedByte = `0${encodedByte}`; + } + SHORT_TO_HEX[i] = encodedByte; + HEX_TO_SHORT[encodedByte] = i; + } + function fromHex(encoded) { + if (encoded.length % 2 !== 0) { + throw new Error("Hex encoded strings must have an even number length"); + } + const out = new Uint8Array(encoded.length / 2); + for (let i = 0; i < encoded.length; i += 2) { + const encodedByte = encoded.slice(i, i + 2).toLowerCase(); + if (encodedByte in HEX_TO_SHORT) { + out[i / 2] = HEX_TO_SHORT[encodedByte]; } else { - instructions = arg1; + throw new Error(`Cannot decode unrecognized sequence ${encodedByte} as hexadecimal`); } } - for (const key of Object.keys(instructions)) { - if (!Array.isArray(instructions[key])) { - target[key] = instructions[key]; - continue; - } - applyInstruction(target, null, instructions, key); + return out; + } + __name(fromHex, "fromHex"); + function toHex(bytes) { + let out = ""; + for (let i = 0; i < bytes.byteLength; i++) { + out += SHORT_TO_HEX[bytes[i]]; } - return target; + return out; } - __name(map, "map"); - var convertMap = /* @__PURE__ */ __name((target) => { - const output = {}; - for (const [k, v] of Object.entries(target || {})) { - output[k] = [, v]; + __name(toHex, "toHex"); + } +}); + +// ../../../node_modules/@smithy/smithy-client/node_modules/@smithy/util-stream/dist-cjs/stream-type-check.js +var require_stream_type_check = __commonJS({ + "../../../node_modules/@smithy/smithy-client/node_modules/@smithy/util-stream/dist-cjs/stream-type-check.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isReadableStream = void 0; + var isReadableStream2 = (stream) => { + var _a; + return typeof ReadableStream === "function" && (((_a = stream === null || stream === void 0 ? void 0 : stream.constructor) === null || _a === void 0 ? void 0 : _a.name) === ReadableStream.name || stream instanceof ReadableStream); + }; + exports2.isReadableStream = isReadableStream2; + } +}); + +// ../../../node_modules/@smithy/smithy-client/node_modules/@smithy/util-stream/dist-cjs/sdk-stream-mixin.browser.js +var require_sdk_stream_mixin_browser = __commonJS({ + "../../../node_modules/@smithy/smithy-client/node_modules/@smithy/util-stream/dist-cjs/sdk-stream-mixin.browser.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.sdkStreamMixin = void 0; + var fetch_http_handler_1 = require_dist_cjs34(); + var util_base64_1 = require_dist_cjs29(); + var util_hex_encoding_1 = require_dist_cjs35(); + var util_utf8_1 = require_dist_cjs28(); + var stream_type_check_1 = require_stream_type_check(); + var ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED = "The stream has already been transformed."; + var sdkStreamMixin2 = (stream) => { + var _a, _b; + if (!isBlobInstance(stream) && !(0, stream_type_check_1.isReadableStream)(stream)) { + const name = ((_b = (_a = stream === null || stream === void 0 ? void 0 : stream.__proto__) === null || _a === void 0 ? void 0 : _a.constructor) === null || _b === void 0 ? void 0 : _b.name) || stream; + throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${name}`); } - return output; - }, "convertMap"); - var take = /* @__PURE__ */ __name((source, instructions) => { - const out = {}; - for (const key in instructions) { - applyInstruction(out, source, instructions, key); + let transformed = false; + const transformToByteArray = async () => { + if (transformed) { + throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED); + } + transformed = true; + return await (0, fetch_http_handler_1.streamCollector)(stream); + }; + const blobToWebStream = (blob) => { + if (typeof blob.stream !== "function") { + throw new Error("Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled.\nIf you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body"); + } + return blob.stream(); + }; + return Object.assign(stream, { + transformToByteArray, + transformToString: async (encoding) => { + const buf = await transformToByteArray(); + if (encoding === "base64") { + return (0, util_base64_1.toBase64)(buf); + } else if (encoding === "hex") { + return (0, util_hex_encoding_1.toHex)(buf); + } else if (encoding === void 0 || encoding === "utf8" || encoding === "utf-8") { + return (0, util_utf8_1.toUtf8)(buf); + } else if (typeof TextDecoder === "function") { + return new TextDecoder(encoding).decode(buf); + } else { + throw new Error("TextDecoder is not available, please make sure polyfill is provided."); + } + }, + transformToWebStream: () => { + if (transformed) { + throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED); + } + transformed = true; + if (isBlobInstance(stream)) { + return blobToWebStream(stream); + } else if ((0, stream_type_check_1.isReadableStream)(stream)) { + return stream; + } else { + throw new Error(`Cannot transform payload to web stream, got ${stream}`); + } + } + }); + }; + exports2.sdkStreamMixin = sdkStreamMixin2; + var isBlobInstance = (stream) => typeof Blob === "function" && stream instanceof Blob; + } +}); + +// ../../../node_modules/@smithy/smithy-client/node_modules/@smithy/util-stream/dist-cjs/sdk-stream-mixin.js +var require_sdk_stream_mixin = __commonJS({ + "../../../node_modules/@smithy/smithy-client/node_modules/@smithy/util-stream/dist-cjs/sdk-stream-mixin.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.sdkStreamMixin = void 0; + var node_http_handler_1 = require_dist_cjs33(); + var util_buffer_from_1 = require_dist_cjs27(); + var stream_1 = require("stream"); + var util_1 = require("util"); + var sdk_stream_mixin_browser_1 = require_sdk_stream_mixin_browser(); + var ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED = "The stream has already been transformed."; + var sdkStreamMixin2 = (stream) => { + var _a, _b; + if (!(stream instanceof stream_1.Readable)) { + try { + return (0, sdk_stream_mixin_browser_1.sdkStreamMixin)(stream); + } catch (e) { + const name = ((_b = (_a = stream === null || stream === void 0 ? void 0 : stream.__proto__) === null || _a === void 0 ? void 0 : _a.constructor) === null || _b === void 0 ? void 0 : _b.name) || stream; + throw new Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${name}`); + } } - return out; - }, "take"); - var mapWithFilter = /* @__PURE__ */ __name((target, filter, instructions) => { - return map( - target, - Object.entries(instructions).reduce( - (_instructions, [key, value]) => { - if (Array.isArray(value)) { - _instructions[key] = value; - } else { - if (typeof value === "function") { - _instructions[key] = [filter, value()]; - } else { - _instructions[key] = [filter, value]; - } - } - return _instructions; - }, - {} - ) - ); - }, "mapWithFilter"); - var applyInstruction = /* @__PURE__ */ __name((target, source, instructions, targetKey) => { - if (source !== null) { - let instruction = instructions[targetKey]; - if (typeof instruction === "function") { - instruction = [, instruction]; + let transformed = false; + const transformToByteArray = async () => { + if (transformed) { + throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED); } - const [filter2 = nonNullish, valueFn = pass, sourceKey = targetKey] = instruction; - if (typeof filter2 === "function" && filter2(source[sourceKey]) || typeof filter2 !== "function" && !!filter2) { - target[targetKey] = valueFn(source[sourceKey]); + transformed = true; + return await (0, node_http_handler_1.streamCollector)(stream); + }; + return Object.assign(stream, { + transformToByteArray, + transformToString: async (encoding) => { + const buf = await transformToByteArray(); + if (encoding === void 0 || Buffer.isEncoding(encoding)) { + return (0, util_buffer_from_1.fromArrayBuffer)(buf.buffer, buf.byteOffset, buf.byteLength).toString(encoding); + } else { + const decoder2 = new util_1.TextDecoder(encoding); + return decoder2.decode(buf); + } + }, + transformToWebStream: () => { + if (transformed) { + throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED); + } + if (stream.readableFlowing !== null) { + throw new Error("The stream has been consumed by other callbacks."); + } + if (typeof stream_1.Readable.toWeb !== "function") { + throw new Error("Readable.toWeb() is not supported. Please make sure you are using Node.js >= 17.0.0, or polyfill is available."); + } + transformed = true; + return stream_1.Readable.toWeb(stream); + } + }); + }; + exports2.sdkStreamMixin = sdkStreamMixin2; + } +}); + +// ../../../node_modules/@smithy/smithy-client/node_modules/@smithy/util-stream/dist-cjs/splitStream.browser.js +var require_splitStream_browser = __commonJS({ + "../../../node_modules/@smithy/smithy-client/node_modules/@smithy/util-stream/dist-cjs/splitStream.browser.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.splitStream = void 0; + async function splitStream2(stream) { + if (typeof stream.stream === "function") { + stream = stream.stream(); + } + const readableStream = stream; + return readableStream.tee(); + } + exports2.splitStream = splitStream2; + } +}); + +// ../../../node_modules/@smithy/smithy-client/node_modules/@smithy/util-stream/dist-cjs/splitStream.js +var require_splitStream = __commonJS({ + "../../../node_modules/@smithy/smithy-client/node_modules/@smithy/util-stream/dist-cjs/splitStream.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.splitStream = void 0; + var stream_1 = require("stream"); + var splitStream_browser_1 = require_splitStream_browser(); + var stream_type_check_1 = require_stream_type_check(); + async function splitStream2(stream) { + if ((0, stream_type_check_1.isReadableStream)(stream)) { + return (0, splitStream_browser_1.splitStream)(stream); + } + const stream1 = new stream_1.PassThrough(); + const stream2 = new stream_1.PassThrough(); + stream.pipe(stream1); + stream.pipe(stream2); + return [stream1, stream2]; + } + exports2.splitStream = splitStream2; + } +}); + +// ../../../node_modules/@smithy/smithy-client/node_modules/@smithy/util-stream/dist-cjs/headStream.browser.js +var require_headStream_browser = __commonJS({ + "../../../node_modules/@smithy/smithy-client/node_modules/@smithy/util-stream/dist-cjs/headStream.browser.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.headStream = void 0; + async function headStream2(stream, bytes) { + var _a; + let byteLengthCounter = 0; + const chunks = []; + const reader = stream.getReader(); + let isDone = false; + while (!isDone) { + const { done, value } = await reader.read(); + if (value) { + chunks.push(value); + byteLengthCounter += (_a = value === null || value === void 0 ? void 0 : value.byteLength) !== null && _a !== void 0 ? _a : 0; + } + if (byteLengthCounter >= bytes) { + break; } - return; + isDone = done; } - let [filter, value] = instructions[targetKey]; - if (typeof value === "function") { - let _value; - const defaultFilterPassed = filter === void 0 && (_value = value()) != null; - const customFilterPassed = typeof filter === "function" && !!filter(void 0) || typeof filter !== "function" && !!filter; - if (defaultFilterPassed) { - target[targetKey] = _value; - } else if (customFilterPassed) { - target[targetKey] = value(); - } - } else { - const defaultFilterPassed = filter === void 0 && value != null; - const customFilterPassed = typeof filter === "function" && !!filter(value) || typeof filter !== "function" && !!filter; - if (defaultFilterPassed || customFilterPassed) { - target[targetKey] = value; + reader.releaseLock(); + const collected = new Uint8Array(Math.min(bytes, byteLengthCounter)); + let offset = 0; + for (const chunk of chunks) { + if (chunk.byteLength > collected.byteLength - offset) { + collected.set(chunk.subarray(0, collected.byteLength - offset), offset); + break; + } else { + collected.set(chunk, offset); } + offset += chunk.length; } - }, "applyInstruction"); - var nonNullish = /* @__PURE__ */ __name((_) => _ != null, "nonNullish"); - var pass = /* @__PURE__ */ __name((_) => _, "pass"); - var resolvedPath = /* @__PURE__ */ __name((resolvedPath2, input, memberName, labelValueProvider, uriLabel, isGreedyLabel) => { - if (input != null && input[memberName] !== void 0) { - const labelValue = labelValueProvider(); - if (labelValue.length <= 0) { - throw new Error("Empty value provided for input HTTP label: " + memberName + "."); - } - resolvedPath2 = resolvedPath2.replace( - uriLabel, - isGreedyLabel ? labelValue.split("/").map((segment) => extendedEncodeURIComponent(segment)).join("/") : extendedEncodeURIComponent(labelValue) - ); - } else { - throw new Error("No value provided for input HTTP label: " + memberName + "."); + return collected; + } + exports2.headStream = headStream2; + } +}); + +// ../../../node_modules/@smithy/smithy-client/node_modules/@smithy/util-stream/dist-cjs/headStream.js +var require_headStream = __commonJS({ + "../../../node_modules/@smithy/smithy-client/node_modules/@smithy/util-stream/dist-cjs/headStream.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.headStream = void 0; + var stream_1 = require("stream"); + var headStream_browser_1 = require_headStream_browser(); + var stream_type_check_1 = require_stream_type_check(); + var headStream2 = (stream, bytes) => { + if ((0, stream_type_check_1.isReadableStream)(stream)) { + return (0, headStream_browser_1.headStream)(stream, bytes); } - return resolvedPath2; - }, "resolvedPath"); - var serializeFloat = /* @__PURE__ */ __name((value) => { - if (value !== value) { - return "NaN"; + return new Promise((resolve, reject) => { + const collector = new Collector(); + collector.limit = bytes; + stream.pipe(collector); + stream.on("error", (err) => { + collector.end(); + reject(err); + }); + collector.on("error", reject); + collector.on("finish", function() { + const bytes2 = new Uint8Array(Buffer.concat(this.buffers)); + resolve(bytes2); + }); + }); + }; + exports2.headStream = headStream2; + var Collector = class extends stream_1.Writable { + constructor() { + super(...arguments); + this.buffers = []; + this.limit = Infinity; + this.bytesBuffered = 0; } - switch (value) { - case Infinity: - return "Infinity"; - case -Infinity: - return "-Infinity"; - default: - return value; + _write(chunk, encoding, callback) { + var _a; + this.buffers.push(chunk); + this.bytesBuffered += (_a = chunk.byteLength) !== null && _a !== void 0 ? _a : 0; + if (this.bytesBuffered >= this.limit) { + const excess = this.bytesBuffered - this.limit; + const tailBuffer = this.buffers[this.buffers.length - 1]; + this.buffers[this.buffers.length - 1] = tailBuffer.subarray(0, tailBuffer.byteLength - excess); + this.emit("finish"); + } + callback(); } - }, "serializeFloat"); - var _json = /* @__PURE__ */ __name((obj) => { - if (obj == null) { - return {}; + }; + } +}); + +// ../../../node_modules/@smithy/smithy-client/node_modules/@smithy/util-stream/dist-cjs/index.js +var require_dist_cjs36 = __commonJS({ + "../../../node_modules/@smithy/smithy-client/node_modules/@smithy/util-stream/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all) => { + for (var name in all) + __defProp2(target, name, { get: all[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); } - if (Array.isArray(obj)) { - return obj.filter((_) => _ != null).map(_json); + return to; + }; + var __reExport = (target, mod, secondTarget) => (__copyProps2(target, mod, "default"), secondTarget && __copyProps2(secondTarget, mod, "default")); + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + Uint8ArrayBlobAdapter: () => Uint8ArrayBlobAdapter + }); + module2.exports = __toCommonJS2(src_exports); + var import_util_base64 = require_dist_cjs29(); + var import_util_utf8 = require_dist_cjs28(); + function transformToString(payload, encoding = "utf-8") { + if (encoding === "base64") { + return (0, import_util_base64.toBase64)(payload); } - if (typeof obj === "object") { - const target = {}; - for (const key of Object.keys(obj)) { - if (obj[key] == null) { - continue; - } - target[key] = _json(obj[key]); + return (0, import_util_utf8.toUtf8)(payload); + } + __name(transformToString, "transformToString"); + function transformFromString(str, encoding) { + if (encoding === "base64") { + return Uint8ArrayBlobAdapter.mutate((0, import_util_base64.fromBase64)(str)); + } + return Uint8ArrayBlobAdapter.mutate((0, import_util_utf8.fromUtf8)(str)); + } + __name(transformFromString, "transformFromString"); + var _Uint8ArrayBlobAdapter = class _Uint8ArrayBlobAdapter2 extends Uint8Array { + /** + * @param source - such as a string or Stream. + * @returns a new Uint8ArrayBlobAdapter extending Uint8Array. + */ + static fromString(source, encoding = "utf-8") { + switch (typeof source) { + case "string": + return transformFromString(source, encoding); + default: + throw new Error(`Unsupported conversion from ${typeof source} to Uint8ArrayBlobAdapter.`); } - return target; } - return obj; - }, "_json"); - function splitEvery(value, delimiter, numDelimiters) { - if (numDelimiters <= 0 || !Number.isInteger(numDelimiters)) { - throw new Error("Invalid number of delimiters (" + numDelimiters + ") for splitEvery."); + /** + * @param source - Uint8Array to be mutated. + * @returns the same Uint8Array but with prototype switched to Uint8ArrayBlobAdapter. + */ + static mutate(source) { + Object.setPrototypeOf(source, _Uint8ArrayBlobAdapter2.prototype); + return source; } - const segments = value.split(delimiter); - if (numDelimiters === 1) { - return segments; + /** + * @param encoding - default 'utf-8'. + * @returns the blob as string. + */ + transformToString(encoding = "utf-8") { + return transformToString(this, encoding); } - const compoundSegments = []; - let currentSegment = ""; - for (let i = 0; i < segments.length; i++) { - if (currentSegment === "") { - currentSegment = segments[i]; + }; + __name(_Uint8ArrayBlobAdapter, "Uint8ArrayBlobAdapter"); + var Uint8ArrayBlobAdapter = _Uint8ArrayBlobAdapter; + __reExport(src_exports, require_getAwsChunkedEncodingStream(), module2.exports); + __reExport(src_exports, require_sdk_stream_mixin(), module2.exports); + __reExport(src_exports, require_splitStream(), module2.exports); + __reExport(src_exports, require_headStream(), module2.exports); + __reExport(src_exports, require_stream_type_check(), module2.exports); + } +}); + +// ../../../node_modules/@smithy/smithy-client/dist-cjs/index.js +var require_dist_cjs37 = __commonJS({ + "../../../node_modules/@smithy/smithy-client/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all) => { + for (var name in all) + __defProp2(target, name, { get: all[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + Client: () => Client, + Command: () => Command, + LazyJsonString: () => LazyJsonString, + NoOpLogger: () => NoOpLogger, + SENSITIVE_STRING: () => SENSITIVE_STRING, + ServiceException: () => ServiceException, + StringWrapper: () => StringWrapper, + _json: () => _json, + collectBody: () => collectBody2, + convertMap: () => convertMap, + createAggregatedClient: () => createAggregatedClient, + dateToUtcString: () => dateToUtcString, + decorateServiceException: () => decorateServiceException, + emitWarningIfUnsupportedVersion: () => emitWarningIfUnsupportedVersion2, + expectBoolean: () => expectBoolean, + expectByte: () => expectByte, + expectFloat32: () => expectFloat32, + expectInt: () => expectInt, + expectInt32: () => expectInt32, + expectLong: () => expectLong, + expectNonNull: () => expectNonNull, + expectNumber: () => expectNumber, + expectObject: () => expectObject, + expectShort: () => expectShort, + expectString: () => expectString, + expectUnion: () => expectUnion2, + extendedEncodeURIComponent: () => extendedEncodeURIComponent, + getArrayIfSingleItem: () => getArrayIfSingleItem, + getDefaultClientConfiguration: () => getDefaultClientConfiguration, + getDefaultExtensionConfiguration: () => getDefaultExtensionConfiguration, + getValueFromTextNode: () => getValueFromTextNode2, + handleFloat: () => handleFloat, + isSerializableHeaderValue: () => isSerializableHeaderValue, + limitedParseDouble: () => limitedParseDouble, + limitedParseFloat: () => limitedParseFloat, + limitedParseFloat32: () => limitedParseFloat32, + loadConfigsForDefaultMode: () => loadConfigsForDefaultMode, + logger: () => logger, + map: () => map, + parseBoolean: () => parseBoolean, + parseEpochTimestamp: () => parseEpochTimestamp, + parseRfc3339DateTime: () => parseRfc3339DateTime, + parseRfc3339DateTimeWithOffset: () => parseRfc3339DateTimeWithOffset, + parseRfc7231DateTime: () => parseRfc7231DateTime, + quoteHeader: () => quoteHeader, + resolveDefaultRuntimeConfig: () => resolveDefaultRuntimeConfig, + resolvedPath: () => resolvedPath2, + serializeDateTime: () => serializeDateTime, + serializeFloat: () => serializeFloat, + splitEvery: () => splitEvery, + splitHeader: () => splitHeader, + strictParseByte: () => strictParseByte, + strictParseDouble: () => strictParseDouble, + strictParseFloat: () => strictParseFloat, + strictParseFloat32: () => strictParseFloat32, + strictParseInt: () => strictParseInt, + strictParseInt32: () => strictParseInt32, + strictParseLong: () => strictParseLong, + strictParseShort: () => strictParseShort, + take: () => take, + throwDefaultError: () => throwDefaultError, + withBaseException: () => withBaseException + }); + module2.exports = __toCommonJS2(src_exports); + var import_middleware_stack = require_dist_cjs25(); + var _Client = class _Client { + constructor(config) { + this.config = config; + this.middlewareStack = (0, import_middleware_stack.constructStack)(); + } + send(command, optionsOrCb, cb) { + const options = typeof optionsOrCb !== "function" ? optionsOrCb : void 0; + const callback = typeof optionsOrCb === "function" ? optionsOrCb : cb; + const useHandlerCache = options === void 0 && this.config.cacheMiddleware === true; + let handler2; + if (useHandlerCache) { + if (!this.handlers) { + this.handlers = /* @__PURE__ */ new WeakMap(); + } + const handlers = this.handlers; + if (handlers.has(command.constructor)) { + handler2 = handlers.get(command.constructor); + } else { + handler2 = command.resolveMiddleware(this.middlewareStack, this.config, options); + handlers.set(command.constructor, handler2); + } } else { - currentSegment += delimiter + segments[i]; + delete this.handlers; + handler2 = command.resolveMiddleware(this.middlewareStack, this.config, options); } - if ((i + 1) % numDelimiters === 0) { - compoundSegments.push(currentSegment); - currentSegment = ""; + if (callback) { + handler2(command).then( + (result) => callback(null, result.output), + (err) => callback(err) + ).catch( + // prevent any errors thrown in the callback from triggering an + // unhandled promise rejection + () => { + } + ); + } else { + return handler2(command).then((result) => result.output); } } - if (currentSegment !== "") { - compoundSegments.push(currentSegment); + destroy() { + var _a, _b, _c; + (_c = (_b = (_a = this.config) == null ? void 0 : _a.requestHandler) == null ? void 0 : _b.destroy) == null ? void 0 : _c.call(_b); + delete this.handlers; } - return compoundSegments; - } - __name(splitEvery, "splitEvery"); - } -}); - -// ../../../node_modules/@smithy/middleware-retry/dist-cjs/isStreamingPayload/isStreamingPayload.js -var require_isStreamingPayload = __commonJS({ - "../../../node_modules/@smithy/middleware-retry/dist-cjs/isStreamingPayload/isStreamingPayload.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.isStreamingPayload = void 0; - var stream_1 = require("stream"); - var isStreamingPayload = (request2) => (request2 === null || request2 === void 0 ? void 0 : request2.body) instanceof stream_1.Readable || typeof ReadableStream !== "undefined" && (request2 === null || request2 === void 0 ? void 0 : request2.body) instanceof ReadableStream; - exports2.isStreamingPayload = isStreamingPayload; - } -}); - -// ../../../node_modules/@smithy/middleware-retry/dist-cjs/index.js -var require_dist_cjs35 = __commonJS({ - "../../../node_modules/@smithy/middleware-retry/dist-cjs/index.js"(exports2, module2) { - var __defProp2 = Object.defineProperty; - var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; - var __getOwnPropNames2 = Object.getOwnPropertyNames; - var __hasOwnProp2 = Object.prototype.hasOwnProperty; - var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); - var __export2 = (target, all) => { - for (var name in all) - __defProp2(target, name, { get: all[name], enumerable: true }); }; - var __copyProps2 = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames2(from)) - if (!__hasOwnProp2.call(to, key) && key !== except) - __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + __name(_Client, "Client"); + var Client = _Client; + var import_util_stream = require_dist_cjs36(); + var collectBody2 = /* @__PURE__ */ __name(async (streamBody = new Uint8Array(), context) => { + if (streamBody instanceof Uint8Array) { + return import_util_stream.Uint8ArrayBlobAdapter.mutate(streamBody); } - return to; - }; - var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); - var src_exports = {}; - __export2(src_exports, { - AdaptiveRetryStrategy: () => AdaptiveRetryStrategy, - CONFIG_MAX_ATTEMPTS: () => CONFIG_MAX_ATTEMPTS, - CONFIG_RETRY_MODE: () => CONFIG_RETRY_MODE, - ENV_MAX_ATTEMPTS: () => ENV_MAX_ATTEMPTS, - ENV_RETRY_MODE: () => ENV_RETRY_MODE, - NODE_MAX_ATTEMPT_CONFIG_OPTIONS: () => NODE_MAX_ATTEMPT_CONFIG_OPTIONS, - NODE_RETRY_MODE_CONFIG_OPTIONS: () => NODE_RETRY_MODE_CONFIG_OPTIONS, - StandardRetryStrategy: () => StandardRetryStrategy, - defaultDelayDecider: () => defaultDelayDecider, - defaultRetryDecider: () => defaultRetryDecider, - getOmitRetryHeadersPlugin: () => getOmitRetryHeadersPlugin, - getRetryAfterHint: () => getRetryAfterHint, - getRetryPlugin: () => getRetryPlugin, - omitRetryHeadersMiddleware: () => omitRetryHeadersMiddleware, - omitRetryHeadersMiddlewareOptions: () => omitRetryHeadersMiddlewareOptions, - resolveRetryConfig: () => resolveRetryConfig, - retryMiddleware: () => retryMiddleware, - retryMiddlewareOptions: () => retryMiddlewareOptions - }); - module2.exports = __toCommonJS2(src_exports); - var import_protocol_http = require_dist_cjs2(); - var import_uuid = (init_esm_node(), __toCommonJS(esm_node_exports)); - var import_util_retry = require_dist_cjs28(); - var getDefaultRetryQuota = /* @__PURE__ */ __name((initialRetryTokens, options) => { - const MAX_CAPACITY = initialRetryTokens; - const noRetryIncrement = (options == null ? void 0 : options.noRetryIncrement) ?? import_util_retry.NO_RETRY_INCREMENT; - const retryCost = (options == null ? void 0 : options.retryCost) ?? import_util_retry.RETRY_COST; - const timeoutRetryCost = (options == null ? void 0 : options.timeoutRetryCost) ?? import_util_retry.TIMEOUT_RETRY_COST; - let availableCapacity = initialRetryTokens; - const getCapacityAmount = /* @__PURE__ */ __name((error) => error.name === "TimeoutError" ? timeoutRetryCost : retryCost, "getCapacityAmount"); - const hasRetryTokens = /* @__PURE__ */ __name((error) => getCapacityAmount(error) <= availableCapacity, "hasRetryTokens"); - const retrieveRetryTokens = /* @__PURE__ */ __name((error) => { - if (!hasRetryTokens(error)) { - throw new Error("No retry token available"); - } - const capacityAmount = getCapacityAmount(error); - availableCapacity -= capacityAmount; - return capacityAmount; - }, "retrieveRetryTokens"); - const releaseRetryTokens = /* @__PURE__ */ __name((capacityReleaseAmount) => { - availableCapacity += capacityReleaseAmount ?? noRetryIncrement; - availableCapacity = Math.min(availableCapacity, MAX_CAPACITY); - }, "releaseRetryTokens"); - return Object.freeze({ - hasRetryTokens, - retrieveRetryTokens, - releaseRetryTokens - }); - }, "getDefaultRetryQuota"); - var defaultDelayDecider = /* @__PURE__ */ __name((delayBase, attempts) => Math.floor(Math.min(import_util_retry.MAXIMUM_RETRY_DELAY, Math.random() * 2 ** attempts * delayBase)), "defaultDelayDecider"); - var import_service_error_classification = require_dist_cjs27(); - var defaultRetryDecider = /* @__PURE__ */ __name((error) => { - if (!error) { - return false; + if (!streamBody) { + return import_util_stream.Uint8ArrayBlobAdapter.mutate(new Uint8Array()); } - return (0, import_service_error_classification.isRetryableByTrait)(error) || (0, import_service_error_classification.isClockSkewError)(error) || (0, import_service_error_classification.isThrottlingError)(error) || (0, import_service_error_classification.isTransientError)(error); - }, "defaultRetryDecider"); - var asSdkError = /* @__PURE__ */ __name((error) => { - if (error instanceof Error) - return error; - if (error instanceof Object) - return Object.assign(new Error(), error); - if (typeof error === "string") - return new Error(error); - return new Error(`AWS SDK error wrapper for ${error}`); - }, "asSdkError"); - var _StandardRetryStrategy = class _StandardRetryStrategy { - constructor(maxAttemptsProvider, options) { - this.maxAttemptsProvider = maxAttemptsProvider; - this.mode = import_util_retry.RETRY_MODES.STANDARD; - this.retryDecider = (options == null ? void 0 : options.retryDecider) ?? defaultRetryDecider; - this.delayDecider = (options == null ? void 0 : options.delayDecider) ?? defaultDelayDecider; - this.retryQuota = (options == null ? void 0 : options.retryQuota) ?? getDefaultRetryQuota(import_util_retry.INITIAL_RETRY_TOKENS); + const fromContext = context.streamCollector(streamBody); + return import_util_stream.Uint8ArrayBlobAdapter.mutate(await fromContext); + }, "collectBody"); + var import_types5 = require_dist_cjs(); + var _Command = class _Command { + constructor() { + this.middlewareStack = (0, import_middleware_stack.constructStack)(); } - shouldRetry(error, attempts, maxAttempts) { - return attempts < maxAttempts && this.retryDecider(error) && this.retryQuota.hasRetryTokens(error); + /** + * Factory for Command ClassBuilder. + * @internal + */ + static classBuilder() { + return new ClassBuilder(); } - async getMaxAttempts() { - let maxAttempts; - try { - maxAttempts = await this.maxAttemptsProvider(); - } catch (error) { - maxAttempts = import_util_retry.DEFAULT_MAX_ATTEMPTS; + /** + * @internal + */ + resolveMiddlewareWithContext(clientStack, configuration, options, { + middlewareFn, + clientName, + commandName, + inputFilterSensitiveLog, + outputFilterSensitiveLog, + smithyContext, + additionalContext, + CommandCtor + }) { + for (const mw of middlewareFn.bind(this)(CommandCtor, clientStack, configuration, options)) { + this.middlewareStack.use(mw); } - return maxAttempts; + const stack = clientStack.concat(this.middlewareStack); + const { logger: logger2 } = configuration; + const handlerExecutionContext = { + logger: logger2, + clientName, + commandName, + inputFilterSensitiveLog, + outputFilterSensitiveLog, + [import_types5.SMITHY_CONTEXT_KEY]: { + commandInstance: this, + ...smithyContext + }, + ...additionalContext + }; + const { requestHandler } = configuration; + return stack.resolve( + (request2) => requestHandler.handle(request2.request, options || {}), + handlerExecutionContext + ); + } + }; + __name(_Command, "Command"); + var Command = _Command; + var _ClassBuilder = class _ClassBuilder { + constructor() { + this._init = () => { + }; + this._ep = {}; + this._middlewareFn = () => []; + this._commandName = ""; + this._clientName = ""; + this._additionalContext = {}; + this._smithyContext = {}; + this._inputFilterSensitiveLog = (_) => _; + this._outputFilterSensitiveLog = (_) => _; + this._serializer = null; + this._deserializer = null; + } + /** + * Optional init callback. + */ + init(cb) { + this._init = cb; + } + /** + * Set the endpoint parameter instructions. + */ + ep(endpointParameterInstructions) { + this._ep = endpointParameterInstructions; + return this; + } + /** + * Add any number of middleware. + */ + m(middlewareSupplier) { + this._middlewareFn = middlewareSupplier; + return this; + } + /** + * Set the initial handler execution context Smithy field. + */ + s(service, operation, smithyContext = {}) { + this._smithyContext = { + service, + operation, + ...smithyContext + }; + return this; + } + /** + * Set the initial handler execution context. + */ + c(additionalContext = {}) { + this._additionalContext = additionalContext; + return this; + } + /** + * Set constant string identifiers for the operation. + */ + n(clientName, commandName) { + this._clientName = clientName; + this._commandName = commandName; + return this; + } + /** + * Set the input and output sensistive log filters. + */ + f(inputFilter = (_) => _, outputFilter = (_) => _) { + this._inputFilterSensitiveLog = inputFilter; + this._outputFilterSensitiveLog = outputFilter; + return this; } - async retry(next, args, options) { - let retryTokenAmount; - let attempts = 0; - let totalDelay = 0; - const maxAttempts = await this.getMaxAttempts(); - const { request: request2 } = args; - if (import_protocol_http.HttpRequest.isInstance(request2)) { - request2.headers[import_util_retry.INVOCATION_ID_HEADER] = (0, import_uuid.v4)(); - } - while (true) { - try { - if (import_protocol_http.HttpRequest.isInstance(request2)) { - request2.headers[import_util_retry.REQUEST_HEADER] = `attempt=${attempts + 1}; max=${maxAttempts}`; - } - if (options == null ? void 0 : options.beforeRequest) { - await options.beforeRequest(); - } - const { response, output } = await next(args); - if (options == null ? void 0 : options.afterRequest) { - options.afterRequest(response); - } - this.retryQuota.releaseRetryTokens(retryTokenAmount); - output.$metadata.attempts = attempts + 1; - output.$metadata.totalRetryDelay = totalDelay; - return { response, output }; - } catch (e) { - const err = asSdkError(e); - attempts++; - if (this.shouldRetry(err, attempts, maxAttempts)) { - retryTokenAmount = this.retryQuota.retrieveRetryTokens(err); - const delayFromDecider = this.delayDecider( - (0, import_service_error_classification.isThrottlingError)(err) ? import_util_retry.THROTTLING_RETRY_DELAY_BASE : import_util_retry.DEFAULT_RETRY_DELAY_BASE, - attempts - ); - const delayFromResponse = getDelayFromRetryAfterHeader(err.$response); - const delay = Math.max(delayFromResponse || 0, delayFromDecider); - totalDelay += delay; - await new Promise((resolve) => setTimeout(resolve, delay)); - continue; - } - if (!err.$metadata) { - err.$metadata = {}; - } - err.$metadata.attempts = attempts; - err.$metadata.totalRetryDelay = totalDelay; - throw err; - } - } + /** + * Sets the serializer. + */ + ser(serializer) { + this._serializer = serializer; + return this; } - }; - __name(_StandardRetryStrategy, "StandardRetryStrategy"); - var StandardRetryStrategy = _StandardRetryStrategy; - var getDelayFromRetryAfterHeader = /* @__PURE__ */ __name((response) => { - if (!import_protocol_http.HttpResponse.isInstance(response)) - return; - const retryAfterHeaderName = Object.keys(response.headers).find((key) => key.toLowerCase() === "retry-after"); - if (!retryAfterHeaderName) - return; - const retryAfter = response.headers[retryAfterHeaderName]; - const retryAfterSeconds = Number(retryAfter); - if (!Number.isNaN(retryAfterSeconds)) - return retryAfterSeconds * 1e3; - const retryAfterDate = new Date(retryAfter); - return retryAfterDate.getTime() - Date.now(); - }, "getDelayFromRetryAfterHeader"); - var _AdaptiveRetryStrategy = class _AdaptiveRetryStrategy extends StandardRetryStrategy { - constructor(maxAttemptsProvider, options) { - const { rateLimiter, ...superOptions } = options ?? {}; - super(maxAttemptsProvider, superOptions); - this.rateLimiter = rateLimiter ?? new import_util_retry.DefaultRateLimiter(); - this.mode = import_util_retry.RETRY_MODES.ADAPTIVE; + /** + * Sets the deserializer. + */ + de(deserializer) { + this._deserializer = deserializer; + return this; } - async retry(next, args) { - return super.retry(next, args, { - beforeRequest: async () => { - return this.rateLimiter.getSendToken(); - }, - afterRequest: (response) => { - this.rateLimiter.updateClientSendingRate(response); + /** + * @returns a Command class with the classBuilder properties. + */ + build() { + var _a; + const closure = this; + let CommandRef; + return CommandRef = (_a = class extends Command { + /** + * @public + */ + constructor(...[input]) { + super(); + this.serialize = closure._serializer; + this.deserialize = closure._deserializer; + this.input = input ?? {}; + closure._init(this); } - }); - } - }; - __name(_AdaptiveRetryStrategy, "AdaptiveRetryStrategy"); - var AdaptiveRetryStrategy = _AdaptiveRetryStrategy; - var import_util_middleware = require_dist_cjs7(); - var ENV_MAX_ATTEMPTS = "AWS_MAX_ATTEMPTS"; - var CONFIG_MAX_ATTEMPTS = "max_attempts"; - var NODE_MAX_ATTEMPT_CONFIG_OPTIONS = { - environmentVariableSelector: (env) => { - const value = env[ENV_MAX_ATTEMPTS]; - if (!value) - return void 0; - const maxAttempt = parseInt(value); - if (Number.isNaN(maxAttempt)) { - throw new Error(`Environment variable ${ENV_MAX_ATTEMPTS} mast be a number, got "${value}"`); - } - return maxAttempt; - }, - configFileSelector: (profile) => { - const value = profile[CONFIG_MAX_ATTEMPTS]; - if (!value) - return void 0; - const maxAttempt = parseInt(value); - if (Number.isNaN(maxAttempt)) { - throw new Error(`Shared config file entry ${CONFIG_MAX_ATTEMPTS} mast be a number, got "${value}"`); - } - return maxAttempt; - }, - default: import_util_retry.DEFAULT_MAX_ATTEMPTS - }; - var resolveRetryConfig = /* @__PURE__ */ __name((input) => { - const { retryStrategy } = input; - const maxAttempts = (0, import_util_middleware.normalizeProvider)(input.maxAttempts ?? import_util_retry.DEFAULT_MAX_ATTEMPTS); - return { - ...input, - maxAttempts, - retryStrategy: async () => { - if (retryStrategy) { - return retryStrategy; + /** + * @public + */ + static getEndpointParameterInstructions() { + return closure._ep; } - const retryMode = await (0, import_util_middleware.normalizeProvider)(input.retryMode)(); - if (retryMode === import_util_retry.RETRY_MODES.ADAPTIVE) { - return new import_util_retry.AdaptiveRetryStrategy(maxAttempts); + /** + * @internal + */ + resolveMiddleware(stack, configuration, options) { + return this.resolveMiddlewareWithContext(stack, configuration, options, { + CommandCtor: CommandRef, + middlewareFn: closure._middlewareFn, + clientName: closure._clientName, + commandName: closure._commandName, + inputFilterSensitiveLog: closure._inputFilterSensitiveLog, + outputFilterSensitiveLog: closure._outputFilterSensitiveLog, + smithyContext: closure._smithyContext, + additionalContext: closure._additionalContext + }); } - return new import_util_retry.StandardRetryStrategy(maxAttempts); - } - }; - }, "resolveRetryConfig"); - var ENV_RETRY_MODE = "AWS_RETRY_MODE"; - var CONFIG_RETRY_MODE = "retry_mode"; - var NODE_RETRY_MODE_CONFIG_OPTIONS = { - environmentVariableSelector: (env) => env[ENV_RETRY_MODE], - configFileSelector: (profile) => profile[CONFIG_RETRY_MODE], - default: import_util_retry.DEFAULT_RETRY_MODE - }; - var omitRetryHeadersMiddleware = /* @__PURE__ */ __name(() => (next) => async (args) => { - const { request: request2 } = args; - if (import_protocol_http.HttpRequest.isInstance(request2)) { - delete request2.headers[import_util_retry.INVOCATION_ID_HEADER]; - delete request2.headers[import_util_retry.REQUEST_HEADER]; + }, __name(_a, "CommandRef"), _a); } - return next(args); - }, "omitRetryHeadersMiddleware"); - var omitRetryHeadersMiddlewareOptions = { - name: "omitRetryHeadersMiddleware", - tags: ["RETRY", "HEADERS", "OMIT_RETRY_HEADERS"], - relation: "before", - toMiddleware: "awsAuthMiddleware", - override: true }; - var getOmitRetryHeadersPlugin = /* @__PURE__ */ __name((options) => ({ - applyToStack: (clientStack) => { - clientStack.addRelativeTo(omitRetryHeadersMiddleware(), omitRetryHeadersMiddlewareOptions); - } - }), "getOmitRetryHeadersPlugin"); - var import_smithy_client = require_dist_cjs34(); - var import_isStreamingPayload = require_isStreamingPayload(); - var retryMiddleware = /* @__PURE__ */ __name((options) => (next, context) => async (args) => { - var _a; - let retryStrategy = await options.retryStrategy(); - const maxAttempts = await options.maxAttempts(); - if (isRetryStrategyV2(retryStrategy)) { - retryStrategy = retryStrategy; - let retryToken = await retryStrategy.acquireInitialRetryToken(context["partition_id"]); - let lastError = new Error(); - let attempts = 0; - let totalRetryDelay = 0; - const { request: request2 } = args; - const isRequest = import_protocol_http.HttpRequest.isInstance(request2); - if (isRequest) { - request2.headers[import_util_retry.INVOCATION_ID_HEADER] = (0, import_uuid.v4)(); - } - while (true) { - try { - if (isRequest) { - request2.headers[import_util_retry.REQUEST_HEADER] = `attempt=${attempts + 1}; max=${maxAttempts}`; - } - const { response, output } = await next(args); - retryStrategy.recordSuccess(retryToken); - output.$metadata.attempts = attempts + 1; - output.$metadata.totalRetryDelay = totalRetryDelay; - return { response, output }; - } catch (e) { - const retryErrorInfo = getRetryErrorInfo(e); - lastError = asSdkError(e); - if (isRequest && (0, import_isStreamingPayload.isStreamingPayload)(request2)) { - (_a = context.logger instanceof import_smithy_client.NoOpLogger ? console : context.logger) == null ? void 0 : _a.warn( - "An error was encountered in a non-retryable streaming request." - ); - throw lastError; - } - try { - retryToken = await retryStrategy.refreshRetryTokenForRetry(retryToken, retryErrorInfo); - } catch (refreshError) { - if (!lastError.$metadata) { - lastError.$metadata = {}; - } - lastError.$metadata.attempts = attempts + 1; - lastError.$metadata.totalRetryDelay = totalRetryDelay; - throw lastError; - } - attempts = retryToken.getRetryCount(); - const delay = retryToken.getRetryDelay(); - totalRetryDelay += delay; - await new Promise((resolve) => setTimeout(resolve, delay)); + __name(_ClassBuilder, "ClassBuilder"); + var ClassBuilder = _ClassBuilder; + var SENSITIVE_STRING = "***SensitiveInformation***"; + var createAggregatedClient = /* @__PURE__ */ __name((commands, Client2) => { + for (const command of Object.keys(commands)) { + const CommandCtor = commands[command]; + const methodImpl = /* @__PURE__ */ __name(async function(args, optionsOrCb, cb) { + const command2 = new CommandCtor(args); + if (typeof optionsOrCb === "function") { + this.send(command2, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expected http options but got ${typeof optionsOrCb}`); + this.send(command2, optionsOrCb || {}, cb); + } else { + return this.send(command2, optionsOrCb); } + }, "methodImpl"); + const methodName = (command[0].toLowerCase() + command.slice(1)).replace(/Command$/, ""); + Client2.prototype[methodName] = methodImpl; + } + }, "createAggregatedClient"); + var parseBoolean = /* @__PURE__ */ __name((value) => { + switch (value) { + case "true": + return true; + case "false": + return false; + default: + throw new Error(`Unable to parse boolean value "${value}"`); + } + }, "parseBoolean"); + var expectBoolean = /* @__PURE__ */ __name((value) => { + if (value === null || value === void 0) { + return void 0; + } + if (typeof value === "number") { + if (value === 0 || value === 1) { + logger.warn(stackTraceWarning(`Expected boolean, got ${typeof value}: ${value}`)); + } + if (value === 0) { + return false; + } + if (value === 1) { + return true; } - } else { - retryStrategy = retryStrategy; - if (retryStrategy == null ? void 0 : retryStrategy.mode) - context.userAgent = [...context.userAgent || [], ["cfg/retry-mode", retryStrategy.mode]]; - return retryStrategy.retry(next, args); } - }, "retryMiddleware"); - var isRetryStrategyV2 = /* @__PURE__ */ __name((retryStrategy) => typeof retryStrategy.acquireInitialRetryToken !== "undefined" && typeof retryStrategy.refreshRetryTokenForRetry !== "undefined" && typeof retryStrategy.recordSuccess !== "undefined", "isRetryStrategyV2"); - var getRetryErrorInfo = /* @__PURE__ */ __name((error) => { - const errorInfo = { - error, - errorType: getRetryErrorType(error) - }; - const retryAfterHint = getRetryAfterHint(error.$response); - if (retryAfterHint) { - errorInfo.retryAfterHint = retryAfterHint; + if (typeof value === "string") { + const lower = value.toLowerCase(); + if (lower === "false" || lower === "true") { + logger.warn(stackTraceWarning(`Expected boolean, got ${typeof value}: ${value}`)); + } + if (lower === "false") { + return false; + } + if (lower === "true") { + return true; + } } - return errorInfo; - }, "getRetryErrorInfo"); - var getRetryErrorType = /* @__PURE__ */ __name((error) => { - if ((0, import_service_error_classification.isThrottlingError)(error)) - return "THROTTLING"; - if ((0, import_service_error_classification.isTransientError)(error)) - return "TRANSIENT"; - if ((0, import_service_error_classification.isServerError)(error)) - return "SERVER_ERROR"; - return "CLIENT_ERROR"; - }, "getRetryErrorType"); - var retryMiddlewareOptions = { - name: "retryMiddleware", - tags: ["RETRY"], - step: "finalizeRequest", - priority: "high", - override: true - }; - var getRetryPlugin = /* @__PURE__ */ __name((options) => ({ - applyToStack: (clientStack) => { - clientStack.add(retryMiddleware(options), retryMiddlewareOptions); + if (typeof value === "boolean") { + return value; } - }), "getRetryPlugin"); - var getRetryAfterHint = /* @__PURE__ */ __name((response) => { - if (!import_protocol_http.HttpResponse.isInstance(response)) - return; - const retryAfterHeaderName = Object.keys(response.headers).find((key) => key.toLowerCase() === "retry-after"); - if (!retryAfterHeaderName) - return; - const retryAfter = response.headers[retryAfterHeaderName]; - const retryAfterSeconds = Number(retryAfter); - if (!Number.isNaN(retryAfterSeconds)) - return new Date(retryAfterSeconds * 1e3); - const retryAfterDate = new Date(retryAfter); - return retryAfterDate; - }, "getRetryAfterHint"); - } -}); - -// ../../../node_modules/@aws-sdk/client-sfn/dist-cjs/endpoint/EndpointParameters.js -var require_EndpointParameters = __commonJS({ - "../../../node_modules/@aws-sdk/client-sfn/dist-cjs/endpoint/EndpointParameters.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.resolveClientEndpointParameters = void 0; - var resolveClientEndpointParameters = (options) => { - return { - ...options, - useDualstackEndpoint: options.useDualstackEndpoint ?? false, - useFipsEndpoint: options.useFipsEndpoint ?? false, - defaultSigningName: "states" - }; - }; - exports2.resolveClientEndpointParameters = resolveClientEndpointParameters; - } -}); - -// ../../../node_modules/@aws-sdk/client-sfn/package.json -var require_package = __commonJS({ - "../../../node_modules/@aws-sdk/client-sfn/package.json"(exports2, module2) { - module2.exports = { - name: "@aws-sdk/client-sfn", - description: "AWS SDK for JavaScript Sfn Client for Node.js, Browser and React Native", - version: "3.421.0", - scripts: { - build: "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'", - "build:cjs": "tsc -p tsconfig.cjs.json", - "build:docs": "typedoc", - "build:es": "tsc -p tsconfig.es.json", - "build:include:deps": "lerna run --scope $npm_package_name --include-dependencies build", - "build:types": "tsc -p tsconfig.types.json", - "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4", - clean: "rimraf ./dist-* && rimraf *.tsbuildinfo", - "extract:docs": "api-extractor run --local", - "generate:client": "node ../../scripts/generate-clients/single-service --solo sfn" - }, - main: "./dist-cjs/index.js", - types: "./dist-types/index.d.ts", - module: "./dist-es/index.js", - sideEffects: false, - dependencies: { - "@aws-crypto/sha256-browser": "3.0.0", - "@aws-crypto/sha256-js": "3.0.0", - "@aws-sdk/client-sts": "3.421.0", - "@aws-sdk/credential-provider-node": "3.421.0", - "@aws-sdk/middleware-host-header": "3.418.0", - "@aws-sdk/middleware-logger": "3.418.0", - "@aws-sdk/middleware-recursion-detection": "3.418.0", - "@aws-sdk/middleware-signing": "3.418.0", - "@aws-sdk/middleware-user-agent": "3.418.0", - "@aws-sdk/region-config-resolver": "3.418.0", - "@aws-sdk/types": "3.418.0", - "@aws-sdk/util-endpoints": "3.418.0", - "@aws-sdk/util-user-agent-browser": "3.418.0", - "@aws-sdk/util-user-agent-node": "3.418.0", - "@smithy/config-resolver": "^2.0.10", - "@smithy/fetch-http-handler": "^2.1.5", - "@smithy/hash-node": "^2.0.9", - "@smithy/invalid-dependency": "^2.0.9", - "@smithy/middleware-content-length": "^2.0.11", - "@smithy/middleware-endpoint": "^2.0.9", - "@smithy/middleware-retry": "^2.0.12", - "@smithy/middleware-serde": "^2.0.9", - "@smithy/middleware-stack": "^2.0.2", - "@smithy/node-config-provider": "^2.0.12", - "@smithy/node-http-handler": "^2.1.5", - "@smithy/protocol-http": "^3.0.5", - "@smithy/smithy-client": "^2.1.6", - "@smithy/types": "^2.3.3", - "@smithy/url-parser": "^2.0.9", - "@smithy/util-base64": "^2.0.0", - "@smithy/util-body-length-browser": "^2.0.0", - "@smithy/util-body-length-node": "^2.1.0", - "@smithy/util-defaults-mode-browser": "^2.0.10", - "@smithy/util-defaults-mode-node": "^2.0.12", - "@smithy/util-retry": "^2.0.2", - "@smithy/util-utf8": "^2.0.0", - tslib: "^2.5.0" - }, - devDependencies: { - "@smithy/service-client-documentation-generator": "^2.0.0", - "@tsconfig/node14": "1.0.3", - "@types/node": "^14.14.31", - concurrently: "7.0.0", - "downlevel-dts": "0.10.1", - rimraf: "3.0.2", - typedoc: "0.23.23", - typescript: "~4.9.5" - }, - engines: { - node: ">=14.0.0" - }, - typesVersions: { - "<4.0": { - "dist-types/*": [ - "dist-types/ts3.4/*" - ] + throw new TypeError(`Expected boolean, got ${typeof value}: ${value}`); + }, "expectBoolean"); + var expectNumber = /* @__PURE__ */ __name((value) => { + if (value === null || value === void 0) { + return void 0; + } + if (typeof value === "string") { + const parsed = parseFloat(value); + if (!Number.isNaN(parsed)) { + if (String(parsed) !== String(value)) { + logger.warn(stackTraceWarning(`Expected number but observed string: ${value}`)); + } + return parsed; } - }, - files: [ - "dist-*/**" - ], - author: { - name: "AWS SDK for JavaScript Team", - url: "https://aws.amazon.com/javascript/" - }, - license: "Apache-2.0", - browser: { - "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.browser" - }, - "react-native": { - "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.native" - }, - homepage: "https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sfn", - repository: { - type: "git", - url: "https://github.com/aws/aws-sdk-js-v3.git", - directory: "clients/client-sfn" } - }; - } -}); - -// ../../../node_modules/@aws-sdk/middleware-sdk-sts/dist-cjs/index.js -var require_dist_cjs36 = __commonJS({ - "../../../node_modules/@aws-sdk/middleware-sdk-sts/dist-cjs/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.resolveStsAuthConfig = void 0; - var middleware_signing_1 = require_dist_cjs14(); - var resolveStsAuthConfig = (input, { stsClientCtor }) => (0, middleware_signing_1.resolveAwsAuthConfig)({ - ...input, - stsClientCtor - }); - exports2.resolveStsAuthConfig = resolveStsAuthConfig; - } -}); - -// ../../../node_modules/@aws-sdk/client-sts/dist-cjs/endpoint/EndpointParameters.js -var require_EndpointParameters2 = __commonJS({ - "../../../node_modules/@aws-sdk/client-sts/dist-cjs/endpoint/EndpointParameters.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.resolveClientEndpointParameters = void 0; - var resolveClientEndpointParameters = (options) => { - return { - ...options, - useDualstackEndpoint: options.useDualstackEndpoint ?? false, - useFipsEndpoint: options.useFipsEndpoint ?? false, - useGlobalEndpoint: options.useGlobalEndpoint ?? false, - defaultSigningName: "sts" - }; - }; - exports2.resolveClientEndpointParameters = resolveClientEndpointParameters; - } -}); - -// ../../../node_modules/@aws-sdk/client-sts/package.json -var require_package2 = __commonJS({ - "../../../node_modules/@aws-sdk/client-sts/package.json"(exports2, module2) { - module2.exports = { - name: "@aws-sdk/client-sts", - description: "AWS SDK for JavaScript Sts Client for Node.js, Browser and React Native", - version: "3.421.0", - scripts: { - build: "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'", - "build:cjs": "tsc -p tsconfig.cjs.json", - "build:docs": "typedoc", - "build:es": "tsc -p tsconfig.es.json", - "build:include:deps": "lerna run --scope $npm_package_name --include-dependencies build", - "build:types": "tsc -p tsconfig.types.json", - "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4", - clean: "rimraf ./dist-* && rimraf *.tsbuildinfo", - "extract:docs": "api-extractor run --local", - "generate:client": "node ../../scripts/generate-clients/single-service --solo sts", - test: "yarn test:unit", - "test:unit": "jest" - }, - main: "./dist-cjs/index.js", - types: "./dist-types/index.d.ts", - module: "./dist-es/index.js", - sideEffects: false, - dependencies: { - "@aws-crypto/sha256-browser": "3.0.0", - "@aws-crypto/sha256-js": "3.0.0", - "@aws-sdk/credential-provider-node": "3.421.0", - "@aws-sdk/middleware-host-header": "3.418.0", - "@aws-sdk/middleware-logger": "3.418.0", - "@aws-sdk/middleware-recursion-detection": "3.418.0", - "@aws-sdk/middleware-sdk-sts": "3.418.0", - "@aws-sdk/middleware-signing": "3.418.0", - "@aws-sdk/middleware-user-agent": "3.418.0", - "@aws-sdk/region-config-resolver": "3.418.0", - "@aws-sdk/types": "3.418.0", - "@aws-sdk/util-endpoints": "3.418.0", - "@aws-sdk/util-user-agent-browser": "3.418.0", - "@aws-sdk/util-user-agent-node": "3.418.0", - "@smithy/config-resolver": "^2.0.10", - "@smithy/fetch-http-handler": "^2.1.5", - "@smithy/hash-node": "^2.0.9", - "@smithy/invalid-dependency": "^2.0.9", - "@smithy/middleware-content-length": "^2.0.11", - "@smithy/middleware-endpoint": "^2.0.9", - "@smithy/middleware-retry": "^2.0.12", - "@smithy/middleware-serde": "^2.0.9", - "@smithy/middleware-stack": "^2.0.2", - "@smithy/node-config-provider": "^2.0.12", - "@smithy/node-http-handler": "^2.1.5", - "@smithy/protocol-http": "^3.0.5", - "@smithy/smithy-client": "^2.1.6", - "@smithy/types": "^2.3.3", - "@smithy/url-parser": "^2.0.9", - "@smithy/util-base64": "^2.0.0", - "@smithy/util-body-length-browser": "^2.0.0", - "@smithy/util-body-length-node": "^2.1.0", - "@smithy/util-defaults-mode-browser": "^2.0.10", - "@smithy/util-defaults-mode-node": "^2.0.12", - "@smithy/util-retry": "^2.0.2", - "@smithy/util-utf8": "^2.0.0", - "fast-xml-parser": "4.2.5", - tslib: "^2.5.0" - }, - devDependencies: { - "@smithy/service-client-documentation-generator": "^2.0.0", - "@tsconfig/node14": "1.0.3", - "@types/node": "^14.14.31", - concurrently: "7.0.0", - "downlevel-dts": "0.10.1", - rimraf: "3.0.2", - typedoc: "0.23.23", - typescript: "~4.9.5" - }, - engines: { - node: ">=14.0.0" - }, - typesVersions: { - "<4.0": { - "dist-types/*": [ - "dist-types/ts3.4/*" - ] + if (typeof value === "number") { + return value; + } + throw new TypeError(`Expected number, got ${typeof value}: ${value}`); + }, "expectNumber"); + var MAX_FLOAT = Math.ceil(2 ** 127 * (2 - 2 ** -23)); + var expectFloat32 = /* @__PURE__ */ __name((value) => { + const expected = expectNumber(value); + if (expected !== void 0 && !Number.isNaN(expected) && expected !== Infinity && expected !== -Infinity) { + if (Math.abs(expected) > MAX_FLOAT) { + throw new TypeError(`Expected 32-bit float, got ${value}`); + } + } + return expected; + }, "expectFloat32"); + var expectLong = /* @__PURE__ */ __name((value) => { + if (value === null || value === void 0) { + return void 0; + } + if (Number.isInteger(value) && !Number.isNaN(value)) { + return value; + } + throw new TypeError(`Expected integer, got ${typeof value}: ${value}`); + }, "expectLong"); + var expectInt = expectLong; + var expectInt32 = /* @__PURE__ */ __name((value) => expectSizedInt(value, 32), "expectInt32"); + var expectShort = /* @__PURE__ */ __name((value) => expectSizedInt(value, 16), "expectShort"); + var expectByte = /* @__PURE__ */ __name((value) => expectSizedInt(value, 8), "expectByte"); + var expectSizedInt = /* @__PURE__ */ __name((value, size) => { + const expected = expectLong(value); + if (expected !== void 0 && castInt(expected, size) !== expected) { + throw new TypeError(`Expected ${size}-bit integer, got ${value}`); + } + return expected; + }, "expectSizedInt"); + var castInt = /* @__PURE__ */ __name((value, size) => { + switch (size) { + case 32: + return Int32Array.of(value)[0]; + case 16: + return Int16Array.of(value)[0]; + case 8: + return Int8Array.of(value)[0]; + } + }, "castInt"); + var expectNonNull = /* @__PURE__ */ __name((value, location) => { + if (value === null || value === void 0) { + if (location) { + throw new TypeError(`Expected a non-null value for ${location}`); } - }, - files: [ - "dist-*/**" - ], - author: { - name: "AWS SDK for JavaScript Team", - url: "https://aws.amazon.com/javascript/" - }, - license: "Apache-2.0", - browser: { - "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.browser" - }, - "react-native": { - "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.native" - }, - homepage: "https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sts", - repository: { - type: "git", - url: "https://github.com/aws/aws-sdk-js-v3.git", - directory: "clients/client-sts" + throw new TypeError("Expected a non-null value"); } - }; - } -}); - -// ../../../node_modules/@aws-sdk/client-sts/dist-cjs/models/STSServiceException.js -var require_STSServiceException = __commonJS({ - "../../../node_modules/@aws-sdk/client-sts/dist-cjs/models/STSServiceException.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.STSServiceException = exports2.__ServiceException = void 0; - var smithy_client_1 = require_dist_cjs34(); - Object.defineProperty(exports2, "__ServiceException", { enumerable: true, get: function() { - return smithy_client_1.ServiceException; - } }); - var STSServiceException = class _STSServiceException extends smithy_client_1.ServiceException { - constructor(options) { - super(options); - Object.setPrototypeOf(this, _STSServiceException.prototype); + return value; + }, "expectNonNull"); + var expectObject = /* @__PURE__ */ __name((value) => { + if (value === null || value === void 0) { + return void 0; } - }; - exports2.STSServiceException = STSServiceException; - } -}); - -// ../../../node_modules/@aws-sdk/client-sts/dist-cjs/models/models_0.js -var require_models_0 = __commonJS({ - "../../../node_modules/@aws-sdk/client-sts/dist-cjs/models/models_0.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.GetSessionTokenResponseFilterSensitiveLog = exports2.GetFederationTokenResponseFilterSensitiveLog = exports2.AssumeRoleWithWebIdentityResponseFilterSensitiveLog = exports2.AssumeRoleWithWebIdentityRequestFilterSensitiveLog = exports2.AssumeRoleWithSAMLResponseFilterSensitiveLog = exports2.AssumeRoleWithSAMLRequestFilterSensitiveLog = exports2.AssumeRoleResponseFilterSensitiveLog = exports2.CredentialsFilterSensitiveLog = exports2.InvalidAuthorizationMessageException = exports2.IDPCommunicationErrorException = exports2.InvalidIdentityTokenException = exports2.IDPRejectedClaimException = exports2.RegionDisabledException = exports2.PackedPolicyTooLargeException = exports2.MalformedPolicyDocumentException = exports2.ExpiredTokenException = void 0; - var smithy_client_1 = require_dist_cjs34(); - var STSServiceException_1 = require_STSServiceException(); - var ExpiredTokenException = class _ExpiredTokenException extends STSServiceException_1.STSServiceException { - constructor(opts) { - super({ - name: "ExpiredTokenException", - $fault: "client", - ...opts - }); - this.name = "ExpiredTokenException"; - this.$fault = "client"; - Object.setPrototypeOf(this, _ExpiredTokenException.prototype); + if (typeof value === "object" && !Array.isArray(value)) { + return value; } - }; - exports2.ExpiredTokenException = ExpiredTokenException; - var MalformedPolicyDocumentException = class _MalformedPolicyDocumentException extends STSServiceException_1.STSServiceException { - constructor(opts) { - super({ - name: "MalformedPolicyDocumentException", - $fault: "client", - ...opts - }); - this.name = "MalformedPolicyDocumentException"; - this.$fault = "client"; - Object.setPrototypeOf(this, _MalformedPolicyDocumentException.prototype); + const receivedType = Array.isArray(value) ? "array" : typeof value; + throw new TypeError(`Expected object, got ${receivedType}: ${value}`); + }, "expectObject"); + var expectString = /* @__PURE__ */ __name((value) => { + if (value === null || value === void 0) { + return void 0; } - }; - exports2.MalformedPolicyDocumentException = MalformedPolicyDocumentException; - var PackedPolicyTooLargeException = class _PackedPolicyTooLargeException extends STSServiceException_1.STSServiceException { - constructor(opts) { - super({ - name: "PackedPolicyTooLargeException", - $fault: "client", - ...opts - }); - this.name = "PackedPolicyTooLargeException"; - this.$fault = "client"; - Object.setPrototypeOf(this, _PackedPolicyTooLargeException.prototype); + if (typeof value === "string") { + return value; } - }; - exports2.PackedPolicyTooLargeException = PackedPolicyTooLargeException; - var RegionDisabledException = class _RegionDisabledException extends STSServiceException_1.STSServiceException { - constructor(opts) { - super({ - name: "RegionDisabledException", - $fault: "client", - ...opts - }); - this.name = "RegionDisabledException"; - this.$fault = "client"; - Object.setPrototypeOf(this, _RegionDisabledException.prototype); + if (["boolean", "number", "bigint"].includes(typeof value)) { + logger.warn(stackTraceWarning(`Expected string, got ${typeof value}: ${value}`)); + return String(value); } - }; - exports2.RegionDisabledException = RegionDisabledException; - var IDPRejectedClaimException = class _IDPRejectedClaimException extends STSServiceException_1.STSServiceException { - constructor(opts) { - super({ - name: "IDPRejectedClaimException", - $fault: "client", - ...opts - }); - this.name = "IDPRejectedClaimException"; - this.$fault = "client"; - Object.setPrototypeOf(this, _IDPRejectedClaimException.prototype); + throw new TypeError(`Expected string, got ${typeof value}: ${value}`); + }, "expectString"); + var expectUnion2 = /* @__PURE__ */ __name((value) => { + if (value === null || value === void 0) { + return void 0; } - }; - exports2.IDPRejectedClaimException = IDPRejectedClaimException; - var InvalidIdentityTokenException = class _InvalidIdentityTokenException extends STSServiceException_1.STSServiceException { - constructor(opts) { - super({ - name: "InvalidIdentityTokenException", - $fault: "client", - ...opts - }); - this.name = "InvalidIdentityTokenException"; - this.$fault = "client"; - Object.setPrototypeOf(this, _InvalidIdentityTokenException.prototype); + const asObject = expectObject(value); + const setKeys = Object.entries(asObject).filter(([, v]) => v != null).map(([k]) => k); + if (setKeys.length === 0) { + throw new TypeError(`Unions must have exactly one non-null member. None were found.`); + } + if (setKeys.length > 1) { + throw new TypeError(`Unions must have exactly one non-null member. Keys ${setKeys} were not null.`); + } + return asObject; + }, "expectUnion"); + var strictParseDouble = /* @__PURE__ */ __name((value) => { + if (typeof value == "string") { + return expectNumber(parseNumber(value)); + } + return expectNumber(value); + }, "strictParseDouble"); + var strictParseFloat = strictParseDouble; + var strictParseFloat32 = /* @__PURE__ */ __name((value) => { + if (typeof value == "string") { + return expectFloat32(parseNumber(value)); + } + return expectFloat32(value); + }, "strictParseFloat32"); + var NUMBER_REGEX = /(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g; + var parseNumber = /* @__PURE__ */ __name((value) => { + const matches = value.match(NUMBER_REGEX); + if (matches === null || matches[0].length !== value.length) { + throw new TypeError(`Expected real number, got implicit NaN`); + } + return parseFloat(value); + }, "parseNumber"); + var limitedParseDouble = /* @__PURE__ */ __name((value) => { + if (typeof value == "string") { + return parseFloatString(value); + } + return expectNumber(value); + }, "limitedParseDouble"); + var handleFloat = limitedParseDouble; + var limitedParseFloat = limitedParseDouble; + var limitedParseFloat32 = /* @__PURE__ */ __name((value) => { + if (typeof value == "string") { + return parseFloatString(value); + } + return expectFloat32(value); + }, "limitedParseFloat32"); + var parseFloatString = /* @__PURE__ */ __name((value) => { + switch (value) { + case "NaN": + return NaN; + case "Infinity": + return Infinity; + case "-Infinity": + return -Infinity; + default: + throw new Error(`Unable to parse float value: ${value}`); + } + }, "parseFloatString"); + var strictParseLong = /* @__PURE__ */ __name((value) => { + if (typeof value === "string") { + return expectLong(parseNumber(value)); + } + return expectLong(value); + }, "strictParseLong"); + var strictParseInt = strictParseLong; + var strictParseInt32 = /* @__PURE__ */ __name((value) => { + if (typeof value === "string") { + return expectInt32(parseNumber(value)); + } + return expectInt32(value); + }, "strictParseInt32"); + var strictParseShort = /* @__PURE__ */ __name((value) => { + if (typeof value === "string") { + return expectShort(parseNumber(value)); + } + return expectShort(value); + }, "strictParseShort"); + var strictParseByte = /* @__PURE__ */ __name((value) => { + if (typeof value === "string") { + return expectByte(parseNumber(value)); } + return expectByte(value); + }, "strictParseByte"); + var stackTraceWarning = /* @__PURE__ */ __name((message) => { + return String(new TypeError(message).stack || message).split("\n").slice(0, 5).filter((s) => !s.includes("stackTraceWarning")).join("\n"); + }, "stackTraceWarning"); + var logger = { + warn: console.warn }; - exports2.InvalidIdentityTokenException = InvalidIdentityTokenException; - var IDPCommunicationErrorException = class _IDPCommunicationErrorException extends STSServiceException_1.STSServiceException { - constructor(opts) { - super({ - name: "IDPCommunicationErrorException", - $fault: "client", - ...opts - }); - this.name = "IDPCommunicationErrorException"; - this.$fault = "client"; - Object.setPrototypeOf(this, _IDPCommunicationErrorException.prototype); + var DAYS = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]; + var MONTHS = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]; + function dateToUtcString(date) { + const year = date.getUTCFullYear(); + const month = date.getUTCMonth(); + const dayOfWeek = date.getUTCDay(); + const dayOfMonthInt = date.getUTCDate(); + const hoursInt = date.getUTCHours(); + const minutesInt = date.getUTCMinutes(); + const secondsInt = date.getUTCSeconds(); + const dayOfMonthString = dayOfMonthInt < 10 ? `0${dayOfMonthInt}` : `${dayOfMonthInt}`; + const hoursString = hoursInt < 10 ? `0${hoursInt}` : `${hoursInt}`; + const minutesString = minutesInt < 10 ? `0${minutesInt}` : `${minutesInt}`; + const secondsString = secondsInt < 10 ? `0${secondsInt}` : `${secondsInt}`; + return `${DAYS[dayOfWeek]}, ${dayOfMonthString} ${MONTHS[month]} ${year} ${hoursString}:${minutesString}:${secondsString} GMT`; + } + __name(dateToUtcString, "dateToUtcString"); + var RFC3339 = new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/); + var parseRfc3339DateTime = /* @__PURE__ */ __name((value) => { + if (value === null || value === void 0) { + return void 0; } - }; - exports2.IDPCommunicationErrorException = IDPCommunicationErrorException; - var InvalidAuthorizationMessageException = class _InvalidAuthorizationMessageException extends STSServiceException_1.STSServiceException { - constructor(opts) { - super({ - name: "InvalidAuthorizationMessageException", - $fault: "client", - ...opts - }); - this.name = "InvalidAuthorizationMessageException"; - this.$fault = "client"; - Object.setPrototypeOf(this, _InvalidAuthorizationMessageException.prototype); + if (typeof value !== "string") { + throw new TypeError("RFC-3339 date-times must be expressed as strings"); } - }; - exports2.InvalidAuthorizationMessageException = InvalidAuthorizationMessageException; - var CredentialsFilterSensitiveLog = (obj) => ({ - ...obj, - ...obj.SecretAccessKey && { SecretAccessKey: smithy_client_1.SENSITIVE_STRING } - }); - exports2.CredentialsFilterSensitiveLog = CredentialsFilterSensitiveLog; - var AssumeRoleResponseFilterSensitiveLog = (obj) => ({ - ...obj, - ...obj.Credentials && { Credentials: (0, exports2.CredentialsFilterSensitiveLog)(obj.Credentials) } - }); - exports2.AssumeRoleResponseFilterSensitiveLog = AssumeRoleResponseFilterSensitiveLog; - var AssumeRoleWithSAMLRequestFilterSensitiveLog = (obj) => ({ - ...obj, - ...obj.SAMLAssertion && { SAMLAssertion: smithy_client_1.SENSITIVE_STRING } - }); - exports2.AssumeRoleWithSAMLRequestFilterSensitiveLog = AssumeRoleWithSAMLRequestFilterSensitiveLog; - var AssumeRoleWithSAMLResponseFilterSensitiveLog = (obj) => ({ - ...obj, - ...obj.Credentials && { Credentials: (0, exports2.CredentialsFilterSensitiveLog)(obj.Credentials) } - }); - exports2.AssumeRoleWithSAMLResponseFilterSensitiveLog = AssumeRoleWithSAMLResponseFilterSensitiveLog; - var AssumeRoleWithWebIdentityRequestFilterSensitiveLog = (obj) => ({ - ...obj, - ...obj.WebIdentityToken && { WebIdentityToken: smithy_client_1.SENSITIVE_STRING } - }); - exports2.AssumeRoleWithWebIdentityRequestFilterSensitiveLog = AssumeRoleWithWebIdentityRequestFilterSensitiveLog; - var AssumeRoleWithWebIdentityResponseFilterSensitiveLog = (obj) => ({ - ...obj, - ...obj.Credentials && { Credentials: (0, exports2.CredentialsFilterSensitiveLog)(obj.Credentials) } - }); - exports2.AssumeRoleWithWebIdentityResponseFilterSensitiveLog = AssumeRoleWithWebIdentityResponseFilterSensitiveLog; - var GetFederationTokenResponseFilterSensitiveLog = (obj) => ({ - ...obj, - ...obj.Credentials && { Credentials: (0, exports2.CredentialsFilterSensitiveLog)(obj.Credentials) } - }); - exports2.GetFederationTokenResponseFilterSensitiveLog = GetFederationTokenResponseFilterSensitiveLog; - var GetSessionTokenResponseFilterSensitiveLog = (obj) => ({ - ...obj, - ...obj.Credentials && { Credentials: (0, exports2.CredentialsFilterSensitiveLog)(obj.Credentials) } - }); - exports2.GetSessionTokenResponseFilterSensitiveLog = GetSessionTokenResponseFilterSensitiveLog; - } -}); - -// ../../../node_modules/fast-xml-parser/src/util.js -var require_util2 = __commonJS({ - "../../../node_modules/fast-xml-parser/src/util.js"(exports2) { - "use strict"; - var nameStartChar = ":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD"; - var nameChar = nameStartChar + "\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040"; - var nameRegexp = "[" + nameStartChar + "][" + nameChar + "]*"; - var regexName = new RegExp("^" + nameRegexp + "$"); - var getAllMatches = function(string, regex) { - const matches = []; - let match = regex.exec(string); - while (match) { - const allmatches = []; - allmatches.startIndex = regex.lastIndex - match[0].length; - const len = match.length; - for (let index = 0; index < len; index++) { - allmatches.push(match[index]); - } - matches.push(allmatches); - match = regex.exec(string); + const match = RFC3339.exec(value); + if (!match) { + throw new TypeError("Invalid RFC-3339 date-time value"); } - return matches; - }; - var isName = function(string) { - const match = regexName.exec(string); - return !(match === null || typeof match === "undefined"); - }; - exports2.isExist = function(v) { - return typeof v !== "undefined"; - }; - exports2.isEmptyObject = function(obj) { - return Object.keys(obj).length === 0; - }; - exports2.merge = function(target, a, arrayMode) { - if (a) { - const keys = Object.keys(a); - const len = keys.length; - for (let i = 0; i < len; i++) { - if (arrayMode === "strict") { - target[keys[i]] = [a[keys[i]]]; - } else { - target[keys[i]] = a[keys[i]]; - } - } + const [_, yearStr, monthStr, dayStr, hours, minutes, seconds, fractionalMilliseconds] = match; + const year = strictParseShort(stripLeadingZeroes(yearStr)); + const month = parseDateValue(monthStr, "month", 1, 12); + const day = parseDateValue(dayStr, "day", 1, 31); + return buildDate(year, month, day, { hours, minutes, seconds, fractionalMilliseconds }); + }, "parseRfc3339DateTime"); + var RFC3339_WITH_OFFSET = new RegExp( + /^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/ + ); + var parseRfc3339DateTimeWithOffset = /* @__PURE__ */ __name((value) => { + if (value === null || value === void 0) { + return void 0; } - }; - exports2.getValue = function(v) { - if (exports2.isExist(v)) { - return v; - } else { - return ""; + if (typeof value !== "string") { + throw new TypeError("RFC-3339 date-times must be expressed as strings"); } - }; - exports2.isName = isName; - exports2.getAllMatches = getAllMatches; - exports2.nameRegexp = nameRegexp; - } -}); - -// ../../../node_modules/fast-xml-parser/src/validator.js -var require_validator = __commonJS({ - "../../../node_modules/fast-xml-parser/src/validator.js"(exports2) { - "use strict"; - var util = require_util2(); - var defaultOptions = { - allowBooleanAttributes: false, - //A tag can have attributes without any value - unpairedTags: [] - }; - exports2.validate = function(xmlData, options) { - options = Object.assign({}, defaultOptions, options); - const tags = []; - let tagFound = false; - let reachedRoot = false; - if (xmlData[0] === "\uFEFF") { - xmlData = xmlData.substr(1); + const match = RFC3339_WITH_OFFSET.exec(value); + if (!match) { + throw new TypeError("Invalid RFC-3339 date-time value"); } - for (let i = 0; i < xmlData.length; i++) { - if (xmlData[i] === "<" && xmlData[i + 1] === "?") { - i += 2; - i = readPI(xmlData, i); - if (i.err) return i; - } else if (xmlData[i] === "<") { - let tagStartPos = i; - i++; - if (xmlData[i] === "!") { - i = readCommentAndCDATA(xmlData, i); - continue; - } else { - let closingTag = false; - if (xmlData[i] === "/") { - closingTag = true; - i++; - } - let tagName = ""; - for (; i < xmlData.length && xmlData[i] !== ">" && xmlData[i] !== " " && xmlData[i] !== " " && xmlData[i] !== "\n" && xmlData[i] !== "\r"; i++) { - tagName += xmlData[i]; - } - tagName = tagName.trim(); - if (tagName[tagName.length - 1] === "/") { - tagName = tagName.substring(0, tagName.length - 1); - i--; - } - if (!validateTagName(tagName)) { - let msg; - if (tagName.trim().length === 0) { - msg = "Invalid space after '<'."; - } else { - msg = "Tag '" + tagName + "' is an invalid name."; - } - return getErrorObject("InvalidTag", msg, getLineNumberForPosition(xmlData, i)); - } - const result = readAttributeStr(xmlData, i); - if (result === false) { - return getErrorObject("InvalidAttr", "Attributes for '" + tagName + "' have open quote.", getLineNumberForPosition(xmlData, i)); - } - let attrStr = result.value; - i = result.index; - if (attrStr[attrStr.length - 1] === "/") { - const attrStrStart = i - attrStr.length; - attrStr = attrStr.substring(0, attrStr.length - 1); - const isValid = validateAttributeString(attrStr, options); - if (isValid === true) { - tagFound = true; - } else { - return getErrorObject(isValid.err.code, isValid.err.msg, getLineNumberForPosition(xmlData, attrStrStart + isValid.err.line)); - } - } else if (closingTag) { - if (!result.tagClosed) { - return getErrorObject("InvalidTag", "Closing tag '" + tagName + "' doesn't have proper closing.", getLineNumberForPosition(xmlData, i)); - } else if (attrStr.trim().length > 0) { - return getErrorObject("InvalidTag", "Closing tag '" + tagName + "' can't have attributes or invalid starting.", getLineNumberForPosition(xmlData, tagStartPos)); - } else { - const otg = tags.pop(); - if (tagName !== otg.tagName) { - let openPos = getLineNumberForPosition(xmlData, otg.tagStartPos); - return getErrorObject( - "InvalidTag", - "Expected closing tag '" + otg.tagName + "' (opened in line " + openPos.line + ", col " + openPos.col + ") instead of closing tag '" + tagName + "'.", - getLineNumberForPosition(xmlData, tagStartPos) - ); - } - if (tags.length == 0) { - reachedRoot = true; - } - } - } else { - const isValid = validateAttributeString(attrStr, options); - if (isValid !== true) { - return getErrorObject(isValid.err.code, isValid.err.msg, getLineNumberForPosition(xmlData, i - attrStr.length + isValid.err.line)); - } - if (reachedRoot === true) { - return getErrorObject("InvalidXml", "Multiple possible root nodes found.", getLineNumberForPosition(xmlData, i)); - } else if (options.unpairedTags.indexOf(tagName) !== -1) { - } else { - tags.push({ tagName, tagStartPos }); - } - tagFound = true; - } - for (i++; i < xmlData.length; i++) { - if (xmlData[i] === "<") { - if (xmlData[i + 1] === "!") { - i++; - i = readCommentAndCDATA(xmlData, i); - continue; - } else if (xmlData[i + 1] === "?") { - i = readPI(xmlData, ++i); - if (i.err) return i; - } else { - break; - } - } else if (xmlData[i] === "&") { - const afterAmp = validateAmpersand(xmlData, i); - if (afterAmp == -1) - return getErrorObject("InvalidChar", "char '&' is not expected.", getLineNumberForPosition(xmlData, i)); - i = afterAmp; - } else { - if (reachedRoot === true && !isWhiteSpace(xmlData[i])) { - return getErrorObject("InvalidXml", "Extra text at the end", getLineNumberForPosition(xmlData, i)); - } - } - } - if (xmlData[i] === "<") { - i--; - } - } - } else { - if (isWhiteSpace(xmlData[i])) { - continue; - } - return getErrorObject("InvalidChar", "char '" + xmlData[i] + "' is not expected.", getLineNumberForPosition(xmlData, i)); - } + const [_, yearStr, monthStr, dayStr, hours, minutes, seconds, fractionalMilliseconds, offsetStr] = match; + const year = strictParseShort(stripLeadingZeroes(yearStr)); + const month = parseDateValue(monthStr, "month", 1, 12); + const day = parseDateValue(dayStr, "day", 1, 31); + const date = buildDate(year, month, day, { hours, minutes, seconds, fractionalMilliseconds }); + if (offsetStr.toUpperCase() != "Z") { + date.setTime(date.getTime() - parseOffsetToMilliseconds(offsetStr)); + } + return date; + }, "parseRfc3339DateTimeWithOffset"); + var IMF_FIXDATE = new RegExp( + /^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d{2}) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/ + ); + var RFC_850_DATE = new RegExp( + /^(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d{2})-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/ + ); + var ASC_TIME = new RegExp( + /^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( [1-9]|\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? (\d{4})$/ + ); + var parseRfc7231DateTime = /* @__PURE__ */ __name((value) => { + if (value === null || value === void 0) { + return void 0; } - if (!tagFound) { - return getErrorObject("InvalidXml", "Start tag expected.", 1); - } else if (tags.length == 1) { - return getErrorObject("InvalidTag", "Unclosed tag '" + tags[0].tagName + "'.", getLineNumberForPosition(xmlData, tags[0].tagStartPos)); - } else if (tags.length > 0) { - return getErrorObject("InvalidXml", "Invalid '" + JSON.stringify(tags.map((t) => t.tagName), null, 4).replace(/\r?\n/g, "") + "' found.", { line: 1, col: 1 }); + if (typeof value !== "string") { + throw new TypeError("RFC-7231 date-times must be expressed as strings"); } - return true; - }; - function isWhiteSpace(char) { - return char === " " || char === " " || char === "\n" || char === "\r"; - } - function readPI(xmlData, i) { - const start = i; - for (; i < xmlData.length; i++) { - if (xmlData[i] == "?" || xmlData[i] == " ") { - const tagname = xmlData.substr(start, i - start); - if (i > 5 && tagname === "xml") { - return getErrorObject("InvalidXml", "XML declaration allowed only at the start of the document.", getLineNumberForPosition(xmlData, i)); - } else if (xmlData[i] == "?" && xmlData[i + 1] == ">") { - i++; - break; - } else { - continue; - } - } + let match = IMF_FIXDATE.exec(value); + if (match) { + const [_, dayStr, monthStr, yearStr, hours, minutes, seconds, fractionalMilliseconds] = match; + return buildDate( + strictParseShort(stripLeadingZeroes(yearStr)), + parseMonthByShortName(monthStr), + parseDateValue(dayStr, "day", 1, 31), + { hours, minutes, seconds, fractionalMilliseconds } + ); } - return i; - } - function readCommentAndCDATA(xmlData, i) { - if (xmlData.length > i + 5 && xmlData[i + 1] === "-" && xmlData[i + 2] === "-") { - for (i += 3; i < xmlData.length; i++) { - if (xmlData[i] === "-" && xmlData[i + 1] === "-" && xmlData[i + 2] === ">") { - i += 2; - break; - } - } - } else if (xmlData.length > i + 8 && xmlData[i + 1] === "D" && xmlData[i + 2] === "O" && xmlData[i + 3] === "C" && xmlData[i + 4] === "T" && xmlData[i + 5] === "Y" && xmlData[i + 6] === "P" && xmlData[i + 7] === "E") { - let angleBracketsCount = 1; - for (i += 8; i < xmlData.length; i++) { - if (xmlData[i] === "<") { - angleBracketsCount++; - } else if (xmlData[i] === ">") { - angleBracketsCount--; - if (angleBracketsCount === 0) { - break; - } - } - } - } else if (xmlData.length > i + 9 && xmlData[i + 1] === "[" && xmlData[i + 2] === "C" && xmlData[i + 3] === "D" && xmlData[i + 4] === "A" && xmlData[i + 5] === "T" && xmlData[i + 6] === "A" && xmlData[i + 7] === "[") { - for (i += 8; i < xmlData.length; i++) { - if (xmlData[i] === "]" && xmlData[i + 1] === "]" && xmlData[i + 2] === ">") { - i += 2; - break; - } - } + match = RFC_850_DATE.exec(value); + if (match) { + const [_, dayStr, monthStr, yearStr, hours, minutes, seconds, fractionalMilliseconds] = match; + return adjustRfc850Year( + buildDate(parseTwoDigitYear(yearStr), parseMonthByShortName(monthStr), parseDateValue(dayStr, "day", 1, 31), { + hours, + minutes, + seconds, + fractionalMilliseconds + }) + ); } - return i; - } - var doubleQuote = '"'; - var singleQuote = "'"; - function readAttributeStr(xmlData, i) { - let attrStr = ""; - let startChar = ""; - let tagClosed = false; - for (; i < xmlData.length; i++) { - if (xmlData[i] === doubleQuote || xmlData[i] === singleQuote) { - if (startChar === "") { - startChar = xmlData[i]; - } else if (startChar !== xmlData[i]) { - } else { - startChar = ""; - } - } else if (xmlData[i] === ">") { - if (startChar === "") { - tagClosed = true; - break; - } - } - attrStr += xmlData[i]; + match = ASC_TIME.exec(value); + if (match) { + const [_, monthStr, dayStr, hours, minutes, seconds, fractionalMilliseconds, yearStr] = match; + return buildDate( + strictParseShort(stripLeadingZeroes(yearStr)), + parseMonthByShortName(monthStr), + parseDateValue(dayStr.trimLeft(), "day", 1, 31), + { hours, minutes, seconds, fractionalMilliseconds } + ); } - if (startChar !== "") { - return false; + throw new TypeError("Invalid RFC-7231 date-time value"); + }, "parseRfc7231DateTime"); + var parseEpochTimestamp = /* @__PURE__ */ __name((value) => { + if (value === null || value === void 0) { + return void 0; } - return { - value: attrStr, - index: i, - tagClosed - }; - } - var validAttrStrRegxp = new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`, "g"); - function validateAttributeString(attrStr, options) { - const matches = util.getAllMatches(attrStr, validAttrStrRegxp); - const attrNames = {}; - for (let i = 0; i < matches.length; i++) { - if (matches[i][1].length === 0) { - return getErrorObject("InvalidAttr", "Attribute '" + matches[i][2] + "' has no space in starting.", getPositionFromMatch(matches[i])); - } else if (matches[i][3] !== void 0 && matches[i][4] === void 0) { - return getErrorObject("InvalidAttr", "Attribute '" + matches[i][2] + "' is without value.", getPositionFromMatch(matches[i])); - } else if (matches[i][3] === void 0 && !options.allowBooleanAttributes) { - return getErrorObject("InvalidAttr", "boolean attribute '" + matches[i][2] + "' is not allowed.", getPositionFromMatch(matches[i])); - } - const attrName = matches[i][2]; - if (!validateAttrName(attrName)) { - return getErrorObject("InvalidAttr", "Attribute '" + attrName + "' is an invalid name.", getPositionFromMatch(matches[i])); - } - if (!attrNames.hasOwnProperty(attrName)) { - attrNames[attrName] = 1; - } else { - return getErrorObject("InvalidAttr", "Attribute '" + attrName + "' is repeated.", getPositionFromMatch(matches[i])); - } + let valueAsDouble; + if (typeof value === "number") { + valueAsDouble = value; + } else if (typeof value === "string") { + valueAsDouble = strictParseDouble(value); + } else if (typeof value === "object" && value.tag === 1) { + valueAsDouble = value.value; + } else { + throw new TypeError("Epoch timestamps must be expressed as floating point numbers or their string representation"); + } + if (Number.isNaN(valueAsDouble) || valueAsDouble === Infinity || valueAsDouble === -Infinity) { + throw new TypeError("Epoch timestamps must be valid, non-Infinite, non-NaN numerics"); + } + return new Date(Math.round(valueAsDouble * 1e3)); + }, "parseEpochTimestamp"); + var buildDate = /* @__PURE__ */ __name((year, month, day, time) => { + const adjustedMonth = month - 1; + validateDayOfMonth(year, adjustedMonth, day); + return new Date( + Date.UTC( + year, + adjustedMonth, + day, + parseDateValue(time.hours, "hour", 0, 23), + parseDateValue(time.minutes, "minute", 0, 59), + // seconds can go up to 60 for leap seconds + parseDateValue(time.seconds, "seconds", 0, 60), + parseMilliseconds(time.fractionalMilliseconds) + ) + ); + }, "buildDate"); + var parseTwoDigitYear = /* @__PURE__ */ __name((value) => { + const thisYear = (/* @__PURE__ */ new Date()).getUTCFullYear(); + const valueInThisCentury = Math.floor(thisYear / 100) * 100 + strictParseShort(stripLeadingZeroes(value)); + if (valueInThisCentury < thisYear) { + return valueInThisCentury + 100; + } + return valueInThisCentury; + }, "parseTwoDigitYear"); + var FIFTY_YEARS_IN_MILLIS = 50 * 365 * 24 * 60 * 60 * 1e3; + var adjustRfc850Year = /* @__PURE__ */ __name((input) => { + if (input.getTime() - (/* @__PURE__ */ new Date()).getTime() > FIFTY_YEARS_IN_MILLIS) { + return new Date( + Date.UTC( + input.getUTCFullYear() - 100, + input.getUTCMonth(), + input.getUTCDate(), + input.getUTCHours(), + input.getUTCMinutes(), + input.getUTCSeconds(), + input.getUTCMilliseconds() + ) + ); + } + return input; + }, "adjustRfc850Year"); + var parseMonthByShortName = /* @__PURE__ */ __name((value) => { + const monthIdx = MONTHS.indexOf(value); + if (monthIdx < 0) { + throw new TypeError(`Invalid month: ${value}`); + } + return monthIdx + 1; + }, "parseMonthByShortName"); + var DAYS_IN_MONTH = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; + var validateDayOfMonth = /* @__PURE__ */ __name((year, month, day) => { + let maxDays = DAYS_IN_MONTH[month]; + if (month === 1 && isLeapYear(year)) { + maxDays = 29; + } + if (day > maxDays) { + throw new TypeError(`Invalid day for ${MONTHS[month]} in ${year}: ${day}`); + } + }, "validateDayOfMonth"); + var isLeapYear = /* @__PURE__ */ __name((year) => { + return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0); + }, "isLeapYear"); + var parseDateValue = /* @__PURE__ */ __name((value, type, lower, upper) => { + const dateVal = strictParseByte(stripLeadingZeroes(value)); + if (dateVal < lower || dateVal > upper) { + throw new TypeError(`${type} must be between ${lower} and ${upper}, inclusive`); + } + return dateVal; + }, "parseDateValue"); + var parseMilliseconds = /* @__PURE__ */ __name((value) => { + if (value === null || value === void 0) { + return 0; + } + return strictParseFloat32("0." + value) * 1e3; + }, "parseMilliseconds"); + var parseOffsetToMilliseconds = /* @__PURE__ */ __name((value) => { + const directionStr = value[0]; + let direction = 1; + if (directionStr == "+") { + direction = 1; + } else if (directionStr == "-") { + direction = -1; + } else { + throw new TypeError(`Offset direction, ${directionStr}, must be "+" or "-"`); + } + const hour = Number(value.substring(1, 3)); + const minute = Number(value.substring(4, 6)); + return direction * (hour * 60 + minute) * 60 * 1e3; + }, "parseOffsetToMilliseconds"); + var stripLeadingZeroes = /* @__PURE__ */ __name((value) => { + let idx = 0; + while (idx < value.length - 1 && value.charAt(idx) === "0") { + idx++; + } + if (idx === 0) { + return value; } - return true; - } - function validateNumberAmpersand(xmlData, i) { - let re = /\d/; - if (xmlData[i] === "x") { - i++; - re = /[\da-fA-F]/; + return value.slice(idx); + }, "stripLeadingZeroes"); + var _ServiceException = class _ServiceException2 extends Error { + constructor(options) { + super(options.message); + Object.setPrototypeOf(this, _ServiceException2.prototype); + this.name = options.name; + this.$fault = options.$fault; + this.$metadata = options.$metadata; } - for (; i < xmlData.length; i++) { - if (xmlData[i] === ";") - return i; - if (!xmlData[i].match(re)) - break; + }; + __name(_ServiceException, "ServiceException"); + var ServiceException = _ServiceException; + var decorateServiceException = /* @__PURE__ */ __name((exception, additions = {}) => { + Object.entries(additions).filter(([, v]) => v !== void 0).forEach(([k, v]) => { + if (exception[k] == void 0 || exception[k] === "") { + exception[k] = v; + } + }); + const message = exception.message || exception.Message || "UnknownError"; + exception.message = message; + delete exception.Message; + return exception; + }, "decorateServiceException"); + var throwDefaultError = /* @__PURE__ */ __name(({ output, parsedBody, exceptionCtor, errorCode }) => { + const $metadata = deserializeMetadata(output); + const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : void 0; + const response = new exceptionCtor({ + name: (parsedBody == null ? void 0 : parsedBody.code) || (parsedBody == null ? void 0 : parsedBody.Code) || errorCode || statusCode || "UnknownError", + $fault: "client", + $metadata + }); + throw decorateServiceException(response, parsedBody); + }, "throwDefaultError"); + var withBaseException = /* @__PURE__ */ __name((ExceptionCtor) => { + return ({ output, parsedBody, errorCode }) => { + throwDefaultError({ output, parsedBody, exceptionCtor: ExceptionCtor, errorCode }); + }; + }, "withBaseException"); + var deserializeMetadata = /* @__PURE__ */ __name((output) => ({ + httpStatusCode: output.statusCode, + requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"], + extendedRequestId: output.headers["x-amz-id-2"], + cfId: output.headers["x-amz-cf-id"] + }), "deserializeMetadata"); + var loadConfigsForDefaultMode = /* @__PURE__ */ __name((mode) => { + switch (mode) { + case "standard": + return { + retryMode: "standard", + connectionTimeout: 3100 + }; + case "in-region": + return { + retryMode: "standard", + connectionTimeout: 1100 + }; + case "cross-region": + return { + retryMode: "standard", + connectionTimeout: 3100 + }; + case "mobile": + return { + retryMode: "standard", + connectionTimeout: 3e4 + }; + default: + return {}; } - return -1; - } - function validateAmpersand(xmlData, i) { - i++; - if (xmlData[i] === ";") - return -1; - if (xmlData[i] === "#") { - i++; - return validateNumberAmpersand(xmlData, i); + }, "loadConfigsForDefaultMode"); + var warningEmitted2 = false; + var emitWarningIfUnsupportedVersion2 = /* @__PURE__ */ __name((version2) => { + if (version2 && !warningEmitted2 && parseInt(version2.substring(1, version2.indexOf("."))) < 16) { + warningEmitted2 = true; } - let count = 0; - for (; i < xmlData.length; i++, count++) { - if (xmlData[i].match(/\w/) && count < 20) + }, "emitWarningIfUnsupportedVersion"); + function extendedEncodeURIComponent(str) { + return encodeURIComponent(str).replace(/[!'()*]/g, function(c) { + return "%" + c.charCodeAt(0).toString(16).toUpperCase(); + }); + } + __name(extendedEncodeURIComponent, "extendedEncodeURIComponent"); + var getChecksumConfiguration = /* @__PURE__ */ __name((runtimeConfig) => { + const checksumAlgorithms = []; + for (const id in import_types5.AlgorithmId) { + const algorithmId = import_types5.AlgorithmId[id]; + if (runtimeConfig[algorithmId] === void 0) { continue; - if (xmlData[i] === ";") - break; - return -1; + } + checksumAlgorithms.push({ + algorithmId: () => algorithmId, + checksumConstructor: () => runtimeConfig[algorithmId] + }); } - return i; - } - function getErrorObject(code, message, lineNumber) { return { - err: { - code, - msg: message, - line: lineNumber.line || lineNumber, - col: lineNumber.col + _checksumAlgorithms: checksumAlgorithms, + addChecksumAlgorithm(algo) { + this._checksumAlgorithms.push(algo); + }, + checksumAlgorithms() { + return this._checksumAlgorithms; } }; - } - function validateAttrName(attrName) { - return util.isName(attrName); - } - function validateTagName(tagname) { - return util.isName(tagname); - } - function getLineNumberForPosition(xmlData, index) { - const lines = xmlData.substring(0, index).split(/\r?\n/); + }, "getChecksumConfiguration"); + var resolveChecksumRuntimeConfig = /* @__PURE__ */ __name((clientConfig) => { + const runtimeConfig = {}; + clientConfig.checksumAlgorithms().forEach((checksumAlgorithm) => { + runtimeConfig[checksumAlgorithm.algorithmId()] = checksumAlgorithm.checksumConstructor(); + }); + return runtimeConfig; + }, "resolveChecksumRuntimeConfig"); + var getRetryConfiguration = /* @__PURE__ */ __name((runtimeConfig) => { + let _retryStrategy = runtimeConfig.retryStrategy; return { - line: lines.length, - // column number is last line's length + 1, because column numbering starts at 1: - col: lines[lines.length - 1].length + 1 + setRetryStrategy(retryStrategy) { + _retryStrategy = retryStrategy; + }, + retryStrategy() { + return _retryStrategy; + } }; - } - function getPositionFromMatch(match) { - return match.startIndex + match[1].length; - } - } -}); - -// ../../../node_modules/fast-xml-parser/src/xmlparser/OptionsBuilder.js -var require_OptionsBuilder = __commonJS({ - "../../../node_modules/fast-xml-parser/src/xmlparser/OptionsBuilder.js"(exports2) { - var defaultOptions = { - preserveOrder: false, - attributeNamePrefix: "@_", - attributesGroupName: false, - textNodeName: "#text", - ignoreAttributes: true, - removeNSPrefix: false, - // remove NS from tag name or attribute name if true - allowBooleanAttributes: false, - //a tag can have attributes without any value - //ignoreRootElement : false, - parseTagValue: true, - parseAttributeValue: false, - trimValues: true, - //Trim string values of tag and attributes - cdataPropName: false, - numberParseOptions: { - hex: true, - leadingZeros: true, - eNotation: true - }, - tagValueProcessor: function(tagName, val2) { - return val2; - }, - attributeValueProcessor: function(attrName, val2) { - return val2; - }, - stopNodes: [], - //nested tags will not be parsed even for errors - alwaysCreateTextNode: false, - isArray: () => false, - commentPropName: false, - unpairedTags: [], - processEntities: true, - htmlEntities: false, - ignoreDeclaration: false, - ignorePiTags: false, - transformTagName: false, - transformAttributeName: false, - updateTag: function(tagName, jPath, attrs) { - return tagName; + }, "getRetryConfiguration"); + var resolveRetryRuntimeConfig = /* @__PURE__ */ __name((retryStrategyConfiguration) => { + const runtimeConfig = {}; + runtimeConfig.retryStrategy = retryStrategyConfiguration.retryStrategy(); + return runtimeConfig; + }, "resolveRetryRuntimeConfig"); + var getDefaultExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => { + return { + ...getChecksumConfiguration(runtimeConfig), + ...getRetryConfiguration(runtimeConfig) + }; + }, "getDefaultExtensionConfiguration"); + var getDefaultClientConfiguration = getDefaultExtensionConfiguration; + var resolveDefaultRuntimeConfig = /* @__PURE__ */ __name((config) => { + return { + ...resolveChecksumRuntimeConfig(config), + ...resolveRetryRuntimeConfig(config) + }; + }, "resolveDefaultRuntimeConfig"); + var getArrayIfSingleItem = /* @__PURE__ */ __name((mayBeArray) => Array.isArray(mayBeArray) ? mayBeArray : [mayBeArray], "getArrayIfSingleItem"); + var getValueFromTextNode2 = /* @__PURE__ */ __name((obj) => { + const textNodeName = "#text"; + for (const key in obj) { + if (obj.hasOwnProperty(key) && obj[key][textNodeName] !== void 0) { + obj[key] = obj[key][textNodeName]; + } else if (typeof obj[key] === "object" && obj[key] !== null) { + obj[key] = getValueFromTextNode2(obj[key]); + } + } + return obj; + }, "getValueFromTextNode"); + var isSerializableHeaderValue = /* @__PURE__ */ __name((value) => { + return value != null; + }, "isSerializableHeaderValue"); + var StringWrapper = /* @__PURE__ */ __name(function() { + const Class = Object.getPrototypeOf(this).constructor; + const Constructor = Function.bind.apply(String, [null, ...arguments]); + const instance = new Constructor(); + Object.setPrototypeOf(instance, Class.prototype); + return instance; + }, "StringWrapper"); + StringWrapper.prototype = Object.create(String.prototype, { + constructor: { + value: StringWrapper, + enumerable: false, + writable: true, + configurable: true + } + }); + Object.setPrototypeOf(StringWrapper, String); + var _LazyJsonString = class _LazyJsonString2 extends StringWrapper { + deserializeJSON() { + return JSON.parse(super.toString()); + } + toJSON() { + return super.toString(); + } + static fromObject(object) { + if (object instanceof _LazyJsonString2) { + return object; + } else if (object instanceof String || typeof object === "string") { + return new _LazyJsonString2(object); + } + return new _LazyJsonString2(JSON.stringify(object)); } - // skipEmptyListItem: false - }; - var buildOptions = function(options) { - return Object.assign({}, defaultOptions, options); }; - exports2.buildOptions = buildOptions; - exports2.defaultOptions = defaultOptions; - } -}); - -// ../../../node_modules/fast-xml-parser/src/xmlparser/xmlNode.js -var require_xmlNode = __commonJS({ - "../../../node_modules/fast-xml-parser/src/xmlparser/xmlNode.js"(exports2, module2) { - "use strict"; - var XmlNode = class { - constructor(tagname) { - this.tagname = tagname; - this.child = []; - this[":@"] = {}; + __name(_LazyJsonString, "LazyJsonString"); + var LazyJsonString = _LazyJsonString; + var _NoOpLogger = class _NoOpLogger { + trace() { } - add(key, val2) { - if (key === "__proto__") key = "#__proto__"; - this.child.push({ [key]: val2 }); + debug() { } - addChild(node) { - if (node.tagname === "__proto__") node.tagname = "#__proto__"; - if (node[":@"] && Object.keys(node[":@"]).length > 0) { - this.child.push({ [node.tagname]: node.child, [":@"]: node[":@"] }); + info() { + } + warn() { + } + error() { + } + }; + __name(_NoOpLogger, "NoOpLogger"); + var NoOpLogger = _NoOpLogger; + function map(arg0, arg1, arg2) { + let target; + let filter; + let instructions; + if (typeof arg1 === "undefined" && typeof arg2 === "undefined") { + target = {}; + instructions = arg0; + } else { + target = arg0; + if (typeof arg1 === "function") { + filter = arg1; + instructions = arg2; + return mapWithFilter(target, filter, instructions); } else { - this.child.push({ [node.tagname]: node.child }); + instructions = arg1; } } - }; - module2.exports = XmlNode; - } -}); - -// ../../../node_modules/fast-xml-parser/src/xmlparser/DocTypeReader.js -var require_DocTypeReader = __commonJS({ - "../../../node_modules/fast-xml-parser/src/xmlparser/DocTypeReader.js"(exports2, module2) { - var util = require_util2(); - function readDocType(xmlData, i) { - const entities = {}; - if (xmlData[i + 3] === "O" && xmlData[i + 4] === "C" && xmlData[i + 5] === "T" && xmlData[i + 6] === "Y" && xmlData[i + 7] === "P" && xmlData[i + 8] === "E") { - i = i + 9; - let angleBracketsCount = 1; - let hasBody = false, comment = false; - let exp = ""; - for (; i < xmlData.length; i++) { - if (xmlData[i] === "<" && !comment) { - if (hasBody && isEntity(xmlData, i)) { - i += 7; - [entityName, val, i] = readEntityExp(xmlData, i + 1); - if (val.indexOf("&") === -1) - entities[validateEntityName(entityName)] = { - regx: RegExp(`&${entityName};`, "g"), - val - }; - } else if (hasBody && isElement(xmlData, i)) i += 8; - else if (hasBody && isAttlist(xmlData, i)) i += 8; - else if (hasBody && isNotation(xmlData, i)) i += 9; - else if (isComment) comment = true; - else throw new Error("Invalid DOCTYPE"); - angleBracketsCount++; - exp = ""; - } else if (xmlData[i] === ">") { - if (comment) { - if (xmlData[i - 1] === "-" && xmlData[i - 2] === "-") { - comment = false; - angleBracketsCount--; - } + for (const key of Object.keys(instructions)) { + if (!Array.isArray(instructions[key])) { + target[key] = instructions[key]; + continue; + } + applyInstruction(target, null, instructions, key); + } + return target; + } + __name(map, "map"); + var convertMap = /* @__PURE__ */ __name((target) => { + const output = {}; + for (const [k, v] of Object.entries(target || {})) { + output[k] = [, v]; + } + return output; + }, "convertMap"); + var take = /* @__PURE__ */ __name((source, instructions) => { + const out = {}; + for (const key in instructions) { + applyInstruction(out, source, instructions, key); + } + return out; + }, "take"); + var mapWithFilter = /* @__PURE__ */ __name((target, filter, instructions) => { + return map( + target, + Object.entries(instructions).reduce( + (_instructions, [key, value]) => { + if (Array.isArray(value)) { + _instructions[key] = value; } else { - angleBracketsCount--; - } - if (angleBracketsCount === 0) { - break; + if (typeof value === "function") { + _instructions[key] = [filter, value()]; + } else { + _instructions[key] = [filter, value]; + } } - } else if (xmlData[i] === "[") { - hasBody = true; - } else { - exp += xmlData[i]; - } + return _instructions; + }, + {} + ) + ); + }, "mapWithFilter"); + var applyInstruction = /* @__PURE__ */ __name((target, source, instructions, targetKey) => { + if (source !== null) { + let instruction = instructions[targetKey]; + if (typeof instruction === "function") { + instruction = [, instruction]; } - if (angleBracketsCount !== 0) { - throw new Error(`Unclosed DOCTYPE`); + const [filter2 = nonNullish, valueFn = pass, sourceKey = targetKey] = instruction; + if (typeof filter2 === "function" && filter2(source[sourceKey]) || typeof filter2 !== "function" && !!filter2) { + target[targetKey] = valueFn(source[sourceKey]); } - } else { - throw new Error(`Invalid Tag instead of DOCTYPE`); + return; } - return { entities, i }; - } - function readEntityExp(xmlData, i) { - let entityName2 = ""; - for (; i < xmlData.length && (xmlData[i] !== "'" && xmlData[i] !== '"'); i++) { - entityName2 += xmlData[i]; + let [filter, value] = instructions[targetKey]; + if (typeof value === "function") { + let _value; + const defaultFilterPassed = filter === void 0 && (_value = value()) != null; + const customFilterPassed = typeof filter === "function" && !!filter(void 0) || typeof filter !== "function" && !!filter; + if (defaultFilterPassed) { + target[targetKey] = _value; + } else if (customFilterPassed) { + target[targetKey] = value(); + } + } else { + const defaultFilterPassed = filter === void 0 && value != null; + const customFilterPassed = typeof filter === "function" && !!filter(value) || typeof filter !== "function" && !!filter; + if (defaultFilterPassed || customFilterPassed) { + target[targetKey] = value; + } } - entityName2 = entityName2.trim(); - if (entityName2.indexOf(" ") !== -1) throw new Error("External entites are not supported"); - const startChar = xmlData[i++]; - let val2 = ""; - for (; i < xmlData.length && xmlData[i] !== startChar; i++) { - val2 += xmlData[i]; + }, "applyInstruction"); + var nonNullish = /* @__PURE__ */ __name((_) => _ != null, "nonNullish"); + var pass = /* @__PURE__ */ __name((_) => _, "pass"); + function quoteHeader(part) { + if (part.includes(",") || part.includes('"')) { + part = `"${part.replace(/"/g, '\\"')}"`; } - return [entityName2, val2, i]; - } - function isComment(xmlData, i) { - if (xmlData[i + 1] === "!" && xmlData[i + 2] === "-" && xmlData[i + 3] === "-") return true; - return false; - } - function isEntity(xmlData, i) { - if (xmlData[i + 1] === "!" && xmlData[i + 2] === "E" && xmlData[i + 3] === "N" && xmlData[i + 4] === "T" && xmlData[i + 5] === "I" && xmlData[i + 6] === "T" && xmlData[i + 7] === "Y") return true; - return false; - } - function isElement(xmlData, i) { - if (xmlData[i + 1] === "!" && xmlData[i + 2] === "E" && xmlData[i + 3] === "L" && xmlData[i + 4] === "E" && xmlData[i + 5] === "M" && xmlData[i + 6] === "E" && xmlData[i + 7] === "N" && xmlData[i + 8] === "T") return true; - return false; - } - function isAttlist(xmlData, i) { - if (xmlData[i + 1] === "!" && xmlData[i + 2] === "A" && xmlData[i + 3] === "T" && xmlData[i + 4] === "T" && xmlData[i + 5] === "L" && xmlData[i + 6] === "I" && xmlData[i + 7] === "S" && xmlData[i + 8] === "T") return true; - return false; - } - function isNotation(xmlData, i) { - if (xmlData[i + 1] === "!" && xmlData[i + 2] === "N" && xmlData[i + 3] === "O" && xmlData[i + 4] === "T" && xmlData[i + 5] === "A" && xmlData[i + 6] === "T" && xmlData[i + 7] === "I" && xmlData[i + 8] === "O" && xmlData[i + 9] === "N") return true; - return false; - } - function validateEntityName(name) { - if (util.isName(name)) - return name; - else - throw new Error(`Invalid entity name ${name}`); - } - module2.exports = readDocType; - } -}); - -// ../../../node_modules/strnum/strnum.js -var require_strnum = __commonJS({ - "../../../node_modules/strnum/strnum.js"(exports2, module2) { - var hexRegex = /^[-+]?0x[a-fA-F0-9]+$/; - var numRegex = /^([\-\+])?(0*)(\.[0-9]+([eE]\-?[0-9]+)?|[0-9]+(\.[0-9]+([eE]\-?[0-9]+)?)?)$/; - if (!Number.parseInt && window.parseInt) { - Number.parseInt = window.parseInt; - } - if (!Number.parseFloat && window.parseFloat) { - Number.parseFloat = window.parseFloat; + return part; } - var consider = { - hex: true, - leadingZeros: true, - decimalPoint: ".", - eNotation: true - //skipLike: /regex/ - }; - function toNumber(str, options = {}) { - options = Object.assign({}, consider, options); - if (!str || typeof str !== "string") return str; - let trimmedStr = str.trim(); - if (options.skipLike !== void 0 && options.skipLike.test(trimmedStr)) return str; - else if (options.hex && hexRegex.test(trimmedStr)) { - return Number.parseInt(trimmedStr, 16); + __name(quoteHeader, "quoteHeader"); + var resolvedPath2 = /* @__PURE__ */ __name((resolvedPath22, input, memberName, labelValueProvider, uriLabel, isGreedyLabel) => { + if (input != null && input[memberName] !== void 0) { + const labelValue = labelValueProvider(); + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: " + memberName + "."); + } + resolvedPath22 = resolvedPath22.replace( + uriLabel, + isGreedyLabel ? labelValue.split("/").map((segment) => extendedEncodeURIComponent(segment)).join("/") : extendedEncodeURIComponent(labelValue) + ); } else { - const match = numRegex.exec(trimmedStr); - if (match) { - const sign = match[1]; - const leadingZeros = match[2]; - let numTrimmedByZeros = trimZeros(match[3]); - const eNotation = match[4] || match[6]; - if (!options.leadingZeros && leadingZeros.length > 0 && sign && trimmedStr[2] !== ".") return str; - else if (!options.leadingZeros && leadingZeros.length > 0 && !sign && trimmedStr[1] !== ".") return str; - else { - const num = Number(trimmedStr); - const numStr = "" + num; - if (numStr.search(/[eE]/) !== -1) { - if (options.eNotation) return num; - else return str; - } else if (eNotation) { - if (options.eNotation) return num; - else return str; - } else if (trimmedStr.indexOf(".") !== -1) { - if (numStr === "0" && numTrimmedByZeros === "") return num; - else if (numStr === numTrimmedByZeros) return num; - else if (sign && numStr === "-" + numTrimmedByZeros) return num; - else return str; - } - if (leadingZeros) { - if (numTrimmedByZeros === numStr) return num; - else if (sign + numTrimmedByZeros === numStr) return num; - else return str; - } - if (trimmedStr === numStr) return num; - else if (trimmedStr === sign + numStr) return num; - return str; + throw new Error("No value provided for input HTTP label: " + memberName + "."); + } + return resolvedPath22; + }, "resolvedPath"); + var serializeFloat = /* @__PURE__ */ __name((value) => { + if (value !== value) { + return "NaN"; + } + switch (value) { + case Infinity: + return "Infinity"; + case -Infinity: + return "-Infinity"; + default: + return value; + } + }, "serializeFloat"); + var serializeDateTime = /* @__PURE__ */ __name((date) => date.toISOString().replace(".000Z", "Z"), "serializeDateTime"); + var _json = /* @__PURE__ */ __name((obj) => { + if (obj == null) { + return {}; + } + if (Array.isArray(obj)) { + return obj.filter((_) => _ != null).map(_json); + } + if (typeof obj === "object") { + const target = {}; + for (const key of Object.keys(obj)) { + if (obj[key] == null) { + continue; } + target[key] = _json(obj[key]); + } + return target; + } + return obj; + }, "_json"); + function splitEvery(value, delimiter, numDelimiters) { + if (numDelimiters <= 0 || !Number.isInteger(numDelimiters)) { + throw new Error("Invalid number of delimiters (" + numDelimiters + ") for splitEvery."); + } + const segments = value.split(delimiter); + if (numDelimiters === 1) { + return segments; + } + const compoundSegments = []; + let currentSegment = ""; + for (let i = 0; i < segments.length; i++) { + if (currentSegment === "") { + currentSegment = segments[i]; } else { - return str; + currentSegment += delimiter + segments[i]; + } + if ((i + 1) % numDelimiters === 0) { + compoundSegments.push(currentSegment); + currentSegment = ""; } } - } - function trimZeros(numStr) { - if (numStr && numStr.indexOf(".") !== -1) { - numStr = numStr.replace(/0+$/, ""); - if (numStr === ".") numStr = "0"; - else if (numStr[0] === ".") numStr = "0" + numStr; - else if (numStr[numStr.length - 1] === ".") numStr = numStr.substr(0, numStr.length - 1); - return numStr; + if (currentSegment !== "") { + compoundSegments.push(currentSegment); } - return numStr; + return compoundSegments; } - module2.exports = toNumber; + __name(splitEvery, "splitEvery"); + var splitHeader = /* @__PURE__ */ __name((value) => { + const z = value.length; + const values = []; + let withinQuotes = false; + let prevChar = void 0; + let anchor = 0; + for (let i = 0; i < z; ++i) { + const char = value[i]; + switch (char) { + case `"`: + if (prevChar !== "\\") { + withinQuotes = !withinQuotes; + } + break; + case ",": + if (!withinQuotes) { + values.push(value.slice(anchor, i)); + anchor = i + 1; + } + break; + default: + } + prevChar = char; + } + values.push(value.slice(anchor)); + return values.map((v) => { + v = v.trim(); + const z2 = v.length; + if (z2 < 2) { + return v; + } + if (v[0] === `"` && v[z2 - 1] === `"`) { + v = v.slice(1, z2 - 1); + } + return v.replace(/\\"/g, '"'); + }); + }, "splitHeader"); } }); -// ../../../node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js -var require_OrderedObjParser = __commonJS({ - "../../../node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js"(exports2, module2) { +// ../../../node_modules/@smithy/middleware-retry/dist-cjs/isStreamingPayload/isStreamingPayload.js +var require_isStreamingPayload = __commonJS({ + "../../../node_modules/@smithy/middleware-retry/dist-cjs/isStreamingPayload/isStreamingPayload.js"(exports2) { "use strict"; - var util = require_util2(); - var xmlNode = require_xmlNode(); - var readDocType = require_DocTypeReader(); - var toNumber = require_strnum(); - var regx = "<((!\\[CDATA\\[([\\s\\S]*?)(]]>))|((NAME:)?(NAME))([^>]*)>|((\\/)(NAME)\\s*>))([^<]*)".replace(/NAME/g, util.nameRegexp); - var OrderedObjParser = class { - constructor(options) { - this.options = options; - this.currentNode = null; - this.tagsNodeStack = []; - this.docTypeEntities = {}; - this.lastEntities = { - "apos": { regex: /&(apos|#39|#x27);/g, val: "'" }, - "gt": { regex: /&(gt|#62|#x3E);/g, val: ">" }, - "lt": { regex: /&(lt|#60|#x3C);/g, val: "<" }, - "quot": { regex: /&(quot|#34|#x22);/g, val: '"' } - }; - this.ampEntity = { regex: /&(amp|#38|#x26);/g, val: "&" }; - this.htmlEntities = { - "space": { regex: /&(nbsp|#160);/g, val: " " }, - // "lt" : { regex: /&(lt|#60);/g, val: "<" }, - // "gt" : { regex: /&(gt|#62);/g, val: ">" }, - // "amp" : { regex: /&(amp|#38);/g, val: "&" }, - // "quot" : { regex: /&(quot|#34);/g, val: "\"" }, - // "apos" : { regex: /&(apos|#39);/g, val: "'" }, - "cent": { regex: /&(cent|#162);/g, val: "\xA2" }, - "pound": { regex: /&(pound|#163);/g, val: "\xA3" }, - "yen": { regex: /&(yen|#165);/g, val: "\xA5" }, - "euro": { regex: /&(euro|#8364);/g, val: "\u20AC" }, - "copyright": { regex: /&(copy|#169);/g, val: "\xA9" }, - "reg": { regex: /&(reg|#174);/g, val: "\xAE" }, - "inr": { regex: /&(inr|#8377);/g, val: "\u20B9" } - }; - this.addExternalEntities = addExternalEntities; - this.parseXml = parseXml; - this.parseTextData = parseTextData; - this.resolveNameSpace = resolveNameSpace; - this.buildAttributesMap = buildAttributesMap; - this.isItStopNode = isItStopNode; - this.replaceEntitiesValue = replaceEntitiesValue; - this.readStopNodeData = readStopNodeData; - this.saveTextToParentTag = saveTextToParentTag; - this.addChild = addChild; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isStreamingPayload = void 0; + var stream_1 = require("stream"); + var isStreamingPayload = (request2) => (request2 === null || request2 === void 0 ? void 0 : request2.body) instanceof stream_1.Readable || typeof ReadableStream !== "undefined" && (request2 === null || request2 === void 0 ? void 0 : request2.body) instanceof ReadableStream; + exports2.isStreamingPayload = isStreamingPayload; + } +}); + +// ../../../node_modules/@smithy/middleware-retry/dist-cjs/index.js +var require_dist_cjs38 = __commonJS({ + "../../../node_modules/@smithy/middleware-retry/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all) => { + for (var name in all) + __defProp2(target, name, { get: all[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); } + return to; }; - function addExternalEntities(externalEntities) { - const entKeys = Object.keys(externalEntities); - for (let i = 0; i < entKeys.length; i++) { - const ent = entKeys[i]; - this.lastEntities[ent] = { - regex: new RegExp("&" + ent + ";", "g"), - val: externalEntities[ent] - }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + AdaptiveRetryStrategy: () => AdaptiveRetryStrategy, + CONFIG_MAX_ATTEMPTS: () => CONFIG_MAX_ATTEMPTS, + CONFIG_RETRY_MODE: () => CONFIG_RETRY_MODE, + ENV_MAX_ATTEMPTS: () => ENV_MAX_ATTEMPTS, + ENV_RETRY_MODE: () => ENV_RETRY_MODE, + NODE_MAX_ATTEMPT_CONFIG_OPTIONS: () => NODE_MAX_ATTEMPT_CONFIG_OPTIONS, + NODE_RETRY_MODE_CONFIG_OPTIONS: () => NODE_RETRY_MODE_CONFIG_OPTIONS, + StandardRetryStrategy: () => StandardRetryStrategy, + defaultDelayDecider: () => defaultDelayDecider, + defaultRetryDecider: () => defaultRetryDecider, + getOmitRetryHeadersPlugin: () => getOmitRetryHeadersPlugin, + getRetryAfterHint: () => getRetryAfterHint, + getRetryPlugin: () => getRetryPlugin, + omitRetryHeadersMiddleware: () => omitRetryHeadersMiddleware, + omitRetryHeadersMiddlewareOptions: () => omitRetryHeadersMiddlewareOptions, + resolveRetryConfig: () => resolveRetryConfig, + retryMiddleware: () => retryMiddleware, + retryMiddlewareOptions: () => retryMiddlewareOptions2 + }); + module2.exports = __toCommonJS2(src_exports); + var import_protocol_http8 = require_dist_cjs21(); + var import_uuid = (init_esm_node(), __toCommonJS(esm_node_exports)); + var import_util_retry = require_dist_cjs23(); + var getDefaultRetryQuota = /* @__PURE__ */ __name((initialRetryTokens, options) => { + const MAX_CAPACITY = initialRetryTokens; + const noRetryIncrement = (options == null ? void 0 : options.noRetryIncrement) ?? import_util_retry.NO_RETRY_INCREMENT; + const retryCost = (options == null ? void 0 : options.retryCost) ?? import_util_retry.RETRY_COST; + const timeoutRetryCost = (options == null ? void 0 : options.timeoutRetryCost) ?? import_util_retry.TIMEOUT_RETRY_COST; + let availableCapacity = initialRetryTokens; + const getCapacityAmount = /* @__PURE__ */ __name((error) => error.name === "TimeoutError" ? timeoutRetryCost : retryCost, "getCapacityAmount"); + const hasRetryTokens = /* @__PURE__ */ __name((error) => getCapacityAmount(error) <= availableCapacity, "hasRetryTokens"); + const retrieveRetryTokens = /* @__PURE__ */ __name((error) => { + if (!hasRetryTokens(error)) { + throw new Error("No retry token available"); + } + const capacityAmount = getCapacityAmount(error); + availableCapacity -= capacityAmount; + return capacityAmount; + }, "retrieveRetryTokens"); + const releaseRetryTokens = /* @__PURE__ */ __name((capacityReleaseAmount) => { + availableCapacity += capacityReleaseAmount ?? noRetryIncrement; + availableCapacity = Math.min(availableCapacity, MAX_CAPACITY); + }, "releaseRetryTokens"); + return Object.freeze({ + hasRetryTokens, + retrieveRetryTokens, + releaseRetryTokens + }); + }, "getDefaultRetryQuota"); + var defaultDelayDecider = /* @__PURE__ */ __name((delayBase, attempts) => Math.floor(Math.min(import_util_retry.MAXIMUM_RETRY_DELAY, Math.random() * 2 ** attempts * delayBase)), "defaultDelayDecider"); + var import_service_error_classification = require_dist_cjs22(); + var defaultRetryDecider = /* @__PURE__ */ __name((error) => { + if (!error) { + return false; + } + return (0, import_service_error_classification.isRetryableByTrait)(error) || (0, import_service_error_classification.isClockSkewError)(error) || (0, import_service_error_classification.isThrottlingError)(error) || (0, import_service_error_classification.isTransientError)(error); + }, "defaultRetryDecider"); + var asSdkError = /* @__PURE__ */ __name((error) => { + if (error instanceof Error) + return error; + if (error instanceof Object) + return Object.assign(new Error(), error); + if (typeof error === "string") + return new Error(error); + return new Error(`AWS SDK error wrapper for ${error}`); + }, "asSdkError"); + var _StandardRetryStrategy = class _StandardRetryStrategy { + constructor(maxAttemptsProvider, options) { + this.maxAttemptsProvider = maxAttemptsProvider; + this.mode = import_util_retry.RETRY_MODES.STANDARD; + this.retryDecider = (options == null ? void 0 : options.retryDecider) ?? defaultRetryDecider; + this.delayDecider = (options == null ? void 0 : options.delayDecider) ?? defaultDelayDecider; + this.retryQuota = (options == null ? void 0 : options.retryQuota) ?? getDefaultRetryQuota(import_util_retry.INITIAL_RETRY_TOKENS); } - } - function parseTextData(val2, tagName, jPath, dontTrim, hasAttributes, isLeafNode, escapeEntities) { - if (val2 !== void 0) { - if (this.options.trimValues && !dontTrim) { - val2 = val2.trim(); - } - if (val2.length > 0) { - if (!escapeEntities) val2 = this.replaceEntitiesValue(val2); - const newval = this.options.tagValueProcessor(tagName, val2, jPath, hasAttributes, isLeafNode); - if (newval === null || newval === void 0) { - return val2; - } else if (typeof newval !== typeof val2 || newval !== val2) { - return newval; - } else if (this.options.trimValues) { - return parseValue(val2, this.options.parseTagValue, this.options.numberParseOptions); - } else { - const trimmedVal = val2.trim(); - if (trimmedVal === val2) { - return parseValue(val2, this.options.parseTagValue, this.options.numberParseOptions); - } else { - return val2; - } - } - } + shouldRetry(error, attempts, maxAttempts) { + return attempts < maxAttempts && this.retryDecider(error) && this.retryQuota.hasRetryTokens(error); } - } - function resolveNameSpace(tagname) { - if (this.options.removeNSPrefix) { - const tags = tagname.split(":"); - const prefix = tagname.charAt(0) === "/" ? "/" : ""; - if (tags[0] === "xmlns") { - return ""; - } - if (tags.length === 2) { - tagname = prefix + tags[1]; + async getMaxAttempts() { + let maxAttempts; + try { + maxAttempts = await this.maxAttemptsProvider(); + } catch (error) { + maxAttempts = import_util_retry.DEFAULT_MAX_ATTEMPTS; } + return maxAttempts; } - return tagname; - } - var attrsRegx = new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`, "gm"); - function buildAttributesMap(attrStr, jPath, tagName) { - if (!this.options.ignoreAttributes && typeof attrStr === "string") { - const matches = util.getAllMatches(attrStr, attrsRegx); - const len = matches.length; - const attrs = {}; - for (let i = 0; i < len; i++) { - const attrName = this.resolveNameSpace(matches[i][1]); - let oldVal = matches[i][4]; - let aName = this.options.attributeNamePrefix + attrName; - if (attrName.length) { - if (this.options.transformAttributeName) { - aName = this.options.transformAttributeName(aName); - } - if (aName === "__proto__") aName = "#__proto__"; - if (oldVal !== void 0) { - if (this.options.trimValues) { - oldVal = oldVal.trim(); - } - oldVal = this.replaceEntitiesValue(oldVal); - const newVal = this.options.attributeValueProcessor(attrName, oldVal, jPath); - if (newVal === null || newVal === void 0) { - attrs[aName] = oldVal; - } else if (typeof newVal !== typeof oldVal || newVal !== oldVal) { - attrs[aName] = newVal; - } else { - attrs[aName] = parseValue( - oldVal, - this.options.parseAttributeValue, - this.options.numberParseOptions - ); - } - } else if (this.options.allowBooleanAttributes) { - attrs[aName] = true; - } - } - } - if (!Object.keys(attrs).length) { - return; - } - if (this.options.attributesGroupName) { - const attrCollection = {}; - attrCollection[this.options.attributesGroupName] = attrs; - return attrCollection; + async retry(next, args, options) { + let retryTokenAmount; + let attempts = 0; + let totalDelay = 0; + const maxAttempts = await this.getMaxAttempts(); + const { request: request2 } = args; + if (import_protocol_http8.HttpRequest.isInstance(request2)) { + request2.headers[import_util_retry.INVOCATION_ID_HEADER] = (0, import_uuid.v4)(); } - return attrs; - } - } - var parseXml = function(xmlData) { - xmlData = xmlData.replace(/\r\n?/g, "\n"); - const xmlObj = new xmlNode("!xml"); - let currentNode = xmlObj; - let textData = ""; - let jPath = ""; - for (let i = 0; i < xmlData.length; i++) { - const ch = xmlData[i]; - if (ch === "<") { - if (xmlData[i + 1] === "/") { - const closeIndex = findClosingIndex(xmlData, ">", i, "Closing Tag is not closed."); - let tagName = xmlData.substring(i + 2, closeIndex).trim(); - if (this.options.removeNSPrefix) { - const colonIndex = tagName.indexOf(":"); - if (colonIndex !== -1) { - tagName = tagName.substr(colonIndex + 1); - } - } - if (this.options.transformTagName) { - tagName = this.options.transformTagName(tagName); - } - if (currentNode) { - textData = this.saveTextToParentTag(textData, currentNode, jPath); - } - const lastTagName = jPath.substring(jPath.lastIndexOf(".") + 1); - if (tagName && this.options.unpairedTags.indexOf(tagName) !== -1) { - throw new Error(`Unpaired tag can not be used as closing tag: `); - } - let propIndex = 0; - if (lastTagName && this.options.unpairedTags.indexOf(lastTagName) !== -1) { - propIndex = jPath.lastIndexOf(".", jPath.lastIndexOf(".") - 1); - this.tagsNodeStack.pop(); - } else { - propIndex = jPath.lastIndexOf("."); - } - jPath = jPath.substring(0, propIndex); - currentNode = this.tagsNodeStack.pop(); - textData = ""; - i = closeIndex; - } else if (xmlData[i + 1] === "?") { - let tagData = readTagExp(xmlData, i, false, "?>"); - if (!tagData) throw new Error("Pi Tag is not closed."); - textData = this.saveTextToParentTag(textData, currentNode, jPath); - if (this.options.ignoreDeclaration && tagData.tagName === "?xml" || this.options.ignorePiTags) { - } else { - const childNode = new xmlNode(tagData.tagName); - childNode.add(this.options.textNodeName, ""); - if (tagData.tagName !== tagData.tagExp && tagData.attrExpPresent) { - childNode[":@"] = this.buildAttributesMap(tagData.tagExp, jPath, tagData.tagName); - } - this.addChild(currentNode, childNode, jPath); - } - i = tagData.closeIndex + 1; - } else if (xmlData.substr(i + 1, 3) === "!--") { - const endIndex = findClosingIndex(xmlData, "-->", i + 4, "Comment is not closed."); - if (this.options.commentPropName) { - const comment = xmlData.substring(i + 4, endIndex - 2); - textData = this.saveTextToParentTag(textData, currentNode, jPath); - currentNode.add(this.options.commentPropName, [{ [this.options.textNodeName]: comment }]); - } - i = endIndex; - } else if (xmlData.substr(i + 1, 2) === "!D") { - const result = readDocType(xmlData, i); - this.docTypeEntities = result.entities; - i = result.i; - } else if (xmlData.substr(i + 1, 2) === "![") { - const closeIndex = findClosingIndex(xmlData, "]]>", i, "CDATA is not closed.") - 2; - const tagExp = xmlData.substring(i + 9, closeIndex); - textData = this.saveTextToParentTag(textData, currentNode, jPath); - if (this.options.cdataPropName) { - currentNode.add(this.options.cdataPropName, [{ [this.options.textNodeName]: tagExp }]); - } else { - let val2 = this.parseTextData(tagExp, currentNode.tagname, jPath, true, false, true); - if (val2 == void 0) val2 = ""; - currentNode.add(this.options.textNodeName, val2); - } - i = closeIndex + 2; - } else { - let result = readTagExp(xmlData, i, this.options.removeNSPrefix); - let tagName = result.tagName; - let tagExp = result.tagExp; - let attrExpPresent = result.attrExpPresent; - let closeIndex = result.closeIndex; - if (this.options.transformTagName) { - tagName = this.options.transformTagName(tagName); - } - if (currentNode && textData) { - if (currentNode.tagname !== "!xml") { - textData = this.saveTextToParentTag(textData, currentNode, jPath, false); - } - } - const lastTag = currentNode; - if (lastTag && this.options.unpairedTags.indexOf(lastTag.tagname) !== -1) { - currentNode = this.tagsNodeStack.pop(); - jPath = jPath.substring(0, jPath.lastIndexOf(".")); - } - if (tagName !== xmlObj.tagname) { - jPath += jPath ? "." + tagName : tagName; + while (true) { + try { + if (import_protocol_http8.HttpRequest.isInstance(request2)) { + request2.headers[import_util_retry.REQUEST_HEADER] = `attempt=${attempts + 1}; max=${maxAttempts}`; } - if (this.isItStopNode(this.options.stopNodes, jPath, tagName)) { - let tagContent = ""; - if (tagExp.length > 0 && tagExp.lastIndexOf("/") === tagExp.length - 1) { - i = result.closeIndex; - } else if (this.options.unpairedTags.indexOf(tagName) !== -1) { - i = result.closeIndex; - } else { - const result2 = this.readStopNodeData(xmlData, tagName, closeIndex + 1); - if (!result2) throw new Error(`Unexpected end of ${tagName}`); - i = result2.i; - tagContent = result2.tagContent; - } - const childNode = new xmlNode(tagName); - if (tagName !== tagExp && attrExpPresent) { - childNode[":@"] = this.buildAttributesMap(tagExp, jPath, tagName); - } - if (tagContent) { - tagContent = this.parseTextData(tagContent, tagName, jPath, true, attrExpPresent, true, true); - } - jPath = jPath.substr(0, jPath.lastIndexOf(".")); - childNode.add(this.options.textNodeName, tagContent); - this.addChild(currentNode, childNode, jPath); - } else { - if (tagExp.length > 0 && tagExp.lastIndexOf("/") === tagExp.length - 1) { - if (tagName[tagName.length - 1] === "/") { - tagName = tagName.substr(0, tagName.length - 1); - tagExp = tagName; - } else { - tagExp = tagExp.substr(0, tagExp.length - 1); - } - if (this.options.transformTagName) { - tagName = this.options.transformTagName(tagName); - } - const childNode = new xmlNode(tagName); - if (tagName !== tagExp && attrExpPresent) { - childNode[":@"] = this.buildAttributesMap(tagExp, jPath, tagName); - } - this.addChild(currentNode, childNode, jPath); - jPath = jPath.substr(0, jPath.lastIndexOf(".")); - } else { - const childNode = new xmlNode(tagName); - this.tagsNodeStack.push(currentNode); - if (tagName !== tagExp && attrExpPresent) { - childNode[":@"] = this.buildAttributesMap(tagExp, jPath, tagName); - } - this.addChild(currentNode, childNode, jPath); - currentNode = childNode; - } - textData = ""; - i = closeIndex; + if (options == null ? void 0 : options.beforeRequest) { + await options.beforeRequest(); } + const { response, output } = await next(args); + if (options == null ? void 0 : options.afterRequest) { + options.afterRequest(response); + } + this.retryQuota.releaseRetryTokens(retryTokenAmount); + output.$metadata.attempts = attempts + 1; + output.$metadata.totalRetryDelay = totalDelay; + return { response, output }; + } catch (e) { + const err = asSdkError(e); + attempts++; + if (this.shouldRetry(err, attempts, maxAttempts)) { + retryTokenAmount = this.retryQuota.retrieveRetryTokens(err); + const delayFromDecider = this.delayDecider( + (0, import_service_error_classification.isThrottlingError)(err) ? import_util_retry.THROTTLING_RETRY_DELAY_BASE : import_util_retry.DEFAULT_RETRY_DELAY_BASE, + attempts + ); + const delayFromResponse = getDelayFromRetryAfterHeader(err.$response); + const delay = Math.max(delayFromResponse || 0, delayFromDecider); + totalDelay += delay; + await new Promise((resolve) => setTimeout(resolve, delay)); + continue; + } + if (!err.$metadata) { + err.$metadata = {}; + } + err.$metadata.attempts = attempts; + err.$metadata.totalRetryDelay = totalDelay; + throw err; } - } else { - textData += xmlData[i]; } } - return xmlObj.child; }; - function addChild(currentNode, childNode, jPath) { - const result = this.options.updateTag(childNode.tagname, jPath, childNode[":@"]); - if (result === false) { - } else if (typeof result === "string") { - childNode.tagname = result; - currentNode.addChild(childNode); - } else { - currentNode.addChild(childNode); + __name(_StandardRetryStrategy, "StandardRetryStrategy"); + var StandardRetryStrategy = _StandardRetryStrategy; + var getDelayFromRetryAfterHeader = /* @__PURE__ */ __name((response) => { + if (!import_protocol_http8.HttpResponse.isInstance(response)) + return; + const retryAfterHeaderName = Object.keys(response.headers).find((key) => key.toLowerCase() === "retry-after"); + if (!retryAfterHeaderName) + return; + const retryAfter = response.headers[retryAfterHeaderName]; + const retryAfterSeconds = Number(retryAfter); + if (!Number.isNaN(retryAfterSeconds)) + return retryAfterSeconds * 1e3; + const retryAfterDate = new Date(retryAfter); + return retryAfterDate.getTime() - Date.now(); + }, "getDelayFromRetryAfterHeader"); + var _AdaptiveRetryStrategy = class _AdaptiveRetryStrategy extends StandardRetryStrategy { + constructor(maxAttemptsProvider, options) { + const { rateLimiter, ...superOptions } = options ?? {}; + super(maxAttemptsProvider, superOptions); + this.rateLimiter = rateLimiter ?? new import_util_retry.DefaultRateLimiter(); + this.mode = import_util_retry.RETRY_MODES.ADAPTIVE; } - } - var replaceEntitiesValue = function(val2) { - if (this.options.processEntities) { - for (let entityName2 in this.docTypeEntities) { - const entity = this.docTypeEntities[entityName2]; - val2 = val2.replace(entity.regx, entity.val); - } - for (let entityName2 in this.lastEntities) { - const entity = this.lastEntities[entityName2]; - val2 = val2.replace(entity.regex, entity.val); - } - if (this.options.htmlEntities) { - for (let entityName2 in this.htmlEntities) { - const entity = this.htmlEntities[entityName2]; - val2 = val2.replace(entity.regex, entity.val); + async retry(next, args) { + return super.retry(next, args, { + beforeRequest: async () => { + return this.rateLimiter.getSendToken(); + }, + afterRequest: (response) => { + this.rateLimiter.updateClientSendingRate(response); } - } - val2 = val2.replace(this.ampEntity.regex, this.ampEntity.val); + }); } - return val2; }; - function saveTextToParentTag(textData, currentNode, jPath, isLeafNode) { - if (textData) { - if (isLeafNode === void 0) isLeafNode = Object.keys(currentNode.child).length === 0; - textData = this.parseTextData( - textData, - currentNode.tagname, - jPath, - false, - currentNode[":@"] ? Object.keys(currentNode[":@"]).length !== 0 : false, - isLeafNode - ); - if (textData !== void 0 && textData !== "") - currentNode.add(this.options.textNodeName, textData); - textData = ""; - } - return textData; - } - function isItStopNode(stopNodes, jPath, currentTagName) { - const allNodesExp = "*." + currentTagName; - for (const stopNodePath in stopNodes) { - const stopNodeExp = stopNodes[stopNodePath]; - if (allNodesExp === stopNodeExp || jPath === stopNodeExp) return true; - } - return false; - } - function tagExpWithClosingIndex(xmlData, i, closingChar = ">") { - let attrBoundary; - let tagExp = ""; - for (let index = i; index < xmlData.length; index++) { - let ch = xmlData[index]; - if (attrBoundary) { - if (ch === attrBoundary) attrBoundary = ""; - } else if (ch === '"' || ch === "'") { - attrBoundary = ch; - } else if (ch === closingChar[0]) { - if (closingChar[1]) { - if (xmlData[index + 1] === closingChar[1]) { - return { - data: tagExp, - index - }; - } - } else { - return { - data: tagExp, - index - }; - } - } else if (ch === " ") { - ch = " "; + __name(_AdaptiveRetryStrategy, "AdaptiveRetryStrategy"); + var AdaptiveRetryStrategy = _AdaptiveRetryStrategy; + var import_util_middleware3 = require_dist_cjs24(); + var ENV_MAX_ATTEMPTS = "AWS_MAX_ATTEMPTS"; + var CONFIG_MAX_ATTEMPTS = "max_attempts"; + var NODE_MAX_ATTEMPT_CONFIG_OPTIONS = { + environmentVariableSelector: (env) => { + const value = env[ENV_MAX_ATTEMPTS]; + if (!value) + return void 0; + const maxAttempt = parseInt(value); + if (Number.isNaN(maxAttempt)) { + throw new Error(`Environment variable ${ENV_MAX_ATTEMPTS} mast be a number, got "${value}"`); } - tagExp += ch; - } - } - function findClosingIndex(xmlData, str, i, errMsg) { - const closingIndex = xmlData.indexOf(str, i); - if (closingIndex === -1) { - throw new Error(errMsg); - } else { - return closingIndex + str.length - 1; - } - } - function readTagExp(xmlData, i, removeNSPrefix, closingChar = ">") { - const result = tagExpWithClosingIndex(xmlData, i + 1, closingChar); - if (!result) return; - let tagExp = result.data; - const closeIndex = result.index; - const separatorIndex = tagExp.search(/\s/); - let tagName = tagExp; - let attrExpPresent = true; - if (separatorIndex !== -1) { - tagName = tagExp.substr(0, separatorIndex).replace(/\s\s*$/, ""); - tagExp = tagExp.substr(separatorIndex + 1); - } - if (removeNSPrefix) { - const colonIndex = tagName.indexOf(":"); - if (colonIndex !== -1) { - tagName = tagName.substr(colonIndex + 1); - attrExpPresent = tagName !== result.data.substr(colonIndex + 1); + return maxAttempt; + }, + configFileSelector: (profile) => { + const value = profile[CONFIG_MAX_ATTEMPTS]; + if (!value) + return void 0; + const maxAttempt = parseInt(value); + if (Number.isNaN(maxAttempt)) { + throw new Error(`Shared config file entry ${CONFIG_MAX_ATTEMPTS} mast be a number, got "${value}"`); } - } + return maxAttempt; + }, + default: import_util_retry.DEFAULT_MAX_ATTEMPTS + }; + var resolveRetryConfig = /* @__PURE__ */ __name((input) => { + const { retryStrategy } = input; + const maxAttempts = (0, import_util_middleware3.normalizeProvider)(input.maxAttempts ?? import_util_retry.DEFAULT_MAX_ATTEMPTS); return { - tagName, - tagExp, - closeIndex, - attrExpPresent + ...input, + maxAttempts, + retryStrategy: async () => { + if (retryStrategy) { + return retryStrategy; + } + const retryMode = await (0, import_util_middleware3.normalizeProvider)(input.retryMode)(); + if (retryMode === import_util_retry.RETRY_MODES.ADAPTIVE) { + return new import_util_retry.AdaptiveRetryStrategy(maxAttempts); + } + return new import_util_retry.StandardRetryStrategy(maxAttempts); + } }; - } - function readStopNodeData(xmlData, tagName, i) { - const startIndex = i; - let openTagCount = 1; - for (; i < xmlData.length; i++) { - if (xmlData[i] === "<") { - if (xmlData[i + 1] === "/") { - const closeIndex = findClosingIndex(xmlData, ">", i, `${tagName} is not closed`); - let closeTagName = xmlData.substring(i + 2, closeIndex).trim(); - if (closeTagName === tagName) { - openTagCount--; - if (openTagCount === 0) { - return { - tagContent: xmlData.substring(startIndex, i), - i: closeIndex - }; - } + }, "resolveRetryConfig"); + var ENV_RETRY_MODE = "AWS_RETRY_MODE"; + var CONFIG_RETRY_MODE = "retry_mode"; + var NODE_RETRY_MODE_CONFIG_OPTIONS = { + environmentVariableSelector: (env) => env[ENV_RETRY_MODE], + configFileSelector: (profile) => profile[CONFIG_RETRY_MODE], + default: import_util_retry.DEFAULT_RETRY_MODE + }; + var omitRetryHeadersMiddleware = /* @__PURE__ */ __name(() => (next) => async (args) => { + const { request: request2 } = args; + if (import_protocol_http8.HttpRequest.isInstance(request2)) { + delete request2.headers[import_util_retry.INVOCATION_ID_HEADER]; + delete request2.headers[import_util_retry.REQUEST_HEADER]; + } + return next(args); + }, "omitRetryHeadersMiddleware"); + var omitRetryHeadersMiddlewareOptions = { + name: "omitRetryHeadersMiddleware", + tags: ["RETRY", "HEADERS", "OMIT_RETRY_HEADERS"], + relation: "before", + toMiddleware: "awsAuthMiddleware", + override: true + }; + var getOmitRetryHeadersPlugin = /* @__PURE__ */ __name((options) => ({ + applyToStack: (clientStack) => { + clientStack.addRelativeTo(omitRetryHeadersMiddleware(), omitRetryHeadersMiddlewareOptions); + } + }), "getOmitRetryHeadersPlugin"); + var import_smithy_client5 = require_dist_cjs37(); + var import_isStreamingPayload = require_isStreamingPayload(); + var retryMiddleware = /* @__PURE__ */ __name((options) => (next, context) => async (args) => { + var _a; + let retryStrategy = await options.retryStrategy(); + const maxAttempts = await options.maxAttempts(); + if (isRetryStrategyV2(retryStrategy)) { + retryStrategy = retryStrategy; + let retryToken = await retryStrategy.acquireInitialRetryToken(context["partition_id"]); + let lastError = new Error(); + let attempts = 0; + let totalRetryDelay = 0; + const { request: request2 } = args; + const isRequest = import_protocol_http8.HttpRequest.isInstance(request2); + if (isRequest) { + request2.headers[import_util_retry.INVOCATION_ID_HEADER] = (0, import_uuid.v4)(); + } + while (true) { + try { + if (isRequest) { + request2.headers[import_util_retry.REQUEST_HEADER] = `attempt=${attempts + 1}; max=${maxAttempts}`; } - i = closeIndex; - } else if (xmlData[i + 1] === "?") { - const closeIndex = findClosingIndex(xmlData, "?>", i + 1, "StopNode is not closed."); - i = closeIndex; - } else if (xmlData.substr(i + 1, 3) === "!--") { - const closeIndex = findClosingIndex(xmlData, "-->", i + 3, "StopNode is not closed."); - i = closeIndex; - } else if (xmlData.substr(i + 1, 2) === "![") { - const closeIndex = findClosingIndex(xmlData, "]]>", i, "StopNode is not closed.") - 2; - i = closeIndex; - } else { - const tagData = readTagExp(xmlData, i, ">"); - if (tagData) { - const openTagName = tagData && tagData.tagName; - if (openTagName === tagName && tagData.tagExp[tagData.tagExp.length - 1] !== "/") { - openTagCount++; + const { response, output } = await next(args); + retryStrategy.recordSuccess(retryToken); + output.$metadata.attempts = attempts + 1; + output.$metadata.totalRetryDelay = totalRetryDelay; + return { response, output }; + } catch (e) { + const retryErrorInfo = getRetryErrorInfo(e); + lastError = asSdkError(e); + if (isRequest && (0, import_isStreamingPayload.isStreamingPayload)(request2)) { + (_a = context.logger instanceof import_smithy_client5.NoOpLogger ? console : context.logger) == null ? void 0 : _a.warn( + "An error was encountered in a non-retryable streaming request." + ); + throw lastError; + } + try { + retryToken = await retryStrategy.refreshRetryTokenForRetry(retryToken, retryErrorInfo); + } catch (refreshError) { + if (!lastError.$metadata) { + lastError.$metadata = {}; } - i = tagData.closeIndex; + lastError.$metadata.attempts = attempts + 1; + lastError.$metadata.totalRetryDelay = totalRetryDelay; + throw lastError; } + attempts = retryToken.getRetryCount(); + const delay = retryToken.getRetryDelay(); + totalRetryDelay += delay; + await new Promise((resolve) => setTimeout(resolve, delay)); } } - } - } - function parseValue(val2, shouldParse, options) { - if (shouldParse && typeof val2 === "string") { - const newval = val2.trim(); - if (newval === "true") return true; - else if (newval === "false") return false; - else return toNumber(val2, options); } else { - if (util.isExist(val2)) { - return val2; - } else { - return ""; - } + retryStrategy = retryStrategy; + if (retryStrategy == null ? void 0 : retryStrategy.mode) + context.userAgent = [...context.userAgent || [], ["cfg/retry-mode", retryStrategy.mode]]; + return retryStrategy.retry(next, args); } - } - module2.exports = OrderedObjParser; + }, "retryMiddleware"); + var isRetryStrategyV2 = /* @__PURE__ */ __name((retryStrategy) => typeof retryStrategy.acquireInitialRetryToken !== "undefined" && typeof retryStrategy.refreshRetryTokenForRetry !== "undefined" && typeof retryStrategy.recordSuccess !== "undefined", "isRetryStrategyV2"); + var getRetryErrorInfo = /* @__PURE__ */ __name((error) => { + const errorInfo = { + error, + errorType: getRetryErrorType(error) + }; + const retryAfterHint = getRetryAfterHint(error.$response); + if (retryAfterHint) { + errorInfo.retryAfterHint = retryAfterHint; + } + return errorInfo; + }, "getRetryErrorInfo"); + var getRetryErrorType = /* @__PURE__ */ __name((error) => { + if ((0, import_service_error_classification.isThrottlingError)(error)) + return "THROTTLING"; + if ((0, import_service_error_classification.isTransientError)(error)) + return "TRANSIENT"; + if ((0, import_service_error_classification.isServerError)(error)) + return "SERVER_ERROR"; + return "CLIENT_ERROR"; + }, "getRetryErrorType"); + var retryMiddlewareOptions2 = { + name: "retryMiddleware", + tags: ["RETRY"], + step: "finalizeRequest", + priority: "high", + override: true + }; + var getRetryPlugin = /* @__PURE__ */ __name((options) => ({ + applyToStack: (clientStack) => { + clientStack.add(retryMiddleware(options), retryMiddlewareOptions2); + } + }), "getRetryPlugin"); + var getRetryAfterHint = /* @__PURE__ */ __name((response) => { + if (!import_protocol_http8.HttpResponse.isInstance(response)) + return; + const retryAfterHeaderName = Object.keys(response.headers).find((key) => key.toLowerCase() === "retry-after"); + if (!retryAfterHeaderName) + return; + const retryAfter = response.headers[retryAfterHeaderName]; + const retryAfterSeconds = Number(retryAfter); + if (!Number.isNaN(retryAfterSeconds)) + return new Date(retryAfterSeconds * 1e3); + const retryAfterDate = new Date(retryAfter); + return retryAfterDate; + }, "getRetryAfterHint"); } }); -// ../../../node_modules/fast-xml-parser/src/xmlparser/node2json.js -var require_node2json = __commonJS({ - "../../../node_modules/fast-xml-parser/src/xmlparser/node2json.js"(exports2) { - "use strict"; - function prettify(node, options) { - return compress(node, options); - } - function compress(arr, options, jPath) { - let text; - const compressedObj = {}; - for (let i = 0; i < arr.length; i++) { - const tagObj = arr[i]; - const property = propName(tagObj); - let newJpath = ""; - if (jPath === void 0) newJpath = property; - else newJpath = jPath + "." + property; - if (property === options.textNodeName) { - if (text === void 0) text = tagObj[property]; - else text += "" + tagObj[property]; - } else if (property === void 0) { - continue; - } else if (tagObj[property]) { - let val2 = compress(tagObj[property], options, newJpath); - const isLeaf = isLeafTag(val2, options); - if (tagObj[":@"]) { - assignAttributes(val2, tagObj[":@"], newJpath, options); - } else if (Object.keys(val2).length === 1 && val2[options.textNodeName] !== void 0 && !options.alwaysCreateTextNode) { - val2 = val2[options.textNodeName]; - } else if (Object.keys(val2).length === 0) { - if (options.alwaysCreateTextNode) val2[options.textNodeName] = ""; - else val2 = ""; - } - if (compressedObj[property] !== void 0 && compressedObj.hasOwnProperty(property)) { - if (!Array.isArray(compressedObj[property])) { - compressedObj[property] = [compressedObj[property]]; - } - compressedObj[property].push(val2); - } else { - if (options.isArray(property, newJpath, isLeaf)) { - compressedObj[property] = [val2]; - } else { - compressedObj[property] = val2; - } - } - } - } - if (typeof text === "string") { - if (text.length > 0) compressedObj[options.textNodeName] = text; - } else if (text !== void 0) compressedObj[options.textNodeName] = text; - return compressedObj; - } - function propName(obj) { - const keys = Object.keys(obj); - for (let i = 0; i < keys.length; i++) { - const key = keys[i]; - if (key !== ":@") return key; +// ../../../node_modules/@smithy/core/dist-es/middleware-http-signing/getHttpSigningMiddleware.js +var import_middleware_retry, httpSigningMiddlewareOptions, getHttpSigningPlugin; +var init_getHttpSigningMiddleware = __esm({ + "../../../node_modules/@smithy/core/dist-es/middleware-http-signing/getHttpSigningMiddleware.js"() { + import_middleware_retry = __toESM(require_dist_cjs38()); + init_httpSigningMiddleware(); + httpSigningMiddlewareOptions = { + step: "finalizeRequest", + tags: ["HTTP_SIGNING"], + name: "httpSigningMiddleware", + aliases: ["apiKeyMiddleware", "tokenMiddleware", "awsAuthMiddleware"], + override: true, + relation: "after", + toMiddleware: import_middleware_retry.retryMiddlewareOptions.name + }; + getHttpSigningPlugin = (config) => ({ + applyToStack: (clientStack) => { + clientStack.addRelativeTo(httpSigningMiddleware(config), httpSigningMiddlewareOptions); } - } - function assignAttributes(obj, attrMap, jpath, options) { - if (attrMap) { - const keys = Object.keys(attrMap); - const len = keys.length; - for (let i = 0; i < len; i++) { - const atrrName = keys[i]; - if (options.isArray(atrrName, jpath + "." + atrrName, true, true)) { - obj[atrrName] = [attrMap[atrrName]]; - } else { - obj[atrrName] = attrMap[atrrName]; + }); + } +}); + +// ../../../node_modules/@smithy/core/dist-es/middleware-http-signing/index.js +var init_middleware_http_signing = __esm({ + "../../../node_modules/@smithy/core/dist-es/middleware-http-signing/index.js"() { + init_httpSigningMiddleware(); + init_getHttpSigningMiddleware(); + } +}); + +// ../../../node_modules/@smithy/core/dist-es/util-identity-and-auth/DefaultIdentityProviderConfig.js +var DefaultIdentityProviderConfig; +var init_DefaultIdentityProviderConfig = __esm({ + "../../../node_modules/@smithy/core/dist-es/util-identity-and-auth/DefaultIdentityProviderConfig.js"() { + DefaultIdentityProviderConfig = class { + constructor(config) { + this.authSchemes = /* @__PURE__ */ new Map(); + for (const [key, value] of Object.entries(config)) { + if (value !== void 0) { + this.authSchemes.set(key, value); } } } - } - function isLeafTag(obj, options) { - const { textNodeName } = options; - const propCount = Object.keys(obj).length; - if (propCount === 0) { - return true; - } - if (propCount === 1 && (obj[textNodeName] || typeof obj[textNodeName] === "boolean" || obj[textNodeName] === 0)) { - return true; + getIdentityProvider(schemeId) { + return this.authSchemes.get(schemeId); } - return false; - } - exports2.prettify = prettify; + }; } }); -// ../../../node_modules/fast-xml-parser/src/xmlparser/XMLParser.js -var require_XMLParser = __commonJS({ - "../../../node_modules/fast-xml-parser/src/xmlparser/XMLParser.js"(exports2, module2) { - var { buildOptions } = require_OptionsBuilder(); - var OrderedObjParser = require_OrderedObjParser(); - var { prettify } = require_node2json(); - var validator = require_validator(); - var XMLParser = class { - constructor(options) { - this.externalEntities = {}; - this.options = buildOptions(options); - } - /** - * Parse XML dats to JS object - * @param {string|Buffer} xmlData - * @param {boolean|Object} validationOption - */ - parse(xmlData, validationOption) { - if (typeof xmlData === "string") { - } else if (xmlData.toString) { - xmlData = xmlData.toString(); - } else { - throw new Error("XML data is accepted in String or Bytes[] form."); +// ../../../node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/httpApiKeyAuth.js +var import_protocol_http2, import_types3, HttpApiKeyAuthSigner; +var init_httpApiKeyAuth = __esm({ + "../../../node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/httpApiKeyAuth.js"() { + import_protocol_http2 = __toESM(require_dist_cjs20()); + import_types3 = __toESM(require_dist_cjs()); + HttpApiKeyAuthSigner = class { + async sign(httpRequest, identity, signingProperties) { + if (!signingProperties) { + throw new Error("request could not be signed with `apiKey` since the `name` and `in` signer properties are missing"); } - if (validationOption) { - if (validationOption === true) validationOption = {}; - const result = validator.validate(xmlData, validationOption); - if (result !== true) { - throw Error(`${result.err.msg}:${result.err.line}:${result.err.col}`); - } + if (!signingProperties.name) { + throw new Error("request could not be signed with `apiKey` since the `name` signer property is missing"); } - const orderedObjParser = new OrderedObjParser(this.options); - orderedObjParser.addExternalEntities(this.externalEntities); - const orderedResult = orderedObjParser.parseXml(xmlData); - if (this.options.preserveOrder || orderedResult === void 0) return orderedResult; - else return prettify(orderedResult, this.options); - } - /** - * Add Entity which is not by default supported by this library - * @param {string} key - * @param {string} value - */ - addEntity(key, value) { - if (value.indexOf("&") !== -1) { - throw new Error("Entity value can't have '&'"); - } else if (key.indexOf("&") !== -1 || key.indexOf(";") !== -1) { - throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for ' '"); - } else if (value === "&") { - throw new Error("An entity with value '&' is not permitted"); + if (!signingProperties.in) { + throw new Error("request could not be signed with `apiKey` since the `in` signer property is missing"); + } + if (!identity.apiKey) { + throw new Error("request could not be signed with `apiKey` since the `apiKey` is not defined"); + } + const clonedRequest = import_protocol_http2.HttpRequest.clone(httpRequest); + if (signingProperties.in === import_types3.HttpApiKeyAuthLocation.QUERY) { + clonedRequest.query[signingProperties.name] = identity.apiKey; + } else if (signingProperties.in === import_types3.HttpApiKeyAuthLocation.HEADER) { + clonedRequest.headers[signingProperties.name] = signingProperties.scheme ? `${signingProperties.scheme} ${identity.apiKey}` : identity.apiKey; } else { - this.externalEntities[key] = value; + throw new Error("request can only be signed with `apiKey` locations `query` or `header`, but found: `" + signingProperties.in + "`"); } + return clonedRequest; } }; - module2.exports = XMLParser; } }); -// ../../../node_modules/fast-xml-parser/src/xmlbuilder/orderedJs2Xml.js -var require_orderedJs2Xml = __commonJS({ - "../../../node_modules/fast-xml-parser/src/xmlbuilder/orderedJs2Xml.js"(exports2, module2) { - var EOL = "\n"; - function toXml(jArray, options) { - let indentation = ""; - if (options.format && options.indentBy.length > 0) { - indentation = EOL; +// ../../../node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/httpBearerAuth.js +var import_protocol_http3, HttpBearerAuthSigner; +var init_httpBearerAuth = __esm({ + "../../../node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/httpBearerAuth.js"() { + import_protocol_http3 = __toESM(require_dist_cjs20()); + HttpBearerAuthSigner = class { + async sign(httpRequest, identity, signingProperties) { + const clonedRequest = import_protocol_http3.HttpRequest.clone(httpRequest); + if (!identity.token) { + throw new Error("request could not be signed with `token` since the `token` is not defined"); + } + clonedRequest.headers["Authorization"] = `Bearer ${identity.token}`; + return clonedRequest; } - return arrToStr(jArray, options, "", indentation); - } - function arrToStr(arr, options, jPath, indentation) { - let xmlStr = ""; - let isPreviousElementTag = false; - for (let i = 0; i < arr.length; i++) { - const tagObj = arr[i]; - const tagName = propName(tagObj); - let newJPath = ""; - if (jPath.length === 0) newJPath = tagName; - else newJPath = `${jPath}.${tagName}`; - if (tagName === options.textNodeName) { - let tagText = tagObj[tagName]; - if (!isStopNode(newJPath, options)) { - tagText = options.tagValueProcessor(tagName, tagText); - tagText = replaceEntitiesValue(tagText, options); - } - if (isPreviousElementTag) { - xmlStr += indentation; - } - xmlStr += tagText; - isPreviousElementTag = false; - continue; - } else if (tagName === options.cdataPropName) { - if (isPreviousElementTag) { - xmlStr += indentation; - } - xmlStr += ``; - isPreviousElementTag = false; - continue; - } else if (tagName === options.commentPropName) { - xmlStr += indentation + ``; - isPreviousElementTag = true; - continue; - } else if (tagName[0] === "?") { - const attStr2 = attr_to_str(tagObj[":@"], options); - const tempInd = tagName === "?xml" ? "" : indentation; - let piTextNodeName = tagObj[tagName][0][options.textNodeName]; - piTextNodeName = piTextNodeName.length !== 0 ? " " + piTextNodeName : ""; - xmlStr += tempInd + `<${tagName}${piTextNodeName}${attStr2}?>`; - isPreviousElementTag = true; - continue; + }; + } +}); + +// ../../../node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/noAuth.js +var NoAuthSigner; +var init_noAuth = __esm({ + "../../../node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/noAuth.js"() { + NoAuthSigner = class { + async sign(httpRequest, identity, signingProperties) { + return httpRequest; + } + }; + } +}); + +// ../../../node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/index.js +var init_httpAuthSchemes = __esm({ + "../../../node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/index.js"() { + init_httpApiKeyAuth(); + init_httpBearerAuth(); + init_noAuth(); + } +}); + +// ../../../node_modules/@smithy/core/dist-es/util-identity-and-auth/memoizeIdentityProvider.js +var createIsIdentityExpiredFunction, EXPIRATION_MS, isIdentityExpired, doesIdentityRequireRefresh, memoizeIdentityProvider; +var init_memoizeIdentityProvider = __esm({ + "../../../node_modules/@smithy/core/dist-es/util-identity-and-auth/memoizeIdentityProvider.js"() { + createIsIdentityExpiredFunction = (expirationMs) => (identity) => doesIdentityRequireRefresh(identity) && identity.expiration.getTime() - Date.now() < expirationMs; + EXPIRATION_MS = 3e5; + isIdentityExpired = createIsIdentityExpiredFunction(EXPIRATION_MS); + doesIdentityRequireRefresh = (identity) => identity.expiration !== void 0; + memoizeIdentityProvider = (provider, isExpired, requiresRefresh) => { + if (provider === void 0) { + return void 0; + } + const normalizedProvider = typeof provider !== "function" ? async () => Promise.resolve(provider) : provider; + let resolved; + let pending; + let hasResult; + let isConstant = false; + const coalesceProvider = async (options) => { + if (!pending) { + pending = normalizedProvider(options); } - let newIdentation = indentation; - if (newIdentation !== "") { - newIdentation += options.indentBy; + try { + resolved = await pending; + hasResult = true; + isConstant = false; + } finally { + pending = void 0; } - const attStr = attr_to_str(tagObj[":@"], options); - const tagStart = indentation + `<${tagName}${attStr}`; - const tagValue = arrToStr(tagObj[tagName], options, newJPath, newIdentation); - if (options.unpairedTags.indexOf(tagName) !== -1) { - if (options.suppressUnpairedNode) xmlStr += tagStart + ">"; - else xmlStr += tagStart + "/>"; - } else if ((!tagValue || tagValue.length === 0) && options.suppressEmptyNode) { - xmlStr += tagStart + "/>"; - } else if (tagValue && tagValue.endsWith(">")) { - xmlStr += tagStart + `>${tagValue}${indentation}`; - } else { - xmlStr += tagStart + ">"; - if (tagValue && indentation !== "" && (tagValue.includes("/>") || tagValue.includes(" { + if (!hasResult || options?.forceRefresh) { + resolved = await coalesceProvider(options); } - xmlStr += ``; + return resolved; + }; + } + return async (options) => { + if (!hasResult || options?.forceRefresh) { + resolved = await coalesceProvider(options); } - isPreviousElementTag = true; + if (isConstant) { + return resolved; + } + if (!requiresRefresh(resolved)) { + isConstant = true; + return resolved; + } + if (isExpired(resolved)) { + await coalesceProvider(options); + return resolved; + } + return resolved; + }; + }; + } +}); + +// ../../../node_modules/@smithy/core/dist-es/util-identity-and-auth/index.js +var init_util_identity_and_auth = __esm({ + "../../../node_modules/@smithy/core/dist-es/util-identity-and-auth/index.js"() { + init_DefaultIdentityProviderConfig(); + init_httpAuthSchemes(); + init_memoizeIdentityProvider(); + } +}); + +// ../../../node_modules/@smithy/core/dist-es/getSmithyContext.js +var import_types4, getSmithyContext3; +var init_getSmithyContext = __esm({ + "../../../node_modules/@smithy/core/dist-es/getSmithyContext.js"() { + import_types4 = __toESM(require_dist_cjs()); + getSmithyContext3 = (context) => context[import_types4.SMITHY_CONTEXT_KEY] || (context[import_types4.SMITHY_CONTEXT_KEY] = {}); + } +}); + +// ../../../node_modules/@smithy/core/dist-es/normalizeProvider.js +var normalizeProvider; +var init_normalizeProvider = __esm({ + "../../../node_modules/@smithy/core/dist-es/normalizeProvider.js"() { + normalizeProvider = (input) => { + if (typeof input === "function") + return input; + const promisified = Promise.resolve(input); + return () => promisified; + }; + } +}); + +// ../../../node_modules/@smithy/core/dist-es/protocols/requestBuilder.js +function requestBuilder(input, context) { + return new RequestBuilder(input, context); +} +var import_protocol_http4, import_smithy_client, RequestBuilder; +var init_requestBuilder = __esm({ + "../../../node_modules/@smithy/core/dist-es/protocols/requestBuilder.js"() { + import_protocol_http4 = __toESM(require_dist_cjs20()); + import_smithy_client = __toESM(require_dist_cjs37()); + RequestBuilder = class { + constructor(input, context) { + this.input = input; + this.context = context; + this.query = {}; + this.method = ""; + this.headers = {}; + this.path = ""; + this.body = null; + this.hostname = ""; + this.resolvePathStack = []; + } + async build() { + const { hostname, protocol = "https", port, path: basePath } = await this.context.endpoint(); + this.path = basePath; + for (const resolvePath of this.resolvePathStack) { + resolvePath(this.path); + } + return new import_protocol_http4.HttpRequest({ + protocol, + hostname: this.hostname || hostname, + port, + method: this.method, + path: this.path, + query: this.query, + body: this.body, + headers: this.headers + }); } - return xmlStr; - } - function propName(obj) { - const keys = Object.keys(obj); - for (let i = 0; i < keys.length; i++) { - const key = keys[i]; - if (key !== ":@") return key; + hn(hostname) { + this.hostname = hostname; + return this; } - } - function attr_to_str(attrMap, options) { - let attrStr = ""; - if (attrMap && !options.ignoreAttributes) { - for (let attr in attrMap) { - let attrVal = options.attributeValueProcessor(attr, attrMap[attr]); - attrVal = replaceEntitiesValue(attrVal, options); - if (attrVal === true && options.suppressBooleanAttributes) { - attrStr += ` ${attr.substr(options.attributeNamePrefix.length)}`; - } else { - attrStr += ` ${attr.substr(options.attributeNamePrefix.length)}="${attrVal}"`; - } - } + bp(uriLabel) { + this.resolvePathStack.push((basePath) => { + this.path = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + uriLabel; + }); + return this; } - return attrStr; - } - function isStopNode(jPath, options) { - jPath = jPath.substr(0, jPath.length - options.textNodeName.length - 1); - let tagName = jPath.substr(jPath.lastIndexOf(".") + 1); - for (let index in options.stopNodes) { - if (options.stopNodes[index] === jPath || options.stopNodes[index] === "*." + tagName) return true; + p(memberName, labelValueProvider, uriLabel, isGreedyLabel) { + this.resolvePathStack.push((path) => { + this.path = (0, import_smithy_client.resolvedPath)(path, this.input, memberName, labelValueProvider, uriLabel, isGreedyLabel); + }); + return this; } - return false; - } - function replaceEntitiesValue(textValue, options) { - if (textValue && textValue.length > 0 && options.processEntities) { - for (let i = 0; i < options.entities.length; i++) { - const entity = options.entities[i]; - textValue = textValue.replace(entity.regex, entity.val); - } + h(headers) { + this.headers = headers; + return this; } - return textValue; - } - module2.exports = toXml; + q(query) { + this.query = query; + return this; + } + b(body) { + this.body = body; + return this; + } + m(method) { + this.method = method; + return this; + } + }; } }); -// ../../../node_modules/fast-xml-parser/src/xmlbuilder/json2xml.js -var require_json2xml = __commonJS({ - "../../../node_modules/fast-xml-parser/src/xmlbuilder/json2xml.js"(exports2, module2) { - "use strict"; - var buildFromOrderedJs = require_orderedJs2Xml(); - var defaultOptions = { - attributeNamePrefix: "@_", - attributesGroupName: false, - textNodeName: "#text", - ignoreAttributes: true, - cdataPropName: false, - format: false, - indentBy: " ", - suppressEmptyNode: false, - suppressUnpairedNode: true, - suppressBooleanAttributes: true, - tagValueProcessor: function(key, a) { - return a; - }, - attributeValueProcessor: function(attrName, a) { - return a; - }, - preserveOrder: false, - commentPropName: false, - unpairedTags: [], - entities: [ - { regex: new RegExp("&", "g"), val: "&" }, - //it must be on top - { regex: new RegExp(">", "g"), val: ">" }, - { regex: new RegExp("<", "g"), val: "<" }, - { regex: new RegExp("'", "g"), val: "'" }, - { regex: new RegExp('"', "g"), val: """ } - ], - processEntities: true, - stopNodes: [], - // transformTagName: false, - // transformAttributeName: false, - oneListGroup: false - }; - function Builder(options) { - this.options = Object.assign({}, defaultOptions, options); - if (this.options.ignoreAttributes || this.options.attributesGroupName) { - this.isAttribute = function() { - return false; - }; - } else { - this.attrPrefixLen = this.options.attributeNamePrefix.length; - this.isAttribute = isAttribute; +// ../../../node_modules/@smithy/core/dist-es/pagination/createPaginator.js +function createPaginator(ClientCtor, CommandCtor, inputTokenName, outputTokenName, pageSizeTokenName) { + return async function* paginateOperation(config, input, ...additionalArguments) { + let token = config.startingToken || void 0; + let hasNext = true; + let page; + while (hasNext) { + input[inputTokenName] = token; + if (pageSizeTokenName) { + input[pageSizeTokenName] = input[pageSizeTokenName] ?? config.pageSize; } - this.processTextOrObjNode = processTextOrObjNode; - if (this.options.format) { - this.indentate = indentate; - this.tagEndChar = ">\n"; - this.newLine = "\n"; + if (config.client instanceof ClientCtor) { + page = await makePagedClientRequest(CommandCtor, config.client, input, ...additionalArguments); } else { - this.indentate = function() { - return ""; - }; - this.tagEndChar = ">"; - this.newLine = ""; + throw new Error(`Invalid client, expected instance of ${ClientCtor.name}`); } + yield page; + const prevToken = token; + token = get(page, outputTokenName); + hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken)); } - Builder.prototype.build = function(jObj) { - if (this.options.preserveOrder) { - return buildFromOrderedJs(jObj, this.options); - } else { - if (Array.isArray(jObj) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1) { - jObj = { - [this.options.arrayNodeName]: jObj - }; + return void 0; + }; +} +var makePagedClientRequest, get; +var init_createPaginator = __esm({ + "../../../node_modules/@smithy/core/dist-es/pagination/createPaginator.js"() { + makePagedClientRequest = async (CommandCtor, client, input, ...args) => { + return await client.send(new CommandCtor(input), ...args); + }; + get = (fromObject, path) => { + let cursor = fromObject; + const pathComponents = path.split("."); + for (const step of pathComponents) { + if (!cursor || typeof cursor !== "object") { + return void 0; } - return this.j2x(jObj, 0).val; + cursor = cursor[step]; + } + return cursor; + }; + } +}); + +// ../../../node_modules/@smithy/core/dist-es/index.js +var dist_es_exports = {}; +__export(dist_es_exports, { + DefaultIdentityProviderConfig: () => DefaultIdentityProviderConfig, + EXPIRATION_MS: () => EXPIRATION_MS, + HttpApiKeyAuthSigner: () => HttpApiKeyAuthSigner, + HttpBearerAuthSigner: () => HttpBearerAuthSigner, + NoAuthSigner: () => NoAuthSigner, + RequestBuilder: () => RequestBuilder, + createIsIdentityExpiredFunction: () => createIsIdentityExpiredFunction, + createPaginator: () => createPaginator, + doesIdentityRequireRefresh: () => doesIdentityRequireRefresh, + getHttpAuthSchemeEndpointRuleSetPlugin: () => getHttpAuthSchemeEndpointRuleSetPlugin, + getHttpAuthSchemePlugin: () => getHttpAuthSchemePlugin, + getHttpSigningPlugin: () => getHttpSigningPlugin, + getSmithyContext: () => getSmithyContext3, + httpAuthSchemeEndpointRuleSetMiddlewareOptions: () => httpAuthSchemeEndpointRuleSetMiddlewareOptions, + httpAuthSchemeMiddleware: () => httpAuthSchemeMiddleware, + httpAuthSchemeMiddlewareOptions: () => httpAuthSchemeMiddlewareOptions, + httpSigningMiddleware: () => httpSigningMiddleware, + httpSigningMiddlewareOptions: () => httpSigningMiddlewareOptions, + isIdentityExpired: () => isIdentityExpired, + memoizeIdentityProvider: () => memoizeIdentityProvider, + normalizeProvider: () => normalizeProvider, + requestBuilder: () => requestBuilder +}); +var init_dist_es = __esm({ + "../../../node_modules/@smithy/core/dist-es/index.js"() { + init_middleware_http_auth_scheme(); + init_middleware_http_signing(); + init_util_identity_and_auth(); + init_getSmithyContext(); + init_normalizeProvider(); + init_requestBuilder(); + init_createPaginator(); + } +}); + +// ../../../node_modules/@smithy/middleware-content-length/dist-cjs/index.js +var require_dist_cjs39 = __commonJS({ + "../../../node_modules/@smithy/middleware-content-length/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all) => { + for (var name in all) + __defProp2(target, name, { get: all[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); } + return to; }; - Builder.prototype.j2x = function(jObj, level) { - let attrStr = ""; - let val2 = ""; - for (let key in jObj) { - if (typeof jObj[key] === "undefined") { - } else if (jObj[key] === null) { - if (key[0] === "?") val2 += this.indentate(level) + "<" + key + "?" + this.tagEndChar; - else val2 += this.indentate(level) + "<" + key + "/" + this.tagEndChar; - } else if (jObj[key] instanceof Date) { - val2 += this.buildTextValNode(jObj[key], key, "", level); - } else if (typeof jObj[key] !== "object") { - const attr = this.isAttribute(key); - if (attr) { - attrStr += this.buildAttrPairStr(attr, "" + jObj[key]); - } else { - if (key === this.options.textNodeName) { - let newval = this.options.tagValueProcessor(key, "" + jObj[key]); - val2 += this.replaceEntitiesValue(newval); - } else { - val2 += this.buildTextValNode(jObj[key], key, "", level); - } - } - } else if (Array.isArray(jObj[key])) { - const arrLen = jObj[key].length; - let listTagVal = ""; - for (let j = 0; j < arrLen; j++) { - const item = jObj[key][j]; - if (typeof item === "undefined") { - } else if (item === null) { - if (key[0] === "?") val2 += this.indentate(level) + "<" + key + "?" + this.tagEndChar; - else val2 += this.indentate(level) + "<" + key + "/" + this.tagEndChar; - } else if (typeof item === "object") { - if (this.options.oneListGroup) { - listTagVal += this.j2x(item, level + 1).val; - } else { - listTagVal += this.processTextOrObjNode(item, key, level); - } - } else { - listTagVal += this.buildTextValNode(item, key, "", level); - } - } - if (this.options.oneListGroup) { - listTagVal = this.buildObjectNode(listTagVal, key, "", level); - } - val2 += listTagVal; - } else { - if (this.options.attributesGroupName && key === this.options.attributesGroupName) { - const Ks = Object.keys(jObj[key]); - const L = Ks.length; - for (let j = 0; j < L; j++) { - attrStr += this.buildAttrPairStr(Ks[j], "" + jObj[key][Ks[j]]); + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + contentLengthMiddleware: () => contentLengthMiddleware, + contentLengthMiddlewareOptions: () => contentLengthMiddlewareOptions, + getContentLengthPlugin: () => getContentLengthPlugin + }); + module2.exports = __toCommonJS2(src_exports); + var import_protocol_http8 = require_dist_cjs2(); + var CONTENT_LENGTH_HEADER = "content-length"; + function contentLengthMiddleware(bodyLengthChecker) { + return (next) => async (args) => { + const request2 = args.request; + if (import_protocol_http8.HttpRequest.isInstance(request2)) { + const { body, headers } = request2; + if (body && Object.keys(headers).map((str) => str.toLowerCase()).indexOf(CONTENT_LENGTH_HEADER) === -1) { + try { + const length = bodyLengthChecker(body); + request2.headers = { + ...request2.headers, + [CONTENT_LENGTH_HEADER]: String(length) + }; + } catch (error) { } - } else { - val2 += this.processTextOrObjNode(jObj[key], key, level); } } - } - return { attrStr, val: val2 }; + return next({ + ...args, + request: request2 + }); + }; + } + __name(contentLengthMiddleware, "contentLengthMiddleware"); + var contentLengthMiddlewareOptions = { + step: "build", + tags: ["SET_CONTENT_LENGTH", "CONTENT_LENGTH"], + name: "contentLengthMiddleware", + override: true }; - Builder.prototype.buildAttrPairStr = function(attrName, val2) { - val2 = this.options.attributeValueProcessor(attrName, "" + val2); - val2 = this.replaceEntitiesValue(val2); - if (this.options.suppressBooleanAttributes && val2 === "true") { - return " " + attrName; - } else return " " + attrName + '="' + val2 + '"'; + var getContentLengthPlugin = /* @__PURE__ */ __name((options) => ({ + applyToStack: (clientStack) => { + clientStack.add(contentLengthMiddleware(options.bodyLengthChecker), contentLengthMiddlewareOptions); + } + }), "getContentLengthPlugin"); + } +}); + +// ../../../node_modules/@smithy/property-provider/dist-cjs/index.js +var require_dist_cjs40 = __commonJS({ + "../../../node_modules/@smithy/property-provider/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all) => { + for (var name in all) + __defProp2(target, name, { get: all[name], enumerable: true }); }; - function processTextOrObjNode(object, key, level) { - const result = this.j2x(object, level + 1); - if (object[this.options.textNodeName] !== void 0 && Object.keys(object).length === 1) { - return this.buildTextValNode(object[this.options.textNodeName], key, result.attrStr, level); - } else { - return this.buildObjectNode(result.val, key, result.attrStr, level); + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); } - } - Builder.prototype.buildObjectNode = function(val2, key, attrStr, level) { - if (val2 === "") { - if (key[0] === "?") return this.indentate(level) + "<" + key + attrStr + "?" + this.tagEndChar; - else { - return this.indentate(level) + "<" + key + attrStr + this.closeTag(key) + this.tagEndChar; - } - } else { - let tagEndExp = "" + val2 + tagEndExp; - } else if (this.options.commentPropName !== false && key === this.options.commentPropName && piClosingChar.length === 0) { - return this.indentate(level) + `` + this.newLine; - } else { - return this.indentate(level) + "<" + key + attrStr + piClosingChar + this.tagEndChar + val2 + this.indentate(level) + tagEndExp; + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + CredentialsProviderError: () => CredentialsProviderError, + ProviderError: () => ProviderError2, + TokenProviderError: () => TokenProviderError, + chain: () => chain, + fromStatic: () => fromStatic, + memoize: () => memoize + }); + module2.exports = __toCommonJS2(src_exports); + var _ProviderError = class _ProviderError2 extends Error { + constructor(message, options = true) { + var _a; + let logger; + let tryNextLink = true; + if (typeof options === "boolean") { + logger = void 0; + tryNextLink = options; + } else if (options != null && typeof options === "object") { + logger = options.logger; + tryNextLink = options.tryNextLink ?? true; } + super(message); + this.name = "ProviderError"; + this.tryNextLink = tryNextLink; + Object.setPrototypeOf(this, _ProviderError2.prototype); + (_a = logger == null ? void 0 : logger.debug) == null ? void 0 : _a.call(logger, `@smithy/property-provider ${tryNextLink ? "->" : "(!)"} ${message}`); + } + /** + * @deprecated use new operator. + */ + static from(error, options = true) { + return Object.assign(new this(error.message, options), error); } }; - Builder.prototype.closeTag = function(key) { - let closeTag = ""; - if (this.options.unpairedTags.indexOf(key) !== -1) { - if (!this.options.suppressUnpairedNode) closeTag = "/"; - } else if (this.options.suppressEmptyNode) { - closeTag = "/"; - } else { - closeTag = `>` + this.newLine; - } else if (this.options.commentPropName !== false && key === this.options.commentPropName) { - return this.indentate(level) + `` + this.newLine; - } else if (key[0] === "?") { - return this.indentate(level) + "<" + key + attrStr + "?" + this.tagEndChar; - } else { - let textValue = this.options.tagValueProcessor(key, val2); - textValue = this.replaceEntitiesValue(textValue); - if (textValue === "") { - return this.indentate(level) + "<" + key + attrStr + this.closeTag(key) + this.tagEndChar; - } else { - return this.indentate(level) + "<" + key + attrStr + ">" + textValue + " async () => { + if (providers.length === 0) { + throw new ProviderError2("No providers in chain"); + } + let lastProviderError; + for (const provider of providers) { + try { + const credentials = await provider(); + return credentials; + } catch (err) { + lastProviderError = err; + if (err == null ? void 0 : err.tryNextLink) { + continue; + } + throw err; + } + } + throw lastProviderError; + }, "chain"); + var fromStatic = /* @__PURE__ */ __name((staticValue) => () => Promise.resolve(staticValue), "fromStatic"); + var memoize = /* @__PURE__ */ __name((provider, isExpired, requiresRefresh) => { + let resolved; + let pending; + let hasResult; + let isConstant = false; + const coalesceProvider = /* @__PURE__ */ __name(async () => { + if (!pending) { + pending = provider(); + } + try { + resolved = await pending; + hasResult = true; + isConstant = false; + } finally { + pending = void 0; } + return resolved; + }, "coalesceProvider"); + if (isExpired === void 0) { + return async (options) => { + if (!hasResult || (options == null ? void 0 : options.forceRefresh)) { + resolved = await coalesceProvider(); + } + return resolved; + }; } - }; - Builder.prototype.replaceEntitiesValue = function(textValue) { - if (textValue && textValue.length > 0 && this.options.processEntities) { - for (let i = 0; i < this.options.entities.length; i++) { - const entity = this.options.entities[i]; - textValue = textValue.replace(entity.regex, entity.val); + return async (options) => { + if (!hasResult || (options == null ? void 0 : options.forceRefresh)) { + resolved = await coalesceProvider(); + } + if (isConstant) { + return resolved; + } + if (requiresRefresh && !requiresRefresh(resolved)) { + isConstant = true; + return resolved; + } + if (isExpired(resolved)) { + await coalesceProvider(); + return resolved; } + return resolved; + }; + }, "memoize"); + } +}); + +// ../../../node_modules/@smithy/shared-ini-file-loader/dist-cjs/getHomeDir.js +var require_getHomeDir2 = __commonJS({ + "../../../node_modules/@smithy/shared-ini-file-loader/dist-cjs/getHomeDir.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getHomeDir = void 0; + var os_1 = require("os"); + var path_1 = require("path"); + var homeDirCache = {}; + var getHomeDirCacheKey = () => { + if (process && process.geteuid) { + return `${process.geteuid()}`; } - return textValue; + return "DEFAULT"; }; - function indentate(level) { - return this.options.indentBy.repeat(level); - } - function isAttribute(name) { - if (name.startsWith(this.options.attributeNamePrefix)) { - return name.substr(this.attrPrefixLen); - } else { - return false; - } - } - module2.exports = Builder; + var getHomeDir2 = () => { + const { HOME, USERPROFILE, HOMEPATH, HOMEDRIVE = `C:${path_1.sep}` } = process.env; + if (HOME) + return HOME; + if (USERPROFILE) + return USERPROFILE; + if (HOMEPATH) + return `${HOMEDRIVE}${HOMEPATH}`; + const homeDirCacheKey = getHomeDirCacheKey(); + if (!homeDirCache[homeDirCacheKey]) + homeDirCache[homeDirCacheKey] = (0, os_1.homedir)(); + return homeDirCache[homeDirCacheKey]; + }; + exports2.getHomeDir = getHomeDir2; } }); -// ../../../node_modules/fast-xml-parser/src/fxp.js -var require_fxp = __commonJS({ - "../../../node_modules/fast-xml-parser/src/fxp.js"(exports2, module2) { +// ../../../node_modules/@smithy/shared-ini-file-loader/dist-cjs/getSSOTokenFilepath.js +var require_getSSOTokenFilepath2 = __commonJS({ + "../../../node_modules/@smithy/shared-ini-file-loader/dist-cjs/getSSOTokenFilepath.js"(exports2) { "use strict"; - var validator = require_validator(); - var XMLParser = require_XMLParser(); - var XMLBuilder = require_json2xml(); - module2.exports = { - XMLParser, - XMLValidator: validator, - XMLBuilder + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getSSOTokenFilepath = void 0; + var crypto_1 = require("crypto"); + var path_1 = require("path"); + var getHomeDir_1 = require_getHomeDir2(); + var getSSOTokenFilepath2 = (id) => { + const hasher = (0, crypto_1.createHash)("sha1"); + const cacheName = hasher.update(id).digest("hex"); + return (0, path_1.join)((0, getHomeDir_1.getHomeDir)(), ".aws", "sso", "cache", `${cacheName}.json`); }; + exports2.getSSOTokenFilepath = getSSOTokenFilepath2; } }); -// ../../../node_modules/@aws-sdk/client-sts/dist-cjs/protocols/Aws_query.js -var require_Aws_query = __commonJS({ - "../../../node_modules/@aws-sdk/client-sts/dist-cjs/protocols/Aws_query.js"(exports2) { +// ../../../node_modules/@smithy/shared-ini-file-loader/dist-cjs/getSSOTokenFromFile.js +var require_getSSOTokenFromFile2 = __commonJS({ + "../../../node_modules/@smithy/shared-ini-file-loader/dist-cjs/getSSOTokenFromFile.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.de_GetSessionTokenCommand = exports2.de_GetFederationTokenCommand = exports2.de_GetCallerIdentityCommand = exports2.de_GetAccessKeyInfoCommand = exports2.de_DecodeAuthorizationMessageCommand = exports2.de_AssumeRoleWithWebIdentityCommand = exports2.de_AssumeRoleWithSAMLCommand = exports2.de_AssumeRoleCommand = exports2.se_GetSessionTokenCommand = exports2.se_GetFederationTokenCommand = exports2.se_GetCallerIdentityCommand = exports2.se_GetAccessKeyInfoCommand = exports2.se_DecodeAuthorizationMessageCommand = exports2.se_AssumeRoleWithWebIdentityCommand = exports2.se_AssumeRoleWithSAMLCommand = exports2.se_AssumeRoleCommand = void 0; - var protocol_http_1 = require_dist_cjs2(); - var smithy_client_1 = require_dist_cjs34(); - var fast_xml_parser_1 = require_fxp(); - var models_0_1 = require_models_0(); - var STSServiceException_1 = require_STSServiceException(); - var se_AssumeRoleCommand = async (input, context) => { - const headers = SHARED_HEADERS; - let body; - body = buildFormUrlencodedString({ - ...se_AssumeRoleRequest(input, context), - Action: "AssumeRole", - Version: "2011-06-15" - }); - return buildHttpRpcRequest(context, headers, "/", void 0, body); - }; - exports2.se_AssumeRoleCommand = se_AssumeRoleCommand; - var se_AssumeRoleWithSAMLCommand = async (input, context) => { - const headers = SHARED_HEADERS; - let body; - body = buildFormUrlencodedString({ - ...se_AssumeRoleWithSAMLRequest(input, context), - Action: "AssumeRoleWithSAML", - Version: "2011-06-15" - }); - return buildHttpRpcRequest(context, headers, "/", void 0, body); - }; - exports2.se_AssumeRoleWithSAMLCommand = se_AssumeRoleWithSAMLCommand; - var se_AssumeRoleWithWebIdentityCommand = async (input, context) => { - const headers = SHARED_HEADERS; - let body; - body = buildFormUrlencodedString({ - ...se_AssumeRoleWithWebIdentityRequest(input, context), - Action: "AssumeRoleWithWebIdentity", - Version: "2011-06-15" - }); - return buildHttpRpcRequest(context, headers, "/", void 0, body); - }; - exports2.se_AssumeRoleWithWebIdentityCommand = se_AssumeRoleWithWebIdentityCommand; - var se_DecodeAuthorizationMessageCommand = async (input, context) => { - const headers = SHARED_HEADERS; - let body; - body = buildFormUrlencodedString({ - ...se_DecodeAuthorizationMessageRequest(input, context), - Action: "DecodeAuthorizationMessage", - Version: "2011-06-15" - }); - return buildHttpRpcRequest(context, headers, "/", void 0, body); - }; - exports2.se_DecodeAuthorizationMessageCommand = se_DecodeAuthorizationMessageCommand; - var se_GetAccessKeyInfoCommand = async (input, context) => { - const headers = SHARED_HEADERS; - let body; - body = buildFormUrlencodedString({ - ...se_GetAccessKeyInfoRequest(input, context), - Action: "GetAccessKeyInfo", - Version: "2011-06-15" - }); - return buildHttpRpcRequest(context, headers, "/", void 0, body); + exports2.getSSOTokenFromFile = void 0; + var fs_1 = require("fs"); + var getSSOTokenFilepath_1 = require_getSSOTokenFilepath2(); + var { readFile } = fs_1.promises; + var getSSOTokenFromFile2 = async (id) => { + const ssoTokenFilepath = (0, getSSOTokenFilepath_1.getSSOTokenFilepath)(id); + const ssoTokenText = await readFile(ssoTokenFilepath, "utf8"); + return JSON.parse(ssoTokenText); }; - exports2.se_GetAccessKeyInfoCommand = se_GetAccessKeyInfoCommand; - var se_GetCallerIdentityCommand = async (input, context) => { - const headers = SHARED_HEADERS; - let body; - body = buildFormUrlencodedString({ - ...se_GetCallerIdentityRequest(input, context), - Action: "GetCallerIdentity", - Version: "2011-06-15" - }); - return buildHttpRpcRequest(context, headers, "/", void 0, body); + exports2.getSSOTokenFromFile = getSSOTokenFromFile2; + } +}); + +// ../../../node_modules/@smithy/shared-ini-file-loader/dist-cjs/slurpFile.js +var require_slurpFile2 = __commonJS({ + "../../../node_modules/@smithy/shared-ini-file-loader/dist-cjs/slurpFile.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.slurpFile = void 0; + var fs_1 = require("fs"); + var { readFile } = fs_1.promises; + var filePromisesHash = {}; + var slurpFile = (path, options) => { + if (!filePromisesHash[path] || (options === null || options === void 0 ? void 0 : options.ignoreCache)) { + filePromisesHash[path] = readFile(path, "utf8"); + } + return filePromisesHash[path]; }; - exports2.se_GetCallerIdentityCommand = se_GetCallerIdentityCommand; - var se_GetFederationTokenCommand = async (input, context) => { - const headers = SHARED_HEADERS; - let body; - body = buildFormUrlencodedString({ - ...se_GetFederationTokenRequest(input, context), - Action: "GetFederationToken", - Version: "2011-06-15" - }); - return buildHttpRpcRequest(context, headers, "/", void 0, body); + exports2.slurpFile = slurpFile; + } +}); + +// ../../../node_modules/@smithy/shared-ini-file-loader/dist-cjs/index.js +var require_dist_cjs41 = __commonJS({ + "../../../node_modules/@smithy/shared-ini-file-loader/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all) => { + for (var name in all) + __defProp2(target, name, { get: all[name], enumerable: true }); }; - exports2.se_GetFederationTokenCommand = se_GetFederationTokenCommand; - var se_GetSessionTokenCommand = async (input, context) => { - const headers = SHARED_HEADERS; - let body; - body = buildFormUrlencodedString({ - ...se_GetSessionTokenRequest(input, context), - Action: "GetSessionToken", - Version: "2011-06-15" - }); - return buildHttpRpcRequest(context, headers, "/", void 0, body); + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; }; - exports2.se_GetSessionTokenCommand = se_GetSessionTokenCommand; - var de_AssumeRoleCommand = async (output, context) => { - if (output.statusCode >= 300) { - return de_AssumeRoleCommandError(output, context); + var __reExport = (target, mod, secondTarget) => (__copyProps2(target, mod, "default"), secondTarget && __copyProps2(secondTarget, mod, "default")); + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + CONFIG_PREFIX_SEPARATOR: () => CONFIG_PREFIX_SEPARATOR, + DEFAULT_PROFILE: () => DEFAULT_PROFILE, + ENV_PROFILE: () => ENV_PROFILE, + getProfileName: () => getProfileName, + loadSharedConfigFiles: () => loadSharedConfigFiles, + loadSsoSessionData: () => loadSsoSessionData, + parseKnownFiles: () => parseKnownFiles + }); + module2.exports = __toCommonJS2(src_exports); + __reExport(src_exports, require_getHomeDir2(), module2.exports); + var ENV_PROFILE = "AWS_PROFILE"; + var DEFAULT_PROFILE = "default"; + var getProfileName = /* @__PURE__ */ __name((init) => init.profile || process.env[ENV_PROFILE] || DEFAULT_PROFILE, "getProfileName"); + __reExport(src_exports, require_getSSOTokenFilepath2(), module2.exports); + __reExport(src_exports, require_getSSOTokenFromFile2(), module2.exports); + var import_types5 = require_dist_cjs(); + var getConfigData = /* @__PURE__ */ __name((data) => Object.entries(data).filter(([key]) => { + const indexOfSeparator = key.indexOf(CONFIG_PREFIX_SEPARATOR); + if (indexOfSeparator === -1) { + return false; + } + return Object.values(import_types5.IniSectionType).includes(key.substring(0, indexOfSeparator)); + }).reduce( + (acc, [key, value]) => { + const indexOfSeparator = key.indexOf(CONFIG_PREFIX_SEPARATOR); + const updatedKey = key.substring(0, indexOfSeparator) === import_types5.IniSectionType.PROFILE ? key.substring(indexOfSeparator + 1) : key; + acc[updatedKey] = value; + return acc; + }, + { + // Populate default profile, if present. + ...data.default && { default: data.default } + } + ), "getConfigData"); + var import_path = require("path"); + var import_getHomeDir = require_getHomeDir2(); + var ENV_CONFIG_PATH = "AWS_CONFIG_FILE"; + var getConfigFilepath = /* @__PURE__ */ __name(() => process.env[ENV_CONFIG_PATH] || (0, import_path.join)((0, import_getHomeDir.getHomeDir)(), ".aws", "config"), "getConfigFilepath"); + var import_getHomeDir2 = require_getHomeDir2(); + var ENV_CREDENTIALS_PATH = "AWS_SHARED_CREDENTIALS_FILE"; + var getCredentialsFilepath = /* @__PURE__ */ __name(() => process.env[ENV_CREDENTIALS_PATH] || (0, import_path.join)((0, import_getHomeDir2.getHomeDir)(), ".aws", "credentials"), "getCredentialsFilepath"); + var import_getHomeDir3 = require_getHomeDir2(); + var prefixKeyRegex = /^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/; + var profileNameBlockList = ["__proto__", "profile __proto__"]; + var parseIni = /* @__PURE__ */ __name((iniData) => { + const map = {}; + let currentSection; + let currentSubSection; + for (const iniLine of iniData.split(/\r?\n/)) { + const trimmedLine = iniLine.split(/(^|\s)[;#]/)[0].trim(); + const isSection = trimmedLine[0] === "[" && trimmedLine[trimmedLine.length - 1] === "]"; + if (isSection) { + currentSection = void 0; + currentSubSection = void 0; + const sectionName = trimmedLine.substring(1, trimmedLine.length - 1); + const matches = prefixKeyRegex.exec(sectionName); + if (matches) { + const [, prefix, , name] = matches; + if (Object.values(import_types5.IniSectionType).includes(prefix)) { + currentSection = [prefix, name].join(CONFIG_PREFIX_SEPARATOR); + } + } else { + currentSection = sectionName; + } + if (profileNameBlockList.includes(sectionName)) { + throw new Error(`Found invalid profile name "${sectionName}"`); + } + } else if (currentSection) { + const indexOfEqualsSign = trimmedLine.indexOf("="); + if (![0, -1].includes(indexOfEqualsSign)) { + const [name, value] = [ + trimmedLine.substring(0, indexOfEqualsSign).trim(), + trimmedLine.substring(indexOfEqualsSign + 1).trim() + ]; + if (value === "") { + currentSubSection = name; + } else { + if (currentSubSection && iniLine.trimStart() === iniLine) { + currentSubSection = void 0; + } + map[currentSection] = map[currentSection] || {}; + const key = currentSubSection ? [currentSubSection, name].join(CONFIG_PREFIX_SEPARATOR) : name; + map[currentSection][key] = value; + } + } + } } - const data = await parseBody(output.body, context); - let contents = {}; - contents = de_AssumeRoleResponse(data.AssumeRoleResult, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; - }; - exports2.de_AssumeRoleCommand = de_AssumeRoleCommand; - var de_AssumeRoleCommandError = async (output, context) => { - const parsedOutput = { - ...output, - body: await parseErrorBody(output.body, context) - }; - const errorCode = loadQueryErrorCode(output, parsedOutput.body); - switch (errorCode) { - case "ExpiredTokenException": - case "com.amazonaws.sts#ExpiredTokenException": - throw await de_ExpiredTokenExceptionRes(parsedOutput, context); - case "MalformedPolicyDocument": - case "com.amazonaws.sts#MalformedPolicyDocumentException": - throw await de_MalformedPolicyDocumentExceptionRes(parsedOutput, context); - case "PackedPolicyTooLarge": - case "com.amazonaws.sts#PackedPolicyTooLargeException": - throw await de_PackedPolicyTooLargeExceptionRes(parsedOutput, context); - case "RegionDisabledException": - case "com.amazonaws.sts#RegionDisabledException": - throw await de_RegionDisabledExceptionRes(parsedOutput, context); - default: - const parsedBody = parsedOutput.body; - return throwDefaultError({ - output, - parsedBody: parsedBody.Error, - errorCode - }); + return map; + }, "parseIni"); + var import_slurpFile = require_slurpFile2(); + var swallowError = /* @__PURE__ */ __name(() => ({}), "swallowError"); + var CONFIG_PREFIX_SEPARATOR = "."; + var loadSharedConfigFiles = /* @__PURE__ */ __name(async (init = {}) => { + const { filepath = getCredentialsFilepath(), configFilepath = getConfigFilepath() } = init; + const homeDir = (0, import_getHomeDir3.getHomeDir)(); + const relativeHomeDirPrefix = "~/"; + let resolvedFilepath = filepath; + if (filepath.startsWith(relativeHomeDirPrefix)) { + resolvedFilepath = (0, import_path.join)(homeDir, filepath.slice(2)); } - }; - var de_AssumeRoleWithSAMLCommand = async (output, context) => { - if (output.statusCode >= 300) { - return de_AssumeRoleWithSAMLCommandError(output, context); + let resolvedConfigFilepath = configFilepath; + if (configFilepath.startsWith(relativeHomeDirPrefix)) { + resolvedConfigFilepath = (0, import_path.join)(homeDir, configFilepath.slice(2)); } - const data = await parseBody(output.body, context); - let contents = {}; - contents = de_AssumeRoleWithSAMLResponse(data.AssumeRoleWithSAMLResult, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; - }; - exports2.de_AssumeRoleWithSAMLCommand = de_AssumeRoleWithSAMLCommand; - var de_AssumeRoleWithSAMLCommandError = async (output, context) => { - const parsedOutput = { - ...output, - body: await parseErrorBody(output.body, context) + const parsedFiles = await Promise.all([ + (0, import_slurpFile.slurpFile)(resolvedConfigFilepath, { + ignoreCache: init.ignoreCache + }).then(parseIni).then(getConfigData).catch(swallowError), + (0, import_slurpFile.slurpFile)(resolvedFilepath, { + ignoreCache: init.ignoreCache + }).then(parseIni).catch(swallowError) + ]); + return { + configFile: parsedFiles[0], + credentialsFile: parsedFiles[1] }; - const errorCode = loadQueryErrorCode(output, parsedOutput.body); - switch (errorCode) { - case "ExpiredTokenException": - case "com.amazonaws.sts#ExpiredTokenException": - throw await de_ExpiredTokenExceptionRes(parsedOutput, context); - case "IDPRejectedClaim": - case "com.amazonaws.sts#IDPRejectedClaimException": - throw await de_IDPRejectedClaimExceptionRes(parsedOutput, context); - case "InvalidIdentityToken": - case "com.amazonaws.sts#InvalidIdentityTokenException": - throw await de_InvalidIdentityTokenExceptionRes(parsedOutput, context); - case "MalformedPolicyDocument": - case "com.amazonaws.sts#MalformedPolicyDocumentException": - throw await de_MalformedPolicyDocumentExceptionRes(parsedOutput, context); - case "PackedPolicyTooLarge": - case "com.amazonaws.sts#PackedPolicyTooLargeException": - throw await de_PackedPolicyTooLargeExceptionRes(parsedOutput, context); - case "RegionDisabledException": - case "com.amazonaws.sts#RegionDisabledException": - throw await de_RegionDisabledExceptionRes(parsedOutput, context); - default: - const parsedBody = parsedOutput.body; - return throwDefaultError({ - output, - parsedBody: parsedBody.Error, - errorCode - }); + }, "loadSharedConfigFiles"); + var getSsoSessionData = /* @__PURE__ */ __name((data) => Object.entries(data).filter(([key]) => key.startsWith(import_types5.IniSectionType.SSO_SESSION + CONFIG_PREFIX_SEPARATOR)).reduce((acc, [key, value]) => ({ ...acc, [key.substring(key.indexOf(CONFIG_PREFIX_SEPARATOR) + 1)]: value }), {}), "getSsoSessionData"); + var import_slurpFile2 = require_slurpFile2(); + var swallowError2 = /* @__PURE__ */ __name(() => ({}), "swallowError"); + var loadSsoSessionData = /* @__PURE__ */ __name(async (init = {}) => (0, import_slurpFile2.slurpFile)(init.configFilepath ?? getConfigFilepath()).then(parseIni).then(getSsoSessionData).catch(swallowError2), "loadSsoSessionData"); + var mergeConfigFiles = /* @__PURE__ */ __name((...files) => { + const merged = {}; + for (const file of files) { + for (const [key, values] of Object.entries(file)) { + if (merged[key] !== void 0) { + Object.assign(merged[key], values); + } else { + merged[key] = values; + } + } } + return merged; + }, "mergeConfigFiles"); + var parseKnownFiles = /* @__PURE__ */ __name(async (init) => { + const parsedFiles = await loadSharedConfigFiles(init); + return mergeConfigFiles(parsedFiles.configFile, parsedFiles.credentialsFile); + }, "parseKnownFiles"); + } +}); + +// ../../../node_modules/@smithy/node-config-provider/dist-cjs/index.js +var require_dist_cjs42 = __commonJS({ + "../../../node_modules/@smithy/node-config-provider/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all) => { + for (var name in all) + __defProp2(target, name, { get: all[name], enumerable: true }); }; - var de_AssumeRoleWithWebIdentityCommand = async (output, context) => { - if (output.statusCode >= 300) { - return de_AssumeRoleWithWebIdentityCommandError(output, context); + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); } - const data = await parseBody(output.body, context); - let contents = {}; - contents = de_AssumeRoleWithWebIdentityResponse(data.AssumeRoleWithWebIdentityResult, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; + return to; }; - exports2.de_AssumeRoleWithWebIdentityCommand = de_AssumeRoleWithWebIdentityCommand; - var de_AssumeRoleWithWebIdentityCommandError = async (output, context) => { - const parsedOutput = { - ...output, - body: await parseErrorBody(output.body, context) - }; - const errorCode = loadQueryErrorCode(output, parsedOutput.body); - switch (errorCode) { - case "ExpiredTokenException": - case "com.amazonaws.sts#ExpiredTokenException": - throw await de_ExpiredTokenExceptionRes(parsedOutput, context); - case "IDPCommunicationError": - case "com.amazonaws.sts#IDPCommunicationErrorException": - throw await de_IDPCommunicationErrorExceptionRes(parsedOutput, context); - case "IDPRejectedClaim": - case "com.amazonaws.sts#IDPRejectedClaimException": - throw await de_IDPRejectedClaimExceptionRes(parsedOutput, context); - case "InvalidIdentityToken": - case "com.amazonaws.sts#InvalidIdentityTokenException": - throw await de_InvalidIdentityTokenExceptionRes(parsedOutput, context); - case "MalformedPolicyDocument": - case "com.amazonaws.sts#MalformedPolicyDocumentException": - throw await de_MalformedPolicyDocumentExceptionRes(parsedOutput, context); - case "PackedPolicyTooLarge": - case "com.amazonaws.sts#PackedPolicyTooLargeException": - throw await de_PackedPolicyTooLargeExceptionRes(parsedOutput, context); - case "RegionDisabledException": - case "com.amazonaws.sts#RegionDisabledException": - throw await de_RegionDisabledExceptionRes(parsedOutput, context); - default: - const parsedBody = parsedOutput.body; - return throwDefaultError({ - output, - parsedBody: parsedBody.Error, - errorCode - }); + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + loadConfig: () => loadConfig + }); + module2.exports = __toCommonJS2(src_exports); + var import_property_provider2 = require_dist_cjs40(); + function getSelectorName(functionString) { + try { + const constants = new Set(Array.from(functionString.match(/([A-Z_]){3,}/g) ?? [])); + constants.delete("CONFIG"); + constants.delete("CONFIG_PREFIX_SEPARATOR"); + constants.delete("ENV"); + return [...constants].join(", "); + } catch (e) { + return functionString; } - }; - var de_DecodeAuthorizationMessageCommand = async (output, context) => { - if (output.statusCode >= 300) { - return de_DecodeAuthorizationMessageCommandError(output, context); + } + __name(getSelectorName, "getSelectorName"); + var fromEnv = /* @__PURE__ */ __name((envVarSelector, logger) => async () => { + try { + const config = envVarSelector(process.env); + if (config === void 0) { + throw new Error(); + } + return config; + } catch (e) { + throw new import_property_provider2.CredentialsProviderError( + e.message || `Not found in ENV: ${getSelectorName(envVarSelector.toString())}`, + { logger } + ); } - const data = await parseBody(output.body, context); - let contents = {}; - contents = de_DecodeAuthorizationMessageResponse(data.DecodeAuthorizationMessageResult, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; - }; - exports2.de_DecodeAuthorizationMessageCommand = de_DecodeAuthorizationMessageCommand; - var de_DecodeAuthorizationMessageCommandError = async (output, context) => { - const parsedOutput = { - ...output, - body: await parseErrorBody(output.body, context) - }; - const errorCode = loadQueryErrorCode(output, parsedOutput.body); - switch (errorCode) { - case "InvalidAuthorizationMessageException": - case "com.amazonaws.sts#InvalidAuthorizationMessageException": - throw await de_InvalidAuthorizationMessageExceptionRes(parsedOutput, context); - default: - const parsedBody = parsedOutput.body; - return throwDefaultError({ - output, - parsedBody: parsedBody.Error, - errorCode - }); + }, "fromEnv"); + var import_shared_ini_file_loader = require_dist_cjs41(); + var fromSharedConfigFiles = /* @__PURE__ */ __name((configSelector, { preferredFile = "config", ...init } = {}) => async () => { + const profile = (0, import_shared_ini_file_loader.getProfileName)(init); + const { configFile, credentialsFile } = await (0, import_shared_ini_file_loader.loadSharedConfigFiles)(init); + const profileFromCredentials = credentialsFile[profile] || {}; + const profileFromConfig = configFile[profile] || {}; + const mergedProfile = preferredFile === "config" ? { ...profileFromCredentials, ...profileFromConfig } : { ...profileFromConfig, ...profileFromCredentials }; + try { + const cfgFile = preferredFile === "config" ? configFile : credentialsFile; + const configValue = configSelector(mergedProfile, cfgFile); + if (configValue === void 0) { + throw new Error(); + } + return configValue; + } catch (e) { + throw new import_property_provider2.CredentialsProviderError( + e.message || `Not found in config files w/ profile [${profile}]: ${getSelectorName(configSelector.toString())}`, + { logger: init.logger } + ); } + }, "fromSharedConfigFiles"); + var isFunction = /* @__PURE__ */ __name((func) => typeof func === "function", "isFunction"); + var fromStatic = /* @__PURE__ */ __name((defaultValue) => isFunction(defaultValue) ? async () => await defaultValue() : (0, import_property_provider2.fromStatic)(defaultValue), "fromStatic"); + var loadConfig = /* @__PURE__ */ __name(({ environmentVariableSelector, configFileSelector, default: defaultValue }, configuration = {}) => (0, import_property_provider2.memoize)( + (0, import_property_provider2.chain)( + fromEnv(environmentVariableSelector), + fromSharedConfigFiles(configFileSelector, configuration), + fromStatic(defaultValue) + ) + ), "loadConfig"); + } +}); + +// ../../../node_modules/@smithy/middleware-endpoint/dist-cjs/adaptors/getEndpointUrlConfig.js +var require_getEndpointUrlConfig2 = __commonJS({ + "../../../node_modules/@smithy/middleware-endpoint/dist-cjs/adaptors/getEndpointUrlConfig.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getEndpointUrlConfig = void 0; + var shared_ini_file_loader_1 = require_dist_cjs41(); + var ENV_ENDPOINT_URL = "AWS_ENDPOINT_URL"; + var CONFIG_ENDPOINT_URL = "endpoint_url"; + var getEndpointUrlConfig = (serviceId) => ({ + environmentVariableSelector: (env) => { + const serviceSuffixParts = serviceId.split(" ").map((w) => w.toUpperCase()); + const serviceEndpointUrl = env[[ENV_ENDPOINT_URL, ...serviceSuffixParts].join("_")]; + if (serviceEndpointUrl) + return serviceEndpointUrl; + const endpointUrl = env[ENV_ENDPOINT_URL]; + if (endpointUrl) + return endpointUrl; + return void 0; + }, + configFileSelector: (profile, config) => { + if (config && profile.services) { + const servicesSection = config[["services", profile.services].join(shared_ini_file_loader_1.CONFIG_PREFIX_SEPARATOR)]; + if (servicesSection) { + const servicePrefixParts = serviceId.split(" ").map((w) => w.toLowerCase()); + const endpointUrl2 = servicesSection[[servicePrefixParts.join("_"), CONFIG_ENDPOINT_URL].join(shared_ini_file_loader_1.CONFIG_PREFIX_SEPARATOR)]; + if (endpointUrl2) + return endpointUrl2; + } + } + const endpointUrl = profile[CONFIG_ENDPOINT_URL]; + if (endpointUrl) + return endpointUrl; + return void 0; + }, + default: void 0 + }); + exports2.getEndpointUrlConfig = getEndpointUrlConfig; + } +}); + +// ../../../node_modules/@smithy/middleware-endpoint/dist-cjs/adaptors/getEndpointFromConfig.js +var require_getEndpointFromConfig2 = __commonJS({ + "../../../node_modules/@smithy/middleware-endpoint/dist-cjs/adaptors/getEndpointFromConfig.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getEndpointFromConfig = void 0; + var node_config_provider_1 = require_dist_cjs42(); + var getEndpointUrlConfig_1 = require_getEndpointUrlConfig2(); + var getEndpointFromConfig = async (serviceId) => (0, node_config_provider_1.loadConfig)((0, getEndpointUrlConfig_1.getEndpointUrlConfig)(serviceId !== null && serviceId !== void 0 ? serviceId : ""))(); + exports2.getEndpointFromConfig = getEndpointFromConfig; + } +}); + +// ../../../node_modules/@smithy/querystring-parser/dist-cjs/index.js +var require_dist_cjs43 = __commonJS({ + "../../../node_modules/@smithy/querystring-parser/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all) => { + for (var name in all) + __defProp2(target, name, { get: all[name], enumerable: true }); }; - var de_GetAccessKeyInfoCommand = async (output, context) => { - if (output.statusCode >= 300) { - return de_GetAccessKeyInfoCommandError(output, context); + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); } - const data = await parseBody(output.body, context); - let contents = {}; - contents = de_GetAccessKeyInfoResponse(data.GetAccessKeyInfoResult, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; - }; - exports2.de_GetAccessKeyInfoCommand = de_GetAccessKeyInfoCommand; - var de_GetAccessKeyInfoCommandError = async (output, context) => { - const parsedOutput = { - ...output, - body: await parseErrorBody(output.body, context) - }; - const errorCode = loadQueryErrorCode(output, parsedOutput.body); - const parsedBody = parsedOutput.body; - return throwDefaultError({ - output, - parsedBody: parsedBody.Error, - errorCode - }); + return to; }; - var de_GetCallerIdentityCommand = async (output, context) => { - if (output.statusCode >= 300) { - return de_GetCallerIdentityCommandError(output, context); + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + parseQueryString: () => parseQueryString + }); + module2.exports = __toCommonJS2(src_exports); + function parseQueryString(querystring) { + const query = {}; + querystring = querystring.replace(/^\?/, ""); + if (querystring) { + for (const pair of querystring.split("&")) { + let [key, value = null] = pair.split("="); + key = decodeURIComponent(key); + if (value) { + value = decodeURIComponent(value); + } + if (!(key in query)) { + query[key] = value; + } else if (Array.isArray(query[key])) { + query[key].push(value); + } else { + query[key] = [query[key], value]; + } + } } - const data = await parseBody(output.body, context); - let contents = {}; - contents = de_GetCallerIdentityResponse(data.GetCallerIdentityResult, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; - }; - exports2.de_GetCallerIdentityCommand = de_GetCallerIdentityCommand; - var de_GetCallerIdentityCommandError = async (output, context) => { - const parsedOutput = { - ...output, - body: await parseErrorBody(output.body, context) - }; - const errorCode = loadQueryErrorCode(output, parsedOutput.body); - const parsedBody = parsedOutput.body; - return throwDefaultError({ - output, - parsedBody: parsedBody.Error, - errorCode - }); + return query; + } + __name(parseQueryString, "parseQueryString"); + } +}); + +// ../../../node_modules/@smithy/url-parser/dist-cjs/index.js +var require_dist_cjs44 = __commonJS({ + "../../../node_modules/@smithy/url-parser/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all) => { + for (var name in all) + __defProp2(target, name, { get: all[name], enumerable: true }); }; - var de_GetFederationTokenCommand = async (output, context) => { - if (output.statusCode >= 300) { - return de_GetFederationTokenCommandError(output, context); + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); } - const data = await parseBody(output.body, context); - let contents = {}; - contents = de_GetFederationTokenResponse(data.GetFederationTokenResult, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; + return to; }; - exports2.de_GetFederationTokenCommand = de_GetFederationTokenCommand; - var de_GetFederationTokenCommandError = async (output, context) => { - const parsedOutput = { - ...output, - body: await parseErrorBody(output.body, context) - }; - const errorCode = loadQueryErrorCode(output, parsedOutput.body); - switch (errorCode) { - case "MalformedPolicyDocument": - case "com.amazonaws.sts#MalformedPolicyDocumentException": - throw await de_MalformedPolicyDocumentExceptionRes(parsedOutput, context); - case "PackedPolicyTooLarge": - case "com.amazonaws.sts#PackedPolicyTooLargeException": - throw await de_PackedPolicyTooLargeExceptionRes(parsedOutput, context); - case "RegionDisabledException": - case "com.amazonaws.sts#RegionDisabledException": - throw await de_RegionDisabledExceptionRes(parsedOutput, context); - default: - const parsedBody = parsedOutput.body; - return throwDefaultError({ - output, - parsedBody: parsedBody.Error, - errorCode - }); + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + parseUrl: () => parseUrl + }); + module2.exports = __toCommonJS2(src_exports); + var import_querystring_parser = require_dist_cjs43(); + var parseUrl = /* @__PURE__ */ __name((url2) => { + if (typeof url2 === "string") { + return parseUrl(new URL(url2)); } - }; - var de_GetSessionTokenCommand = async (output, context) => { - if (output.statusCode >= 300) { - return de_GetSessionTokenCommandError(output, context); + const { hostname, pathname, port, protocol, search } = url2; + let query; + if (search) { + query = (0, import_querystring_parser.parseQueryString)(search); } - const data = await parseBody(output.body, context); - let contents = {}; - contents = de_GetSessionTokenResponse(data.GetSessionTokenResult, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; - }; - exports2.de_GetSessionTokenCommand = de_GetSessionTokenCommand; - var de_GetSessionTokenCommandError = async (output, context) => { - const parsedOutput = { - ...output, - body: await parseErrorBody(output.body, context) + return { + hostname, + port: port ? parseInt(port) : void 0, + protocol, + path: pathname, + query }; - const errorCode = loadQueryErrorCode(output, parsedOutput.body); - switch (errorCode) { - case "RegionDisabledException": - case "com.amazonaws.sts#RegionDisabledException": - throw await de_RegionDisabledExceptionRes(parsedOutput, context); - default: - const parsedBody = parsedOutput.body; - return throwDefaultError({ - output, - parsedBody: parsedBody.Error, - errorCode - }); - } - }; - var de_ExpiredTokenExceptionRes = async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = de_ExpiredTokenException(body.Error, context); - const exception = new models_0_1.ExpiredTokenException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, smithy_client_1.decorateServiceException)(exception, body); - }; - var de_IDPCommunicationErrorExceptionRes = async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = de_IDPCommunicationErrorException(body.Error, context); - const exception = new models_0_1.IDPCommunicationErrorException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, smithy_client_1.decorateServiceException)(exception, body); - }; - var de_IDPRejectedClaimExceptionRes = async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = de_IDPRejectedClaimException(body.Error, context); - const exception = new models_0_1.IDPRejectedClaimException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, smithy_client_1.decorateServiceException)(exception, body); - }; - var de_InvalidAuthorizationMessageExceptionRes = async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = de_InvalidAuthorizationMessageException(body.Error, context); - const exception = new models_0_1.InvalidAuthorizationMessageException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, smithy_client_1.decorateServiceException)(exception, body); + }, "parseUrl"); + } +}); + +// ../../../node_modules/@smithy/middleware-serde/dist-cjs/index.js +var require_dist_cjs45 = __commonJS({ + "../../../node_modules/@smithy/middleware-serde/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all) => { + for (var name in all) + __defProp2(target, name, { get: all[name], enumerable: true }); }; - var de_InvalidIdentityTokenExceptionRes = async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = de_InvalidIdentityTokenException(body.Error, context); - const exception = new models_0_1.InvalidIdentityTokenException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, smithy_client_1.decorateServiceException)(exception, body); + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; }; - var de_MalformedPolicyDocumentExceptionRes = async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = de_MalformedPolicyDocumentException(body.Error, context); - const exception = new models_0_1.MalformedPolicyDocumentException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + deserializerMiddleware: () => deserializerMiddleware, + deserializerMiddlewareOption: () => deserializerMiddlewareOption, + getSerdePlugin: () => getSerdePlugin, + serializerMiddleware: () => serializerMiddleware, + serializerMiddlewareOption: () => serializerMiddlewareOption2 + }); + module2.exports = __toCommonJS2(src_exports); + var deserializerMiddleware = /* @__PURE__ */ __name((options, deserializer) => (next) => async (args) => { + const { response } = await next(args); + try { + const parsed = await deserializer(response, options); + return { + response, + output: parsed + }; + } catch (error) { + Object.defineProperty(error, "$response", { + value: response + }); + if (!("$metadata" in error)) { + const hint = `Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.`; + error.message += "\n " + hint; + if (typeof error.$responseBodyText !== "undefined") { + if (error.$response) { + error.$response.body = error.$responseBodyText; + } + } + } + throw error; + } + }, "deserializerMiddleware"); + var serializerMiddleware = /* @__PURE__ */ __name((options, serializer) => (next, context) => async (args) => { + var _a; + const endpoint = ((_a = context.endpointV2) == null ? void 0 : _a.url) && options.urlParser ? async () => options.urlParser(context.endpointV2.url) : options.endpoint; + if (!endpoint) { + throw new Error("No valid endpoint provider available."); + } + const request2 = await serializer(args.input, { ...options, endpoint }); + return next({ + ...args, + request: request2 }); - return (0, smithy_client_1.decorateServiceException)(exception, body); + }, "serializerMiddleware"); + var deserializerMiddlewareOption = { + name: "deserializerMiddleware", + step: "deserialize", + tags: ["DESERIALIZER"], + override: true }; - var de_PackedPolicyTooLargeExceptionRes = async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = de_PackedPolicyTooLargeException(body.Error, context); - const exception = new models_0_1.PackedPolicyTooLargeException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, smithy_client_1.decorateServiceException)(exception, body); + var serializerMiddlewareOption2 = { + name: "serializerMiddleware", + step: "serialize", + tags: ["SERIALIZER"], + override: true }; - var de_RegionDisabledExceptionRes = async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = de_RegionDisabledException(body.Error, context); - const exception = new models_0_1.RegionDisabledException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, smithy_client_1.decorateServiceException)(exception, body); + function getSerdePlugin(config, serializer, deserializer) { + return { + applyToStack: (commandStack) => { + commandStack.add(deserializerMiddleware(config, deserializer), deserializerMiddlewareOption); + commandStack.add(serializerMiddleware(config, serializer), serializerMiddlewareOption2); + } + }; + } + __name(getSerdePlugin, "getSerdePlugin"); + } +}); + +// ../../../node_modules/@smithy/middleware-endpoint/dist-cjs/index.js +var require_dist_cjs46 = __commonJS({ + "../../../node_modules/@smithy/middleware-endpoint/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all) => { + for (var name in all) + __defProp2(target, name, { get: all[name], enumerable: true }); }; - var se_AssumeRoleRequest = (input, context) => { - const entries = {}; - if (input.RoleArn != null) { - entries["RoleArn"] = input.RoleArn; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); } - if (input.RoleSessionName != null) { - entries["RoleSessionName"] = input.RoleSessionName; + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + endpointMiddleware: () => endpointMiddleware, + endpointMiddlewareOptions: () => endpointMiddlewareOptions2, + getEndpointFromInstructions: () => getEndpointFromInstructions, + getEndpointPlugin: () => getEndpointPlugin, + resolveEndpointConfig: () => resolveEndpointConfig, + resolveParams: () => resolveParams, + toEndpointV1: () => toEndpointV1 + }); + module2.exports = __toCommonJS2(src_exports); + var resolveParamsForS3 = /* @__PURE__ */ __name(async (endpointParams) => { + const bucket = (endpointParams == null ? void 0 : endpointParams.Bucket) || ""; + if (typeof endpointParams.Bucket === "string") { + endpointParams.Bucket = bucket.replace(/#/g, encodeURIComponent("#")).replace(/\?/g, encodeURIComponent("?")); } - if (input.PolicyArns != null) { - const memberEntries = se_policyDescriptorListType(input.PolicyArns, context); - if (input.PolicyArns?.length === 0) { - entries.PolicyArns = []; + if (isArnBucketName(bucket)) { + if (endpointParams.ForcePathStyle === true) { + throw new Error("Path-style addressing cannot be used with ARN buckets"); } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `PolicyArns.${key}`; - entries[loc] = value; - }); + } else if (!isDnsCompatibleBucketName(bucket) || bucket.indexOf(".") !== -1 && !String(endpointParams.Endpoint).startsWith("http:") || bucket.toLowerCase() !== bucket || bucket.length < 3) { + endpointParams.ForcePathStyle = true; } - if (input.Policy != null) { - entries["Policy"] = input.Policy; + if (endpointParams.DisableMultiRegionAccessPoints) { + endpointParams.disableMultiRegionAccessPoints = true; + endpointParams.DisableMRAP = true; } - if (input.DurationSeconds != null) { - entries["DurationSeconds"] = input.DurationSeconds; + return endpointParams; + }, "resolveParamsForS3"); + var DOMAIN_PATTERN = /^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/; + var IP_ADDRESS_PATTERN = /(\d+\.){3}\d+/; + var DOTS_PATTERN = /\.\./; + var isDnsCompatibleBucketName = /* @__PURE__ */ __name((bucketName) => DOMAIN_PATTERN.test(bucketName) && !IP_ADDRESS_PATTERN.test(bucketName) && !DOTS_PATTERN.test(bucketName), "isDnsCompatibleBucketName"); + var isArnBucketName = /* @__PURE__ */ __name((bucketName) => { + const [arn, partition, service, , , bucket] = bucketName.split(":"); + const isArn = arn === "arn" && bucketName.split(":").length >= 6; + const isValidArn = Boolean(isArn && partition && service && bucket); + if (isArn && !isValidArn) { + throw new Error(`Invalid ARN: ${bucketName} was an invalid ARN.`); } - if (input.Tags != null) { - const memberEntries = se_tagListType(input.Tags, context); - if (input.Tags?.length === 0) { - entries.Tags = []; + return isValidArn; + }, "isArnBucketName"); + var createConfigValueProvider = /* @__PURE__ */ __name((configKey, canonicalEndpointParamKey, config) => { + const configProvider = /* @__PURE__ */ __name(async () => { + const configValue = config[configKey] ?? config[canonicalEndpointParamKey]; + if (typeof configValue === "function") { + return configValue(); } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `Tags.${key}`; - entries[loc] = value; - }); + return configValue; + }, "configProvider"); + if (configKey === "credentialScope" || canonicalEndpointParamKey === "CredentialScope") { + return async () => { + const credentials = typeof config.credentials === "function" ? await config.credentials() : config.credentials; + const configValue = (credentials == null ? void 0 : credentials.credentialScope) ?? (credentials == null ? void 0 : credentials.CredentialScope); + return configValue; + }; } - if (input.TransitiveTagKeys != null) { - const memberEntries = se_tagKeyListType(input.TransitiveTagKeys, context); - if (input.TransitiveTagKeys?.length === 0) { - entries.TransitiveTagKeys = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `TransitiveTagKeys.${key}`; - entries[loc] = value; - }); + if (configKey === "accountId" || canonicalEndpointParamKey === "AccountId") { + return async () => { + const credentials = typeof config.credentials === "function" ? await config.credentials() : config.credentials; + const configValue = (credentials == null ? void 0 : credentials.accountId) ?? (credentials == null ? void 0 : credentials.AccountId); + return configValue; + }; } - if (input.ExternalId != null) { - entries["ExternalId"] = input.ExternalId; + if (configKey === "endpoint" || canonicalEndpointParamKey === "endpoint") { + return async () => { + const endpoint = await configProvider(); + if (endpoint && typeof endpoint === "object") { + if ("url" in endpoint) { + return endpoint.url.href; + } + if ("hostname" in endpoint) { + const { protocol, hostname, port, path } = endpoint; + return `${protocol}//${hostname}${port ? ":" + port : ""}${path}`; + } + } + return endpoint; + }; } - if (input.SerialNumber != null) { - entries["SerialNumber"] = input.SerialNumber; + return configProvider; + }, "createConfigValueProvider"); + var import_getEndpointFromConfig = require_getEndpointFromConfig2(); + var import_url_parser = require_dist_cjs44(); + var toEndpointV1 = /* @__PURE__ */ __name((endpoint) => { + if (typeof endpoint === "object") { + if ("url" in endpoint) { + return (0, import_url_parser.parseUrl)(endpoint.url); + } + return endpoint; } - if (input.TokenCode != null) { - entries["TokenCode"] = input.TokenCode; + return (0, import_url_parser.parseUrl)(endpoint); + }, "toEndpointV1"); + var getEndpointFromInstructions = /* @__PURE__ */ __name(async (commandInput, instructionsSupplier, clientConfig, context) => { + if (!clientConfig.endpoint) { + let endpointFromConfig; + if (clientConfig.serviceConfiguredEndpoint) { + endpointFromConfig = await clientConfig.serviceConfiguredEndpoint(); + } else { + endpointFromConfig = await (0, import_getEndpointFromConfig.getEndpointFromConfig)(clientConfig.serviceId); + } + if (endpointFromConfig) { + clientConfig.endpoint = () => Promise.resolve(toEndpointV1(endpointFromConfig)); + } } - if (input.SourceIdentity != null) { - entries["SourceIdentity"] = input.SourceIdentity; + const endpointParams = await resolveParams(commandInput, instructionsSupplier, clientConfig); + if (typeof clientConfig.endpointProvider !== "function") { + throw new Error("config.endpointProvider is not set."); } - if (input.ProvidedContexts != null) { - const memberEntries = se_ProvidedContextsListType(input.ProvidedContexts, context); - if (input.ProvidedContexts?.length === 0) { - entries.ProvidedContexts = []; + const endpoint = clientConfig.endpointProvider(endpointParams, context); + return endpoint; + }, "getEndpointFromInstructions"); + var resolveParams = /* @__PURE__ */ __name(async (commandInput, instructionsSupplier, clientConfig) => { + var _a; + const endpointParams = {}; + const instructions = ((_a = instructionsSupplier == null ? void 0 : instructionsSupplier.getEndpointParameterInstructions) == null ? void 0 : _a.call(instructionsSupplier)) || {}; + for (const [name, instruction] of Object.entries(instructions)) { + switch (instruction.type) { + case "staticContextParams": + endpointParams[name] = instruction.value; + break; + case "contextParams": + endpointParams[name] = commandInput[instruction.name]; + break; + case "clientContextParams": + case "builtInParams": + endpointParams[name] = await createConfigValueProvider(instruction.name, name, clientConfig)(); + break; + default: + throw new Error("Unrecognized endpoint parameter instruction: " + JSON.stringify(instruction)); } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `ProvidedContexts.${key}`; - entries[loc] = value; - }); - } - return entries; - }; - var se_AssumeRoleWithSAMLRequest = (input, context) => { - const entries = {}; - if (input.RoleArn != null) { - entries["RoleArn"] = input.RoleArn; } - if (input.PrincipalArn != null) { - entries["PrincipalArn"] = input.PrincipalArn; + if (Object.keys(instructions).length === 0) { + Object.assign(endpointParams, clientConfig); } - if (input.SAMLAssertion != null) { - entries["SAMLAssertion"] = input.SAMLAssertion; + if (String(clientConfig.serviceId).toLowerCase() === "s3") { + await resolveParamsForS3(endpointParams); } - if (input.PolicyArns != null) { - const memberEntries = se_policyDescriptorListType(input.PolicyArns, context); - if (input.PolicyArns?.length === 0) { - entries.PolicyArns = []; + return endpointParams; + }, "resolveParams"); + var import_util_middleware3 = require_dist_cjs10(); + var endpointMiddleware = /* @__PURE__ */ __name(({ + config, + instructions + }) => { + return (next, context) => async (args) => { + var _a, _b, _c; + const endpoint = await getEndpointFromInstructions( + args.input, + { + getEndpointParameterInstructions() { + return instructions; + } + }, + { ...config }, + context + ); + context.endpointV2 = endpoint; + context.authSchemes = (_a = endpoint.properties) == null ? void 0 : _a.authSchemes; + const authScheme = (_b = context.authSchemes) == null ? void 0 : _b[0]; + if (authScheme) { + context["signing_region"] = authScheme.signingRegion; + context["signing_service"] = authScheme.signingName; + const smithyContext = (0, import_util_middleware3.getSmithyContext)(context); + const httpAuthOption = (_c = smithyContext == null ? void 0 : smithyContext.selectedHttpAuthScheme) == null ? void 0 : _c.httpAuthOption; + if (httpAuthOption) { + httpAuthOption.signingProperties = Object.assign( + httpAuthOption.signingProperties || {}, + { + signing_region: authScheme.signingRegion, + signingRegion: authScheme.signingRegion, + signing_service: authScheme.signingName, + signingName: authScheme.signingName, + signingRegionSet: authScheme.signingRegionSet + }, + authScheme.properties + ); + } } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `PolicyArns.${key}`; - entries[loc] = value; + return next({ + ...args }); - } - if (input.Policy != null) { - entries["Policy"] = input.Policy; - } - if (input.DurationSeconds != null) { - entries["DurationSeconds"] = input.DurationSeconds; - } - return entries; + }; + }, "endpointMiddleware"); + var import_middleware_serde2 = require_dist_cjs45(); + var endpointMiddlewareOptions2 = { + step: "serialize", + tags: ["ENDPOINT_PARAMETERS", "ENDPOINT_V2", "ENDPOINT"], + name: "endpointV2Middleware", + override: true, + relation: "before", + toMiddleware: import_middleware_serde2.serializerMiddlewareOption.name }; - var se_AssumeRoleWithWebIdentityRequest = (input, context) => { - const entries = {}; - if (input.RoleArn != null) { - entries["RoleArn"] = input.RoleArn; - } - if (input.RoleSessionName != null) { - entries["RoleSessionName"] = input.RoleSessionName; - } - if (input.WebIdentityToken != null) { - entries["WebIdentityToken"] = input.WebIdentityToken; - } - if (input.ProviderId != null) { - entries["ProviderId"] = input.ProviderId; + var getEndpointPlugin = /* @__PURE__ */ __name((config, instructions) => ({ + applyToStack: (clientStack) => { + clientStack.addRelativeTo( + endpointMiddleware({ + config, + instructions + }), + endpointMiddlewareOptions2 + ); } - if (input.PolicyArns != null) { - const memberEntries = se_policyDescriptorListType(input.PolicyArns, context); - if (input.PolicyArns?.length === 0) { - entries.PolicyArns = []; + }), "getEndpointPlugin"); + var import_getEndpointFromConfig2 = require_getEndpointFromConfig2(); + var resolveEndpointConfig = /* @__PURE__ */ __name((input) => { + const tls = input.tls ?? true; + const { endpoint } = input; + const customEndpointProvider = endpoint != null ? async () => toEndpointV1(await (0, import_util_middleware3.normalizeProvider)(endpoint)()) : void 0; + const isCustomEndpoint = !!endpoint; + const resolvedConfig = { + ...input, + endpoint: customEndpointProvider, + tls, + isCustomEndpoint, + useDualstackEndpoint: (0, import_util_middleware3.normalizeProvider)(input.useDualstackEndpoint ?? false), + useFipsEndpoint: (0, import_util_middleware3.normalizeProvider)(input.useFipsEndpoint ?? false) + }; + let configuredEndpointPromise = void 0; + resolvedConfig.serviceConfiguredEndpoint = async () => { + if (input.serviceId && !configuredEndpointPromise) { + configuredEndpointPromise = (0, import_getEndpointFromConfig2.getEndpointFromConfig)(input.serviceId); } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `PolicyArns.${key}`; - entries[loc] = value; - }); - } - if (input.Policy != null) { - entries["Policy"] = input.Policy; - } - if (input.DurationSeconds != null) { - entries["DurationSeconds"] = input.DurationSeconds; + return configuredEndpointPromise; + }; + return resolvedConfig; + }, "resolveEndpointConfig"); + } +}); + +// ../../../node_modules/@aws-sdk/core/dist-es/submodules/client/emitWarningIfUnsupportedVersion.js +var warningEmitted, emitWarningIfUnsupportedVersion; +var init_emitWarningIfUnsupportedVersion = __esm({ + "../../../node_modules/@aws-sdk/core/dist-es/submodules/client/emitWarningIfUnsupportedVersion.js"() { + warningEmitted = false; + emitWarningIfUnsupportedVersion = (version2) => { + if (version2 && !warningEmitted && parseInt(version2.substring(1, version2.indexOf("."))) < 18) { + warningEmitted = true; + process.emitWarning(`NodeDeprecationWarning: The AWS SDK for JavaScript (v3) will +no longer support Node.js 16.x on January 6, 2025. + +To continue receiving updates to AWS services, bug fixes, and security +updates please upgrade to a supported Node.js LTS version. + +More information can be found at: https://a.co/74kJMmI`); } - return entries; }; - var se_DecodeAuthorizationMessageRequest = (input, context) => { - const entries = {}; - if (input.EncodedMessage != null) { - entries["EncodedMessage"] = input.EncodedMessage; + } +}); + +// ../../../node_modules/@aws-sdk/core/dist-es/submodules/client/index.js +var init_client = __esm({ + "../../../node_modules/@aws-sdk/core/dist-es/submodules/client/index.js"() { + init_emitWarningIfUnsupportedVersion(); + } +}); + +// ../../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getDateHeader.js +var import_protocol_http5, getDateHeader; +var init_getDateHeader = __esm({ + "../../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getDateHeader.js"() { + import_protocol_http5 = __toESM(require_dist_cjs2()); + getDateHeader = (response) => import_protocol_http5.HttpResponse.isInstance(response) ? response.headers?.date ?? response.headers?.Date : void 0; + } +}); + +// ../../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getSkewCorrectedDate.js +var getSkewCorrectedDate; +var init_getSkewCorrectedDate = __esm({ + "../../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getSkewCorrectedDate.js"() { + getSkewCorrectedDate = (systemClockOffset) => new Date(Date.now() + systemClockOffset); + } +}); + +// ../../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/isClockSkewed.js +var isClockSkewed; +var init_isClockSkewed = __esm({ + "../../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/isClockSkewed.js"() { + init_getSkewCorrectedDate(); + isClockSkewed = (clockTime, systemClockOffset) => Math.abs(getSkewCorrectedDate(systemClockOffset).getTime() - clockTime) >= 3e5; + } +}); + +// ../../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getUpdatedSystemClockOffset.js +var getUpdatedSystemClockOffset; +var init_getUpdatedSystemClockOffset = __esm({ + "../../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getUpdatedSystemClockOffset.js"() { + init_isClockSkewed(); + getUpdatedSystemClockOffset = (clockTime, currentSystemClockOffset) => { + const clockTimeInMs = Date.parse(clockTime); + if (isClockSkewed(clockTimeInMs, currentSystemClockOffset)) { + return clockTimeInMs - Date.now(); } - return entries; + return currentSystemClockOffset; }; - var se_GetAccessKeyInfoRequest = (input, context) => { - const entries = {}; - if (input.AccessKeyId != null) { - entries["AccessKeyId"] = input.AccessKeyId; + } +}); + +// ../../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/index.js +var init_utils = __esm({ + "../../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/index.js"() { + init_getDateHeader(); + init_getSkewCorrectedDate(); + init_getUpdatedSystemClockOffset(); + } +}); + +// ../../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4Signer.js +var import_protocol_http6, throwSigningPropertyError, validateSigningProperties, AwsSdkSigV4Signer, AWSSDKSigV4Signer; +var init_AwsSdkSigV4Signer = __esm({ + "../../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4Signer.js"() { + import_protocol_http6 = __toESM(require_dist_cjs2()); + init_utils(); + throwSigningPropertyError = (name, property) => { + if (!property) { + throw new Error(`Property \`${name}\` is not resolved for AWS SDK SigV4Auth`); } - return entries; + return property; }; - var se_GetCallerIdentityRequest = (input, context) => { - const entries = {}; - return entries; + validateSigningProperties = async (signingProperties) => { + const context = throwSigningPropertyError("context", signingProperties.context); + const config = throwSigningPropertyError("config", signingProperties.config); + const authScheme = context.endpointV2?.properties?.authSchemes?.[0]; + const signerFunction = throwSigningPropertyError("signer", config.signer); + const signer = await signerFunction(authScheme); + const signingRegion = signingProperties?.signingRegion; + const signingRegionSet = signingProperties?.signingRegionSet; + const signingName = signingProperties?.signingName; + return { + config, + signer, + signingRegion, + signingRegionSet, + signingName + }; }; - var se_GetFederationTokenRequest = (input, context) => { - const entries = {}; - if (input.Name != null) { - entries["Name"] = input.Name; - } - if (input.Policy != null) { - entries["Policy"] = input.Policy; - } - if (input.PolicyArns != null) { - const memberEntries = se_policyDescriptorListType(input.PolicyArns, context); - if (input.PolicyArns?.length === 0) { - entries.PolicyArns = []; + AwsSdkSigV4Signer = class { + async sign(httpRequest, identity, signingProperties) { + if (!import_protocol_http6.HttpRequest.isInstance(httpRequest)) { + throw new Error("The request is not an instance of `HttpRequest` and cannot be signed"); } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `PolicyArns.${key}`; - entries[loc] = value; - }); - } - if (input.DurationSeconds != null) { - entries["DurationSeconds"] = input.DurationSeconds; - } - if (input.Tags != null) { - const memberEntries = se_tagListType(input.Tags, context); - if (input.Tags?.length === 0) { - entries.Tags = []; + const validatedProps = await validateSigningProperties(signingProperties); + const { config, signer } = validatedProps; + let { signingRegion, signingName } = validatedProps; + const handlerExecutionContext = signingProperties.context; + if (handlerExecutionContext?.authSchemes?.length ?? 0 > 1) { + const [first, second] = handlerExecutionContext.authSchemes; + if (first?.name === "sigv4a" && second?.name === "sigv4") { + signingRegion = second?.signingRegion ?? signingRegion; + signingName = second?.signingName ?? signingName; + } } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `Tags.${key}`; - entries[loc] = value; + const signedRequest = await signer.sign(httpRequest, { + signingDate: getSkewCorrectedDate(config.systemClockOffset), + signingRegion, + signingService: signingName }); + return signedRequest; + } + errorHandler(signingProperties) { + return (error) => { + const serverTime = error.ServerTime ?? getDateHeader(error.$response); + if (serverTime) { + const config = throwSigningPropertyError("config", signingProperties.config); + const initialSystemClockOffset = config.systemClockOffset; + config.systemClockOffset = getUpdatedSystemClockOffset(serverTime, config.systemClockOffset); + const clockSkewCorrected = config.systemClockOffset !== initialSystemClockOffset; + if (clockSkewCorrected && error.$metadata) { + error.$metadata.clockSkewCorrected = true; + } + } + throw error; + }; } - return entries; - }; - var se_GetSessionTokenRequest = (input, context) => { - const entries = {}; - if (input.DurationSeconds != null) { - entries["DurationSeconds"] = input.DurationSeconds; - } - if (input.SerialNumber != null) { - entries["SerialNumber"] = input.SerialNumber; - } - if (input.TokenCode != null) { - entries["TokenCode"] = input.TokenCode; - } - return entries; - }; - var se_policyDescriptorListType = (input, context) => { - const entries = {}; - let counter = 1; - for (const entry of input) { - if (entry === null) { - continue; + successHandler(httpResponse, signingProperties) { + const dateHeader = getDateHeader(httpResponse); + if (dateHeader) { + const config = throwSigningPropertyError("config", signingProperties.config); + config.systemClockOffset = getUpdatedSystemClockOffset(dateHeader, config.systemClockOffset); } - const memberEntries = se_PolicyDescriptorType(entry, context); - Object.entries(memberEntries).forEach(([key, value]) => { - entries[`member.${counter}.${key}`] = value; - }); - counter++; - } - return entries; - }; - var se_PolicyDescriptorType = (input, context) => { - const entries = {}; - if (input.arn != null) { - entries["arn"] = input.arn; - } - return entries; - }; - var se_ProvidedContext = (input, context) => { - const entries = {}; - if (input.ProviderArn != null) { - entries["ProviderArn"] = input.ProviderArn; } - if (input.ContextAssertion != null) { - entries["ContextAssertion"] = input.ContextAssertion; - } - return entries; }; - var se_ProvidedContextsListType = (input, context) => { - const entries = {}; - let counter = 1; - for (const entry of input) { - if (entry === null) { - continue; + AWSSDKSigV4Signer = AwsSdkSigV4Signer; + } +}); + +// ../../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4ASigner.js +var import_protocol_http7, AwsSdkSigV4ASigner; +var init_AwsSdkSigV4ASigner = __esm({ + "../../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4ASigner.js"() { + import_protocol_http7 = __toESM(require_dist_cjs2()); + init_utils(); + init_AwsSdkSigV4Signer(); + AwsSdkSigV4ASigner = class extends AwsSdkSigV4Signer { + async sign(httpRequest, identity, signingProperties) { + if (!import_protocol_http7.HttpRequest.isInstance(httpRequest)) { + throw new Error("The request is not an instance of `HttpRequest` and cannot be signed"); } - const memberEntries = se_ProvidedContext(entry, context); - Object.entries(memberEntries).forEach(([key, value]) => { - entries[`member.${counter}.${key}`] = value; + const { config, signer, signingRegion, signingRegionSet, signingName } = await validateSigningProperties(signingProperties); + const configResolvedSigningRegionSet = await config.sigv4aSigningRegionSet?.(); + const multiRegionOverride = (configResolvedSigningRegionSet ?? signingRegionSet ?? [signingRegion]).join(","); + const signedRequest = await signer.sign(httpRequest, { + signingDate: getSkewCorrectedDate(config.systemClockOffset), + signingRegion: multiRegionOverride, + signingService: signingName }); - counter++; + return signedRequest; } - return entries; }; - var se_Tag = (input, context) => { - const entries = {}; - if (input.Key != null) { - entries["Key"] = input.Key; - } - if (input.Value != null) { - entries["Value"] = input.Value; - } - return entries; + } +}); + +// ../../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4AConfig.js +var import_property_provider, resolveAwsSdkSigV4AConfig, NODE_SIGV4A_CONFIG_OPTIONS; +var init_resolveAwsSdkSigV4AConfig = __esm({ + "../../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4AConfig.js"() { + init_dist_es(); + import_property_provider = __toESM(require_dist_cjs40()); + resolveAwsSdkSigV4AConfig = (config) => { + config.sigv4aSigningRegionSet = normalizeProvider(config.sigv4aSigningRegionSet); + return config; }; - var se_tagKeyListType = (input, context) => { - const entries = {}; - let counter = 1; - for (const entry of input) { - if (entry === null) { - continue; + NODE_SIGV4A_CONFIG_OPTIONS = { + environmentVariableSelector(env) { + if (env.AWS_SIGV4A_SIGNING_REGION_SET) { + return env.AWS_SIGV4A_SIGNING_REGION_SET.split(",").map((_) => _.trim()); } - entries[`member.${counter}`] = entry; - counter++; - } - return entries; - }; - var se_tagListType = (input, context) => { - const entries = {}; - let counter = 1; - for (const entry of input) { - if (entry === null) { - continue; + throw new import_property_provider.ProviderError("AWS_SIGV4A_SIGNING_REGION_SET not set in env.", { + tryNextLink: true + }); + }, + configFileSelector(profile) { + if (profile.sigv4a_signing_region_set) { + return (profile.sigv4a_signing_region_set ?? "").split(",").map((_) => _.trim()); } - const memberEntries = se_Tag(entry, context); - Object.entries(memberEntries).forEach(([key, value]) => { - entries[`member.${counter}.${key}`] = value; + throw new import_property_provider.ProviderError("sigv4a_signing_region_set not set in profile.", { + tryNextLink: true }); - counter++; - } - return entries; - }; - var de_AssumedRoleUser = (output, context) => { - const contents = {}; - if (output["AssumedRoleId"] !== void 0) { - contents.AssumedRoleId = (0, smithy_client_1.expectString)(output["AssumedRoleId"]); - } - if (output["Arn"] !== void 0) { - contents.Arn = (0, smithy_client_1.expectString)(output["Arn"]); - } - return contents; - }; - var de_AssumeRoleResponse = (output, context) => { - const contents = {}; - if (output["Credentials"] !== void 0) { - contents.Credentials = de_Credentials(output["Credentials"], context); - } - if (output["AssumedRoleUser"] !== void 0) { - contents.AssumedRoleUser = de_AssumedRoleUser(output["AssumedRoleUser"], context); - } - if (output["PackedPolicySize"] !== void 0) { - contents.PackedPolicySize = (0, smithy_client_1.strictParseInt32)(output["PackedPolicySize"]); - } - if (output["SourceIdentity"] !== void 0) { - contents.SourceIdentity = (0, smithy_client_1.expectString)(output["SourceIdentity"]); - } - return contents; - }; - var de_AssumeRoleWithSAMLResponse = (output, context) => { - const contents = {}; - if (output["Credentials"] !== void 0) { - contents.Credentials = de_Credentials(output["Credentials"], context); - } - if (output["AssumedRoleUser"] !== void 0) { - contents.AssumedRoleUser = de_AssumedRoleUser(output["AssumedRoleUser"], context); - } - if (output["PackedPolicySize"] !== void 0) { - contents.PackedPolicySize = (0, smithy_client_1.strictParseInt32)(output["PackedPolicySize"]); - } - if (output["Subject"] !== void 0) { - contents.Subject = (0, smithy_client_1.expectString)(output["Subject"]); - } - if (output["SubjectType"] !== void 0) { - contents.SubjectType = (0, smithy_client_1.expectString)(output["SubjectType"]); - } - if (output["Issuer"] !== void 0) { - contents.Issuer = (0, smithy_client_1.expectString)(output["Issuer"]); - } - if (output["Audience"] !== void 0) { - contents.Audience = (0, smithy_client_1.expectString)(output["Audience"]); - } - if (output["NameQualifier"] !== void 0) { - contents.NameQualifier = (0, smithy_client_1.expectString)(output["NameQualifier"]); - } - if (output["SourceIdentity"] !== void 0) { - contents.SourceIdentity = (0, smithy_client_1.expectString)(output["SourceIdentity"]); - } - return contents; - }; - var de_AssumeRoleWithWebIdentityResponse = (output, context) => { - const contents = {}; - if (output["Credentials"] !== void 0) { - contents.Credentials = de_Credentials(output["Credentials"], context); - } - if (output["SubjectFromWebIdentityToken"] !== void 0) { - contents.SubjectFromWebIdentityToken = (0, smithy_client_1.expectString)(output["SubjectFromWebIdentityToken"]); - } - if (output["AssumedRoleUser"] !== void 0) { - contents.AssumedRoleUser = de_AssumedRoleUser(output["AssumedRoleUser"], context); - } - if (output["PackedPolicySize"] !== void 0) { - contents.PackedPolicySize = (0, smithy_client_1.strictParseInt32)(output["PackedPolicySize"]); - } - if (output["Provider"] !== void 0) { - contents.Provider = (0, smithy_client_1.expectString)(output["Provider"]); - } - if (output["Audience"] !== void 0) { - contents.Audience = (0, smithy_client_1.expectString)(output["Audience"]); - } - if (output["SourceIdentity"] !== void 0) { - contents.SourceIdentity = (0, smithy_client_1.expectString)(output["SourceIdentity"]); - } - return contents; - }; - var de_Credentials = (output, context) => { - const contents = {}; - if (output["AccessKeyId"] !== void 0) { - contents.AccessKeyId = (0, smithy_client_1.expectString)(output["AccessKeyId"]); - } - if (output["SecretAccessKey"] !== void 0) { - contents.SecretAccessKey = (0, smithy_client_1.expectString)(output["SecretAccessKey"]); - } - if (output["SessionToken"] !== void 0) { - contents.SessionToken = (0, smithy_client_1.expectString)(output["SessionToken"]); - } - if (output["Expiration"] !== void 0) { - contents.Expiration = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output["Expiration"])); - } - return contents; - }; - var de_DecodeAuthorizationMessageResponse = (output, context) => { - const contents = {}; - if (output["DecodedMessage"] !== void 0) { - contents.DecodedMessage = (0, smithy_client_1.expectString)(output["DecodedMessage"]); - } - return contents; - }; - var de_ExpiredTokenException = (output, context) => { - const contents = {}; - if (output["message"] !== void 0) { - contents.message = (0, smithy_client_1.expectString)(output["message"]); - } - return contents; + }, + default: void 0 }; - var de_FederatedUser = (output, context) => { - const contents = {}; - if (output["FederatedUserId"] !== void 0) { - contents.FederatedUserId = (0, smithy_client_1.expectString)(output["FederatedUserId"]); - } - if (output["Arn"] !== void 0) { - contents.Arn = (0, smithy_client_1.expectString)(output["Arn"]); - } - return contents; + } +}); + +// ../../../node_modules/@smithy/signature-v4/dist-cjs/index.js +var require_dist_cjs47 = __commonJS({ + "../../../node_modules/@smithy/signature-v4/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all) => { + for (var name in all) + __defProp2(target, name, { get: all[name], enumerable: true }); }; - var de_GetAccessKeyInfoResponse = (output, context) => { - const contents = {}; - if (output["Account"] !== void 0) { - contents.Account = (0, smithy_client_1.expectString)(output["Account"]); + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); } - return contents; + return to; }; - var de_GetCallerIdentityResponse = (output, context) => { - const contents = {}; - if (output["UserId"] !== void 0) { - contents.UserId = (0, smithy_client_1.expectString)(output["UserId"]); - } - if (output["Account"] !== void 0) { - contents.Account = (0, smithy_client_1.expectString)(output["Account"]); - } - if (output["Arn"] !== void 0) { - contents.Arn = (0, smithy_client_1.expectString)(output["Arn"]); - } - return contents; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + SignatureV4: () => SignatureV42, + clearCredentialCache: () => clearCredentialCache, + createScope: () => createScope, + getCanonicalHeaders: () => getCanonicalHeaders, + getCanonicalQuery: () => getCanonicalQuery, + getPayloadHash: () => getPayloadHash, + getSigningKey: () => getSigningKey, + moveHeadersToQuery: () => moveHeadersToQuery, + prepareRequest: () => prepareRequest + }); + module2.exports = __toCommonJS2(src_exports); + var import_util_middleware3 = require_dist_cjs10(); + var import_util_utf84 = require_dist_cjs28(); + var ALGORITHM_QUERY_PARAM = "X-Amz-Algorithm"; + var CREDENTIAL_QUERY_PARAM = "X-Amz-Credential"; + var AMZ_DATE_QUERY_PARAM = "X-Amz-Date"; + var SIGNED_HEADERS_QUERY_PARAM = "X-Amz-SignedHeaders"; + var EXPIRES_QUERY_PARAM = "X-Amz-Expires"; + var SIGNATURE_QUERY_PARAM = "X-Amz-Signature"; + var TOKEN_QUERY_PARAM = "X-Amz-Security-Token"; + var AUTH_HEADER = "authorization"; + var AMZ_DATE_HEADER = AMZ_DATE_QUERY_PARAM.toLowerCase(); + var DATE_HEADER = "date"; + var GENERATED_HEADERS = [AUTH_HEADER, AMZ_DATE_HEADER, DATE_HEADER]; + var SIGNATURE_HEADER = SIGNATURE_QUERY_PARAM.toLowerCase(); + var SHA256_HEADER = "x-amz-content-sha256"; + var TOKEN_HEADER = TOKEN_QUERY_PARAM.toLowerCase(); + var ALWAYS_UNSIGNABLE_HEADERS = { + authorization: true, + "cache-control": true, + connection: true, + expect: true, + from: true, + "keep-alive": true, + "max-forwards": true, + pragma: true, + referer: true, + te: true, + trailer: true, + "transfer-encoding": true, + upgrade: true, + "user-agent": true, + "x-amzn-trace-id": true }; - var de_GetFederationTokenResponse = (output, context) => { - const contents = {}; - if (output["Credentials"] !== void 0) { - contents.Credentials = de_Credentials(output["Credentials"], context); - } - if (output["FederatedUser"] !== void 0) { - contents.FederatedUser = de_FederatedUser(output["FederatedUser"], context); - } - if (output["PackedPolicySize"] !== void 0) { - contents.PackedPolicySize = (0, smithy_client_1.strictParseInt32)(output["PackedPolicySize"]); + var PROXY_HEADER_PATTERN = /^proxy-/; + var SEC_HEADER_PATTERN = /^sec-/; + var ALGORITHM_IDENTIFIER = "AWS4-HMAC-SHA256"; + var EVENT_ALGORITHM_IDENTIFIER = "AWS4-HMAC-SHA256-PAYLOAD"; + var UNSIGNED_PAYLOAD = "UNSIGNED-PAYLOAD"; + var MAX_CACHE_SIZE = 50; + var KEY_TYPE_IDENTIFIER = "aws4_request"; + var MAX_PRESIGNED_TTL = 60 * 60 * 24 * 7; + var import_util_hex_encoding = require_dist_cjs35(); + var import_util_utf8 = require_dist_cjs28(); + var signingKeyCache = {}; + var cacheQueue = []; + var createScope = /* @__PURE__ */ __name((shortDate, region, service) => `${shortDate}/${region}/${service}/${KEY_TYPE_IDENTIFIER}`, "createScope"); + var getSigningKey = /* @__PURE__ */ __name(async (sha256Constructor, credentials, shortDate, region, service) => { + const credsHash = await hmac(sha256Constructor, credentials.secretAccessKey, credentials.accessKeyId); + const cacheKey = `${shortDate}:${region}:${service}:${(0, import_util_hex_encoding.toHex)(credsHash)}:${credentials.sessionToken}`; + if (cacheKey in signingKeyCache) { + return signingKeyCache[cacheKey]; } - return contents; - }; - var de_GetSessionTokenResponse = (output, context) => { - const contents = {}; - if (output["Credentials"] !== void 0) { - contents.Credentials = de_Credentials(output["Credentials"], context); + cacheQueue.push(cacheKey); + while (cacheQueue.length > MAX_CACHE_SIZE) { + delete signingKeyCache[cacheQueue.shift()]; } - return contents; - }; - var de_IDPCommunicationErrorException = (output, context) => { - const contents = {}; - if (output["message"] !== void 0) { - contents.message = (0, smithy_client_1.expectString)(output["message"]); + let key = `AWS4${credentials.secretAccessKey}`; + for (const signable of [shortDate, region, service, KEY_TYPE_IDENTIFIER]) { + key = await hmac(sha256Constructor, key, signable); } - return contents; - }; - var de_IDPRejectedClaimException = (output, context) => { - const contents = {}; - if (output["message"] !== void 0) { - contents.message = (0, smithy_client_1.expectString)(output["message"]); + return signingKeyCache[cacheKey] = key; + }, "getSigningKey"); + var clearCredentialCache = /* @__PURE__ */ __name(() => { + cacheQueue.length = 0; + Object.keys(signingKeyCache).forEach((cacheKey) => { + delete signingKeyCache[cacheKey]; + }); + }, "clearCredentialCache"); + var hmac = /* @__PURE__ */ __name((ctor, secret, data) => { + const hash = new ctor(secret); + hash.update((0, import_util_utf8.toUint8Array)(data)); + return hash.digest(); + }, "hmac"); + var getCanonicalHeaders = /* @__PURE__ */ __name(({ headers }, unsignableHeaders, signableHeaders) => { + const canonical = {}; + for (const headerName of Object.keys(headers).sort()) { + if (headers[headerName] == void 0) { + continue; + } + const canonicalHeaderName = headerName.toLowerCase(); + if (canonicalHeaderName in ALWAYS_UNSIGNABLE_HEADERS || (unsignableHeaders == null ? void 0 : unsignableHeaders.has(canonicalHeaderName)) || PROXY_HEADER_PATTERN.test(canonicalHeaderName) || SEC_HEADER_PATTERN.test(canonicalHeaderName)) { + if (!signableHeaders || signableHeaders && !signableHeaders.has(canonicalHeaderName)) { + continue; + } + } + canonical[canonicalHeaderName] = headers[headerName].trim().replace(/\s+/g, " "); } - return contents; - }; - var de_InvalidAuthorizationMessageException = (output, context) => { - const contents = {}; - if (output["message"] !== void 0) { - contents.message = (0, smithy_client_1.expectString)(output["message"]); + return canonical; + }, "getCanonicalHeaders"); + var import_util_uri_escape = require_dist_cjs31(); + var getCanonicalQuery = /* @__PURE__ */ __name(({ query = {} }) => { + const keys = []; + const serialized = {}; + for (const key of Object.keys(query).sort()) { + if (key.toLowerCase() === SIGNATURE_HEADER) { + continue; + } + keys.push(key); + const value = query[key]; + if (typeof value === "string") { + serialized[key] = `${(0, import_util_uri_escape.escapeUri)(key)}=${(0, import_util_uri_escape.escapeUri)(value)}`; + } else if (Array.isArray(value)) { + serialized[key] = value.slice(0).reduce( + (encoded, value2) => encoded.concat([`${(0, import_util_uri_escape.escapeUri)(key)}=${(0, import_util_uri_escape.escapeUri)(value2)}`]), + [] + ).sort().join("&"); + } } - return contents; - }; - var de_InvalidIdentityTokenException = (output, context) => { - const contents = {}; - if (output["message"] !== void 0) { - contents.message = (0, smithy_client_1.expectString)(output["message"]); + return keys.map((key) => serialized[key]).filter((serialized2) => serialized2).join("&"); + }, "getCanonicalQuery"); + var import_is_array_buffer = require_dist_cjs26(); + var import_util_utf82 = require_dist_cjs28(); + var getPayloadHash = /* @__PURE__ */ __name(async ({ headers, body }, hashConstructor) => { + for (const headerName of Object.keys(headers)) { + if (headerName.toLowerCase() === SHA256_HEADER) { + return headers[headerName]; + } } - return contents; - }; - var de_MalformedPolicyDocumentException = (output, context) => { - const contents = {}; - if (output["message"] !== void 0) { - contents.message = (0, smithy_client_1.expectString)(output["message"]); + if (body == void 0) { + return "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"; + } else if (typeof body === "string" || ArrayBuffer.isView(body) || (0, import_is_array_buffer.isArrayBuffer)(body)) { + const hashCtor = new hashConstructor(); + hashCtor.update((0, import_util_utf82.toUint8Array)(body)); + return (0, import_util_hex_encoding.toHex)(await hashCtor.digest()); } - return contents; - }; - var de_PackedPolicyTooLargeException = (output, context) => { - const contents = {}; - if (output["message"] !== void 0) { - contents.message = (0, smithy_client_1.expectString)(output["message"]); + return UNSIGNED_PAYLOAD; + }, "getPayloadHash"); + var import_util_utf83 = require_dist_cjs28(); + var _HeaderFormatter = class _HeaderFormatter { + format(headers) { + const chunks = []; + for (const headerName of Object.keys(headers)) { + const bytes = (0, import_util_utf83.fromUtf8)(headerName); + chunks.push(Uint8Array.from([bytes.byteLength]), bytes, this.formatHeaderValue(headers[headerName])); + } + const out = new Uint8Array(chunks.reduce((carry, bytes) => carry + bytes.byteLength, 0)); + let position = 0; + for (const chunk of chunks) { + out.set(chunk, position); + position += chunk.byteLength; + } + return out; } - return contents; - }; - var de_RegionDisabledException = (output, context) => { - const contents = {}; - if (output["message"] !== void 0) { - contents.message = (0, smithy_client_1.expectString)(output["message"]); + formatHeaderValue(header) { + switch (header.type) { + case "boolean": + return Uint8Array.from([ + header.value ? 0 : 1 + /* boolFalse */ + ]); + case "byte": + return Uint8Array.from([2, header.value]); + case "short": + const shortView = new DataView(new ArrayBuffer(3)); + shortView.setUint8( + 0, + 3 + /* short */ + ); + shortView.setInt16(1, header.value, false); + return new Uint8Array(shortView.buffer); + case "integer": + const intView = new DataView(new ArrayBuffer(5)); + intView.setUint8( + 0, + 4 + /* integer */ + ); + intView.setInt32(1, header.value, false); + return new Uint8Array(intView.buffer); + case "long": + const longBytes = new Uint8Array(9); + longBytes[0] = 5; + longBytes.set(header.value.bytes, 1); + return longBytes; + case "binary": + const binView = new DataView(new ArrayBuffer(3 + header.value.byteLength)); + binView.setUint8( + 0, + 6 + /* byteArray */ + ); + binView.setUint16(1, header.value.byteLength, false); + const binBytes = new Uint8Array(binView.buffer); + binBytes.set(header.value, 3); + return binBytes; + case "string": + const utf8Bytes = (0, import_util_utf83.fromUtf8)(header.value); + const strView = new DataView(new ArrayBuffer(3 + utf8Bytes.byteLength)); + strView.setUint8( + 0, + 7 + /* string */ + ); + strView.setUint16(1, utf8Bytes.byteLength, false); + const strBytes = new Uint8Array(strView.buffer); + strBytes.set(utf8Bytes, 3); + return strBytes; + case "timestamp": + const tsBytes = new Uint8Array(9); + tsBytes[0] = 8; + tsBytes.set(Int64.fromNumber(header.value.valueOf()).bytes, 1); + return tsBytes; + case "uuid": + if (!UUID_PATTERN.test(header.value)) { + throw new Error(`Invalid UUID received: ${header.value}`); + } + const uuidBytes = new Uint8Array(17); + uuidBytes[0] = 9; + uuidBytes.set((0, import_util_hex_encoding.fromHex)(header.value.replace(/\-/g, "")), 1); + return uuidBytes; + } } - return contents; }; - var deserializeMetadata = (output) => ({ - httpStatusCode: output.statusCode, - requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"], - extendedRequestId: output.headers["x-amz-id-2"], - cfId: output.headers["x-amz-cf-id"] - }); - var collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body)); - var throwDefaultError = (0, smithy_client_1.withBaseException)(STSServiceException_1.STSServiceException); - var buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => { - const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const contents = { - protocol, - hostname, - port, - method: "POST", - path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path, - headers - }; - if (resolvedHostname !== void 0) { - contents.hostname = resolvedHostname; + __name(_HeaderFormatter, "HeaderFormatter"); + var HeaderFormatter = _HeaderFormatter; + var UUID_PATTERN = /^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/; + var _Int64 = class _Int642 { + constructor(bytes) { + this.bytes = bytes; + if (bytes.byteLength !== 8) { + throw new Error("Int64 buffers must be exactly 8 bytes"); + } } - if (body !== void 0) { - contents.body = body; + static fromNumber(number) { + if (number > 9223372036854776e3 || number < -9223372036854776e3) { + throw new Error(`${number} is too large (or, if negative, too small) to represent as an Int64`); + } + const bytes = new Uint8Array(8); + for (let i = 7, remaining = Math.abs(Math.round(number)); i > -1 && remaining > 0; i--, remaining /= 256) { + bytes[i] = remaining; + } + if (number < 0) { + negate(bytes); + } + return new _Int642(bytes); } - return new protocol_http_1.HttpRequest(contents); - }; - var SHARED_HEADERS = { - "content-type": "application/x-www-form-urlencoded" - }; - var parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => { - if (encoded.length) { - const parser = new fast_xml_parser_1.XMLParser({ - attributeNamePrefix: "", - htmlEntities: true, - ignoreAttributes: false, - ignoreDeclaration: true, - parseTagValue: false, - trimValues: false, - tagValueProcessor: (_, val2) => val2.trim() === "" && val2.includes("\n") ? "" : void 0 - }); - parser.addEntity("#xD", "\r"); - parser.addEntity("#10", "\n"); - const parsedObj = parser.parse(encoded); - const textNodeName = "#text"; - const key = Object.keys(parsedObj)[0]; - const parsedObjToReturn = parsedObj[key]; - if (parsedObjToReturn[textNodeName]) { - parsedObjToReturn[key] = parsedObjToReturn[textNodeName]; - delete parsedObjToReturn[textNodeName]; + /** + * Called implicitly by infix arithmetic operators. + */ + valueOf() { + const bytes = this.bytes.slice(0); + const negative = bytes[0] & 128; + if (negative) { + negate(bytes); } - return (0, smithy_client_1.getValueFromTextNode)(parsedObjToReturn); + return parseInt((0, import_util_hex_encoding.toHex)(bytes), 16) * (negative ? -1 : 1); } - return {}; - }); - var parseErrorBody = async (errorBody, context) => { - const value = await parseBody(errorBody, context); - if (value.Error) { - value.Error.message = value.Error.message ?? value.Error.Message; + toString() { + return String(this.valueOf()); } - return value; }; - var buildFormUrlencodedString = (formEntries) => Object.entries(formEntries).map(([key, value]) => (0, smithy_client_1.extendedEncodeURIComponent)(key) + "=" + (0, smithy_client_1.extendedEncodeURIComponent)(value)).join("&"); - var loadQueryErrorCode = (output, data) => { - if (data.Error?.Code !== void 0) { - return data.Error.Code; + __name(_Int64, "Int64"); + var Int64 = _Int64; + function negate(bytes) { + for (let i = 0; i < 8; i++) { + bytes[i] ^= 255; } - if (output.statusCode == 404) { - return "NotFound"; + for (let i = 7; i > -1; i--) { + bytes[i]++; + if (bytes[i] !== 0) + break; } - }; - } -}); - -// ../../../node_modules/@aws-sdk/client-sts/dist-cjs/commands/AssumeRoleCommand.js -var require_AssumeRoleCommand = __commonJS({ - "../../../node_modules/@aws-sdk/client-sts/dist-cjs/commands/AssumeRoleCommand.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.AssumeRoleCommand = exports2.$Command = void 0; - var middleware_signing_1 = require_dist_cjs14(); - var middleware_endpoint_1 = require_dist_cjs26(); - var middleware_serde_1 = require_dist_cjs25(); - var smithy_client_1 = require_dist_cjs34(); - Object.defineProperty(exports2, "$Command", { enumerable: true, get: function() { - return smithy_client_1.Command; - } }); - var types_1 = require_dist_cjs(); - var models_0_1 = require_models_0(); - var Aws_query_1 = require_Aws_query(); - var AssumeRoleCommand = class _AssumeRoleCommand extends smithy_client_1.Command { - static getEndpointParameterInstructions() { - return { - UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, - UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, - Endpoint: { type: "builtInParams", name: "endpoint" }, - Region: { type: "builtInParams", name: "region" }, - UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" } - }; + } + __name(negate, "negate"); + var hasHeader = /* @__PURE__ */ __name((soughtHeader, headers) => { + soughtHeader = soughtHeader.toLowerCase(); + for (const headerName of Object.keys(headers)) { + if (soughtHeader === headerName.toLowerCase()) { + return true; + } } - constructor(input) { - super(); - this.input = input; + return false; + }, "hasHeader"); + var import_protocol_http8 = require_dist_cjs2(); + var moveHeadersToQuery = /* @__PURE__ */ __name((request2, options = {}) => { + var _a; + const { headers, query = {} } = import_protocol_http8.HttpRequest.clone(request2); + for (const name of Object.keys(headers)) { + const lname = name.toLowerCase(); + if (lname.slice(0, 6) === "x-amz-" && !((_a = options.unhoistableHeaders) == null ? void 0 : _a.has(lname))) { + query[name] = headers[name]; + delete headers[name]; + } } - resolveMiddleware(clientStack, configuration, options) { - this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, _AssumeRoleCommand.getEndpointParameterInstructions())); - this.middlewareStack.use((0, middleware_signing_1.getAwsAuthPlugin)(configuration)); - const stack = clientStack.concat(this.middlewareStack); - const { logger } = configuration; - const clientName = "STSClient"; - const commandName = "AssumeRoleCommand"; - const handlerExecutionContext = { - logger, - clientName, - commandName, - inputFilterSensitiveLog: (_) => _, - outputFilterSensitiveLog: models_0_1.AssumeRoleResponseFilterSensitiveLog, - [types_1.SMITHY_CONTEXT_KEY]: { - service: "AWSSecurityTokenServiceV20110615", - operation: "AssumeRole" - } - }; - const { requestHandler } = configuration; - return stack.resolve((request2) => requestHandler.handle(request2.request, options || {}), handlerExecutionContext); + return { + ...request2, + headers, + query + }; + }, "moveHeadersToQuery"); + var prepareRequest = /* @__PURE__ */ __name((request2) => { + request2 = import_protocol_http8.HttpRequest.clone(request2); + for (const headerName of Object.keys(request2.headers)) { + if (GENERATED_HEADERS.indexOf(headerName.toLowerCase()) > -1) { + delete request2.headers[headerName]; + } } - serialize(input, context) { - return (0, Aws_query_1.se_AssumeRoleCommand)(input, context); + return request2; + }, "prepareRequest"); + var iso8601 = /* @__PURE__ */ __name((time) => toDate(time).toISOString().replace(/\.\d{3}Z$/, "Z"), "iso8601"); + var toDate = /* @__PURE__ */ __name((time) => { + if (typeof time === "number") { + return new Date(time * 1e3); } - deserialize(output, context) { - return (0, Aws_query_1.de_AssumeRoleCommand)(output, context); + if (typeof time === "string") { + if (Number(time)) { + return new Date(Number(time) * 1e3); + } + return new Date(time); } - }; - exports2.AssumeRoleCommand = AssumeRoleCommand; - } -}); - -// ../../../node_modules/@aws-sdk/client-sts/dist-cjs/commands/AssumeRoleWithWebIdentityCommand.js -var require_AssumeRoleWithWebIdentityCommand = __commonJS({ - "../../../node_modules/@aws-sdk/client-sts/dist-cjs/commands/AssumeRoleWithWebIdentityCommand.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.AssumeRoleWithWebIdentityCommand = exports2.$Command = void 0; - var middleware_endpoint_1 = require_dist_cjs26(); - var middleware_serde_1 = require_dist_cjs25(); - var smithy_client_1 = require_dist_cjs34(); - Object.defineProperty(exports2, "$Command", { enumerable: true, get: function() { - return smithy_client_1.Command; - } }); - var types_1 = require_dist_cjs(); - var models_0_1 = require_models_0(); - var Aws_query_1 = require_Aws_query(); - var AssumeRoleWithWebIdentityCommand = class _AssumeRoleWithWebIdentityCommand extends smithy_client_1.Command { - static getEndpointParameterInstructions() { - return { - UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, - UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, - Endpoint: { type: "builtInParams", name: "endpoint" }, - Region: { type: "builtInParams", name: "region" }, - UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" } - }; + return time; + }, "toDate"); + var _SignatureV4 = class _SignatureV4 { + constructor({ + applyChecksum, + credentials, + region, + service, + sha256, + uriEscapePath = true + }) { + this.headerFormatter = new HeaderFormatter(); + this.service = service; + this.sha256 = sha256; + this.uriEscapePath = uriEscapePath; + this.applyChecksum = typeof applyChecksum === "boolean" ? applyChecksum : true; + this.regionProvider = (0, import_util_middleware3.normalizeProvider)(region); + this.credentialProvider = (0, import_util_middleware3.normalizeProvider)(credentials); } - constructor(input) { - super(); - this.input = input; + async presign(originalRequest, options = {}) { + const { + signingDate = /* @__PURE__ */ new Date(), + expiresIn = 3600, + unsignableHeaders, + unhoistableHeaders, + signableHeaders, + signingRegion, + signingService + } = options; + const credentials = await this.credentialProvider(); + this.validateResolvedCredentials(credentials); + const region = signingRegion ?? await this.regionProvider(); + const { longDate, shortDate } = formatDate(signingDate); + if (expiresIn > MAX_PRESIGNED_TTL) { + return Promise.reject( + "Signature version 4 presigned URLs must have an expiration date less than one week in the future" + ); + } + const scope = createScope(shortDate, region, signingService ?? this.service); + const request2 = moveHeadersToQuery(prepareRequest(originalRequest), { unhoistableHeaders }); + if (credentials.sessionToken) { + request2.query[TOKEN_QUERY_PARAM] = credentials.sessionToken; + } + request2.query[ALGORITHM_QUERY_PARAM] = ALGORITHM_IDENTIFIER; + request2.query[CREDENTIAL_QUERY_PARAM] = `${credentials.accessKeyId}/${scope}`; + request2.query[AMZ_DATE_QUERY_PARAM] = longDate; + request2.query[EXPIRES_QUERY_PARAM] = expiresIn.toString(10); + const canonicalHeaders = getCanonicalHeaders(request2, unsignableHeaders, signableHeaders); + request2.query[SIGNED_HEADERS_QUERY_PARAM] = getCanonicalHeaderList(canonicalHeaders); + request2.query[SIGNATURE_QUERY_PARAM] = await this.getSignature( + longDate, + scope, + this.getSigningKey(credentials, region, shortDate, signingService), + this.createCanonicalRequest(request2, canonicalHeaders, await getPayloadHash(originalRequest, this.sha256)) + ); + return request2; } - resolveMiddleware(clientStack, configuration, options) { - this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, _AssumeRoleWithWebIdentityCommand.getEndpointParameterInstructions())); - const stack = clientStack.concat(this.middlewareStack); - const { logger } = configuration; - const clientName = "STSClient"; - const commandName = "AssumeRoleWithWebIdentityCommand"; - const handlerExecutionContext = { - logger, - clientName, - commandName, - inputFilterSensitiveLog: models_0_1.AssumeRoleWithWebIdentityRequestFilterSensitiveLog, - outputFilterSensitiveLog: models_0_1.AssumeRoleWithWebIdentityResponseFilterSensitiveLog, - [types_1.SMITHY_CONTEXT_KEY]: { - service: "AWSSecurityTokenServiceV20110615", - operation: "AssumeRoleWithWebIdentity" + async sign(toSign, options) { + if (typeof toSign === "string") { + return this.signString(toSign, options); + } else if (toSign.headers && toSign.payload) { + return this.signEvent(toSign, options); + } else if (toSign.message) { + return this.signMessage(toSign, options); + } else { + return this.signRequest(toSign, options); + } + } + async signEvent({ headers, payload }, { signingDate = /* @__PURE__ */ new Date(), priorSignature, signingRegion, signingService }) { + const region = signingRegion ?? await this.regionProvider(); + const { shortDate, longDate } = formatDate(signingDate); + const scope = createScope(shortDate, region, signingService ?? this.service); + const hashedPayload = await getPayloadHash({ headers: {}, body: payload }, this.sha256); + const hash = new this.sha256(); + hash.update(headers); + const hashedHeaders = (0, import_util_hex_encoding.toHex)(await hash.digest()); + const stringToSign = [ + EVENT_ALGORITHM_IDENTIFIER, + longDate, + scope, + priorSignature, + hashedHeaders, + hashedPayload + ].join("\n"); + return this.signString(stringToSign, { signingDate, signingRegion: region, signingService }); + } + async signMessage(signableMessage, { signingDate = /* @__PURE__ */ new Date(), signingRegion, signingService }) { + const promise = this.signEvent( + { + headers: this.headerFormatter.format(signableMessage.message.headers), + payload: signableMessage.message.body + }, + { + signingDate, + signingRegion, + signingService, + priorSignature: signableMessage.priorSignature } - }; - const { requestHandler } = configuration; - return stack.resolve((request2) => requestHandler.handle(request2.request, options || {}), handlerExecutionContext); - } - serialize(input, context) { - return (0, Aws_query_1.se_AssumeRoleWithWebIdentityCommand)(input, context); - } - deserialize(output, context) { - return (0, Aws_query_1.de_AssumeRoleWithWebIdentityCommand)(output, context); + ); + return promise.then((signature) => { + return { message: signableMessage.message, signature }; + }); } - }; - exports2.AssumeRoleWithWebIdentityCommand = AssumeRoleWithWebIdentityCommand; - } -}); - -// ../../../node_modules/@aws-sdk/client-sts/dist-cjs/defaultStsRoleAssumers.js -var require_defaultStsRoleAssumers = __commonJS({ - "../../../node_modules/@aws-sdk/client-sts/dist-cjs/defaultStsRoleAssumers.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.decorateDefaultCredentialProvider = exports2.getDefaultRoleAssumerWithWebIdentity = exports2.getDefaultRoleAssumer = void 0; - var AssumeRoleCommand_1 = require_AssumeRoleCommand(); - var AssumeRoleWithWebIdentityCommand_1 = require_AssumeRoleWithWebIdentityCommand(); - var ASSUME_ROLE_DEFAULT_REGION = "us-east-1"; - var decorateDefaultRegion = (region) => { - if (typeof region !== "function") { - return region === void 0 ? ASSUME_ROLE_DEFAULT_REGION : region; + async signString(stringToSign, { signingDate = /* @__PURE__ */ new Date(), signingRegion, signingService } = {}) { + const credentials = await this.credentialProvider(); + this.validateResolvedCredentials(credentials); + const region = signingRegion ?? await this.regionProvider(); + const { shortDate } = formatDate(signingDate); + const hash = new this.sha256(await this.getSigningKey(credentials, region, shortDate, signingService)); + hash.update((0, import_util_utf84.toUint8Array)(stringToSign)); + return (0, import_util_hex_encoding.toHex)(await hash.digest()); } - return async () => { - try { - return await region(); - } catch (e) { - return ASSUME_ROLE_DEFAULT_REGION; - } - }; - }; - var getDefaultRoleAssumer = (stsOptions, stsClientCtor) => { - let stsClient; - let closureSourceCreds; - return async (sourceCreds, params) => { - closureSourceCreds = sourceCreds; - if (!stsClient) { - const { logger, region, requestHandler } = stsOptions; - stsClient = new stsClientCtor({ - logger, - credentialDefaultProvider: () => async () => closureSourceCreds, - region: decorateDefaultRegion(region || stsOptions.region), - ...requestHandler ? { requestHandler } : {} - }); - } - const { Credentials } = await stsClient.send(new AssumeRoleCommand_1.AssumeRoleCommand(params)); - if (!Credentials || !Credentials.AccessKeyId || !Credentials.SecretAccessKey) { - throw new Error(`Invalid response from STS.assumeRole call with role ${params.RoleArn}`); - } - return { - accessKeyId: Credentials.AccessKeyId, - secretAccessKey: Credentials.SecretAccessKey, - sessionToken: Credentials.SessionToken, - expiration: Credentials.Expiration - }; - }; - }; - exports2.getDefaultRoleAssumer = getDefaultRoleAssumer; - var getDefaultRoleAssumerWithWebIdentity = (stsOptions, stsClientCtor) => { - let stsClient; - return async (params) => { - if (!stsClient) { - const { logger, region, requestHandler } = stsOptions; - stsClient = new stsClientCtor({ - logger, - region: decorateDefaultRegion(region || stsOptions.region), - ...requestHandler ? { requestHandler } : {} - }); + async signRequest(requestToSign, { + signingDate = /* @__PURE__ */ new Date(), + signableHeaders, + unsignableHeaders, + signingRegion, + signingService + } = {}) { + const credentials = await this.credentialProvider(); + this.validateResolvedCredentials(credentials); + const region = signingRegion ?? await this.regionProvider(); + const request2 = prepareRequest(requestToSign); + const { longDate, shortDate } = formatDate(signingDate); + const scope = createScope(shortDate, region, signingService ?? this.service); + request2.headers[AMZ_DATE_HEADER] = longDate; + if (credentials.sessionToken) { + request2.headers[TOKEN_HEADER] = credentials.sessionToken; } - const { Credentials } = await stsClient.send(new AssumeRoleWithWebIdentityCommand_1.AssumeRoleWithWebIdentityCommand(params)); - if (!Credentials || !Credentials.AccessKeyId || !Credentials.SecretAccessKey) { - throw new Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${params.RoleArn}`); + const payloadHash = await getPayloadHash(request2, this.sha256); + if (!hasHeader(SHA256_HEADER, request2.headers) && this.applyChecksum) { + request2.headers[SHA256_HEADER] = payloadHash; } - return { - accessKeyId: Credentials.AccessKeyId, - secretAccessKey: Credentials.SecretAccessKey, - sessionToken: Credentials.SessionToken, - expiration: Credentials.Expiration - }; - }; - }; - exports2.getDefaultRoleAssumerWithWebIdentity = getDefaultRoleAssumerWithWebIdentity; - var decorateDefaultCredentialProvider = (provider) => (input) => provider({ - roleAssumer: (0, exports2.getDefaultRoleAssumer)(input, input.stsClientCtor), - roleAssumerWithWebIdentity: (0, exports2.getDefaultRoleAssumerWithWebIdentity)(input, input.stsClientCtor), - ...input - }); - exports2.decorateDefaultCredentialProvider = decorateDefaultCredentialProvider; - } -}); - -// ../../../node_modules/@aws-sdk/credential-provider-env/dist-cjs/fromEnv.js -var require_fromEnv = __commonJS({ - "../../../node_modules/@aws-sdk/credential-provider-env/dist-cjs/fromEnv.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.fromEnv = exports2.ENV_EXPIRATION = exports2.ENV_SESSION = exports2.ENV_SECRET = exports2.ENV_KEY = void 0; - var property_provider_1 = require_dist_cjs6(); - exports2.ENV_KEY = "AWS_ACCESS_KEY_ID"; - exports2.ENV_SECRET = "AWS_SECRET_ACCESS_KEY"; - exports2.ENV_SESSION = "AWS_SESSION_TOKEN"; - exports2.ENV_EXPIRATION = "AWS_CREDENTIAL_EXPIRATION"; - var fromEnv = () => async () => { - const accessKeyId = process.env[exports2.ENV_KEY]; - const secretAccessKey = process.env[exports2.ENV_SECRET]; - const sessionToken = process.env[exports2.ENV_SESSION]; - const expiry = process.env[exports2.ENV_EXPIRATION]; - if (accessKeyId && secretAccessKey) { - return { - accessKeyId, - secretAccessKey, - ...sessionToken && { sessionToken }, - ...expiry && { expiration: new Date(expiry) } - }; + const canonicalHeaders = getCanonicalHeaders(request2, unsignableHeaders, signableHeaders); + const signature = await this.getSignature( + longDate, + scope, + this.getSigningKey(credentials, region, shortDate, signingService), + this.createCanonicalRequest(request2, canonicalHeaders, payloadHash) + ); + request2.headers[AUTH_HEADER] = `${ALGORITHM_IDENTIFIER} Credential=${credentials.accessKeyId}/${scope}, SignedHeaders=${getCanonicalHeaderList(canonicalHeaders)}, Signature=${signature}`; + return request2; } - throw new property_provider_1.CredentialsProviderError("Unable to find environment variable credentials."); - }; - exports2.fromEnv = fromEnv; - } -}); - -// ../../../node_modules/@aws-sdk/credential-provider-env/dist-cjs/index.js -var require_dist_cjs37 = __commonJS({ - "../../../node_modules/@aws-sdk/credential-provider-env/dist-cjs/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); - tslib_1.__exportStar(require_fromEnv(), exports2); - } -}); + createCanonicalRequest(request2, canonicalHeaders, payloadHash) { + const sortedHeaders = Object.keys(canonicalHeaders).sort(); + return `${request2.method} +${this.getCanonicalPath(request2)} +${getCanonicalQuery(request2)} +${sortedHeaders.map((name) => `${name}:${canonicalHeaders[name]}`).join("\n")} -// ../../../node_modules/@smithy/credential-provider-imds/dist-cjs/index.js -var require_dist_cjs38 = __commonJS({ - "../../../node_modules/@smithy/credential-provider-imds/dist-cjs/index.js"(exports2, module2) { - var __defProp2 = Object.defineProperty; - var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; - var __getOwnPropNames2 = Object.getOwnPropertyNames; - var __hasOwnProp2 = Object.prototype.hasOwnProperty; - var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); - var __export2 = (target, all) => { - for (var name in all) - __defProp2(target, name, { get: all[name], enumerable: true }); - }; - var __copyProps2 = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames2(from)) - if (!__hasOwnProp2.call(to, key) && key !== except) - __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); +${sortedHeaders.join(";")} +${payloadHash}`; } - return to; - }; - var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); - var src_exports = {}; - __export2(src_exports, { - DEFAULT_MAX_RETRIES: () => DEFAULT_MAX_RETRIES, - DEFAULT_TIMEOUT: () => DEFAULT_TIMEOUT, - ENV_CMDS_AUTH_TOKEN: () => ENV_CMDS_AUTH_TOKEN, - ENV_CMDS_FULL_URI: () => ENV_CMDS_FULL_URI, - ENV_CMDS_RELATIVE_URI: () => ENV_CMDS_RELATIVE_URI, - Endpoint: () => Endpoint, - fromContainerMetadata: () => fromContainerMetadata, - fromInstanceMetadata: () => fromInstanceMetadata, - getInstanceMetadataEndpoint: () => getInstanceMetadataEndpoint, - httpRequest: () => httpRequest, - providerConfigFromInit: () => providerConfigFromInit - }); - module2.exports = __toCommonJS2(src_exports); - var import_url = require("url"); - var import_property_provider = require_dist_cjs6(); - var import_buffer = require("buffer"); - var import_http2 = require("http"); - function httpRequest(options) { - return new Promise((resolve, reject) => { - var _a; - const req = (0, import_http2.request)({ - method: "GET", - ...options, - // Node.js http module doesn't accept hostname with square brackets - // Refs: https://github.com/nodejs/node/issues/39738 - hostname: (_a = options.hostname) == null ? void 0 : _a.replace(/^\[(.+)\]$/, "$1") - }); - req.on("error", (err) => { - reject(Object.assign(new import_property_provider.ProviderError("Unable to connect to instance metadata service"), err)); - req.destroy(); - }); - req.on("timeout", () => { - reject(new import_property_provider.ProviderError("TimeoutError from instance metadata service")); - req.destroy(); - }); - req.on("response", (res) => { - const { statusCode = 400 } = res; - if (statusCode < 200 || 300 <= statusCode) { - reject( - Object.assign(new import_property_provider.ProviderError("Error response received from instance metadata service"), { statusCode }) - ); - req.destroy(); + async createStringToSign(longDate, credentialScope, canonicalRequest) { + const hash = new this.sha256(); + hash.update((0, import_util_utf84.toUint8Array)(canonicalRequest)); + const hashedRequest = await hash.digest(); + return `${ALGORITHM_IDENTIFIER} +${longDate} +${credentialScope} +${(0, import_util_hex_encoding.toHex)(hashedRequest)}`; + } + getCanonicalPath({ path }) { + if (this.uriEscapePath) { + const normalizedPathSegments = []; + for (const pathSegment of path.split("/")) { + if ((pathSegment == null ? void 0 : pathSegment.length) === 0) + continue; + if (pathSegment === ".") + continue; + if (pathSegment === "..") { + normalizedPathSegments.pop(); + } else { + normalizedPathSegments.push(pathSegment); + } } - const chunks = []; - res.on("data", (chunk) => { - chunks.push(chunk); - }); - res.on("end", () => { - resolve(import_buffer.Buffer.concat(chunks)); - req.destroy(); - }); - }); - req.end(); - }); - } - __name(httpRequest, "httpRequest"); - var isImdsCredentials = /* @__PURE__ */ __name((arg) => Boolean(arg) && typeof arg === "object" && typeof arg.AccessKeyId === "string" && typeof arg.SecretAccessKey === "string" && typeof arg.Token === "string" && typeof arg.Expiration === "string", "isImdsCredentials"); - var fromImdsCredentials = /* @__PURE__ */ __name((creds) => ({ - accessKeyId: creds.AccessKeyId, - secretAccessKey: creds.SecretAccessKey, - sessionToken: creds.Token, - expiration: new Date(creds.Expiration) - }), "fromImdsCredentials"); - var DEFAULT_TIMEOUT = 1e3; - var DEFAULT_MAX_RETRIES = 0; - var providerConfigFromInit = /* @__PURE__ */ __name(({ - maxRetries = DEFAULT_MAX_RETRIES, - timeout = DEFAULT_TIMEOUT - }) => ({ maxRetries, timeout }), "providerConfigFromInit"); - var retry = /* @__PURE__ */ __name((toRetry, maxRetries) => { - let promise = toRetry(); - for (let i = 0; i < maxRetries; i++) { - promise = promise.catch(toRetry); + const normalizedPath = `${(path == null ? void 0 : path.startsWith("/")) ? "/" : ""}${normalizedPathSegments.join("/")}${normalizedPathSegments.length > 0 && (path == null ? void 0 : path.endsWith("/")) ? "/" : ""}`; + const doubleEncoded = (0, import_util_uri_escape.escapeUri)(normalizedPath); + return doubleEncoded.replace(/%2F/g, "/"); + } + return path; } - return promise; - }, "retry"); - var ENV_CMDS_FULL_URI = "AWS_CONTAINER_CREDENTIALS_FULL_URI"; - var ENV_CMDS_RELATIVE_URI = "AWS_CONTAINER_CREDENTIALS_RELATIVE_URI"; - var ENV_CMDS_AUTH_TOKEN = "AWS_CONTAINER_AUTHORIZATION_TOKEN"; - var fromContainerMetadata = /* @__PURE__ */ __name((init = {}) => { - const { timeout, maxRetries } = providerConfigFromInit(init); - return () => retry(async () => { - const requestOptions = await getCmdsUri(); - const credsResponse = JSON.parse(await requestFromEcsImds(timeout, requestOptions)); - if (!isImdsCredentials(credsResponse)) { - throw new import_property_provider.CredentialsProviderError("Invalid response received from instance metadata service."); + async getSignature(longDate, credentialScope, keyPromise, canonicalRequest) { + const stringToSign = await this.createStringToSign(longDate, credentialScope, canonicalRequest); + const hash = new this.sha256(await keyPromise); + hash.update((0, import_util_utf84.toUint8Array)(stringToSign)); + return (0, import_util_hex_encoding.toHex)(await hash.digest()); + } + getSigningKey(credentials, region, shortDate, service) { + return getSigningKey(this.sha256, credentials, shortDate, region, service || this.service); + } + validateResolvedCredentials(credentials) { + if (typeof credentials !== "object" || // @ts-expect-error: Property 'accessKeyId' does not exist on type 'object'.ts(2339) + typeof credentials.accessKeyId !== "string" || // @ts-expect-error: Property 'secretAccessKey' does not exist on type 'object'.ts(2339) + typeof credentials.secretAccessKey !== "string") { + throw new Error("Resolved credential object is not valid"); } - return fromImdsCredentials(credsResponse); - }, maxRetries); - }, "fromContainerMetadata"); - var requestFromEcsImds = /* @__PURE__ */ __name(async (timeout, options) => { - if (process.env[ENV_CMDS_AUTH_TOKEN]) { - options.headers = { - ...options.headers, - Authorization: process.env[ENV_CMDS_AUTH_TOKEN] - }; } - const buffer = await httpRequest({ - ...options, - timeout - }); - return buffer.toString(); - }, "requestFromEcsImds"); - var CMDS_IP = "169.254.170.2"; - var GREENGRASS_HOSTS = { - localhost: true, - "127.0.0.1": true - }; - var GREENGRASS_PROTOCOLS = { - "http:": true, - "https:": true }; - var getCmdsUri = /* @__PURE__ */ __name(async () => { - if (process.env[ENV_CMDS_RELATIVE_URI]) { - return { - hostname: CMDS_IP, - path: process.env[ENV_CMDS_RELATIVE_URI] - }; + __name(_SignatureV4, "SignatureV4"); + var SignatureV42 = _SignatureV4; + var formatDate = /* @__PURE__ */ __name((now) => { + const longDate = iso8601(now).replace(/[\-:]/g, ""); + return { + longDate, + shortDate: longDate.slice(0, 8) + }; + }, "formatDate"); + var getCanonicalHeaderList = /* @__PURE__ */ __name((headers) => Object.keys(headers).sort().join(";"), "getCanonicalHeaderList"); + } +}); + +// ../../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4Config.js +var import_signature_v4, resolveAwsSdkSigV4Config, resolveAWSSDKSigV4Config; +var init_resolveAwsSdkSigV4Config = __esm({ + "../../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4Config.js"() { + init_dist_es(); + import_signature_v4 = __toESM(require_dist_cjs47()); + resolveAwsSdkSigV4Config = (config) => { + let normalizedCreds; + if (config.credentials) { + normalizedCreds = memoizeIdentityProvider(config.credentials, isIdentityExpired, doesIdentityRequireRefresh); } - if (process.env[ENV_CMDS_FULL_URI]) { - const parsed = (0, import_url.parse)(process.env[ENV_CMDS_FULL_URI]); - if (!parsed.hostname || !(parsed.hostname in GREENGRASS_HOSTS)) { - throw new import_property_provider.CredentialsProviderError( - `${parsed.hostname} is not a valid container metadata service hostname`, - false - ); - } - if (!parsed.protocol || !(parsed.protocol in GREENGRASS_PROTOCOLS)) { - throw new import_property_provider.CredentialsProviderError( - `${parsed.protocol} is not a valid container metadata service protocol`, - false - ); + if (!normalizedCreds) { + if (config.credentialDefaultProvider) { + normalizedCreds = normalizeProvider(config.credentialDefaultProvider(Object.assign({}, config, { + parentClientConfig: config + }))); + } else { + normalizedCreds = async () => { + throw new Error("`credentials` is missing"); + }; } - return { - ...parsed, - port: parsed.port ? parseInt(parsed.port, 10) : void 0 + } + const { signingEscapePath = true, systemClockOffset = config.systemClockOffset || 0, sha256 } = config; + let signer; + if (config.signer) { + signer = normalizeProvider(config.signer); + } else if (config.regionInfoProvider) { + signer = () => normalizeProvider(config.region)().then(async (region) => [ + await config.regionInfoProvider(region, { + useFipsEndpoint: await config.useFipsEndpoint(), + useDualstackEndpoint: await config.useDualstackEndpoint() + }) || {}, + region + ]).then(([regionInfo, region]) => { + const { signingRegion, signingService } = regionInfo; + config.signingRegion = config.signingRegion || signingRegion || region; + config.signingName = config.signingName || signingService || config.serviceId; + const params = { + ...config, + credentials: normalizedCreds, + region: config.signingRegion, + service: config.signingName, + sha256, + uriEscapePath: signingEscapePath + }; + const SignerCtor = config.signerConstructor || import_signature_v4.SignatureV4; + return new SignerCtor(params); + }); + } else { + signer = async (authScheme) => { + authScheme = Object.assign({}, { + name: "sigv4", + signingName: config.signingName || config.defaultSigningName, + signingRegion: await normalizeProvider(config.region)(), + properties: {} + }, authScheme); + const signingRegion = authScheme.signingRegion; + const signingService = authScheme.signingName; + config.signingRegion = config.signingRegion || signingRegion; + config.signingName = config.signingName || signingService || config.serviceId; + const params = { + ...config, + credentials: normalizedCreds, + region: config.signingRegion, + service: config.signingName, + sha256, + uriEscapePath: signingEscapePath + }; + const SignerCtor = config.signerConstructor || import_signature_v4.SignatureV4; + return new SignerCtor(params); }; } - throw new import_property_provider.CredentialsProviderError( - `The container metadata credential provider cannot be used unless the ${ENV_CMDS_RELATIVE_URI} or ${ENV_CMDS_FULL_URI} environment variable is set`, - false - ); - }, "getCmdsUri"); - var _InstanceMetadataV1FallbackError = class _InstanceMetadataV1FallbackError2 extends import_property_provider.CredentialsProviderError { - constructor(message, tryNextLink = true) { - super(message, tryNextLink); - this.tryNextLink = tryNextLink; - this.name = "InstanceMetadataV1FallbackError"; - Object.setPrototypeOf(this, _InstanceMetadataV1FallbackError2.prototype); + return { + ...config, + systemClockOffset, + signingEscapePath, + credentials: normalizedCreds, + signer + }; + }; + resolveAWSSDKSigV4Config = resolveAwsSdkSigV4Config; + } +}); + +// ../../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/index.js +var init_aws_sdk = __esm({ + "../../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/index.js"() { + init_AwsSdkSigV4Signer(); + init_AwsSdkSigV4ASigner(); + init_resolveAwsSdkSigV4AConfig(); + init_resolveAwsSdkSigV4Config(); + } +}); + +// ../../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/index.js +var init_httpAuthSchemes2 = __esm({ + "../../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/index.js"() { + init_aws_sdk(); + } +}); + +// ../../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/coercing-serializers.js +var _toStr, _toBool, _toNum; +var init_coercing_serializers = __esm({ + "../../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/coercing-serializers.js"() { + _toStr = (val2) => { + if (val2 == null) { + return val2; } + if (typeof val2 === "number" || typeof val2 === "bigint") { + const warning = new Error(`Received number ${val2} where a string was expected.`); + warning.name = "Warning"; + console.warn(warning); + return String(val2); + } + if (typeof val2 === "boolean") { + const warning = new Error(`Received boolean ${val2} where a string was expected.`); + warning.name = "Warning"; + console.warn(warning); + return String(val2); + } + return val2; }; - __name(_InstanceMetadataV1FallbackError, "InstanceMetadataV1FallbackError"); - var InstanceMetadataV1FallbackError = _InstanceMetadataV1FallbackError; - var import_node_config_provider = require_dist_cjs22(); - var import_url_parser = require_dist_cjs24(); - var Endpoint = /* @__PURE__ */ ((Endpoint2) => { - Endpoint2["IPv4"] = "http://169.254.169.254"; - Endpoint2["IPv6"] = "http://[fd00:ec2::254]"; - return Endpoint2; - })(Endpoint || {}); - var ENV_ENDPOINT_NAME = "AWS_EC2_METADATA_SERVICE_ENDPOINT"; - var CONFIG_ENDPOINT_NAME = "ec2_metadata_service_endpoint"; - var ENDPOINT_CONFIG_OPTIONS = { - environmentVariableSelector: (env) => env[ENV_ENDPOINT_NAME], - configFileSelector: (profile) => profile[CONFIG_ENDPOINT_NAME], - default: void 0 + _toBool = (val2) => { + if (val2 == null) { + return val2; + } + if (typeof val2 === "number") { + } + if (typeof val2 === "string") { + const lowercase = val2.toLowerCase(); + if (val2 !== "" && lowercase !== "false" && lowercase !== "true") { + const warning = new Error(`Received string "${val2}" where a boolean was expected.`); + warning.name = "Warning"; + console.warn(warning); + } + return val2 !== "" && lowercase !== "false"; + } + return val2; }; - var EndpointMode = /* @__PURE__ */ ((EndpointMode2) => { - EndpointMode2["IPv4"] = "IPv4"; - EndpointMode2["IPv6"] = "IPv6"; - return EndpointMode2; - })(EndpointMode || {}); - var ENV_ENDPOINT_MODE_NAME = "AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE"; - var CONFIG_ENDPOINT_MODE_NAME = "ec2_metadata_service_endpoint_mode"; - var ENDPOINT_MODE_CONFIG_OPTIONS = { - environmentVariableSelector: (env) => env[ENV_ENDPOINT_MODE_NAME], - configFileSelector: (profile) => profile[CONFIG_ENDPOINT_MODE_NAME], - default: "IPv4" - /* IPv4 */ + _toNum = (val2) => { + if (val2 == null) { + return val2; + } + if (typeof val2 === "boolean") { + } + if (typeof val2 === "string") { + const num = Number(val2); + if (num.toString() !== val2) { + const warning = new Error(`Received string "${val2}" where a number was expected.`); + warning.name = "Warning"; + console.warn(warning); + return val2; + } + return num; + } + return val2; }; - var getInstanceMetadataEndpoint = /* @__PURE__ */ __name(async () => (0, import_url_parser.parseUrl)(await getFromEndpointConfig() || await getFromEndpointModeConfig()), "getInstanceMetadataEndpoint"); - var getFromEndpointConfig = /* @__PURE__ */ __name(async () => (0, import_node_config_provider.loadConfig)(ENDPOINT_CONFIG_OPTIONS)(), "getFromEndpointConfig"); - var getFromEndpointModeConfig = /* @__PURE__ */ __name(async () => { - const endpointMode = await (0, import_node_config_provider.loadConfig)(ENDPOINT_MODE_CONFIG_OPTIONS)(); - switch (endpointMode) { - case "IPv4": - return "http://169.254.169.254"; - case "IPv6": - return "http://[fd00:ec2::254]"; - default: - throw new Error(`Unsupported endpoint mode: ${endpointMode}. Select from ${Object.values(EndpointMode)}`); + } +}); + +// ../../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/awsExpectUnion.js +var import_smithy_client2, awsExpectUnion; +var init_awsExpectUnion = __esm({ + "../../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/awsExpectUnion.js"() { + import_smithy_client2 = __toESM(require_dist_cjs37()); + awsExpectUnion = (value) => { + if (value == null) { + return void 0; } - }, "getFromEndpointModeConfig"); - var STATIC_STABILITY_REFRESH_INTERVAL_SECONDS = 5 * 60; - var STATIC_STABILITY_REFRESH_INTERVAL_JITTER_WINDOW_SECONDS = 5 * 60; - var STATIC_STABILITY_DOC_URL = "https://docs.aws.amazon.com/sdkref/latest/guide/feature-static-credentials.html"; - var getExtendedInstanceMetadataCredentials = /* @__PURE__ */ __name((credentials, logger) => { - const refreshInterval = STATIC_STABILITY_REFRESH_INTERVAL_SECONDS + Math.floor(Math.random() * STATIC_STABILITY_REFRESH_INTERVAL_JITTER_WINDOW_SECONDS); - const newExpiration = new Date(Date.now() + refreshInterval * 1e3); - logger.warn( - `Attempting credential expiration extension due to a credential service availability issue. A refresh of these credentials will be attempted after ${new Date(newExpiration)}. -For more information, please visit: ` + STATIC_STABILITY_DOC_URL - ); - const originalExpiration = credentials.originalExpiration ?? credentials.expiration; - return { - ...credentials, - ...originalExpiration ? { originalExpiration } : {}, - expiration: newExpiration - }; - }, "getExtendedInstanceMetadataCredentials"); - var staticStabilityProvider = /* @__PURE__ */ __name((provider, options = {}) => { - const logger = (options == null ? void 0 : options.logger) || console; - let pastCredentials; - return async () => { - let credentials; + if (typeof value === "object" && "__type" in value) { + delete value.__type; + } + return (0, import_smithy_client2.expectUnion)(value); + }; + } +}); + +// ../../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/common.js +var import_smithy_client3, collectBodyString; +var init_common = __esm({ + "../../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/common.js"() { + import_smithy_client3 = __toESM(require_dist_cjs37()); + collectBodyString = (streamBody, context) => (0, import_smithy_client3.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body)); + } +}); + +// ../../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/parseJsonBody.js +var parseJsonBody, parseJsonErrorBody, loadRestJsonErrorCode; +var init_parseJsonBody = __esm({ + "../../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/parseJsonBody.js"() { + init_common(); + parseJsonBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => { + if (encoded.length) { try { - credentials = await provider(); - if (credentials.expiration && credentials.expiration.getTime() < Date.now()) { - credentials = getExtendedInstanceMetadataCredentials(credentials, logger); - } + return JSON.parse(encoded); } catch (e) { - if (pastCredentials) { - logger.warn("Credential renew failed: ", e); - credentials = getExtendedInstanceMetadataCredentials(pastCredentials, logger); + if (e?.name === "SyntaxError") { + Object.defineProperty(e, "$responseBodyText", { + value: encoded + }); + } + throw e; + } + } + return {}; + }); + parseJsonErrorBody = async (errorBody, context) => { + const value = await parseJsonBody(errorBody, context); + value.message = value.message ?? value.Message; + return value; + }; + loadRestJsonErrorCode = (output, data) => { + const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase()); + const sanitizeErrorCode = (rawValue) => { + let cleanValue = rawValue; + if (typeof cleanValue === "number") { + cleanValue = cleanValue.toString(); + } + if (cleanValue.indexOf(",") >= 0) { + cleanValue = cleanValue.split(",")[0]; + } + if (cleanValue.indexOf(":") >= 0) { + cleanValue = cleanValue.split(":")[0]; + } + if (cleanValue.indexOf("#") >= 0) { + cleanValue = cleanValue.split("#")[1]; + } + return cleanValue; + }; + const headerKey = findKey(output.headers, "x-amzn-errortype"); + if (headerKey !== void 0) { + return sanitizeErrorCode(output.headers[headerKey]); + } + if (data.code !== void 0) { + return sanitizeErrorCode(data.code); + } + if (data["__type"] !== void 0) { + return sanitizeErrorCode(data["__type"]); + } + }; + } +}); + +// ../../../node_modules/fast-xml-parser/src/util.js +var require_util = __commonJS({ + "../../../node_modules/fast-xml-parser/src/util.js"(exports2) { + "use strict"; + var nameStartChar = ":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD"; + var nameChar = nameStartChar + "\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040"; + var nameRegexp = "[" + nameStartChar + "][" + nameChar + "]*"; + var regexName = new RegExp("^" + nameRegexp + "$"); + var getAllMatches = function(string, regex) { + const matches = []; + let match = regex.exec(string); + while (match) { + const allmatches = []; + allmatches.startIndex = regex.lastIndex - match[0].length; + const len = match.length; + for (let index = 0; index < len; index++) { + allmatches.push(match[index]); + } + matches.push(allmatches); + match = regex.exec(string); + } + return matches; + }; + var isName = function(string) { + const match = regexName.exec(string); + return !(match === null || typeof match === "undefined"); + }; + exports2.isExist = function(v) { + return typeof v !== "undefined"; + }; + exports2.isEmptyObject = function(obj) { + return Object.keys(obj).length === 0; + }; + exports2.merge = function(target, a, arrayMode) { + if (a) { + const keys = Object.keys(a); + const len = keys.length; + for (let i = 0; i < len; i++) { + if (arrayMode === "strict") { + target[keys[i]] = [a[keys[i]]]; } else { - throw e; + target[keys[i]] = a[keys[i]]; } } - pastCredentials = credentials; - return credentials; - }; - }, "staticStabilityProvider"); - var IMDS_PATH = "/latest/meta-data/iam/security-credentials/"; - var IMDS_TOKEN_PATH = "/latest/api/token"; - var AWS_EC2_METADATA_V1_DISABLED = "AWS_EC2_METADATA_V1_DISABLED"; - var PROFILE_AWS_EC2_METADATA_V1_DISABLED = "ec2_metadata_v1_disabled"; - var X_AWS_EC2_METADATA_TOKEN = "x-aws-ec2-metadata-token"; - var fromInstanceMetadata = /* @__PURE__ */ __name((init = {}) => staticStabilityProvider(getInstanceImdsProvider(init), { logger: init.logger }), "fromInstanceMetadata"); - var getInstanceImdsProvider = /* @__PURE__ */ __name((init) => { - let disableFetchToken = false; - const { logger, profile } = init; - const { timeout, maxRetries } = providerConfigFromInit(init); - const getCredentials = /* @__PURE__ */ __name(async (maxRetries2, options) => { - var _a; - const isImdsV1Fallback = disableFetchToken || ((_a = options.headers) == null ? void 0 : _a[X_AWS_EC2_METADATA_TOKEN]) == null; - if (isImdsV1Fallback) { - let fallbackBlockedFromProfile = false; - let fallbackBlockedFromProcessEnv = false; - const configValue = await (0, import_node_config_provider.loadConfig)( - { - environmentVariableSelector: (env) => { - const envValue = env[AWS_EC2_METADATA_V1_DISABLED]; - fallbackBlockedFromProcessEnv = !!envValue && envValue !== "false"; - if (envValue === void 0) { - throw new import_property_provider.CredentialsProviderError( - `${AWS_EC2_METADATA_V1_DISABLED} not set in env, checking config file next.` + } + }; + exports2.getValue = function(v) { + if (exports2.isExist(v)) { + return v; + } else { + return ""; + } + }; + exports2.isName = isName; + exports2.getAllMatches = getAllMatches; + exports2.nameRegexp = nameRegexp; + } +}); + +// ../../../node_modules/fast-xml-parser/src/validator.js +var require_validator = __commonJS({ + "../../../node_modules/fast-xml-parser/src/validator.js"(exports2) { + "use strict"; + var util = require_util(); + var defaultOptions = { + allowBooleanAttributes: false, + //A tag can have attributes without any value + unpairedTags: [] + }; + exports2.validate = function(xmlData, options) { + options = Object.assign({}, defaultOptions, options); + const tags = []; + let tagFound = false; + let reachedRoot = false; + if (xmlData[0] === "\uFEFF") { + xmlData = xmlData.substr(1); + } + for (let i = 0; i < xmlData.length; i++) { + if (xmlData[i] === "<" && xmlData[i + 1] === "?") { + i += 2; + i = readPI(xmlData, i); + if (i.err) return i; + } else if (xmlData[i] === "<") { + let tagStartPos = i; + i++; + if (xmlData[i] === "!") { + i = readCommentAndCDATA(xmlData, i); + continue; + } else { + let closingTag = false; + if (xmlData[i] === "/") { + closingTag = true; + i++; + } + let tagName = ""; + for (; i < xmlData.length && xmlData[i] !== ">" && xmlData[i] !== " " && xmlData[i] !== " " && xmlData[i] !== "\n" && xmlData[i] !== "\r"; i++) { + tagName += xmlData[i]; + } + tagName = tagName.trim(); + if (tagName[tagName.length - 1] === "/") { + tagName = tagName.substring(0, tagName.length - 1); + i--; + } + if (!validateTagName(tagName)) { + let msg; + if (tagName.trim().length === 0) { + msg = "Invalid space after '<'."; + } else { + msg = "Tag '" + tagName + "' is an invalid name."; + } + return getErrorObject("InvalidTag", msg, getLineNumberForPosition(xmlData, i)); + } + const result = readAttributeStr(xmlData, i); + if (result === false) { + return getErrorObject("InvalidAttr", "Attributes for '" + tagName + "' have open quote.", getLineNumberForPosition(xmlData, i)); + } + let attrStr = result.value; + i = result.index; + if (attrStr[attrStr.length - 1] === "/") { + const attrStrStart = i - attrStr.length; + attrStr = attrStr.substring(0, attrStr.length - 1); + const isValid = validateAttributeString(attrStr, options); + if (isValid === true) { + tagFound = true; + } else { + return getErrorObject(isValid.err.code, isValid.err.msg, getLineNumberForPosition(xmlData, attrStrStart + isValid.err.line)); + } + } else if (closingTag) { + if (!result.tagClosed) { + return getErrorObject("InvalidTag", "Closing tag '" + tagName + "' doesn't have proper closing.", getLineNumberForPosition(xmlData, i)); + } else if (attrStr.trim().length > 0) { + return getErrorObject("InvalidTag", "Closing tag '" + tagName + "' can't have attributes or invalid starting.", getLineNumberForPosition(xmlData, tagStartPos)); + } else if (tags.length === 0) { + return getErrorObject("InvalidTag", "Closing tag '" + tagName + "' has not been opened.", getLineNumberForPosition(xmlData, tagStartPos)); + } else { + const otg = tags.pop(); + if (tagName !== otg.tagName) { + let openPos = getLineNumberForPosition(xmlData, otg.tagStartPos); + return getErrorObject( + "InvalidTag", + "Expected closing tag '" + otg.tagName + "' (opened in line " + openPos.line + ", col " + openPos.col + ") instead of closing tag '" + tagName + "'.", + getLineNumberForPosition(xmlData, tagStartPos) ); } - return fallbackBlockedFromProcessEnv; - }, - configFileSelector: (profile2) => { - const profileValue = profile2[PROFILE_AWS_EC2_METADATA_V1_DISABLED]; - fallbackBlockedFromProfile = !!profileValue && profileValue !== "false"; - return fallbackBlockedFromProfile; - }, - default: false - }, - { - profile - } - )(); - if (init.ec2MetadataV1Disabled || configValue) { - const causes = []; - if (init.ec2MetadataV1Disabled) - causes.push("credential provider initialization (runtime option ec2MetadataV1Disabled)"); - if (fallbackBlockedFromProfile) - causes.push(`config file profile (${PROFILE_AWS_EC2_METADATA_V1_DISABLED})`); - if (fallbackBlockedFromProcessEnv) - causes.push(`process environment variable (${AWS_EC2_METADATA_V1_DISABLED})`); - throw new InstanceMetadataV1FallbackError( - `AWS EC2 Metadata v1 fallback has been blocked by AWS SDK configuration in the following: [${causes.join( - ", " - )}].` - ); - } - } - const imdsProfile = (await retry(async () => { - let profile2; - try { - profile2 = await getProfile(options); - } catch (err) { - if (err.statusCode === 401) { - disableFetchToken = false; + if (tags.length == 0) { + reachedRoot = true; + } + } + } else { + const isValid = validateAttributeString(attrStr, options); + if (isValid !== true) { + return getErrorObject(isValid.err.code, isValid.err.msg, getLineNumberForPosition(xmlData, i - attrStr.length + isValid.err.line)); + } + if (reachedRoot === true) { + return getErrorObject("InvalidXml", "Multiple possible root nodes found.", getLineNumberForPosition(xmlData, i)); + } else if (options.unpairedTags.indexOf(tagName) !== -1) { + } else { + tags.push({ tagName, tagStartPos }); + } + tagFound = true; } - throw err; - } - return profile2; - }, maxRetries2)).trim(); - return retry(async () => { - let creds; - try { - creds = await getCredentialsFromProfile(imdsProfile, options); - } catch (err) { - if (err.statusCode === 401) { - disableFetchToken = false; + for (i++; i < xmlData.length; i++) { + if (xmlData[i] === "<") { + if (xmlData[i + 1] === "!") { + i++; + i = readCommentAndCDATA(xmlData, i); + continue; + } else if (xmlData[i + 1] === "?") { + i = readPI(xmlData, ++i); + if (i.err) return i; + } else { + break; + } + } else if (xmlData[i] === "&") { + const afterAmp = validateAmpersand(xmlData, i); + if (afterAmp == -1) + return getErrorObject("InvalidChar", "char '&' is not expected.", getLineNumberForPosition(xmlData, i)); + i = afterAmp; + } else { + if (reachedRoot === true && !isWhiteSpace(xmlData[i])) { + return getErrorObject("InvalidXml", "Extra text at the end", getLineNumberForPosition(xmlData, i)); + } + } } - throw err; - } - return creds; - }, maxRetries2); - }, "getCredentials"); - return async () => { - const endpoint = await getInstanceMetadataEndpoint(); - if (disableFetchToken) { - logger == null ? void 0 : logger.debug("AWS SDK Instance Metadata", "using v1 fallback (no token fetch)"); - return getCredentials(maxRetries, { ...endpoint, timeout }); - } else { - let token; - try { - token = (await getMetadataToken({ ...endpoint, timeout })).toString(); - } catch (error) { - if ((error == null ? void 0 : error.statusCode) === 400) { - throw Object.assign(error, { - message: "EC2 Metadata token request returned error" - }); - } else if (error.message === "TimeoutError" || [403, 404, 405].includes(error.statusCode)) { - disableFetchToken = true; + if (xmlData[i] === "<") { + i--; } - logger == null ? void 0 : logger.debug("AWS SDK Instance Metadata", "using v1 fallback (initial)"); - return getCredentials(maxRetries, { ...endpoint, timeout }); } - return getCredentials(maxRetries, { - ...endpoint, - headers: { - [X_AWS_EC2_METADATA_TOKEN]: token - }, - timeout - }); + } else { + if (isWhiteSpace(xmlData[i])) { + continue; + } + return getErrorObject("InvalidChar", "char '" + xmlData[i] + "' is not expected.", getLineNumberForPosition(xmlData, i)); } - }; - }, "getInstanceImdsProvider"); - var getMetadataToken = /* @__PURE__ */ __name(async (options) => httpRequest({ - ...options, - path: IMDS_TOKEN_PATH, - method: "PUT", - headers: { - "x-aws-ec2-metadata-token-ttl-seconds": "21600" - } - }), "getMetadataToken"); - var getProfile = /* @__PURE__ */ __name(async (options) => (await httpRequest({ ...options, path: IMDS_PATH })).toString(), "getProfile"); - var getCredentialsFromProfile = /* @__PURE__ */ __name(async (profile, options) => { - const credsResponse = JSON.parse( - (await httpRequest({ - ...options, - path: IMDS_PATH + profile - })).toString() - ); - if (!isImdsCredentials(credsResponse)) { - throw new import_property_provider.CredentialsProviderError("Invalid response received from instance metadata service."); } - return fromImdsCredentials(credsResponse); - }, "getCredentialsFromProfile"); - } -}); - -// ../../../node_modules/@aws-sdk/credential-provider-ini/dist-cjs/resolveCredentialSource.js -var require_resolveCredentialSource = __commonJS({ - "../../../node_modules/@aws-sdk/credential-provider-ini/dist-cjs/resolveCredentialSource.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.resolveCredentialSource = void 0; - var credential_provider_env_1 = require_dist_cjs37(); - var credential_provider_imds_1 = require_dist_cjs38(); - var property_provider_1 = require_dist_cjs6(); - var resolveCredentialSource = (credentialSource, profileName) => { - const sourceProvidersMap = { - EcsContainer: credential_provider_imds_1.fromContainerMetadata, - Ec2InstanceMetadata: credential_provider_imds_1.fromInstanceMetadata, - Environment: credential_provider_env_1.fromEnv - }; - if (credentialSource in sourceProvidersMap) { - return sourceProvidersMap[credentialSource](); - } else { - throw new property_provider_1.CredentialsProviderError(`Unsupported credential source in profile ${profileName}. Got ${credentialSource}, expected EcsContainer or Ec2InstanceMetadata or Environment.`); + if (!tagFound) { + return getErrorObject("InvalidXml", "Start tag expected.", 1); + } else if (tags.length == 1) { + return getErrorObject("InvalidTag", "Unclosed tag '" + tags[0].tagName + "'.", getLineNumberForPosition(xmlData, tags[0].tagStartPos)); + } else if (tags.length > 0) { + return getErrorObject("InvalidXml", "Invalid '" + JSON.stringify(tags.map((t) => t.tagName), null, 4).replace(/\r?\n/g, "") + "' found.", { line: 1, col: 1 }); } + return true; }; - exports2.resolveCredentialSource = resolveCredentialSource; - } -}); - -// ../../../node_modules/@aws-sdk/credential-provider-ini/dist-cjs/resolveAssumeRoleCredentials.js -var require_resolveAssumeRoleCredentials = __commonJS({ - "../../../node_modules/@aws-sdk/credential-provider-ini/dist-cjs/resolveAssumeRoleCredentials.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.resolveAssumeRoleCredentials = exports2.isAssumeRoleProfile = void 0; - var property_provider_1 = require_dist_cjs6(); - var shared_ini_file_loader_1 = require_dist_cjs21(); - var resolveCredentialSource_1 = require_resolveCredentialSource(); - var resolveProfileData_1 = require_resolveProfileData(); - var isAssumeRoleProfile = (arg) => Boolean(arg) && typeof arg === "object" && typeof arg.role_arn === "string" && ["undefined", "string"].indexOf(typeof arg.role_session_name) > -1 && ["undefined", "string"].indexOf(typeof arg.external_id) > -1 && ["undefined", "string"].indexOf(typeof arg.mfa_serial) > -1 && (isAssumeRoleWithSourceProfile(arg) || isAssumeRoleWithProviderProfile(arg)); - exports2.isAssumeRoleProfile = isAssumeRoleProfile; - var isAssumeRoleWithSourceProfile = (arg) => typeof arg.source_profile === "string" && typeof arg.credential_source === "undefined"; - var isAssumeRoleWithProviderProfile = (arg) => typeof arg.credential_source === "string" && typeof arg.source_profile === "undefined"; - var resolveAssumeRoleCredentials = async (profileName, profiles, options, visitedProfiles = {}) => { - const data = profiles[profileName]; - if (!options.roleAssumer) { - throw new property_provider_1.CredentialsProviderError(`Profile ${profileName} requires a role to be assumed, but no role assumption callback was provided.`, false); - } - const { source_profile } = data; - if (source_profile && source_profile in visitedProfiles) { - throw new property_provider_1.CredentialsProviderError(`Detected a cycle attempting to resolve credentials for profile ${(0, shared_ini_file_loader_1.getProfileName)(options)}. Profiles visited: ` + Object.keys(visitedProfiles).join(", "), false); - } - const sourceCredsProvider = source_profile ? (0, resolveProfileData_1.resolveProfileData)(source_profile, profiles, options, { - ...visitedProfiles, - [source_profile]: true - }) : (0, resolveCredentialSource_1.resolveCredentialSource)(data.credential_source, profileName)(); - const params = { - RoleArn: data.role_arn, - RoleSessionName: data.role_session_name || `aws-sdk-js-${Date.now()}`, - ExternalId: data.external_id, - DurationSeconds: parseInt(data.duration_seconds || "3600", 10) - }; - const { mfa_serial } = data; - if (mfa_serial) { - if (!options.mfaCodeProvider) { - throw new property_provider_1.CredentialsProviderError(`Profile ${profileName} requires multi-factor authentication, but no MFA code callback was provided.`, false); + function isWhiteSpace(char) { + return char === " " || char === " " || char === "\n" || char === "\r"; + } + function readPI(xmlData, i) { + const start = i; + for (; i < xmlData.length; i++) { + if (xmlData[i] == "?" || xmlData[i] == " ") { + const tagname = xmlData.substr(start, i - start); + if (i > 5 && tagname === "xml") { + return getErrorObject("InvalidXml", "XML declaration allowed only at the start of the document.", getLineNumberForPosition(xmlData, i)); + } else if (xmlData[i] == "?" && xmlData[i + 1] == ">") { + i++; + break; + } else { + continue; + } } - params.SerialNumber = mfa_serial; - params.TokenCode = await options.mfaCodeProvider(mfa_serial); - } - const sourceCreds = await sourceCredsProvider; - return options.roleAssumer(sourceCreds, params); - }; - exports2.resolveAssumeRoleCredentials = resolveAssumeRoleCredentials; - } -}); - -// ../../../node_modules/@aws-sdk/credential-provider-process/dist-cjs/getValidatedProcessCredentials.js -var require_getValidatedProcessCredentials = __commonJS({ - "../../../node_modules/@aws-sdk/credential-provider-process/dist-cjs/getValidatedProcessCredentials.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getValidatedProcessCredentials = void 0; - var getValidatedProcessCredentials = (profileName, data) => { - if (data.Version !== 1) { - throw Error(`Profile ${profileName} credential_process did not return Version 1.`); } - if (data.AccessKeyId === void 0 || data.SecretAccessKey === void 0) { - throw Error(`Profile ${profileName} credential_process returned invalid credentials.`); + return i; + } + function readCommentAndCDATA(xmlData, i) { + if (xmlData.length > i + 5 && xmlData[i + 1] === "-" && xmlData[i + 2] === "-") { + for (i += 3; i < xmlData.length; i++) { + if (xmlData[i] === "-" && xmlData[i + 1] === "-" && xmlData[i + 2] === ">") { + i += 2; + break; + } + } + } else if (xmlData.length > i + 8 && xmlData[i + 1] === "D" && xmlData[i + 2] === "O" && xmlData[i + 3] === "C" && xmlData[i + 4] === "T" && xmlData[i + 5] === "Y" && xmlData[i + 6] === "P" && xmlData[i + 7] === "E") { + let angleBracketsCount = 1; + for (i += 8; i < xmlData.length; i++) { + if (xmlData[i] === "<") { + angleBracketsCount++; + } else if (xmlData[i] === ">") { + angleBracketsCount--; + if (angleBracketsCount === 0) { + break; + } + } + } + } else if (xmlData.length > i + 9 && xmlData[i + 1] === "[" && xmlData[i + 2] === "C" && xmlData[i + 3] === "D" && xmlData[i + 4] === "A" && xmlData[i + 5] === "T" && xmlData[i + 6] === "A" && xmlData[i + 7] === "[") { + for (i += 8; i < xmlData.length; i++) { + if (xmlData[i] === "]" && xmlData[i + 1] === "]" && xmlData[i + 2] === ">") { + i += 2; + break; + } + } } - if (data.Expiration) { - const currentTime = /* @__PURE__ */ new Date(); - const expireTime = new Date(data.Expiration); - if (expireTime < currentTime) { - throw Error(`Profile ${profileName} credential_process returned expired credentials.`); + return i; + } + var doubleQuote = '"'; + var singleQuote = "'"; + function readAttributeStr(xmlData, i) { + let attrStr = ""; + let startChar = ""; + let tagClosed = false; + for (; i < xmlData.length; i++) { + if (xmlData[i] === doubleQuote || xmlData[i] === singleQuote) { + if (startChar === "") { + startChar = xmlData[i]; + } else if (startChar !== xmlData[i]) { + } else { + startChar = ""; + } + } else if (xmlData[i] === ">") { + if (startChar === "") { + tagClosed = true; + break; + } } + attrStr += xmlData[i]; + } + if (startChar !== "") { + return false; } return { - accessKeyId: data.AccessKeyId, - secretAccessKey: data.SecretAccessKey, - ...data.SessionToken && { sessionToken: data.SessionToken }, - ...data.Expiration && { expiration: new Date(data.Expiration) } + value: attrStr, + index: i, + tagClosed }; - }; - exports2.getValidatedProcessCredentials = getValidatedProcessCredentials; - } -}); - -// ../../../node_modules/@aws-sdk/credential-provider-process/dist-cjs/resolveProcessCredentials.js -var require_resolveProcessCredentials = __commonJS({ - "../../../node_modules/@aws-sdk/credential-provider-process/dist-cjs/resolveProcessCredentials.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.resolveProcessCredentials = void 0; - var property_provider_1 = require_dist_cjs6(); - var child_process_1 = require("child_process"); - var util_1 = require("util"); - var getValidatedProcessCredentials_1 = require_getValidatedProcessCredentials(); - var resolveProcessCredentials = async (profileName, profiles) => { - const profile = profiles[profileName]; - if (profiles[profileName]) { - const credentialProcess = profile["credential_process"]; - if (credentialProcess !== void 0) { - const execPromise = (0, util_1.promisify)(child_process_1.exec); - try { - const { stdout } = await execPromise(credentialProcess); - let data; - try { - data = JSON.parse(stdout.trim()); - } catch (_a) { - throw Error(`Profile ${profileName} credential_process returned invalid JSON.`); - } - return (0, getValidatedProcessCredentials_1.getValidatedProcessCredentials)(profileName, data); - } catch (error) { - throw new property_provider_1.CredentialsProviderError(error.message); - } + } + var validAttrStrRegxp = new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`, "g"); + function validateAttributeString(attrStr, options) { + const matches = util.getAllMatches(attrStr, validAttrStrRegxp); + const attrNames = {}; + for (let i = 0; i < matches.length; i++) { + if (matches[i][1].length === 0) { + return getErrorObject("InvalidAttr", "Attribute '" + matches[i][2] + "' has no space in starting.", getPositionFromMatch(matches[i])); + } else if (matches[i][3] !== void 0 && matches[i][4] === void 0) { + return getErrorObject("InvalidAttr", "Attribute '" + matches[i][2] + "' is without value.", getPositionFromMatch(matches[i])); + } else if (matches[i][3] === void 0 && !options.allowBooleanAttributes) { + return getErrorObject("InvalidAttr", "boolean attribute '" + matches[i][2] + "' is not allowed.", getPositionFromMatch(matches[i])); + } + const attrName = matches[i][2]; + if (!validateAttrName(attrName)) { + return getErrorObject("InvalidAttr", "Attribute '" + attrName + "' is an invalid name.", getPositionFromMatch(matches[i])); + } + if (!attrNames.hasOwnProperty(attrName)) { + attrNames[attrName] = 1; } else { - throw new property_provider_1.CredentialsProviderError(`Profile ${profileName} did not contain credential_process.`); + return getErrorObject("InvalidAttr", "Attribute '" + attrName + "' is repeated.", getPositionFromMatch(matches[i])); } - } else { - throw new property_provider_1.CredentialsProviderError(`Profile ${profileName} could not be found in shared credentials file.`); } - }; - exports2.resolveProcessCredentials = resolveProcessCredentials; - } -}); - -// ../../../node_modules/@aws-sdk/credential-provider-process/dist-cjs/fromProcess.js -var require_fromProcess = __commonJS({ - "../../../node_modules/@aws-sdk/credential-provider-process/dist-cjs/fromProcess.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.fromProcess = void 0; - var shared_ini_file_loader_1 = require_dist_cjs21(); - var resolveProcessCredentials_1 = require_resolveProcessCredentials(); - var fromProcess = (init = {}) => async () => { - const profiles = await (0, shared_ini_file_loader_1.parseKnownFiles)(init); - return (0, resolveProcessCredentials_1.resolveProcessCredentials)((0, shared_ini_file_loader_1.getProfileName)(init), profiles); - }; - exports2.fromProcess = fromProcess; - } -}); - -// ../../../node_modules/@aws-sdk/credential-provider-process/dist-cjs/index.js -var require_dist_cjs39 = __commonJS({ - "../../../node_modules/@aws-sdk/credential-provider-process/dist-cjs/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); - tslib_1.__exportStar(require_fromProcess(), exports2); - } -}); - -// ../../../node_modules/@aws-sdk/credential-provider-ini/dist-cjs/resolveProcessCredentials.js -var require_resolveProcessCredentials2 = __commonJS({ - "../../../node_modules/@aws-sdk/credential-provider-ini/dist-cjs/resolveProcessCredentials.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.resolveProcessCredentials = exports2.isProcessProfile = void 0; - var credential_provider_process_1 = require_dist_cjs39(); - var isProcessProfile = (arg) => Boolean(arg) && typeof arg === "object" && typeof arg.credential_process === "string"; - exports2.isProcessProfile = isProcessProfile; - var resolveProcessCredentials = async (options, profile) => (0, credential_provider_process_1.fromProcess)({ - ...options, - profile - })(); - exports2.resolveProcessCredentials = resolveProcessCredentials; - } -}); - -// ../../../node_modules/@aws-sdk/credential-provider-sso/dist-cjs/isSsoProfile.js -var require_isSsoProfile = __commonJS({ - "../../../node_modules/@aws-sdk/credential-provider-sso/dist-cjs/isSsoProfile.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.isSsoProfile = void 0; - var isSsoProfile = (arg) => arg && (typeof arg.sso_start_url === "string" || typeof arg.sso_account_id === "string" || typeof arg.sso_session === "string" || typeof arg.sso_region === "string" || typeof arg.sso_role_name === "string"); - exports2.isSsoProfile = isSsoProfile; - } -}); - -// ../../../node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/EndpointParameters.js -var require_EndpointParameters3 = __commonJS({ - "../../../node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/EndpointParameters.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.resolveClientEndpointParameters = void 0; - var resolveClientEndpointParameters = (options) => { + return true; + } + function validateNumberAmpersand(xmlData, i) { + let re = /\d/; + if (xmlData[i] === "x") { + i++; + re = /[\da-fA-F]/; + } + for (; i < xmlData.length; i++) { + if (xmlData[i] === ";") + return i; + if (!xmlData[i].match(re)) + break; + } + return -1; + } + function validateAmpersand(xmlData, i) { + i++; + if (xmlData[i] === ";") + return -1; + if (xmlData[i] === "#") { + i++; + return validateNumberAmpersand(xmlData, i); + } + let count = 0; + for (; i < xmlData.length; i++, count++) { + if (xmlData[i].match(/\w/) && count < 20) + continue; + if (xmlData[i] === ";") + break; + return -1; + } + return i; + } + function getErrorObject(code, message, lineNumber) { return { - ...options, - useDualstackEndpoint: options.useDualstackEndpoint ?? false, - useFipsEndpoint: options.useFipsEndpoint ?? false, - defaultSigningName: "awsssoportal" + err: { + code, + msg: message, + line: lineNumber.line || lineNumber, + col: lineNumber.col + } }; - }; - exports2.resolveClientEndpointParameters = resolveClientEndpointParameters; + } + function validateAttrName(attrName) { + return util.isName(attrName); + } + function validateTagName(tagname) { + return util.isName(tagname); + } + function getLineNumberForPosition(xmlData, index) { + const lines = xmlData.substring(0, index).split(/\r?\n/); + return { + line: lines.length, + // column number is last line's length + 1, because column numbering starts at 1: + col: lines[lines.length - 1].length + 1 + }; + } + function getPositionFromMatch(match) { + return match.startIndex + match[1].length; + } } }); -// ../../../node_modules/@aws-sdk/client-sso/package.json -var require_package3 = __commonJS({ - "../../../node_modules/@aws-sdk/client-sso/package.json"(exports2, module2) { - module2.exports = { - name: "@aws-sdk/client-sso", - description: "AWS SDK for JavaScript Sso Client for Node.js, Browser and React Native", - version: "3.421.0", - scripts: { - build: "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'", - "build:cjs": "tsc -p tsconfig.cjs.json", - "build:docs": "typedoc", - "build:es": "tsc -p tsconfig.es.json", - "build:include:deps": "lerna run --scope $npm_package_name --include-dependencies build", - "build:types": "tsc -p tsconfig.types.json", - "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4", - clean: "rimraf ./dist-* && rimraf *.tsbuildinfo", - "extract:docs": "api-extractor run --local", - "generate:client": "node ../../scripts/generate-clients/single-service --solo sso" - }, - main: "./dist-cjs/index.js", - types: "./dist-types/index.d.ts", - module: "./dist-es/index.js", - sideEffects: false, - dependencies: { - "@aws-crypto/sha256-browser": "3.0.0", - "@aws-crypto/sha256-js": "3.0.0", - "@aws-sdk/middleware-host-header": "3.418.0", - "@aws-sdk/middleware-logger": "3.418.0", - "@aws-sdk/middleware-recursion-detection": "3.418.0", - "@aws-sdk/middleware-user-agent": "3.418.0", - "@aws-sdk/region-config-resolver": "3.418.0", - "@aws-sdk/types": "3.418.0", - "@aws-sdk/util-endpoints": "3.418.0", - "@aws-sdk/util-user-agent-browser": "3.418.0", - "@aws-sdk/util-user-agent-node": "3.418.0", - "@smithy/config-resolver": "^2.0.10", - "@smithy/fetch-http-handler": "^2.1.5", - "@smithy/hash-node": "^2.0.9", - "@smithy/invalid-dependency": "^2.0.9", - "@smithy/middleware-content-length": "^2.0.11", - "@smithy/middleware-endpoint": "^2.0.9", - "@smithy/middleware-retry": "^2.0.12", - "@smithy/middleware-serde": "^2.0.9", - "@smithy/middleware-stack": "^2.0.2", - "@smithy/node-config-provider": "^2.0.12", - "@smithy/node-http-handler": "^2.1.5", - "@smithy/protocol-http": "^3.0.5", - "@smithy/smithy-client": "^2.1.6", - "@smithy/types": "^2.3.3", - "@smithy/url-parser": "^2.0.9", - "@smithy/util-base64": "^2.0.0", - "@smithy/util-body-length-browser": "^2.0.0", - "@smithy/util-body-length-node": "^2.1.0", - "@smithy/util-defaults-mode-browser": "^2.0.10", - "@smithy/util-defaults-mode-node": "^2.0.12", - "@smithy/util-retry": "^2.0.2", - "@smithy/util-utf8": "^2.0.0", - tslib: "^2.5.0" - }, - devDependencies: { - "@smithy/service-client-documentation-generator": "^2.0.0", - "@tsconfig/node14": "1.0.3", - "@types/node": "^14.14.31", - concurrently: "7.0.0", - "downlevel-dts": "0.10.1", - rimraf: "3.0.2", - typedoc: "0.23.23", - typescript: "~4.9.5" - }, - engines: { - node: ">=14.0.0" - }, - typesVersions: { - "<4.0": { - "dist-types/*": [ - "dist-types/ts3.4/*" - ] - } - }, - files: [ - "dist-*/**" - ], - author: { - name: "AWS SDK for JavaScript Team", - url: "https://aws.amazon.com/javascript/" +// ../../../node_modules/fast-xml-parser/src/xmlparser/OptionsBuilder.js +var require_OptionsBuilder = __commonJS({ + "../../../node_modules/fast-xml-parser/src/xmlparser/OptionsBuilder.js"(exports2) { + var defaultOptions = { + preserveOrder: false, + attributeNamePrefix: "@_", + attributesGroupName: false, + textNodeName: "#text", + ignoreAttributes: true, + removeNSPrefix: false, + // remove NS from tag name or attribute name if true + allowBooleanAttributes: false, + //a tag can have attributes without any value + //ignoreRootElement : false, + parseTagValue: true, + parseAttributeValue: false, + trimValues: true, + //Trim string values of tag and attributes + cdataPropName: false, + numberParseOptions: { + hex: true, + leadingZeros: true, + eNotation: true }, - license: "Apache-2.0", - browser: { - "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.browser" + tagValueProcessor: function(tagName, val2) { + return val2; }, - "react-native": { - "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.native" + attributeValueProcessor: function(attrName, val2) { + return val2; }, - homepage: "https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sso", - repository: { - type: "git", - url: "https://github.com/aws/aws-sdk-js-v3.git", - directory: "clients/client-sso" + stopNodes: [], + //nested tags will not be parsed even for errors + alwaysCreateTextNode: false, + isArray: () => false, + commentPropName: false, + unpairedTags: [], + processEntities: true, + htmlEntities: false, + ignoreDeclaration: false, + ignorePiTags: false, + transformTagName: false, + transformAttributeName: false, + updateTag: function(tagName, jPath, attrs) { + return tagName; } + // skipEmptyListItem: false }; - } -}); - -// ../../../node_modules/@aws-sdk/util-user-agent-node/dist-cjs/is-crt-available.js -var require_is_crt_available = __commonJS({ - "../../../node_modules/@aws-sdk/util-user-agent-node/dist-cjs/is-crt-available.js"(exports2, module2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.isCrtAvailable = void 0; - var isCrtAvailable = () => { - try { - if (typeof require === "function" && typeof module2 !== "undefined" && require("aws-crt")) { - return ["md/crt-avail"]; - } - return null; - } catch (e) { - return null; - } + var buildOptions = function(options) { + return Object.assign({}, defaultOptions, options); }; - exports2.isCrtAvailable = isCrtAvailable; + exports2.buildOptions = buildOptions; + exports2.defaultOptions = defaultOptions; } }); -// ../../../node_modules/@aws-sdk/util-user-agent-node/dist-cjs/index.js -var require_dist_cjs40 = __commonJS({ - "../../../node_modules/@aws-sdk/util-user-agent-node/dist-cjs/index.js"(exports2) { +// ../../../node_modules/fast-xml-parser/src/xmlparser/xmlNode.js +var require_xmlNode = __commonJS({ + "../../../node_modules/fast-xml-parser/src/xmlparser/xmlNode.js"(exports2, module2) { "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.defaultUserAgent = exports2.UA_APP_ID_INI_NAME = exports2.UA_APP_ID_ENV_NAME = void 0; - var node_config_provider_1 = require_dist_cjs22(); - var os_1 = require("os"); - var process_1 = require("process"); - var is_crt_available_1 = require_is_crt_available(); - exports2.UA_APP_ID_ENV_NAME = "AWS_SDK_UA_APP_ID"; - exports2.UA_APP_ID_INI_NAME = "sdk-ua-app-id"; - var defaultUserAgent = ({ serviceId, clientVersion }) => { - const sections = [ - ["aws-sdk-js", clientVersion], - ["ua", "2.0"], - [`os/${(0, os_1.platform)()}`, (0, os_1.release)()], - ["lang/js"], - ["md/nodejs", `${process_1.versions.node}`] - ]; - const crtAvailable = (0, is_crt_available_1.isCrtAvailable)(); - if (crtAvailable) { - sections.push(crtAvailable); - } - if (serviceId) { - sections.push([`api/${serviceId}`, clientVersion]); + var XmlNode = class { + constructor(tagname) { + this.tagname = tagname; + this.child = []; + this[":@"] = {}; } - if (process_1.env.AWS_EXECUTION_ENV) { - sections.push([`exec-env/${process_1.env.AWS_EXECUTION_ENV}`]); + add(key, val2) { + if (key === "__proto__") key = "#__proto__"; + this.child.push({ [key]: val2 }); } - const appIdPromise = (0, node_config_provider_1.loadConfig)({ - environmentVariableSelector: (env) => env[exports2.UA_APP_ID_ENV_NAME], - configFileSelector: (profile) => profile[exports2.UA_APP_ID_INI_NAME], - default: void 0 - })(); - let resolvedUserAgent = void 0; - return async () => { - if (!resolvedUserAgent) { - const appId = await appIdPromise; - resolvedUserAgent = appId ? [...sections, [`app/${appId}`]] : [...sections]; + addChild(node) { + if (node.tagname === "__proto__") node.tagname = "#__proto__"; + if (node[":@"] && Object.keys(node[":@"]).length > 0) { + this.child.push({ [node.tagname]: node.child, [":@"]: node[":@"] }); + } else { + this.child.push({ [node.tagname]: node.child }); } - return resolvedUserAgent; - }; + } }; - exports2.defaultUserAgent = defaultUserAgent; + module2.exports = XmlNode; } }); -// ../../../node_modules/@smithy/hash-node/dist-cjs/index.js -var require_dist_cjs41 = __commonJS({ - "../../../node_modules/@smithy/hash-node/dist-cjs/index.js"(exports2, module2) { - var __defProp2 = Object.defineProperty; - var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; - var __getOwnPropNames2 = Object.getOwnPropertyNames; - var __hasOwnProp2 = Object.prototype.hasOwnProperty; - var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); - var __export2 = (target, all) => { - for (var name in all) - __defProp2(target, name, { get: all[name], enumerable: true }); - }; - var __copyProps2 = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames2(from)) - if (!__hasOwnProp2.call(to, key) && key !== except) - __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); - } - return to; - }; - var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); - var src_exports = {}; - __export2(src_exports, { - Hash: () => Hash - }); - module2.exports = __toCommonJS2(src_exports); - var import_util_buffer_from = require_dist_cjs9(); - var import_util_utf8 = require_dist_cjs10(); - var import_buffer = require("buffer"); - var import_crypto5 = require("crypto"); - var _Hash = class _Hash { - constructor(algorithmIdentifier, secret) { - this.algorithmIdentifier = algorithmIdentifier; - this.secret = secret; - this.reset(); - } - update(toHash, encoding) { - this.hash.update((0, import_util_utf8.toUint8Array)(castSourceData(toHash, encoding))); +// ../../../node_modules/fast-xml-parser/src/xmlparser/DocTypeReader.js +var require_DocTypeReader = __commonJS({ + "../../../node_modules/fast-xml-parser/src/xmlparser/DocTypeReader.js"(exports2, module2) { + var util = require_util(); + function readDocType(xmlData, i) { + const entities = {}; + if (xmlData[i + 3] === "O" && xmlData[i + 4] === "C" && xmlData[i + 5] === "T" && xmlData[i + 6] === "Y" && xmlData[i + 7] === "P" && xmlData[i + 8] === "E") { + i = i + 9; + let angleBracketsCount = 1; + let hasBody = false, comment = false; + let exp = ""; + for (; i < xmlData.length; i++) { + if (xmlData[i] === "<" && !comment) { + if (hasBody && isEntity(xmlData, i)) { + i += 7; + [entityName, val, i] = readEntityExp(xmlData, i + 1); + if (val.indexOf("&") === -1) + entities[validateEntityName(entityName)] = { + regx: RegExp(`&${entityName};`, "g"), + val + }; + } else if (hasBody && isElement(xmlData, i)) i += 8; + else if (hasBody && isAttlist(xmlData, i)) i += 8; + else if (hasBody && isNotation(xmlData, i)) i += 9; + else if (isComment) comment = true; + else throw new Error("Invalid DOCTYPE"); + angleBracketsCount++; + exp = ""; + } else if (xmlData[i] === ">") { + if (comment) { + if (xmlData[i - 1] === "-" && xmlData[i - 2] === "-") { + comment = false; + angleBracketsCount--; + } + } else { + angleBracketsCount--; + } + if (angleBracketsCount === 0) { + break; + } + } else if (xmlData[i] === "[") { + hasBody = true; + } else { + exp += xmlData[i]; + } + } + if (angleBracketsCount !== 0) { + throw new Error(`Unclosed DOCTYPE`); + } + } else { + throw new Error(`Invalid Tag instead of DOCTYPE`); } - digest() { - return Promise.resolve(this.hash.digest()); + return { entities, i }; + } + function readEntityExp(xmlData, i) { + let entityName2 = ""; + for (; i < xmlData.length && (xmlData[i] !== "'" && xmlData[i] !== '"'); i++) { + entityName2 += xmlData[i]; } - reset() { - this.hash = this.secret ? (0, import_crypto5.createHmac)(this.algorithmIdentifier, castSourceData(this.secret)) : (0, import_crypto5.createHash)(this.algorithmIdentifier); + entityName2 = entityName2.trim(); + if (entityName2.indexOf(" ") !== -1) throw new Error("External entites are not supported"); + const startChar = xmlData[i++]; + let val2 = ""; + for (; i < xmlData.length && xmlData[i] !== startChar; i++) { + val2 += xmlData[i]; } + return [entityName2, val2, i]; + } + function isComment(xmlData, i) { + if (xmlData[i + 1] === "!" && xmlData[i + 2] === "-" && xmlData[i + 3] === "-") return true; + return false; + } + function isEntity(xmlData, i) { + if (xmlData[i + 1] === "!" && xmlData[i + 2] === "E" && xmlData[i + 3] === "N" && xmlData[i + 4] === "T" && xmlData[i + 5] === "I" && xmlData[i + 6] === "T" && xmlData[i + 7] === "Y") return true; + return false; + } + function isElement(xmlData, i) { + if (xmlData[i + 1] === "!" && xmlData[i + 2] === "E" && xmlData[i + 3] === "L" && xmlData[i + 4] === "E" && xmlData[i + 5] === "M" && xmlData[i + 6] === "E" && xmlData[i + 7] === "N" && xmlData[i + 8] === "T") return true; + return false; + } + function isAttlist(xmlData, i) { + if (xmlData[i + 1] === "!" && xmlData[i + 2] === "A" && xmlData[i + 3] === "T" && xmlData[i + 4] === "T" && xmlData[i + 5] === "L" && xmlData[i + 6] === "I" && xmlData[i + 7] === "S" && xmlData[i + 8] === "T") return true; + return false; + } + function isNotation(xmlData, i) { + if (xmlData[i + 1] === "!" && xmlData[i + 2] === "N" && xmlData[i + 3] === "O" && xmlData[i + 4] === "T" && xmlData[i + 5] === "A" && xmlData[i + 6] === "T" && xmlData[i + 7] === "I" && xmlData[i + 8] === "O" && xmlData[i + 9] === "N") return true; + return false; + } + function validateEntityName(name) { + if (util.isName(name)) + return name; + else + throw new Error(`Invalid entity name ${name}`); + } + module2.exports = readDocType; + } +}); + +// ../../../node_modules/strnum/strnum.js +var require_strnum = __commonJS({ + "../../../node_modules/strnum/strnum.js"(exports2, module2) { + var hexRegex = /^[-+]?0x[a-fA-F0-9]+$/; + var numRegex = /^([\-\+])?(0*)(\.[0-9]+([eE]\-?[0-9]+)?|[0-9]+(\.[0-9]+([eE]\-?[0-9]+)?)?)$/; + if (!Number.parseInt && window.parseInt) { + Number.parseInt = window.parseInt; + } + if (!Number.parseFloat && window.parseFloat) { + Number.parseFloat = window.parseFloat; + } + var consider = { + hex: true, + leadingZeros: true, + decimalPoint: ".", + eNotation: true + //skipLike: /regex/ }; - __name(_Hash, "Hash"); - var Hash = _Hash; - function castSourceData(toCast, encoding) { - if (import_buffer.Buffer.isBuffer(toCast)) { - return toCast; - } - if (typeof toCast === "string") { - return (0, import_util_buffer_from.fromString)(toCast, encoding); + function toNumber(str, options = {}) { + options = Object.assign({}, consider, options); + if (!str || typeof str !== "string") return str; + let trimmedStr = str.trim(); + if (options.skipLike !== void 0 && options.skipLike.test(trimmedStr)) return str; + else if (options.hex && hexRegex.test(trimmedStr)) { + return Number.parseInt(trimmedStr, 16); + } else { + const match = numRegex.exec(trimmedStr); + if (match) { + const sign = match[1]; + const leadingZeros = match[2]; + let numTrimmedByZeros = trimZeros(match[3]); + const eNotation = match[4] || match[6]; + if (!options.leadingZeros && leadingZeros.length > 0 && sign && trimmedStr[2] !== ".") return str; + else if (!options.leadingZeros && leadingZeros.length > 0 && !sign && trimmedStr[1] !== ".") return str; + else { + const num = Number(trimmedStr); + const numStr = "" + num; + if (numStr.search(/[eE]/) !== -1) { + if (options.eNotation) return num; + else return str; + } else if (eNotation) { + if (options.eNotation) return num; + else return str; + } else if (trimmedStr.indexOf(".") !== -1) { + if (numStr === "0" && numTrimmedByZeros === "") return num; + else if (numStr === numTrimmedByZeros) return num; + else if (sign && numStr === "-" + numTrimmedByZeros) return num; + else return str; + } + if (leadingZeros) { + if (numTrimmedByZeros === numStr) return num; + else if (sign + numTrimmedByZeros === numStr) return num; + else return str; + } + if (trimmedStr === numStr) return num; + else if (trimmedStr === sign + numStr) return num; + return str; + } + } else { + return str; + } } - if (ArrayBuffer.isView(toCast)) { - return (0, import_util_buffer_from.fromArrayBuffer)(toCast.buffer, toCast.byteOffset, toCast.byteLength); + } + function trimZeros(numStr) { + if (numStr && numStr.indexOf(".") !== -1) { + numStr = numStr.replace(/0+$/, ""); + if (numStr === ".") numStr = "0"; + else if (numStr[0] === ".") numStr = "0" + numStr; + else if (numStr[numStr.length - 1] === ".") numStr = numStr.substr(0, numStr.length - 1); + return numStr; } - return (0, import_util_buffer_from.fromArrayBuffer)(toCast); + return numStr; } - __name(castSourceData, "castSourceData"); + module2.exports = toNumber; } }); -// ../../../node_modules/@smithy/util-body-length-node/dist-cjs/index.js -var require_dist_cjs42 = __commonJS({ - "../../../node_modules/@smithy/util-body-length-node/dist-cjs/index.js"(exports2, module2) { - var __defProp2 = Object.defineProperty; - var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; - var __getOwnPropNames2 = Object.getOwnPropertyNames; - var __hasOwnProp2 = Object.prototype.hasOwnProperty; - var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); - var __export2 = (target, all) => { - for (var name in all) - __defProp2(target, name, { get: all[name], enumerable: true }); - }; - var __copyProps2 = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames2(from)) - if (!__hasOwnProp2.call(to, key) && key !== except) - __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); +// ../../../node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js +var require_OrderedObjParser = __commonJS({ + "../../../node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js"(exports2, module2) { + "use strict"; + var util = require_util(); + var xmlNode = require_xmlNode(); + var readDocType = require_DocTypeReader(); + var toNumber = require_strnum(); + var OrderedObjParser = class { + constructor(options) { + this.options = options; + this.currentNode = null; + this.tagsNodeStack = []; + this.docTypeEntities = {}; + this.lastEntities = { + "apos": { regex: /&(apos|#39|#x27);/g, val: "'" }, + "gt": { regex: /&(gt|#62|#x3E);/g, val: ">" }, + "lt": { regex: /&(lt|#60|#x3C);/g, val: "<" }, + "quot": { regex: /&(quot|#34|#x22);/g, val: '"' } + }; + this.ampEntity = { regex: /&(amp|#38|#x26);/g, val: "&" }; + this.htmlEntities = { + "space": { regex: /&(nbsp|#160);/g, val: " " }, + // "lt" : { regex: /&(lt|#60);/g, val: "<" }, + // "gt" : { regex: /&(gt|#62);/g, val: ">" }, + // "amp" : { regex: /&(amp|#38);/g, val: "&" }, + // "quot" : { regex: /&(quot|#34);/g, val: "\"" }, + // "apos" : { regex: /&(apos|#39);/g, val: "'" }, + "cent": { regex: /&(cent|#162);/g, val: "\xA2" }, + "pound": { regex: /&(pound|#163);/g, val: "\xA3" }, + "yen": { regex: /&(yen|#165);/g, val: "\xA5" }, + "euro": { regex: /&(euro|#8364);/g, val: "\u20AC" }, + "copyright": { regex: /&(copy|#169);/g, val: "\xA9" }, + "reg": { regex: /&(reg|#174);/g, val: "\xAE" }, + "inr": { regex: /&(inr|#8377);/g, val: "\u20B9" }, + "num_dec": { regex: /&#([0-9]{1,7});/g, val: (_, str) => String.fromCharCode(Number.parseInt(str, 10)) }, + "num_hex": { regex: /&#x([0-9a-fA-F]{1,6});/g, val: (_, str) => String.fromCharCode(Number.parseInt(str, 16)) } + }; + this.addExternalEntities = addExternalEntities; + this.parseXml = parseXml; + this.parseTextData = parseTextData; + this.resolveNameSpace = resolveNameSpace; + this.buildAttributesMap = buildAttributesMap; + this.isItStopNode = isItStopNode; + this.replaceEntitiesValue = replaceEntitiesValue; + this.readStopNodeData = readStopNodeData; + this.saveTextToParentTag = saveTextToParentTag; + this.addChild = addChild; } - return to; }; - var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); - var src_exports = {}; - __export2(src_exports, { - calculateBodyLength: () => calculateBodyLength - }); - module2.exports = __toCommonJS2(src_exports); - var import_fs = require("fs"); - var calculateBodyLength = /* @__PURE__ */ __name((body) => { - if (!body) { - return 0; + function addExternalEntities(externalEntities) { + const entKeys = Object.keys(externalEntities); + for (let i = 0; i < entKeys.length; i++) { + const ent = entKeys[i]; + this.lastEntities[ent] = { + regex: new RegExp("&" + ent + ";", "g"), + val: externalEntities[ent] + }; + } + } + function parseTextData(val2, tagName, jPath, dontTrim, hasAttributes, isLeafNode, escapeEntities) { + if (val2 !== void 0) { + if (this.options.trimValues && !dontTrim) { + val2 = val2.trim(); + } + if (val2.length > 0) { + if (!escapeEntities) val2 = this.replaceEntitiesValue(val2); + const newval = this.options.tagValueProcessor(tagName, val2, jPath, hasAttributes, isLeafNode); + if (newval === null || newval === void 0) { + return val2; + } else if (typeof newval !== typeof val2 || newval !== val2) { + return newval; + } else if (this.options.trimValues) { + return parseValue(val2, this.options.parseTagValue, this.options.numberParseOptions); + } else { + const trimmedVal = val2.trim(); + if (trimmedVal === val2) { + return parseValue(val2, this.options.parseTagValue, this.options.numberParseOptions); + } else { + return val2; + } + } + } } - if (typeof body === "string") { - return Buffer.byteLength(body); - } else if (typeof body.byteLength === "number") { - return body.byteLength; - } else if (typeof body.size === "number") { - return body.size; - } else if (typeof body.start === "number" && typeof body.end === "number") { - return body.end + 1 - body.start; - } else if (typeof body.path === "string" || Buffer.isBuffer(body.path)) { - return (0, import_fs.lstatSync)(body.path).size; - } else if (typeof body.fd === "number") { - return (0, import_fs.fstatSync)(body.fd).size; + } + function resolveNameSpace(tagname) { + if (this.options.removeNSPrefix) { + const tags = tagname.split(":"); + const prefix = tagname.charAt(0) === "/" ? "/" : ""; + if (tags[0] === "xmlns") { + return ""; + } + if (tags.length === 2) { + tagname = prefix + tags[1]; + } } - throw new Error(`Body Length computation failed for ${body}`); - }, "calculateBodyLength"); - } -}); - -// ../../../node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/ruleset.js -var require_ruleset = __commonJS({ - "../../../node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/ruleset.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.ruleSet = void 0; - var q = "required"; - var r = "fn"; - var s = "argv"; - var t = "ref"; - var a = "isSet"; - var b = "tree"; - var c = "error"; - var d = "endpoint"; - var e = "PartitionResult"; - var f = { [q]: false, "type": "String" }; - var g = { [q]: true, "default": false, "type": "Boolean" }; - var h = { [t]: "Endpoint" }; - var i = { [r]: "booleanEquals", [s]: [{ [t]: "UseFIPS" }, true] }; - var j = { [r]: "booleanEquals", [s]: [{ [t]: "UseDualStack" }, true] }; - var k = {}; - var l = { [r]: "booleanEquals", [s]: [true, { [r]: "getAttr", [s]: [{ [t]: e }, "supportsFIPS"] }] }; - var m = { [r]: "booleanEquals", [s]: [true, { [r]: "getAttr", [s]: [{ [t]: e }, "supportsDualStack"] }] }; - var n = [i]; - var o = [j]; - var p = [{ [t]: "Region" }]; - var _data = { version: "1.0", parameters: { Region: f, UseDualStack: g, UseFIPS: g, Endpoint: f }, rules: [{ conditions: [{ [r]: a, [s]: [h] }], type: b, rules: [{ conditions: n, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: c }, { conditions: o, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: c }, { endpoint: { url: h, properties: k, headers: k }, type: d }] }, { conditions: [{ [r]: a, [s]: p }], type: b, rules: [{ conditions: [{ [r]: "aws.partition", [s]: p, assign: e }], type: b, rules: [{ conditions: [i, j], type: b, rules: [{ conditions: [l, m], type: b, rules: [{ endpoint: { url: "https://portal.sso-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: k, headers: k }, type: d }] }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: c }] }, { conditions: n, type: b, rules: [{ conditions: [l], type: b, rules: [{ endpoint: { url: "https://portal.sso-fips.{Region}.{PartitionResult#dnsSuffix}", properties: k, headers: k }, type: d }] }, { error: "FIPS is enabled but this partition does not support FIPS", type: c }] }, { conditions: o, type: b, rules: [{ conditions: [m], type: b, rules: [{ endpoint: { url: "https://portal.sso.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: k, headers: k }, type: d }] }, { error: "DualStack is enabled but this partition does not support DualStack", type: c }] }, { endpoint: { url: "https://portal.sso.{Region}.{PartitionResult#dnsSuffix}", properties: k, headers: k }, type: d }] }] }, { error: "Invalid Configuration: Missing Region", type: c }] }; - exports2.ruleSet = _data; - } -}); - -// ../../../node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/endpointResolver.js -var require_endpointResolver = __commonJS({ - "../../../node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/endpointResolver.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.defaultEndpointResolver = void 0; - var util_endpoints_1 = require_dist_cjs16(); - var ruleset_1 = require_ruleset(); - var defaultEndpointResolver = (endpointParams, context = {}) => { - return (0, util_endpoints_1.resolveEndpoint)(ruleset_1.ruleSet, { - endpointParams, - logger: context.logger - }); - }; - exports2.defaultEndpointResolver = defaultEndpointResolver; - } -}); - -// ../../../node_modules/@aws-sdk/client-sso/dist-cjs/runtimeConfig.shared.js -var require_runtimeConfig_shared = __commonJS({ - "../../../node_modules/@aws-sdk/client-sso/dist-cjs/runtimeConfig.shared.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getRuntimeConfig = void 0; - var smithy_client_1 = require_dist_cjs34(); - var url_parser_1 = require_dist_cjs24(); - var util_base64_1 = require_dist_cjs30(); - var util_utf8_1 = require_dist_cjs10(); - var endpointResolver_1 = require_endpointResolver(); - var getRuntimeConfig = (config) => ({ - apiVersion: "2019-06-10", - base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64, - base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64, - disableHostPrefix: config?.disableHostPrefix ?? false, - endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver, - extensions: config?.extensions ?? [], - logger: config?.logger ?? new smithy_client_1.NoOpLogger(), - serviceId: config?.serviceId ?? "SSO", - urlParser: config?.urlParser ?? url_parser_1.parseUrl, - utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8, - utf8Encoder: config?.utf8Encoder ?? util_utf8_1.toUtf8 - }); - exports2.getRuntimeConfig = getRuntimeConfig; - } -}); - -// ../../../node_modules/@smithy/util-defaults-mode-node/dist-cjs/index.js -var require_dist_cjs43 = __commonJS({ - "../../../node_modules/@smithy/util-defaults-mode-node/dist-cjs/index.js"(exports2, module2) { - var __create2 = Object.create; - var __defProp2 = Object.defineProperty; - var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; - var __getOwnPropNames2 = Object.getOwnPropertyNames; - var __getProtoOf2 = Object.getPrototypeOf; - var __hasOwnProp2 = Object.prototype.hasOwnProperty; - var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); - var __export2 = (target, all) => { - for (var name in all) - __defProp2(target, name, { get: all[name], enumerable: true }); - }; - var __copyProps2 = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames2(from)) - if (!__hasOwnProp2.call(to, key) && key !== except) - __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + return tagname; + } + var attrsRegx = new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`, "gm"); + function buildAttributesMap(attrStr, jPath, tagName) { + if (!this.options.ignoreAttributes && typeof attrStr === "string") { + const matches = util.getAllMatches(attrStr, attrsRegx); + const len = matches.length; + const attrs = {}; + for (let i = 0; i < len; i++) { + const attrName = this.resolveNameSpace(matches[i][1]); + let oldVal = matches[i][4]; + let aName = this.options.attributeNamePrefix + attrName; + if (attrName.length) { + if (this.options.transformAttributeName) { + aName = this.options.transformAttributeName(aName); + } + if (aName === "__proto__") aName = "#__proto__"; + if (oldVal !== void 0) { + if (this.options.trimValues) { + oldVal = oldVal.trim(); + } + oldVal = this.replaceEntitiesValue(oldVal); + const newVal = this.options.attributeValueProcessor(attrName, oldVal, jPath); + if (newVal === null || newVal === void 0) { + attrs[aName] = oldVal; + } else if (typeof newVal !== typeof oldVal || newVal !== oldVal) { + attrs[aName] = newVal; + } else { + attrs[aName] = parseValue( + oldVal, + this.options.parseAttributeValue, + this.options.numberParseOptions + ); + } + } else if (this.options.allowBooleanAttributes) { + attrs[aName] = true; + } + } + } + if (!Object.keys(attrs).length) { + return; + } + if (this.options.attributesGroupName) { + const attrCollection = {}; + attrCollection[this.options.attributesGroupName] = attrs; + return attrCollection; + } + return attrs; + } + } + var parseXml = function(xmlData) { + xmlData = xmlData.replace(/\r\n?/g, "\n"); + const xmlObj = new xmlNode("!xml"); + let currentNode = xmlObj; + let textData = ""; + let jPath = ""; + for (let i = 0; i < xmlData.length; i++) { + const ch = xmlData[i]; + if (ch === "<") { + if (xmlData[i + 1] === "/") { + const closeIndex = findClosingIndex(xmlData, ">", i, "Closing Tag is not closed."); + let tagName = xmlData.substring(i + 2, closeIndex).trim(); + if (this.options.removeNSPrefix) { + const colonIndex = tagName.indexOf(":"); + if (colonIndex !== -1) { + tagName = tagName.substr(colonIndex + 1); + } + } + if (this.options.transformTagName) { + tagName = this.options.transformTagName(tagName); + } + if (currentNode) { + textData = this.saveTextToParentTag(textData, currentNode, jPath); + } + const lastTagName = jPath.substring(jPath.lastIndexOf(".") + 1); + if (tagName && this.options.unpairedTags.indexOf(tagName) !== -1) { + throw new Error(`Unpaired tag can not be used as closing tag: `); + } + let propIndex = 0; + if (lastTagName && this.options.unpairedTags.indexOf(lastTagName) !== -1) { + propIndex = jPath.lastIndexOf(".", jPath.lastIndexOf(".") - 1); + this.tagsNodeStack.pop(); + } else { + propIndex = jPath.lastIndexOf("."); + } + jPath = jPath.substring(0, propIndex); + currentNode = this.tagsNodeStack.pop(); + textData = ""; + i = closeIndex; + } else if (xmlData[i + 1] === "?") { + let tagData = readTagExp(xmlData, i, false, "?>"); + if (!tagData) throw new Error("Pi Tag is not closed."); + textData = this.saveTextToParentTag(textData, currentNode, jPath); + if (this.options.ignoreDeclaration && tagData.tagName === "?xml" || this.options.ignorePiTags) { + } else { + const childNode = new xmlNode(tagData.tagName); + childNode.add(this.options.textNodeName, ""); + if (tagData.tagName !== tagData.tagExp && tagData.attrExpPresent) { + childNode[":@"] = this.buildAttributesMap(tagData.tagExp, jPath, tagData.tagName); + } + this.addChild(currentNode, childNode, jPath); + } + i = tagData.closeIndex + 1; + } else if (xmlData.substr(i + 1, 3) === "!--") { + const endIndex = findClosingIndex(xmlData, "-->", i + 4, "Comment is not closed."); + if (this.options.commentPropName) { + const comment = xmlData.substring(i + 4, endIndex - 2); + textData = this.saveTextToParentTag(textData, currentNode, jPath); + currentNode.add(this.options.commentPropName, [{ [this.options.textNodeName]: comment }]); + } + i = endIndex; + } else if (xmlData.substr(i + 1, 2) === "!D") { + const result = readDocType(xmlData, i); + this.docTypeEntities = result.entities; + i = result.i; + } else if (xmlData.substr(i + 1, 2) === "![") { + const closeIndex = findClosingIndex(xmlData, "]]>", i, "CDATA is not closed.") - 2; + const tagExp = xmlData.substring(i + 9, closeIndex); + textData = this.saveTextToParentTag(textData, currentNode, jPath); + let val2 = this.parseTextData(tagExp, currentNode.tagname, jPath, true, false, true, true); + if (val2 == void 0) val2 = ""; + if (this.options.cdataPropName) { + currentNode.add(this.options.cdataPropName, [{ [this.options.textNodeName]: tagExp }]); + } else { + currentNode.add(this.options.textNodeName, val2); + } + i = closeIndex + 2; + } else { + let result = readTagExp(xmlData, i, this.options.removeNSPrefix); + let tagName = result.tagName; + const rawTagName = result.rawTagName; + let tagExp = result.tagExp; + let attrExpPresent = result.attrExpPresent; + let closeIndex = result.closeIndex; + if (this.options.transformTagName) { + tagName = this.options.transformTagName(tagName); + } + if (currentNode && textData) { + if (currentNode.tagname !== "!xml") { + textData = this.saveTextToParentTag(textData, currentNode, jPath, false); + } + } + const lastTag = currentNode; + if (lastTag && this.options.unpairedTags.indexOf(lastTag.tagname) !== -1) { + currentNode = this.tagsNodeStack.pop(); + jPath = jPath.substring(0, jPath.lastIndexOf(".")); + } + if (tagName !== xmlObj.tagname) { + jPath += jPath ? "." + tagName : tagName; + } + if (this.isItStopNode(this.options.stopNodes, jPath, tagName)) { + let tagContent = ""; + if (tagExp.length > 0 && tagExp.lastIndexOf("/") === tagExp.length - 1) { + if (tagName[tagName.length - 1] === "/") { + tagName = tagName.substr(0, tagName.length - 1); + jPath = jPath.substr(0, jPath.length - 1); + tagExp = tagName; + } else { + tagExp = tagExp.substr(0, tagExp.length - 1); + } + i = result.closeIndex; + } else if (this.options.unpairedTags.indexOf(tagName) !== -1) { + i = result.closeIndex; + } else { + const result2 = this.readStopNodeData(xmlData, rawTagName, closeIndex + 1); + if (!result2) throw new Error(`Unexpected end of ${rawTagName}`); + i = result2.i; + tagContent = result2.tagContent; + } + const childNode = new xmlNode(tagName); + if (tagName !== tagExp && attrExpPresent) { + childNode[":@"] = this.buildAttributesMap(tagExp, jPath, tagName); + } + if (tagContent) { + tagContent = this.parseTextData(tagContent, tagName, jPath, true, attrExpPresent, true, true); + } + jPath = jPath.substr(0, jPath.lastIndexOf(".")); + childNode.add(this.options.textNodeName, tagContent); + this.addChild(currentNode, childNode, jPath); + } else { + if (tagExp.length > 0 && tagExp.lastIndexOf("/") === tagExp.length - 1) { + if (tagName[tagName.length - 1] === "/") { + tagName = tagName.substr(0, tagName.length - 1); + jPath = jPath.substr(0, jPath.length - 1); + tagExp = tagName; + } else { + tagExp = tagExp.substr(0, tagExp.length - 1); + } + if (this.options.transformTagName) { + tagName = this.options.transformTagName(tagName); + } + const childNode = new xmlNode(tagName); + if (tagName !== tagExp && attrExpPresent) { + childNode[":@"] = this.buildAttributesMap(tagExp, jPath, tagName); + } + this.addChild(currentNode, childNode, jPath); + jPath = jPath.substr(0, jPath.lastIndexOf(".")); + } else { + const childNode = new xmlNode(tagName); + this.tagsNodeStack.push(currentNode); + if (tagName !== tagExp && attrExpPresent) { + childNode[":@"] = this.buildAttributesMap(tagExp, jPath, tagName); + } + this.addChild(currentNode, childNode, jPath); + currentNode = childNode; + } + textData = ""; + i = closeIndex; + } + } + } else { + textData += xmlData[i]; + } } - return to; + return xmlObj.child; }; - var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2( - // If the importer is in node compatibility mode or this is not an ESM - // file that has been converted to a CommonJS file using a Babel- - // compatible transform (i.e. "__esModule" has not been set), then set - // "default" to the CommonJS "module.exports" for node compatibility. - isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target, - mod - )); - var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); - var src_exports = {}; - __export2(src_exports, { - resolveDefaultsModeConfig: () => resolveDefaultsModeConfig - }); - module2.exports = __toCommonJS2(src_exports); - var import_config_resolver = require_dist_cjs19(); - var import_node_config_provider = require_dist_cjs22(); - var import_property_provider = require_dist_cjs6(); - var AWS_EXECUTION_ENV = "AWS_EXECUTION_ENV"; - var AWS_REGION_ENV = "AWS_REGION"; - var AWS_DEFAULT_REGION_ENV = "AWS_DEFAULT_REGION"; - var ENV_IMDS_DISABLED = "AWS_EC2_METADATA_DISABLED"; - var DEFAULTS_MODE_OPTIONS = ["in-region", "cross-region", "mobile", "standard", "legacy"]; - var IMDS_REGION_PATH = "/latest/meta-data/placement/region"; - var AWS_DEFAULTS_MODE_ENV = "AWS_DEFAULTS_MODE"; - var AWS_DEFAULTS_MODE_CONFIG = "defaults_mode"; - var NODE_DEFAULTS_MODE_CONFIG_OPTIONS = { - environmentVariableSelector: (env) => { - return env[AWS_DEFAULTS_MODE_ENV]; - }, - configFileSelector: (profile) => { - return profile[AWS_DEFAULTS_MODE_CONFIG]; - }, - default: "legacy" + function addChild(currentNode, childNode, jPath) { + const result = this.options.updateTag(childNode.tagname, jPath, childNode[":@"]); + if (result === false) { + } else if (typeof result === "string") { + childNode.tagname = result; + currentNode.addChild(childNode); + } else { + currentNode.addChild(childNode); + } + } + var replaceEntitiesValue = function(val2) { + if (this.options.processEntities) { + for (let entityName2 in this.docTypeEntities) { + const entity = this.docTypeEntities[entityName2]; + val2 = val2.replace(entity.regx, entity.val); + } + for (let entityName2 in this.lastEntities) { + const entity = this.lastEntities[entityName2]; + val2 = val2.replace(entity.regex, entity.val); + } + if (this.options.htmlEntities) { + for (let entityName2 in this.htmlEntities) { + const entity = this.htmlEntities[entityName2]; + val2 = val2.replace(entity.regex, entity.val); + } + } + val2 = val2.replace(this.ampEntity.regex, this.ampEntity.val); + } + return val2; }; - var resolveDefaultsModeConfig = /* @__PURE__ */ __name(({ - region = (0, import_node_config_provider.loadConfig)(import_config_resolver.NODE_REGION_CONFIG_OPTIONS), - defaultsMode = (0, import_node_config_provider.loadConfig)(NODE_DEFAULTS_MODE_CONFIG_OPTIONS) - } = {}) => (0, import_property_provider.memoize)(async () => { - const mode = typeof defaultsMode === "function" ? await defaultsMode() : defaultsMode; - switch (mode == null ? void 0 : mode.toLowerCase()) { - case "auto": - return resolveNodeDefaultsModeAuto(region); - case "in-region": - case "cross-region": - case "mobile": - case "standard": - case "legacy": - return Promise.resolve(mode == null ? void 0 : mode.toLocaleLowerCase()); - case void 0: - return Promise.resolve("legacy"); - default: - throw new Error( - `Invalid parameter for "defaultsMode", expect ${DEFAULTS_MODE_OPTIONS.join(", ")}, got ${mode}` - ); + function saveTextToParentTag(textData, currentNode, jPath, isLeafNode) { + if (textData) { + if (isLeafNode === void 0) isLeafNode = Object.keys(currentNode.child).length === 0; + textData = this.parseTextData( + textData, + currentNode.tagname, + jPath, + false, + currentNode[":@"] ? Object.keys(currentNode[":@"]).length !== 0 : false, + isLeafNode + ); + if (textData !== void 0 && textData !== "") + currentNode.add(this.options.textNodeName, textData); + textData = ""; } - }), "resolveDefaultsModeConfig"); - var resolveNodeDefaultsModeAuto = /* @__PURE__ */ __name(async (clientRegion) => { - if (clientRegion) { - const resolvedRegion = typeof clientRegion === "function" ? await clientRegion() : clientRegion; - const inferredRegion = await inferPhysicalRegion(); - if (!inferredRegion) { - return "standard"; + return textData; + } + function isItStopNode(stopNodes, jPath, currentTagName) { + const allNodesExp = "*." + currentTagName; + for (const stopNodePath in stopNodes) { + const stopNodeExp = stopNodes[stopNodePath]; + if (allNodesExp === stopNodeExp || jPath === stopNodeExp) return true; + } + return false; + } + function tagExpWithClosingIndex(xmlData, i, closingChar = ">") { + let attrBoundary; + let tagExp = ""; + for (let index = i; index < xmlData.length; index++) { + let ch = xmlData[index]; + if (attrBoundary) { + if (ch === attrBoundary) attrBoundary = ""; + } else if (ch === '"' || ch === "'") { + attrBoundary = ch; + } else if (ch === closingChar[0]) { + if (closingChar[1]) { + if (xmlData[index + 1] === closingChar[1]) { + return { + data: tagExp, + index + }; + } + } else { + return { + data: tagExp, + index + }; + } + } else if (ch === " ") { + ch = " "; } - if (resolvedRegion === inferredRegion) { - return "in-region"; - } else { - return "cross-region"; + tagExp += ch; + } + } + function findClosingIndex(xmlData, str, i, errMsg) { + const closingIndex = xmlData.indexOf(str, i); + if (closingIndex === -1) { + throw new Error(errMsg); + } else { + return closingIndex + str.length - 1; + } + } + function readTagExp(xmlData, i, removeNSPrefix, closingChar = ">") { + const result = tagExpWithClosingIndex(xmlData, i + 1, closingChar); + if (!result) return; + let tagExp = result.data; + const closeIndex = result.index; + const separatorIndex = tagExp.search(/\s/); + let tagName = tagExp; + let attrExpPresent = true; + if (separatorIndex !== -1) { + tagName = tagExp.substring(0, separatorIndex); + tagExp = tagExp.substring(separatorIndex + 1).trimStart(); + } + const rawTagName = tagName; + if (removeNSPrefix) { + const colonIndex = tagName.indexOf(":"); + if (colonIndex !== -1) { + tagName = tagName.substr(colonIndex + 1); + attrExpPresent = tagName !== result.data.substr(colonIndex + 1); } } - return "standard"; - }, "resolveNodeDefaultsModeAuto"); - var inferPhysicalRegion = /* @__PURE__ */ __name(async () => { - if (process.env[AWS_EXECUTION_ENV] && (process.env[AWS_REGION_ENV] || process.env[AWS_DEFAULT_REGION_ENV])) { - return process.env[AWS_REGION_ENV] ?? process.env[AWS_DEFAULT_REGION_ENV]; + return { + tagName, + tagExp, + closeIndex, + attrExpPresent, + rawTagName + }; + } + function readStopNodeData(xmlData, tagName, i) { + const startIndex = i; + let openTagCount = 1; + for (; i < xmlData.length; i++) { + if (xmlData[i] === "<") { + if (xmlData[i + 1] === "/") { + const closeIndex = findClosingIndex(xmlData, ">", i, `${tagName} is not closed`); + let closeTagName = xmlData.substring(i + 2, closeIndex).trim(); + if (closeTagName === tagName) { + openTagCount--; + if (openTagCount === 0) { + return { + tagContent: xmlData.substring(startIndex, i), + i: closeIndex + }; + } + } + i = closeIndex; + } else if (xmlData[i + 1] === "?") { + const closeIndex = findClosingIndex(xmlData, "?>", i + 1, "StopNode is not closed."); + i = closeIndex; + } else if (xmlData.substr(i + 1, 3) === "!--") { + const closeIndex = findClosingIndex(xmlData, "-->", i + 3, "StopNode is not closed."); + i = closeIndex; + } else if (xmlData.substr(i + 1, 2) === "![") { + const closeIndex = findClosingIndex(xmlData, "]]>", i, "StopNode is not closed.") - 2; + i = closeIndex; + } else { + const tagData = readTagExp(xmlData, i, ">"); + if (tagData) { + const openTagName = tagData && tagData.tagName; + if (openTagName === tagName && tagData.tagExp[tagData.tagExp.length - 1] !== "/") { + openTagCount++; + } + i = tagData.closeIndex; + } + } + } } - if (!process.env[ENV_IMDS_DISABLED]) { - try { - const { getInstanceMetadataEndpoint, httpRequest } = await Promise.resolve().then(() => __toESM2(require_dist_cjs38())); - const endpoint = await getInstanceMetadataEndpoint(); - return (await httpRequest({ ...endpoint, path: IMDS_REGION_PATH })).toString(); - } catch (e) { + } + function parseValue(val2, shouldParse, options) { + if (shouldParse && typeof val2 === "string") { + const newval = val2.trim(); + if (newval === "true") return true; + else if (newval === "false") return false; + else return toNumber(val2, options); + } else { + if (util.isExist(val2)) { + return val2; + } else { + return ""; } } - }, "inferPhysicalRegion"); - } -}); - -// ../../../node_modules/@aws-sdk/client-sso/dist-cjs/runtimeConfig.js -var require_runtimeConfig = __commonJS({ - "../../../node_modules/@aws-sdk/client-sso/dist-cjs/runtimeConfig.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getRuntimeConfig = void 0; - var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); - var package_json_1 = tslib_1.__importDefault(require_package3()); - var util_user_agent_node_1 = require_dist_cjs40(); - var config_resolver_1 = require_dist_cjs19(); - var hash_node_1 = require_dist_cjs41(); - var middleware_retry_1 = require_dist_cjs35(); - var node_config_provider_1 = require_dist_cjs22(); - var node_http_handler_1 = require_dist_cjs32(); - var util_body_length_node_1 = require_dist_cjs42(); - var util_retry_1 = require_dist_cjs28(); - var runtimeConfig_shared_1 = require_runtimeConfig_shared(); - var smithy_client_1 = require_dist_cjs34(); - var util_defaults_mode_node_1 = require_dist_cjs43(); - var smithy_client_2 = require_dist_cjs34(); - var getRuntimeConfig = (config) => { - (0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version); - const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config); - const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode); - const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config); - return { - ...clientSharedValues, - ...config, - runtime: "node", - defaultsMode, - bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength, - defaultUserAgentProvider: config?.defaultUserAgentProvider ?? (0, util_user_agent_node_1.defaultUserAgent)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }), - maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS), - region: config?.region ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new node_http_handler_1.NodeHttpHandler(defaultConfigProvider), - retryMode: config?.retryMode ?? (0, node_config_provider_1.loadConfig)({ - ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS, - default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE - }), - sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, "sha256"), - streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector, - useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), - useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS) - }; - }; - exports2.getRuntimeConfig = getRuntimeConfig; + } + module2.exports = OrderedObjParser; } }); -// ../../../node_modules/@aws-sdk/region-config-resolver/dist-cjs/extensions/index.js -var require_extensions2 = __commonJS({ - "../../../node_modules/@aws-sdk/region-config-resolver/dist-cjs/extensions/index.js"(exports2) { +// ../../../node_modules/fast-xml-parser/src/xmlparser/node2json.js +var require_node2json = __commonJS({ + "../../../node_modules/fast-xml-parser/src/xmlparser/node2json.js"(exports2) { "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.resolveAwsRegionExtensionConfiguration = exports2.getAwsRegionExtensionConfiguration = void 0; - var getAwsRegionExtensionConfiguration = (runtimeConfig) => { - let runtimeConfigRegion = async () => { - if (runtimeConfig.region === void 0) { - throw new Error("Region is missing from runtimeConfig"); - } - const region = runtimeConfig.region; - if (typeof region === "string") { - return region; - } - return region(); - }; - return { - setRegion(region) { - runtimeConfigRegion = region; - }, - region() { - return runtimeConfigRegion; + function prettify(node, options) { + return compress(node, options); + } + function compress(arr, options, jPath) { + let text; + const compressedObj = {}; + for (let i = 0; i < arr.length; i++) { + const tagObj = arr[i]; + const property = propName(tagObj); + let newJpath = ""; + if (jPath === void 0) newJpath = property; + else newJpath = jPath + "." + property; + if (property === options.textNodeName) { + if (text === void 0) text = tagObj[property]; + else text += "" + tagObj[property]; + } else if (property === void 0) { + continue; + } else if (tagObj[property]) { + let val2 = compress(tagObj[property], options, newJpath); + const isLeaf = isLeafTag(val2, options); + if (tagObj[":@"]) { + assignAttributes(val2, tagObj[":@"], newJpath, options); + } else if (Object.keys(val2).length === 1 && val2[options.textNodeName] !== void 0 && !options.alwaysCreateTextNode) { + val2 = val2[options.textNodeName]; + } else if (Object.keys(val2).length === 0) { + if (options.alwaysCreateTextNode) val2[options.textNodeName] = ""; + else val2 = ""; + } + if (compressedObj[property] !== void 0 && compressedObj.hasOwnProperty(property)) { + if (!Array.isArray(compressedObj[property])) { + compressedObj[property] = [compressedObj[property]]; + } + compressedObj[property].push(val2); + } else { + if (options.isArray(property, newJpath, isLeaf)) { + compressedObj[property] = [val2]; + } else { + compressedObj[property] = val2; + } + } } - }; - }; - exports2.getAwsRegionExtensionConfiguration = getAwsRegionExtensionConfiguration; - var resolveAwsRegionExtensionConfiguration = (awsRegionExtensionConfiguration) => { - return { - region: awsRegionExtensionConfiguration.region() - }; - }; - exports2.resolveAwsRegionExtensionConfiguration = resolveAwsRegionExtensionConfiguration; - } -}); - -// ../../../node_modules/@aws-sdk/region-config-resolver/dist-cjs/regionConfig/config.js -var require_config = __commonJS({ - "../../../node_modules/@aws-sdk/region-config-resolver/dist-cjs/regionConfig/config.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.NODE_REGION_CONFIG_FILE_OPTIONS = exports2.NODE_REGION_CONFIG_OPTIONS = exports2.REGION_INI_NAME = exports2.REGION_ENV_NAME = void 0; - exports2.REGION_ENV_NAME = "AWS_REGION"; - exports2.REGION_INI_NAME = "region"; - exports2.NODE_REGION_CONFIG_OPTIONS = { - environmentVariableSelector: (env) => env[exports2.REGION_ENV_NAME], - configFileSelector: (profile) => profile[exports2.REGION_INI_NAME], - default: () => { - throw new Error("Region is missing"); } - }; - exports2.NODE_REGION_CONFIG_FILE_OPTIONS = { - preferredFile: "credentials" - }; - } -}); - -// ../../../node_modules/@aws-sdk/region-config-resolver/dist-cjs/regionConfig/isFipsRegion.js -var require_isFipsRegion = __commonJS({ - "../../../node_modules/@aws-sdk/region-config-resolver/dist-cjs/regionConfig/isFipsRegion.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.isFipsRegion = void 0; - var isFipsRegion = (region) => typeof region === "string" && (region.startsWith("fips-") || region.endsWith("-fips")); - exports2.isFipsRegion = isFipsRegion; - } -}); - -// ../../../node_modules/@aws-sdk/region-config-resolver/dist-cjs/regionConfig/getRealRegion.js -var require_getRealRegion = __commonJS({ - "../../../node_modules/@aws-sdk/region-config-resolver/dist-cjs/regionConfig/getRealRegion.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getRealRegion = void 0; - var isFipsRegion_1 = require_isFipsRegion(); - var getRealRegion = (region) => (0, isFipsRegion_1.isFipsRegion)(region) ? ["fips-aws-global", "aws-fips"].includes(region) ? "us-east-1" : region.replace(/fips-(dkr-|prod-)?|-fips/, "") : region; - exports2.getRealRegion = getRealRegion; - } -}); - -// ../../../node_modules/@aws-sdk/region-config-resolver/dist-cjs/regionConfig/resolveRegionConfig.js -var require_resolveRegionConfig = __commonJS({ - "../../../node_modules/@aws-sdk/region-config-resolver/dist-cjs/regionConfig/resolveRegionConfig.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.resolveRegionConfig = void 0; - var getRealRegion_1 = require_getRealRegion(); - var isFipsRegion_1 = require_isFipsRegion(); - var resolveRegionConfig = (input) => { - const { region, useFipsEndpoint } = input; - if (!region) { - throw new Error("Region is missing"); + if (typeof text === "string") { + if (text.length > 0) compressedObj[options.textNodeName] = text; + } else if (text !== void 0) compressedObj[options.textNodeName] = text; + return compressedObj; + } + function propName(obj) { + const keys = Object.keys(obj); + for (let i = 0; i < keys.length; i++) { + const key = keys[i]; + if (key !== ":@") return key; } - return { - ...input, - region: async () => { - if (typeof region === "string") { - return (0, getRealRegion_1.getRealRegion)(region); - } - const providedRegion = await region(); - return (0, getRealRegion_1.getRealRegion)(providedRegion); - }, - useFipsEndpoint: async () => { - const providedRegion = typeof region === "string" ? region : await region(); - if ((0, isFipsRegion_1.isFipsRegion)(providedRegion)) { - return true; + } + function assignAttributes(obj, attrMap, jpath, options) { + if (attrMap) { + const keys = Object.keys(attrMap); + const len = keys.length; + for (let i = 0; i < len; i++) { + const atrrName = keys[i]; + if (options.isArray(atrrName, jpath + "." + atrrName, true, true)) { + obj[atrrName] = [attrMap[atrrName]]; + } else { + obj[atrrName] = attrMap[atrrName]; } - return typeof useFipsEndpoint !== "function" ? Promise.resolve(!!useFipsEndpoint) : useFipsEndpoint(); } - }; - }; - exports2.resolveRegionConfig = resolveRegionConfig; - } -}); - -// ../../../node_modules/@aws-sdk/region-config-resolver/dist-cjs/regionConfig/index.js -var require_regionConfig = __commonJS({ - "../../../node_modules/@aws-sdk/region-config-resolver/dist-cjs/regionConfig/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); - tslib_1.__exportStar(require_config(), exports2); - tslib_1.__exportStar(require_resolveRegionConfig(), exports2); - } -}); - -// ../../../node_modules/@aws-sdk/region-config-resolver/dist-cjs/index.js -var require_dist_cjs44 = __commonJS({ - "../../../node_modules/@aws-sdk/region-config-resolver/dist-cjs/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); - tslib_1.__exportStar(require_extensions2(), exports2); - tslib_1.__exportStar(require_regionConfig(), exports2); - } -}); - -// ../../../node_modules/@aws-sdk/client-sso/dist-cjs/runtimeExtensions.js -var require_runtimeExtensions = __commonJS({ - "../../../node_modules/@aws-sdk/client-sso/dist-cjs/runtimeExtensions.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.resolveRuntimeExtensions = void 0; - var region_config_resolver_1 = require_dist_cjs44(); - var protocol_http_1 = require_dist_cjs2(); - var smithy_client_1 = require_dist_cjs34(); - var asPartial = (t) => t; - var resolveRuntimeExtensions = (runtimeConfig, extensions) => { - const extensionConfiguration = { - ...asPartial((0, region_config_resolver_1.getAwsRegionExtensionConfiguration)(runtimeConfig)), - ...asPartial((0, smithy_client_1.getDefaultExtensionConfiguration)(runtimeConfig)), - ...asPartial((0, protocol_http_1.getHttpHandlerExtensionConfiguration)(runtimeConfig)) - }; - extensions.forEach((extension) => extension.configure(extensionConfiguration)); - return { - ...runtimeConfig, - ...(0, region_config_resolver_1.resolveAwsRegionExtensionConfiguration)(extensionConfiguration), - ...(0, smithy_client_1.resolveDefaultRuntimeConfig)(extensionConfiguration), - ...(0, protocol_http_1.resolveHttpHandlerRuntimeConfig)(extensionConfiguration) - }; - }; - exports2.resolveRuntimeExtensions = resolveRuntimeExtensions; - } -}); - -// ../../../node_modules/@aws-sdk/client-sso/dist-cjs/SSOClient.js -var require_SSOClient = __commonJS({ - "../../../node_modules/@aws-sdk/client-sso/dist-cjs/SSOClient.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.SSOClient = exports2.__Client = void 0; - var middleware_host_header_1 = require_dist_cjs3(); - var middleware_logger_1 = require_dist_cjs4(); - var middleware_recursion_detection_1 = require_dist_cjs5(); - var middleware_user_agent_1 = require_dist_cjs17(); - var config_resolver_1 = require_dist_cjs19(); - var middleware_content_length_1 = require_dist_cjs20(); - var middleware_endpoint_1 = require_dist_cjs26(); - var middleware_retry_1 = require_dist_cjs35(); - var smithy_client_1 = require_dist_cjs34(); - Object.defineProperty(exports2, "__Client", { enumerable: true, get: function() { - return smithy_client_1.Client; - } }); - var EndpointParameters_1 = require_EndpointParameters3(); - var runtimeConfig_1 = require_runtimeConfig(); - var runtimeExtensions_1 = require_runtimeExtensions(); - var SSOClient = class extends smithy_client_1.Client { - constructor(...[configuration]) { - const _config_0 = (0, runtimeConfig_1.getRuntimeConfig)(configuration || {}); - const _config_1 = (0, EndpointParameters_1.resolveClientEndpointParameters)(_config_0); - const _config_2 = (0, config_resolver_1.resolveRegionConfig)(_config_1); - const _config_3 = (0, middleware_endpoint_1.resolveEndpointConfig)(_config_2); - const _config_4 = (0, middleware_retry_1.resolveRetryConfig)(_config_3); - const _config_5 = (0, middleware_host_header_1.resolveHostHeaderConfig)(_config_4); - const _config_6 = (0, middleware_user_agent_1.resolveUserAgentConfig)(_config_5); - const _config_7 = (0, runtimeExtensions_1.resolveRuntimeExtensions)(_config_6, configuration?.extensions || []); - super(_config_7); - this.config = _config_7; - this.middlewareStack.use((0, middleware_retry_1.getRetryPlugin)(this.config)); - this.middlewareStack.use((0, middleware_content_length_1.getContentLengthPlugin)(this.config)); - this.middlewareStack.use((0, middleware_host_header_1.getHostHeaderPlugin)(this.config)); - this.middlewareStack.use((0, middleware_logger_1.getLoggerPlugin)(this.config)); - this.middlewareStack.use((0, middleware_recursion_detection_1.getRecursionDetectionPlugin)(this.config)); - this.middlewareStack.use((0, middleware_user_agent_1.getUserAgentPlugin)(this.config)); } - destroy() { - super.destroy(); + } + function isLeafTag(obj, options) { + const { textNodeName } = options; + const propCount = Object.keys(obj).length; + if (propCount === 0) { + return true; } - }; - exports2.SSOClient = SSOClient; + if (propCount === 1 && (obj[textNodeName] || typeof obj[textNodeName] === "boolean" || obj[textNodeName] === 0)) { + return true; + } + return false; + } + exports2.prettify = prettify; } }); -// ../../../node_modules/@aws-sdk/client-sso/dist-cjs/models/SSOServiceException.js -var require_SSOServiceException = __commonJS({ - "../../../node_modules/@aws-sdk/client-sso/dist-cjs/models/SSOServiceException.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.SSOServiceException = exports2.__ServiceException = void 0; - var smithy_client_1 = require_dist_cjs34(); - Object.defineProperty(exports2, "__ServiceException", { enumerable: true, get: function() { - return smithy_client_1.ServiceException; - } }); - var SSOServiceException = class _SSOServiceException extends smithy_client_1.ServiceException { +// ../../../node_modules/fast-xml-parser/src/xmlparser/XMLParser.js +var require_XMLParser = __commonJS({ + "../../../node_modules/fast-xml-parser/src/xmlparser/XMLParser.js"(exports2, module2) { + var { buildOptions } = require_OptionsBuilder(); + var OrderedObjParser = require_OrderedObjParser(); + var { prettify } = require_node2json(); + var validator = require_validator(); + var XMLParser2 = class { constructor(options) { - super(options); - Object.setPrototypeOf(this, _SSOServiceException.prototype); + this.externalEntities = {}; + this.options = buildOptions(options); + } + /** + * Parse XML dats to JS object + * @param {string|Buffer} xmlData + * @param {boolean|Object} validationOption + */ + parse(xmlData, validationOption) { + if (typeof xmlData === "string") { + } else if (xmlData.toString) { + xmlData = xmlData.toString(); + } else { + throw new Error("XML data is accepted in String or Bytes[] form."); + } + if (validationOption) { + if (validationOption === true) validationOption = {}; + const result = validator.validate(xmlData, validationOption); + if (result !== true) { + throw Error(`${result.err.msg}:${result.err.line}:${result.err.col}`); + } + } + const orderedObjParser = new OrderedObjParser(this.options); + orderedObjParser.addExternalEntities(this.externalEntities); + const orderedResult = orderedObjParser.parseXml(xmlData); + if (this.options.preserveOrder || orderedResult === void 0) return orderedResult; + else return prettify(orderedResult, this.options); + } + /** + * Add Entity which is not by default supported by this library + * @param {string} key + * @param {string} value + */ + addEntity(key, value) { + if (value.indexOf("&") !== -1) { + throw new Error("Entity value can't have '&'"); + } else if (key.indexOf("&") !== -1 || key.indexOf(";") !== -1) { + throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for ' '"); + } else if (value === "&") { + throw new Error("An entity with value '&' is not permitted"); + } else { + this.externalEntities[key] = value; + } } }; - exports2.SSOServiceException = SSOServiceException; + module2.exports = XMLParser2; } }); -// ../../../node_modules/@aws-sdk/client-sso/dist-cjs/models/models_0.js -var require_models_02 = __commonJS({ - "../../../node_modules/@aws-sdk/client-sso/dist-cjs/models/models_0.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.LogoutRequestFilterSensitiveLog = exports2.ListAccountsRequestFilterSensitiveLog = exports2.ListAccountRolesRequestFilterSensitiveLog = exports2.GetRoleCredentialsResponseFilterSensitiveLog = exports2.RoleCredentialsFilterSensitiveLog = exports2.GetRoleCredentialsRequestFilterSensitiveLog = exports2.UnauthorizedException = exports2.TooManyRequestsException = exports2.ResourceNotFoundException = exports2.InvalidRequestException = void 0; - var smithy_client_1 = require_dist_cjs34(); - var SSOServiceException_1 = require_SSOServiceException(); - var InvalidRequestException = class _InvalidRequestException extends SSOServiceException_1.SSOServiceException { - constructor(opts) { - super({ - name: "InvalidRequestException", - $fault: "client", - ...opts - }); - this.name = "InvalidRequestException"; - this.$fault = "client"; - Object.setPrototypeOf(this, _InvalidRequestException.prototype); +// ../../../node_modules/fast-xml-parser/src/xmlbuilder/orderedJs2Xml.js +var require_orderedJs2Xml = __commonJS({ + "../../../node_modules/fast-xml-parser/src/xmlbuilder/orderedJs2Xml.js"(exports2, module2) { + var EOL = "\n"; + function toXml(jArray, options) { + let indentation = ""; + if (options.format && options.indentBy.length > 0) { + indentation = EOL; } - }; - exports2.InvalidRequestException = InvalidRequestException; - var ResourceNotFoundException = class _ResourceNotFoundException extends SSOServiceException_1.SSOServiceException { - constructor(opts) { - super({ - name: "ResourceNotFoundException", - $fault: "client", - ...opts - }); - this.name = "ResourceNotFoundException"; - this.$fault = "client"; - Object.setPrototypeOf(this, _ResourceNotFoundException.prototype); + return arrToStr(jArray, options, "", indentation); + } + function arrToStr(arr, options, jPath, indentation) { + let xmlStr = ""; + let isPreviousElementTag = false; + for (let i = 0; i < arr.length; i++) { + const tagObj = arr[i]; + const tagName = propName(tagObj); + if (tagName === void 0) continue; + let newJPath = ""; + if (jPath.length === 0) newJPath = tagName; + else newJPath = `${jPath}.${tagName}`; + if (tagName === options.textNodeName) { + let tagText = tagObj[tagName]; + if (!isStopNode(newJPath, options)) { + tagText = options.tagValueProcessor(tagName, tagText); + tagText = replaceEntitiesValue(tagText, options); + } + if (isPreviousElementTag) { + xmlStr += indentation; + } + xmlStr += tagText; + isPreviousElementTag = false; + continue; + } else if (tagName === options.cdataPropName) { + if (isPreviousElementTag) { + xmlStr += indentation; + } + xmlStr += ``; + isPreviousElementTag = false; + continue; + } else if (tagName === options.commentPropName) { + xmlStr += indentation + ``; + isPreviousElementTag = true; + continue; + } else if (tagName[0] === "?") { + const attStr2 = attr_to_str(tagObj[":@"], options); + const tempInd = tagName === "?xml" ? "" : indentation; + let piTextNodeName = tagObj[tagName][0][options.textNodeName]; + piTextNodeName = piTextNodeName.length !== 0 ? " " + piTextNodeName : ""; + xmlStr += tempInd + `<${tagName}${piTextNodeName}${attStr2}?>`; + isPreviousElementTag = true; + continue; + } + let newIdentation = indentation; + if (newIdentation !== "") { + newIdentation += options.indentBy; + } + const attStr = attr_to_str(tagObj[":@"], options); + const tagStart = indentation + `<${tagName}${attStr}`; + const tagValue = arrToStr(tagObj[tagName], options, newJPath, newIdentation); + if (options.unpairedTags.indexOf(tagName) !== -1) { + if (options.suppressUnpairedNode) xmlStr += tagStart + ">"; + else xmlStr += tagStart + "/>"; + } else if ((!tagValue || tagValue.length === 0) && options.suppressEmptyNode) { + xmlStr += tagStart + "/>"; + } else if (tagValue && tagValue.endsWith(">")) { + xmlStr += tagStart + `>${tagValue}${indentation}`; + } else { + xmlStr += tagStart + ">"; + if (tagValue && indentation !== "" && (tagValue.includes("/>") || tagValue.includes("`; + } + isPreviousElementTag = true; } - }; - exports2.ResourceNotFoundException = ResourceNotFoundException; - var TooManyRequestsException = class _TooManyRequestsException extends SSOServiceException_1.SSOServiceException { - constructor(opts) { - super({ - name: "TooManyRequestsException", - $fault: "client", - ...opts - }); - this.name = "TooManyRequestsException"; - this.$fault = "client"; - Object.setPrototypeOf(this, _TooManyRequestsException.prototype); + return xmlStr; + } + function propName(obj) { + const keys = Object.keys(obj); + for (let i = 0; i < keys.length; i++) { + const key = keys[i]; + if (!obj.hasOwnProperty(key)) continue; + if (key !== ":@") return key; } - }; - exports2.TooManyRequestsException = TooManyRequestsException; - var UnauthorizedException = class _UnauthorizedException extends SSOServiceException_1.SSOServiceException { - constructor(opts) { - super({ - name: "UnauthorizedException", - $fault: "client", - ...opts - }); - this.name = "UnauthorizedException"; - this.$fault = "client"; - Object.setPrototypeOf(this, _UnauthorizedException.prototype); + } + function attr_to_str(attrMap, options) { + let attrStr = ""; + if (attrMap && !options.ignoreAttributes) { + for (let attr in attrMap) { + if (!attrMap.hasOwnProperty(attr)) continue; + let attrVal = options.attributeValueProcessor(attr, attrMap[attr]); + attrVal = replaceEntitiesValue(attrVal, options); + if (attrVal === true && options.suppressBooleanAttributes) { + attrStr += ` ${attr.substr(options.attributeNamePrefix.length)}`; + } else { + attrStr += ` ${attr.substr(options.attributeNamePrefix.length)}="${attrVal}"`; + } + } } - }; - exports2.UnauthorizedException = UnauthorizedException; - var GetRoleCredentialsRequestFilterSensitiveLog = (obj) => ({ - ...obj, - ...obj.accessToken && { accessToken: smithy_client_1.SENSITIVE_STRING } - }); - exports2.GetRoleCredentialsRequestFilterSensitiveLog = GetRoleCredentialsRequestFilterSensitiveLog; - var RoleCredentialsFilterSensitiveLog = (obj) => ({ - ...obj, - ...obj.secretAccessKey && { secretAccessKey: smithy_client_1.SENSITIVE_STRING }, - ...obj.sessionToken && { sessionToken: smithy_client_1.SENSITIVE_STRING } - }); - exports2.RoleCredentialsFilterSensitiveLog = RoleCredentialsFilterSensitiveLog; - var GetRoleCredentialsResponseFilterSensitiveLog = (obj) => ({ - ...obj, - ...obj.roleCredentials && { roleCredentials: (0, exports2.RoleCredentialsFilterSensitiveLog)(obj.roleCredentials) } - }); - exports2.GetRoleCredentialsResponseFilterSensitiveLog = GetRoleCredentialsResponseFilterSensitiveLog; - var ListAccountRolesRequestFilterSensitiveLog = (obj) => ({ - ...obj, - ...obj.accessToken && { accessToken: smithy_client_1.SENSITIVE_STRING } - }); - exports2.ListAccountRolesRequestFilterSensitiveLog = ListAccountRolesRequestFilterSensitiveLog; - var ListAccountsRequestFilterSensitiveLog = (obj) => ({ - ...obj, - ...obj.accessToken && { accessToken: smithy_client_1.SENSITIVE_STRING } - }); - exports2.ListAccountsRequestFilterSensitiveLog = ListAccountsRequestFilterSensitiveLog; - var LogoutRequestFilterSensitiveLog = (obj) => ({ - ...obj, - ...obj.accessToken && { accessToken: smithy_client_1.SENSITIVE_STRING } - }); - exports2.LogoutRequestFilterSensitiveLog = LogoutRequestFilterSensitiveLog; - } -}); - -// ../../../node_modules/@aws-sdk/client-sso/dist-cjs/protocols/Aws_restJson1.js -var require_Aws_restJson1 = __commonJS({ - "../../../node_modules/@aws-sdk/client-sso/dist-cjs/protocols/Aws_restJson1.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.de_LogoutCommand = exports2.de_ListAccountsCommand = exports2.de_ListAccountRolesCommand = exports2.de_GetRoleCredentialsCommand = exports2.se_LogoutCommand = exports2.se_ListAccountsCommand = exports2.se_ListAccountRolesCommand = exports2.se_GetRoleCredentialsCommand = void 0; - var protocol_http_1 = require_dist_cjs2(); - var smithy_client_1 = require_dist_cjs34(); - var models_0_1 = require_models_02(); - var SSOServiceException_1 = require_SSOServiceException(); - var se_GetRoleCredentialsCommand = async (input, context) => { - const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, { - "x-amz-sso_bearer_token": input.accessToken - }); - const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}/federation/credentials`; - const query = (0, smithy_client_1.map)({ - role_name: [, (0, smithy_client_1.expectNonNull)(input.roleName, `roleName`)], - account_id: [, (0, smithy_client_1.expectNonNull)(input.accountId, `accountId`)] - }); - let body; - return new protocol_http_1.HttpRequest({ - protocol, - hostname, - port, - method: "GET", - headers, - path: resolvedPath, - query, - body - }); - }; - exports2.se_GetRoleCredentialsCommand = se_GetRoleCredentialsCommand; - var se_ListAccountRolesCommand = async (input, context) => { - const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, { - "x-amz-sso_bearer_token": input.accessToken - }); - const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}/assignment/roles`; - const query = (0, smithy_client_1.map)({ - next_token: [, input.nextToken], - max_result: [() => input.maxResults !== void 0, () => input.maxResults.toString()], - account_id: [, (0, smithy_client_1.expectNonNull)(input.accountId, `accountId`)] - }); - let body; - return new protocol_http_1.HttpRequest({ - protocol, - hostname, - port, - method: "GET", - headers, - path: resolvedPath, - query, - body - }); - }; - exports2.se_ListAccountRolesCommand = se_ListAccountRolesCommand; - var se_ListAccountsCommand = async (input, context) => { - const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, { - "x-amz-sso_bearer_token": input.accessToken - }); - const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}/assignment/accounts`; - const query = (0, smithy_client_1.map)({ - next_token: [, input.nextToken], - max_result: [() => input.maxResults !== void 0, () => input.maxResults.toString()] - }); - let body; - return new protocol_http_1.HttpRequest({ - protocol, - hostname, - port, - method: "GET", - headers, - path: resolvedPath, - query, - body - }); - }; - exports2.se_ListAccountsCommand = se_ListAccountsCommand; - var se_LogoutCommand = async (input, context) => { - const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, { - "x-amz-sso_bearer_token": input.accessToken - }); - const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}/logout`; - let body; - return new protocol_http_1.HttpRequest({ - protocol, - hostname, - port, - method: "POST", - headers, - path: resolvedPath, - body - }); - }; - exports2.se_LogoutCommand = se_LogoutCommand; - var de_GetRoleCredentialsCommand = async (output, context) => { - if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_GetRoleCredentialsCommandError(output, context); + return attrStr; + } + function isStopNode(jPath, options) { + jPath = jPath.substr(0, jPath.length - options.textNodeName.length - 1); + let tagName = jPath.substr(jPath.lastIndexOf(".") + 1); + for (let index in options.stopNodes) { + if (options.stopNodes[index] === jPath || options.stopNodes[index] === "*." + tagName) return true; } - const contents = (0, smithy_client_1.map)({ - $metadata: deserializeMetadata(output) - }); - const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body"); - const doc = (0, smithy_client_1.take)(data, { - roleCredentials: smithy_client_1._json - }); - Object.assign(contents, doc); - return contents; - }; - exports2.de_GetRoleCredentialsCommand = de_GetRoleCredentialsCommand; - var de_GetRoleCredentialsCommandError = async (output, context) => { - const parsedOutput = { - ...output, - body: await parseErrorBody(output.body, context) - }; - const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); - switch (errorCode) { - case "InvalidRequestException": - case "com.amazonaws.sso#InvalidRequestException": - throw await de_InvalidRequestExceptionRes(parsedOutput, context); - case "ResourceNotFoundException": - case "com.amazonaws.sso#ResourceNotFoundException": - throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); - case "TooManyRequestsException": - case "com.amazonaws.sso#TooManyRequestsException": - throw await de_TooManyRequestsExceptionRes(parsedOutput, context); - case "UnauthorizedException": - case "com.amazonaws.sso#UnauthorizedException": - throw await de_UnauthorizedExceptionRes(parsedOutput, context); - default: - const parsedBody = parsedOutput.body; - return throwDefaultError({ - output, - parsedBody, - errorCode - }); + return false; + } + function replaceEntitiesValue(textValue, options) { + if (textValue && textValue.length > 0 && options.processEntities) { + for (let i = 0; i < options.entities.length; i++) { + const entity = options.entities[i]; + textValue = textValue.replace(entity.regex, entity.val); + } } + return textValue; + } + module2.exports = toXml; + } +}); + +// ../../../node_modules/fast-xml-parser/src/xmlbuilder/json2xml.js +var require_json2xml = __commonJS({ + "../../../node_modules/fast-xml-parser/src/xmlbuilder/json2xml.js"(exports2, module2) { + "use strict"; + var buildFromOrderedJs = require_orderedJs2Xml(); + var defaultOptions = { + attributeNamePrefix: "@_", + attributesGroupName: false, + textNodeName: "#text", + ignoreAttributes: true, + cdataPropName: false, + format: false, + indentBy: " ", + suppressEmptyNode: false, + suppressUnpairedNode: true, + suppressBooleanAttributes: true, + tagValueProcessor: function(key, a) { + return a; + }, + attributeValueProcessor: function(attrName, a) { + return a; + }, + preserveOrder: false, + commentPropName: false, + unpairedTags: [], + entities: [ + { regex: new RegExp("&", "g"), val: "&" }, + //it must be on top + { regex: new RegExp(">", "g"), val: ">" }, + { regex: new RegExp("<", "g"), val: "<" }, + { regex: new RegExp("'", "g"), val: "'" }, + { regex: new RegExp('"', "g"), val: """ } + ], + processEntities: true, + stopNodes: [], + // transformTagName: false, + // transformAttributeName: false, + oneListGroup: false }; - var de_ListAccountRolesCommand = async (output, context) => { - if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_ListAccountRolesCommandError(output, context); + function Builder(options) { + this.options = Object.assign({}, defaultOptions, options); + if (this.options.ignoreAttributes || this.options.attributesGroupName) { + this.isAttribute = function() { + return false; + }; + } else { + this.attrPrefixLen = this.options.attributeNamePrefix.length; + this.isAttribute = isAttribute; } - const contents = (0, smithy_client_1.map)({ - $metadata: deserializeMetadata(output) - }); - const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body"); - const doc = (0, smithy_client_1.take)(data, { - nextToken: smithy_client_1.expectString, - roleList: smithy_client_1._json - }); - Object.assign(contents, doc); - return contents; - }; - exports2.de_ListAccountRolesCommand = de_ListAccountRolesCommand; - var de_ListAccountRolesCommandError = async (output, context) => { - const parsedOutput = { - ...output, - body: await parseErrorBody(output.body, context) - }; - const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); - switch (errorCode) { - case "InvalidRequestException": - case "com.amazonaws.sso#InvalidRequestException": - throw await de_InvalidRequestExceptionRes(parsedOutput, context); - case "ResourceNotFoundException": - case "com.amazonaws.sso#ResourceNotFoundException": - throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); - case "TooManyRequestsException": - case "com.amazonaws.sso#TooManyRequestsException": - throw await de_TooManyRequestsExceptionRes(parsedOutput, context); - case "UnauthorizedException": - case "com.amazonaws.sso#UnauthorizedException": - throw await de_UnauthorizedExceptionRes(parsedOutput, context); - default: - const parsedBody = parsedOutput.body; - return throwDefaultError({ - output, - parsedBody, - errorCode - }); + this.processTextOrObjNode = processTextOrObjNode; + if (this.options.format) { + this.indentate = indentate; + this.tagEndChar = ">\n"; + this.newLine = "\n"; + } else { + this.indentate = function() { + return ""; + }; + this.tagEndChar = ">"; + this.newLine = ""; + } + } + Builder.prototype.build = function(jObj) { + if (this.options.preserveOrder) { + return buildFromOrderedJs(jObj, this.options); + } else { + if (Array.isArray(jObj) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1) { + jObj = { + [this.options.arrayNodeName]: jObj + }; + } + return this.j2x(jObj, 0).val; } }; - var de_ListAccountsCommand = async (output, context) => { - if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_ListAccountsCommandError(output, context); + Builder.prototype.j2x = function(jObj, level) { + let attrStr = ""; + let val2 = ""; + for (let key in jObj) { + if (!Object.prototype.hasOwnProperty.call(jObj, key)) continue; + if (typeof jObj[key] === "undefined") { + if (this.isAttribute(key)) { + val2 += ""; + } + } else if (jObj[key] === null) { + if (this.isAttribute(key)) { + val2 += ""; + } else if (key[0] === "?") { + val2 += this.indentate(level) + "<" + key + "?" + this.tagEndChar; + } else { + val2 += this.indentate(level) + "<" + key + "/" + this.tagEndChar; + } + } else if (jObj[key] instanceof Date) { + val2 += this.buildTextValNode(jObj[key], key, "", level); + } else if (typeof jObj[key] !== "object") { + const attr = this.isAttribute(key); + if (attr) { + attrStr += this.buildAttrPairStr(attr, "" + jObj[key]); + } else { + if (key === this.options.textNodeName) { + let newval = this.options.tagValueProcessor(key, "" + jObj[key]); + val2 += this.replaceEntitiesValue(newval); + } else { + val2 += this.buildTextValNode(jObj[key], key, "", level); + } + } + } else if (Array.isArray(jObj[key])) { + const arrLen = jObj[key].length; + let listTagVal = ""; + let listTagAttr = ""; + for (let j = 0; j < arrLen; j++) { + const item = jObj[key][j]; + if (typeof item === "undefined") { + } else if (item === null) { + if (key[0] === "?") val2 += this.indentate(level) + "<" + key + "?" + this.tagEndChar; + else val2 += this.indentate(level) + "<" + key + "/" + this.tagEndChar; + } else if (typeof item === "object") { + if (this.options.oneListGroup) { + const result = this.j2x(item, level + 1); + listTagVal += result.val; + if (this.options.attributesGroupName && item.hasOwnProperty(this.options.attributesGroupName)) { + listTagAttr += result.attrStr; + } + } else { + listTagVal += this.processTextOrObjNode(item, key, level); + } + } else { + if (this.options.oneListGroup) { + let textValue = this.options.tagValueProcessor(key, item); + textValue = this.replaceEntitiesValue(textValue); + listTagVal += textValue; + } else { + listTagVal += this.buildTextValNode(item, key, "", level); + } + } + } + if (this.options.oneListGroup) { + listTagVal = this.buildObjectNode(listTagVal, key, listTagAttr, level); + } + val2 += listTagVal; + } else { + if (this.options.attributesGroupName && key === this.options.attributesGroupName) { + const Ks = Object.keys(jObj[key]); + const L = Ks.length; + for (let j = 0; j < L; j++) { + attrStr += this.buildAttrPairStr(Ks[j], "" + jObj[key][Ks[j]]); + } + } else { + val2 += this.processTextOrObjNode(jObj[key], key, level); + } + } } - const contents = (0, smithy_client_1.map)({ - $metadata: deserializeMetadata(output) - }); - const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body"); - const doc = (0, smithy_client_1.take)(data, { - accountList: smithy_client_1._json, - nextToken: smithy_client_1.expectString - }); - Object.assign(contents, doc); - return contents; + return { attrStr, val: val2 }; }; - exports2.de_ListAccountsCommand = de_ListAccountsCommand; - var de_ListAccountsCommandError = async (output, context) => { - const parsedOutput = { - ...output, - body: await parseErrorBody(output.body, context) - }; - const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); - switch (errorCode) { - case "InvalidRequestException": - case "com.amazonaws.sso#InvalidRequestException": - throw await de_InvalidRequestExceptionRes(parsedOutput, context); - case "ResourceNotFoundException": - case "com.amazonaws.sso#ResourceNotFoundException": - throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); - case "TooManyRequestsException": - case "com.amazonaws.sso#TooManyRequestsException": - throw await de_TooManyRequestsExceptionRes(parsedOutput, context); - case "UnauthorizedException": - case "com.amazonaws.sso#UnauthorizedException": - throw await de_UnauthorizedExceptionRes(parsedOutput, context); - default: - const parsedBody = parsedOutput.body; - return throwDefaultError({ - output, - parsedBody, - errorCode - }); + Builder.prototype.buildAttrPairStr = function(attrName, val2) { + val2 = this.options.attributeValueProcessor(attrName, "" + val2); + val2 = this.replaceEntitiesValue(val2); + if (this.options.suppressBooleanAttributes && val2 === "true") { + return " " + attrName; + } else return " " + attrName + '="' + val2 + '"'; + }; + function processTextOrObjNode(object, key, level) { + const result = this.j2x(object, level + 1); + if (object[this.options.textNodeName] !== void 0 && Object.keys(object).length === 1) { + return this.buildTextValNode(object[this.options.textNodeName], key, result.attrStr, level); + } else { + return this.buildObjectNode(result.val, key, result.attrStr, level); + } + } + Builder.prototype.buildObjectNode = function(val2, key, attrStr, level) { + if (val2 === "") { + if (key[0] === "?") return this.indentate(level) + "<" + key + attrStr + "?" + this.tagEndChar; + else { + return this.indentate(level) + "<" + key + attrStr + this.closeTag(key) + this.tagEndChar; + } + } else { + let tagEndExp = "" + val2 + tagEndExp; + } else if (this.options.commentPropName !== false && key === this.options.commentPropName && piClosingChar.length === 0) { + return this.indentate(level) + `` + this.newLine; + } else { + return this.indentate(level) + "<" + key + attrStr + piClosingChar + this.tagEndChar + val2 + this.indentate(level) + tagEndExp; + } } }; - var de_LogoutCommand = async (output, context) => { - if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_LogoutCommandError(output, context); + Builder.prototype.closeTag = function(key) { + let closeTag = ""; + if (this.options.unpairedTags.indexOf(key) !== -1) { + if (!this.options.suppressUnpairedNode) closeTag = "/"; + } else if (this.options.suppressEmptyNode) { + closeTag = "/"; + } else { + closeTag = `> { - const parsedOutput = { - ...output, - body: await parseErrorBody(output.body, context) - }; - const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); - switch (errorCode) { - case "InvalidRequestException": - case "com.amazonaws.sso#InvalidRequestException": - throw await de_InvalidRequestExceptionRes(parsedOutput, context); - case "TooManyRequestsException": - case "com.amazonaws.sso#TooManyRequestsException": - throw await de_TooManyRequestsExceptionRes(parsedOutput, context); - case "UnauthorizedException": - case "com.amazonaws.sso#UnauthorizedException": - throw await de_UnauthorizedExceptionRes(parsedOutput, context); - default: - const parsedBody = parsedOutput.body; - return throwDefaultError({ - output, - parsedBody, - errorCode - }); + Builder.prototype.buildTextValNode = function(val2, key, attrStr, level) { + if (this.options.cdataPropName !== false && key === this.options.cdataPropName) { + return this.indentate(level) + `` + this.newLine; + } else if (this.options.commentPropName !== false && key === this.options.commentPropName) { + return this.indentate(level) + `` + this.newLine; + } else if (key[0] === "?") { + return this.indentate(level) + "<" + key + attrStr + "?" + this.tagEndChar; + } else { + let textValue = this.options.tagValueProcessor(key, val2); + textValue = this.replaceEntitiesValue(textValue); + if (textValue === "") { + return this.indentate(level) + "<" + key + attrStr + this.closeTag(key) + this.tagEndChar; + } else { + return this.indentate(level) + "<" + key + attrStr + ">" + textValue + " { - const contents = (0, smithy_client_1.map)({}); - const data = parsedOutput.body; - const doc = (0, smithy_client_1.take)(data, { - message: smithy_client_1.expectString - }); - Object.assign(contents, doc); - const exception = new models_0_1.InvalidRequestException({ - $metadata: deserializeMetadata(parsedOutput), - ...contents - }); - return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body); - }; - var de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => { - const contents = (0, smithy_client_1.map)({}); - const data = parsedOutput.body; - const doc = (0, smithy_client_1.take)(data, { - message: smithy_client_1.expectString - }); - Object.assign(contents, doc); - const exception = new models_0_1.ResourceNotFoundException({ - $metadata: deserializeMetadata(parsedOutput), - ...contents - }); - return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body); - }; - var de_TooManyRequestsExceptionRes = async (parsedOutput, context) => { - const contents = (0, smithy_client_1.map)({}); - const data = parsedOutput.body; - const doc = (0, smithy_client_1.take)(data, { - message: smithy_client_1.expectString - }); - Object.assign(contents, doc); - const exception = new models_0_1.TooManyRequestsException({ - $metadata: deserializeMetadata(parsedOutput), - ...contents - }); - return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body); + Builder.prototype.replaceEntitiesValue = function(textValue) { + if (textValue && textValue.length > 0 && this.options.processEntities) { + for (let i = 0; i < this.options.entities.length; i++) { + const entity = this.options.entities[i]; + textValue = textValue.replace(entity.regex, entity.val); + } + } + return textValue; }; - var de_UnauthorizedExceptionRes = async (parsedOutput, context) => { - const contents = (0, smithy_client_1.map)({}); - const data = parsedOutput.body; - const doc = (0, smithy_client_1.take)(data, { - message: smithy_client_1.expectString - }); - Object.assign(contents, doc); - const exception = new models_0_1.UnauthorizedException({ - $metadata: deserializeMetadata(parsedOutput), - ...contents - }); - return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body); + function indentate(level) { + return this.options.indentBy.repeat(level); + } + function isAttribute(name) { + if (name.startsWith(this.options.attributeNamePrefix) && name !== this.options.textNodeName) { + return name.substr(this.attrPrefixLen); + } else { + return false; + } + } + module2.exports = Builder; + } +}); + +// ../../../node_modules/fast-xml-parser/src/fxp.js +var require_fxp = __commonJS({ + "../../../node_modules/fast-xml-parser/src/fxp.js"(exports2, module2) { + "use strict"; + var validator = require_validator(); + var XMLParser2 = require_XMLParser(); + var XMLBuilder = require_json2xml(); + module2.exports = { + XMLParser: XMLParser2, + XMLValidator: validator, + XMLBuilder }; - var deserializeMetadata = (output) => ({ - httpStatusCode: output.statusCode, - requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"], - extendedRequestId: output.headers["x-amz-id-2"], - cfId: output.headers["x-amz-cf-id"] - }); - var collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body)); - var isSerializableHeaderValue = (value) => value !== void 0 && value !== null && value !== "" && (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) && (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0); - var parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => { + } +}); + +// ../../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/parseXmlBody.js +var import_smithy_client4, import_fast_xml_parser, parseXmlBody, parseXmlErrorBody, loadRestXmlErrorCode; +var init_parseXmlBody = __esm({ + "../../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/parseXmlBody.js"() { + import_smithy_client4 = __toESM(require_dist_cjs37()); + import_fast_xml_parser = __toESM(require_fxp()); + init_common(); + parseXmlBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => { if (encoded.length) { - return JSON.parse(encoded); + const parser = new import_fast_xml_parser.XMLParser({ + attributeNamePrefix: "", + htmlEntities: true, + ignoreAttributes: false, + ignoreDeclaration: true, + parseTagValue: false, + trimValues: false, + tagValueProcessor: (_, val2) => val2.trim() === "" && val2.includes("\n") ? "" : void 0 + }); + parser.addEntity("#xD", "\r"); + parser.addEntity("#10", "\n"); + let parsedObj; + try { + parsedObj = parser.parse(encoded, true); + } catch (e) { + if (e && typeof e === "object") { + Object.defineProperty(e, "$responseBodyText", { + value: encoded + }); + } + throw e; + } + const textNodeName = "#text"; + const key = Object.keys(parsedObj)[0]; + const parsedObjToReturn = parsedObj[key]; + if (parsedObjToReturn[textNodeName]) { + parsedObjToReturn[key] = parsedObjToReturn[textNodeName]; + delete parsedObjToReturn[textNodeName]; + } + return (0, import_smithy_client4.getValueFromTextNode)(parsedObjToReturn); } return {}; }); - var parseErrorBody = async (errorBody, context) => { - const value = await parseBody(errorBody, context); - value.message = value.message ?? value.Message; + parseXmlErrorBody = async (errorBody, context) => { + const value = await parseXmlBody(errorBody, context); + if (value.Error) { + value.Error.message = value.Error.message ?? value.Error.Message; + } return value; }; - var loadRestJsonErrorCode = (output, data) => { - const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase()); - const sanitizeErrorCode = (rawValue) => { - let cleanValue = rawValue; - if (typeof cleanValue === "number") { - cleanValue = cleanValue.toString(); - } - if (cleanValue.indexOf(",") >= 0) { - cleanValue = cleanValue.split(",")[0]; - } - if (cleanValue.indexOf(":") >= 0) { - cleanValue = cleanValue.split(":")[0]; - } - if (cleanValue.indexOf("#") >= 0) { - cleanValue = cleanValue.split("#")[1]; - } - return cleanValue; - }; - const headerKey = findKey(output.headers, "x-amzn-errortype"); - if (headerKey !== void 0) { - return sanitizeErrorCode(output.headers[headerKey]); + loadRestXmlErrorCode = (output, data) => { + if (data?.Error?.Code !== void 0) { + return data.Error.Code; } - if (data.code !== void 0) { - return sanitizeErrorCode(data.code); + if (data?.Code !== void 0) { + return data.Code; } - if (data["__type"] !== void 0) { - return sanitizeErrorCode(data["__type"]); + if (output.statusCode == 404) { + return "NotFound"; + } + }; + } +}); + +// ../../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/index.js +var init_protocols = __esm({ + "../../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/index.js"() { + init_coercing_serializers(); + init_awsExpectUnion(); + init_parseJsonBody(); + init_parseXmlBody(); + } +}); + +// ../../../node_modules/@aws-sdk/core/dist-es/index.js +var dist_es_exports2 = {}; +__export(dist_es_exports2, { + AWSSDKSigV4Signer: () => AWSSDKSigV4Signer, + AwsSdkSigV4ASigner: () => AwsSdkSigV4ASigner, + AwsSdkSigV4Signer: () => AwsSdkSigV4Signer, + NODE_SIGV4A_CONFIG_OPTIONS: () => NODE_SIGV4A_CONFIG_OPTIONS, + _toBool: () => _toBool, + _toNum: () => _toNum, + _toStr: () => _toStr, + awsExpectUnion: () => awsExpectUnion, + emitWarningIfUnsupportedVersion: () => emitWarningIfUnsupportedVersion, + loadRestJsonErrorCode: () => loadRestJsonErrorCode, + loadRestXmlErrorCode: () => loadRestXmlErrorCode, + parseJsonBody: () => parseJsonBody, + parseJsonErrorBody: () => parseJsonErrorBody, + parseXmlBody: () => parseXmlBody, + parseXmlErrorBody: () => parseXmlErrorBody, + resolveAWSSDKSigV4Config: () => resolveAWSSDKSigV4Config, + resolveAwsSdkSigV4AConfig: () => resolveAwsSdkSigV4AConfig, + resolveAwsSdkSigV4Config: () => resolveAwsSdkSigV4Config, + validateSigningProperties: () => validateSigningProperties +}); +var init_dist_es2 = __esm({ + "../../../node_modules/@aws-sdk/core/dist-es/index.js"() { + init_client(); + init_httpAuthSchemes2(); + init_protocols(); + } +}); + +// ../../../node_modules/@aws-sdk/client-sfn/dist-cjs/auth/httpAuthSchemeProvider.js +var require_httpAuthSchemeProvider = __commonJS({ + "../../../node_modules/@aws-sdk/client-sfn/dist-cjs/auth/httpAuthSchemeProvider.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.resolveHttpAuthSchemeConfig = exports2.defaultSFNHttpAuthSchemeProvider = exports2.defaultSFNHttpAuthSchemeParametersProvider = void 0; + var core_1 = (init_dist_es2(), __toCommonJS(dist_es_exports2)); + var util_middleware_1 = require_dist_cjs10(); + var defaultSFNHttpAuthSchemeParametersProvider = async (config, context, input) => { + return { + operation: (0, util_middleware_1.getSmithyContext)(context).operation, + region: await (0, util_middleware_1.normalizeProvider)(config.region)() || (() => { + throw new Error("expected `region` to be configured for `aws.auth#sigv4`"); + })() + }; + }; + exports2.defaultSFNHttpAuthSchemeParametersProvider = defaultSFNHttpAuthSchemeParametersProvider; + function createAwsAuthSigv4HttpAuthOption(authParameters) { + return { + schemeId: "aws.auth#sigv4", + signingProperties: { + name: "states", + region: authParameters.region + }, + propertiesExtractor: (config, context) => ({ + signingProperties: { + config, + context + } + }) + }; + } + var defaultSFNHttpAuthSchemeProvider = (authParameters) => { + const options = []; + switch (authParameters.operation) { + default: { + options.push(createAwsAuthSigv4HttpAuthOption(authParameters)); + } } + return options; + }; + exports2.defaultSFNHttpAuthSchemeProvider = defaultSFNHttpAuthSchemeProvider; + var resolveHttpAuthSchemeConfig = (config) => { + const config_0 = (0, core_1.resolveAwsSdkSigV4Config)(config); + return { + ...config_0 + }; + }; + exports2.resolveHttpAuthSchemeConfig = resolveHttpAuthSchemeConfig; + } +}); + +// ../../../node_modules/tslib/tslib.es6.mjs +var tslib_es6_exports = {}; +__export(tslib_es6_exports, { + __addDisposableResource: () => __addDisposableResource, + __assign: () => __assign, + __asyncDelegator: () => __asyncDelegator, + __asyncGenerator: () => __asyncGenerator, + __asyncValues: () => __asyncValues, + __await: () => __await, + __awaiter: () => __awaiter, + __classPrivateFieldGet: () => __classPrivateFieldGet, + __classPrivateFieldIn: () => __classPrivateFieldIn, + __classPrivateFieldSet: () => __classPrivateFieldSet, + __createBinding: () => __createBinding, + __decorate: () => __decorate, + __disposeResources: () => __disposeResources, + __esDecorate: () => __esDecorate, + __exportStar: () => __exportStar, + __extends: () => __extends, + __generator: () => __generator, + __importDefault: () => __importDefault, + __importStar: () => __importStar, + __makeTemplateObject: () => __makeTemplateObject, + __metadata: () => __metadata, + __param: () => __param, + __propKey: () => __propKey, + __read: () => __read, + __rest: () => __rest, + __runInitializers: () => __runInitializers, + __setFunctionName: () => __setFunctionName, + __spread: () => __spread, + __spreadArray: () => __spreadArray, + __spreadArrays: () => __spreadArrays, + __values: () => __values, + default: () => tslib_es6_default +}); +function __extends(d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { + this.constructor = d; + } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +} +function __rest(s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +} +function __decorate(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +} +function __param(paramIndex, decorator) { + return function(target, key) { + decorator(target, key, paramIndex); + }; +} +function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) { + function accept(f) { + if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); + return f; + } + var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value"; + var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null; + var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {}); + var _, done = false; + for (var i = decorators.length - 1; i >= 0; i--) { + var context = {}; + for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p]; + for (var p in contextIn.access) context.access[p] = contextIn.access[p]; + context.addInitializer = function(f) { + if (done) throw new TypeError("Cannot add initializers after decoration has completed"); + extraInitializers.push(accept(f || null)); }; + var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context); + if (kind === "accessor") { + if (result === void 0) continue; + if (result === null || typeof result !== "object") throw new TypeError("Object expected"); + if (_ = accept(result.get)) descriptor.get = _; + if (_ = accept(result.set)) descriptor.set = _; + if (_ = accept(result.init)) initializers.unshift(_); + } else if (_ = accept(result)) { + if (kind === "field") initializers.unshift(_); + else descriptor[key] = _; + } } -}); - -// ../../../node_modules/@aws-sdk/client-sso/dist-cjs/commands/GetRoleCredentialsCommand.js -var require_GetRoleCredentialsCommand = __commonJS({ - "../../../node_modules/@aws-sdk/client-sso/dist-cjs/commands/GetRoleCredentialsCommand.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.GetRoleCredentialsCommand = exports2.$Command = void 0; - var middleware_endpoint_1 = require_dist_cjs26(); - var middleware_serde_1 = require_dist_cjs25(); - var smithy_client_1 = require_dist_cjs34(); - Object.defineProperty(exports2, "$Command", { enumerable: true, get: function() { - return smithy_client_1.Command; - } }); - var types_1 = require_dist_cjs(); - var models_0_1 = require_models_02(); - var Aws_restJson1_1 = require_Aws_restJson1(); - var GetRoleCredentialsCommand = class _GetRoleCredentialsCommand extends smithy_client_1.Command { - static getEndpointParameterInstructions() { - return { - UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, - Endpoint: { type: "builtInParams", name: "endpoint" }, - Region: { type: "builtInParams", name: "region" }, - UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" } - }; - } - constructor(input) { - super(); - this.input = input; - } - resolveMiddleware(clientStack, configuration, options) { - this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, _GetRoleCredentialsCommand.getEndpointParameterInstructions())); - const stack = clientStack.concat(this.middlewareStack); - const { logger } = configuration; - const clientName = "SSOClient"; - const commandName = "GetRoleCredentialsCommand"; - const handlerExecutionContext = { - logger, - clientName, - commandName, - inputFilterSensitiveLog: models_0_1.GetRoleCredentialsRequestFilterSensitiveLog, - outputFilterSensitiveLog: models_0_1.GetRoleCredentialsResponseFilterSensitiveLog, - [types_1.SMITHY_CONTEXT_KEY]: { - service: "SWBPortalService", - operation: "GetRoleCredentials" - } - }; - const { requestHandler } = configuration; - return stack.resolve((request2) => requestHandler.handle(request2.request, options || {}), handlerExecutionContext); - } - serialize(input, context) { - return (0, Aws_restJson1_1.se_GetRoleCredentialsCommand)(input, context); + if (target) Object.defineProperty(target, contextIn.name, descriptor); + done = true; +} +function __runInitializers(thisArg, initializers, value) { + var useValue = arguments.length > 2; + for (var i = 0; i < initializers.length; i++) { + value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg); + } + return useValue ? value : void 0; +} +function __propKey(x) { + return typeof x === "symbol" ? x : "".concat(x); +} +function __setFunctionName(f, name, prefix) { + if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : ""; + return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name }); +} +function __metadata(metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); +} +function __awaiter(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); } - deserialize(output, context) { - return (0, Aws_restJson1_1.de_GetRoleCredentialsCommand)(output, context); + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +} +function __generator(thisArg, body) { + var _ = { label: 0, sent: function() { + if (t[0] & 1) throw t[1]; + return t[1]; + }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { + return this; + }), g; + function verb(n) { + return function(v) { + return step([n, v]); }; - exports2.GetRoleCredentialsCommand = GetRoleCredentialsCommand; } -}); - -// ../../../node_modules/@aws-sdk/client-sso/dist-cjs/commands/ListAccountRolesCommand.js -var require_ListAccountRolesCommand = __commonJS({ - "../../../node_modules/@aws-sdk/client-sso/dist-cjs/commands/ListAccountRolesCommand.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.ListAccountRolesCommand = exports2.$Command = void 0; - var middleware_endpoint_1 = require_dist_cjs26(); - var middleware_serde_1 = require_dist_cjs25(); - var smithy_client_1 = require_dist_cjs34(); - Object.defineProperty(exports2, "$Command", { enumerable: true, get: function() { - return smithy_client_1.Command; - } }); - var types_1 = require_dist_cjs(); - var models_0_1 = require_models_02(); - var Aws_restJson1_1 = require_Aws_restJson1(); - var ListAccountRolesCommand = class _ListAccountRolesCommand extends smithy_client_1.Command { - static getEndpointParameterInstructions() { - return { - UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, - Endpoint: { type: "builtInParams", name: "endpoint" }, - Region: { type: "builtInParams", name: "region" }, - UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" } - }; - } - constructor(input) { - super(); - this.input = input; - } - resolveMiddleware(clientStack, configuration, options) { - this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, _ListAccountRolesCommand.getEndpointParameterInstructions())); - const stack = clientStack.concat(this.middlewareStack); - const { logger } = configuration; - const clientName = "SSOClient"; - const commandName = "ListAccountRolesCommand"; - const handlerExecutionContext = { - logger, - clientName, - commandName, - inputFilterSensitiveLog: models_0_1.ListAccountRolesRequestFilterSensitiveLog, - outputFilterSensitiveLog: (_) => _, - [types_1.SMITHY_CONTEXT_KEY]: { - service: "SWBPortalService", - operation: "ListAccountRoles" + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (g && (g = 0, op[0] && (_ = 0)), _) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: + case 1: + t = op; + break; + case 4: + _.label++; + return { value: op[1], done: false }; + case 5: + _.label++; + y = op[1]; + op = [0]; + continue; + case 7: + op = _.ops.pop(); + _.trys.pop(); + continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { + _ = 0; + continue; } - }; - const { requestHandler } = configuration; - return stack.resolve((request2) => requestHandler.handle(request2.request, options || {}), handlerExecutionContext); - } - serialize(input, context) { - return (0, Aws_restJson1_1.se_ListAccountRolesCommand)(input, context); - } - deserialize(output, context) { - return (0, Aws_restJson1_1.de_ListAccountRolesCommand)(output, context); + if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { + _.label = op[1]; + break; + } + if (op[0] === 6 && _.label < t[1]) { + _.label = t[1]; + t = op; + break; + } + if (t && _.label < t[2]) { + _.label = t[2]; + _.ops.push(op); + break; + } + if (t[2]) _.ops.pop(); + _.trys.pop(); + continue; } + op = body.call(thisArg, _); + } catch (e) { + op = [6, e]; + y = 0; + } finally { + f = t = 0; + } + if (op[0] & 5) throw op[1]; + return { value: op[0] ? op[1] : void 0, done: true }; + } +} +function __exportStar(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); +} +function __values(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function() { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); +} +function __read(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } catch (error) { + e = { error }; + } finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } finally { + if (e) throw e.error; + } + } + return ar; +} +function __spread() { + for (var ar = [], i = 0; i < arguments.length; i++) + ar = ar.concat(__read(arguments[i])); + return ar; +} +function __spreadArrays() { + for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; + for (var r = Array(s), k = 0, i = 0; i < il; i++) + for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) + r[k] = a[j]; + return r; +} +function __spreadArray(to, from, pack) { + if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { + if (ar || !(i in from)) { + if (!ar) ar = Array.prototype.slice.call(from, 0, i); + ar[i] = from[i]; + } + } + return to.concat(ar || Array.prototype.slice.call(from)); +} +function __await(v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); +} +function __asyncGenerator(thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), i, q = []; + return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function() { + return this; + }, i; + function awaitReturn(f) { + return function(v) { + return Promise.resolve(v).then(f, reject); }; - exports2.ListAccountRolesCommand = ListAccountRolesCommand; } -}); - -// ../../../node_modules/@aws-sdk/client-sso/dist-cjs/commands/ListAccountsCommand.js -var require_ListAccountsCommand = __commonJS({ - "../../../node_modules/@aws-sdk/client-sso/dist-cjs/commands/ListAccountsCommand.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.ListAccountsCommand = exports2.$Command = void 0; - var middleware_endpoint_1 = require_dist_cjs26(); - var middleware_serde_1 = require_dist_cjs25(); - var smithy_client_1 = require_dist_cjs34(); - Object.defineProperty(exports2, "$Command", { enumerable: true, get: function() { - return smithy_client_1.Command; - } }); - var types_1 = require_dist_cjs(); - var models_0_1 = require_models_02(); - var Aws_restJson1_1 = require_Aws_restJson1(); - var ListAccountsCommand = class _ListAccountsCommand extends smithy_client_1.Command { - static getEndpointParameterInstructions() { - return { - UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, - Endpoint: { type: "builtInParams", name: "endpoint" }, - Region: { type: "builtInParams", name: "region" }, - UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" } - }; - } - constructor(input) { - super(); - this.input = input; - } - resolveMiddleware(clientStack, configuration, options) { - this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, _ListAccountsCommand.getEndpointParameterInstructions())); - const stack = clientStack.concat(this.middlewareStack); - const { logger } = configuration; - const clientName = "SSOClient"; - const commandName = "ListAccountsCommand"; - const handlerExecutionContext = { - logger, - clientName, - commandName, - inputFilterSensitiveLog: models_0_1.ListAccountsRequestFilterSensitiveLog, - outputFilterSensitiveLog: (_) => _, - [types_1.SMITHY_CONTEXT_KEY]: { - service: "SWBPortalService", - operation: "ListAccounts" - } - }; - const { requestHandler } = configuration; - return stack.resolve((request2) => requestHandler.handle(request2.request, options || {}), handlerExecutionContext); - } - serialize(input, context) { - return (0, Aws_restJson1_1.se_ListAccountsCommand)(input, context); - } - deserialize(output, context) { - return (0, Aws_restJson1_1.de_ListAccountsCommand)(output, context); - } - }; - exports2.ListAccountsCommand = ListAccountsCommand; + function verb(n, f) { + if (g[n]) { + i[n] = function(v) { + return new Promise(function(a, b) { + q.push([n, v, a, b]) > 1 || resume(n, v); + }); + }; + if (f) i[n] = f(i[n]); + } } -}); - -// ../../../node_modules/@aws-sdk/client-sso/dist-cjs/commands/LogoutCommand.js -var require_LogoutCommand = __commonJS({ - "../../../node_modules/@aws-sdk/client-sso/dist-cjs/commands/LogoutCommand.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.LogoutCommand = exports2.$Command = void 0; - var middleware_endpoint_1 = require_dist_cjs26(); - var middleware_serde_1 = require_dist_cjs25(); - var smithy_client_1 = require_dist_cjs34(); - Object.defineProperty(exports2, "$Command", { enumerable: true, get: function() { - return smithy_client_1.Command; - } }); - var types_1 = require_dist_cjs(); - var models_0_1 = require_models_02(); - var Aws_restJson1_1 = require_Aws_restJson1(); - var LogoutCommand = class _LogoutCommand extends smithy_client_1.Command { - static getEndpointParameterInstructions() { - return { - UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, - Endpoint: { type: "builtInParams", name: "endpoint" }, - Region: { type: "builtInParams", name: "region" }, - UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" } - }; - } - constructor(input) { - super(); - this.input = input; - } - resolveMiddleware(clientStack, configuration, options) { - this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, _LogoutCommand.getEndpointParameterInstructions())); - const stack = clientStack.concat(this.middlewareStack); - const { logger } = configuration; - const clientName = "SSOClient"; - const commandName = "LogoutCommand"; - const handlerExecutionContext = { - logger, - clientName, - commandName, - inputFilterSensitiveLog: models_0_1.LogoutRequestFilterSensitiveLog, - outputFilterSensitiveLog: (_) => _, - [types_1.SMITHY_CONTEXT_KEY]: { - service: "SWBPortalService", - operation: "Logout" - } - }; - const { requestHandler } = configuration; - return stack.resolve((request2) => requestHandler.handle(request2.request, options || {}), handlerExecutionContext); - } - serialize(input, context) { - return (0, Aws_restJson1_1.se_LogoutCommand)(input, context); - } - deserialize(output, context) { - return (0, Aws_restJson1_1.de_LogoutCommand)(output, context); - } - }; - exports2.LogoutCommand = LogoutCommand; + function resume(n, v) { + try { + step(g[n](v)); + } catch (e) { + settle(q[0][3], e); + } } -}); - -// ../../../node_modules/@aws-sdk/client-sso/dist-cjs/SSO.js -var require_SSO = __commonJS({ - "../../../node_modules/@aws-sdk/client-sso/dist-cjs/SSO.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.SSO = void 0; - var smithy_client_1 = require_dist_cjs34(); - var GetRoleCredentialsCommand_1 = require_GetRoleCredentialsCommand(); - var ListAccountRolesCommand_1 = require_ListAccountRolesCommand(); - var ListAccountsCommand_1 = require_ListAccountsCommand(); - var LogoutCommand_1 = require_LogoutCommand(); - var SSOClient_1 = require_SSOClient(); - var commands = { - GetRoleCredentialsCommand: GetRoleCredentialsCommand_1.GetRoleCredentialsCommand, - ListAccountRolesCommand: ListAccountRolesCommand_1.ListAccountRolesCommand, - ListAccountsCommand: ListAccountsCommand_1.ListAccountsCommand, - LogoutCommand: LogoutCommand_1.LogoutCommand - }; - var SSO = class extends SSOClient_1.SSOClient { - }; - exports2.SSO = SSO; - (0, smithy_client_1.createAggregatedClient)(commands, SSO); + function step(r) { + r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } -}); - -// ../../../node_modules/@aws-sdk/client-sso/dist-cjs/commands/index.js -var require_commands = __commonJS({ - "../../../node_modules/@aws-sdk/client-sso/dist-cjs/commands/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); - tslib_1.__exportStar(require_GetRoleCredentialsCommand(), exports2); - tslib_1.__exportStar(require_ListAccountRolesCommand(), exports2); - tslib_1.__exportStar(require_ListAccountsCommand(), exports2); - tslib_1.__exportStar(require_LogoutCommand(), exports2); + function fulfill(value) { + resume("next", value); } -}); - -// ../../../node_modules/@aws-sdk/client-sso/dist-cjs/pagination/Interfaces.js -var require_Interfaces = __commonJS({ - "../../../node_modules/@aws-sdk/client-sso/dist-cjs/pagination/Interfaces.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); + function reject(value) { + resume("throw", value); } -}); - -// ../../../node_modules/@aws-sdk/client-sso/dist-cjs/pagination/ListAccountRolesPaginator.js -var require_ListAccountRolesPaginator = __commonJS({ - "../../../node_modules/@aws-sdk/client-sso/dist-cjs/pagination/ListAccountRolesPaginator.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.paginateListAccountRoles = void 0; - var ListAccountRolesCommand_1 = require_ListAccountRolesCommand(); - var SSOClient_1 = require_SSOClient(); - var makePagedClientRequest = async (client, input, ...args) => { - return await client.send(new ListAccountRolesCommand_1.ListAccountRolesCommand(input), ...args); - }; - async function* paginateListAccountRoles(config, input, ...additionalArguments) { - let token = config.startingToken || void 0; - let hasNext = true; - let page; - while (hasNext) { - input.nextToken = token; - input["maxResults"] = config.pageSize; - if (config.client instanceof SSOClient_1.SSOClient) { - page = await makePagedClientRequest(config.client, input, ...additionalArguments); - } else { - throw new Error("Invalid client, expected SSO | SSOClient"); - } - yield page; - const prevToken = token; - token = page.nextToken; - hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken)); - } - return void 0; - } - exports2.paginateListAccountRoles = paginateListAccountRoles; + function settle(f, v) { + if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } -}); - -// ../../../node_modules/@aws-sdk/client-sso/dist-cjs/pagination/ListAccountsPaginator.js -var require_ListAccountsPaginator = __commonJS({ - "../../../node_modules/@aws-sdk/client-sso/dist-cjs/pagination/ListAccountsPaginator.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.paginateListAccounts = void 0; - var ListAccountsCommand_1 = require_ListAccountsCommand(); - var SSOClient_1 = require_SSOClient(); - var makePagedClientRequest = async (client, input, ...args) => { - return await client.send(new ListAccountsCommand_1.ListAccountsCommand(input), ...args); - }; - async function* paginateListAccounts(config, input, ...additionalArguments) { - let token = config.startingToken || void 0; - let hasNext = true; - let page; - while (hasNext) { - input.nextToken = token; - input["maxResults"] = config.pageSize; - if (config.client instanceof SSOClient_1.SSOClient) { - page = await makePagedClientRequest(config.client, input, ...additionalArguments); - } else { - throw new Error("Invalid client, expected SSO | SSOClient"); - } - yield page; - const prevToken = token; - token = page.nextToken; - hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken)); - } - return void 0; - } - exports2.paginateListAccounts = paginateListAccounts; +} +function __asyncDelegator(o) { + var i, p; + return i = {}, verb("next"), verb("throw", function(e) { + throw e; + }), verb("return"), i[Symbol.iterator] = function() { + return this; + }, i; + function verb(n, f) { + i[n] = o[n] ? function(v) { + return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; + } : f; } -}); - -// ../../../node_modules/@aws-sdk/client-sso/dist-cjs/pagination/index.js -var require_pagination2 = __commonJS({ - "../../../node_modules/@aws-sdk/client-sso/dist-cjs/pagination/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); - tslib_1.__exportStar(require_Interfaces(), exports2); - tslib_1.__exportStar(require_ListAccountRolesPaginator(), exports2); - tslib_1.__exportStar(require_ListAccountsPaginator(), exports2); +} +function __asyncValues(o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { + return this; + }, i); + function verb(n) { + i[n] = o[n] && function(v) { + return new Promise(function(resolve, reject) { + v = o[n](v), settle(resolve, reject, v.done, v.value); + }); + }; } -}); - -// ../../../node_modules/@aws-sdk/client-sso/dist-cjs/models/index.js -var require_models = __commonJS({ - "../../../node_modules/@aws-sdk/client-sso/dist-cjs/models/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); - tslib_1.__exportStar(require_models_02(), exports2); + function settle(resolve, reject, d, v) { + Promise.resolve(v).then(function(v2) { + resolve({ value: v2, done: d }); + }, reject); } -}); - -// ../../../node_modules/@aws-sdk/client-sso/dist-cjs/index.js -var require_dist_cjs45 = __commonJS({ - "../../../node_modules/@aws-sdk/client-sso/dist-cjs/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.SSOServiceException = void 0; - var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); - tslib_1.__exportStar(require_SSOClient(), exports2); - tslib_1.__exportStar(require_SSO(), exports2); - tslib_1.__exportStar(require_commands(), exports2); - tslib_1.__exportStar(require_pagination2(), exports2); - tslib_1.__exportStar(require_models(), exports2); - var SSOServiceException_1 = require_SSOServiceException(); - Object.defineProperty(exports2, "SSOServiceException", { enumerable: true, get: function() { - return SSOServiceException_1.SSOServiceException; - } }); +} +function __makeTemplateObject(cooked, raw) { + if (Object.defineProperty) { + Object.defineProperty(cooked, "raw", { value: raw }); + } else { + cooked.raw = raw; } -}); - -// ../../../node_modules/@aws-sdk/token-providers/dist-cjs/bundle/client-sso-oidc-node.js -var require_client_sso_oidc_node = __commonJS({ - "../../../node_modules/@aws-sdk/token-providers/dist-cjs/bundle/client-sso-oidc-node.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.UnsupportedGrantTypeException = exports2.UnauthorizedClientException = exports2.SlowDownException = exports2.SSOOIDCClient = exports2.InvalidScopeException = exports2.InvalidRequestException = exports2.InvalidClientException = exports2.InternalServerException = exports2.ExpiredTokenException = exports2.CreateTokenCommand = exports2.AuthorizationPendingException = exports2.AccessDeniedException = void 0; - var middleware_host_header_1 = require_dist_cjs3(); - var middleware_logger_1 = require_dist_cjs4(); - var middleware_recursion_detection_1 = require_dist_cjs5(); - var middleware_user_agent_1 = require_dist_cjs17(); - var config_resolver_1 = require_dist_cjs19(); - var middleware_content_length_1 = require_dist_cjs20(); - var middleware_endpoint_1 = require_dist_cjs26(); - var middleware_retry_1 = require_dist_cjs35(); - var smithy_client_1 = require_dist_cjs34(); - var resolveClientEndpointParameters = (options) => { - var _a, _b; - return { - ...options, - useDualstackEndpoint: (_a = options.useDualstackEndpoint) !== null && _a !== void 0 ? _a : false, - useFipsEndpoint: (_b = options.useFipsEndpoint) !== null && _b !== void 0 ? _b : false, - defaultSigningName: "awsssooidc" - }; - }; - var package_default = { version: "3.387.0" }; - var util_user_agent_node_1 = require_dist_cjs40(); - var config_resolver_2 = require_dist_cjs19(); - var hash_node_1 = require_dist_cjs41(); - var middleware_retry_2 = require_dist_cjs35(); - var node_config_provider_1 = require_dist_cjs22(); - var node_http_handler_1 = require_dist_cjs32(); - var util_body_length_node_1 = require_dist_cjs42(); - var util_retry_1 = require_dist_cjs28(); - var smithy_client_2 = require_dist_cjs34(); - var url_parser_1 = require_dist_cjs24(); - var util_base64_1 = require_dist_cjs30(); - var util_utf8_1 = require_dist_cjs10(); - var util_endpoints_1 = require_dist_cjs16(); - var p = "required"; - var q = "fn"; - var r = "argv"; - var s = "ref"; - var a = "PartitionResult"; - var b = "tree"; - var c = "error"; - var d = "endpoint"; - var e = { [p]: false, "type": "String" }; - var f = { [p]: true, "default": false, "type": "Boolean" }; - var g = { [s]: "Endpoint" }; - var h = { [q]: "booleanEquals", [r]: [{ [s]: "UseFIPS" }, true] }; - var i = { [q]: "booleanEquals", [r]: [{ [s]: "UseDualStack" }, true] }; - var j = {}; - var k = { [q]: "booleanEquals", [r]: [true, { [q]: "getAttr", [r]: [{ [s]: a }, "supportsFIPS"] }] }; - var l = { [q]: "booleanEquals", [r]: [true, { [q]: "getAttr", [r]: [{ [s]: a }, "supportsDualStack"] }] }; - var m = [g]; - var n = [h]; - var o = [i]; - var _data = { version: "1.0", parameters: { Region: e, UseDualStack: f, UseFIPS: f, Endpoint: e }, rules: [{ conditions: [{ [q]: "aws.partition", [r]: [{ [s]: "Region" }], assign: a }], type: b, rules: [{ conditions: [{ [q]: "isSet", [r]: m }, { [q]: "parseURL", [r]: m, assign: "url" }], type: b, rules: [{ conditions: n, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: c }, { type: b, rules: [{ conditions: o, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: c }, { endpoint: { url: g, properties: j, headers: j }, type: d }] }] }, { conditions: [h, i], type: b, rules: [{ conditions: [k, l], type: b, rules: [{ endpoint: { url: "https://oidc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: j, headers: j }, type: d }] }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: c }] }, { conditions: n, type: b, rules: [{ conditions: [k], type: b, rules: [{ type: b, rules: [{ endpoint: { url: "https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}", properties: j, headers: j }, type: d }] }] }, { error: "FIPS is enabled but this partition does not support FIPS", type: c }] }, { conditions: o, type: b, rules: [{ conditions: [l], type: b, rules: [{ endpoint: { url: "https://oidc.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: j, headers: j }, type: d }] }, { error: "DualStack is enabled but this partition does not support DualStack", type: c }] }, { endpoint: { url: "https://oidc.{Region}.{PartitionResult#dnsSuffix}", properties: j, headers: j }, type: d }] }] }; - var ruleSet = _data; - var defaultEndpointResolver = (endpointParams, context = {}) => { - return (0, util_endpoints_1.resolveEndpoint)(ruleSet, { - endpointParams, - logger: context.logger - }); + return cooked; +} +function __importStar(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + } + __setModuleDefault(result, mod); + return result; +} +function __importDefault(mod) { + return mod && mod.__esModule ? mod : { default: mod }; +} +function __classPrivateFieldGet(receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); +} +function __classPrivateFieldSet(receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value; +} +function __classPrivateFieldIn(state, receiver) { + if (receiver === null || typeof receiver !== "object" && typeof receiver !== "function") throw new TypeError("Cannot use 'in' operator on non-object"); + return typeof state === "function" ? receiver === state : state.has(receiver); +} +function __addDisposableResource(env, value, async) { + if (value !== null && value !== void 0) { + if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); + var dispose, inner; + if (async) { + if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); + dispose = value[Symbol.asyncDispose]; + } + if (dispose === void 0) { + if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); + dispose = value[Symbol.dispose]; + if (async) inner = dispose; + } + if (typeof dispose !== "function") throw new TypeError("Object not disposable."); + if (inner) dispose = function() { + try { + inner.call(this); + } catch (e) { + return Promise.reject(e); + } }; - var getRuntimeConfig = (config) => { - var _a, _b, _c, _d, _e, _f, _g, _h, _j; - return { - apiVersion: "2019-06-10", - base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : util_base64_1.fromBase64, - base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : util_base64_1.toBase64, - disableHostPrefix: (_c = config === null || config === void 0 ? void 0 : config.disableHostPrefix) !== null && _c !== void 0 ? _c : false, - endpointProvider: (_d = config === null || config === void 0 ? void 0 : config.endpointProvider) !== null && _d !== void 0 ? _d : defaultEndpointResolver, - logger: (_e = config === null || config === void 0 ? void 0 : config.logger) !== null && _e !== void 0 ? _e : new smithy_client_2.NoOpLogger(), - serviceId: (_f = config === null || config === void 0 ? void 0 : config.serviceId) !== null && _f !== void 0 ? _f : "SSO OIDC", - urlParser: (_g = config === null || config === void 0 ? void 0 : config.urlParser) !== null && _g !== void 0 ? _g : url_parser_1.parseUrl, - utf8Decoder: (_h = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _h !== void 0 ? _h : util_utf8_1.fromUtf8, - utf8Encoder: (_j = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _j !== void 0 ? _j : util_utf8_1.toUtf8 + env.stack.push({ value, dispose, async }); + } else if (async) { + env.stack.push({ async: true }); + } + return value; +} +function __disposeResources(env) { + function fail(e) { + env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e; + env.hasError = true; + } + var r, s = 0; + function next() { + while (r = env.stack.pop()) { + try { + if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next); + if (r.dispose) { + var result = r.dispose.call(r.value); + if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { + fail(e); + return next(); + }); + } else s |= 1; + } catch (e) { + fail(e); + } + } + if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve(); + if (env.hasError) throw env.error; + } + return next(); +} +var extendStatics, __assign, __createBinding, __setModuleDefault, _SuppressedError, tslib_es6_default; +var init_tslib_es6 = __esm({ + "../../../node_modules/tslib/tslib.es6.mjs"() { + extendStatics = function(d, b) { + extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { + d2.__proto__ = b2; + } || function(d2, b2) { + for (var p in b2) if (Object.prototype.hasOwnProperty.call(b2, p)) d2[p] = b2[p]; }; + return extendStatics(d, b); }; - var smithy_client_3 = require_dist_cjs34(); - var util_defaults_mode_node_1 = require_dist_cjs43(); - var smithy_client_4 = require_dist_cjs34(); - var getRuntimeConfig2 = (config) => { - var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k; - (0, smithy_client_4.emitWarningIfUnsupportedVersion)(process.version); - const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config); - const defaultConfigProvider = () => defaultsMode().then(smithy_client_3.loadConfigsForDefaultMode); - const clientSharedValues = getRuntimeConfig(config); - return { - ...clientSharedValues, - ...config, - runtime: "node", - defaultsMode, - bodyLengthChecker: (_a = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _a !== void 0 ? _a : util_body_length_node_1.calculateBodyLength, - defaultUserAgentProvider: (_b = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _b !== void 0 ? _b : (0, util_user_agent_node_1.defaultUserAgent)({ serviceId: clientSharedValues.serviceId, clientVersion: package_default.version }), - maxAttempts: (_c = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _c !== void 0 ? _c : (0, node_config_provider_1.loadConfig)(middleware_retry_2.NODE_MAX_ATTEMPT_CONFIG_OPTIONS), - region: (_d = config === null || config === void 0 ? void 0 : config.region) !== null && _d !== void 0 ? _d : (0, node_config_provider_1.loadConfig)(config_resolver_2.NODE_REGION_CONFIG_OPTIONS, config_resolver_2.NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: (_e = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _e !== void 0 ? _e : new node_http_handler_1.NodeHttpHandler(defaultConfigProvider), - retryMode: (_f = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _f !== void 0 ? _f : (0, node_config_provider_1.loadConfig)({ - ...middleware_retry_2.NODE_RETRY_MODE_CONFIG_OPTIONS, - default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE - }), - sha256: (_g = config === null || config === void 0 ? void 0 : config.sha256) !== null && _g !== void 0 ? _g : hash_node_1.Hash.bind(null, "sha256"), - streamCollector: (_h = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _h !== void 0 ? _h : node_http_handler_1.streamCollector, - useDualstackEndpoint: (_j = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _j !== void 0 ? _j : (0, node_config_provider_1.loadConfig)(config_resolver_2.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), - useFipsEndpoint: (_k = config === null || config === void 0 ? void 0 : config.useFipsEndpoint) !== null && _k !== void 0 ? _k : (0, node_config_provider_1.loadConfig)(config_resolver_2.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS) + __assign = function() { + __assign = Object.assign || function __assign2(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; + } + return t; }; + return __assign.apply(this, arguments); }; - var SSOOIDCClient = class extends smithy_client_1.Client { - constructor(...[configuration]) { - const _config_0 = getRuntimeConfig2(configuration || {}); - const _config_1 = resolveClientEndpointParameters(_config_0); - const _config_2 = (0, config_resolver_1.resolveRegionConfig)(_config_1); - const _config_3 = (0, middleware_endpoint_1.resolveEndpointConfig)(_config_2); - const _config_4 = (0, middleware_retry_1.resolveRetryConfig)(_config_3); - const _config_5 = (0, middleware_host_header_1.resolveHostHeaderConfig)(_config_4); - const _config_6 = (0, middleware_user_agent_1.resolveUserAgentConfig)(_config_5); - super(_config_6); - this.config = _config_6; - this.middlewareStack.use((0, middleware_retry_1.getRetryPlugin)(this.config)); - this.middlewareStack.use((0, middleware_content_length_1.getContentLengthPlugin)(this.config)); - this.middlewareStack.use((0, middleware_host_header_1.getHostHeaderPlugin)(this.config)); - this.middlewareStack.use((0, middleware_logger_1.getLoggerPlugin)(this.config)); - this.middlewareStack.use((0, middleware_recursion_detection_1.getRecursionDetectionPlugin)(this.config)); - this.middlewareStack.use((0, middleware_user_agent_1.getUserAgentPlugin)(this.config)); - } - destroy() { - super.destroy(); - } - }; - exports2.SSOOIDCClient = SSOOIDCClient; - var smithy_client_5 = require_dist_cjs34(); - var middleware_endpoint_2 = require_dist_cjs26(); - var middleware_serde_1 = require_dist_cjs25(); - var smithy_client_6 = require_dist_cjs34(); - var protocol_http_1 = require_dist_cjs2(); - var smithy_client_7 = require_dist_cjs34(); - var smithy_client_8 = require_dist_cjs34(); - var SSOOIDCServiceException = class _SSOOIDCServiceException extends smithy_client_8.ServiceException { - constructor(options) { - super(options); - Object.setPrototypeOf(this, _SSOOIDCServiceException.prototype); - } - }; - var AccessDeniedException = class _AccessDeniedException extends SSOOIDCServiceException { - constructor(opts) { - super({ - name: "AccessDeniedException", - $fault: "client", - ...opts - }); - this.name = "AccessDeniedException"; - this.$fault = "client"; - Object.setPrototypeOf(this, _AccessDeniedException.prototype); - this.error = opts.error; - this.error_description = opts.error_description; + __createBinding = Object.create ? function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; } + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; }; - exports2.AccessDeniedException = AccessDeniedException; - var AuthorizationPendingException = class _AuthorizationPendingException extends SSOOIDCServiceException { - constructor(opts) { - super({ - name: "AuthorizationPendingException", - $fault: "client", - ...opts - }); - this.name = "AuthorizationPendingException"; - this.$fault = "client"; - Object.setPrototypeOf(this, _AuthorizationPendingException.prototype); - this.error = opts.error; - this.error_description = opts.error_description; - } + __setModuleDefault = Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; }; - exports2.AuthorizationPendingException = AuthorizationPendingException; - var ExpiredTokenException = class _ExpiredTokenException extends SSOOIDCServiceException { - constructor(opts) { - super({ - name: "ExpiredTokenException", - $fault: "client", - ...opts - }); - this.name = "ExpiredTokenException"; - this.$fault = "client"; - Object.setPrototypeOf(this, _ExpiredTokenException.prototype); - this.error = opts.error; - this.error_description = opts.error_description; - } + _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function(error, suppressed, message) { + var e = new Error(message); + return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; }; - exports2.ExpiredTokenException = ExpiredTokenException; - var InternalServerException = class _InternalServerException extends SSOOIDCServiceException { - constructor(opts) { - super({ - name: "InternalServerException", - $fault: "server", - ...opts - }); - this.name = "InternalServerException"; - this.$fault = "server"; - Object.setPrototypeOf(this, _InternalServerException.prototype); - this.error = opts.error; - this.error_description = opts.error_description; - } + tslib_es6_default = { + __extends, + __assign, + __rest, + __decorate, + __param, + __metadata, + __awaiter, + __generator, + __createBinding, + __exportStar, + __values, + __read, + __spread, + __spreadArrays, + __spreadArray, + __await, + __asyncGenerator, + __asyncDelegator, + __asyncValues, + __makeTemplateObject, + __importStar, + __importDefault, + __classPrivateFieldGet, + __classPrivateFieldSet, + __classPrivateFieldIn, + __addDisposableResource, + __disposeResources }; - exports2.InternalServerException = InternalServerException; - var InvalidClientException = class _InvalidClientException extends SSOOIDCServiceException { - constructor(opts) { - super({ - name: "InvalidClientException", - $fault: "client", - ...opts - }); - this.name = "InvalidClientException"; - this.$fault = "client"; - Object.setPrototypeOf(this, _InvalidClientException.prototype); - this.error = opts.error; - this.error_description = opts.error_description; + } +}); + +// ../../../node_modules/@aws-sdk/client-sfn/package.json +var require_package = __commonJS({ + "../../../node_modules/@aws-sdk/client-sfn/package.json"(exports2, module2) { + module2.exports = { + name: "@aws-sdk/client-sfn", + description: "AWS SDK for JavaScript Sfn Client for Node.js, Browser and React Native", + version: "3.632.0", + scripts: { + build: "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'", + "build:cjs": "node ../../scripts/compilation/inline client-sfn", + "build:es": "tsc -p tsconfig.es.json", + "build:include:deps": "lerna run --scope $npm_package_name --include-dependencies build", + "build:types": "tsc -p tsconfig.types.json", + "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4", + clean: "rimraf ./dist-* && rimraf *.tsbuildinfo", + "extract:docs": "api-extractor run --local", + "generate:client": "node ../../scripts/generate-clients/single-service --solo sfn" + }, + main: "./dist-cjs/index.js", + types: "./dist-types/index.d.ts", + module: "./dist-es/index.js", + sideEffects: false, + dependencies: { + "@aws-crypto/sha256-browser": "5.2.0", + "@aws-crypto/sha256-js": "5.2.0", + "@aws-sdk/client-sso-oidc": "3.632.0", + "@aws-sdk/client-sts": "3.632.0", + "@aws-sdk/core": "3.629.0", + "@aws-sdk/credential-provider-node": "3.632.0", + "@aws-sdk/middleware-host-header": "3.620.0", + "@aws-sdk/middleware-logger": "3.609.0", + "@aws-sdk/middleware-recursion-detection": "3.620.0", + "@aws-sdk/middleware-user-agent": "3.632.0", + "@aws-sdk/region-config-resolver": "3.614.0", + "@aws-sdk/types": "3.609.0", + "@aws-sdk/util-endpoints": "3.632.0", + "@aws-sdk/util-user-agent-browser": "3.609.0", + "@aws-sdk/util-user-agent-node": "3.614.0", + "@smithy/config-resolver": "^3.0.5", + "@smithy/core": "^2.3.2", + "@smithy/fetch-http-handler": "^3.2.4", + "@smithy/hash-node": "^3.0.3", + "@smithy/invalid-dependency": "^3.0.3", + "@smithy/middleware-content-length": "^3.0.5", + "@smithy/middleware-endpoint": "^3.1.0", + "@smithy/middleware-retry": "^3.0.14", + "@smithy/middleware-serde": "^3.0.3", + "@smithy/middleware-stack": "^3.0.3", + "@smithy/node-config-provider": "^3.1.4", + "@smithy/node-http-handler": "^3.1.4", + "@smithy/protocol-http": "^4.1.0", + "@smithy/smithy-client": "^3.1.12", + "@smithy/types": "^3.3.0", + "@smithy/url-parser": "^3.0.3", + "@smithy/util-base64": "^3.0.0", + "@smithy/util-body-length-browser": "^3.0.0", + "@smithy/util-body-length-node": "^3.0.0", + "@smithy/util-defaults-mode-browser": "^3.0.14", + "@smithy/util-defaults-mode-node": "^3.0.14", + "@smithy/util-endpoints": "^2.0.5", + "@smithy/util-middleware": "^3.0.3", + "@smithy/util-retry": "^3.0.3", + "@smithy/util-utf8": "^3.0.0", + tslib: "^2.6.2", + uuid: "^9.0.1" + }, + devDependencies: { + "@tsconfig/node16": "16.1.3", + "@types/node": "^16.18.96", + "@types/uuid": "^9.0.4", + concurrently: "7.0.0", + "downlevel-dts": "0.10.1", + rimraf: "3.0.2", + typescript: "~4.9.5" + }, + engines: { + node: ">=16.0.0" + }, + typesVersions: { + "<4.0": { + "dist-types/*": [ + "dist-types/ts3.4/*" + ] + } + }, + files: [ + "dist-*/**" + ], + author: { + name: "AWS SDK for JavaScript Team", + url: "https://aws.amazon.com/javascript/" + }, + license: "Apache-2.0", + browser: { + "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.browser" + }, + "react-native": { + "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.native" + }, + homepage: "https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sfn", + repository: { + type: "git", + url: "https://github.com/aws/aws-sdk-js-v3.git", + directory: "clients/client-sfn" } }; - exports2.InvalidClientException = InvalidClientException; - var InvalidGrantException = class _InvalidGrantException extends SSOOIDCServiceException { - constructor(opts) { - super({ - name: "InvalidGrantException", - $fault: "client", - ...opts - }); - this.name = "InvalidGrantException"; - this.$fault = "client"; - Object.setPrototypeOf(this, _InvalidGrantException.prototype); - this.error = opts.error; - this.error_description = opts.error_description; - } + } +}); + +// ../../../node_modules/@aws-sdk/credential-provider-env/dist-cjs/index.js +var require_dist_cjs48 = __commonJS({ + "../../../node_modules/@aws-sdk/credential-provider-env/dist-cjs/index.js"(exports2, module2) { + "use strict"; + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all) => { + for (var name in all) + __defProp2(target, name, { get: all[name], enumerable: true }); }; - var InvalidRequestException = class _InvalidRequestException extends SSOOIDCServiceException { - constructor(opts) { - super({ - name: "InvalidRequestException", - $fault: "client", - ...opts - }); - this.name = "InvalidRequestException"; - this.$fault = "client"; - Object.setPrototypeOf(this, _InvalidRequestException.prototype); - this.error = opts.error; - this.error_description = opts.error_description; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); } + return to; }; - exports2.InvalidRequestException = InvalidRequestException; - var InvalidScopeException = class _InvalidScopeException extends SSOOIDCServiceException { - constructor(opts) { - super({ - name: "InvalidScopeException", - $fault: "client", - ...opts - }); - this.name = "InvalidScopeException"; - this.$fault = "client"; - Object.setPrototypeOf(this, _InvalidScopeException.prototype); - this.error = opts.error; - this.error_description = opts.error_description; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + ENV_ACCOUNT_ID: () => ENV_ACCOUNT_ID, + ENV_CREDENTIAL_SCOPE: () => ENV_CREDENTIAL_SCOPE, + ENV_EXPIRATION: () => ENV_EXPIRATION, + ENV_KEY: () => ENV_KEY, + ENV_SECRET: () => ENV_SECRET, + ENV_SESSION: () => ENV_SESSION, + fromEnv: () => fromEnv + }); + module2.exports = __toCommonJS2(src_exports); + var import_property_provider2 = require_dist_cjs40(); + var ENV_KEY = "AWS_ACCESS_KEY_ID"; + var ENV_SECRET = "AWS_SECRET_ACCESS_KEY"; + var ENV_SESSION = "AWS_SESSION_TOKEN"; + var ENV_EXPIRATION = "AWS_CREDENTIAL_EXPIRATION"; + var ENV_CREDENTIAL_SCOPE = "AWS_CREDENTIAL_SCOPE"; + var ENV_ACCOUNT_ID = "AWS_ACCOUNT_ID"; + var fromEnv = /* @__PURE__ */ __name((init) => async () => { + var _a; + (_a = init == null ? void 0 : init.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-env - fromEnv"); + const accessKeyId = process.env[ENV_KEY]; + const secretAccessKey = process.env[ENV_SECRET]; + const sessionToken = process.env[ENV_SESSION]; + const expiry = process.env[ENV_EXPIRATION]; + const credentialScope = process.env[ENV_CREDENTIAL_SCOPE]; + const accountId = process.env[ENV_ACCOUNT_ID]; + if (accessKeyId && secretAccessKey) { + return { + accessKeyId, + secretAccessKey, + ...sessionToken && { sessionToken }, + ...expiry && { expiration: new Date(expiry) }, + ...credentialScope && { credentialScope }, + ...accountId && { accountId } + }; } + throw new import_property_provider2.CredentialsProviderError("Unable to find environment variable credentials.", { logger: init == null ? void 0 : init.logger }); + }, "fromEnv"); + } +}); + +// ../../../node_modules/@smithy/credential-provider-imds/dist-cjs/index.js +var require_dist_cjs49 = __commonJS({ + "../../../node_modules/@smithy/credential-provider-imds/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all) => { + for (var name in all) + __defProp2(target, name, { get: all[name], enumerable: true }); }; - exports2.InvalidScopeException = InvalidScopeException; - var SlowDownException = class _SlowDownException extends SSOOIDCServiceException { - constructor(opts) { - super({ - name: "SlowDownException", - $fault: "client", - ...opts - }); - this.name = "SlowDownException"; - this.$fault = "client"; - Object.setPrototypeOf(this, _SlowDownException.prototype); - this.error = opts.error; - this.error_description = opts.error_description; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); } + return to; }; - exports2.SlowDownException = SlowDownException; - var UnauthorizedClientException = class _UnauthorizedClientException extends SSOOIDCServiceException { - constructor(opts) { - super({ - name: "UnauthorizedClientException", - $fault: "client", - ...opts + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + DEFAULT_MAX_RETRIES: () => DEFAULT_MAX_RETRIES, + DEFAULT_TIMEOUT: () => DEFAULT_TIMEOUT, + ENV_CMDS_AUTH_TOKEN: () => ENV_CMDS_AUTH_TOKEN, + ENV_CMDS_FULL_URI: () => ENV_CMDS_FULL_URI, + ENV_CMDS_RELATIVE_URI: () => ENV_CMDS_RELATIVE_URI, + Endpoint: () => Endpoint, + fromContainerMetadata: () => fromContainerMetadata, + fromInstanceMetadata: () => fromInstanceMetadata, + getInstanceMetadataEndpoint: () => getInstanceMetadataEndpoint, + httpRequest: () => httpRequest, + providerConfigFromInit: () => providerConfigFromInit + }); + module2.exports = __toCommonJS2(src_exports); + var import_url = require("url"); + var import_property_provider2 = require_dist_cjs40(); + var import_buffer = require("buffer"); + var import_http2 = require("http"); + function httpRequest(options) { + return new Promise((resolve, reject) => { + var _a; + const req = (0, import_http2.request)({ + method: "GET", + ...options, + // Node.js http module doesn't accept hostname with square brackets + // Refs: https://github.com/nodejs/node/issues/39738 + hostname: (_a = options.hostname) == null ? void 0 : _a.replace(/^\[(.+)\]$/, "$1") }); - this.name = "UnauthorizedClientException"; - this.$fault = "client"; - Object.setPrototypeOf(this, _UnauthorizedClientException.prototype); - this.error = opts.error; - this.error_description = opts.error_description; - } - }; - exports2.UnauthorizedClientException = UnauthorizedClientException; - var UnsupportedGrantTypeException = class _UnsupportedGrantTypeException extends SSOOIDCServiceException { - constructor(opts) { - super({ - name: "UnsupportedGrantTypeException", - $fault: "client", - ...opts + req.on("error", (err) => { + reject(Object.assign(new import_property_provider2.ProviderError("Unable to connect to instance metadata service"), err)); + req.destroy(); }); - this.name = "UnsupportedGrantTypeException"; - this.$fault = "client"; - Object.setPrototypeOf(this, _UnsupportedGrantTypeException.prototype); - this.error = opts.error; - this.error_description = opts.error_description; - } - }; - exports2.UnsupportedGrantTypeException = UnsupportedGrantTypeException; - var InvalidClientMetadataException = class _InvalidClientMetadataException extends SSOOIDCServiceException { - constructor(opts) { - super({ - name: "InvalidClientMetadataException", - $fault: "client", - ...opts + req.on("timeout", () => { + reject(new import_property_provider2.ProviderError("TimeoutError from instance metadata service")); + req.destroy(); }); - this.name = "InvalidClientMetadataException"; - this.$fault = "client"; - Object.setPrototypeOf(this, _InvalidClientMetadataException.prototype); - this.error = opts.error; - this.error_description = opts.error_description; - } - }; - var se_CreateTokenCommand = async (input, context) => { - const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const headers = { - "content-type": "application/json" - }; - const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}/token`; - let body; - body = JSON.stringify((0, smithy_client_7.take)(input, { - clientId: [], - clientSecret: [], - code: [], - deviceCode: [], - grantType: [], - redirectUri: [], - refreshToken: [], - scope: (_) => (0, smithy_client_7._json)(_) - })); - return new protocol_http_1.HttpRequest({ - protocol, - hostname, - port, - method: "POST", - headers, - path: resolvedPath, - body - }); - }; - var se_RegisterClientCommand = async (input, context) => { - const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const headers = { - "content-type": "application/json" - }; - const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}/client/register`; - let body; - body = JSON.stringify((0, smithy_client_7.take)(input, { - clientName: [], - clientType: [], - scopes: (_) => (0, smithy_client_7._json)(_) - })); - return new protocol_http_1.HttpRequest({ - protocol, - hostname, - port, - method: "POST", - headers, - path: resolvedPath, - body - }); - }; - var se_StartDeviceAuthorizationCommand = async (input, context) => { - const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const headers = { - "content-type": "application/json" - }; - const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}/device_authorization`; - let body; - body = JSON.stringify((0, smithy_client_7.take)(input, { - clientId: [], - clientSecret: [], - startUrl: [] - })); - return new protocol_http_1.HttpRequest({ - protocol, - hostname, - port, - method: "POST", - headers, - path: resolvedPath, - body + req.on("response", (res) => { + const { statusCode = 400 } = res; + if (statusCode < 200 || 300 <= statusCode) { + reject( + Object.assign(new import_property_provider2.ProviderError("Error response received from instance metadata service"), { statusCode }) + ); + req.destroy(); + } + const chunks = []; + res.on("data", (chunk) => { + chunks.push(chunk); + }); + res.on("end", () => { + resolve(import_buffer.Buffer.concat(chunks)); + req.destroy(); + }); + }); + req.end(); }); - }; - var de_CreateTokenCommand = async (output, context) => { - if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_CreateTokenCommandError(output, context); + } + __name(httpRequest, "httpRequest"); + var isImdsCredentials = /* @__PURE__ */ __name((arg) => Boolean(arg) && typeof arg === "object" && typeof arg.AccessKeyId === "string" && typeof arg.SecretAccessKey === "string" && typeof arg.Token === "string" && typeof arg.Expiration === "string", "isImdsCredentials"); + var fromImdsCredentials = /* @__PURE__ */ __name((creds) => ({ + accessKeyId: creds.AccessKeyId, + secretAccessKey: creds.SecretAccessKey, + sessionToken: creds.Token, + expiration: new Date(creds.Expiration), + ...creds.AccountId && { accountId: creds.AccountId } + }), "fromImdsCredentials"); + var DEFAULT_TIMEOUT = 1e3; + var DEFAULT_MAX_RETRIES = 0; + var providerConfigFromInit = /* @__PURE__ */ __name(({ + maxRetries = DEFAULT_MAX_RETRIES, + timeout = DEFAULT_TIMEOUT + }) => ({ maxRetries, timeout }), "providerConfigFromInit"); + var retry = /* @__PURE__ */ __name((toRetry, maxRetries) => { + let promise = toRetry(); + for (let i = 0; i < maxRetries; i++) { + promise = promise.catch(toRetry); } - const contents = (0, smithy_client_7.map)({ - $metadata: deserializeMetadata(output) - }); - const data = (0, smithy_client_7.expectNonNull)((0, smithy_client_7.expectObject)(await parseBody(output.body, context)), "body"); - const doc = (0, smithy_client_7.take)(data, { - accessToken: smithy_client_7.expectString, - expiresIn: smithy_client_7.expectInt32, - idToken: smithy_client_7.expectString, - refreshToken: smithy_client_7.expectString, - tokenType: smithy_client_7.expectString + return promise; + }, "retry"); + var ENV_CMDS_FULL_URI = "AWS_CONTAINER_CREDENTIALS_FULL_URI"; + var ENV_CMDS_RELATIVE_URI = "AWS_CONTAINER_CREDENTIALS_RELATIVE_URI"; + var ENV_CMDS_AUTH_TOKEN = "AWS_CONTAINER_AUTHORIZATION_TOKEN"; + var fromContainerMetadata = /* @__PURE__ */ __name((init = {}) => { + const { timeout, maxRetries } = providerConfigFromInit(init); + return () => retry(async () => { + const requestOptions = await getCmdsUri({ logger: init.logger }); + const credsResponse = JSON.parse(await requestFromEcsImds(timeout, requestOptions)); + if (!isImdsCredentials(credsResponse)) { + throw new import_property_provider2.CredentialsProviderError("Invalid response received from instance metadata service.", { + logger: init.logger + }); + } + return fromImdsCredentials(credsResponse); + }, maxRetries); + }, "fromContainerMetadata"); + var requestFromEcsImds = /* @__PURE__ */ __name(async (timeout, options) => { + if (process.env[ENV_CMDS_AUTH_TOKEN]) { + options.headers = { + ...options.headers, + Authorization: process.env[ENV_CMDS_AUTH_TOKEN] + }; + } + const buffer = await httpRequest({ + ...options, + timeout }); - Object.assign(contents, doc); - return contents; + return buffer.toString(); + }, "requestFromEcsImds"); + var CMDS_IP = "169.254.170.2"; + var GREENGRASS_HOSTS = { + localhost: true, + "127.0.0.1": true }; - var de_CreateTokenCommandError = async (output, context) => { - const parsedOutput = { - ...output, - body: await parseErrorBody(output.body, context) - }; - const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); - switch (errorCode) { - case "AccessDeniedException": - case "com.amazonaws.ssooidc#AccessDeniedException": - throw await de_AccessDeniedExceptionRes(parsedOutput, context); - case "AuthorizationPendingException": - case "com.amazonaws.ssooidc#AuthorizationPendingException": - throw await de_AuthorizationPendingExceptionRes(parsedOutput, context); - case "ExpiredTokenException": - case "com.amazonaws.ssooidc#ExpiredTokenException": - throw await de_ExpiredTokenExceptionRes(parsedOutput, context); - case "InternalServerException": - case "com.amazonaws.ssooidc#InternalServerException": - throw await de_InternalServerExceptionRes(parsedOutput, context); - case "InvalidClientException": - case "com.amazonaws.ssooidc#InvalidClientException": - throw await de_InvalidClientExceptionRes(parsedOutput, context); - case "InvalidGrantException": - case "com.amazonaws.ssooidc#InvalidGrantException": - throw await de_InvalidGrantExceptionRes(parsedOutput, context); - case "InvalidRequestException": - case "com.amazonaws.ssooidc#InvalidRequestException": - throw await de_InvalidRequestExceptionRes(parsedOutput, context); - case "InvalidScopeException": - case "com.amazonaws.ssooidc#InvalidScopeException": - throw await de_InvalidScopeExceptionRes(parsedOutput, context); - case "SlowDownException": - case "com.amazonaws.ssooidc#SlowDownException": - throw await de_SlowDownExceptionRes(parsedOutput, context); - case "UnauthorizedClientException": - case "com.amazonaws.ssooidc#UnauthorizedClientException": - throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); - case "UnsupportedGrantTypeException": - case "com.amazonaws.ssooidc#UnsupportedGrantTypeException": - throw await de_UnsupportedGrantTypeExceptionRes(parsedOutput, context); - default: - const parsedBody = parsedOutput.body; - return throwDefaultError({ - output, - parsedBody, - errorCode + var GREENGRASS_PROTOCOLS = { + "http:": true, + "https:": true + }; + var getCmdsUri = /* @__PURE__ */ __name(async ({ logger }) => { + if (process.env[ENV_CMDS_RELATIVE_URI]) { + return { + hostname: CMDS_IP, + path: process.env[ENV_CMDS_RELATIVE_URI] + }; + } + if (process.env[ENV_CMDS_FULL_URI]) { + const parsed = (0, import_url.parse)(process.env[ENV_CMDS_FULL_URI]); + if (!parsed.hostname || !(parsed.hostname in GREENGRASS_HOSTS)) { + throw new import_property_provider2.CredentialsProviderError(`${parsed.hostname} is not a valid container metadata service hostname`, { + tryNextLink: false, + logger + }); + } + if (!parsed.protocol || !(parsed.protocol in GREENGRASS_PROTOCOLS)) { + throw new import_property_provider2.CredentialsProviderError(`${parsed.protocol} is not a valid container metadata service protocol`, { + tryNextLink: false, + logger }); + } + return { + ...parsed, + port: parsed.port ? parseInt(parsed.port, 10) : void 0 + }; } - }; - var de_RegisterClientCommand = async (output, context) => { - if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_RegisterClientCommandError(output, context); + throw new import_property_provider2.CredentialsProviderError( + `The container metadata credential provider cannot be used unless the ${ENV_CMDS_RELATIVE_URI} or ${ENV_CMDS_FULL_URI} environment variable is set`, + { + tryNextLink: false, + logger + } + ); + }, "getCmdsUri"); + var _InstanceMetadataV1FallbackError = class _InstanceMetadataV1FallbackError2 extends import_property_provider2.CredentialsProviderError { + constructor(message, tryNextLink = true) { + super(message, tryNextLink); + this.tryNextLink = tryNextLink; + this.name = "InstanceMetadataV1FallbackError"; + Object.setPrototypeOf(this, _InstanceMetadataV1FallbackError2.prototype); } - const contents = (0, smithy_client_7.map)({ - $metadata: deserializeMetadata(output) - }); - const data = (0, smithy_client_7.expectNonNull)((0, smithy_client_7.expectObject)(await parseBody(output.body, context)), "body"); - const doc = (0, smithy_client_7.take)(data, { - authorizationEndpoint: smithy_client_7.expectString, - clientId: smithy_client_7.expectString, - clientIdIssuedAt: smithy_client_7.expectLong, - clientSecret: smithy_client_7.expectString, - clientSecretExpiresAt: smithy_client_7.expectLong, - tokenEndpoint: smithy_client_7.expectString - }); - Object.assign(contents, doc); - return contents; }; - var de_RegisterClientCommandError = async (output, context) => { - const parsedOutput = { - ...output, - body: await parseErrorBody(output.body, context) - }; - const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); - switch (errorCode) { - case "InternalServerException": - case "com.amazonaws.ssooidc#InternalServerException": - throw await de_InternalServerExceptionRes(parsedOutput, context); - case "InvalidClientMetadataException": - case "com.amazonaws.ssooidc#InvalidClientMetadataException": - throw await de_InvalidClientMetadataExceptionRes(parsedOutput, context); - case "InvalidRequestException": - case "com.amazonaws.ssooidc#InvalidRequestException": - throw await de_InvalidRequestExceptionRes(parsedOutput, context); - case "InvalidScopeException": - case "com.amazonaws.ssooidc#InvalidScopeException": - throw await de_InvalidScopeExceptionRes(parsedOutput, context); - default: - const parsedBody = parsedOutput.body; - return throwDefaultError({ - output, - parsedBody, - errorCode - }); - } + __name(_InstanceMetadataV1FallbackError, "InstanceMetadataV1FallbackError"); + var InstanceMetadataV1FallbackError = _InstanceMetadataV1FallbackError; + var import_node_config_provider = require_dist_cjs42(); + var import_url_parser = require_dist_cjs44(); + var Endpoint = /* @__PURE__ */ ((Endpoint2) => { + Endpoint2["IPv4"] = "http://169.254.169.254"; + Endpoint2["IPv6"] = "http://[fd00:ec2::254]"; + return Endpoint2; + })(Endpoint || {}); + var ENV_ENDPOINT_NAME = "AWS_EC2_METADATA_SERVICE_ENDPOINT"; + var CONFIG_ENDPOINT_NAME = "ec2_metadata_service_endpoint"; + var ENDPOINT_CONFIG_OPTIONS = { + environmentVariableSelector: (env) => env[ENV_ENDPOINT_NAME], + configFileSelector: (profile) => profile[CONFIG_ENDPOINT_NAME], + default: void 0 }; - var de_StartDeviceAuthorizationCommand = async (output, context) => { - if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_StartDeviceAuthorizationCommandError(output, context); - } - const contents = (0, smithy_client_7.map)({ - $metadata: deserializeMetadata(output) - }); - const data = (0, smithy_client_7.expectNonNull)((0, smithy_client_7.expectObject)(await parseBody(output.body, context)), "body"); - const doc = (0, smithy_client_7.take)(data, { - deviceCode: smithy_client_7.expectString, - expiresIn: smithy_client_7.expectInt32, - interval: smithy_client_7.expectInt32, - userCode: smithy_client_7.expectString, - verificationUri: smithy_client_7.expectString, - verificationUriComplete: smithy_client_7.expectString - }); - Object.assign(contents, doc); - return contents; + var EndpointMode = /* @__PURE__ */ ((EndpointMode2) => { + EndpointMode2["IPv4"] = "IPv4"; + EndpointMode2["IPv6"] = "IPv6"; + return EndpointMode2; + })(EndpointMode || {}); + var ENV_ENDPOINT_MODE_NAME = "AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE"; + var CONFIG_ENDPOINT_MODE_NAME = "ec2_metadata_service_endpoint_mode"; + var ENDPOINT_MODE_CONFIG_OPTIONS = { + environmentVariableSelector: (env) => env[ENV_ENDPOINT_MODE_NAME], + configFileSelector: (profile) => profile[CONFIG_ENDPOINT_MODE_NAME], + default: "IPv4" + /* IPv4 */ }; - var de_StartDeviceAuthorizationCommandError = async (output, context) => { - const parsedOutput = { - ...output, - body: await parseErrorBody(output.body, context) - }; - const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); - switch (errorCode) { - case "InternalServerException": - case "com.amazonaws.ssooidc#InternalServerException": - throw await de_InternalServerExceptionRes(parsedOutput, context); - case "InvalidClientException": - case "com.amazonaws.ssooidc#InvalidClientException": - throw await de_InvalidClientExceptionRes(parsedOutput, context); - case "InvalidRequestException": - case "com.amazonaws.ssooidc#InvalidRequestException": - throw await de_InvalidRequestExceptionRes(parsedOutput, context); - case "SlowDownException": - case "com.amazonaws.ssooidc#SlowDownException": - throw await de_SlowDownExceptionRes(parsedOutput, context); - case "UnauthorizedClientException": - case "com.amazonaws.ssooidc#UnauthorizedClientException": - throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); + var getInstanceMetadataEndpoint = /* @__PURE__ */ __name(async () => (0, import_url_parser.parseUrl)(await getFromEndpointConfig() || await getFromEndpointModeConfig()), "getInstanceMetadataEndpoint"); + var getFromEndpointConfig = /* @__PURE__ */ __name(async () => (0, import_node_config_provider.loadConfig)(ENDPOINT_CONFIG_OPTIONS)(), "getFromEndpointConfig"); + var getFromEndpointModeConfig = /* @__PURE__ */ __name(async () => { + const endpointMode = await (0, import_node_config_provider.loadConfig)(ENDPOINT_MODE_CONFIG_OPTIONS)(); + switch (endpointMode) { + case "IPv4": + return "http://169.254.169.254"; + case "IPv6": + return "http://[fd00:ec2::254]"; default: - const parsedBody = parsedOutput.body; - return throwDefaultError({ - output, - parsedBody, - errorCode + throw new Error(`Unsupported endpoint mode: ${endpointMode}. Select from ${Object.values(EndpointMode)}`); + } + }, "getFromEndpointModeConfig"); + var STATIC_STABILITY_REFRESH_INTERVAL_SECONDS = 5 * 60; + var STATIC_STABILITY_REFRESH_INTERVAL_JITTER_WINDOW_SECONDS = 5 * 60; + var STATIC_STABILITY_DOC_URL = "https://docs.aws.amazon.com/sdkref/latest/guide/feature-static-credentials.html"; + var getExtendedInstanceMetadataCredentials = /* @__PURE__ */ __name((credentials, logger) => { + const refreshInterval = STATIC_STABILITY_REFRESH_INTERVAL_SECONDS + Math.floor(Math.random() * STATIC_STABILITY_REFRESH_INTERVAL_JITTER_WINDOW_SECONDS); + const newExpiration = new Date(Date.now() + refreshInterval * 1e3); + logger.warn( + `Attempting credential expiration extension due to a credential service availability issue. A refresh of these credentials will be attempted after ${new Date(newExpiration)}. +For more information, please visit: ` + STATIC_STABILITY_DOC_URL + ); + const originalExpiration = credentials.originalExpiration ?? credentials.expiration; + return { + ...credentials, + ...originalExpiration ? { originalExpiration } : {}, + expiration: newExpiration + }; + }, "getExtendedInstanceMetadataCredentials"); + var staticStabilityProvider = /* @__PURE__ */ __name((provider, options = {}) => { + const logger = (options == null ? void 0 : options.logger) || console; + let pastCredentials; + return async () => { + let credentials; + try { + credentials = await provider(); + if (credentials.expiration && credentials.expiration.getTime() < Date.now()) { + credentials = getExtendedInstanceMetadataCredentials(credentials, logger); + } + } catch (e) { + if (pastCredentials) { + logger.warn("Credential renew failed: ", e); + credentials = getExtendedInstanceMetadataCredentials(pastCredentials, logger); + } else { + throw e; + } + } + pastCredentials = credentials; + return credentials; + }; + }, "staticStabilityProvider"); + var IMDS_PATH = "/latest/meta-data/iam/security-credentials/"; + var IMDS_TOKEN_PATH = "/latest/api/token"; + var AWS_EC2_METADATA_V1_DISABLED = "AWS_EC2_METADATA_V1_DISABLED"; + var PROFILE_AWS_EC2_METADATA_V1_DISABLED = "ec2_metadata_v1_disabled"; + var X_AWS_EC2_METADATA_TOKEN = "x-aws-ec2-metadata-token"; + var fromInstanceMetadata = /* @__PURE__ */ __name((init = {}) => staticStabilityProvider(getInstanceMetadataProvider(init), { logger: init.logger }), "fromInstanceMetadata"); + var getInstanceMetadataProvider = /* @__PURE__ */ __name((init = {}) => { + let disableFetchToken = false; + const { logger, profile } = init; + const { timeout, maxRetries } = providerConfigFromInit(init); + const getCredentials = /* @__PURE__ */ __name(async (maxRetries2, options) => { + var _a; + const isImdsV1Fallback = disableFetchToken || ((_a = options.headers) == null ? void 0 : _a[X_AWS_EC2_METADATA_TOKEN]) == null; + if (isImdsV1Fallback) { + let fallbackBlockedFromProfile = false; + let fallbackBlockedFromProcessEnv = false; + const configValue = await (0, import_node_config_provider.loadConfig)( + { + environmentVariableSelector: (env) => { + const envValue = env[AWS_EC2_METADATA_V1_DISABLED]; + fallbackBlockedFromProcessEnv = !!envValue && envValue !== "false"; + if (envValue === void 0) { + throw new import_property_provider2.CredentialsProviderError( + `${AWS_EC2_METADATA_V1_DISABLED} not set in env, checking config file next.`, + { logger: init.logger } + ); + } + return fallbackBlockedFromProcessEnv; + }, + configFileSelector: (profile2) => { + const profileValue = profile2[PROFILE_AWS_EC2_METADATA_V1_DISABLED]; + fallbackBlockedFromProfile = !!profileValue && profileValue !== "false"; + return fallbackBlockedFromProfile; + }, + default: false + }, + { + profile + } + )(); + if (init.ec2MetadataV1Disabled || configValue) { + const causes = []; + if (init.ec2MetadataV1Disabled) + causes.push("credential provider initialization (runtime option ec2MetadataV1Disabled)"); + if (fallbackBlockedFromProfile) + causes.push(`config file profile (${PROFILE_AWS_EC2_METADATA_V1_DISABLED})`); + if (fallbackBlockedFromProcessEnv) + causes.push(`process environment variable (${AWS_EC2_METADATA_V1_DISABLED})`); + throw new InstanceMetadataV1FallbackError( + `AWS EC2 Metadata v1 fallback has been blocked by AWS SDK configuration in the following: [${causes.join( + ", " + )}].` + ); + } + } + const imdsProfile = (await retry(async () => { + let profile2; + try { + profile2 = await getProfile(options); + } catch (err) { + if (err.statusCode === 401) { + disableFetchToken = false; + } + throw err; + } + return profile2; + }, maxRetries2)).trim(); + return retry(async () => { + let creds; + try { + creds = await getCredentialsFromProfile(imdsProfile, options, init); + } catch (err) { + if (err.statusCode === 401) { + disableFetchToken = false; + } + throw err; + } + return creds; + }, maxRetries2); + }, "getCredentials"); + return async () => { + const endpoint = await getInstanceMetadataEndpoint(); + if (disableFetchToken) { + logger == null ? void 0 : logger.debug("AWS SDK Instance Metadata", "using v1 fallback (no token fetch)"); + return getCredentials(maxRetries, { ...endpoint, timeout }); + } else { + let token; + try { + token = (await getMetadataToken({ ...endpoint, timeout })).toString(); + } catch (error) { + if ((error == null ? void 0 : error.statusCode) === 400) { + throw Object.assign(error, { + message: "EC2 Metadata token request returned error" + }); + } else if (error.message === "TimeoutError" || [403, 404, 405].includes(error.statusCode)) { + disableFetchToken = true; + } + logger == null ? void 0 : logger.debug("AWS SDK Instance Metadata", "using v1 fallback (initial)"); + return getCredentials(maxRetries, { ...endpoint, timeout }); + } + return getCredentials(maxRetries, { + ...endpoint, + headers: { + [X_AWS_EC2_METADATA_TOKEN]: token + }, + timeout }); - } - }; - var throwDefaultError = (0, smithy_client_7.withBaseException)(SSOOIDCServiceException); - var de_AccessDeniedExceptionRes = async (parsedOutput, context) => { - const contents = (0, smithy_client_7.map)({}); - const data = parsedOutput.body; - const doc = (0, smithy_client_7.take)(data, { - error: smithy_client_7.expectString, - error_description: smithy_client_7.expectString - }); - Object.assign(contents, doc); - const exception = new AccessDeniedException({ - $metadata: deserializeMetadata(parsedOutput), - ...contents - }); - return (0, smithy_client_7.decorateServiceException)(exception, parsedOutput.body); - }; - var de_AuthorizationPendingExceptionRes = async (parsedOutput, context) => { - const contents = (0, smithy_client_7.map)({}); - const data = parsedOutput.body; - const doc = (0, smithy_client_7.take)(data, { - error: smithy_client_7.expectString, - error_description: smithy_client_7.expectString - }); - Object.assign(contents, doc); - const exception = new AuthorizationPendingException({ - $metadata: deserializeMetadata(parsedOutput), - ...contents - }); - return (0, smithy_client_7.decorateServiceException)(exception, parsedOutput.body); - }; - var de_ExpiredTokenExceptionRes = async (parsedOutput, context) => { - const contents = (0, smithy_client_7.map)({}); - const data = parsedOutput.body; - const doc = (0, smithy_client_7.take)(data, { - error: smithy_client_7.expectString, - error_description: smithy_client_7.expectString - }); - Object.assign(contents, doc); - const exception = new ExpiredTokenException({ - $metadata: deserializeMetadata(parsedOutput), - ...contents - }); - return (0, smithy_client_7.decorateServiceException)(exception, parsedOutput.body); - }; - var de_InternalServerExceptionRes = async (parsedOutput, context) => { - const contents = (0, smithy_client_7.map)({}); - const data = parsedOutput.body; - const doc = (0, smithy_client_7.take)(data, { - error: smithy_client_7.expectString, - error_description: smithy_client_7.expectString - }); - Object.assign(contents, doc); - const exception = new InternalServerException({ - $metadata: deserializeMetadata(parsedOutput), - ...contents - }); - return (0, smithy_client_7.decorateServiceException)(exception, parsedOutput.body); - }; - var de_InvalidClientExceptionRes = async (parsedOutput, context) => { - const contents = (0, smithy_client_7.map)({}); - const data = parsedOutput.body; - const doc = (0, smithy_client_7.take)(data, { - error: smithy_client_7.expectString, - error_description: smithy_client_7.expectString - }); - Object.assign(contents, doc); - const exception = new InvalidClientException({ - $metadata: deserializeMetadata(parsedOutput), - ...contents - }); - return (0, smithy_client_7.decorateServiceException)(exception, parsedOutput.body); - }; - var de_InvalidClientMetadataExceptionRes = async (parsedOutput, context) => { - const contents = (0, smithy_client_7.map)({}); - const data = parsedOutput.body; - const doc = (0, smithy_client_7.take)(data, { - error: smithy_client_7.expectString, - error_description: smithy_client_7.expectString - }); - Object.assign(contents, doc); - const exception = new InvalidClientMetadataException({ - $metadata: deserializeMetadata(parsedOutput), - ...contents - }); - return (0, smithy_client_7.decorateServiceException)(exception, parsedOutput.body); - }; - var de_InvalidGrantExceptionRes = async (parsedOutput, context) => { - const contents = (0, smithy_client_7.map)({}); - const data = parsedOutput.body; - const doc = (0, smithy_client_7.take)(data, { - error: smithy_client_7.expectString, - error_description: smithy_client_7.expectString - }); - Object.assign(contents, doc); - const exception = new InvalidGrantException({ - $metadata: deserializeMetadata(parsedOutput), - ...contents - }); - return (0, smithy_client_7.decorateServiceException)(exception, parsedOutput.body); - }; - var de_InvalidRequestExceptionRes = async (parsedOutput, context) => { - const contents = (0, smithy_client_7.map)({}); - const data = parsedOutput.body; - const doc = (0, smithy_client_7.take)(data, { - error: smithy_client_7.expectString, - error_description: smithy_client_7.expectString - }); - Object.assign(contents, doc); - const exception = new InvalidRequestException({ - $metadata: deserializeMetadata(parsedOutput), - ...contents - }); - return (0, smithy_client_7.decorateServiceException)(exception, parsedOutput.body); - }; - var de_InvalidScopeExceptionRes = async (parsedOutput, context) => { - const contents = (0, smithy_client_7.map)({}); - const data = parsedOutput.body; - const doc = (0, smithy_client_7.take)(data, { - error: smithy_client_7.expectString, - error_description: smithy_client_7.expectString - }); - Object.assign(contents, doc); - const exception = new InvalidScopeException({ - $metadata: deserializeMetadata(parsedOutput), - ...contents - }); - return (0, smithy_client_7.decorateServiceException)(exception, parsedOutput.body); - }; - var de_SlowDownExceptionRes = async (parsedOutput, context) => { - const contents = (0, smithy_client_7.map)({}); - const data = parsedOutput.body; - const doc = (0, smithy_client_7.take)(data, { - error: smithy_client_7.expectString, - error_description: smithy_client_7.expectString - }); - Object.assign(contents, doc); - const exception = new SlowDownException({ - $metadata: deserializeMetadata(parsedOutput), - ...contents - }); - return (0, smithy_client_7.decorateServiceException)(exception, parsedOutput.body); - }; - var de_UnauthorizedClientExceptionRes = async (parsedOutput, context) => { - const contents = (0, smithy_client_7.map)({}); - const data = parsedOutput.body; - const doc = (0, smithy_client_7.take)(data, { - error: smithy_client_7.expectString, - error_description: smithy_client_7.expectString - }); - Object.assign(contents, doc); - const exception = new UnauthorizedClientException({ - $metadata: deserializeMetadata(parsedOutput), - ...contents - }); - return (0, smithy_client_7.decorateServiceException)(exception, parsedOutput.body); - }; - var de_UnsupportedGrantTypeExceptionRes = async (parsedOutput, context) => { - const contents = (0, smithy_client_7.map)({}); - const data = parsedOutput.body; - const doc = (0, smithy_client_7.take)(data, { - error: smithy_client_7.expectString, - error_description: smithy_client_7.expectString - }); - Object.assign(contents, doc); - const exception = new UnsupportedGrantTypeException({ - $metadata: deserializeMetadata(parsedOutput), - ...contents - }); - return (0, smithy_client_7.decorateServiceException)(exception, parsedOutput.body); - }; - var deserializeMetadata = (output) => { - var _a, _b; - return { - httpStatusCode: output.statusCode, - requestId: (_b = (_a = output.headers["x-amzn-requestid"]) !== null && _a !== void 0 ? _a : output.headers["x-amzn-request-id"]) !== null && _b !== void 0 ? _b : output.headers["x-amz-request-id"], - extendedRequestId: output.headers["x-amz-id-2"], - cfId: output.headers["x-amz-cf-id"] + } }; + }, "getInstanceMetadataProvider"); + var getMetadataToken = /* @__PURE__ */ __name(async (options) => httpRequest({ + ...options, + path: IMDS_TOKEN_PATH, + method: "PUT", + headers: { + "x-aws-ec2-metadata-token-ttl-seconds": "21600" + } + }), "getMetadataToken"); + var getProfile = /* @__PURE__ */ __name(async (options) => (await httpRequest({ ...options, path: IMDS_PATH })).toString(), "getProfile"); + var getCredentialsFromProfile = /* @__PURE__ */ __name(async (profile, options, init) => { + const credentialsResponse = JSON.parse( + (await httpRequest({ + ...options, + path: IMDS_PATH + profile + })).toString() + ); + if (!isImdsCredentials(credentialsResponse)) { + throw new import_property_provider2.CredentialsProviderError("Invalid response received from instance metadata service.", { + logger: init.logger + }); + } + return fromImdsCredentials(credentialsResponse); + }, "getCredentialsFromProfile"); + } +}); + +// ../../../node_modules/@smithy/node-http-handler/node_modules/@smithy/querystring-builder/dist-cjs/index.js +var require_dist_cjs50 = __commonJS({ + "../../../node_modules/@smithy/node-http-handler/node_modules/@smithy/querystring-builder/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all) => { + for (var name in all) + __defProp2(target, name, { get: all[name], enumerable: true }); }; - var collectBodyString = (streamBody, context) => (0, smithy_client_7.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body)); - var parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => { - if (encoded.length) { - return JSON.parse(encoded); + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); } - return {}; - }); - var parseErrorBody = async (errorBody, context) => { - var _a; - const value = await parseBody(errorBody, context); - value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message; - return value; + return to; }; - var loadRestJsonErrorCode = (output, data) => { - const findKey = (object, key) => Object.keys(object).find((k2) => k2.toLowerCase() === key.toLowerCase()); - const sanitizeErrorCode = (rawValue) => { - let cleanValue = rawValue; - if (typeof cleanValue === "number") { - cleanValue = cleanValue.toString(); - } - if (cleanValue.indexOf(",") >= 0) { - cleanValue = cleanValue.split(",")[0]; - } - if (cleanValue.indexOf(":") >= 0) { - cleanValue = cleanValue.split(":")[0]; - } - if (cleanValue.indexOf("#") >= 0) { - cleanValue = cleanValue.split("#")[1]; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + buildQueryString: () => buildQueryString + }); + module2.exports = __toCommonJS2(src_exports); + var import_util_uri_escape = require_dist_cjs31(); + function buildQueryString(query) { + const parts = []; + for (let key of Object.keys(query).sort()) { + const value = query[key]; + key = (0, import_util_uri_escape.escapeUri)(key); + if (Array.isArray(value)) { + for (let i = 0, iLen = value.length; i < iLen; i++) { + parts.push(`${key}=${(0, import_util_uri_escape.escapeUri)(value[i])}`); + } + } else { + let qsEntry = key; + if (value || typeof value === "string") { + qsEntry += `=${(0, import_util_uri_escape.escapeUri)(value)}`; + } + parts.push(qsEntry); } - return cleanValue; - }; - const headerKey = findKey(output.headers, "x-amzn-errortype"); - if (headerKey !== void 0) { - return sanitizeErrorCode(output.headers[headerKey]); - } - if (data.code !== void 0) { - return sanitizeErrorCode(data.code); } - if (data["__type"] !== void 0) { - return sanitizeErrorCode(data["__type"]); + return parts.join("&"); + } + __name(buildQueryString, "buildQueryString"); + } +}); + +// ../../../node_modules/@smithy/node-http-handler/dist-cjs/index.js +var require_dist_cjs51 = __commonJS({ + "../../../node_modules/@smithy/node-http-handler/dist-cjs/index.js"(exports2, module2) { + var __create2 = Object.create; + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __getProtoOf2 = Object.getPrototypeOf; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all) => { + for (var name in all) + __defProp2(target, name, { get: all[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); } + return to; }; - var CreateTokenCommand = class _CreateTokenCommand extends smithy_client_6.Command { - constructor(input) { - super(); - this.input = input; + var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target, + mod + )); + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + DEFAULT_REQUEST_TIMEOUT: () => DEFAULT_REQUEST_TIMEOUT, + NodeHttp2Handler: () => NodeHttp2Handler, + NodeHttpHandler: () => NodeHttpHandler, + streamCollector: () => streamCollector + }); + module2.exports = __toCommonJS2(src_exports); + var import_protocol_http8 = require_dist_cjs2(); + var import_querystring_builder = require_dist_cjs50(); + var import_http2 = require("http"); + var import_https = require("https"); + var NODEJS_TIMEOUT_ERROR_CODES = ["ECONNRESET", "EPIPE", "ETIMEDOUT"]; + var getTransformedHeaders = /* @__PURE__ */ __name((headers) => { + const transformedHeaders = {}; + for (const name of Object.keys(headers)) { + const headerValues = headers[name]; + transformedHeaders[name] = Array.isArray(headerValues) ? headerValues.join(",") : headerValues; + } + return transformedHeaders; + }, "getTransformedHeaders"); + var DEFER_EVENT_LISTENER_TIME = 1e3; + var setConnectionTimeout = /* @__PURE__ */ __name((request2, reject, timeoutInMs = 0) => { + if (!timeoutInMs) { + return -1; + } + const registerTimeout = /* @__PURE__ */ __name((offset) => { + const timeoutId = setTimeout(() => { + request2.destroy(); + reject( + Object.assign(new Error(`Socket timed out without establishing a connection within ${timeoutInMs} ms`), { + name: "TimeoutError" + }) + ); + }, timeoutInMs - offset); + const doWithSocket = /* @__PURE__ */ __name((socket) => { + if (socket == null ? void 0 : socket.connecting) { + socket.on("connect", () => { + clearTimeout(timeoutId); + }); + } else { + clearTimeout(timeoutId); + } + }, "doWithSocket"); + if (request2.socket) { + doWithSocket(request2.socket); + } else { + request2.on("socket", doWithSocket); + } + }, "registerTimeout"); + if (timeoutInMs < 2e3) { + registerTimeout(0); + return 0; } - static getEndpointParameterInstructions() { - return { - UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, - Endpoint: { type: "builtInParams", name: "endpoint" }, - Region: { type: "builtInParams", name: "region" }, - UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" } - }; + return setTimeout(registerTimeout.bind(null, DEFER_EVENT_LISTENER_TIME), DEFER_EVENT_LISTENER_TIME); + }, "setConnectionTimeout"); + var DEFER_EVENT_LISTENER_TIME2 = 3e3; + var setSocketKeepAlive = /* @__PURE__ */ __name((request2, { keepAlive, keepAliveMsecs }, deferTimeMs = DEFER_EVENT_LISTENER_TIME2) => { + if (keepAlive !== true) { + return -1; } - resolveMiddleware(clientStack, configuration, options) { - this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_endpoint_2.getEndpointPlugin)(configuration, _CreateTokenCommand.getEndpointParameterInstructions())); - const stack = clientStack.concat(this.middlewareStack); - const { logger } = configuration; - const clientName = "SSOOIDCClient"; - const commandName = "CreateTokenCommand"; - const handlerExecutionContext = { - logger, - clientName, - commandName, - inputFilterSensitiveLog: (_) => _, - outputFilterSensitiveLog: (_) => _ - }; - const { requestHandler } = configuration; - return stack.resolve((request2) => requestHandler.handle(request2.request, options || {}), handlerExecutionContext); + const registerListener = /* @__PURE__ */ __name(() => { + if (request2.socket) { + request2.socket.setKeepAlive(keepAlive, keepAliveMsecs || 0); + } else { + request2.on("socket", (socket) => { + socket.setKeepAlive(keepAlive, keepAliveMsecs || 0); + }); + } + }, "registerListener"); + if (deferTimeMs === 0) { + registerListener(); + return 0; } - serialize(input, context) { - return se_CreateTokenCommand(input, context); + return setTimeout(registerListener, deferTimeMs); + }, "setSocketKeepAlive"); + var DEFER_EVENT_LISTENER_TIME3 = 3e3; + var setSocketTimeout = /* @__PURE__ */ __name((request2, reject, timeoutInMs = 0) => { + const registerTimeout = /* @__PURE__ */ __name((offset) => { + request2.setTimeout(timeoutInMs - offset, () => { + request2.destroy(); + reject(Object.assign(new Error(`Connection timed out after ${timeoutInMs} ms`), { name: "TimeoutError" })); + }); + }, "registerTimeout"); + if (0 < timeoutInMs && timeoutInMs < 6e3) { + registerTimeout(0); + return 0; } - deserialize(output, context) { - return de_CreateTokenCommand(output, context); + return setTimeout( + registerTimeout.bind(null, timeoutInMs === 0 ? 0 : DEFER_EVENT_LISTENER_TIME3), + DEFER_EVENT_LISTENER_TIME3 + ); + }, "setSocketTimeout"); + var import_stream = require("stream"); + var MIN_WAIT_TIME = 1e3; + async function writeRequestBody(httpRequest, request2, maxContinueTimeoutMs = MIN_WAIT_TIME) { + const headers = request2.headers ?? {}; + const expect = headers["Expect"] || headers["expect"]; + let timeoutId = -1; + let hasError = false; + if (expect === "100-continue") { + await Promise.race([ + new Promise((resolve) => { + timeoutId = Number(setTimeout(resolve, Math.max(MIN_WAIT_TIME, maxContinueTimeoutMs))); + }), + new Promise((resolve) => { + httpRequest.on("continue", () => { + clearTimeout(timeoutId); + resolve(); + }); + httpRequest.on("error", () => { + hasError = true; + clearTimeout(timeoutId); + resolve(); + }); + }) + ]); } - }; - exports2.CreateTokenCommand = CreateTokenCommand; - var middleware_endpoint_3 = require_dist_cjs26(); - var middleware_serde_2 = require_dist_cjs25(); - var smithy_client_9 = require_dist_cjs34(); - var RegisterClientCommand = class _RegisterClientCommand extends smithy_client_9.Command { - constructor(input) { - super(); - this.input = input; + if (!hasError) { + writeBody(httpRequest, request2.body); } - static getEndpointParameterInstructions() { - return { - UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, - Endpoint: { type: "builtInParams", name: "endpoint" }, - Region: { type: "builtInParams", name: "region" }, - UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" } - }; + } + __name(writeRequestBody, "writeRequestBody"); + function writeBody(httpRequest, body) { + if (body instanceof import_stream.Readable) { + body.pipe(httpRequest); + return; } - resolveMiddleware(clientStack, configuration, options) { - this.middlewareStack.use((0, middleware_serde_2.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_endpoint_3.getEndpointPlugin)(configuration, _RegisterClientCommand.getEndpointParameterInstructions())); - const stack = clientStack.concat(this.middlewareStack); - const { logger } = configuration; - const clientName = "SSOOIDCClient"; - const commandName = "RegisterClientCommand"; - const handlerExecutionContext = { - logger, - clientName, - commandName, - inputFilterSensitiveLog: (_) => _, - outputFilterSensitiveLog: (_) => _ - }; - const { requestHandler } = configuration; - return stack.resolve((request2) => requestHandler.handle(request2.request, options || {}), handlerExecutionContext); + if (body) { + if (Buffer.isBuffer(body) || typeof body === "string") { + httpRequest.end(body); + return; + } + const uint8 = body; + if (typeof uint8 === "object" && uint8.buffer && typeof uint8.byteOffset === "number" && typeof uint8.byteLength === "number") { + httpRequest.end(Buffer.from(uint8.buffer, uint8.byteOffset, uint8.byteLength)); + return; + } + httpRequest.end(Buffer.from(body)); + return; } - serialize(input, context) { - return se_RegisterClientCommand(input, context); + httpRequest.end(); + } + __name(writeBody, "writeBody"); + var DEFAULT_REQUEST_TIMEOUT = 0; + var _NodeHttpHandler = class _NodeHttpHandler2 { + constructor(options) { + this.socketWarningTimestamp = 0; + this.metadata = { handlerProtocol: "http/1.1" }; + this.configProvider = new Promise((resolve, reject) => { + if (typeof options === "function") { + options().then((_options) => { + resolve(this.resolveDefaultConfig(_options)); + }).catch(reject); + } else { + resolve(this.resolveDefaultConfig(options)); + } + }); } - deserialize(output, context) { - return de_RegisterClientCommand(output, context); + /** + * @returns the input if it is an HttpHandler of any class, + * or instantiates a new instance of this handler. + */ + static create(instanceOrOptions) { + if (typeof (instanceOrOptions == null ? void 0 : instanceOrOptions.handle) === "function") { + return instanceOrOptions; + } + return new _NodeHttpHandler2(instanceOrOptions); } - }; - var middleware_endpoint_4 = require_dist_cjs26(); - var middleware_serde_3 = require_dist_cjs25(); - var smithy_client_10 = require_dist_cjs34(); - var StartDeviceAuthorizationCommand = class _StartDeviceAuthorizationCommand extends smithy_client_10.Command { - constructor(input) { - super(); - this.input = input; + /** + * @internal + * + * @param agent - http(s) agent in use by the NodeHttpHandler instance. + * @param socketWarningTimestamp - last socket usage check timestamp. + * @param logger - channel for the warning. + * @returns timestamp of last emitted warning. + */ + static checkSocketUsage(agent, socketWarningTimestamp, logger = console) { + var _a, _b, _c; + const { sockets, requests, maxSockets } = agent; + if (typeof maxSockets !== "number" || maxSockets === Infinity) { + return socketWarningTimestamp; + } + const interval = 15e3; + if (Date.now() - interval < socketWarningTimestamp) { + return socketWarningTimestamp; + } + if (sockets && requests) { + for (const origin in sockets) { + const socketsInUse = ((_a = sockets[origin]) == null ? void 0 : _a.length) ?? 0; + const requestsEnqueued = ((_b = requests[origin]) == null ? void 0 : _b.length) ?? 0; + if (socketsInUse >= maxSockets && requestsEnqueued >= 2 * maxSockets) { + (_c = logger == null ? void 0 : logger.warn) == null ? void 0 : _c.call( + logger, + `@smithy/node-http-handler:WARN - socket usage at capacity=${socketsInUse} and ${requestsEnqueued} additional requests are enqueued. +See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html +or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.` + ); + return Date.now(); + } + } + } + return socketWarningTimestamp; } - static getEndpointParameterInstructions() { + resolveDefaultConfig(options) { + const { requestTimeout, connectionTimeout, socketTimeout, httpAgent, httpsAgent } = options || {}; + const keepAlive = true; + const maxSockets = 50; return { - UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, - Endpoint: { type: "builtInParams", name: "endpoint" }, - Region: { type: "builtInParams", name: "region" }, - UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" } - }; - } - resolveMiddleware(clientStack, configuration, options) { - this.middlewareStack.use((0, middleware_serde_3.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_endpoint_4.getEndpointPlugin)(configuration, _StartDeviceAuthorizationCommand.getEndpointParameterInstructions())); - const stack = clientStack.concat(this.middlewareStack); - const { logger } = configuration; - const clientName = "SSOOIDCClient"; - const commandName = "StartDeviceAuthorizationCommand"; - const handlerExecutionContext = { - logger, - clientName, - commandName, - inputFilterSensitiveLog: (_) => _, - outputFilterSensitiveLog: (_) => _ + connectionTimeout, + requestTimeout: requestTimeout ?? socketTimeout, + httpAgent: (() => { + if (httpAgent instanceof import_http2.Agent || typeof (httpAgent == null ? void 0 : httpAgent.destroy) === "function") { + return httpAgent; + } + return new import_http2.Agent({ keepAlive, maxSockets, ...httpAgent }); + })(), + httpsAgent: (() => { + if (httpsAgent instanceof import_https.Agent || typeof (httpsAgent == null ? void 0 : httpsAgent.destroy) === "function") { + return httpsAgent; + } + return new import_https.Agent({ keepAlive, maxSockets, ...httpsAgent }); + })(), + logger: console }; - const { requestHandler } = configuration; - return stack.resolve((request2) => requestHandler.handle(request2.request, options || {}), handlerExecutionContext); - } - serialize(input, context) { - return se_StartDeviceAuthorizationCommand(input, context); } - deserialize(output, context) { - return de_StartDeviceAuthorizationCommand(output, context); + destroy() { + var _a, _b, _c, _d; + (_b = (_a = this.config) == null ? void 0 : _a.httpAgent) == null ? void 0 : _b.destroy(); + (_d = (_c = this.config) == null ? void 0 : _c.httpsAgent) == null ? void 0 : _d.destroy(); } - }; - var commands = { - CreateTokenCommand, - RegisterClientCommand, - StartDeviceAuthorizationCommand - }; - var SSOOIDC = class extends SSOOIDCClient { - }; - (0, smithy_client_5.createAggregatedClient)(commands, SSOOIDC); - } -}); - -// ../../../node_modules/@aws-sdk/token-providers/dist-cjs/constants.js -var require_constants2 = __commonJS({ - "../../../node_modules/@aws-sdk/token-providers/dist-cjs/constants.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.REFRESH_MESSAGE = exports2.EXPIRE_WINDOW_MS = void 0; - exports2.EXPIRE_WINDOW_MS = 5 * 60 * 1e3; - exports2.REFRESH_MESSAGE = `To refresh this SSO session run 'aws sso login' with the corresponding profile.`; - } -}); - -// ../../../node_modules/@aws-sdk/token-providers/dist-cjs/getSsoOidcClient.js -var require_getSsoOidcClient = __commonJS({ - "../../../node_modules/@aws-sdk/token-providers/dist-cjs/getSsoOidcClient.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getSsoOidcClient = void 0; - var client_sso_oidc_node_1 = require_client_sso_oidc_node(); - var ssoOidcClientsHash = {}; - var getSsoOidcClient = (ssoRegion) => { - if (ssoOidcClientsHash[ssoRegion]) { - return ssoOidcClientsHash[ssoRegion]; + async handle(request2, { abortSignal } = {}) { + if (!this.config) { + this.config = await this.configProvider; + } + return new Promise((_resolve, _reject) => { + let writeRequestBodyPromise = void 0; + const timeouts = []; + const resolve = /* @__PURE__ */ __name(async (arg) => { + await writeRequestBodyPromise; + timeouts.forEach(clearTimeout); + _resolve(arg); + }, "resolve"); + const reject = /* @__PURE__ */ __name(async (arg) => { + await writeRequestBodyPromise; + timeouts.forEach(clearTimeout); + _reject(arg); + }, "reject"); + if (!this.config) { + throw new Error("Node HTTP request handler config is not resolved"); + } + if (abortSignal == null ? void 0 : abortSignal.aborted) { + const abortError = new Error("Request aborted"); + abortError.name = "AbortError"; + reject(abortError); + return; + } + const isSSL = request2.protocol === "https:"; + const agent = isSSL ? this.config.httpsAgent : this.config.httpAgent; + timeouts.push( + setTimeout( + () => { + this.socketWarningTimestamp = _NodeHttpHandler2.checkSocketUsage( + agent, + this.socketWarningTimestamp, + this.config.logger + ); + }, + this.config.socketAcquisitionWarningTimeout ?? (this.config.requestTimeout ?? 2e3) + (this.config.connectionTimeout ?? 1e3) + ) + ); + const queryString = (0, import_querystring_builder.buildQueryString)(request2.query || {}); + let auth = void 0; + if (request2.username != null || request2.password != null) { + const username = request2.username ?? ""; + const password = request2.password ?? ""; + auth = `${username}:${password}`; + } + let path = request2.path; + if (queryString) { + path += `?${queryString}`; + } + if (request2.fragment) { + path += `#${request2.fragment}`; + } + const nodeHttpsOptions = { + headers: request2.headers, + host: request2.hostname, + method: request2.method, + path, + port: request2.port, + agent, + auth + }; + const requestFunc = isSSL ? import_https.request : import_http2.request; + const req = requestFunc(nodeHttpsOptions, (res) => { + const httpResponse = new import_protocol_http8.HttpResponse({ + statusCode: res.statusCode || -1, + reason: res.statusMessage, + headers: getTransformedHeaders(res.headers), + body: res + }); + resolve({ response: httpResponse }); + }); + req.on("error", (err) => { + if (NODEJS_TIMEOUT_ERROR_CODES.includes(err.code)) { + reject(Object.assign(err, { name: "TimeoutError" })); + } else { + reject(err); + } + }); + if (abortSignal) { + const onAbort = /* @__PURE__ */ __name(() => { + req.destroy(); + const abortError = new Error("Request aborted"); + abortError.name = "AbortError"; + reject(abortError); + }, "onAbort"); + if (typeof abortSignal.addEventListener === "function") { + const signal = abortSignal; + signal.addEventListener("abort", onAbort, { once: true }); + req.once("close", () => signal.removeEventListener("abort", onAbort)); + } else { + abortSignal.onabort = onAbort; + } + } + timeouts.push(setConnectionTimeout(req, reject, this.config.connectionTimeout)); + timeouts.push(setSocketTimeout(req, reject, this.config.requestTimeout)); + const httpAgent = nodeHttpsOptions.agent; + if (typeof httpAgent === "object" && "keepAlive" in httpAgent) { + timeouts.push( + setSocketKeepAlive(req, { + // @ts-expect-error keepAlive is not public on httpAgent. + keepAlive: httpAgent.keepAlive, + // @ts-expect-error keepAliveMsecs is not public on httpAgent. + keepAliveMsecs: httpAgent.keepAliveMsecs + }) + ); + } + writeRequestBodyPromise = writeRequestBody(req, request2, this.config.requestTimeout).catch((e) => { + timeouts.forEach(clearTimeout); + return _reject(e); + }); + }); } - const ssoOidcClient = new client_sso_oidc_node_1.SSOOIDCClient({ region: ssoRegion }); - ssoOidcClientsHash[ssoRegion] = ssoOidcClient; - return ssoOidcClient; - }; - exports2.getSsoOidcClient = getSsoOidcClient; - } -}); - -// ../../../node_modules/@aws-sdk/token-providers/dist-cjs/getNewSsoOidcToken.js -var require_getNewSsoOidcToken = __commonJS({ - "../../../node_modules/@aws-sdk/token-providers/dist-cjs/getNewSsoOidcToken.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getNewSsoOidcToken = void 0; - var client_sso_oidc_node_1 = require_client_sso_oidc_node(); - var getSsoOidcClient_1 = require_getSsoOidcClient(); - var getNewSsoOidcToken = (ssoToken, ssoRegion) => { - const ssoOidcClient = (0, getSsoOidcClient_1.getSsoOidcClient)(ssoRegion); - return ssoOidcClient.send(new client_sso_oidc_node_1.CreateTokenCommand({ - clientId: ssoToken.clientId, - clientSecret: ssoToken.clientSecret, - refreshToken: ssoToken.refreshToken, - grantType: "refresh_token" - })); - }; - exports2.getNewSsoOidcToken = getNewSsoOidcToken; - } -}); - -// ../../../node_modules/@aws-sdk/token-providers/dist-cjs/validateTokenExpiry.js -var require_validateTokenExpiry = __commonJS({ - "../../../node_modules/@aws-sdk/token-providers/dist-cjs/validateTokenExpiry.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.validateTokenExpiry = void 0; - var property_provider_1 = require_dist_cjs6(); - var constants_1 = require_constants2(); - var validateTokenExpiry = (token) => { - if (token.expiration && token.expiration.getTime() < Date.now()) { - throw new property_provider_1.TokenProviderError(`Token is expired. ${constants_1.REFRESH_MESSAGE}`, false); + updateHttpClientConfig(key, value) { + this.config = void 0; + this.configProvider = this.configProvider.then((config) => { + return { + ...config, + [key]: value + }; + }); } - }; - exports2.validateTokenExpiry = validateTokenExpiry; - } -}); - -// ../../../node_modules/@aws-sdk/token-providers/dist-cjs/validateTokenKey.js -var require_validateTokenKey = __commonJS({ - "../../../node_modules/@aws-sdk/token-providers/dist-cjs/validateTokenKey.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.validateTokenKey = void 0; - var property_provider_1 = require_dist_cjs6(); - var constants_1 = require_constants2(); - var validateTokenKey = (key, value, forRefresh = false) => { - if (typeof value === "undefined") { - throw new property_provider_1.TokenProviderError(`Value not present for '${key}' in SSO Token${forRefresh ? ". Cannot refresh" : ""}. ${constants_1.REFRESH_MESSAGE}`, false); + httpHandlerConfigs() { + return this.config ?? {}; } }; - exports2.validateTokenKey = validateTokenKey; - } -}); - -// ../../../node_modules/@aws-sdk/token-providers/dist-cjs/writeSSOTokenToFile.js -var require_writeSSOTokenToFile = __commonJS({ - "../../../node_modules/@aws-sdk/token-providers/dist-cjs/writeSSOTokenToFile.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.writeSSOTokenToFile = void 0; - var shared_ini_file_loader_1 = require_dist_cjs21(); - var fs_1 = require("fs"); - var { writeFile } = fs_1.promises; - var writeSSOTokenToFile = (id, ssoToken) => { - const tokenFilepath = (0, shared_ini_file_loader_1.getSSOTokenFilepath)(id); - const tokenString = JSON.stringify(ssoToken, null, 2); - return writeFile(tokenFilepath, tokenString); - }; - exports2.writeSSOTokenToFile = writeSSOTokenToFile; - } -}); - -// ../../../node_modules/@aws-sdk/token-providers/dist-cjs/fromSso.js -var require_fromSso = __commonJS({ - "../../../node_modules/@aws-sdk/token-providers/dist-cjs/fromSso.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.fromSso = void 0; - var property_provider_1 = require_dist_cjs6(); - var shared_ini_file_loader_1 = require_dist_cjs21(); - var constants_1 = require_constants2(); - var getNewSsoOidcToken_1 = require_getNewSsoOidcToken(); - var validateTokenExpiry_1 = require_validateTokenExpiry(); - var validateTokenKey_1 = require_validateTokenKey(); - var writeSSOTokenToFile_1 = require_writeSSOTokenToFile(); - var lastRefreshAttemptTime = /* @__PURE__ */ new Date(0); - var fromSso = (init = {}) => async () => { - const profiles = await (0, shared_ini_file_loader_1.parseKnownFiles)(init); - const profileName = (0, shared_ini_file_loader_1.getProfileName)(init); - const profile = profiles[profileName]; - if (!profile) { - throw new property_provider_1.TokenProviderError(`Profile '${profileName}' could not be found in shared credentials file.`, false); - } else if (!profile["sso_session"]) { - throw new property_provider_1.TokenProviderError(`Profile '${profileName}' is missing required property 'sso_session'.`); - } - const ssoSessionName = profile["sso_session"]; - const ssoSessions = await (0, shared_ini_file_loader_1.loadSsoSessionData)(init); - const ssoSession = ssoSessions[ssoSessionName]; - if (!ssoSession) { - throw new property_provider_1.TokenProviderError(`Sso session '${ssoSessionName}' could not be found in shared credentials file.`, false); + __name(_NodeHttpHandler, "NodeHttpHandler"); + var NodeHttpHandler = _NodeHttpHandler; + var import_http22 = require("http2"); + var import_http23 = __toESM2(require("http2")); + var _NodeHttp2ConnectionPool = class _NodeHttp2ConnectionPool { + constructor(sessions) { + this.sessions = []; + this.sessions = sessions ?? []; } - for (const ssoSessionRequiredKey of ["sso_start_url", "sso_region"]) { - if (!ssoSession[ssoSessionRequiredKey]) { - throw new property_provider_1.TokenProviderError(`Sso session '${ssoSessionName}' is missing required property '${ssoSessionRequiredKey}'.`, false); + poll() { + if (this.sessions.length > 0) { + return this.sessions.shift(); } } - const ssoStartUrl = ssoSession["sso_start_url"]; - const ssoRegion = ssoSession["sso_region"]; - let ssoToken; - try { - ssoToken = await (0, shared_ini_file_loader_1.getSSOTokenFromFile)(ssoSessionName); - } catch (e) { - throw new property_provider_1.TokenProviderError(`The SSO session token associated with profile=${profileName} was not found or is invalid. ${constants_1.REFRESH_MESSAGE}`, false); + offerLast(session) { + this.sessions.push(session); } - (0, validateTokenKey_1.validateTokenKey)("accessToken", ssoToken.accessToken); - (0, validateTokenKey_1.validateTokenKey)("expiresAt", ssoToken.expiresAt); - const { accessToken, expiresAt } = ssoToken; - const existingToken = { token: accessToken, expiration: new Date(expiresAt) }; - if (existingToken.expiration.getTime() - Date.now() > constants_1.EXPIRE_WINDOW_MS) { - return existingToken; + contains(session) { + return this.sessions.includes(session); } - if (Date.now() - lastRefreshAttemptTime.getTime() < 30 * 1e3) { - (0, validateTokenExpiry_1.validateTokenExpiry)(existingToken); - return existingToken; + remove(session) { + this.sessions = this.sessions.filter((s) => s !== session); } - (0, validateTokenKey_1.validateTokenKey)("clientId", ssoToken.clientId, true); - (0, validateTokenKey_1.validateTokenKey)("clientSecret", ssoToken.clientSecret, true); - (0, validateTokenKey_1.validateTokenKey)("refreshToken", ssoToken.refreshToken, true); - try { - lastRefreshAttemptTime.setTime(Date.now()); - const newSsoOidcToken = await (0, getNewSsoOidcToken_1.getNewSsoOidcToken)(ssoToken, ssoRegion); - (0, validateTokenKey_1.validateTokenKey)("accessToken", newSsoOidcToken.accessToken); - (0, validateTokenKey_1.validateTokenKey)("expiresIn", newSsoOidcToken.expiresIn); - const newTokenExpiration = new Date(Date.now() + newSsoOidcToken.expiresIn * 1e3); - try { - await (0, writeSSOTokenToFile_1.writeSSOTokenToFile)(ssoSessionName, { - ...ssoToken, - accessToken: newSsoOidcToken.accessToken, - expiresAt: newTokenExpiration.toISOString(), - refreshToken: newSsoOidcToken.refreshToken - }); - } catch (error) { + [Symbol.iterator]() { + return this.sessions[Symbol.iterator](); + } + destroy(connection) { + for (const session of this.sessions) { + if (session === connection) { + if (!session.destroyed) { + session.destroy(); + } + } } - return { - token: newSsoOidcToken.accessToken, - expiration: newTokenExpiration - }; - } catch (error) { - (0, validateTokenExpiry_1.validateTokenExpiry)(existingToken); - return existingToken; } }; - exports2.fromSso = fromSso; - } -}); - -// ../../../node_modules/@aws-sdk/token-providers/dist-cjs/fromStatic.js -var require_fromStatic = __commonJS({ - "../../../node_modules/@aws-sdk/token-providers/dist-cjs/fromStatic.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.fromStatic = void 0; - var property_provider_1 = require_dist_cjs6(); - var fromStatic = ({ token }) => async () => { - if (!token || !token.token) { - throw new property_provider_1.TokenProviderError(`Please pass a valid token to fromStatic`, false); + __name(_NodeHttp2ConnectionPool, "NodeHttp2ConnectionPool"); + var NodeHttp2ConnectionPool = _NodeHttp2ConnectionPool; + var _NodeHttp2ConnectionManager = class _NodeHttp2ConnectionManager { + constructor(config) { + this.sessionCache = /* @__PURE__ */ new Map(); + this.config = config; + if (this.config.maxConcurrency && this.config.maxConcurrency <= 0) { + throw new RangeError("maxConcurrency must be greater than zero."); + } } - return token; - }; - exports2.fromStatic = fromStatic; - } -}); - -// ../../../node_modules/@aws-sdk/token-providers/dist-cjs/nodeProvider.js -var require_nodeProvider = __commonJS({ - "../../../node_modules/@aws-sdk/token-providers/dist-cjs/nodeProvider.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.nodeProvider = void 0; - var property_provider_1 = require_dist_cjs6(); - var fromSso_1 = require_fromSso(); - var nodeProvider = (init = {}) => (0, property_provider_1.memoize)((0, property_provider_1.chain)((0, fromSso_1.fromSso)(init), async () => { - throw new property_provider_1.TokenProviderError("Could not load token from any providers", false); - }), (token) => token.expiration !== void 0 && token.expiration.getTime() - Date.now() < 3e5, (token) => token.expiration !== void 0); - exports2.nodeProvider = nodeProvider; - } -}); - -// ../../../node_modules/@aws-sdk/token-providers/dist-cjs/index.js -var require_dist_cjs46 = __commonJS({ - "../../../node_modules/@aws-sdk/token-providers/dist-cjs/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); - tslib_1.__exportStar(require_client_sso_oidc_node(), exports2); - tslib_1.__exportStar(require_fromSso(), exports2); - tslib_1.__exportStar(require_fromStatic(), exports2); - tslib_1.__exportStar(require_nodeProvider(), exports2); - } -}); - -// ../../../node_modules/@aws-sdk/credential-provider-sso/dist-cjs/resolveSSOCredentials.js -var require_resolveSSOCredentials = __commonJS({ - "../../../node_modules/@aws-sdk/credential-provider-sso/dist-cjs/resolveSSOCredentials.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.resolveSSOCredentials = void 0; - var client_sso_1 = require_dist_cjs45(); - var token_providers_1 = require_dist_cjs46(); - var property_provider_1 = require_dist_cjs6(); - var shared_ini_file_loader_1 = require_dist_cjs21(); - var SHOULD_FAIL_CREDENTIAL_CHAIN = false; - var resolveSSOCredentials = async ({ ssoStartUrl, ssoSession, ssoAccountId, ssoRegion, ssoRoleName, ssoClient, profile }) => { - let token; - const refreshMessage = `To refresh this SSO session run aws sso login with the corresponding profile.`; - if (ssoSession) { - try { - const _token = await (0, token_providers_1.fromSso)({ profile })(); - token = { - accessToken: _token.token, - expiresAt: new Date(_token.expiration).toISOString() - }; - } catch (e) { - throw new property_provider_1.CredentialsProviderError(e.message, SHOULD_FAIL_CREDENTIAL_CHAIN); + lease(requestContext, connectionConfiguration) { + const url2 = this.getUrlString(requestContext); + const existingPool = this.sessionCache.get(url2); + if (existingPool) { + const existingSession = existingPool.poll(); + if (existingSession && !this.config.disableConcurrency) { + return existingSession; + } } - } else { - try { - token = await (0, shared_ini_file_loader_1.getSSOTokenFromFile)(ssoStartUrl); - } catch (e) { - throw new property_provider_1.CredentialsProviderError(`The SSO session associated with this profile is invalid. ${refreshMessage}`, SHOULD_FAIL_CREDENTIAL_CHAIN); + const session = import_http23.default.connect(url2); + if (this.config.maxConcurrency) { + session.settings({ maxConcurrentStreams: this.config.maxConcurrency }, (err) => { + if (err) { + throw new Error( + "Fail to set maxConcurrentStreams to " + this.config.maxConcurrency + "when creating new session for " + requestContext.destination.toString() + ); + } + }); + } + session.unref(); + const destroySessionCb = /* @__PURE__ */ __name(() => { + session.destroy(); + this.deleteSession(url2, session); + }, "destroySessionCb"); + session.on("goaway", destroySessionCb); + session.on("error", destroySessionCb); + session.on("frameError", destroySessionCb); + session.on("close", () => this.deleteSession(url2, session)); + if (connectionConfiguration.requestTimeout) { + session.setTimeout(connectionConfiguration.requestTimeout, destroySessionCb); } + const connectionPool = this.sessionCache.get(url2) || new NodeHttp2ConnectionPool(); + connectionPool.offerLast(session); + this.sessionCache.set(url2, connectionPool); + return session; } - if (new Date(token.expiresAt).getTime() - Date.now() <= 0) { - throw new property_provider_1.CredentialsProviderError(`The SSO session associated with this profile has expired. ${refreshMessage}`, SHOULD_FAIL_CREDENTIAL_CHAIN); + /** + * Delete a session from the connection pool. + * @param authority The authority of the session to delete. + * @param session The session to delete. + */ + deleteSession(authority, session) { + const existingConnectionPool = this.sessionCache.get(authority); + if (!existingConnectionPool) { + return; + } + if (!existingConnectionPool.contains(session)) { + return; + } + existingConnectionPool.remove(session); + this.sessionCache.set(authority, existingConnectionPool); } - const { accessToken } = token; - const sso = ssoClient || new client_sso_1.SSOClient({ region: ssoRegion }); - let ssoResp; - try { - ssoResp = await sso.send(new client_sso_1.GetRoleCredentialsCommand({ - accountId: ssoAccountId, - roleName: ssoRoleName, - accessToken - })); - } catch (e) { - throw property_provider_1.CredentialsProviderError.from(e, SHOULD_FAIL_CREDENTIAL_CHAIN); + release(requestContext, session) { + var _a; + const cacheKey = this.getUrlString(requestContext); + (_a = this.sessionCache.get(cacheKey)) == null ? void 0 : _a.offerLast(session); } - const { roleCredentials: { accessKeyId, secretAccessKey, sessionToken, expiration } = {} } = ssoResp; - if (!accessKeyId || !secretAccessKey || !sessionToken || !expiration) { - throw new property_provider_1.CredentialsProviderError("SSO returns an invalid temporary credential.", SHOULD_FAIL_CREDENTIAL_CHAIN); + destroy() { + for (const [key, connectionPool] of this.sessionCache) { + for (const session of connectionPool) { + if (!session.destroyed) { + session.destroy(); + } + connectionPool.remove(session); + } + this.sessionCache.delete(key); + } } - return { accessKeyId, secretAccessKey, sessionToken, expiration: new Date(expiration) }; - }; - exports2.resolveSSOCredentials = resolveSSOCredentials; - } -}); - -// ../../../node_modules/@aws-sdk/credential-provider-sso/dist-cjs/validateSsoProfile.js -var require_validateSsoProfile = __commonJS({ - "../../../node_modules/@aws-sdk/credential-provider-sso/dist-cjs/validateSsoProfile.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.validateSsoProfile = void 0; - var property_provider_1 = require_dist_cjs6(); - var validateSsoProfile = (profile) => { - const { sso_start_url, sso_account_id, sso_region, sso_role_name } = profile; - if (!sso_start_url || !sso_account_id || !sso_region || !sso_role_name) { - throw new property_provider_1.CredentialsProviderError(`Profile is configured with invalid SSO credentials. Required parameters "sso_account_id", "sso_region", "sso_role_name", "sso_start_url". Got ${Object.keys(profile).join(", ")} -Reference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html`, false); + setMaxConcurrentStreams(maxConcurrentStreams) { + if (this.config.maxConcurrency && this.config.maxConcurrency <= 0) { + throw new RangeError("maxConcurrentStreams must be greater than zero."); + } + this.config.maxConcurrency = maxConcurrentStreams; + } + setDisableConcurrentStreams(disableConcurrentStreams) { + this.config.disableConcurrency = disableConcurrentStreams; + } + getUrlString(request2) { + return request2.destination.toString(); } - return profile; }; - exports2.validateSsoProfile = validateSsoProfile; - } -}); - -// ../../../node_modules/@aws-sdk/credential-provider-sso/dist-cjs/fromSSO.js -var require_fromSSO = __commonJS({ - "../../../node_modules/@aws-sdk/credential-provider-sso/dist-cjs/fromSSO.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.fromSSO = void 0; - var property_provider_1 = require_dist_cjs6(); - var shared_ini_file_loader_1 = require_dist_cjs21(); - var isSsoProfile_1 = require_isSsoProfile(); - var resolveSSOCredentials_1 = require_resolveSSOCredentials(); - var validateSsoProfile_1 = require_validateSsoProfile(); - var fromSSO = (init = {}) => async () => { - const { ssoStartUrl, ssoAccountId, ssoRegion, ssoRoleName, ssoClient, ssoSession } = init; - const profileName = (0, shared_ini_file_loader_1.getProfileName)(init); - if (!ssoStartUrl && !ssoAccountId && !ssoRegion && !ssoRoleName && !ssoSession) { - const profiles = await (0, shared_ini_file_loader_1.parseKnownFiles)(init); - const profile = profiles[profileName]; - if (!profile) { - throw new property_provider_1.CredentialsProviderError(`Profile ${profileName} was not found.`); + __name(_NodeHttp2ConnectionManager, "NodeHttp2ConnectionManager"); + var NodeHttp2ConnectionManager = _NodeHttp2ConnectionManager; + var _NodeHttp2Handler = class _NodeHttp2Handler2 { + constructor(options) { + this.metadata = { handlerProtocol: "h2" }; + this.connectionManager = new NodeHttp2ConnectionManager({}); + this.configProvider = new Promise((resolve, reject) => { + if (typeof options === "function") { + options().then((opts) => { + resolve(opts || {}); + }).catch(reject); + } else { + resolve(options || {}); + } + }); + } + /** + * @returns the input if it is an HttpHandler of any class, + * or instantiates a new instance of this handler. + */ + static create(instanceOrOptions) { + if (typeof (instanceOrOptions == null ? void 0 : instanceOrOptions.handle) === "function") { + return instanceOrOptions; } - if (!(0, isSsoProfile_1.isSsoProfile)(profile)) { - throw new property_provider_1.CredentialsProviderError(`Profile ${profileName} is not configured with SSO credentials.`); + return new _NodeHttp2Handler2(instanceOrOptions); + } + destroy() { + this.connectionManager.destroy(); + } + async handle(request2, { abortSignal } = {}) { + if (!this.config) { + this.config = await this.configProvider; + this.connectionManager.setDisableConcurrentStreams(this.config.disableConcurrentStreams || false); + if (this.config.maxConcurrentStreams) { + this.connectionManager.setMaxConcurrentStreams(this.config.maxConcurrentStreams); + } } - if (profile === null || profile === void 0 ? void 0 : profile.sso_session) { - const ssoSessions = await (0, shared_ini_file_loader_1.loadSsoSessionData)(init); - const session = ssoSessions[profile.sso_session]; - const conflictMsg = ` configurations in profile ${profileName} and sso-session ${profile.sso_session}`; - if (ssoRegion && ssoRegion !== session.sso_region) { - throw new property_provider_1.CredentialsProviderError(`Conflicting SSO region` + conflictMsg, false); + const { requestTimeout, disableConcurrentStreams } = this.config; + return new Promise((_resolve, _reject) => { + var _a; + let fulfilled = false; + let writeRequestBodyPromise = void 0; + const resolve = /* @__PURE__ */ __name(async (arg) => { + await writeRequestBodyPromise; + _resolve(arg); + }, "resolve"); + const reject = /* @__PURE__ */ __name(async (arg) => { + await writeRequestBodyPromise; + _reject(arg); + }, "reject"); + if (abortSignal == null ? void 0 : abortSignal.aborted) { + fulfilled = true; + const abortError = new Error("Request aborted"); + abortError.name = "AbortError"; + reject(abortError); + return; } - if (ssoStartUrl && ssoStartUrl !== session.sso_start_url) { - throw new property_provider_1.CredentialsProviderError(`Conflicting SSO start_url` + conflictMsg, false); + const { hostname, method, port, protocol, query } = request2; + let auth = ""; + if (request2.username != null || request2.password != null) { + const username = request2.username ?? ""; + const password = request2.password ?? ""; + auth = `${username}:${password}@`; } - profile.sso_region = session.sso_region; - profile.sso_start_url = session.sso_start_url; - } - const { sso_start_url, sso_account_id, sso_region, sso_role_name, sso_session } = (0, validateSsoProfile_1.validateSsoProfile)(profile); - return (0, resolveSSOCredentials_1.resolveSSOCredentials)({ - ssoStartUrl: sso_start_url, - ssoSession: sso_session, - ssoAccountId: sso_account_id, - ssoRegion: sso_region, - ssoRoleName: sso_role_name, - ssoClient, - profile: profileName + const authority = `${protocol}//${auth}${hostname}${port ? `:${port}` : ""}`; + const requestContext = { destination: new URL(authority) }; + const session = this.connectionManager.lease(requestContext, { + requestTimeout: (_a = this.config) == null ? void 0 : _a.sessionTimeout, + disableConcurrentStreams: disableConcurrentStreams || false + }); + const rejectWithDestroy = /* @__PURE__ */ __name((err) => { + if (disableConcurrentStreams) { + this.destroySession(session); + } + fulfilled = true; + reject(err); + }, "rejectWithDestroy"); + const queryString = (0, import_querystring_builder.buildQueryString)(query || {}); + let path = request2.path; + if (queryString) { + path += `?${queryString}`; + } + if (request2.fragment) { + path += `#${request2.fragment}`; + } + const req = session.request({ + ...request2.headers, + [import_http22.constants.HTTP2_HEADER_PATH]: path, + [import_http22.constants.HTTP2_HEADER_METHOD]: method + }); + session.ref(); + req.on("response", (headers) => { + const httpResponse = new import_protocol_http8.HttpResponse({ + statusCode: headers[":status"] || -1, + headers: getTransformedHeaders(headers), + body: req + }); + fulfilled = true; + resolve({ response: httpResponse }); + if (disableConcurrentStreams) { + session.close(); + this.connectionManager.deleteSession(authority, session); + } + }); + if (requestTimeout) { + req.setTimeout(requestTimeout, () => { + req.close(); + const timeoutError = new Error(`Stream timed out because of no activity for ${requestTimeout} ms`); + timeoutError.name = "TimeoutError"; + rejectWithDestroy(timeoutError); + }); + } + if (abortSignal) { + const onAbort = /* @__PURE__ */ __name(() => { + req.close(); + const abortError = new Error("Request aborted"); + abortError.name = "AbortError"; + rejectWithDestroy(abortError); + }, "onAbort"); + if (typeof abortSignal.addEventListener === "function") { + const signal = abortSignal; + signal.addEventListener("abort", onAbort, { once: true }); + req.once("close", () => signal.removeEventListener("abort", onAbort)); + } else { + abortSignal.onabort = onAbort; + } + } + req.on("frameError", (type, code, id) => { + rejectWithDestroy(new Error(`Frame type id ${type} in stream id ${id} has failed with code ${code}.`)); + }); + req.on("error", rejectWithDestroy); + req.on("aborted", () => { + rejectWithDestroy( + new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${req.rstCode}.`) + ); + }); + req.on("close", () => { + session.unref(); + if (disableConcurrentStreams) { + session.destroy(); + } + if (!fulfilled) { + rejectWithDestroy(new Error("Unexpected error: http2 request did not get a response")); + } + }); + writeRequestBodyPromise = writeRequestBody(req, request2, requestTimeout); }); - } else if (!ssoStartUrl || !ssoAccountId || !ssoRegion || !ssoRoleName) { - throw new property_provider_1.CredentialsProviderError('Incomplete configuration. The fromSSO() argument hash must include "ssoStartUrl", "ssoAccountId", "ssoRegion", "ssoRoleName"'); - } else { - return (0, resolveSSOCredentials_1.resolveSSOCredentials)({ - ssoStartUrl, - ssoSession, - ssoAccountId, - ssoRegion, - ssoRoleName, - ssoClient, - profile: profileName + } + updateHttpClientConfig(key, value) { + this.config = void 0; + this.configProvider = this.configProvider.then((config) => { + return { + ...config, + [key]: value + }; }); } - }; - exports2.fromSSO = fromSSO; - } -}); - -// ../../../node_modules/@aws-sdk/credential-provider-sso/dist-cjs/types.js -var require_types2 = __commonJS({ - "../../../node_modules/@aws-sdk/credential-provider-sso/dist-cjs/types.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - } -}); - -// ../../../node_modules/@aws-sdk/credential-provider-sso/dist-cjs/index.js -var require_dist_cjs47 = __commonJS({ - "../../../node_modules/@aws-sdk/credential-provider-sso/dist-cjs/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); - tslib_1.__exportStar(require_fromSSO(), exports2); - tslib_1.__exportStar(require_isSsoProfile(), exports2); - tslib_1.__exportStar(require_types2(), exports2); - tslib_1.__exportStar(require_validateSsoProfile(), exports2); - } -}); - -// ../../../node_modules/@aws-sdk/credential-provider-ini/dist-cjs/resolveSsoCredentials.js -var require_resolveSsoCredentials = __commonJS({ - "../../../node_modules/@aws-sdk/credential-provider-ini/dist-cjs/resolveSsoCredentials.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.resolveSsoCredentials = exports2.isSsoProfile = void 0; - var credential_provider_sso_1 = require_dist_cjs47(); - var credential_provider_sso_2 = require_dist_cjs47(); - Object.defineProperty(exports2, "isSsoProfile", { enumerable: true, get: function() { - return credential_provider_sso_2.isSsoProfile; - } }); - var resolveSsoCredentials = (data) => { - const { sso_start_url, sso_account_id, sso_session, sso_region, sso_role_name } = (0, credential_provider_sso_1.validateSsoProfile)(data); - return (0, credential_provider_sso_1.fromSSO)({ - ssoStartUrl: sso_start_url, - ssoAccountId: sso_account_id, - ssoSession: sso_session, - ssoRegion: sso_region, - ssoRoleName: sso_role_name - })(); - }; - exports2.resolveSsoCredentials = resolveSsoCredentials; - } -}); - -// ../../../node_modules/@aws-sdk/credential-provider-ini/dist-cjs/resolveStaticCredentials.js -var require_resolveStaticCredentials = __commonJS({ - "../../../node_modules/@aws-sdk/credential-provider-ini/dist-cjs/resolveStaticCredentials.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.resolveStaticCredentials = exports2.isStaticCredsProfile = void 0; - var isStaticCredsProfile = (arg) => Boolean(arg) && typeof arg === "object" && typeof arg.aws_access_key_id === "string" && typeof arg.aws_secret_access_key === "string" && ["undefined", "string"].indexOf(typeof arg.aws_session_token) > -1; - exports2.isStaticCredsProfile = isStaticCredsProfile; - var resolveStaticCredentials = (profile) => Promise.resolve({ - accessKeyId: profile.aws_access_key_id, - secretAccessKey: profile.aws_secret_access_key, - sessionToken: profile.aws_session_token - }); - exports2.resolveStaticCredentials = resolveStaticCredentials; - } -}); - -// ../../../node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/fromWebToken.js -var require_fromWebToken = __commonJS({ - "../../../node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/fromWebToken.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.fromWebToken = void 0; - var property_provider_1 = require_dist_cjs6(); - var fromWebToken = (init) => () => { - const { roleArn, roleSessionName, webIdentityToken, providerId, policyArns, policy, durationSeconds, roleAssumerWithWebIdentity } = init; - if (!roleAssumerWithWebIdentity) { - throw new property_provider_1.CredentialsProviderError(`Role Arn '${roleArn}' needs to be assumed with web identity, but no role assumption callback was provided.`, false); + httpHandlerConfigs() { + return this.config ?? {}; + } + /** + * Destroys a session. + * @param session The session to destroy. + */ + destroySession(session) { + if (!session.destroyed) { + session.destroy(); + } } - return roleAssumerWithWebIdentity({ - RoleArn: roleArn, - RoleSessionName: roleSessionName !== null && roleSessionName !== void 0 ? roleSessionName : `aws-sdk-js-session-${Date.now()}`, - WebIdentityToken: webIdentityToken, - ProviderId: providerId, - PolicyArns: policyArns, - Policy: policy, - DurationSeconds: durationSeconds - }); }; - exports2.fromWebToken = fromWebToken; - } -}); - -// ../../../node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/fromTokenFile.js -var require_fromTokenFile = __commonJS({ - "../../../node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/fromTokenFile.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.fromTokenFile = void 0; - var property_provider_1 = require_dist_cjs6(); - var fs_1 = require("fs"); - var fromWebToken_1 = require_fromWebToken(); - var ENV_TOKEN_FILE = "AWS_WEB_IDENTITY_TOKEN_FILE"; - var ENV_ROLE_ARN = "AWS_ROLE_ARN"; - var ENV_ROLE_SESSION_NAME = "AWS_ROLE_SESSION_NAME"; - var fromTokenFile = (init = {}) => async () => { - var _a, _b, _c; - const webIdentityTokenFile = (_a = init === null || init === void 0 ? void 0 : init.webIdentityTokenFile) !== null && _a !== void 0 ? _a : process.env[ENV_TOKEN_FILE]; - const roleArn = (_b = init === null || init === void 0 ? void 0 : init.roleArn) !== null && _b !== void 0 ? _b : process.env[ENV_ROLE_ARN]; - const roleSessionName = (_c = init === null || init === void 0 ? void 0 : init.roleSessionName) !== null && _c !== void 0 ? _c : process.env[ENV_ROLE_SESSION_NAME]; - if (!webIdentityTokenFile || !roleArn) { - throw new property_provider_1.CredentialsProviderError("Web identity configuration not specified"); + __name(_NodeHttp2Handler, "NodeHttp2Handler"); + var NodeHttp2Handler = _NodeHttp2Handler; + var _Collector = class _Collector extends import_stream.Writable { + constructor() { + super(...arguments); + this.bufferedBytes = []; + } + _write(chunk, encoding, callback) { + this.bufferedBytes.push(chunk); + callback(); } - return (0, fromWebToken_1.fromWebToken)({ - ...init, - webIdentityToken: (0, fs_1.readFileSync)(webIdentityTokenFile, { encoding: "ascii" }), - roleArn, - roleSessionName - })(); }; - exports2.fromTokenFile = fromTokenFile; - } -}); - -// ../../../node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/index.js -var require_dist_cjs48 = __commonJS({ - "../../../node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); - tslib_1.__exportStar(require_fromTokenFile(), exports2); - tslib_1.__exportStar(require_fromWebToken(), exports2); + __name(_Collector, "Collector"); + var Collector = _Collector; + var streamCollector = /* @__PURE__ */ __name((stream) => { + if (isReadableStreamInstance(stream)) { + return collectReadableStream(stream); + } + return new Promise((resolve, reject) => { + const collector = new Collector(); + stream.pipe(collector); + stream.on("error", (err) => { + collector.end(); + reject(err); + }); + collector.on("error", reject); + collector.on("finish", function() { + const bytes = new Uint8Array(Buffer.concat(this.bufferedBytes)); + resolve(bytes); + }); + }); + }, "streamCollector"); + var isReadableStreamInstance = /* @__PURE__ */ __name((stream) => typeof ReadableStream === "function" && stream instanceof ReadableStream, "isReadableStreamInstance"); + async function collectReadableStream(stream) { + const chunks = []; + const reader = stream.getReader(); + let isDone = false; + let length = 0; + while (!isDone) { + const { done, value } = await reader.read(); + if (value) { + chunks.push(value); + length += value.length; + } + isDone = done; + } + const collected = new Uint8Array(length); + let offset = 0; + for (const chunk of chunks) { + collected.set(chunk, offset); + offset += chunk.length; + } + return collected; + } + __name(collectReadableStream, "collectReadableStream"); } }); -// ../../../node_modules/@aws-sdk/credential-provider-ini/dist-cjs/resolveWebIdentityCredentials.js -var require_resolveWebIdentityCredentials = __commonJS({ - "../../../node_modules/@aws-sdk/credential-provider-ini/dist-cjs/resolveWebIdentityCredentials.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.resolveWebIdentityCredentials = exports2.isWebIdentityProfile = void 0; - var credential_provider_web_identity_1 = require_dist_cjs48(); - var isWebIdentityProfile = (arg) => Boolean(arg) && typeof arg === "object" && typeof arg.web_identity_token_file === "string" && typeof arg.role_arn === "string" && ["undefined", "string"].indexOf(typeof arg.role_session_name) > -1; - exports2.isWebIdentityProfile = isWebIdentityProfile; - var resolveWebIdentityCredentials = async (profile, options) => (0, credential_provider_web_identity_1.fromTokenFile)({ - webIdentityTokenFile: profile.web_identity_token_file, - roleArn: profile.role_arn, - roleSessionName: profile.role_session_name, - roleAssumerWithWebIdentity: options.roleAssumerWithWebIdentity - })(); - exports2.resolveWebIdentityCredentials = resolveWebIdentityCredentials; - } -}); - -// ../../../node_modules/@aws-sdk/credential-provider-ini/dist-cjs/resolveProfileData.js -var require_resolveProfileData = __commonJS({ - "../../../node_modules/@aws-sdk/credential-provider-ini/dist-cjs/resolveProfileData.js"(exports2) { +// ../../../node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/checkUrl.js +var require_checkUrl = __commonJS({ + "../../../node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/checkUrl.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.resolveProfileData = void 0; - var property_provider_1 = require_dist_cjs6(); - var resolveAssumeRoleCredentials_1 = require_resolveAssumeRoleCredentials(); - var resolveProcessCredentials_1 = require_resolveProcessCredentials2(); - var resolveSsoCredentials_1 = require_resolveSsoCredentials(); - var resolveStaticCredentials_1 = require_resolveStaticCredentials(); - var resolveWebIdentityCredentials_1 = require_resolveWebIdentityCredentials(); - var resolveProfileData = async (profileName, profiles, options, visitedProfiles = {}) => { - const data = profiles[profileName]; - if (Object.keys(visitedProfiles).length > 0 && (0, resolveStaticCredentials_1.isStaticCredsProfile)(data)) { - return (0, resolveStaticCredentials_1.resolveStaticCredentials)(data); - } - if ((0, resolveAssumeRoleCredentials_1.isAssumeRoleProfile)(data)) { - return (0, resolveAssumeRoleCredentials_1.resolveAssumeRoleCredentials)(profileName, profiles, options, visitedProfiles); - } - if ((0, resolveStaticCredentials_1.isStaticCredsProfile)(data)) { - return (0, resolveStaticCredentials_1.resolveStaticCredentials)(data); - } - if ((0, resolveWebIdentityCredentials_1.isWebIdentityProfile)(data)) { - return (0, resolveWebIdentityCredentials_1.resolveWebIdentityCredentials)(data, options); + exports2.checkUrl = void 0; + var property_provider_1 = require_dist_cjs40(); + var ECS_CONTAINER_HOST = "169.254.170.2"; + var EKS_CONTAINER_HOST_IPv4 = "169.254.170.23"; + var EKS_CONTAINER_HOST_IPv6 = "[fd00:ec2::23]"; + var checkUrl = (url2, logger) => { + if (url2.protocol === "https:") { + return; } - if ((0, resolveProcessCredentials_1.isProcessProfile)(data)) { - return (0, resolveProcessCredentials_1.resolveProcessCredentials)(options, profileName); + if (url2.hostname === ECS_CONTAINER_HOST || url2.hostname === EKS_CONTAINER_HOST_IPv4 || url2.hostname === EKS_CONTAINER_HOST_IPv6) { + return; } - if ((0, resolveSsoCredentials_1.isSsoProfile)(data)) { - return (0, resolveSsoCredentials_1.resolveSsoCredentials)(data); + if (url2.hostname.includes("[")) { + if (url2.hostname === "[::1]" || url2.hostname === "[0000:0000:0000:0000:0000:0000:0000:0001]") { + return; + } + } else { + if (url2.hostname === "localhost") { + return; + } + const ipComponents = url2.hostname.split("."); + const inRange = (component) => { + const num = parseInt(component, 10); + return 0 <= num && num <= 255; + }; + if (ipComponents[0] === "127" && inRange(ipComponents[1]) && inRange(ipComponents[2]) && inRange(ipComponents[3]) && ipComponents.length === 4) { + return; + } } - throw new property_provider_1.CredentialsProviderError(`Profile ${profileName} could not be found or parsed in shared credentials file.`); + throw new property_provider_1.CredentialsProviderError(`URL not accepted. It must either be HTTPS or match one of the following: + - loopback CIDR 127.0.0.0/8 or [::1/128] + - ECS container host 169.254.170.2 + - EKS container host 169.254.170.23 or [fd00:ec2::23]`, { logger }); }; - exports2.resolveProfileData = resolveProfileData; + exports2.checkUrl = checkUrl; } }); -// ../../../node_modules/@aws-sdk/credential-provider-ini/dist-cjs/fromIni.js -var require_fromIni = __commonJS({ - "../../../node_modules/@aws-sdk/credential-provider-ini/dist-cjs/fromIni.js"(exports2) { +// ../../../node_modules/@smithy/util-stream/dist-cjs/getAwsChunkedEncodingStream.js +var require_getAwsChunkedEncodingStream2 = __commonJS({ + "../../../node_modules/@smithy/util-stream/dist-cjs/getAwsChunkedEncodingStream.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.fromIni = void 0; - var shared_ini_file_loader_1 = require_dist_cjs21(); - var resolveProfileData_1 = require_resolveProfileData(); - var fromIni = (init = {}) => async () => { - const profiles = await (0, shared_ini_file_loader_1.parseKnownFiles)(init); - return (0, resolveProfileData_1.resolveProfileData)((0, shared_ini_file_loader_1.getProfileName)(init), profiles, init); + exports2.getAwsChunkedEncodingStream = void 0; + var stream_1 = require("stream"); + var getAwsChunkedEncodingStream2 = (readableStream, options) => { + const { base64Encoder, bodyLengthChecker, checksumAlgorithmFn, checksumLocationName, streamHasher } = options; + const checksumRequired = base64Encoder !== void 0 && checksumAlgorithmFn !== void 0 && checksumLocationName !== void 0 && streamHasher !== void 0; + const digest = checksumRequired ? streamHasher(checksumAlgorithmFn, readableStream) : void 0; + const awsChunkedEncodingStream = new stream_1.Readable({ read: () => { + } }); + readableStream.on("data", (data) => { + const length = bodyLengthChecker(data) || 0; + awsChunkedEncodingStream.push(`${length.toString(16)}\r +`); + awsChunkedEncodingStream.push(data); + awsChunkedEncodingStream.push("\r\n"); + }); + readableStream.on("end", async () => { + awsChunkedEncodingStream.push(`0\r +`); + if (checksumRequired) { + const checksum = base64Encoder(await digest); + awsChunkedEncodingStream.push(`${checksumLocationName}:${checksum}\r +`); + awsChunkedEncodingStream.push(`\r +`); + } + awsChunkedEncodingStream.push(null); + }); + return awsChunkedEncodingStream; }; - exports2.fromIni = fromIni; + exports2.getAwsChunkedEncodingStream = getAwsChunkedEncodingStream2; } }); -// ../../../node_modules/@aws-sdk/credential-provider-ini/dist-cjs/index.js -var require_dist_cjs49 = __commonJS({ - "../../../node_modules/@aws-sdk/credential-provider-ini/dist-cjs/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); - tslib_1.__exportStar(require_fromIni(), exports2); +// ../../../node_modules/@smithy/fetch-http-handler/node_modules/@smithy/querystring-builder/dist-cjs/index.js +var require_dist_cjs52 = __commonJS({ + "../../../node_modules/@smithy/fetch-http-handler/node_modules/@smithy/querystring-builder/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all) => { + for (var name in all) + __defProp2(target, name, { get: all[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + buildQueryString: () => buildQueryString + }); + module2.exports = __toCommonJS2(src_exports); + var import_util_uri_escape = require_dist_cjs31(); + function buildQueryString(query) { + const parts = []; + for (let key of Object.keys(query).sort()) { + const value = query[key]; + key = (0, import_util_uri_escape.escapeUri)(key); + if (Array.isArray(value)) { + for (let i = 0, iLen = value.length; i < iLen; i++) { + parts.push(`${key}=${(0, import_util_uri_escape.escapeUri)(value[i])}`); + } + } else { + let qsEntry = key; + if (value || typeof value === "string") { + qsEntry += `=${(0, import_util_uri_escape.escapeUri)(value)}`; + } + parts.push(qsEntry); + } + } + return parts.join("&"); + } + __name(buildQueryString, "buildQueryString"); } }); -// ../../../node_modules/@aws-sdk/credential-provider-node/dist-cjs/remoteProvider.js -var require_remoteProvider = __commonJS({ - "../../../node_modules/@aws-sdk/credential-provider-node/dist-cjs/remoteProvider.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.remoteProvider = exports2.ENV_IMDS_DISABLED = void 0; - var credential_provider_imds_1 = require_dist_cjs38(); - var property_provider_1 = require_dist_cjs6(); - exports2.ENV_IMDS_DISABLED = "AWS_EC2_METADATA_DISABLED"; - var remoteProvider = (init) => { - if (process.env[credential_provider_imds_1.ENV_CMDS_RELATIVE_URI] || process.env[credential_provider_imds_1.ENV_CMDS_FULL_URI]) { - return (0, credential_provider_imds_1.fromContainerMetadata)(init); - } - if (process.env[exports2.ENV_IMDS_DISABLED]) { - return async () => { - throw new property_provider_1.CredentialsProviderError("EC2 Instance Metadata Service access disabled"); +// ../../../node_modules/@smithy/fetch-http-handler/dist-cjs/index.js +var require_dist_cjs53 = __commonJS({ + "../../../node_modules/@smithy/fetch-http-handler/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all) => { + for (var name in all) + __defProp2(target, name, { get: all[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + FetchHttpHandler: () => FetchHttpHandler, + keepAliveSupport: () => keepAliveSupport, + streamCollector: () => streamCollector + }); + module2.exports = __toCommonJS2(src_exports); + var import_protocol_http8 = require_dist_cjs2(); + var import_querystring_builder = require_dist_cjs52(); + function requestTimeout(timeoutInMs = 0) { + return new Promise((resolve, reject) => { + if (timeoutInMs) { + setTimeout(() => { + const timeoutError = new Error(`Request did not complete within ${timeoutInMs} ms`); + timeoutError.name = "TimeoutError"; + reject(timeoutError); + }, timeoutInMs); + } + }); + } + __name(requestTimeout, "requestTimeout"); + var keepAliveSupport = { + supported: void 0 + }; + var _FetchHttpHandler = class _FetchHttpHandler2 { + /** + * @returns the input if it is an HttpHandler of any class, + * or instantiates a new instance of this handler. + */ + static create(instanceOrOptions) { + if (typeof (instanceOrOptions == null ? void 0 : instanceOrOptions.handle) === "function") { + return instanceOrOptions; + } + return new _FetchHttpHandler2(instanceOrOptions); + } + constructor(options) { + if (typeof options === "function") { + this.configProvider = options().then((opts) => opts || {}); + } else { + this.config = options ?? {}; + this.configProvider = Promise.resolve(this.config); + } + if (keepAliveSupport.supported === void 0) { + keepAliveSupport.supported = Boolean( + typeof Request !== "undefined" && "keepalive" in new Request("https://[::1]") + ); + } + } + destroy() { + } + async handle(request2, { abortSignal } = {}) { + if (!this.config) { + this.config = await this.configProvider; + } + const requestTimeoutInMs = this.config.requestTimeout; + const keepAlive = this.config.keepAlive === true; + const credentials = this.config.credentials; + if (abortSignal == null ? void 0 : abortSignal.aborted) { + const abortError = new Error("Request aborted"); + abortError.name = "AbortError"; + return Promise.reject(abortError); + } + let path = request2.path; + const queryString = (0, import_querystring_builder.buildQueryString)(request2.query || {}); + if (queryString) { + path += `?${queryString}`; + } + if (request2.fragment) { + path += `#${request2.fragment}`; + } + let auth = ""; + if (request2.username != null || request2.password != null) { + const username = request2.username ?? ""; + const password = request2.password ?? ""; + auth = `${username}:${password}@`; + } + const { port, method } = request2; + const url2 = `${request2.protocol}//${auth}${request2.hostname}${port ? `:${port}` : ""}${path}`; + const body = method === "GET" || method === "HEAD" ? void 0 : request2.body; + const requestOptions = { + body, + headers: new Headers(request2.headers), + method, + credentials }; + if (body) { + requestOptions.duplex = "half"; + } + if (typeof AbortController !== "undefined") { + requestOptions.signal = abortSignal; + } + if (keepAliveSupport.supported) { + requestOptions.keepalive = keepAlive; + } + let removeSignalEventListener = /* @__PURE__ */ __name(() => { + }, "removeSignalEventListener"); + const fetchRequest = new Request(url2, requestOptions); + const raceOfPromises = [ + fetch(fetchRequest).then((response) => { + const fetchHeaders = response.headers; + const transformedHeaders = {}; + for (const pair of fetchHeaders.entries()) { + transformedHeaders[pair[0]] = pair[1]; + } + const hasReadableStream = response.body != void 0; + if (!hasReadableStream) { + return response.blob().then((body2) => ({ + response: new import_protocol_http8.HttpResponse({ + headers: transformedHeaders, + reason: response.statusText, + statusCode: response.status, + body: body2 + }) + })); + } + return { + response: new import_protocol_http8.HttpResponse({ + headers: transformedHeaders, + reason: response.statusText, + statusCode: response.status, + body: response.body + }) + }; + }), + requestTimeout(requestTimeoutInMs) + ]; + if (abortSignal) { + raceOfPromises.push( + new Promise((resolve, reject) => { + const onAbort = /* @__PURE__ */ __name(() => { + const abortError = new Error("Request aborted"); + abortError.name = "AbortError"; + reject(abortError); + }, "onAbort"); + if (typeof abortSignal.addEventListener === "function") { + const signal = abortSignal; + signal.addEventListener("abort", onAbort, { once: true }); + removeSignalEventListener = /* @__PURE__ */ __name(() => signal.removeEventListener("abort", onAbort), "removeSignalEventListener"); + } else { + abortSignal.onabort = onAbort; + } + }) + ); + } + return Promise.race(raceOfPromises).finally(removeSignalEventListener); + } + updateHttpClientConfig(key, value) { + this.config = void 0; + this.configProvider = this.configProvider.then((config) => { + config[key] = value; + return config; + }); + } + httpHandlerConfigs() { + return this.config ?? {}; } - return (0, credential_provider_imds_1.fromInstanceMetadata)(init); }; - exports2.remoteProvider = remoteProvider; - } -}); - -// ../../../node_modules/@aws-sdk/credential-provider-node/dist-cjs/defaultProvider.js -var require_defaultProvider = __commonJS({ - "../../../node_modules/@aws-sdk/credential-provider-node/dist-cjs/defaultProvider.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.defaultProvider = void 0; - var credential_provider_env_1 = require_dist_cjs37(); - var credential_provider_ini_1 = require_dist_cjs49(); - var credential_provider_process_1 = require_dist_cjs39(); - var credential_provider_sso_1 = require_dist_cjs47(); - var credential_provider_web_identity_1 = require_dist_cjs48(); - var property_provider_1 = require_dist_cjs6(); - var shared_ini_file_loader_1 = require_dist_cjs21(); - var remoteProvider_1 = require_remoteProvider(); - var defaultProvider = (init = {}) => (0, property_provider_1.memoize)((0, property_provider_1.chain)(...init.profile || process.env[shared_ini_file_loader_1.ENV_PROFILE] ? [] : [(0, credential_provider_env_1.fromEnv)()], (0, credential_provider_sso_1.fromSSO)(init), (0, credential_provider_ini_1.fromIni)(init), (0, credential_provider_process_1.fromProcess)(init), (0, credential_provider_web_identity_1.fromTokenFile)(init), (0, remoteProvider_1.remoteProvider)(init), async () => { - throw new property_provider_1.CredentialsProviderError("Could not load credentials from any providers", false); - }), (credentials) => credentials.expiration !== void 0 && credentials.expiration.getTime() - Date.now() < 3e5, (credentials) => credentials.expiration !== void 0); - exports2.defaultProvider = defaultProvider; + __name(_FetchHttpHandler, "FetchHttpHandler"); + var FetchHttpHandler = _FetchHttpHandler; + var import_util_base64 = require_dist_cjs29(); + var streamCollector = /* @__PURE__ */ __name((stream) => { + if (typeof Blob === "function" && stream instanceof Blob) { + return collectBlob(stream); + } + return collectStream(stream); + }, "streamCollector"); + async function collectBlob(blob) { + const base64 = await readToBase64(blob); + const arrayBuffer = (0, import_util_base64.fromBase64)(base64); + return new Uint8Array(arrayBuffer); + } + __name(collectBlob, "collectBlob"); + async function collectStream(stream) { + const chunks = []; + const reader = stream.getReader(); + let isDone = false; + let length = 0; + while (!isDone) { + const { done, value } = await reader.read(); + if (value) { + chunks.push(value); + length += value.length; + } + isDone = done; + } + const collected = new Uint8Array(length); + let offset = 0; + for (const chunk of chunks) { + collected.set(chunk, offset); + offset += chunk.length; + } + return collected; + } + __name(collectStream, "collectStream"); + function readToBase64(blob) { + return new Promise((resolve, reject) => { + const reader = new FileReader(); + reader.onloadend = () => { + if (reader.readyState !== 2) { + return reject(new Error("Reader aborted too early")); + } + const result = reader.result ?? ""; + const commaIndex = result.indexOf(","); + const dataOffset = commaIndex > -1 ? commaIndex + 1 : result.length; + resolve(result.substring(dataOffset)); + }; + reader.onabort = () => reject(new Error("Read aborted")); + reader.onerror = () => reject(reader.error); + reader.readAsDataURL(blob); + }); + } + __name(readToBase64, "readToBase64"); } }); -// ../../../node_modules/@aws-sdk/credential-provider-node/dist-cjs/index.js -var require_dist_cjs50 = __commonJS({ - "../../../node_modules/@aws-sdk/credential-provider-node/dist-cjs/index.js"(exports2) { +// ../../../node_modules/@smithy/util-stream/dist-cjs/stream-type-check.js +var require_stream_type_check2 = __commonJS({ + "../../../node_modules/@smithy/util-stream/dist-cjs/stream-type-check.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); - tslib_1.__exportStar(require_defaultProvider(), exports2); + exports2.isReadableStream = void 0; + var isReadableStream2 = (stream) => { + var _a; + return typeof ReadableStream === "function" && (((_a = stream === null || stream === void 0 ? void 0 : stream.constructor) === null || _a === void 0 ? void 0 : _a.name) === ReadableStream.name || stream instanceof ReadableStream); + }; + exports2.isReadableStream = isReadableStream2; } }); -// ../../../node_modules/@aws-sdk/client-sts/dist-cjs/endpoint/ruleset.js -var require_ruleset2 = __commonJS({ - "../../../node_modules/@aws-sdk/client-sts/dist-cjs/endpoint/ruleset.js"(exports2) { +// ../../../node_modules/@smithy/util-stream/dist-cjs/sdk-stream-mixin.browser.js +var require_sdk_stream_mixin_browser2 = __commonJS({ + "../../../node_modules/@smithy/util-stream/dist-cjs/sdk-stream-mixin.browser.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.ruleSet = void 0; - var F = "required"; - var G = "type"; - var H = "fn"; - var I = "argv"; - var J = "ref"; - var a = false; - var b = true; - var c = "booleanEquals"; - var d = "tree"; - var e = "stringEquals"; - var f = "sigv4"; - var g = "sts"; - var h = "us-east-1"; - var i = "endpoint"; - var j = "https://sts.{Region}.{PartitionResult#dnsSuffix}"; - var k = "error"; - var l = "getAttr"; - var m = { [F]: false, [G]: "String" }; - var n = { [F]: true, "default": false, [G]: "Boolean" }; - var o = { [J]: "Endpoint" }; - var p = { [H]: "isSet", [I]: [{ [J]: "Region" }] }; - var q = { [J]: "Region" }; - var r = { [H]: "aws.partition", [I]: [q], "assign": "PartitionResult" }; - var s = { [J]: "UseFIPS" }; - var t = { [J]: "UseDualStack" }; - var u = { "url": "https://sts.amazonaws.com", "properties": { "authSchemes": [{ "name": f, "signingName": g, "signingRegion": h }] }, "headers": {} }; - var v = {}; - var w = { "conditions": [{ [H]: e, [I]: [q, "aws-global"] }], [i]: u, [G]: i }; - var x = { [H]: c, [I]: [s, true] }; - var y = { [H]: c, [I]: [t, true] }; - var z = { [H]: c, [I]: [true, { [H]: l, [I]: [{ [J]: "PartitionResult" }, "supportsFIPS"] }] }; - var A = { [J]: "PartitionResult" }; - var B = { [H]: c, [I]: [true, { [H]: l, [I]: [A, "supportsDualStack"] }] }; - var C = [{ [H]: "isSet", [I]: [o] }]; - var D = [x]; - var E = [y]; - var _data = { version: "1.0", parameters: { Region: m, UseDualStack: n, UseFIPS: n, Endpoint: m, UseGlobalEndpoint: n }, rules: [{ conditions: [{ [H]: c, [I]: [{ [J]: "UseGlobalEndpoint" }, b] }, { [H]: "not", [I]: C }, p, r, { [H]: c, [I]: [s, a] }, { [H]: c, [I]: [t, a] }], [G]: d, rules: [{ conditions: [{ [H]: e, [I]: [q, "ap-northeast-1"] }], endpoint: u, [G]: i }, { conditions: [{ [H]: e, [I]: [q, "ap-south-1"] }], endpoint: u, [G]: i }, { conditions: [{ [H]: e, [I]: [q, "ap-southeast-1"] }], endpoint: u, [G]: i }, { conditions: [{ [H]: e, [I]: [q, "ap-southeast-2"] }], endpoint: u, [G]: i }, w, { conditions: [{ [H]: e, [I]: [q, "ca-central-1"] }], endpoint: u, [G]: i }, { conditions: [{ [H]: e, [I]: [q, "eu-central-1"] }], endpoint: u, [G]: i }, { conditions: [{ [H]: e, [I]: [q, "eu-north-1"] }], endpoint: u, [G]: i }, { conditions: [{ [H]: e, [I]: [q, "eu-west-1"] }], endpoint: u, [G]: i }, { conditions: [{ [H]: e, [I]: [q, "eu-west-2"] }], endpoint: u, [G]: i }, { conditions: [{ [H]: e, [I]: [q, "eu-west-3"] }], endpoint: u, [G]: i }, { conditions: [{ [H]: e, [I]: [q, "sa-east-1"] }], endpoint: u, [G]: i }, { conditions: [{ [H]: e, [I]: [q, h] }], endpoint: u, [G]: i }, { conditions: [{ [H]: e, [I]: [q, "us-east-2"] }], endpoint: u, [G]: i }, { conditions: [{ [H]: e, [I]: [q, "us-west-1"] }], endpoint: u, [G]: i }, { conditions: [{ [H]: e, [I]: [q, "us-west-2"] }], endpoint: u, [G]: i }, { endpoint: { url: j, properties: { authSchemes: [{ name: f, signingName: g, signingRegion: "{Region}" }] }, headers: v }, [G]: i }] }, { conditions: C, [G]: d, rules: [{ conditions: D, error: "Invalid Configuration: FIPS and custom endpoint are not supported", [G]: k }, { conditions: E, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", [G]: k }, { endpoint: { url: o, properties: v, headers: v }, [G]: i }] }, { conditions: [p], [G]: d, rules: [{ conditions: [r], [G]: d, rules: [{ conditions: [x, y], [G]: d, rules: [{ conditions: [z, B], [G]: d, rules: [{ endpoint: { url: "https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: v, headers: v }, [G]: i }] }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", [G]: k }] }, { conditions: D, [G]: d, rules: [{ conditions: [z], [G]: d, rules: [{ conditions: [{ [H]: e, [I]: ["aws-us-gov", { [H]: l, [I]: [A, "name"] }] }], endpoint: { url: "https://sts.{Region}.amazonaws.com", properties: v, headers: v }, [G]: i }, { endpoint: { url: "https://sts-fips.{Region}.{PartitionResult#dnsSuffix}", properties: v, headers: v }, [G]: i }] }, { error: "FIPS is enabled but this partition does not support FIPS", [G]: k }] }, { conditions: E, [G]: d, rules: [{ conditions: [B], [G]: d, rules: [{ endpoint: { url: "https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: v, headers: v }, [G]: i }] }, { error: "DualStack is enabled but this partition does not support DualStack", [G]: k }] }, w, { endpoint: { url: j, properties: v, headers: v }, [G]: i }] }] }, { error: "Invalid Configuration: Missing Region", [G]: k }] }; - exports2.ruleSet = _data; + exports2.sdkStreamMixin = void 0; + var fetch_http_handler_1 = require_dist_cjs53(); + var util_base64_1 = require_dist_cjs29(); + var util_hex_encoding_1 = require_dist_cjs35(); + var util_utf8_1 = require_dist_cjs28(); + var stream_type_check_1 = require_stream_type_check2(); + var ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED = "The stream has already been transformed."; + var sdkStreamMixin2 = (stream) => { + var _a, _b; + if (!isBlobInstance(stream) && !(0, stream_type_check_1.isReadableStream)(stream)) { + const name = ((_b = (_a = stream === null || stream === void 0 ? void 0 : stream.__proto__) === null || _a === void 0 ? void 0 : _a.constructor) === null || _b === void 0 ? void 0 : _b.name) || stream; + throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${name}`); + } + let transformed = false; + const transformToByteArray = async () => { + if (transformed) { + throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED); + } + transformed = true; + return await (0, fetch_http_handler_1.streamCollector)(stream); + }; + const blobToWebStream = (blob) => { + if (typeof blob.stream !== "function") { + throw new Error("Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled.\nIf you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body"); + } + return blob.stream(); + }; + return Object.assign(stream, { + transformToByteArray, + transformToString: async (encoding) => { + const buf = await transformToByteArray(); + if (encoding === "base64") { + return (0, util_base64_1.toBase64)(buf); + } else if (encoding === "hex") { + return (0, util_hex_encoding_1.toHex)(buf); + } else if (encoding === void 0 || encoding === "utf8" || encoding === "utf-8") { + return (0, util_utf8_1.toUtf8)(buf); + } else if (typeof TextDecoder === "function") { + return new TextDecoder(encoding).decode(buf); + } else { + throw new Error("TextDecoder is not available, please make sure polyfill is provided."); + } + }, + transformToWebStream: () => { + if (transformed) { + throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED); + } + transformed = true; + if (isBlobInstance(stream)) { + return blobToWebStream(stream); + } else if ((0, stream_type_check_1.isReadableStream)(stream)) { + return stream; + } else { + throw new Error(`Cannot transform payload to web stream, got ${stream}`); + } + } + }); + }; + exports2.sdkStreamMixin = sdkStreamMixin2; + var isBlobInstance = (stream) => typeof Blob === "function" && stream instanceof Blob; } }); -// ../../../node_modules/@aws-sdk/client-sts/dist-cjs/endpoint/endpointResolver.js -var require_endpointResolver2 = __commonJS({ - "../../../node_modules/@aws-sdk/client-sts/dist-cjs/endpoint/endpointResolver.js"(exports2) { +// ../../../node_modules/@smithy/util-stream/dist-cjs/sdk-stream-mixin.js +var require_sdk_stream_mixin2 = __commonJS({ + "../../../node_modules/@smithy/util-stream/dist-cjs/sdk-stream-mixin.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.defaultEndpointResolver = void 0; - var util_endpoints_1 = require_dist_cjs16(); - var ruleset_1 = require_ruleset2(); - var defaultEndpointResolver = (endpointParams, context = {}) => { - return (0, util_endpoints_1.resolveEndpoint)(ruleset_1.ruleSet, { - endpointParams, - logger: context.logger + exports2.sdkStreamMixin = void 0; + var node_http_handler_1 = require_dist_cjs51(); + var util_buffer_from_1 = require_dist_cjs27(); + var stream_1 = require("stream"); + var util_1 = require("util"); + var sdk_stream_mixin_browser_1 = require_sdk_stream_mixin_browser2(); + var ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED = "The stream has already been transformed."; + var sdkStreamMixin2 = (stream) => { + var _a, _b; + if (!(stream instanceof stream_1.Readable)) { + try { + return (0, sdk_stream_mixin_browser_1.sdkStreamMixin)(stream); + } catch (e) { + const name = ((_b = (_a = stream === null || stream === void 0 ? void 0 : stream.__proto__) === null || _a === void 0 ? void 0 : _a.constructor) === null || _b === void 0 ? void 0 : _b.name) || stream; + throw new Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${name}`); + } + } + let transformed = false; + const transformToByteArray = async () => { + if (transformed) { + throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED); + } + transformed = true; + return await (0, node_http_handler_1.streamCollector)(stream); + }; + return Object.assign(stream, { + transformToByteArray, + transformToString: async (encoding) => { + const buf = await transformToByteArray(); + if (encoding === void 0 || Buffer.isEncoding(encoding)) { + return (0, util_buffer_from_1.fromArrayBuffer)(buf.buffer, buf.byteOffset, buf.byteLength).toString(encoding); + } else { + const decoder2 = new util_1.TextDecoder(encoding); + return decoder2.decode(buf); + } + }, + transformToWebStream: () => { + if (transformed) { + throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED); + } + if (stream.readableFlowing !== null) { + throw new Error("The stream has been consumed by other callbacks."); + } + if (typeof stream_1.Readable.toWeb !== "function") { + throw new Error("Readable.toWeb() is not supported. Please make sure you are using Node.js >= 17.0.0, or polyfill is available."); + } + transformed = true; + return stream_1.Readable.toWeb(stream); + } }); }; - exports2.defaultEndpointResolver = defaultEndpointResolver; + exports2.sdkStreamMixin = sdkStreamMixin2; } }); -// ../../../node_modules/@aws-sdk/client-sts/dist-cjs/runtimeConfig.shared.js -var require_runtimeConfig_shared2 = __commonJS({ - "../../../node_modules/@aws-sdk/client-sts/dist-cjs/runtimeConfig.shared.js"(exports2) { +// ../../../node_modules/@smithy/util-stream/dist-cjs/splitStream.browser.js +var require_splitStream_browser2 = __commonJS({ + "../../../node_modules/@smithy/util-stream/dist-cjs/splitStream.browser.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getRuntimeConfig = void 0; - var smithy_client_1 = require_dist_cjs34(); - var url_parser_1 = require_dist_cjs24(); - var util_base64_1 = require_dist_cjs30(); - var util_utf8_1 = require_dist_cjs10(); - var endpointResolver_1 = require_endpointResolver2(); - var getRuntimeConfig = (config) => ({ - apiVersion: "2011-06-15", - base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64, - base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64, - disableHostPrefix: config?.disableHostPrefix ?? false, - endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver, - extensions: config?.extensions ?? [], - logger: config?.logger ?? new smithy_client_1.NoOpLogger(), - serviceId: config?.serviceId ?? "STS", - urlParser: config?.urlParser ?? url_parser_1.parseUrl, - utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8, - utf8Encoder: config?.utf8Encoder ?? util_utf8_1.toUtf8 - }); - exports2.getRuntimeConfig = getRuntimeConfig; + exports2.splitStream = void 0; + async function splitStream2(stream) { + if (typeof stream.stream === "function") { + stream = stream.stream(); + } + const readableStream = stream; + return readableStream.tee(); + } + exports2.splitStream = splitStream2; } }); -// ../../../node_modules/@aws-sdk/client-sts/dist-cjs/runtimeConfig.js -var require_runtimeConfig2 = __commonJS({ - "../../../node_modules/@aws-sdk/client-sts/dist-cjs/runtimeConfig.js"(exports2) { +// ../../../node_modules/@smithy/util-stream/dist-cjs/splitStream.js +var require_splitStream2 = __commonJS({ + "../../../node_modules/@smithy/util-stream/dist-cjs/splitStream.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getRuntimeConfig = void 0; - var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); - var package_json_1 = tslib_1.__importDefault(require_package2()); - var defaultStsRoleAssumers_1 = require_defaultStsRoleAssumers(); - var credential_provider_node_1 = require_dist_cjs50(); - var util_user_agent_node_1 = require_dist_cjs40(); - var config_resolver_1 = require_dist_cjs19(); - var hash_node_1 = require_dist_cjs41(); - var middleware_retry_1 = require_dist_cjs35(); - var node_config_provider_1 = require_dist_cjs22(); - var node_http_handler_1 = require_dist_cjs32(); - var util_body_length_node_1 = require_dist_cjs42(); - var util_retry_1 = require_dist_cjs28(); - var runtimeConfig_shared_1 = require_runtimeConfig_shared2(); - var smithy_client_1 = require_dist_cjs34(); - var util_defaults_mode_node_1 = require_dist_cjs43(); - var smithy_client_2 = require_dist_cjs34(); - var getRuntimeConfig = (config) => { - (0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version); - const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config); - const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode); - const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config); - return { - ...clientSharedValues, - ...config, - runtime: "node", - defaultsMode, - bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength, - credentialDefaultProvider: config?.credentialDefaultProvider ?? (0, defaultStsRoleAssumers_1.decorateDefaultCredentialProvider)(credential_provider_node_1.defaultProvider), - defaultUserAgentProvider: config?.defaultUserAgentProvider ?? (0, util_user_agent_node_1.defaultUserAgent)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }), - maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS), - region: config?.region ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new node_http_handler_1.NodeHttpHandler(defaultConfigProvider), - retryMode: config?.retryMode ?? (0, node_config_provider_1.loadConfig)({ - ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS, - default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE - }), - sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, "sha256"), - streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector, - useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), - useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS) - }; - }; - exports2.getRuntimeConfig = getRuntimeConfig; + exports2.splitStream = void 0; + var stream_1 = require("stream"); + var splitStream_browser_1 = require_splitStream_browser2(); + var stream_type_check_1 = require_stream_type_check2(); + async function splitStream2(stream) { + if ((0, stream_type_check_1.isReadableStream)(stream)) { + return (0, splitStream_browser_1.splitStream)(stream); + } + const stream1 = new stream_1.PassThrough(); + const stream2 = new stream_1.PassThrough(); + stream.pipe(stream1); + stream.pipe(stream2); + return [stream1, stream2]; + } + exports2.splitStream = splitStream2; } }); -// ../../../node_modules/@aws-sdk/client-sts/dist-cjs/runtimeExtensions.js -var require_runtimeExtensions2 = __commonJS({ - "../../../node_modules/@aws-sdk/client-sts/dist-cjs/runtimeExtensions.js"(exports2) { +// ../../../node_modules/@smithy/util-stream/dist-cjs/headStream.browser.js +var require_headStream_browser2 = __commonJS({ + "../../../node_modules/@smithy/util-stream/dist-cjs/headStream.browser.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.resolveRuntimeExtensions = void 0; - var region_config_resolver_1 = require_dist_cjs44(); - var protocol_http_1 = require_dist_cjs2(); - var smithy_client_1 = require_dist_cjs34(); - var asPartial = (t) => t; - var resolveRuntimeExtensions = (runtimeConfig, extensions) => { - const extensionConfiguration = { - ...asPartial((0, region_config_resolver_1.getAwsRegionExtensionConfiguration)(runtimeConfig)), - ...asPartial((0, smithy_client_1.getDefaultExtensionConfiguration)(runtimeConfig)), - ...asPartial((0, protocol_http_1.getHttpHandlerExtensionConfiguration)(runtimeConfig)) - }; - extensions.forEach((extension) => extension.configure(extensionConfiguration)); - return { - ...runtimeConfig, - ...(0, region_config_resolver_1.resolveAwsRegionExtensionConfiguration)(extensionConfiguration), - ...(0, smithy_client_1.resolveDefaultRuntimeConfig)(extensionConfiguration), - ...(0, protocol_http_1.resolveHttpHandlerRuntimeConfig)(extensionConfiguration) - }; - }; - exports2.resolveRuntimeExtensions = resolveRuntimeExtensions; + exports2.headStream = void 0; + async function headStream2(stream, bytes) { + var _a; + let byteLengthCounter = 0; + const chunks = []; + const reader = stream.getReader(); + let isDone = false; + while (!isDone) { + const { done, value } = await reader.read(); + if (value) { + chunks.push(value); + byteLengthCounter += (_a = value === null || value === void 0 ? void 0 : value.byteLength) !== null && _a !== void 0 ? _a : 0; + } + if (byteLengthCounter >= bytes) { + break; + } + isDone = done; + } + reader.releaseLock(); + const collected = new Uint8Array(Math.min(bytes, byteLengthCounter)); + let offset = 0; + for (const chunk of chunks) { + if (chunk.byteLength > collected.byteLength - offset) { + collected.set(chunk.subarray(0, collected.byteLength - offset), offset); + break; + } else { + collected.set(chunk, offset); + } + offset += chunk.length; + } + return collected; + } + exports2.headStream = headStream2; } }); -// ../../../node_modules/@aws-sdk/client-sts/dist-cjs/STSClient.js -var require_STSClient = __commonJS({ - "../../../node_modules/@aws-sdk/client-sts/dist-cjs/STSClient.js"(exports2) { +// ../../../node_modules/@smithy/util-stream/dist-cjs/headStream.js +var require_headStream2 = __commonJS({ + "../../../node_modules/@smithy/util-stream/dist-cjs/headStream.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.STSClient = exports2.__Client = void 0; - var middleware_host_header_1 = require_dist_cjs3(); - var middleware_logger_1 = require_dist_cjs4(); - var middleware_recursion_detection_1 = require_dist_cjs5(); - var middleware_sdk_sts_1 = require_dist_cjs36(); - var middleware_user_agent_1 = require_dist_cjs17(); - var config_resolver_1 = require_dist_cjs19(); - var middleware_content_length_1 = require_dist_cjs20(); - var middleware_endpoint_1 = require_dist_cjs26(); - var middleware_retry_1 = require_dist_cjs35(); - var smithy_client_1 = require_dist_cjs34(); - Object.defineProperty(exports2, "__Client", { enumerable: true, get: function() { - return smithy_client_1.Client; - } }); - var EndpointParameters_1 = require_EndpointParameters2(); - var runtimeConfig_1 = require_runtimeConfig2(); - var runtimeExtensions_1 = require_runtimeExtensions2(); - var STSClient = class _STSClient extends smithy_client_1.Client { - constructor(...[configuration]) { - const _config_0 = (0, runtimeConfig_1.getRuntimeConfig)(configuration || {}); - const _config_1 = (0, EndpointParameters_1.resolveClientEndpointParameters)(_config_0); - const _config_2 = (0, config_resolver_1.resolveRegionConfig)(_config_1); - const _config_3 = (0, middleware_endpoint_1.resolveEndpointConfig)(_config_2); - const _config_4 = (0, middleware_retry_1.resolveRetryConfig)(_config_3); - const _config_5 = (0, middleware_host_header_1.resolveHostHeaderConfig)(_config_4); - const _config_6 = (0, middleware_sdk_sts_1.resolveStsAuthConfig)(_config_5, { stsClientCtor: _STSClient }); - const _config_7 = (0, middleware_user_agent_1.resolveUserAgentConfig)(_config_6); - const _config_8 = (0, runtimeExtensions_1.resolveRuntimeExtensions)(_config_7, configuration?.extensions || []); - super(_config_8); - this.config = _config_8; - this.middlewareStack.use((0, middleware_retry_1.getRetryPlugin)(this.config)); - this.middlewareStack.use((0, middleware_content_length_1.getContentLengthPlugin)(this.config)); - this.middlewareStack.use((0, middleware_host_header_1.getHostHeaderPlugin)(this.config)); - this.middlewareStack.use((0, middleware_logger_1.getLoggerPlugin)(this.config)); - this.middlewareStack.use((0, middleware_recursion_detection_1.getRecursionDetectionPlugin)(this.config)); - this.middlewareStack.use((0, middleware_user_agent_1.getUserAgentPlugin)(this.config)); + exports2.headStream = void 0; + var stream_1 = require("stream"); + var headStream_browser_1 = require_headStream_browser2(); + var stream_type_check_1 = require_stream_type_check2(); + var headStream2 = (stream, bytes) => { + if ((0, stream_type_check_1.isReadableStream)(stream)) { + return (0, headStream_browser_1.headStream)(stream, bytes); } - destroy() { - super.destroy(); + return new Promise((resolve, reject) => { + const collector = new Collector(); + collector.limit = bytes; + stream.pipe(collector); + stream.on("error", (err) => { + collector.end(); + reject(err); + }); + collector.on("error", reject); + collector.on("finish", function() { + const bytes2 = new Uint8Array(Buffer.concat(this.buffers)); + resolve(bytes2); + }); + }); + }; + exports2.headStream = headStream2; + var Collector = class extends stream_1.Writable { + constructor() { + super(...arguments); + this.buffers = []; + this.limit = Infinity; + this.bytesBuffered = 0; + } + _write(chunk, encoding, callback) { + var _a; + this.buffers.push(chunk); + this.bytesBuffered += (_a = chunk.byteLength) !== null && _a !== void 0 ? _a : 0; + if (this.bytesBuffered >= this.limit) { + const excess = this.bytesBuffered - this.limit; + const tailBuffer = this.buffers[this.buffers.length - 1]; + this.buffers[this.buffers.length - 1] = tailBuffer.subarray(0, tailBuffer.byteLength - excess); + this.emit("finish"); + } + callback(); } }; - exports2.STSClient = STSClient; } }); -// ../../../node_modules/@aws-sdk/client-sts/dist-cjs/commands/AssumeRoleWithSAMLCommand.js -var require_AssumeRoleWithSAMLCommand = __commonJS({ - "../../../node_modules/@aws-sdk/client-sts/dist-cjs/commands/AssumeRoleWithSAMLCommand.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.AssumeRoleWithSAMLCommand = exports2.$Command = void 0; - var middleware_endpoint_1 = require_dist_cjs26(); - var middleware_serde_1 = require_dist_cjs25(); - var smithy_client_1 = require_dist_cjs34(); - Object.defineProperty(exports2, "$Command", { enumerable: true, get: function() { - return smithy_client_1.Command; - } }); - var types_1 = require_dist_cjs(); - var models_0_1 = require_models_0(); - var Aws_query_1 = require_Aws_query(); - var AssumeRoleWithSAMLCommand = class _AssumeRoleWithSAMLCommand extends smithy_client_1.Command { - static getEndpointParameterInstructions() { - return { - UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, - UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, - Endpoint: { type: "builtInParams", name: "endpoint" }, - Region: { type: "builtInParams", name: "region" }, - UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" } - }; +// ../../../node_modules/@smithy/util-stream/dist-cjs/index.js +var require_dist_cjs54 = __commonJS({ + "../../../node_modules/@smithy/util-stream/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all) => { + for (var name in all) + __defProp2(target, name, { get: all[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); } - constructor(input) { - super(); - this.input = input; + return to; + }; + var __reExport = (target, mod, secondTarget) => (__copyProps2(target, mod, "default"), secondTarget && __copyProps2(secondTarget, mod, "default")); + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + Uint8ArrayBlobAdapter: () => Uint8ArrayBlobAdapter + }); + module2.exports = __toCommonJS2(src_exports); + var import_util_base64 = require_dist_cjs29(); + var import_util_utf8 = require_dist_cjs28(); + function transformToString(payload, encoding = "utf-8") { + if (encoding === "base64") { + return (0, import_util_base64.toBase64)(payload); } - resolveMiddleware(clientStack, configuration, options) { - this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, _AssumeRoleWithSAMLCommand.getEndpointParameterInstructions())); - const stack = clientStack.concat(this.middlewareStack); - const { logger } = configuration; - const clientName = "STSClient"; - const commandName = "AssumeRoleWithSAMLCommand"; - const handlerExecutionContext = { - logger, - clientName, - commandName, - inputFilterSensitiveLog: models_0_1.AssumeRoleWithSAMLRequestFilterSensitiveLog, - outputFilterSensitiveLog: models_0_1.AssumeRoleWithSAMLResponseFilterSensitiveLog, - [types_1.SMITHY_CONTEXT_KEY]: { - service: "AWSSecurityTokenServiceV20110615", - operation: "AssumeRoleWithSAML" - } - }; - const { requestHandler } = configuration; - return stack.resolve((request2) => requestHandler.handle(request2.request, options || {}), handlerExecutionContext); + return (0, import_util_utf8.toUtf8)(payload); + } + __name(transformToString, "transformToString"); + function transformFromString(str, encoding) { + if (encoding === "base64") { + return Uint8ArrayBlobAdapter.mutate((0, import_util_base64.fromBase64)(str)); + } + return Uint8ArrayBlobAdapter.mutate((0, import_util_utf8.fromUtf8)(str)); + } + __name(transformFromString, "transformFromString"); + var _Uint8ArrayBlobAdapter = class _Uint8ArrayBlobAdapter2 extends Uint8Array { + /** + * @param source - such as a string or Stream. + * @returns a new Uint8ArrayBlobAdapter extending Uint8Array. + */ + static fromString(source, encoding = "utf-8") { + switch (typeof source) { + case "string": + return transformFromString(source, encoding); + default: + throw new Error(`Unsupported conversion from ${typeof source} to Uint8ArrayBlobAdapter.`); + } } - serialize(input, context) { - return (0, Aws_query_1.se_AssumeRoleWithSAMLCommand)(input, context); + /** + * @param source - Uint8Array to be mutated. + * @returns the same Uint8Array but with prototype switched to Uint8ArrayBlobAdapter. + */ + static mutate(source) { + Object.setPrototypeOf(source, _Uint8ArrayBlobAdapter2.prototype); + return source; } - deserialize(output, context) { - return (0, Aws_query_1.de_AssumeRoleWithSAMLCommand)(output, context); + /** + * @param encoding - default 'utf-8'. + * @returns the blob as string. + */ + transformToString(encoding = "utf-8") { + return transformToString(this, encoding); } }; - exports2.AssumeRoleWithSAMLCommand = AssumeRoleWithSAMLCommand; + __name(_Uint8ArrayBlobAdapter, "Uint8ArrayBlobAdapter"); + var Uint8ArrayBlobAdapter = _Uint8ArrayBlobAdapter; + __reExport(src_exports, require_getAwsChunkedEncodingStream2(), module2.exports); + __reExport(src_exports, require_sdk_stream_mixin2(), module2.exports); + __reExport(src_exports, require_splitStream2(), module2.exports); + __reExport(src_exports, require_headStream2(), module2.exports); + __reExport(src_exports, require_stream_type_check2(), module2.exports); } }); -// ../../../node_modules/@aws-sdk/client-sts/dist-cjs/commands/DecodeAuthorizationMessageCommand.js -var require_DecodeAuthorizationMessageCommand = __commonJS({ - "../../../node_modules/@aws-sdk/client-sts/dist-cjs/commands/DecodeAuthorizationMessageCommand.js"(exports2) { +// ../../../node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/requestHelpers.js +var require_requestHelpers = __commonJS({ + "../../../node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/requestHelpers.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.DecodeAuthorizationMessageCommand = exports2.$Command = void 0; - var middleware_signing_1 = require_dist_cjs14(); - var middleware_endpoint_1 = require_dist_cjs26(); - var middleware_serde_1 = require_dist_cjs25(); - var smithy_client_1 = require_dist_cjs34(); - Object.defineProperty(exports2, "$Command", { enumerable: true, get: function() { - return smithy_client_1.Command; - } }); - var types_1 = require_dist_cjs(); - var Aws_query_1 = require_Aws_query(); - var DecodeAuthorizationMessageCommand = class _DecodeAuthorizationMessageCommand extends smithy_client_1.Command { - static getEndpointParameterInstructions() { + exports2.getCredentials = exports2.createGetRequest = void 0; + var property_provider_1 = require_dist_cjs40(); + var protocol_http_1 = require_dist_cjs2(); + var smithy_client_1 = require_dist_cjs37(); + var util_stream_1 = require_dist_cjs54(); + function createGetRequest(url2) { + return new protocol_http_1.HttpRequest({ + protocol: url2.protocol, + hostname: url2.hostname, + port: Number(url2.port), + path: url2.pathname, + query: Array.from(url2.searchParams.entries()).reduce((acc, [k, v]) => { + acc[k] = v; + return acc; + }, {}), + fragment: url2.hash + }); + } + exports2.createGetRequest = createGetRequest; + async function getCredentials(response, logger) { + const stream = (0, util_stream_1.sdkStreamMixin)(response.body); + const str = await stream.transformToString(); + if (response.statusCode === 200) { + const parsed = JSON.parse(str); + if (typeof parsed.AccessKeyId !== "string" || typeof parsed.SecretAccessKey !== "string" || typeof parsed.Token !== "string" || typeof parsed.Expiration !== "string") { + throw new property_provider_1.CredentialsProviderError("HTTP credential provider response not of the required format, an object matching: { AccessKeyId: string, SecretAccessKey: string, Token: string, Expiration: string(rfc3339) }", { logger }); + } return { - UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, - UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, - Endpoint: { type: "builtInParams", name: "endpoint" }, - Region: { type: "builtInParams", name: "region" }, - UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" } + accessKeyId: parsed.AccessKeyId, + secretAccessKey: parsed.SecretAccessKey, + sessionToken: parsed.Token, + expiration: (0, smithy_client_1.parseRfc3339DateTime)(parsed.Expiration) }; } - constructor(input) { - super(); - this.input = input; + if (response.statusCode >= 400 && response.statusCode < 500) { + let parsedBody = {}; + try { + parsedBody = JSON.parse(str); + } catch (e) { + } + throw Object.assign(new property_provider_1.CredentialsProviderError(`Server responded with status: ${response.statusCode}`, { logger }), { + Code: parsedBody.Code, + Message: parsedBody.Message + }); } - resolveMiddleware(clientStack, configuration, options) { - this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, _DecodeAuthorizationMessageCommand.getEndpointParameterInstructions())); - this.middlewareStack.use((0, middleware_signing_1.getAwsAuthPlugin)(configuration)); - const stack = clientStack.concat(this.middlewareStack); - const { logger } = configuration; - const clientName = "STSClient"; - const commandName = "DecodeAuthorizationMessageCommand"; - const handlerExecutionContext = { - logger, - clientName, - commandName, - inputFilterSensitiveLog: (_) => _, - outputFilterSensitiveLog: (_) => _, - [types_1.SMITHY_CONTEXT_KEY]: { - service: "AWSSecurityTokenServiceV20110615", - operation: "DecodeAuthorizationMessage" + throw new property_provider_1.CredentialsProviderError(`Server responded with status: ${response.statusCode}`, { logger }); + } + exports2.getCredentials = getCredentials; + } +}); + +// ../../../node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/retry-wrapper.js +var require_retry_wrapper = __commonJS({ + "../../../node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/retry-wrapper.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.retryWrapper = void 0; + var retryWrapper = (toRetry, maxRetries, delayMs) => { + return async () => { + for (let i = 0; i < maxRetries; ++i) { + try { + return await toRetry(); + } catch (e) { + await new Promise((resolve) => setTimeout(resolve, delayMs)); } - }; - const { requestHandler } = configuration; - return stack.resolve((request2) => requestHandler.handle(request2.request, options || {}), handlerExecutionContext); - } - serialize(input, context) { - return (0, Aws_query_1.se_DecodeAuthorizationMessageCommand)(input, context); - } - deserialize(output, context) { - return (0, Aws_query_1.de_DecodeAuthorizationMessageCommand)(output, context); - } + } + return await toRetry(); + }; }; - exports2.DecodeAuthorizationMessageCommand = DecodeAuthorizationMessageCommand; + exports2.retryWrapper = retryWrapper; } }); -// ../../../node_modules/@aws-sdk/client-sts/dist-cjs/commands/GetAccessKeyInfoCommand.js -var require_GetAccessKeyInfoCommand = __commonJS({ - "../../../node_modules/@aws-sdk/client-sts/dist-cjs/commands/GetAccessKeyInfoCommand.js"(exports2) { +// ../../../node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/fromHttp.js +var require_fromHttp = __commonJS({ + "../../../node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/fromHttp.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.GetAccessKeyInfoCommand = exports2.$Command = void 0; - var middleware_signing_1 = require_dist_cjs14(); - var middleware_endpoint_1 = require_dist_cjs26(); - var middleware_serde_1 = require_dist_cjs25(); - var smithy_client_1 = require_dist_cjs34(); - Object.defineProperty(exports2, "$Command", { enumerable: true, get: function() { - return smithy_client_1.Command; - } }); - var types_1 = require_dist_cjs(); - var Aws_query_1 = require_Aws_query(); - var GetAccessKeyInfoCommand = class _GetAccessKeyInfoCommand extends smithy_client_1.Command { - static getEndpointParameterInstructions() { - return { - UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, - UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, - Endpoint: { type: "builtInParams", name: "endpoint" }, - Region: { type: "builtInParams", name: "region" }, - UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" } - }; - } - constructor(input) { - super(); - this.input = input; - } - resolveMiddleware(clientStack, configuration, options) { - this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, _GetAccessKeyInfoCommand.getEndpointParameterInstructions())); - this.middlewareStack.use((0, middleware_signing_1.getAwsAuthPlugin)(configuration)); - const stack = clientStack.concat(this.middlewareStack); - const { logger } = configuration; - const clientName = "STSClient"; - const commandName = "GetAccessKeyInfoCommand"; - const handlerExecutionContext = { - logger, - clientName, - commandName, - inputFilterSensitiveLog: (_) => _, - outputFilterSensitiveLog: (_) => _, - [types_1.SMITHY_CONTEXT_KEY]: { - service: "AWSSecurityTokenServiceV20110615", - operation: "GetAccessKeyInfo" - } - }; - const { requestHandler } = configuration; - return stack.resolve((request2) => requestHandler.handle(request2.request, options || {}), handlerExecutionContext); - } - serialize(input, context) { - return (0, Aws_query_1.se_GetAccessKeyInfoCommand)(input, context); - } - deserialize(output, context) { - return (0, Aws_query_1.de_GetAccessKeyInfoCommand)(output, context); - } + exports2.fromHttp = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var node_http_handler_1 = require_dist_cjs51(); + var property_provider_1 = require_dist_cjs40(); + var promises_1 = tslib_1.__importDefault(require("fs/promises")); + var checkUrl_1 = require_checkUrl(); + var requestHelpers_1 = require_requestHelpers(); + var retry_wrapper_1 = require_retry_wrapper(); + var AWS_CONTAINER_CREDENTIALS_RELATIVE_URI = "AWS_CONTAINER_CREDENTIALS_RELATIVE_URI"; + var DEFAULT_LINK_LOCAL_HOST = "http://169.254.170.2"; + var AWS_CONTAINER_CREDENTIALS_FULL_URI = "AWS_CONTAINER_CREDENTIALS_FULL_URI"; + var AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE = "AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE"; + var AWS_CONTAINER_AUTHORIZATION_TOKEN = "AWS_CONTAINER_AUTHORIZATION_TOKEN"; + var fromHttp = (options = {}) => { + options.logger?.debug("@aws-sdk/credential-provider-http - fromHttp"); + let host; + const relative = options.awsContainerCredentialsRelativeUri ?? process.env[AWS_CONTAINER_CREDENTIALS_RELATIVE_URI]; + const full = options.awsContainerCredentialsFullUri ?? process.env[AWS_CONTAINER_CREDENTIALS_FULL_URI]; + const token = options.awsContainerAuthorizationToken ?? process.env[AWS_CONTAINER_AUTHORIZATION_TOKEN]; + const tokenFile = options.awsContainerAuthorizationTokenFile ?? process.env[AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE]; + const warn = options.logger?.constructor?.name === "NoOpLogger" || !options.logger ? console.warn : options.logger.warn; + if (relative && full) { + warn("@aws-sdk/credential-provider-http: you have set both awsContainerCredentialsRelativeUri and awsContainerCredentialsFullUri."); + warn("awsContainerCredentialsFullUri will take precedence."); + } + if (token && tokenFile) { + warn("@aws-sdk/credential-provider-http: you have set both awsContainerAuthorizationToken and awsContainerAuthorizationTokenFile."); + warn("awsContainerAuthorizationToken will take precedence."); + } + if (full) { + host = full; + } else if (relative) { + host = `${DEFAULT_LINK_LOCAL_HOST}${relative}`; + } else { + throw new property_provider_1.CredentialsProviderError(`No HTTP credential provider host provided. +Set AWS_CONTAINER_CREDENTIALS_FULL_URI or AWS_CONTAINER_CREDENTIALS_RELATIVE_URI.`, { logger: options.logger }); + } + const url2 = new URL(host); + (0, checkUrl_1.checkUrl)(url2, options.logger); + const requestHandler = new node_http_handler_1.NodeHttpHandler({ + requestTimeout: options.timeout ?? 1e3, + connectionTimeout: options.timeout ?? 1e3 + }); + return (0, retry_wrapper_1.retryWrapper)(async () => { + const request2 = (0, requestHelpers_1.createGetRequest)(url2); + if (token) { + request2.headers.Authorization = token; + } else if (tokenFile) { + request2.headers.Authorization = (await promises_1.default.readFile(tokenFile)).toString(); + } + try { + const result = await requestHandler.handle(request2); + return (0, requestHelpers_1.getCredentials)(result.response); + } catch (e) { + throw new property_provider_1.CredentialsProviderError(String(e), { logger: options.logger }); + } + }, options.maxRetries ?? 3, options.timeout ?? 1e3); }; - exports2.GetAccessKeyInfoCommand = GetAccessKeyInfoCommand; + exports2.fromHttp = fromHttp; } }); -// ../../../node_modules/@aws-sdk/client-sts/dist-cjs/commands/GetCallerIdentityCommand.js -var require_GetCallerIdentityCommand = __commonJS({ - "../../../node_modules/@aws-sdk/client-sts/dist-cjs/commands/GetCallerIdentityCommand.js"(exports2) { +// ../../../node_modules/@aws-sdk/credential-provider-http/dist-cjs/index.js +var require_dist_cjs55 = __commonJS({ + "../../../node_modules/@aws-sdk/credential-provider-http/dist-cjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.GetCallerIdentityCommand = exports2.$Command = void 0; - var middleware_signing_1 = require_dist_cjs14(); - var middleware_endpoint_1 = require_dist_cjs26(); - var middleware_serde_1 = require_dist_cjs25(); - var smithy_client_1 = require_dist_cjs34(); - Object.defineProperty(exports2, "$Command", { enumerable: true, get: function() { - return smithy_client_1.Command; + exports2.fromHttp = void 0; + var fromHttp_1 = require_fromHttp(); + Object.defineProperty(exports2, "fromHttp", { enumerable: true, get: function() { + return fromHttp_1.fromHttp; } }); - var types_1 = require_dist_cjs(); - var Aws_query_1 = require_Aws_query(); - var GetCallerIdentityCommand = class _GetCallerIdentityCommand extends smithy_client_1.Command { - static getEndpointParameterInstructions() { - return { - UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, - UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, - Endpoint: { type: "builtInParams", name: "endpoint" }, - Region: { type: "builtInParams", name: "region" }, - UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" } - }; - } - constructor(input) { - super(); - this.input = input; - } - resolveMiddleware(clientStack, configuration, options) { - this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, _GetCallerIdentityCommand.getEndpointParameterInstructions())); - this.middlewareStack.use((0, middleware_signing_1.getAwsAuthPlugin)(configuration)); - const stack = clientStack.concat(this.middlewareStack); - const { logger } = configuration; - const clientName = "STSClient"; - const commandName = "GetCallerIdentityCommand"; - const handlerExecutionContext = { - logger, - clientName, - commandName, - inputFilterSensitiveLog: (_) => _, - outputFilterSensitiveLog: (_) => _, - [types_1.SMITHY_CONTEXT_KEY]: { - service: "AWSSecurityTokenServiceV20110615", - operation: "GetCallerIdentity" + } +}); + +// ../../../node_modules/@aws-sdk/client-sso/dist-cjs/auth/httpAuthSchemeProvider.js +var require_httpAuthSchemeProvider2 = __commonJS({ + "../../../node_modules/@aws-sdk/client-sso/dist-cjs/auth/httpAuthSchemeProvider.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.resolveHttpAuthSchemeConfig = exports2.defaultSSOHttpAuthSchemeProvider = exports2.defaultSSOHttpAuthSchemeParametersProvider = void 0; + var core_1 = (init_dist_es2(), __toCommonJS(dist_es_exports2)); + var util_middleware_1 = require_dist_cjs10(); + var defaultSSOHttpAuthSchemeParametersProvider = async (config, context, input) => { + return { + operation: (0, util_middleware_1.getSmithyContext)(context).operation, + region: await (0, util_middleware_1.normalizeProvider)(config.region)() || (() => { + throw new Error("expected `region` to be configured for `aws.auth#sigv4`"); + })() + }; + }; + exports2.defaultSSOHttpAuthSchemeParametersProvider = defaultSSOHttpAuthSchemeParametersProvider; + function createAwsAuthSigv4HttpAuthOption(authParameters) { + return { + schemeId: "aws.auth#sigv4", + signingProperties: { + name: "awsssoportal", + region: authParameters.region + }, + propertiesExtractor: (config, context) => ({ + signingProperties: { + config, + context } - }; - const { requestHandler } = configuration; - return stack.resolve((request2) => requestHandler.handle(request2.request, options || {}), handlerExecutionContext); - } - serialize(input, context) { - return (0, Aws_query_1.se_GetCallerIdentityCommand)(input, context); + }) + }; + } + function createSmithyApiNoAuthHttpAuthOption(authParameters) { + return { + schemeId: "smithy.api#noAuth" + }; + } + var defaultSSOHttpAuthSchemeProvider = (authParameters) => { + const options = []; + switch (authParameters.operation) { + case "GetRoleCredentials": { + options.push(createSmithyApiNoAuthHttpAuthOption(authParameters)); + break; + } + case "ListAccountRoles": { + options.push(createSmithyApiNoAuthHttpAuthOption(authParameters)); + break; + } + case "ListAccounts": { + options.push(createSmithyApiNoAuthHttpAuthOption(authParameters)); + break; + } + case "Logout": { + options.push(createSmithyApiNoAuthHttpAuthOption(authParameters)); + break; + } + default: { + options.push(createAwsAuthSigv4HttpAuthOption(authParameters)); + } } - deserialize(output, context) { - return (0, Aws_query_1.de_GetCallerIdentityCommand)(output, context); + return options; + }; + exports2.defaultSSOHttpAuthSchemeProvider = defaultSSOHttpAuthSchemeProvider; + var resolveHttpAuthSchemeConfig = (config) => { + const config_0 = (0, core_1.resolveAwsSdkSigV4Config)(config); + return { + ...config_0 + }; + }; + exports2.resolveHttpAuthSchemeConfig = resolveHttpAuthSchemeConfig; + } +}); + +// ../../../node_modules/@aws-sdk/client-sso/package.json +var require_package2 = __commonJS({ + "../../../node_modules/@aws-sdk/client-sso/package.json"(exports2, module2) { + module2.exports = { + name: "@aws-sdk/client-sso", + description: "AWS SDK for JavaScript Sso Client for Node.js, Browser and React Native", + version: "3.632.0", + scripts: { + build: "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'", + "build:cjs": "node ../../scripts/compilation/inline client-sso", + "build:es": "tsc -p tsconfig.es.json", + "build:include:deps": "lerna run --scope $npm_package_name --include-dependencies build", + "build:types": "tsc -p tsconfig.types.json", + "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4", + clean: "rimraf ./dist-* && rimraf *.tsbuildinfo", + "extract:docs": "api-extractor run --local", + "generate:client": "node ../../scripts/generate-clients/single-service --solo sso" + }, + main: "./dist-cjs/index.js", + types: "./dist-types/index.d.ts", + module: "./dist-es/index.js", + sideEffects: false, + dependencies: { + "@aws-crypto/sha256-browser": "5.2.0", + "@aws-crypto/sha256-js": "5.2.0", + "@aws-sdk/core": "3.629.0", + "@aws-sdk/middleware-host-header": "3.620.0", + "@aws-sdk/middleware-logger": "3.609.0", + "@aws-sdk/middleware-recursion-detection": "3.620.0", + "@aws-sdk/middleware-user-agent": "3.632.0", + "@aws-sdk/region-config-resolver": "3.614.0", + "@aws-sdk/types": "3.609.0", + "@aws-sdk/util-endpoints": "3.632.0", + "@aws-sdk/util-user-agent-browser": "3.609.0", + "@aws-sdk/util-user-agent-node": "3.614.0", + "@smithy/config-resolver": "^3.0.5", + "@smithy/core": "^2.3.2", + "@smithy/fetch-http-handler": "^3.2.4", + "@smithy/hash-node": "^3.0.3", + "@smithy/invalid-dependency": "^3.0.3", + "@smithy/middleware-content-length": "^3.0.5", + "@smithy/middleware-endpoint": "^3.1.0", + "@smithy/middleware-retry": "^3.0.14", + "@smithy/middleware-serde": "^3.0.3", + "@smithy/middleware-stack": "^3.0.3", + "@smithy/node-config-provider": "^3.1.4", + "@smithy/node-http-handler": "^3.1.4", + "@smithy/protocol-http": "^4.1.0", + "@smithy/smithy-client": "^3.1.12", + "@smithy/types": "^3.3.0", + "@smithy/url-parser": "^3.0.3", + "@smithy/util-base64": "^3.0.0", + "@smithy/util-body-length-browser": "^3.0.0", + "@smithy/util-body-length-node": "^3.0.0", + "@smithy/util-defaults-mode-browser": "^3.0.14", + "@smithy/util-defaults-mode-node": "^3.0.14", + "@smithy/util-endpoints": "^2.0.5", + "@smithy/util-middleware": "^3.0.3", + "@smithy/util-retry": "^3.0.3", + "@smithy/util-utf8": "^3.0.0", + tslib: "^2.6.2" + }, + devDependencies: { + "@tsconfig/node16": "16.1.3", + "@types/node": "^16.18.96", + concurrently: "7.0.0", + "downlevel-dts": "0.10.1", + rimraf: "3.0.2", + typescript: "~4.9.5" + }, + engines: { + node: ">=16.0.0" + }, + typesVersions: { + "<4.0": { + "dist-types/*": [ + "dist-types/ts3.4/*" + ] + } + }, + files: [ + "dist-*/**" + ], + author: { + name: "AWS SDK for JavaScript Team", + url: "https://aws.amazon.com/javascript/" + }, + license: "Apache-2.0", + browser: { + "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.browser" + }, + "react-native": { + "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.native" + }, + homepage: "https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sso", + repository: { + type: "git", + url: "https://github.com/aws/aws-sdk-js-v3.git", + directory: "clients/client-sso" } }; - exports2.GetCallerIdentityCommand = GetCallerIdentityCommand; } }); -// ../../../node_modules/@aws-sdk/client-sts/dist-cjs/commands/GetFederationTokenCommand.js -var require_GetFederationTokenCommand = __commonJS({ - "../../../node_modules/@aws-sdk/client-sts/dist-cjs/commands/GetFederationTokenCommand.js"(exports2) { +// ../../../node_modules/@aws-sdk/util-user-agent-node/dist-cjs/index.js +var require_dist_cjs56 = __commonJS({ + "../../../node_modules/@aws-sdk/util-user-agent-node/dist-cjs/index.js"(exports2, module2) { "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.GetFederationTokenCommand = exports2.$Command = void 0; - var middleware_signing_1 = require_dist_cjs14(); - var middleware_endpoint_1 = require_dist_cjs26(); - var middleware_serde_1 = require_dist_cjs25(); - var smithy_client_1 = require_dist_cjs34(); - Object.defineProperty(exports2, "$Command", { enumerable: true, get: function() { - return smithy_client_1.Command; - } }); - var types_1 = require_dist_cjs(); - var models_0_1 = require_models_0(); - var Aws_query_1 = require_Aws_query(); - var GetFederationTokenCommand = class _GetFederationTokenCommand extends smithy_client_1.Command { - static getEndpointParameterInstructions() { - return { - UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, - UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, - Endpoint: { type: "builtInParams", name: "endpoint" }, - Region: { type: "builtInParams", name: "region" }, - UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" } - }; + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all) => { + for (var name in all) + __defProp2(target, name, { get: all[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); } - constructor(input) { - super(); - this.input = input; + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + UA_APP_ID_ENV_NAME: () => UA_APP_ID_ENV_NAME, + UA_APP_ID_INI_NAME: () => UA_APP_ID_INI_NAME, + crtAvailability: () => crtAvailability, + defaultUserAgent: () => defaultUserAgent + }); + module2.exports = __toCommonJS2(src_exports); + var import_node_config_provider = require_dist_cjs42(); + var import_os = require("os"); + var import_process = require("process"); + var crtAvailability = { + isCrtAvailable: false + }; + var isCrtAvailable = /* @__PURE__ */ __name(() => { + if (crtAvailability.isCrtAvailable) { + return ["md/crt-avail"]; } - resolveMiddleware(clientStack, configuration, options) { - this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, _GetFederationTokenCommand.getEndpointParameterInstructions())); - this.middlewareStack.use((0, middleware_signing_1.getAwsAuthPlugin)(configuration)); - const stack = clientStack.concat(this.middlewareStack); - const { logger } = configuration; - const clientName = "STSClient"; - const commandName = "GetFederationTokenCommand"; - const handlerExecutionContext = { - logger, - clientName, - commandName, - inputFilterSensitiveLog: (_) => _, - outputFilterSensitiveLog: models_0_1.GetFederationTokenResponseFilterSensitiveLog, - [types_1.SMITHY_CONTEXT_KEY]: { - service: "AWSSecurityTokenServiceV20110615", - operation: "GetFederationToken" - } - }; - const { requestHandler } = configuration; - return stack.resolve((request2) => requestHandler.handle(request2.request, options || {}), handlerExecutionContext); + return null; + }, "isCrtAvailable"); + var UA_APP_ID_ENV_NAME = "AWS_SDK_UA_APP_ID"; + var UA_APP_ID_INI_NAME = "sdk-ua-app-id"; + var defaultUserAgent = /* @__PURE__ */ __name(({ serviceId, clientVersion }) => { + const sections = [ + // sdk-metadata + ["aws-sdk-js", clientVersion], + // ua-metadata + ["ua", "2.0"], + // os-metadata + [`os/${(0, import_os.platform)()}`, (0, import_os.release)()], + // language-metadata + // ECMAScript edition doesn't matter in JS, so no version needed. + ["lang/js"], + ["md/nodejs", `${import_process.versions.node}`] + ]; + const crtAvailable = isCrtAvailable(); + if (crtAvailable) { + sections.push(crtAvailable); } - serialize(input, context) { - return (0, Aws_query_1.se_GetFederationTokenCommand)(input, context); + if (serviceId) { + sections.push([`api/${serviceId}`, clientVersion]); } - deserialize(output, context) { - return (0, Aws_query_1.de_GetFederationTokenCommand)(output, context); + if (import_process.env.AWS_EXECUTION_ENV) { + sections.push([`exec-env/${import_process.env.AWS_EXECUTION_ENV}`]); } - }; - exports2.GetFederationTokenCommand = GetFederationTokenCommand; + const appIdPromise = (0, import_node_config_provider.loadConfig)({ + environmentVariableSelector: (env2) => env2[UA_APP_ID_ENV_NAME], + configFileSelector: (profile) => profile[UA_APP_ID_INI_NAME], + default: void 0 + })(); + let resolvedUserAgent = void 0; + return async () => { + if (!resolvedUserAgent) { + const appId = await appIdPromise; + resolvedUserAgent = appId ? [...sections, [`app/${appId}`]] : [...sections]; + } + return resolvedUserAgent; + }; + }, "defaultUserAgent"); } }); -// ../../../node_modules/@aws-sdk/client-sts/dist-cjs/commands/GetSessionTokenCommand.js -var require_GetSessionTokenCommand = __commonJS({ - "../../../node_modules/@aws-sdk/client-sts/dist-cjs/commands/GetSessionTokenCommand.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.GetSessionTokenCommand = exports2.$Command = void 0; - var middleware_signing_1 = require_dist_cjs14(); - var middleware_endpoint_1 = require_dist_cjs26(); - var middleware_serde_1 = require_dist_cjs25(); - var smithy_client_1 = require_dist_cjs34(); - Object.defineProperty(exports2, "$Command", { enumerable: true, get: function() { - return smithy_client_1.Command; - } }); - var types_1 = require_dist_cjs(); - var models_0_1 = require_models_0(); - var Aws_query_1 = require_Aws_query(); - var GetSessionTokenCommand = class _GetSessionTokenCommand extends smithy_client_1.Command { - static getEndpointParameterInstructions() { - return { - UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, - UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, - Endpoint: { type: "builtInParams", name: "endpoint" }, - Region: { type: "builtInParams", name: "region" }, - UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" } - }; +// ../../../node_modules/@smithy/hash-node/dist-cjs/index.js +var require_dist_cjs57 = __commonJS({ + "../../../node_modules/@smithy/hash-node/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all) => { + for (var name in all) + __defProp2(target, name, { get: all[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); } - constructor(input) { - super(); - this.input = input; + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + Hash: () => Hash + }); + module2.exports = __toCommonJS2(src_exports); + var import_util_buffer_from = require_dist_cjs27(); + var import_util_utf8 = require_dist_cjs28(); + var import_buffer = require("buffer"); + var import_crypto5 = require("crypto"); + var _Hash = class _Hash { + constructor(algorithmIdentifier, secret) { + this.algorithmIdentifier = algorithmIdentifier; + this.secret = secret; + this.reset(); } - resolveMiddleware(clientStack, configuration, options) { - this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, _GetSessionTokenCommand.getEndpointParameterInstructions())); - this.middlewareStack.use((0, middleware_signing_1.getAwsAuthPlugin)(configuration)); - const stack = clientStack.concat(this.middlewareStack); - const { logger } = configuration; - const clientName = "STSClient"; - const commandName = "GetSessionTokenCommand"; - const handlerExecutionContext = { - logger, - clientName, - commandName, - inputFilterSensitiveLog: (_) => _, - outputFilterSensitiveLog: models_0_1.GetSessionTokenResponseFilterSensitiveLog, - [types_1.SMITHY_CONTEXT_KEY]: { - service: "AWSSecurityTokenServiceV20110615", - operation: "GetSessionToken" - } - }; - const { requestHandler } = configuration; - return stack.resolve((request2) => requestHandler.handle(request2.request, options || {}), handlerExecutionContext); + update(toHash, encoding) { + this.hash.update((0, import_util_utf8.toUint8Array)(castSourceData(toHash, encoding))); } - serialize(input, context) { - return (0, Aws_query_1.se_GetSessionTokenCommand)(input, context); + digest() { + return Promise.resolve(this.hash.digest()); } - deserialize(output, context) { - return (0, Aws_query_1.de_GetSessionTokenCommand)(output, context); + reset() { + this.hash = this.secret ? (0, import_crypto5.createHmac)(this.algorithmIdentifier, castSourceData(this.secret)) : (0, import_crypto5.createHash)(this.algorithmIdentifier); } }; - exports2.GetSessionTokenCommand = GetSessionTokenCommand; + __name(_Hash, "Hash"); + var Hash = _Hash; + function castSourceData(toCast, encoding) { + if (import_buffer.Buffer.isBuffer(toCast)) { + return toCast; + } + if (typeof toCast === "string") { + return (0, import_util_buffer_from.fromString)(toCast, encoding); + } + if (ArrayBuffer.isView(toCast)) { + return (0, import_util_buffer_from.fromArrayBuffer)(toCast.buffer, toCast.byteOffset, toCast.byteLength); + } + return (0, import_util_buffer_from.fromArrayBuffer)(toCast); + } + __name(castSourceData, "castSourceData"); } }); -// ../../../node_modules/@aws-sdk/client-sts/dist-cjs/STS.js -var require_STS = __commonJS({ - "../../../node_modules/@aws-sdk/client-sts/dist-cjs/STS.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.STS = void 0; - var smithy_client_1 = require_dist_cjs34(); - var AssumeRoleCommand_1 = require_AssumeRoleCommand(); - var AssumeRoleWithSAMLCommand_1 = require_AssumeRoleWithSAMLCommand(); - var AssumeRoleWithWebIdentityCommand_1 = require_AssumeRoleWithWebIdentityCommand(); - var DecodeAuthorizationMessageCommand_1 = require_DecodeAuthorizationMessageCommand(); - var GetAccessKeyInfoCommand_1 = require_GetAccessKeyInfoCommand(); - var GetCallerIdentityCommand_1 = require_GetCallerIdentityCommand(); - var GetFederationTokenCommand_1 = require_GetFederationTokenCommand(); - var GetSessionTokenCommand_1 = require_GetSessionTokenCommand(); - var STSClient_1 = require_STSClient(); - var commands = { - AssumeRoleCommand: AssumeRoleCommand_1.AssumeRoleCommand, - AssumeRoleWithSAMLCommand: AssumeRoleWithSAMLCommand_1.AssumeRoleWithSAMLCommand, - AssumeRoleWithWebIdentityCommand: AssumeRoleWithWebIdentityCommand_1.AssumeRoleWithWebIdentityCommand, - DecodeAuthorizationMessageCommand: DecodeAuthorizationMessageCommand_1.DecodeAuthorizationMessageCommand, - GetAccessKeyInfoCommand: GetAccessKeyInfoCommand_1.GetAccessKeyInfoCommand, - GetCallerIdentityCommand: GetCallerIdentityCommand_1.GetCallerIdentityCommand, - GetFederationTokenCommand: GetFederationTokenCommand_1.GetFederationTokenCommand, - GetSessionTokenCommand: GetSessionTokenCommand_1.GetSessionTokenCommand - }; - var STS = class extends STSClient_1.STSClient { +// ../../../node_modules/@smithy/util-body-length-node/dist-cjs/index.js +var require_dist_cjs58 = __commonJS({ + "../../../node_modules/@smithy/util-body-length-node/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all) => { + for (var name in all) + __defProp2(target, name, { get: all[name], enumerable: true }); }; - exports2.STS = STS; - (0, smithy_client_1.createAggregatedClient)(commands, STS); - } -}); - -// ../../../node_modules/@aws-sdk/client-sts/dist-cjs/commands/index.js -var require_commands2 = __commonJS({ - "../../../node_modules/@aws-sdk/client-sts/dist-cjs/commands/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); - tslib_1.__exportStar(require_AssumeRoleCommand(), exports2); - tslib_1.__exportStar(require_AssumeRoleWithSAMLCommand(), exports2); - tslib_1.__exportStar(require_AssumeRoleWithWebIdentityCommand(), exports2); - tslib_1.__exportStar(require_DecodeAuthorizationMessageCommand(), exports2); - tslib_1.__exportStar(require_GetAccessKeyInfoCommand(), exports2); - tslib_1.__exportStar(require_GetCallerIdentityCommand(), exports2); - tslib_1.__exportStar(require_GetFederationTokenCommand(), exports2); - tslib_1.__exportStar(require_GetSessionTokenCommand(), exports2); - } -}); - -// ../../../node_modules/@aws-sdk/client-sts/dist-cjs/models/index.js -var require_models2 = __commonJS({ - "../../../node_modules/@aws-sdk/client-sts/dist-cjs/models/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); - tslib_1.__exportStar(require_models_0(), exports2); - } -}); - -// ../../../node_modules/@aws-sdk/client-sts/dist-cjs/defaultRoleAssumers.js -var require_defaultRoleAssumers = __commonJS({ - "../../../node_modules/@aws-sdk/client-sts/dist-cjs/defaultRoleAssumers.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.decorateDefaultCredentialProvider = exports2.getDefaultRoleAssumerWithWebIdentity = exports2.getDefaultRoleAssumer = void 0; - var defaultStsRoleAssumers_1 = require_defaultStsRoleAssumers(); - var STSClient_1 = require_STSClient(); - var getCustomizableStsClientCtor = (baseCtor, customizations) => { - if (!customizations) - return baseCtor; - else - return class CustomizableSTSClient extends baseCtor { - constructor(config) { - super(config); - for (const customization of customizations) { - this.middlewareStack.use(customization); - } - } - }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; }; - var getDefaultRoleAssumer = (stsOptions = {}, stsPlugins) => (0, defaultStsRoleAssumers_1.getDefaultRoleAssumer)(stsOptions, getCustomizableStsClientCtor(STSClient_1.STSClient, stsPlugins)); - exports2.getDefaultRoleAssumer = getDefaultRoleAssumer; - var getDefaultRoleAssumerWithWebIdentity = (stsOptions = {}, stsPlugins) => (0, defaultStsRoleAssumers_1.getDefaultRoleAssumerWithWebIdentity)(stsOptions, getCustomizableStsClientCtor(STSClient_1.STSClient, stsPlugins)); - exports2.getDefaultRoleAssumerWithWebIdentity = getDefaultRoleAssumerWithWebIdentity; - var decorateDefaultCredentialProvider = (provider) => (input) => provider({ - roleAssumer: (0, exports2.getDefaultRoleAssumer)(input), - roleAssumerWithWebIdentity: (0, exports2.getDefaultRoleAssumerWithWebIdentity)(input), - ...input + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + calculateBodyLength: () => calculateBodyLength }); - exports2.decorateDefaultCredentialProvider = decorateDefaultCredentialProvider; - } -}); - -// ../../../node_modules/@aws-sdk/client-sts/dist-cjs/index.js -var require_dist_cjs51 = __commonJS({ - "../../../node_modules/@aws-sdk/client-sts/dist-cjs/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.STSServiceException = void 0; - var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); - tslib_1.__exportStar(require_STSClient(), exports2); - tslib_1.__exportStar(require_STS(), exports2); - tslib_1.__exportStar(require_commands2(), exports2); - tslib_1.__exportStar(require_models2(), exports2); - tslib_1.__exportStar(require_defaultRoleAssumers(), exports2); - var STSServiceException_1 = require_STSServiceException(); - Object.defineProperty(exports2, "STSServiceException", { enumerable: true, get: function() { - return STSServiceException_1.STSServiceException; - } }); - } -}); - -// ../../../node_modules/@aws-sdk/client-sfn/dist-cjs/endpoint/ruleset.js -var require_ruleset3 = __commonJS({ - "../../../node_modules/@aws-sdk/client-sfn/dist-cjs/endpoint/ruleset.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.ruleSet = void 0; - var r = "required"; - var s = "fn"; - var t = "argv"; - var u = "ref"; - var a = "isSet"; - var b = "tree"; - var c = "error"; - var d = "endpoint"; - var e = "PartitionResult"; - var f = { [r]: false, "type": "String" }; - var g = { [r]: true, "default": false, "type": "Boolean" }; - var h = { [u]: "Endpoint" }; - var i = { [s]: "booleanEquals", [t]: [{ [u]: "UseFIPS" }, true] }; - var j = { [s]: "booleanEquals", [t]: [{ [u]: "UseDualStack" }, true] }; - var k = {}; - var l = { [u]: "Region" }; - var m = { [s]: "booleanEquals", [t]: [true, { [s]: "getAttr", [t]: [{ [u]: e }, "supportsFIPS"] }] }; - var n = { [s]: "booleanEquals", [t]: [true, { [s]: "getAttr", [t]: [{ [u]: e }, "supportsDualStack"] }] }; - var o = [i]; - var p = [j]; - var q = [l]; - var _data = { version: "1.0", parameters: { Region: f, UseDualStack: g, UseFIPS: g, Endpoint: f }, rules: [{ conditions: [{ [s]: a, [t]: [h] }], type: b, rules: [{ conditions: o, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: c }, { conditions: p, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: c }, { endpoint: { url: h, properties: k, headers: k }, type: d }] }, { conditions: [{ [s]: a, [t]: q }], type: b, rules: [{ conditions: [{ [s]: "aws.partition", [t]: q, assign: e }], type: b, rules: [{ conditions: [i, j], type: b, rules: [{ conditions: [m, n], type: b, rules: [{ endpoint: { url: "https://states-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: k, headers: k }, type: d }] }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: c }] }, { conditions: o, type: b, rules: [{ conditions: [m], type: b, rules: [{ conditions: [{ [s]: "stringEquals", [t]: [l, "us-gov-west-1"] }], endpoint: { url: "https://states.us-gov-west-1.amazonaws.com", properties: k, headers: k }, type: d }, { endpoint: { url: "https://states-fips.{Region}.{PartitionResult#dnsSuffix}", properties: k, headers: k }, type: d }] }, { error: "FIPS is enabled but this partition does not support FIPS", type: c }] }, { conditions: p, type: b, rules: [{ conditions: [n], type: b, rules: [{ endpoint: { url: "https://states.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: k, headers: k }, type: d }] }, { error: "DualStack is enabled but this partition does not support DualStack", type: c }] }, { endpoint: { url: "https://states.{Region}.{PartitionResult#dnsSuffix}", properties: k, headers: k }, type: d }] }] }, { error: "Invalid Configuration: Missing Region", type: c }] }; - exports2.ruleSet = _data; + module2.exports = __toCommonJS2(src_exports); + var import_fs = require("fs"); + var calculateBodyLength = /* @__PURE__ */ __name((body) => { + if (!body) { + return 0; + } + if (typeof body === "string") { + return Buffer.byteLength(body); + } else if (typeof body.byteLength === "number") { + return body.byteLength; + } else if (typeof body.size === "number") { + return body.size; + } else if (typeof body.start === "number" && typeof body.end === "number") { + return body.end + 1 - body.start; + } else if (typeof body.path === "string" || Buffer.isBuffer(body.path)) { + return (0, import_fs.lstatSync)(body.path).size; + } else if (typeof body.fd === "number") { + return (0, import_fs.fstatSync)(body.fd).size; + } + throw new Error(`Body Length computation failed for ${body}`); + }, "calculateBodyLength"); } }); -// ../../../node_modules/@aws-sdk/client-sfn/dist-cjs/endpoint/endpointResolver.js -var require_endpointResolver3 = __commonJS({ - "../../../node_modules/@aws-sdk/client-sfn/dist-cjs/endpoint/endpointResolver.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.defaultEndpointResolver = void 0; - var util_endpoints_1 = require_dist_cjs16(); - var ruleset_1 = require_ruleset3(); - var defaultEndpointResolver = (endpointParams, context = {}) => { - return (0, util_endpoints_1.resolveEndpoint)(ruleset_1.ruleSet, { - endpointParams, - logger: context.logger - }); +// ../../../node_modules/@smithy/util-retry/node_modules/@smithy/service-error-classification/dist-cjs/index.js +var require_dist_cjs59 = __commonJS({ + "../../../node_modules/@smithy/util-retry/node_modules/@smithy/service-error-classification/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all) => { + for (var name in all) + __defProp2(target, name, { get: all[name], enumerable: true }); }; - exports2.defaultEndpointResolver = defaultEndpointResolver; - } -}); - -// ../../../node_modules/@aws-sdk/client-sfn/dist-cjs/runtimeConfig.shared.js -var require_runtimeConfig_shared3 = __commonJS({ - "../../../node_modules/@aws-sdk/client-sfn/dist-cjs/runtimeConfig.shared.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getRuntimeConfig = void 0; - var smithy_client_1 = require_dist_cjs34(); - var url_parser_1 = require_dist_cjs24(); - var util_base64_1 = require_dist_cjs30(); - var util_utf8_1 = require_dist_cjs10(); - var endpointResolver_1 = require_endpointResolver3(); - var getRuntimeConfig = (config) => ({ - apiVersion: "2016-11-23", - base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64, - base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64, - disableHostPrefix: config?.disableHostPrefix ?? false, - endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver, - extensions: config?.extensions ?? [], - logger: config?.logger ?? new smithy_client_1.NoOpLogger(), - serviceId: config?.serviceId ?? "SFN", - urlParser: config?.urlParser ?? url_parser_1.parseUrl, - utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8, - utf8Encoder: config?.utf8Encoder ?? util_utf8_1.toUtf8 - }); - exports2.getRuntimeConfig = getRuntimeConfig; - } -}); - -// ../../../node_modules/@aws-sdk/client-sfn/dist-cjs/runtimeConfig.js -var require_runtimeConfig3 = __commonJS({ - "../../../node_modules/@aws-sdk/client-sfn/dist-cjs/runtimeConfig.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getRuntimeConfig = void 0; - var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); - var package_json_1 = tslib_1.__importDefault(require_package()); - var client_sts_1 = require_dist_cjs51(); - var credential_provider_node_1 = require_dist_cjs50(); - var util_user_agent_node_1 = require_dist_cjs40(); - var config_resolver_1 = require_dist_cjs19(); - var hash_node_1 = require_dist_cjs41(); - var middleware_retry_1 = require_dist_cjs35(); - var node_config_provider_1 = require_dist_cjs22(); - var node_http_handler_1 = require_dist_cjs32(); - var util_body_length_node_1 = require_dist_cjs42(); - var util_retry_1 = require_dist_cjs28(); - var runtimeConfig_shared_1 = require_runtimeConfig_shared3(); - var smithy_client_1 = require_dist_cjs34(); - var util_defaults_mode_node_1 = require_dist_cjs43(); - var smithy_client_2 = require_dist_cjs34(); - var getRuntimeConfig = (config) => { - (0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version); - const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config); - const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode); - const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config); - return { - ...clientSharedValues, - ...config, - runtime: "node", - defaultsMode, - bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength, - credentialDefaultProvider: config?.credentialDefaultProvider ?? (0, client_sts_1.decorateDefaultCredentialProvider)(credential_provider_node_1.defaultProvider), - defaultUserAgentProvider: config?.defaultUserAgentProvider ?? (0, util_user_agent_node_1.defaultUserAgent)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }), - maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS), - region: config?.region ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new node_http_handler_1.NodeHttpHandler(defaultConfigProvider), - retryMode: config?.retryMode ?? (0, node_config_provider_1.loadConfig)({ - ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS, - default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE - }), - sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, "sha256"), - streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector, - useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), - useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS) - }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; }; - exports2.getRuntimeConfig = getRuntimeConfig; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + isClockSkewCorrectedError: () => isClockSkewCorrectedError, + isClockSkewError: () => isClockSkewError, + isRetryableByTrait: () => isRetryableByTrait, + isServerError: () => isServerError, + isThrottlingError: () => isThrottlingError, + isTransientError: () => isTransientError + }); + module2.exports = __toCommonJS2(src_exports); + var CLOCK_SKEW_ERROR_CODES = [ + "AuthFailure", + "InvalidSignatureException", + "RequestExpired", + "RequestInTheFuture", + "RequestTimeTooSkewed", + "SignatureDoesNotMatch" + ]; + var THROTTLING_ERROR_CODES = [ + "BandwidthLimitExceeded", + "EC2ThrottledException", + "LimitExceededException", + "PriorRequestNotComplete", + "ProvisionedThroughputExceededException", + "RequestLimitExceeded", + "RequestThrottled", + "RequestThrottledException", + "SlowDown", + "ThrottledException", + "Throttling", + "ThrottlingException", + "TooManyRequestsException", + "TransactionInProgressException" + // DynamoDB + ]; + var TRANSIENT_ERROR_CODES = ["TimeoutError", "RequestTimeout", "RequestTimeoutException"]; + var TRANSIENT_ERROR_STATUS_CODES = [500, 502, 503, 504]; + var NODEJS_TIMEOUT_ERROR_CODES = ["ECONNRESET", "ECONNREFUSED", "EPIPE", "ETIMEDOUT"]; + var isRetryableByTrait = /* @__PURE__ */ __name((error) => error.$retryable !== void 0, "isRetryableByTrait"); + var isClockSkewError = /* @__PURE__ */ __name((error) => CLOCK_SKEW_ERROR_CODES.includes(error.name), "isClockSkewError"); + var isClockSkewCorrectedError = /* @__PURE__ */ __name((error) => { + var _a; + return (_a = error.$metadata) == null ? void 0 : _a.clockSkewCorrected; + }, "isClockSkewCorrectedError"); + var isThrottlingError = /* @__PURE__ */ __name((error) => { + var _a, _b; + return ((_a = error.$metadata) == null ? void 0 : _a.httpStatusCode) === 429 || THROTTLING_ERROR_CODES.includes(error.name) || ((_b = error.$retryable) == null ? void 0 : _b.throttling) == true; + }, "isThrottlingError"); + var isTransientError = /* @__PURE__ */ __name((error) => { + var _a; + return isClockSkewCorrectedError(error) || TRANSIENT_ERROR_CODES.includes(error.name) || NODEJS_TIMEOUT_ERROR_CODES.includes((error == null ? void 0 : error.code) || "") || TRANSIENT_ERROR_STATUS_CODES.includes(((_a = error.$metadata) == null ? void 0 : _a.httpStatusCode) || 0); + }, "isTransientError"); + var isServerError = /* @__PURE__ */ __name((error) => { + var _a; + if (((_a = error.$metadata) == null ? void 0 : _a.httpStatusCode) !== void 0) { + const statusCode = error.$metadata.httpStatusCode; + if (500 <= statusCode && statusCode <= 599 && !isTransientError(error)) { + return true; + } + return false; + } + return false; + }, "isServerError"); } }); -// ../../../node_modules/@aws-sdk/client-sfn/dist-cjs/runtimeExtensions.js -var require_runtimeExtensions3 = __commonJS({ - "../../../node_modules/@aws-sdk/client-sfn/dist-cjs/runtimeExtensions.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.resolveRuntimeExtensions = void 0; - var region_config_resolver_1 = require_dist_cjs44(); - var protocol_http_1 = require_dist_cjs2(); - var smithy_client_1 = require_dist_cjs34(); - var asPartial = (t) => t; - var resolveRuntimeExtensions = (runtimeConfig, extensions) => { - const extensionConfiguration = { - ...asPartial((0, region_config_resolver_1.getAwsRegionExtensionConfiguration)(runtimeConfig)), - ...asPartial((0, smithy_client_1.getDefaultExtensionConfiguration)(runtimeConfig)), - ...asPartial((0, protocol_http_1.getHttpHandlerExtensionConfiguration)(runtimeConfig)) - }; - extensions.forEach((extension) => extension.configure(extensionConfiguration)); - return { - ...runtimeConfig, - ...(0, region_config_resolver_1.resolveAwsRegionExtensionConfiguration)(extensionConfiguration), - ...(0, smithy_client_1.resolveDefaultRuntimeConfig)(extensionConfiguration), - ...(0, protocol_http_1.resolveHttpHandlerRuntimeConfig)(extensionConfiguration) - }; +// ../../../node_modules/@smithy/util-retry/dist-cjs/index.js +var require_dist_cjs60 = __commonJS({ + "../../../node_modules/@smithy/util-retry/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all) => { + for (var name in all) + __defProp2(target, name, { get: all[name], enumerable: true }); }; - exports2.resolveRuntimeExtensions = resolveRuntimeExtensions; - } -}); - -// ../../../node_modules/@aws-sdk/client-sfn/dist-cjs/SFNClient.js -var require_SFNClient = __commonJS({ - "../../../node_modules/@aws-sdk/client-sfn/dist-cjs/SFNClient.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.SFNClient = exports2.__Client = void 0; - var middleware_host_header_1 = require_dist_cjs3(); - var middleware_logger_1 = require_dist_cjs4(); - var middleware_recursion_detection_1 = require_dist_cjs5(); - var middleware_signing_1 = require_dist_cjs14(); - var middleware_user_agent_1 = require_dist_cjs17(); - var config_resolver_1 = require_dist_cjs19(); - var middleware_content_length_1 = require_dist_cjs20(); - var middleware_endpoint_1 = require_dist_cjs26(); - var middleware_retry_1 = require_dist_cjs35(); - var smithy_client_1 = require_dist_cjs34(); - Object.defineProperty(exports2, "__Client", { enumerable: true, get: function() { - return smithy_client_1.Client; - } }); - var EndpointParameters_1 = require_EndpointParameters(); - var runtimeConfig_1 = require_runtimeConfig3(); - var runtimeExtensions_1 = require_runtimeExtensions3(); - var SFNClient = class extends smithy_client_1.Client { - constructor(...[configuration]) { - const _config_0 = (0, runtimeConfig_1.getRuntimeConfig)(configuration || {}); - const _config_1 = (0, EndpointParameters_1.resolveClientEndpointParameters)(_config_0); - const _config_2 = (0, config_resolver_1.resolveRegionConfig)(_config_1); - const _config_3 = (0, middleware_endpoint_1.resolveEndpointConfig)(_config_2); - const _config_4 = (0, middleware_retry_1.resolveRetryConfig)(_config_3); - const _config_5 = (0, middleware_host_header_1.resolveHostHeaderConfig)(_config_4); - const _config_6 = (0, middleware_signing_1.resolveAwsAuthConfig)(_config_5); - const _config_7 = (0, middleware_user_agent_1.resolveUserAgentConfig)(_config_6); - const _config_8 = (0, runtimeExtensions_1.resolveRuntimeExtensions)(_config_7, configuration?.extensions || []); - super(_config_8); - this.config = _config_8; - this.middlewareStack.use((0, middleware_retry_1.getRetryPlugin)(this.config)); - this.middlewareStack.use((0, middleware_content_length_1.getContentLengthPlugin)(this.config)); - this.middlewareStack.use((0, middleware_host_header_1.getHostHeaderPlugin)(this.config)); - this.middlewareStack.use((0, middleware_logger_1.getLoggerPlugin)(this.config)); - this.middlewareStack.use((0, middleware_recursion_detection_1.getRecursionDetectionPlugin)(this.config)); - this.middlewareStack.use((0, middleware_signing_1.getAwsAuthPlugin)(this.config)); - this.middlewareStack.use((0, middleware_user_agent_1.getUserAgentPlugin)(this.config)); - } - destroy() { - super.destroy(); + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); } + return to; }; - exports2.SFNClient = SFNClient; - } -}); - -// ../../../node_modules/@aws-sdk/client-sfn/dist-cjs/models/SFNServiceException.js -var require_SFNServiceException = __commonJS({ - "../../../node_modules/@aws-sdk/client-sfn/dist-cjs/models/SFNServiceException.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.SFNServiceException = exports2.__ServiceException = void 0; - var smithy_client_1 = require_dist_cjs34(); - Object.defineProperty(exports2, "__ServiceException", { enumerable: true, get: function() { - return smithy_client_1.ServiceException; - } }); - var SFNServiceException = class _SFNServiceException extends smithy_client_1.ServiceException { + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + AdaptiveRetryStrategy: () => AdaptiveRetryStrategy, + ConfiguredRetryStrategy: () => ConfiguredRetryStrategy, + DEFAULT_MAX_ATTEMPTS: () => DEFAULT_MAX_ATTEMPTS, + DEFAULT_RETRY_DELAY_BASE: () => DEFAULT_RETRY_DELAY_BASE, + DEFAULT_RETRY_MODE: () => DEFAULT_RETRY_MODE, + DefaultRateLimiter: () => DefaultRateLimiter, + INITIAL_RETRY_TOKENS: () => INITIAL_RETRY_TOKENS, + INVOCATION_ID_HEADER: () => INVOCATION_ID_HEADER, + MAXIMUM_RETRY_DELAY: () => MAXIMUM_RETRY_DELAY, + NO_RETRY_INCREMENT: () => NO_RETRY_INCREMENT, + REQUEST_HEADER: () => REQUEST_HEADER, + RETRY_COST: () => RETRY_COST, + RETRY_MODES: () => RETRY_MODES, + StandardRetryStrategy: () => StandardRetryStrategy, + THROTTLING_RETRY_DELAY_BASE: () => THROTTLING_RETRY_DELAY_BASE, + TIMEOUT_RETRY_COST: () => TIMEOUT_RETRY_COST + }); + module2.exports = __toCommonJS2(src_exports); + var RETRY_MODES = /* @__PURE__ */ ((RETRY_MODES2) => { + RETRY_MODES2["STANDARD"] = "standard"; + RETRY_MODES2["ADAPTIVE"] = "adaptive"; + return RETRY_MODES2; + })(RETRY_MODES || {}); + var DEFAULT_MAX_ATTEMPTS = 3; + var DEFAULT_RETRY_MODE = "standard"; + var import_service_error_classification = require_dist_cjs59(); + var _DefaultRateLimiter = class _DefaultRateLimiter { constructor(options) { - super(options); - Object.setPrototypeOf(this, _SFNServiceException.prototype); + this.currentCapacity = 0; + this.enabled = false; + this.lastMaxRate = 0; + this.measuredTxRate = 0; + this.requestCount = 0; + this.lastTimestamp = 0; + this.timeWindow = 0; + this.beta = (options == null ? void 0 : options.beta) ?? 0.7; + this.minCapacity = (options == null ? void 0 : options.minCapacity) ?? 1; + this.minFillRate = (options == null ? void 0 : options.minFillRate) ?? 0.5; + this.scaleConstant = (options == null ? void 0 : options.scaleConstant) ?? 0.4; + this.smooth = (options == null ? void 0 : options.smooth) ?? 0.8; + const currentTimeInSeconds = this.getCurrentTimeInSeconds(); + this.lastThrottleTime = currentTimeInSeconds; + this.lastTxRateBucket = Math.floor(this.getCurrentTimeInSeconds()); + this.fillRate = this.minFillRate; + this.maxCapacity = this.minCapacity; } - }; - exports2.SFNServiceException = SFNServiceException; - } -}); - -// ../../../node_modules/@aws-sdk/client-sfn/dist-cjs/models/models_0.js -var require_models_03 = __commonJS({ - "../../../node_modules/@aws-sdk/client-sfn/dist-cjs/models/models_0.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.ExecutionStartedEventDetailsFilterSensitiveLog = exports2.ExecutionFailedEventDetailsFilterSensitiveLog = exports2.ExecutionAbortedEventDetailsFilterSensitiveLog = exports2.GetActivityTaskOutputFilterSensitiveLog = exports2.DescribeStateMachineForExecutionOutputFilterSensitiveLog = exports2.DescribeStateMachineAliasOutputFilterSensitiveLog = exports2.DescribeStateMachineOutputFilterSensitiveLog = exports2.DescribeExecutionOutputFilterSensitiveLog = exports2.CreateStateMachineAliasInputFilterSensitiveLog = exports2.CreateStateMachineInputFilterSensitiveLog = exports2.ActivityTimedOutEventDetailsFilterSensitiveLog = exports2.ActivitySucceededEventDetailsFilterSensitiveLog = exports2.ActivityScheduleFailedEventDetailsFilterSensitiveLog = exports2.ActivityScheduledEventDetailsFilterSensitiveLog = exports2.ActivityFailedEventDetailsFilterSensitiveLog = exports2.MissingRequiredParameter = exports2.SyncExecutionStatus = exports2.InvalidExecutionInput = exports2.ExecutionLimitExceeded = exports2.ExecutionAlreadyExists = exports2.InvalidOutput = exports2.TaskTimedOut = exports2.TaskDoesNotExist = exports2.InvalidToken = exports2.HistoryEventType = exports2.StateMachineDoesNotExist = exports2.StateMachineStatus = exports2.MapRunStatus = exports2.ExecutionDoesNotExist = exports2.ExecutionStatus = exports2.ServiceQuotaExceededException = exports2.ResourceNotFound = exports2.ValidationException = exports2.ValidationExceptionReason = exports2.StateMachineTypeNotSupported = exports2.StateMachineLimitExceeded = exports2.StateMachineDeleting = exports2.StateMachineAlreadyExists = exports2.InvalidTracingConfiguration = exports2.InvalidLoggingConfiguration = exports2.InvalidDefinition = exports2.InvalidArn = exports2.StateMachineType = exports2.LogLevel = exports2.ConflictException = exports2.TooManyTags = exports2.InvalidName = exports2.ActivityWorkerLimitExceeded = exports2.ActivityLimitExceeded = exports2.ActivityDoesNotExist = void 0; - exports2.UpdateStateMachineAliasInputFilterSensitiveLog = exports2.UpdateStateMachineInputFilterSensitiveLog = exports2.StopExecutionInputFilterSensitiveLog = exports2.StartSyncExecutionOutputFilterSensitiveLog = exports2.StartSyncExecutionInputFilterSensitiveLog = exports2.StartExecutionInputFilterSensitiveLog = exports2.SendTaskSuccessInputFilterSensitiveLog = exports2.SendTaskFailureInputFilterSensitiveLog = exports2.PublishStateMachineVersionInputFilterSensitiveLog = exports2.GetExecutionHistoryOutputFilterSensitiveLog = exports2.HistoryEventFilterSensitiveLog = exports2.TaskTimedOutEventDetailsFilterSensitiveLog = exports2.TaskSucceededEventDetailsFilterSensitiveLog = exports2.TaskSubmittedEventDetailsFilterSensitiveLog = exports2.TaskSubmitFailedEventDetailsFilterSensitiveLog = exports2.TaskStartFailedEventDetailsFilterSensitiveLog = exports2.TaskScheduledEventDetailsFilterSensitiveLog = exports2.TaskFailedEventDetailsFilterSensitiveLog = exports2.StateExitedEventDetailsFilterSensitiveLog = exports2.StateEnteredEventDetailsFilterSensitiveLog = exports2.MapRunFailedEventDetailsFilterSensitiveLog = exports2.LambdaFunctionTimedOutEventDetailsFilterSensitiveLog = exports2.LambdaFunctionSucceededEventDetailsFilterSensitiveLog = exports2.LambdaFunctionStartFailedEventDetailsFilterSensitiveLog = exports2.LambdaFunctionScheduleFailedEventDetailsFilterSensitiveLog = exports2.LambdaFunctionScheduledEventDetailsFilterSensitiveLog = exports2.LambdaFunctionFailedEventDetailsFilterSensitiveLog = exports2.ExecutionTimedOutEventDetailsFilterSensitiveLog = exports2.ExecutionSucceededEventDetailsFilterSensitiveLog = void 0; - var smithy_client_1 = require_dist_cjs34(); - var SFNServiceException_1 = require_SFNServiceException(); - var ActivityDoesNotExist = class _ActivityDoesNotExist extends SFNServiceException_1.SFNServiceException { - constructor(opts) { - super({ - name: "ActivityDoesNotExist", - $fault: "client", - ...opts - }); - this.name = "ActivityDoesNotExist"; - this.$fault = "client"; - Object.setPrototypeOf(this, _ActivityDoesNotExist.prototype); + getCurrentTimeInSeconds() { + return Date.now() / 1e3; } - }; - exports2.ActivityDoesNotExist = ActivityDoesNotExist; - var ActivityLimitExceeded = class _ActivityLimitExceeded extends SFNServiceException_1.SFNServiceException { - constructor(opts) { - super({ - name: "ActivityLimitExceeded", - $fault: "client", - ...opts - }); - this.name = "ActivityLimitExceeded"; - this.$fault = "client"; - Object.setPrototypeOf(this, _ActivityLimitExceeded.prototype); + async getSendToken() { + return this.acquireTokenBucket(1); } - }; - exports2.ActivityLimitExceeded = ActivityLimitExceeded; - var ActivityWorkerLimitExceeded = class _ActivityWorkerLimitExceeded extends SFNServiceException_1.SFNServiceException { - constructor(opts) { - super({ - name: "ActivityWorkerLimitExceeded", - $fault: "client", - ...opts - }); - this.name = "ActivityWorkerLimitExceeded"; - this.$fault = "client"; - Object.setPrototypeOf(this, _ActivityWorkerLimitExceeded.prototype); + async acquireTokenBucket(amount) { + if (!this.enabled) { + return; + } + this.refillTokenBucket(); + if (amount > this.currentCapacity) { + const delay = (amount - this.currentCapacity) / this.fillRate * 1e3; + await new Promise((resolve) => setTimeout(resolve, delay)); + } + this.currentCapacity = this.currentCapacity - amount; } - }; - exports2.ActivityWorkerLimitExceeded = ActivityWorkerLimitExceeded; - var InvalidName = class _InvalidName extends SFNServiceException_1.SFNServiceException { - constructor(opts) { - super({ - name: "InvalidName", - $fault: "client", - ...opts - }); - this.name = "InvalidName"; - this.$fault = "client"; - Object.setPrototypeOf(this, _InvalidName.prototype); + refillTokenBucket() { + const timestamp = this.getCurrentTimeInSeconds(); + if (!this.lastTimestamp) { + this.lastTimestamp = timestamp; + return; + } + const fillAmount = (timestamp - this.lastTimestamp) * this.fillRate; + this.currentCapacity = Math.min(this.maxCapacity, this.currentCapacity + fillAmount); + this.lastTimestamp = timestamp; } - }; - exports2.InvalidName = InvalidName; - var TooManyTags = class _TooManyTags extends SFNServiceException_1.SFNServiceException { - constructor(opts) { - super({ - name: "TooManyTags", - $fault: "client", - ...opts - }); - this.name = "TooManyTags"; - this.$fault = "client"; - Object.setPrototypeOf(this, _TooManyTags.prototype); - this.resourceName = opts.resourceName; + updateClientSendingRate(response) { + let calculatedRate; + this.updateMeasuredRate(); + if ((0, import_service_error_classification.isThrottlingError)(response)) { + const rateToUse = !this.enabled ? this.measuredTxRate : Math.min(this.measuredTxRate, this.fillRate); + this.lastMaxRate = rateToUse; + this.calculateTimeWindow(); + this.lastThrottleTime = this.getCurrentTimeInSeconds(); + calculatedRate = this.cubicThrottle(rateToUse); + this.enableTokenBucket(); + } else { + this.calculateTimeWindow(); + calculatedRate = this.cubicSuccess(this.getCurrentTimeInSeconds()); + } + const newRate = Math.min(calculatedRate, 2 * this.measuredTxRate); + this.updateTokenBucketRate(newRate); } - }; - exports2.TooManyTags = TooManyTags; - var ConflictException = class _ConflictException extends SFNServiceException_1.SFNServiceException { - constructor(opts) { - super({ - name: "ConflictException", - $fault: "client", - ...opts - }); - this.name = "ConflictException"; - this.$fault = "client"; - Object.setPrototypeOf(this, _ConflictException.prototype); + calculateTimeWindow() { + this.timeWindow = this.getPrecise(Math.pow(this.lastMaxRate * (1 - this.beta) / this.scaleConstant, 1 / 3)); + } + cubicThrottle(rateToUse) { + return this.getPrecise(rateToUse * this.beta); + } + cubicSuccess(timestamp) { + return this.getPrecise( + this.scaleConstant * Math.pow(timestamp - this.lastThrottleTime - this.timeWindow, 3) + this.lastMaxRate + ); + } + enableTokenBucket() { + this.enabled = true; + } + updateTokenBucketRate(newRate) { + this.refillTokenBucket(); + this.fillRate = Math.max(newRate, this.minFillRate); + this.maxCapacity = Math.max(newRate, this.minCapacity); + this.currentCapacity = Math.min(this.currentCapacity, this.maxCapacity); + } + updateMeasuredRate() { + const t = this.getCurrentTimeInSeconds(); + const timeBucket = Math.floor(t * 2) / 2; + this.requestCount++; + if (timeBucket > this.lastTxRateBucket) { + const currentRate = this.requestCount / (timeBucket - this.lastTxRateBucket); + this.measuredTxRate = this.getPrecise(currentRate * this.smooth + this.measuredTxRate * (1 - this.smooth)); + this.requestCount = 0; + this.lastTxRateBucket = timeBucket; + } + } + getPrecise(num) { + return parseFloat(num.toFixed(8)); } }; - exports2.ConflictException = ConflictException; - exports2.LogLevel = { - ALL: "ALL", - ERROR: "ERROR", - FATAL: "FATAL", - OFF: "OFF" - }; - exports2.StateMachineType = { - EXPRESS: "EXPRESS", - STANDARD: "STANDARD" - }; - var InvalidArn = class _InvalidArn extends SFNServiceException_1.SFNServiceException { - constructor(opts) { - super({ - name: "InvalidArn", - $fault: "client", - ...opts - }); - this.name = "InvalidArn"; - this.$fault = "client"; - Object.setPrototypeOf(this, _InvalidArn.prototype); + __name(_DefaultRateLimiter, "DefaultRateLimiter"); + var DefaultRateLimiter = _DefaultRateLimiter; + var DEFAULT_RETRY_DELAY_BASE = 100; + var MAXIMUM_RETRY_DELAY = 20 * 1e3; + var THROTTLING_RETRY_DELAY_BASE = 500; + var INITIAL_RETRY_TOKENS = 500; + var RETRY_COST = 5; + var TIMEOUT_RETRY_COST = 10; + var NO_RETRY_INCREMENT = 1; + var INVOCATION_ID_HEADER = "amz-sdk-invocation-id"; + var REQUEST_HEADER = "amz-sdk-request"; + var getDefaultRetryBackoffStrategy = /* @__PURE__ */ __name(() => { + let delayBase = DEFAULT_RETRY_DELAY_BASE; + const computeNextBackoffDelay = /* @__PURE__ */ __name((attempts) => { + return Math.floor(Math.min(MAXIMUM_RETRY_DELAY, Math.random() * 2 ** attempts * delayBase)); + }, "computeNextBackoffDelay"); + const setDelayBase = /* @__PURE__ */ __name((delay) => { + delayBase = delay; + }, "setDelayBase"); + return { + computeNextBackoffDelay, + setDelayBase + }; + }, "getDefaultRetryBackoffStrategy"); + var createDefaultRetryToken = /* @__PURE__ */ __name(({ + retryDelay, + retryCount, + retryCost + }) => { + const getRetryCount = /* @__PURE__ */ __name(() => retryCount, "getRetryCount"); + const getRetryDelay = /* @__PURE__ */ __name(() => Math.min(MAXIMUM_RETRY_DELAY, retryDelay), "getRetryDelay"); + const getRetryCost = /* @__PURE__ */ __name(() => retryCost, "getRetryCost"); + return { + getRetryCount, + getRetryDelay, + getRetryCost + }; + }, "createDefaultRetryToken"); + var _StandardRetryStrategy = class _StandardRetryStrategy { + constructor(maxAttempts) { + this.maxAttempts = maxAttempts; + this.mode = "standard"; + this.capacity = INITIAL_RETRY_TOKENS; + this.retryBackoffStrategy = getDefaultRetryBackoffStrategy(); + this.maxAttemptsProvider = typeof maxAttempts === "function" ? maxAttempts : async () => maxAttempts; } - }; - exports2.InvalidArn = InvalidArn; - var InvalidDefinition = class _InvalidDefinition extends SFNServiceException_1.SFNServiceException { - constructor(opts) { - super({ - name: "InvalidDefinition", - $fault: "client", - ...opts + // eslint-disable-next-line @typescript-eslint/no-unused-vars + async acquireInitialRetryToken(retryTokenScope) { + return createDefaultRetryToken({ + retryDelay: DEFAULT_RETRY_DELAY_BASE, + retryCount: 0 }); - this.name = "InvalidDefinition"; - this.$fault = "client"; - Object.setPrototypeOf(this, _InvalidDefinition.prototype); } - }; - exports2.InvalidDefinition = InvalidDefinition; - var InvalidLoggingConfiguration = class _InvalidLoggingConfiguration extends SFNServiceException_1.SFNServiceException { - constructor(opts) { - super({ - name: "InvalidLoggingConfiguration", - $fault: "client", - ...opts - }); - this.name = "InvalidLoggingConfiguration"; - this.$fault = "client"; - Object.setPrototypeOf(this, _InvalidLoggingConfiguration.prototype); + async refreshRetryTokenForRetry(token, errorInfo) { + const maxAttempts = await this.getMaxAttempts(); + if (this.shouldRetry(token, errorInfo, maxAttempts)) { + const errorType = errorInfo.errorType; + this.retryBackoffStrategy.setDelayBase( + errorType === "THROTTLING" ? THROTTLING_RETRY_DELAY_BASE : DEFAULT_RETRY_DELAY_BASE + ); + const delayFromErrorType = this.retryBackoffStrategy.computeNextBackoffDelay(token.getRetryCount()); + const retryDelay = errorInfo.retryAfterHint ? Math.max(errorInfo.retryAfterHint.getTime() - Date.now() || 0, delayFromErrorType) : delayFromErrorType; + const capacityCost = this.getCapacityCost(errorType); + this.capacity -= capacityCost; + return createDefaultRetryToken({ + retryDelay, + retryCount: token.getRetryCount() + 1, + retryCost: capacityCost + }); + } + throw new Error("No retry token available"); } - }; - exports2.InvalidLoggingConfiguration = InvalidLoggingConfiguration; - var InvalidTracingConfiguration = class _InvalidTracingConfiguration extends SFNServiceException_1.SFNServiceException { - constructor(opts) { - super({ - name: "InvalidTracingConfiguration", - $fault: "client", - ...opts - }); - this.name = "InvalidTracingConfiguration"; - this.$fault = "client"; - Object.setPrototypeOf(this, _InvalidTracingConfiguration.prototype); + recordSuccess(token) { + this.capacity = Math.max(INITIAL_RETRY_TOKENS, this.capacity + (token.getRetryCost() ?? NO_RETRY_INCREMENT)); } - }; - exports2.InvalidTracingConfiguration = InvalidTracingConfiguration; - var StateMachineAlreadyExists = class _StateMachineAlreadyExists extends SFNServiceException_1.SFNServiceException { - constructor(opts) { - super({ - name: "StateMachineAlreadyExists", - $fault: "client", - ...opts - }); - this.name = "StateMachineAlreadyExists"; - this.$fault = "client"; - Object.setPrototypeOf(this, _StateMachineAlreadyExists.prototype); + /** + * @returns the current available retry capacity. + * + * This number decreases when retries are executed and refills when requests or retries succeed. + */ + getCapacity() { + return this.capacity; } - }; - exports2.StateMachineAlreadyExists = StateMachineAlreadyExists; - var StateMachineDeleting = class _StateMachineDeleting extends SFNServiceException_1.SFNServiceException { - constructor(opts) { - super({ - name: "StateMachineDeleting", - $fault: "client", - ...opts - }); - this.name = "StateMachineDeleting"; - this.$fault = "client"; - Object.setPrototypeOf(this, _StateMachineDeleting.prototype); + async getMaxAttempts() { + try { + return await this.maxAttemptsProvider(); + } catch (error) { + console.warn(`Max attempts provider could not resolve. Using default of ${DEFAULT_MAX_ATTEMPTS}`); + return DEFAULT_MAX_ATTEMPTS; + } } - }; - exports2.StateMachineDeleting = StateMachineDeleting; - var StateMachineLimitExceeded = class _StateMachineLimitExceeded extends SFNServiceException_1.SFNServiceException { - constructor(opts) { - super({ - name: "StateMachineLimitExceeded", - $fault: "client", - ...opts - }); - this.name = "StateMachineLimitExceeded"; - this.$fault = "client"; - Object.setPrototypeOf(this, _StateMachineLimitExceeded.prototype); + shouldRetry(tokenToRenew, errorInfo, maxAttempts) { + const attempts = tokenToRenew.getRetryCount() + 1; + return attempts < maxAttempts && this.capacity >= this.getCapacityCost(errorInfo.errorType) && this.isRetryableError(errorInfo.errorType); } - }; - exports2.StateMachineLimitExceeded = StateMachineLimitExceeded; - var StateMachineTypeNotSupported = class _StateMachineTypeNotSupported extends SFNServiceException_1.SFNServiceException { - constructor(opts) { - super({ - name: "StateMachineTypeNotSupported", - $fault: "client", - ...opts - }); - this.name = "StateMachineTypeNotSupported"; - this.$fault = "client"; - Object.setPrototypeOf(this, _StateMachineTypeNotSupported.prototype); + getCapacityCost(errorType) { + return errorType === "TRANSIENT" ? TIMEOUT_RETRY_COST : RETRY_COST; } - }; - exports2.StateMachineTypeNotSupported = StateMachineTypeNotSupported; - exports2.ValidationExceptionReason = { - API_DOES_NOT_SUPPORT_LABELED_ARNS: "API_DOES_NOT_SUPPORT_LABELED_ARNS", - CANNOT_UPDATE_COMPLETED_MAP_RUN: "CANNOT_UPDATE_COMPLETED_MAP_RUN", - INVALID_ROUTING_CONFIGURATION: "INVALID_ROUTING_CONFIGURATION", - MISSING_REQUIRED_PARAMETER: "MISSING_REQUIRED_PARAMETER" - }; - var ValidationException = class _ValidationException extends SFNServiceException_1.SFNServiceException { - constructor(opts) { - super({ - name: "ValidationException", - $fault: "client", - ...opts - }); - this.name = "ValidationException"; - this.$fault = "client"; - Object.setPrototypeOf(this, _ValidationException.prototype); - this.reason = opts.reason; + isRetryableError(errorType) { + return errorType === "THROTTLING" || errorType === "TRANSIENT"; } }; - exports2.ValidationException = ValidationException; - var ResourceNotFound = class _ResourceNotFound extends SFNServiceException_1.SFNServiceException { - constructor(opts) { - super({ - name: "ResourceNotFound", - $fault: "client", - ...opts - }); - this.name = "ResourceNotFound"; - this.$fault = "client"; - Object.setPrototypeOf(this, _ResourceNotFound.prototype); - this.resourceName = opts.resourceName; + __name(_StandardRetryStrategy, "StandardRetryStrategy"); + var StandardRetryStrategy = _StandardRetryStrategy; + var _AdaptiveRetryStrategy = class _AdaptiveRetryStrategy { + constructor(maxAttemptsProvider, options) { + this.maxAttemptsProvider = maxAttemptsProvider; + this.mode = "adaptive"; + const { rateLimiter } = options ?? {}; + this.rateLimiter = rateLimiter ?? new DefaultRateLimiter(); + this.standardRetryStrategy = new StandardRetryStrategy(maxAttemptsProvider); } - }; - exports2.ResourceNotFound = ResourceNotFound; - var ServiceQuotaExceededException = class _ServiceQuotaExceededException extends SFNServiceException_1.SFNServiceException { - constructor(opts) { - super({ - name: "ServiceQuotaExceededException", - $fault: "client", - ...opts - }); - this.name = "ServiceQuotaExceededException"; - this.$fault = "client"; - Object.setPrototypeOf(this, _ServiceQuotaExceededException.prototype); + async acquireInitialRetryToken(retryTokenScope) { + await this.rateLimiter.getSendToken(); + return this.standardRetryStrategy.acquireInitialRetryToken(retryTokenScope); + } + async refreshRetryTokenForRetry(tokenToRenew, errorInfo) { + this.rateLimiter.updateClientSendingRate(errorInfo); + return this.standardRetryStrategy.refreshRetryTokenForRetry(tokenToRenew, errorInfo); + } + recordSuccess(token) { + this.rateLimiter.updateClientSendingRate({}); + this.standardRetryStrategy.recordSuccess(token); } }; - exports2.ServiceQuotaExceededException = ServiceQuotaExceededException; - exports2.ExecutionStatus = { - ABORTED: "ABORTED", - FAILED: "FAILED", - RUNNING: "RUNNING", - SUCCEEDED: "SUCCEEDED", - TIMED_OUT: "TIMED_OUT" - }; - var ExecutionDoesNotExist = class _ExecutionDoesNotExist extends SFNServiceException_1.SFNServiceException { - constructor(opts) { - super({ - name: "ExecutionDoesNotExist", - $fault: "client", - ...opts - }); - this.name = "ExecutionDoesNotExist"; - this.$fault = "client"; - Object.setPrototypeOf(this, _ExecutionDoesNotExist.prototype); + __name(_AdaptiveRetryStrategy, "AdaptiveRetryStrategy"); + var AdaptiveRetryStrategy = _AdaptiveRetryStrategy; + var _ConfiguredRetryStrategy = class _ConfiguredRetryStrategy extends StandardRetryStrategy { + /** + * @param maxAttempts - the maximum number of retry attempts allowed. + * e.g., if set to 3, then 4 total requests are possible. + * @param computeNextBackoffDelay - a millisecond delay for each retry or a function that takes the retry attempt + * and returns the delay. + * + * @example exponential backoff. + * ```js + * new Client({ + * retryStrategy: new ConfiguredRetryStrategy(3, (attempt) => attempt ** 2) + * }); + * ``` + * @example constant delay. + * ```js + * new Client({ + * retryStrategy: new ConfiguredRetryStrategy(3, 2000) + * }); + * ``` + */ + constructor(maxAttempts, computeNextBackoffDelay = DEFAULT_RETRY_DELAY_BASE) { + super(typeof maxAttempts === "function" ? maxAttempts : async () => maxAttempts); + if (typeof computeNextBackoffDelay === "number") { + this.computeNextBackoffDelay = () => computeNextBackoffDelay; + } else { + this.computeNextBackoffDelay = computeNextBackoffDelay; + } + } + async refreshRetryTokenForRetry(tokenToRenew, errorInfo) { + const token = await super.refreshRetryTokenForRetry(tokenToRenew, errorInfo); + token.getRetryDelay = () => this.computeNextBackoffDelay(token.getRetryCount()); + return token; } }; - exports2.ExecutionDoesNotExist = ExecutionDoesNotExist; - exports2.MapRunStatus = { - ABORTED: "ABORTED", - FAILED: "FAILED", - RUNNING: "RUNNING", - SUCCEEDED: "SUCCEEDED" - }; - exports2.StateMachineStatus = { - ACTIVE: "ACTIVE", - DELETING: "DELETING" + __name(_ConfiguredRetryStrategy, "ConfiguredRetryStrategy"); + var ConfiguredRetryStrategy = _ConfiguredRetryStrategy; + } +}); + +// ../../../node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/ruleset.js +var require_ruleset = __commonJS({ + "../../../node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/ruleset.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ruleSet = void 0; + var u = "required"; + var v = "fn"; + var w = "argv"; + var x = "ref"; + var a = true; + var b = "isSet"; + var c = "booleanEquals"; + var d = "error"; + var e = "endpoint"; + var f = "tree"; + var g = "PartitionResult"; + var h = "getAttr"; + var i = { [u]: false, "type": "String" }; + var j = { [u]: true, "default": false, "type": "Boolean" }; + var k = { [x]: "Endpoint" }; + var l = { [v]: c, [w]: [{ [x]: "UseFIPS" }, true] }; + var m = { [v]: c, [w]: [{ [x]: "UseDualStack" }, true] }; + var n = {}; + var o = { [v]: h, [w]: [{ [x]: g }, "supportsFIPS"] }; + var p = { [x]: g }; + var q = { [v]: c, [w]: [true, { [v]: h, [w]: [p, "supportsDualStack"] }] }; + var r = [l]; + var s = [m]; + var t = [{ [x]: "Region" }]; + var _data = { version: "1.0", parameters: { Region: i, UseDualStack: j, UseFIPS: j, Endpoint: i }, rules: [{ conditions: [{ [v]: b, [w]: [k] }], rules: [{ conditions: r, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: d }, { conditions: s, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: d }, { endpoint: { url: k, properties: n, headers: n }, type: e }], type: f }, { conditions: [{ [v]: b, [w]: t }], rules: [{ conditions: [{ [v]: "aws.partition", [w]: t, assign: g }], rules: [{ conditions: [l, m], rules: [{ conditions: [{ [v]: c, [w]: [a, o] }, q], rules: [{ endpoint: { url: "https://portal.sso-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: n, headers: n }, type: e }], type: f }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: d }], type: f }, { conditions: r, rules: [{ conditions: [{ [v]: c, [w]: [o, a] }], rules: [{ conditions: [{ [v]: "stringEquals", [w]: [{ [v]: h, [w]: [p, "name"] }, "aws-us-gov"] }], endpoint: { url: "https://portal.sso.{Region}.amazonaws.com", properties: n, headers: n }, type: e }, { endpoint: { url: "https://portal.sso-fips.{Region}.{PartitionResult#dnsSuffix}", properties: n, headers: n }, type: e }], type: f }, { error: "FIPS is enabled but this partition does not support FIPS", type: d }], type: f }, { conditions: s, rules: [{ conditions: [q], rules: [{ endpoint: { url: "https://portal.sso.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: n, headers: n }, type: e }], type: f }, { error: "DualStack is enabled but this partition does not support DualStack", type: d }], type: f }, { endpoint: { url: "https://portal.sso.{Region}.{PartitionResult#dnsSuffix}", properties: n, headers: n }, type: e }], type: f }], type: f }, { error: "Invalid Configuration: Missing Region", type: d }] }; + exports2.ruleSet = _data; + } +}); + +// ../../../node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/endpointResolver.js +var require_endpointResolver = __commonJS({ + "../../../node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/endpointResolver.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.defaultEndpointResolver = void 0; + var util_endpoints_1 = require_dist_cjs7(); + var util_endpoints_2 = require_dist_cjs6(); + var ruleset_1 = require_ruleset(); + var defaultEndpointResolver = (endpointParams, context = {}) => { + return (0, util_endpoints_2.resolveEndpoint)(ruleset_1.ruleSet, { + endpointParams, + logger: context.logger + }); }; - var StateMachineDoesNotExist = class _StateMachineDoesNotExist extends SFNServiceException_1.SFNServiceException { - constructor(opts) { - super({ - name: "StateMachineDoesNotExist", - $fault: "client", - ...opts - }); - this.name = "StateMachineDoesNotExist"; - this.$fault = "client"; - Object.setPrototypeOf(this, _StateMachineDoesNotExist.prototype); - } + exports2.defaultEndpointResolver = defaultEndpointResolver; + util_endpoints_2.customEndpointFunctions.aws = util_endpoints_1.awsEndpointFunctions; + } +}); + +// ../../../node_modules/@aws-sdk/client-sso/dist-cjs/runtimeConfig.shared.js +var require_runtimeConfig_shared = __commonJS({ + "../../../node_modules/@aws-sdk/client-sso/dist-cjs/runtimeConfig.shared.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getRuntimeConfig = void 0; + var core_1 = (init_dist_es2(), __toCommonJS(dist_es_exports2)); + var core_2 = (init_dist_es(), __toCommonJS(dist_es_exports)); + var smithy_client_1 = require_dist_cjs37(); + var url_parser_1 = require_dist_cjs44(); + var util_base64_1 = require_dist_cjs29(); + var util_utf8_1 = require_dist_cjs28(); + var httpAuthSchemeProvider_1 = require_httpAuthSchemeProvider2(); + var endpointResolver_1 = require_endpointResolver(); + var getRuntimeConfig = (config) => { + return { + apiVersion: "2019-06-10", + base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64, + base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64, + disableHostPrefix: config?.disableHostPrefix ?? false, + endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver, + extensions: config?.extensions ?? [], + httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? httpAuthSchemeProvider_1.defaultSSOHttpAuthSchemeProvider, + httpAuthSchemes: config?.httpAuthSchemes ?? [ + { + schemeId: "aws.auth#sigv4", + identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"), + signer: new core_1.AwsSdkSigV4Signer() + }, + { + schemeId: "smithy.api#noAuth", + identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})), + signer: new core_2.NoAuthSigner() + } + ], + logger: config?.logger ?? new smithy_client_1.NoOpLogger(), + serviceId: config?.serviceId ?? "SSO", + urlParser: config?.urlParser ?? url_parser_1.parseUrl, + utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8, + utf8Encoder: config?.utf8Encoder ?? util_utf8_1.toUtf8 + }; }; - exports2.StateMachineDoesNotExist = StateMachineDoesNotExist; - exports2.HistoryEventType = { - ActivityFailed: "ActivityFailed", - ActivityScheduleFailed: "ActivityScheduleFailed", - ActivityScheduled: "ActivityScheduled", - ActivityStarted: "ActivityStarted", - ActivitySucceeded: "ActivitySucceeded", - ActivityTimedOut: "ActivityTimedOut", - ChoiceStateEntered: "ChoiceStateEntered", - ChoiceStateExited: "ChoiceStateExited", - ExecutionAborted: "ExecutionAborted", - ExecutionFailed: "ExecutionFailed", - ExecutionStarted: "ExecutionStarted", - ExecutionSucceeded: "ExecutionSucceeded", - ExecutionTimedOut: "ExecutionTimedOut", - FailStateEntered: "FailStateEntered", - LambdaFunctionFailed: "LambdaFunctionFailed", - LambdaFunctionScheduleFailed: "LambdaFunctionScheduleFailed", - LambdaFunctionScheduled: "LambdaFunctionScheduled", - LambdaFunctionStartFailed: "LambdaFunctionStartFailed", - LambdaFunctionStarted: "LambdaFunctionStarted", - LambdaFunctionSucceeded: "LambdaFunctionSucceeded", - LambdaFunctionTimedOut: "LambdaFunctionTimedOut", - MapIterationAborted: "MapIterationAborted", - MapIterationFailed: "MapIterationFailed", - MapIterationStarted: "MapIterationStarted", - MapIterationSucceeded: "MapIterationSucceeded", - MapRunAborted: "MapRunAborted", - MapRunFailed: "MapRunFailed", - MapRunStarted: "MapRunStarted", - MapRunSucceeded: "MapRunSucceeded", - MapStateAborted: "MapStateAborted", - MapStateEntered: "MapStateEntered", - MapStateExited: "MapStateExited", - MapStateFailed: "MapStateFailed", - MapStateStarted: "MapStateStarted", - MapStateSucceeded: "MapStateSucceeded", - ParallelStateAborted: "ParallelStateAborted", - ParallelStateEntered: "ParallelStateEntered", - ParallelStateExited: "ParallelStateExited", - ParallelStateFailed: "ParallelStateFailed", - ParallelStateStarted: "ParallelStateStarted", - ParallelStateSucceeded: "ParallelStateSucceeded", - PassStateEntered: "PassStateEntered", - PassStateExited: "PassStateExited", - SucceedStateEntered: "SucceedStateEntered", - SucceedStateExited: "SucceedStateExited", - TaskFailed: "TaskFailed", - TaskScheduled: "TaskScheduled", - TaskStartFailed: "TaskStartFailed", - TaskStarted: "TaskStarted", - TaskStateAborted: "TaskStateAborted", - TaskStateEntered: "TaskStateEntered", - TaskStateExited: "TaskStateExited", - TaskSubmitFailed: "TaskSubmitFailed", - TaskSubmitted: "TaskSubmitted", - TaskSucceeded: "TaskSucceeded", - TaskTimedOut: "TaskTimedOut", - WaitStateAborted: "WaitStateAborted", - WaitStateEntered: "WaitStateEntered", - WaitStateExited: "WaitStateExited" + exports2.getRuntimeConfig = getRuntimeConfig; + } +}); + +// ../../../node_modules/@smithy/util-defaults-mode-node/node_modules/@smithy/util-middleware/dist-cjs/index.js +var require_dist_cjs61 = __commonJS({ + "../../../node_modules/@smithy/util-defaults-mode-node/node_modules/@smithy/util-middleware/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all) => { + for (var name in all) + __defProp2(target, name, { get: all[name], enumerable: true }); }; - var InvalidToken = class _InvalidToken extends SFNServiceException_1.SFNServiceException { - constructor(opts) { - super({ - name: "InvalidToken", - $fault: "client", - ...opts - }); - this.name = "InvalidToken"; - this.$fault = "client"; - Object.setPrototypeOf(this, _InvalidToken.prototype); + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); } + return to; }; - exports2.InvalidToken = InvalidToken; - var TaskDoesNotExist = class _TaskDoesNotExist extends SFNServiceException_1.SFNServiceException { - constructor(opts) { - super({ - name: "TaskDoesNotExist", - $fault: "client", - ...opts - }); - this.name = "TaskDoesNotExist"; - this.$fault = "client"; - Object.setPrototypeOf(this, _TaskDoesNotExist.prototype); - } + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + getSmithyContext: () => getSmithyContext4, + normalizeProvider: () => normalizeProvider2 + }); + module2.exports = __toCommonJS2(src_exports); + var import_types5 = require_dist_cjs(); + var getSmithyContext4 = /* @__PURE__ */ __name((context) => context[import_types5.SMITHY_CONTEXT_KEY] || (context[import_types5.SMITHY_CONTEXT_KEY] = {}), "getSmithyContext"); + var normalizeProvider2 = /* @__PURE__ */ __name((input) => { + if (typeof input === "function") + return input; + const promisified = Promise.resolve(input); + return () => promisified; + }, "normalizeProvider"); + } +}); + +// ../../../node_modules/@smithy/util-defaults-mode-node/node_modules/@smithy/config-resolver/dist-cjs/index.js +var require_dist_cjs62 = __commonJS({ + "../../../node_modules/@smithy/util-defaults-mode-node/node_modules/@smithy/config-resolver/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all) => { + for (var name in all) + __defProp2(target, name, { get: all[name], enumerable: true }); }; - exports2.TaskDoesNotExist = TaskDoesNotExist; - var TaskTimedOut = class _TaskTimedOut extends SFNServiceException_1.SFNServiceException { - constructor(opts) { - super({ - name: "TaskTimedOut", - $fault: "client", - ...opts - }); - this.name = "TaskTimedOut"; - this.$fault = "client"; - Object.setPrototypeOf(this, _TaskTimedOut.prototype); + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); } + return to; }; - exports2.TaskTimedOut = TaskTimedOut; - var InvalidOutput = class _InvalidOutput extends SFNServiceException_1.SFNServiceException { - constructor(opts) { - super({ - name: "InvalidOutput", - $fault: "client", - ...opts - }); - this.name = "InvalidOutput"; - this.$fault = "client"; - Object.setPrototypeOf(this, _InvalidOutput.prototype); - } + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + CONFIG_USE_DUALSTACK_ENDPOINT: () => CONFIG_USE_DUALSTACK_ENDPOINT, + CONFIG_USE_FIPS_ENDPOINT: () => CONFIG_USE_FIPS_ENDPOINT, + DEFAULT_USE_DUALSTACK_ENDPOINT: () => DEFAULT_USE_DUALSTACK_ENDPOINT, + DEFAULT_USE_FIPS_ENDPOINT: () => DEFAULT_USE_FIPS_ENDPOINT, + ENV_USE_DUALSTACK_ENDPOINT: () => ENV_USE_DUALSTACK_ENDPOINT, + ENV_USE_FIPS_ENDPOINT: () => ENV_USE_FIPS_ENDPOINT, + NODE_REGION_CONFIG_FILE_OPTIONS: () => NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS: () => NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS: () => NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS: () => NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, + REGION_ENV_NAME: () => REGION_ENV_NAME, + REGION_INI_NAME: () => REGION_INI_NAME, + getRegionInfo: () => getRegionInfo, + resolveCustomEndpointsConfig: () => resolveCustomEndpointsConfig, + resolveEndpointsConfig: () => resolveEndpointsConfig, + resolveRegionConfig: () => resolveRegionConfig + }); + module2.exports = __toCommonJS2(src_exports); + var import_util_config_provider = require_dist_cjs9(); + var ENV_USE_DUALSTACK_ENDPOINT = "AWS_USE_DUALSTACK_ENDPOINT"; + var CONFIG_USE_DUALSTACK_ENDPOINT = "use_dualstack_endpoint"; + var DEFAULT_USE_DUALSTACK_ENDPOINT = false; + var NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS = { + environmentVariableSelector: (env) => (0, import_util_config_provider.booleanSelector)(env, ENV_USE_DUALSTACK_ENDPOINT, import_util_config_provider.SelectorType.ENV), + configFileSelector: (profile) => (0, import_util_config_provider.booleanSelector)(profile, CONFIG_USE_DUALSTACK_ENDPOINT, import_util_config_provider.SelectorType.CONFIG), + default: false }; - exports2.InvalidOutput = InvalidOutput; - var ExecutionAlreadyExists = class _ExecutionAlreadyExists extends SFNServiceException_1.SFNServiceException { - constructor(opts) { - super({ - name: "ExecutionAlreadyExists", - $fault: "client", - ...opts - }); - this.name = "ExecutionAlreadyExists"; - this.$fault = "client"; - Object.setPrototypeOf(this, _ExecutionAlreadyExists.prototype); - } + var ENV_USE_FIPS_ENDPOINT = "AWS_USE_FIPS_ENDPOINT"; + var CONFIG_USE_FIPS_ENDPOINT = "use_fips_endpoint"; + var DEFAULT_USE_FIPS_ENDPOINT = false; + var NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS = { + environmentVariableSelector: (env) => (0, import_util_config_provider.booleanSelector)(env, ENV_USE_FIPS_ENDPOINT, import_util_config_provider.SelectorType.ENV), + configFileSelector: (profile) => (0, import_util_config_provider.booleanSelector)(profile, CONFIG_USE_FIPS_ENDPOINT, import_util_config_provider.SelectorType.CONFIG), + default: false }; - exports2.ExecutionAlreadyExists = ExecutionAlreadyExists; - var ExecutionLimitExceeded = class _ExecutionLimitExceeded extends SFNServiceException_1.SFNServiceException { - constructor(opts) { - super({ - name: "ExecutionLimitExceeded", - $fault: "client", - ...opts - }); - this.name = "ExecutionLimitExceeded"; - this.$fault = "client"; - Object.setPrototypeOf(this, _ExecutionLimitExceeded.prototype); + var import_util_middleware3 = require_dist_cjs61(); + var resolveCustomEndpointsConfig = /* @__PURE__ */ __name((input) => { + const { endpoint, urlParser } = input; + return { + ...input, + tls: input.tls ?? true, + endpoint: (0, import_util_middleware3.normalizeProvider)(typeof endpoint === "string" ? urlParser(endpoint) : endpoint), + isCustomEndpoint: true, + useDualstackEndpoint: (0, import_util_middleware3.normalizeProvider)(input.useDualstackEndpoint ?? false) + }; + }, "resolveCustomEndpointsConfig"); + var getEndpointFromRegion = /* @__PURE__ */ __name(async (input) => { + const { tls = true } = input; + const region = await input.region(); + const dnsHostRegex = new RegExp(/^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9])$/); + if (!dnsHostRegex.test(region)) { + throw new Error("Invalid region in client config"); } - }; - exports2.ExecutionLimitExceeded = ExecutionLimitExceeded; - var InvalidExecutionInput = class _InvalidExecutionInput extends SFNServiceException_1.SFNServiceException { - constructor(opts) { - super({ - name: "InvalidExecutionInput", - $fault: "client", - ...opts - }); - this.name = "InvalidExecutionInput"; - this.$fault = "client"; - Object.setPrototypeOf(this, _InvalidExecutionInput.prototype); + const useDualstackEndpoint = await input.useDualstackEndpoint(); + const useFipsEndpoint = await input.useFipsEndpoint(); + const { hostname } = await input.regionInfoProvider(region, { useDualstackEndpoint, useFipsEndpoint }) ?? {}; + if (!hostname) { + throw new Error("Cannot resolve hostname from client config"); + } + return input.urlParser(`${tls ? "https:" : "http:"}//${hostname}`); + }, "getEndpointFromRegion"); + var resolveEndpointsConfig = /* @__PURE__ */ __name((input) => { + const useDualstackEndpoint = (0, import_util_middleware3.normalizeProvider)(input.useDualstackEndpoint ?? false); + const { endpoint, useFipsEndpoint, urlParser } = input; + return { + ...input, + tls: input.tls ?? true, + endpoint: endpoint ? (0, import_util_middleware3.normalizeProvider)(typeof endpoint === "string" ? urlParser(endpoint) : endpoint) : () => getEndpointFromRegion({ ...input, useDualstackEndpoint, useFipsEndpoint }), + isCustomEndpoint: !!endpoint, + useDualstackEndpoint + }; + }, "resolveEndpointsConfig"); + var REGION_ENV_NAME = "AWS_REGION"; + var REGION_INI_NAME = "region"; + var NODE_REGION_CONFIG_OPTIONS = { + environmentVariableSelector: (env) => env[REGION_ENV_NAME], + configFileSelector: (profile) => profile[REGION_INI_NAME], + default: () => { + throw new Error("Region is missing"); } }; - exports2.InvalidExecutionInput = InvalidExecutionInput; - exports2.SyncExecutionStatus = { - FAILED: "FAILED", - SUCCEEDED: "SUCCEEDED", - TIMED_OUT: "TIMED_OUT" + var NODE_REGION_CONFIG_FILE_OPTIONS = { + preferredFile: "credentials" }; - var MissingRequiredParameter = class _MissingRequiredParameter extends SFNServiceException_1.SFNServiceException { - constructor(opts) { - super({ - name: "MissingRequiredParameter", - $fault: "client", - ...opts - }); - this.name = "MissingRequiredParameter"; - this.$fault = "client"; - Object.setPrototypeOf(this, _MissingRequiredParameter.prototype); + var isFipsRegion = /* @__PURE__ */ __name((region) => typeof region === "string" && (region.startsWith("fips-") || region.endsWith("-fips")), "isFipsRegion"); + var getRealRegion = /* @__PURE__ */ __name((region) => isFipsRegion(region) ? ["fips-aws-global", "aws-fips"].includes(region) ? "us-east-1" : region.replace(/fips-(dkr-|prod-)?|-fips/, "") : region, "getRealRegion"); + var resolveRegionConfig = /* @__PURE__ */ __name((input) => { + const { region, useFipsEndpoint } = input; + if (!region) { + throw new Error("Region is missing"); } - }; - exports2.MissingRequiredParameter = MissingRequiredParameter; - var ActivityFailedEventDetailsFilterSensitiveLog = (obj) => ({ - ...obj, - ...obj.error && { error: smithy_client_1.SENSITIVE_STRING }, - ...obj.cause && { cause: smithy_client_1.SENSITIVE_STRING } - }); - exports2.ActivityFailedEventDetailsFilterSensitiveLog = ActivityFailedEventDetailsFilterSensitiveLog; - var ActivityScheduledEventDetailsFilterSensitiveLog = (obj) => ({ - ...obj, - ...obj.input && { input: smithy_client_1.SENSITIVE_STRING } - }); - exports2.ActivityScheduledEventDetailsFilterSensitiveLog = ActivityScheduledEventDetailsFilterSensitiveLog; - var ActivityScheduleFailedEventDetailsFilterSensitiveLog = (obj) => ({ - ...obj, - ...obj.error && { error: smithy_client_1.SENSITIVE_STRING }, - ...obj.cause && { cause: smithy_client_1.SENSITIVE_STRING } - }); - exports2.ActivityScheduleFailedEventDetailsFilterSensitiveLog = ActivityScheduleFailedEventDetailsFilterSensitiveLog; - var ActivitySucceededEventDetailsFilterSensitiveLog = (obj) => ({ - ...obj, - ...obj.output && { output: smithy_client_1.SENSITIVE_STRING } - }); - exports2.ActivitySucceededEventDetailsFilterSensitiveLog = ActivitySucceededEventDetailsFilterSensitiveLog; - var ActivityTimedOutEventDetailsFilterSensitiveLog = (obj) => ({ - ...obj, - ...obj.error && { error: smithy_client_1.SENSITIVE_STRING }, - ...obj.cause && { cause: smithy_client_1.SENSITIVE_STRING } - }); - exports2.ActivityTimedOutEventDetailsFilterSensitiveLog = ActivityTimedOutEventDetailsFilterSensitiveLog; - var CreateStateMachineInputFilterSensitiveLog = (obj) => ({ - ...obj, - ...obj.definition && { definition: smithy_client_1.SENSITIVE_STRING }, - ...obj.versionDescription && { versionDescription: smithy_client_1.SENSITIVE_STRING } - }); - exports2.CreateStateMachineInputFilterSensitiveLog = CreateStateMachineInputFilterSensitiveLog; - var CreateStateMachineAliasInputFilterSensitiveLog = (obj) => ({ - ...obj, - ...obj.description && { description: smithy_client_1.SENSITIVE_STRING } - }); - exports2.CreateStateMachineAliasInputFilterSensitiveLog = CreateStateMachineAliasInputFilterSensitiveLog; - var DescribeExecutionOutputFilterSensitiveLog = (obj) => ({ - ...obj, - ...obj.input && { input: smithy_client_1.SENSITIVE_STRING }, - ...obj.output && { output: smithy_client_1.SENSITIVE_STRING }, - ...obj.error && { error: smithy_client_1.SENSITIVE_STRING }, - ...obj.cause && { cause: smithy_client_1.SENSITIVE_STRING } - }); - exports2.DescribeExecutionOutputFilterSensitiveLog = DescribeExecutionOutputFilterSensitiveLog; - var DescribeStateMachineOutputFilterSensitiveLog = (obj) => ({ - ...obj, - ...obj.definition && { definition: smithy_client_1.SENSITIVE_STRING }, - ...obj.description && { description: smithy_client_1.SENSITIVE_STRING } - }); - exports2.DescribeStateMachineOutputFilterSensitiveLog = DescribeStateMachineOutputFilterSensitiveLog; - var DescribeStateMachineAliasOutputFilterSensitiveLog = (obj) => ({ - ...obj, - ...obj.description && { description: smithy_client_1.SENSITIVE_STRING } - }); - exports2.DescribeStateMachineAliasOutputFilterSensitiveLog = DescribeStateMachineAliasOutputFilterSensitiveLog; - var DescribeStateMachineForExecutionOutputFilterSensitiveLog = (obj) => ({ - ...obj, - ...obj.definition && { definition: smithy_client_1.SENSITIVE_STRING } - }); - exports2.DescribeStateMachineForExecutionOutputFilterSensitiveLog = DescribeStateMachineForExecutionOutputFilterSensitiveLog; - var GetActivityTaskOutputFilterSensitiveLog = (obj) => ({ - ...obj, - ...obj.input && { input: smithy_client_1.SENSITIVE_STRING } - }); - exports2.GetActivityTaskOutputFilterSensitiveLog = GetActivityTaskOutputFilterSensitiveLog; - var ExecutionAbortedEventDetailsFilterSensitiveLog = (obj) => ({ - ...obj, - ...obj.error && { error: smithy_client_1.SENSITIVE_STRING }, - ...obj.cause && { cause: smithy_client_1.SENSITIVE_STRING } - }); - exports2.ExecutionAbortedEventDetailsFilterSensitiveLog = ExecutionAbortedEventDetailsFilterSensitiveLog; - var ExecutionFailedEventDetailsFilterSensitiveLog = (obj) => ({ - ...obj, - ...obj.error && { error: smithy_client_1.SENSITIVE_STRING }, - ...obj.cause && { cause: smithy_client_1.SENSITIVE_STRING } - }); - exports2.ExecutionFailedEventDetailsFilterSensitiveLog = ExecutionFailedEventDetailsFilterSensitiveLog; - var ExecutionStartedEventDetailsFilterSensitiveLog = (obj) => ({ - ...obj, - ...obj.input && { input: smithy_client_1.SENSITIVE_STRING } - }); - exports2.ExecutionStartedEventDetailsFilterSensitiveLog = ExecutionStartedEventDetailsFilterSensitiveLog; - var ExecutionSucceededEventDetailsFilterSensitiveLog = (obj) => ({ - ...obj, - ...obj.output && { output: smithy_client_1.SENSITIVE_STRING } - }); - exports2.ExecutionSucceededEventDetailsFilterSensitiveLog = ExecutionSucceededEventDetailsFilterSensitiveLog; - var ExecutionTimedOutEventDetailsFilterSensitiveLog = (obj) => ({ - ...obj, - ...obj.error && { error: smithy_client_1.SENSITIVE_STRING }, - ...obj.cause && { cause: smithy_client_1.SENSITIVE_STRING } - }); - exports2.ExecutionTimedOutEventDetailsFilterSensitiveLog = ExecutionTimedOutEventDetailsFilterSensitiveLog; - var LambdaFunctionFailedEventDetailsFilterSensitiveLog = (obj) => ({ - ...obj, - ...obj.error && { error: smithy_client_1.SENSITIVE_STRING }, - ...obj.cause && { cause: smithy_client_1.SENSITIVE_STRING } - }); - exports2.LambdaFunctionFailedEventDetailsFilterSensitiveLog = LambdaFunctionFailedEventDetailsFilterSensitiveLog; - var LambdaFunctionScheduledEventDetailsFilterSensitiveLog = (obj) => ({ - ...obj, - ...obj.input && { input: smithy_client_1.SENSITIVE_STRING } - }); - exports2.LambdaFunctionScheduledEventDetailsFilterSensitiveLog = LambdaFunctionScheduledEventDetailsFilterSensitiveLog; - var LambdaFunctionScheduleFailedEventDetailsFilterSensitiveLog = (obj) => ({ - ...obj, - ...obj.error && { error: smithy_client_1.SENSITIVE_STRING }, - ...obj.cause && { cause: smithy_client_1.SENSITIVE_STRING } - }); - exports2.LambdaFunctionScheduleFailedEventDetailsFilterSensitiveLog = LambdaFunctionScheduleFailedEventDetailsFilterSensitiveLog; - var LambdaFunctionStartFailedEventDetailsFilterSensitiveLog = (obj) => ({ - ...obj, - ...obj.error && { error: smithy_client_1.SENSITIVE_STRING }, - ...obj.cause && { cause: smithy_client_1.SENSITIVE_STRING } - }); - exports2.LambdaFunctionStartFailedEventDetailsFilterSensitiveLog = LambdaFunctionStartFailedEventDetailsFilterSensitiveLog; - var LambdaFunctionSucceededEventDetailsFilterSensitiveLog = (obj) => ({ - ...obj, - ...obj.output && { output: smithy_client_1.SENSITIVE_STRING } - }); - exports2.LambdaFunctionSucceededEventDetailsFilterSensitiveLog = LambdaFunctionSucceededEventDetailsFilterSensitiveLog; - var LambdaFunctionTimedOutEventDetailsFilterSensitiveLog = (obj) => ({ - ...obj, - ...obj.error && { error: smithy_client_1.SENSITIVE_STRING }, - ...obj.cause && { cause: smithy_client_1.SENSITIVE_STRING } - }); - exports2.LambdaFunctionTimedOutEventDetailsFilterSensitiveLog = LambdaFunctionTimedOutEventDetailsFilterSensitiveLog; - var MapRunFailedEventDetailsFilterSensitiveLog = (obj) => ({ - ...obj, - ...obj.error && { error: smithy_client_1.SENSITIVE_STRING }, - ...obj.cause && { cause: smithy_client_1.SENSITIVE_STRING } - }); - exports2.MapRunFailedEventDetailsFilterSensitiveLog = MapRunFailedEventDetailsFilterSensitiveLog; - var StateEnteredEventDetailsFilterSensitiveLog = (obj) => ({ - ...obj, - ...obj.input && { input: smithy_client_1.SENSITIVE_STRING } - }); - exports2.StateEnteredEventDetailsFilterSensitiveLog = StateEnteredEventDetailsFilterSensitiveLog; - var StateExitedEventDetailsFilterSensitiveLog = (obj) => ({ - ...obj, - ...obj.output && { output: smithy_client_1.SENSITIVE_STRING } - }); - exports2.StateExitedEventDetailsFilterSensitiveLog = StateExitedEventDetailsFilterSensitiveLog; - var TaskFailedEventDetailsFilterSensitiveLog = (obj) => ({ - ...obj, - ...obj.error && { error: smithy_client_1.SENSITIVE_STRING }, - ...obj.cause && { cause: smithy_client_1.SENSITIVE_STRING } - }); - exports2.TaskFailedEventDetailsFilterSensitiveLog = TaskFailedEventDetailsFilterSensitiveLog; - var TaskScheduledEventDetailsFilterSensitiveLog = (obj) => ({ - ...obj, - ...obj.parameters && { parameters: smithy_client_1.SENSITIVE_STRING } - }); - exports2.TaskScheduledEventDetailsFilterSensitiveLog = TaskScheduledEventDetailsFilterSensitiveLog; - var TaskStartFailedEventDetailsFilterSensitiveLog = (obj) => ({ - ...obj, - ...obj.error && { error: smithy_client_1.SENSITIVE_STRING }, - ...obj.cause && { cause: smithy_client_1.SENSITIVE_STRING } - }); - exports2.TaskStartFailedEventDetailsFilterSensitiveLog = TaskStartFailedEventDetailsFilterSensitiveLog; - var TaskSubmitFailedEventDetailsFilterSensitiveLog = (obj) => ({ - ...obj, - ...obj.error && { error: smithy_client_1.SENSITIVE_STRING }, - ...obj.cause && { cause: smithy_client_1.SENSITIVE_STRING } - }); - exports2.TaskSubmitFailedEventDetailsFilterSensitiveLog = TaskSubmitFailedEventDetailsFilterSensitiveLog; - var TaskSubmittedEventDetailsFilterSensitiveLog = (obj) => ({ - ...obj, - ...obj.output && { output: smithy_client_1.SENSITIVE_STRING } - }); - exports2.TaskSubmittedEventDetailsFilterSensitiveLog = TaskSubmittedEventDetailsFilterSensitiveLog; - var TaskSucceededEventDetailsFilterSensitiveLog = (obj) => ({ - ...obj, - ...obj.output && { output: smithy_client_1.SENSITIVE_STRING } - }); - exports2.TaskSucceededEventDetailsFilterSensitiveLog = TaskSucceededEventDetailsFilterSensitiveLog; - var TaskTimedOutEventDetailsFilterSensitiveLog = (obj) => ({ - ...obj, - ...obj.error && { error: smithy_client_1.SENSITIVE_STRING }, - ...obj.cause && { cause: smithy_client_1.SENSITIVE_STRING } - }); - exports2.TaskTimedOutEventDetailsFilterSensitiveLog = TaskTimedOutEventDetailsFilterSensitiveLog; - var HistoryEventFilterSensitiveLog = (obj) => ({ - ...obj, - ...obj.activityFailedEventDetails && { - activityFailedEventDetails: (0, exports2.ActivityFailedEventDetailsFilterSensitiveLog)(obj.activityFailedEventDetails) - }, - ...obj.activityScheduleFailedEventDetails && { - activityScheduleFailedEventDetails: (0, exports2.ActivityScheduleFailedEventDetailsFilterSensitiveLog)(obj.activityScheduleFailedEventDetails) - }, - ...obj.activityScheduledEventDetails && { - activityScheduledEventDetails: (0, exports2.ActivityScheduledEventDetailsFilterSensitiveLog)(obj.activityScheduledEventDetails) - }, - ...obj.activitySucceededEventDetails && { - activitySucceededEventDetails: (0, exports2.ActivitySucceededEventDetailsFilterSensitiveLog)(obj.activitySucceededEventDetails) - }, - ...obj.activityTimedOutEventDetails && { - activityTimedOutEventDetails: (0, exports2.ActivityTimedOutEventDetailsFilterSensitiveLog)(obj.activityTimedOutEventDetails) - }, - ...obj.taskFailedEventDetails && { - taskFailedEventDetails: (0, exports2.TaskFailedEventDetailsFilterSensitiveLog)(obj.taskFailedEventDetails) - }, - ...obj.taskScheduledEventDetails && { - taskScheduledEventDetails: (0, exports2.TaskScheduledEventDetailsFilterSensitiveLog)(obj.taskScheduledEventDetails) - }, - ...obj.taskStartFailedEventDetails && { - taskStartFailedEventDetails: (0, exports2.TaskStartFailedEventDetailsFilterSensitiveLog)(obj.taskStartFailedEventDetails) - }, - ...obj.taskSubmitFailedEventDetails && { - taskSubmitFailedEventDetails: (0, exports2.TaskSubmitFailedEventDetailsFilterSensitiveLog)(obj.taskSubmitFailedEventDetails) - }, - ...obj.taskSubmittedEventDetails && { - taskSubmittedEventDetails: (0, exports2.TaskSubmittedEventDetailsFilterSensitiveLog)(obj.taskSubmittedEventDetails) - }, - ...obj.taskSucceededEventDetails && { - taskSucceededEventDetails: (0, exports2.TaskSucceededEventDetailsFilterSensitiveLog)(obj.taskSucceededEventDetails) - }, - ...obj.taskTimedOutEventDetails && { - taskTimedOutEventDetails: (0, exports2.TaskTimedOutEventDetailsFilterSensitiveLog)(obj.taskTimedOutEventDetails) - }, - ...obj.executionFailedEventDetails && { - executionFailedEventDetails: (0, exports2.ExecutionFailedEventDetailsFilterSensitiveLog)(obj.executionFailedEventDetails) - }, - ...obj.executionStartedEventDetails && { - executionStartedEventDetails: (0, exports2.ExecutionStartedEventDetailsFilterSensitiveLog)(obj.executionStartedEventDetails) - }, - ...obj.executionSucceededEventDetails && { - executionSucceededEventDetails: (0, exports2.ExecutionSucceededEventDetailsFilterSensitiveLog)(obj.executionSucceededEventDetails) - }, - ...obj.executionAbortedEventDetails && { - executionAbortedEventDetails: (0, exports2.ExecutionAbortedEventDetailsFilterSensitiveLog)(obj.executionAbortedEventDetails) - }, - ...obj.executionTimedOutEventDetails && { - executionTimedOutEventDetails: (0, exports2.ExecutionTimedOutEventDetailsFilterSensitiveLog)(obj.executionTimedOutEventDetails) - }, - ...obj.lambdaFunctionFailedEventDetails && { - lambdaFunctionFailedEventDetails: (0, exports2.LambdaFunctionFailedEventDetailsFilterSensitiveLog)(obj.lambdaFunctionFailedEventDetails) - }, - ...obj.lambdaFunctionScheduleFailedEventDetails && { - lambdaFunctionScheduleFailedEventDetails: (0, exports2.LambdaFunctionScheduleFailedEventDetailsFilterSensitiveLog)(obj.lambdaFunctionScheduleFailedEventDetails) - }, - ...obj.lambdaFunctionScheduledEventDetails && { - lambdaFunctionScheduledEventDetails: (0, exports2.LambdaFunctionScheduledEventDetailsFilterSensitiveLog)(obj.lambdaFunctionScheduledEventDetails) - }, - ...obj.lambdaFunctionStartFailedEventDetails && { - lambdaFunctionStartFailedEventDetails: (0, exports2.LambdaFunctionStartFailedEventDetailsFilterSensitiveLog)(obj.lambdaFunctionStartFailedEventDetails) - }, - ...obj.lambdaFunctionSucceededEventDetails && { - lambdaFunctionSucceededEventDetails: (0, exports2.LambdaFunctionSucceededEventDetailsFilterSensitiveLog)(obj.lambdaFunctionSucceededEventDetails) - }, - ...obj.lambdaFunctionTimedOutEventDetails && { - lambdaFunctionTimedOutEventDetails: (0, exports2.LambdaFunctionTimedOutEventDetailsFilterSensitiveLog)(obj.lambdaFunctionTimedOutEventDetails) - }, - ...obj.stateEnteredEventDetails && { - stateEnteredEventDetails: (0, exports2.StateEnteredEventDetailsFilterSensitiveLog)(obj.stateEnteredEventDetails) - }, - ...obj.stateExitedEventDetails && { - stateExitedEventDetails: (0, exports2.StateExitedEventDetailsFilterSensitiveLog)(obj.stateExitedEventDetails) - }, - ...obj.mapRunFailedEventDetails && { - mapRunFailedEventDetails: (0, exports2.MapRunFailedEventDetailsFilterSensitiveLog)(obj.mapRunFailedEventDetails) + return { + ...input, + region: async () => { + if (typeof region === "string") { + return getRealRegion(region); + } + const providedRegion = await region(); + return getRealRegion(providedRegion); + }, + useFipsEndpoint: async () => { + const providedRegion = typeof region === "string" ? region : await region(); + if (isFipsRegion(providedRegion)) { + return true; + } + return typeof useFipsEndpoint !== "function" ? Promise.resolve(!!useFipsEndpoint) : useFipsEndpoint(); + } + }; + }, "resolveRegionConfig"); + var getHostnameFromVariants = /* @__PURE__ */ __name((variants = [], { useFipsEndpoint, useDualstackEndpoint }) => { + var _a; + return (_a = variants.find( + ({ tags }) => useFipsEndpoint === tags.includes("fips") && useDualstackEndpoint === tags.includes("dualstack") + )) == null ? void 0 : _a.hostname; + }, "getHostnameFromVariants"); + var getResolvedHostname = /* @__PURE__ */ __name((resolvedRegion, { regionHostname, partitionHostname }) => regionHostname ? regionHostname : partitionHostname ? partitionHostname.replace("{region}", resolvedRegion) : void 0, "getResolvedHostname"); + var getResolvedPartition = /* @__PURE__ */ __name((region, { partitionHash }) => Object.keys(partitionHash || {}).find((key) => partitionHash[key].regions.includes(region)) ?? "aws", "getResolvedPartition"); + var getResolvedSigningRegion = /* @__PURE__ */ __name((hostname, { signingRegion, regionRegex, useFipsEndpoint }) => { + if (signingRegion) { + return signingRegion; + } else if (useFipsEndpoint) { + const regionRegexJs = regionRegex.replace("\\\\", "\\").replace(/^\^/g, "\\.").replace(/\$$/g, "\\."); + const regionRegexmatchArray = hostname.match(regionRegexJs); + if (regionRegexmatchArray) { + return regionRegexmatchArray[0].slice(1, -1); + } } - }); - exports2.HistoryEventFilterSensitiveLog = HistoryEventFilterSensitiveLog; - var GetExecutionHistoryOutputFilterSensitiveLog = (obj) => ({ - ...obj, - ...obj.events && { events: obj.events.map((item) => (0, exports2.HistoryEventFilterSensitiveLog)(item)) } - }); - exports2.GetExecutionHistoryOutputFilterSensitiveLog = GetExecutionHistoryOutputFilterSensitiveLog; - var PublishStateMachineVersionInputFilterSensitiveLog = (obj) => ({ - ...obj, - ...obj.description && { description: smithy_client_1.SENSITIVE_STRING } - }); - exports2.PublishStateMachineVersionInputFilterSensitiveLog = PublishStateMachineVersionInputFilterSensitiveLog; - var SendTaskFailureInputFilterSensitiveLog = (obj) => ({ - ...obj, - ...obj.error && { error: smithy_client_1.SENSITIVE_STRING }, - ...obj.cause && { cause: smithy_client_1.SENSITIVE_STRING } - }); - exports2.SendTaskFailureInputFilterSensitiveLog = SendTaskFailureInputFilterSensitiveLog; - var SendTaskSuccessInputFilterSensitiveLog = (obj) => ({ - ...obj, - ...obj.output && { output: smithy_client_1.SENSITIVE_STRING } - }); - exports2.SendTaskSuccessInputFilterSensitiveLog = SendTaskSuccessInputFilterSensitiveLog; - var StartExecutionInputFilterSensitiveLog = (obj) => ({ - ...obj, - ...obj.input && { input: smithy_client_1.SENSITIVE_STRING } - }); - exports2.StartExecutionInputFilterSensitiveLog = StartExecutionInputFilterSensitiveLog; - var StartSyncExecutionInputFilterSensitiveLog = (obj) => ({ - ...obj, - ...obj.input && { input: smithy_client_1.SENSITIVE_STRING } - }); - exports2.StartSyncExecutionInputFilterSensitiveLog = StartSyncExecutionInputFilterSensitiveLog; - var StartSyncExecutionOutputFilterSensitiveLog = (obj) => ({ - ...obj, - ...obj.error && { error: smithy_client_1.SENSITIVE_STRING }, - ...obj.cause && { cause: smithy_client_1.SENSITIVE_STRING }, - ...obj.input && { input: smithy_client_1.SENSITIVE_STRING }, - ...obj.output && { output: smithy_client_1.SENSITIVE_STRING } - }); - exports2.StartSyncExecutionOutputFilterSensitiveLog = StartSyncExecutionOutputFilterSensitiveLog; - var StopExecutionInputFilterSensitiveLog = (obj) => ({ - ...obj, - ...obj.error && { error: smithy_client_1.SENSITIVE_STRING }, - ...obj.cause && { cause: smithy_client_1.SENSITIVE_STRING } - }); - exports2.StopExecutionInputFilterSensitiveLog = StopExecutionInputFilterSensitiveLog; - var UpdateStateMachineInputFilterSensitiveLog = (obj) => ({ - ...obj, - ...obj.definition && { definition: smithy_client_1.SENSITIVE_STRING }, - ...obj.versionDescription && { versionDescription: smithy_client_1.SENSITIVE_STRING } - }); - exports2.UpdateStateMachineInputFilterSensitiveLog = UpdateStateMachineInputFilterSensitiveLog; - var UpdateStateMachineAliasInputFilterSensitiveLog = (obj) => ({ - ...obj, - ...obj.description && { description: smithy_client_1.SENSITIVE_STRING } - }); - exports2.UpdateStateMachineAliasInputFilterSensitiveLog = UpdateStateMachineAliasInputFilterSensitiveLog; + }, "getResolvedSigningRegion"); + var getRegionInfo = /* @__PURE__ */ __name((region, { + useFipsEndpoint = false, + useDualstackEndpoint = false, + signingService, + regionHash, + partitionHash + }) => { + var _a, _b, _c, _d, _e; + const partition = getResolvedPartition(region, { partitionHash }); + const resolvedRegion = region in regionHash ? region : ((_a = partitionHash[partition]) == null ? void 0 : _a.endpoint) ?? region; + const hostnameOptions = { useFipsEndpoint, useDualstackEndpoint }; + const regionHostname = getHostnameFromVariants((_b = regionHash[resolvedRegion]) == null ? void 0 : _b.variants, hostnameOptions); + const partitionHostname = getHostnameFromVariants((_c = partitionHash[partition]) == null ? void 0 : _c.variants, hostnameOptions); + const hostname = getResolvedHostname(resolvedRegion, { regionHostname, partitionHostname }); + if (hostname === void 0) { + throw new Error(`Endpoint resolution failed for: ${{ resolvedRegion, useFipsEndpoint, useDualstackEndpoint }}`); + } + const signingRegion = getResolvedSigningRegion(hostname, { + signingRegion: (_d = regionHash[resolvedRegion]) == null ? void 0 : _d.signingRegion, + regionRegex: partitionHash[partition].regionRegex, + useFipsEndpoint + }); + return { + partition, + signingService, + hostname, + ...signingRegion && { signingRegion }, + ...((_e = regionHash[resolvedRegion]) == null ? void 0 : _e.signingService) && { + signingService: regionHash[resolvedRegion].signingService + } + }; + }, "getRegionInfo"); } }); -// ../../../node_modules/@aws-sdk/client-sfn/dist-cjs/protocols/Aws_json1_0.js -var require_Aws_json1_0 = __commonJS({ - "../../../node_modules/@aws-sdk/client-sfn/dist-cjs/protocols/Aws_json1_0.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.de_ListActivitiesCommand = exports2.de_GetExecutionHistoryCommand = exports2.de_GetActivityTaskCommand = exports2.de_DescribeStateMachineForExecutionCommand = exports2.de_DescribeStateMachineAliasCommand = exports2.de_DescribeStateMachineCommand = exports2.de_DescribeMapRunCommand = exports2.de_DescribeExecutionCommand = exports2.de_DescribeActivityCommand = exports2.de_DeleteStateMachineVersionCommand = exports2.de_DeleteStateMachineAliasCommand = exports2.de_DeleteStateMachineCommand = exports2.de_DeleteActivityCommand = exports2.de_CreateStateMachineAliasCommand = exports2.de_CreateStateMachineCommand = exports2.de_CreateActivityCommand = exports2.se_UpdateStateMachineAliasCommand = exports2.se_UpdateStateMachineCommand = exports2.se_UpdateMapRunCommand = exports2.se_UntagResourceCommand = exports2.se_TagResourceCommand = exports2.se_StopExecutionCommand = exports2.se_StartSyncExecutionCommand = exports2.se_StartExecutionCommand = exports2.se_SendTaskSuccessCommand = exports2.se_SendTaskHeartbeatCommand = exports2.se_SendTaskFailureCommand = exports2.se_PublishStateMachineVersionCommand = exports2.se_ListTagsForResourceCommand = exports2.se_ListStateMachineVersionsCommand = exports2.se_ListStateMachinesCommand = exports2.se_ListStateMachineAliasesCommand = exports2.se_ListMapRunsCommand = exports2.se_ListExecutionsCommand = exports2.se_ListActivitiesCommand = exports2.se_GetExecutionHistoryCommand = exports2.se_GetActivityTaskCommand = exports2.se_DescribeStateMachineForExecutionCommand = exports2.se_DescribeStateMachineAliasCommand = exports2.se_DescribeStateMachineCommand = exports2.se_DescribeMapRunCommand = exports2.se_DescribeExecutionCommand = exports2.se_DescribeActivityCommand = exports2.se_DeleteStateMachineVersionCommand = exports2.se_DeleteStateMachineAliasCommand = exports2.se_DeleteStateMachineCommand = exports2.se_DeleteActivityCommand = exports2.se_CreateStateMachineAliasCommand = exports2.se_CreateStateMachineCommand = exports2.se_CreateActivityCommand = void 0; - exports2.de_UpdateStateMachineAliasCommand = exports2.de_UpdateStateMachineCommand = exports2.de_UpdateMapRunCommand = exports2.de_UntagResourceCommand = exports2.de_TagResourceCommand = exports2.de_StopExecutionCommand = exports2.de_StartSyncExecutionCommand = exports2.de_StartExecutionCommand = exports2.de_SendTaskSuccessCommand = exports2.de_SendTaskHeartbeatCommand = exports2.de_SendTaskFailureCommand = exports2.de_PublishStateMachineVersionCommand = exports2.de_ListTagsForResourceCommand = exports2.de_ListStateMachineVersionsCommand = exports2.de_ListStateMachinesCommand = exports2.de_ListStateMachineAliasesCommand = exports2.de_ListMapRunsCommand = exports2.de_ListExecutionsCommand = void 0; - var protocol_http_1 = require_dist_cjs2(); - var smithy_client_1 = require_dist_cjs34(); - var models_0_1 = require_models_03(); - var SFNServiceException_1 = require_SFNServiceException(); - var se_CreateActivityCommand = async (input, context) => { - const headers = sharedHeaders("CreateActivity"); - let body; - body = JSON.stringify((0, smithy_client_1._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); - }; - exports2.se_CreateActivityCommand = se_CreateActivityCommand; - var se_CreateStateMachineCommand = async (input, context) => { - const headers = sharedHeaders("CreateStateMachine"); - let body; - body = JSON.stringify((0, smithy_client_1._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); - }; - exports2.se_CreateStateMachineCommand = se_CreateStateMachineCommand; - var se_CreateStateMachineAliasCommand = async (input, context) => { - const headers = sharedHeaders("CreateStateMachineAlias"); - let body; - body = JSON.stringify((0, smithy_client_1._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); - }; - exports2.se_CreateStateMachineAliasCommand = se_CreateStateMachineAliasCommand; - var se_DeleteActivityCommand = async (input, context) => { - const headers = sharedHeaders("DeleteActivity"); - let body; - body = JSON.stringify((0, smithy_client_1._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); - }; - exports2.se_DeleteActivityCommand = se_DeleteActivityCommand; - var se_DeleteStateMachineCommand = async (input, context) => { - const headers = sharedHeaders("DeleteStateMachine"); - let body; - body = JSON.stringify((0, smithy_client_1._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); - }; - exports2.se_DeleteStateMachineCommand = se_DeleteStateMachineCommand; - var se_DeleteStateMachineAliasCommand = async (input, context) => { - const headers = sharedHeaders("DeleteStateMachineAlias"); - let body; - body = JSON.stringify((0, smithy_client_1._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); - }; - exports2.se_DeleteStateMachineAliasCommand = se_DeleteStateMachineAliasCommand; - var se_DeleteStateMachineVersionCommand = async (input, context) => { - const headers = sharedHeaders("DeleteStateMachineVersion"); - let body; - body = JSON.stringify((0, smithy_client_1._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); - }; - exports2.se_DeleteStateMachineVersionCommand = se_DeleteStateMachineVersionCommand; - var se_DescribeActivityCommand = async (input, context) => { - const headers = sharedHeaders("DescribeActivity"); - let body; - body = JSON.stringify((0, smithy_client_1._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); - }; - exports2.se_DescribeActivityCommand = se_DescribeActivityCommand; - var se_DescribeExecutionCommand = async (input, context) => { - const headers = sharedHeaders("DescribeExecution"); - let body; - body = JSON.stringify((0, smithy_client_1._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); - }; - exports2.se_DescribeExecutionCommand = se_DescribeExecutionCommand; - var se_DescribeMapRunCommand = async (input, context) => { - const headers = sharedHeaders("DescribeMapRun"); - let body; - body = JSON.stringify((0, smithy_client_1._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); - }; - exports2.se_DescribeMapRunCommand = se_DescribeMapRunCommand; - var se_DescribeStateMachineCommand = async (input, context) => { - const headers = sharedHeaders("DescribeStateMachine"); - let body; - body = JSON.stringify((0, smithy_client_1._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); - }; - exports2.se_DescribeStateMachineCommand = se_DescribeStateMachineCommand; - var se_DescribeStateMachineAliasCommand = async (input, context) => { - const headers = sharedHeaders("DescribeStateMachineAlias"); - let body; - body = JSON.stringify((0, smithy_client_1._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); - }; - exports2.se_DescribeStateMachineAliasCommand = se_DescribeStateMachineAliasCommand; - var se_DescribeStateMachineForExecutionCommand = async (input, context) => { - const headers = sharedHeaders("DescribeStateMachineForExecution"); - let body; - body = JSON.stringify((0, smithy_client_1._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); - }; - exports2.se_DescribeStateMachineForExecutionCommand = se_DescribeStateMachineForExecutionCommand; - var se_GetActivityTaskCommand = async (input, context) => { - const headers = sharedHeaders("GetActivityTask"); - let body; - body = JSON.stringify((0, smithy_client_1._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); - }; - exports2.se_GetActivityTaskCommand = se_GetActivityTaskCommand; - var se_GetExecutionHistoryCommand = async (input, context) => { - const headers = sharedHeaders("GetExecutionHistory"); - let body; - body = JSON.stringify((0, smithy_client_1._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); - }; - exports2.se_GetExecutionHistoryCommand = se_GetExecutionHistoryCommand; - var se_ListActivitiesCommand = async (input, context) => { - const headers = sharedHeaders("ListActivities"); - let body; - body = JSON.stringify((0, smithy_client_1._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); - }; - exports2.se_ListActivitiesCommand = se_ListActivitiesCommand; - var se_ListExecutionsCommand = async (input, context) => { - const headers = sharedHeaders("ListExecutions"); - let body; - body = JSON.stringify((0, smithy_client_1._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); - }; - exports2.se_ListExecutionsCommand = se_ListExecutionsCommand; - var se_ListMapRunsCommand = async (input, context) => { - const headers = sharedHeaders("ListMapRuns"); - let body; - body = JSON.stringify((0, smithy_client_1._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); - }; - exports2.se_ListMapRunsCommand = se_ListMapRunsCommand; - var se_ListStateMachineAliasesCommand = async (input, context) => { - const headers = sharedHeaders("ListStateMachineAliases"); - let body; - body = JSON.stringify((0, smithy_client_1._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); - }; - exports2.se_ListStateMachineAliasesCommand = se_ListStateMachineAliasesCommand; - var se_ListStateMachinesCommand = async (input, context) => { - const headers = sharedHeaders("ListStateMachines"); - let body; - body = JSON.stringify((0, smithy_client_1._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); - }; - exports2.se_ListStateMachinesCommand = se_ListStateMachinesCommand; - var se_ListStateMachineVersionsCommand = async (input, context) => { - const headers = sharedHeaders("ListStateMachineVersions"); - let body; - body = JSON.stringify((0, smithy_client_1._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); - }; - exports2.se_ListStateMachineVersionsCommand = se_ListStateMachineVersionsCommand; - var se_ListTagsForResourceCommand = async (input, context) => { - const headers = sharedHeaders("ListTagsForResource"); - let body; - body = JSON.stringify((0, smithy_client_1._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); - }; - exports2.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand; - var se_PublishStateMachineVersionCommand = async (input, context) => { - const headers = sharedHeaders("PublishStateMachineVersion"); - let body; - body = JSON.stringify((0, smithy_client_1._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); +// ../../../node_modules/@smithy/util-defaults-mode-node/node_modules/@smithy/property-provider/dist-cjs/index.js +var require_dist_cjs63 = __commonJS({ + "../../../node_modules/@smithy/util-defaults-mode-node/node_modules/@smithy/property-provider/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all) => { + for (var name in all) + __defProp2(target, name, { get: all[name], enumerable: true }); }; - exports2.se_PublishStateMachineVersionCommand = se_PublishStateMachineVersionCommand; - var se_SendTaskFailureCommand = async (input, context) => { - const headers = sharedHeaders("SendTaskFailure"); - let body; - body = JSON.stringify((0, smithy_client_1._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; }; - exports2.se_SendTaskFailureCommand = se_SendTaskFailureCommand; - var se_SendTaskHeartbeatCommand = async (input, context) => { - const headers = sharedHeaders("SendTaskHeartbeat"); - let body; - body = JSON.stringify((0, smithy_client_1._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + CredentialsProviderError: () => CredentialsProviderError, + ProviderError: () => ProviderError2, + TokenProviderError: () => TokenProviderError, + chain: () => chain, + fromStatic: () => fromStatic, + memoize: () => memoize + }); + module2.exports = __toCommonJS2(src_exports); + var _ProviderError = class _ProviderError2 extends Error { + constructor(message, options = true) { + var _a; + let logger; + let tryNextLink = true; + if (typeof options === "boolean") { + logger = void 0; + tryNextLink = options; + } else if (options != null && typeof options === "object") { + logger = options.logger; + tryNextLink = options.tryNextLink ?? true; + } + super(message); + this.name = "ProviderError"; + this.tryNextLink = tryNextLink; + Object.setPrototypeOf(this, _ProviderError2.prototype); + (_a = logger == null ? void 0 : logger.debug) == null ? void 0 : _a.call(logger, `@smithy/property-provider ${tryNextLink ? "->" : "(!)"} ${message}`); + } + /** + * @deprecated use new operator. + */ + static from(error, options = true) { + return Object.assign(new this(error.message, options), error); + } }; - exports2.se_SendTaskHeartbeatCommand = se_SendTaskHeartbeatCommand; - var se_SendTaskSuccessCommand = async (input, context) => { - const headers = sharedHeaders("SendTaskSuccess"); - let body; - body = JSON.stringify((0, smithy_client_1._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); + __name(_ProviderError, "ProviderError"); + var ProviderError2 = _ProviderError; + var _CredentialsProviderError = class _CredentialsProviderError2 extends ProviderError2 { + /** + * @override + */ + constructor(message, options = true) { + super(message, options); + this.name = "CredentialsProviderError"; + Object.setPrototypeOf(this, _CredentialsProviderError2.prototype); + } }; - exports2.se_SendTaskSuccessCommand = se_SendTaskSuccessCommand; - var se_StartExecutionCommand = async (input, context) => { - const headers = sharedHeaders("StartExecution"); - let body; - body = JSON.stringify((0, smithy_client_1._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); + __name(_CredentialsProviderError, "CredentialsProviderError"); + var CredentialsProviderError = _CredentialsProviderError; + var _TokenProviderError = class _TokenProviderError2 extends ProviderError2 { + /** + * @override + */ + constructor(message, options = true) { + super(message, options); + this.name = "TokenProviderError"; + Object.setPrototypeOf(this, _TokenProviderError2.prototype); + } }; - exports2.se_StartExecutionCommand = se_StartExecutionCommand; - var se_StartSyncExecutionCommand = async (input, context) => { - const headers = sharedHeaders("StartSyncExecution"); - let body; - body = JSON.stringify((0, smithy_client_1._json)(input)); - let { hostname: resolvedHostname } = await context.endpoint(); - if (context.disableHostPrefix !== true) { - resolvedHostname = "sync-" + resolvedHostname; - if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) { - throw new Error("ValidationError: prefixed hostname must be hostname compatible."); + __name(_TokenProviderError, "TokenProviderError"); + var TokenProviderError = _TokenProviderError; + var chain = /* @__PURE__ */ __name((...providers) => async () => { + if (providers.length === 0) { + throw new ProviderError2("No providers in chain"); + } + let lastProviderError; + for (const provider of providers) { + try { + const credentials = await provider(); + return credentials; + } catch (err) { + lastProviderError = err; + if (err == null ? void 0 : err.tryNextLink) { + continue; + } + throw err; + } + } + throw lastProviderError; + }, "chain"); + var fromStatic = /* @__PURE__ */ __name((staticValue) => () => Promise.resolve(staticValue), "fromStatic"); + var memoize = /* @__PURE__ */ __name((provider, isExpired, requiresRefresh) => { + let resolved; + let pending; + let hasResult; + let isConstant = false; + const coalesceProvider = /* @__PURE__ */ __name(async () => { + if (!pending) { + pending = provider(); + } + try { + resolved = await pending; + hasResult = true; + isConstant = false; + } finally { + pending = void 0; + } + return resolved; + }, "coalesceProvider"); + if (isExpired === void 0) { + return async (options) => { + if (!hasResult || (options == null ? void 0 : options.forceRefresh)) { + resolved = await coalesceProvider(); + } + return resolved; + }; + } + return async (options) => { + if (!hasResult || (options == null ? void 0 : options.forceRefresh)) { + resolved = await coalesceProvider(); + } + if (isConstant) { + return resolved; } + if (requiresRefresh && !requiresRefresh(resolved)) { + isConstant = true; + return resolved; + } + if (isExpired(resolved)) { + await coalesceProvider(); + return resolved; + } + return resolved; + }; + }, "memoize"); + } +}); + +// ../../../node_modules/@smithy/util-defaults-mode-node/node_modules/@smithy/shared-ini-file-loader/dist-cjs/getHomeDir.js +var require_getHomeDir3 = __commonJS({ + "../../../node_modules/@smithy/util-defaults-mode-node/node_modules/@smithy/shared-ini-file-loader/dist-cjs/getHomeDir.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getHomeDir = void 0; + var os_1 = require("os"); + var path_1 = require("path"); + var homeDirCache = {}; + var getHomeDirCacheKey = () => { + if (process && process.geteuid) { + return `${process.geteuid()}`; } - return buildHttpRpcRequest(context, headers, "/", resolvedHostname, body); + return "DEFAULT"; }; - exports2.se_StartSyncExecutionCommand = se_StartSyncExecutionCommand; - var se_StopExecutionCommand = async (input, context) => { - const headers = sharedHeaders("StopExecution"); - let body; - body = JSON.stringify((0, smithy_client_1._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); + var getHomeDir2 = () => { + const { HOME, USERPROFILE, HOMEPATH, HOMEDRIVE = `C:${path_1.sep}` } = process.env; + if (HOME) + return HOME; + if (USERPROFILE) + return USERPROFILE; + if (HOMEPATH) + return `${HOMEDRIVE}${HOMEPATH}`; + const homeDirCacheKey = getHomeDirCacheKey(); + if (!homeDirCache[homeDirCacheKey]) + homeDirCache[homeDirCacheKey] = (0, os_1.homedir)(); + return homeDirCache[homeDirCacheKey]; }; - exports2.se_StopExecutionCommand = se_StopExecutionCommand; - var se_TagResourceCommand = async (input, context) => { - const headers = sharedHeaders("TagResource"); - let body; - body = JSON.stringify((0, smithy_client_1._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); + exports2.getHomeDir = getHomeDir2; + } +}); + +// ../../../node_modules/@smithy/util-defaults-mode-node/node_modules/@smithy/shared-ini-file-loader/dist-cjs/getSSOTokenFilepath.js +var require_getSSOTokenFilepath3 = __commonJS({ + "../../../node_modules/@smithy/util-defaults-mode-node/node_modules/@smithy/shared-ini-file-loader/dist-cjs/getSSOTokenFilepath.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getSSOTokenFilepath = void 0; + var crypto_1 = require("crypto"); + var path_1 = require("path"); + var getHomeDir_1 = require_getHomeDir3(); + var getSSOTokenFilepath2 = (id) => { + const hasher = (0, crypto_1.createHash)("sha1"); + const cacheName = hasher.update(id).digest("hex"); + return (0, path_1.join)((0, getHomeDir_1.getHomeDir)(), ".aws", "sso", "cache", `${cacheName}.json`); }; - exports2.se_TagResourceCommand = se_TagResourceCommand; - var se_UntagResourceCommand = async (input, context) => { - const headers = sharedHeaders("UntagResource"); - let body; - body = JSON.stringify((0, smithy_client_1._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); + exports2.getSSOTokenFilepath = getSSOTokenFilepath2; + } +}); + +// ../../../node_modules/@smithy/util-defaults-mode-node/node_modules/@smithy/shared-ini-file-loader/dist-cjs/getSSOTokenFromFile.js +var require_getSSOTokenFromFile3 = __commonJS({ + "../../../node_modules/@smithy/util-defaults-mode-node/node_modules/@smithy/shared-ini-file-loader/dist-cjs/getSSOTokenFromFile.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getSSOTokenFromFile = void 0; + var fs_1 = require("fs"); + var getSSOTokenFilepath_1 = require_getSSOTokenFilepath3(); + var { readFile } = fs_1.promises; + var getSSOTokenFromFile2 = async (id) => { + const ssoTokenFilepath = (0, getSSOTokenFilepath_1.getSSOTokenFilepath)(id); + const ssoTokenText = await readFile(ssoTokenFilepath, "utf8"); + return JSON.parse(ssoTokenText); }; - exports2.se_UntagResourceCommand = se_UntagResourceCommand; - var se_UpdateMapRunCommand = async (input, context) => { - const headers = sharedHeaders("UpdateMapRun"); - let body; - body = JSON.stringify(se_UpdateMapRunInput(input, context)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); + exports2.getSSOTokenFromFile = getSSOTokenFromFile2; + } +}); + +// ../../../node_modules/@smithy/util-defaults-mode-node/node_modules/@smithy/shared-ini-file-loader/dist-cjs/slurpFile.js +var require_slurpFile3 = __commonJS({ + "../../../node_modules/@smithy/util-defaults-mode-node/node_modules/@smithy/shared-ini-file-loader/dist-cjs/slurpFile.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.slurpFile = void 0; + var fs_1 = require("fs"); + var { readFile } = fs_1.promises; + var filePromisesHash = {}; + var slurpFile = (path, options) => { + if (!filePromisesHash[path] || (options === null || options === void 0 ? void 0 : options.ignoreCache)) { + filePromisesHash[path] = readFile(path, "utf8"); + } + return filePromisesHash[path]; }; - exports2.se_UpdateMapRunCommand = se_UpdateMapRunCommand; - var se_UpdateStateMachineCommand = async (input, context) => { - const headers = sharedHeaders("UpdateStateMachine"); - let body; - body = JSON.stringify((0, smithy_client_1._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); + exports2.slurpFile = slurpFile; + } +}); + +// ../../../node_modules/@smithy/util-defaults-mode-node/node_modules/@smithy/shared-ini-file-loader/dist-cjs/index.js +var require_dist_cjs64 = __commonJS({ + "../../../node_modules/@smithy/util-defaults-mode-node/node_modules/@smithy/shared-ini-file-loader/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all) => { + for (var name in all) + __defProp2(target, name, { get: all[name], enumerable: true }); }; - exports2.se_UpdateStateMachineCommand = se_UpdateStateMachineCommand; - var se_UpdateStateMachineAliasCommand = async (input, context) => { - const headers = sharedHeaders("UpdateStateMachineAlias"); - let body; - body = JSON.stringify((0, smithy_client_1._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; }; - exports2.se_UpdateStateMachineAliasCommand = se_UpdateStateMachineAliasCommand; - var de_CreateActivityCommand = async (output, context) => { - if (output.statusCode >= 300) { - return de_CreateActivityCommandError(output, context); + var __reExport = (target, mod, secondTarget) => (__copyProps2(target, mod, "default"), secondTarget && __copyProps2(secondTarget, mod, "default")); + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + CONFIG_PREFIX_SEPARATOR: () => CONFIG_PREFIX_SEPARATOR, + DEFAULT_PROFILE: () => DEFAULT_PROFILE, + ENV_PROFILE: () => ENV_PROFILE, + getProfileName: () => getProfileName, + loadSharedConfigFiles: () => loadSharedConfigFiles, + loadSsoSessionData: () => loadSsoSessionData, + parseKnownFiles: () => parseKnownFiles + }); + module2.exports = __toCommonJS2(src_exports); + __reExport(src_exports, require_getHomeDir3(), module2.exports); + var ENV_PROFILE = "AWS_PROFILE"; + var DEFAULT_PROFILE = "default"; + var getProfileName = /* @__PURE__ */ __name((init) => init.profile || process.env[ENV_PROFILE] || DEFAULT_PROFILE, "getProfileName"); + __reExport(src_exports, require_getSSOTokenFilepath3(), module2.exports); + __reExport(src_exports, require_getSSOTokenFromFile3(), module2.exports); + var import_types5 = require_dist_cjs(); + var getConfigData = /* @__PURE__ */ __name((data) => Object.entries(data).filter(([key]) => { + const indexOfSeparator = key.indexOf(CONFIG_PREFIX_SEPARATOR); + if (indexOfSeparator === -1) { + return false; } - const data = await parseBody(output.body, context); - let contents = {}; - contents = de_CreateActivityOutput(data, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents + return Object.values(import_types5.IniSectionType).includes(key.substring(0, indexOfSeparator)); + }).reduce( + (acc, [key, value]) => { + const indexOfSeparator = key.indexOf(CONFIG_PREFIX_SEPARATOR); + const updatedKey = key.substring(0, indexOfSeparator) === import_types5.IniSectionType.PROFILE ? key.substring(indexOfSeparator + 1) : key; + acc[updatedKey] = value; + return acc; + }, + { + // Populate default profile, if present. + ...data.default && { default: data.default } + } + ), "getConfigData"); + var import_path = require("path"); + var import_getHomeDir = require_getHomeDir3(); + var ENV_CONFIG_PATH = "AWS_CONFIG_FILE"; + var getConfigFilepath = /* @__PURE__ */ __name(() => process.env[ENV_CONFIG_PATH] || (0, import_path.join)((0, import_getHomeDir.getHomeDir)(), ".aws", "config"), "getConfigFilepath"); + var import_getHomeDir2 = require_getHomeDir3(); + var ENV_CREDENTIALS_PATH = "AWS_SHARED_CREDENTIALS_FILE"; + var getCredentialsFilepath = /* @__PURE__ */ __name(() => process.env[ENV_CREDENTIALS_PATH] || (0, import_path.join)((0, import_getHomeDir2.getHomeDir)(), ".aws", "credentials"), "getCredentialsFilepath"); + var import_getHomeDir3 = require_getHomeDir3(); + var prefixKeyRegex = /^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/; + var profileNameBlockList = ["__proto__", "profile __proto__"]; + var parseIni = /* @__PURE__ */ __name((iniData) => { + const map = {}; + let currentSection; + let currentSubSection; + for (const iniLine of iniData.split(/\r?\n/)) { + const trimmedLine = iniLine.split(/(^|\s)[;#]/)[0].trim(); + const isSection = trimmedLine[0] === "[" && trimmedLine[trimmedLine.length - 1] === "]"; + if (isSection) { + currentSection = void 0; + currentSubSection = void 0; + const sectionName = trimmedLine.substring(1, trimmedLine.length - 1); + const matches = prefixKeyRegex.exec(sectionName); + if (matches) { + const [, prefix, , name] = matches; + if (Object.values(import_types5.IniSectionType).includes(prefix)) { + currentSection = [prefix, name].join(CONFIG_PREFIX_SEPARATOR); + } + } else { + currentSection = sectionName; + } + if (profileNameBlockList.includes(sectionName)) { + throw new Error(`Found invalid profile name "${sectionName}"`); + } + } else if (currentSection) { + const indexOfEqualsSign = trimmedLine.indexOf("="); + if (![0, -1].includes(indexOfEqualsSign)) { + const [name, value] = [ + trimmedLine.substring(0, indexOfEqualsSign).trim(), + trimmedLine.substring(indexOfEqualsSign + 1).trim() + ]; + if (value === "") { + currentSubSection = name; + } else { + if (currentSubSection && iniLine.trimStart() === iniLine) { + currentSubSection = void 0; + } + map[currentSection] = map[currentSection] || {}; + const key = currentSubSection ? [currentSubSection, name].join(CONFIG_PREFIX_SEPARATOR) : name; + map[currentSection][key] = value; + } + } + } + } + return map; + }, "parseIni"); + var import_slurpFile = require_slurpFile3(); + var swallowError = /* @__PURE__ */ __name(() => ({}), "swallowError"); + var CONFIG_PREFIX_SEPARATOR = "."; + var loadSharedConfigFiles = /* @__PURE__ */ __name(async (init = {}) => { + const { filepath = getCredentialsFilepath(), configFilepath = getConfigFilepath() } = init; + const homeDir = (0, import_getHomeDir3.getHomeDir)(); + const relativeHomeDirPrefix = "~/"; + let resolvedFilepath = filepath; + if (filepath.startsWith(relativeHomeDirPrefix)) { + resolvedFilepath = (0, import_path.join)(homeDir, filepath.slice(2)); + } + let resolvedConfigFilepath = configFilepath; + if (configFilepath.startsWith(relativeHomeDirPrefix)) { + resolvedConfigFilepath = (0, import_path.join)(homeDir, configFilepath.slice(2)); + } + const parsedFiles = await Promise.all([ + (0, import_slurpFile.slurpFile)(resolvedConfigFilepath, { + ignoreCache: init.ignoreCache + }).then(parseIni).then(getConfigData).catch(swallowError), + (0, import_slurpFile.slurpFile)(resolvedFilepath, { + ignoreCache: init.ignoreCache + }).then(parseIni).catch(swallowError) + ]); + return { + configFile: parsedFiles[0], + credentialsFile: parsedFiles[1] }; - return response; + }, "loadSharedConfigFiles"); + var getSsoSessionData = /* @__PURE__ */ __name((data) => Object.entries(data).filter(([key]) => key.startsWith(import_types5.IniSectionType.SSO_SESSION + CONFIG_PREFIX_SEPARATOR)).reduce((acc, [key, value]) => ({ ...acc, [key.substring(key.indexOf(CONFIG_PREFIX_SEPARATOR) + 1)]: value }), {}), "getSsoSessionData"); + var import_slurpFile2 = require_slurpFile3(); + var swallowError2 = /* @__PURE__ */ __name(() => ({}), "swallowError"); + var loadSsoSessionData = /* @__PURE__ */ __name(async (init = {}) => (0, import_slurpFile2.slurpFile)(init.configFilepath ?? getConfigFilepath()).then(parseIni).then(getSsoSessionData).catch(swallowError2), "loadSsoSessionData"); + var mergeConfigFiles = /* @__PURE__ */ __name((...files) => { + const merged = {}; + for (const file of files) { + for (const [key, values] of Object.entries(file)) { + if (merged[key] !== void 0) { + Object.assign(merged[key], values); + } else { + merged[key] = values; + } + } + } + return merged; + }, "mergeConfigFiles"); + var parseKnownFiles = /* @__PURE__ */ __name(async (init) => { + const parsedFiles = await loadSharedConfigFiles(init); + return mergeConfigFiles(parsedFiles.configFile, parsedFiles.credentialsFile); + }, "parseKnownFiles"); + } +}); + +// ../../../node_modules/@smithy/util-defaults-mode-node/node_modules/@smithy/node-config-provider/dist-cjs/index.js +var require_dist_cjs65 = __commonJS({ + "../../../node_modules/@smithy/util-defaults-mode-node/node_modules/@smithy/node-config-provider/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all) => { + for (var name in all) + __defProp2(target, name, { get: all[name], enumerable: true }); }; - exports2.de_CreateActivityCommand = de_CreateActivityCommand; - var de_CreateActivityCommandError = async (output, context) => { - const parsedOutput = { - ...output, - body: await parseErrorBody(output.body, context) - }; - const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); - switch (errorCode) { - case "ActivityLimitExceeded": - case "com.amazonaws.sfn#ActivityLimitExceeded": - throw await de_ActivityLimitExceededRes(parsedOutput, context); - case "InvalidName": - case "com.amazonaws.sfn#InvalidName": - throw await de_InvalidNameRes(parsedOutput, context); - case "TooManyTags": - case "com.amazonaws.sfn#TooManyTags": - throw await de_TooManyTagsRes(parsedOutput, context); - default: - const parsedBody = parsedOutput.body; - return throwDefaultError({ - output, - parsedBody, - errorCode - }); + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); } + return to; }; - var de_CreateStateMachineCommand = async (output, context) => { - if (output.statusCode >= 300) { - return de_CreateStateMachineCommandError(output, context); + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + loadConfig: () => loadConfig + }); + module2.exports = __toCommonJS2(src_exports); + var import_property_provider2 = require_dist_cjs63(); + function getSelectorName(functionString) { + try { + const constants = new Set(Array.from(functionString.match(/([A-Z_]){3,}/g) ?? [])); + constants.delete("CONFIG"); + constants.delete("CONFIG_PREFIX_SEPARATOR"); + constants.delete("ENV"); + return [...constants].join(", "); + } catch (e) { + return functionString; } - const data = await parseBody(output.body, context); - let contents = {}; - contents = de_CreateStateMachineOutput(data, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; - }; - exports2.de_CreateStateMachineCommand = de_CreateStateMachineCommand; - var de_CreateStateMachineCommandError = async (output, context) => { - const parsedOutput = { - ...output, - body: await parseErrorBody(output.body, context) - }; - const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); - switch (errorCode) { - case "ConflictException": - case "com.amazonaws.sfn#ConflictException": - throw await de_ConflictExceptionRes(parsedOutput, context); - case "InvalidArn": - case "com.amazonaws.sfn#InvalidArn": - throw await de_InvalidArnRes(parsedOutput, context); - case "InvalidDefinition": - case "com.amazonaws.sfn#InvalidDefinition": - throw await de_InvalidDefinitionRes(parsedOutput, context); - case "InvalidLoggingConfiguration": - case "com.amazonaws.sfn#InvalidLoggingConfiguration": - throw await de_InvalidLoggingConfigurationRes(parsedOutput, context); - case "InvalidName": - case "com.amazonaws.sfn#InvalidName": - throw await de_InvalidNameRes(parsedOutput, context); - case "InvalidTracingConfiguration": - case "com.amazonaws.sfn#InvalidTracingConfiguration": - throw await de_InvalidTracingConfigurationRes(parsedOutput, context); - case "StateMachineAlreadyExists": - case "com.amazonaws.sfn#StateMachineAlreadyExists": - throw await de_StateMachineAlreadyExistsRes(parsedOutput, context); - case "StateMachineDeleting": - case "com.amazonaws.sfn#StateMachineDeleting": - throw await de_StateMachineDeletingRes(parsedOutput, context); - case "StateMachineLimitExceeded": - case "com.amazonaws.sfn#StateMachineLimitExceeded": - throw await de_StateMachineLimitExceededRes(parsedOutput, context); - case "StateMachineTypeNotSupported": - case "com.amazonaws.sfn#StateMachineTypeNotSupported": - throw await de_StateMachineTypeNotSupportedRes(parsedOutput, context); - case "TooManyTags": - case "com.amazonaws.sfn#TooManyTags": - throw await de_TooManyTagsRes(parsedOutput, context); - case "ValidationException": - case "com.amazonaws.sfn#ValidationException": - throw await de_ValidationExceptionRes(parsedOutput, context); - default: - const parsedBody = parsedOutput.body; - return throwDefaultError({ - output, - parsedBody, - errorCode - }); + } + __name(getSelectorName, "getSelectorName"); + var fromEnv = /* @__PURE__ */ __name((envVarSelector, logger) => async () => { + try { + const config = envVarSelector(process.env); + if (config === void 0) { + throw new Error(); + } + return config; + } catch (e) { + throw new import_property_provider2.CredentialsProviderError( + e.message || `Not found in ENV: ${getSelectorName(envVarSelector.toString())}`, + { logger } + ); + } + }, "fromEnv"); + var import_shared_ini_file_loader = require_dist_cjs64(); + var fromSharedConfigFiles = /* @__PURE__ */ __name((configSelector, { preferredFile = "config", ...init } = {}) => async () => { + const profile = (0, import_shared_ini_file_loader.getProfileName)(init); + const { configFile, credentialsFile } = await (0, import_shared_ini_file_loader.loadSharedConfigFiles)(init); + const profileFromCredentials = credentialsFile[profile] || {}; + const profileFromConfig = configFile[profile] || {}; + const mergedProfile = preferredFile === "config" ? { ...profileFromCredentials, ...profileFromConfig } : { ...profileFromConfig, ...profileFromCredentials }; + try { + const cfgFile = preferredFile === "config" ? configFile : credentialsFile; + const configValue = configSelector(mergedProfile, cfgFile); + if (configValue === void 0) { + throw new Error(); + } + return configValue; + } catch (e) { + throw new import_property_provider2.CredentialsProviderError( + e.message || `Not found in config files w/ profile [${profile}]: ${getSelectorName(configSelector.toString())}`, + { logger: init.logger } + ); } + }, "fromSharedConfigFiles"); + var isFunction = /* @__PURE__ */ __name((func) => typeof func === "function", "isFunction"); + var fromStatic = /* @__PURE__ */ __name((defaultValue) => isFunction(defaultValue) ? async () => await defaultValue() : (0, import_property_provider2.fromStatic)(defaultValue), "fromStatic"); + var loadConfig = /* @__PURE__ */ __name(({ environmentVariableSelector, configFileSelector, default: defaultValue }, configuration = {}) => (0, import_property_provider2.memoize)( + (0, import_property_provider2.chain)( + fromEnv(environmentVariableSelector), + fromSharedConfigFiles(configFileSelector, configuration), + fromStatic(defaultValue) + ) + ), "loadConfig"); + } +}); + +// ../../../node_modules/@smithy/util-defaults-mode-node/node_modules/@smithy/querystring-parser/dist-cjs/index.js +var require_dist_cjs66 = __commonJS({ + "../../../node_modules/@smithy/util-defaults-mode-node/node_modules/@smithy/querystring-parser/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all) => { + for (var name in all) + __defProp2(target, name, { get: all[name], enumerable: true }); }; - var de_CreateStateMachineAliasCommand = async (output, context) => { - if (output.statusCode >= 300) { - return de_CreateStateMachineAliasCommandError(output, context); + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); } - const data = await parseBody(output.body, context); - let contents = {}; - contents = de_CreateStateMachineAliasOutput(data, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; + return to; }; - exports2.de_CreateStateMachineAliasCommand = de_CreateStateMachineAliasCommand; - var de_CreateStateMachineAliasCommandError = async (output, context) => { - const parsedOutput = { - ...output, - body: await parseErrorBody(output.body, context) - }; - const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); - switch (errorCode) { - case "ConflictException": - case "com.amazonaws.sfn#ConflictException": - throw await de_ConflictExceptionRes(parsedOutput, context); - case "InvalidArn": - case "com.amazonaws.sfn#InvalidArn": - throw await de_InvalidArnRes(parsedOutput, context); - case "InvalidName": - case "com.amazonaws.sfn#InvalidName": - throw await de_InvalidNameRes(parsedOutput, context); - case "ResourceNotFound": - case "com.amazonaws.sfn#ResourceNotFound": - throw await de_ResourceNotFoundRes(parsedOutput, context); - case "ServiceQuotaExceededException": - case "com.amazonaws.sfn#ServiceQuotaExceededException": - throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context); - case "StateMachineDeleting": - case "com.amazonaws.sfn#StateMachineDeleting": - throw await de_StateMachineDeletingRes(parsedOutput, context); - case "ValidationException": - case "com.amazonaws.sfn#ValidationException": - throw await de_ValidationExceptionRes(parsedOutput, context); - default: - const parsedBody = parsedOutput.body; - return throwDefaultError({ - output, - parsedBody, - errorCode - }); + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + parseQueryString: () => parseQueryString + }); + module2.exports = __toCommonJS2(src_exports); + function parseQueryString(querystring) { + const query = {}; + querystring = querystring.replace(/^\?/, ""); + if (querystring) { + for (const pair of querystring.split("&")) { + let [key, value = null] = pair.split("="); + key = decodeURIComponent(key); + if (value) { + value = decodeURIComponent(value); + } + if (!(key in query)) { + query[key] = value; + } else if (Array.isArray(query[key])) { + query[key].push(value); + } else { + query[key] = [query[key], value]; + } + } } + return query; + } + __name(parseQueryString, "parseQueryString"); + } +}); + +// ../../../node_modules/@smithy/util-defaults-mode-node/node_modules/@smithy/url-parser/dist-cjs/index.js +var require_dist_cjs67 = __commonJS({ + "../../../node_modules/@smithy/util-defaults-mode-node/node_modules/@smithy/url-parser/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all) => { + for (var name in all) + __defProp2(target, name, { get: all[name], enumerable: true }); }; - var de_DeleteActivityCommand = async (output, context) => { - if (output.statusCode >= 300) { - return de_DeleteActivityCommandError(output, context); + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); } - const data = await parseBody(output.body, context); - let contents = {}; - contents = (0, smithy_client_1._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; + return to; }; - exports2.de_DeleteActivityCommand = de_DeleteActivityCommand; - var de_DeleteActivityCommandError = async (output, context) => { - const parsedOutput = { - ...output, - body: await parseErrorBody(output.body, context) - }; - const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); - switch (errorCode) { - case "InvalidArn": - case "com.amazonaws.sfn#InvalidArn": - throw await de_InvalidArnRes(parsedOutput, context); - default: - const parsedBody = parsedOutput.body; - return throwDefaultError({ - output, - parsedBody, - errorCode - }); + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + parseUrl: () => parseUrl + }); + module2.exports = __toCommonJS2(src_exports); + var import_querystring_parser = require_dist_cjs66(); + var parseUrl = /* @__PURE__ */ __name((url2) => { + if (typeof url2 === "string") { + return parseUrl(new URL(url2)); + } + const { hostname, pathname, port, protocol, search } = url2; + let query; + if (search) { + query = (0, import_querystring_parser.parseQueryString)(search); } + return { + hostname, + port: port ? parseInt(port) : void 0, + protocol, + path: pathname, + query + }; + }, "parseUrl"); + } +}); + +// ../../../node_modules/@smithy/util-defaults-mode-node/node_modules/@smithy/credential-provider-imds/dist-cjs/index.js +var require_dist_cjs68 = __commonJS({ + "../../../node_modules/@smithy/util-defaults-mode-node/node_modules/@smithy/credential-provider-imds/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all) => { + for (var name in all) + __defProp2(target, name, { get: all[name], enumerable: true }); }; - var de_DeleteStateMachineCommand = async (output, context) => { - if (output.statusCode >= 300) { - return de_DeleteStateMachineCommandError(output, context); + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); } - const data = await parseBody(output.body, context); - let contents = {}; - contents = (0, smithy_client_1._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; + return to; }; - exports2.de_DeleteStateMachineCommand = de_DeleteStateMachineCommand; - var de_DeleteStateMachineCommandError = async (output, context) => { - const parsedOutput = { - ...output, - body: await parseErrorBody(output.body, context) - }; - const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); - switch (errorCode) { - case "InvalidArn": - case "com.amazonaws.sfn#InvalidArn": - throw await de_InvalidArnRes(parsedOutput, context); - case "ValidationException": - case "com.amazonaws.sfn#ValidationException": - throw await de_ValidationExceptionRes(parsedOutput, context); - default: - const parsedBody = parsedOutput.body; - return throwDefaultError({ - output, - parsedBody, - errorCode + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + DEFAULT_MAX_RETRIES: () => DEFAULT_MAX_RETRIES, + DEFAULT_TIMEOUT: () => DEFAULT_TIMEOUT, + ENV_CMDS_AUTH_TOKEN: () => ENV_CMDS_AUTH_TOKEN, + ENV_CMDS_FULL_URI: () => ENV_CMDS_FULL_URI, + ENV_CMDS_RELATIVE_URI: () => ENV_CMDS_RELATIVE_URI, + Endpoint: () => Endpoint, + fromContainerMetadata: () => fromContainerMetadata, + fromInstanceMetadata: () => fromInstanceMetadata, + getInstanceMetadataEndpoint: () => getInstanceMetadataEndpoint, + httpRequest: () => httpRequest, + providerConfigFromInit: () => providerConfigFromInit + }); + module2.exports = __toCommonJS2(src_exports); + var import_url = require("url"); + var import_property_provider2 = require_dist_cjs63(); + var import_buffer = require("buffer"); + var import_http2 = require("http"); + function httpRequest(options) { + return new Promise((resolve, reject) => { + var _a; + const req = (0, import_http2.request)({ + method: "GET", + ...options, + // Node.js http module doesn't accept hostname with square brackets + // Refs: https://github.com/nodejs/node/issues/39738 + hostname: (_a = options.hostname) == null ? void 0 : _a.replace(/^\[(.+)\]$/, "$1") + }); + req.on("error", (err) => { + reject(Object.assign(new import_property_provider2.ProviderError("Unable to connect to instance metadata service"), err)); + req.destroy(); + }); + req.on("timeout", () => { + reject(new import_property_provider2.ProviderError("TimeoutError from instance metadata service")); + req.destroy(); + }); + req.on("response", (res) => { + const { statusCode = 400 } = res; + if (statusCode < 200 || 300 <= statusCode) { + reject( + Object.assign(new import_property_provider2.ProviderError("Error response received from instance metadata service"), { statusCode }) + ); + req.destroy(); + } + const chunks = []; + res.on("data", (chunk) => { + chunks.push(chunk); }); + res.on("end", () => { + resolve(import_buffer.Buffer.concat(chunks)); + req.destroy(); + }); + }); + req.end(); + }); + } + __name(httpRequest, "httpRequest"); + var isImdsCredentials = /* @__PURE__ */ __name((arg) => Boolean(arg) && typeof arg === "object" && typeof arg.AccessKeyId === "string" && typeof arg.SecretAccessKey === "string" && typeof arg.Token === "string" && typeof arg.Expiration === "string", "isImdsCredentials"); + var fromImdsCredentials = /* @__PURE__ */ __name((creds) => ({ + accessKeyId: creds.AccessKeyId, + secretAccessKey: creds.SecretAccessKey, + sessionToken: creds.Token, + expiration: new Date(creds.Expiration), + ...creds.AccountId && { accountId: creds.AccountId } + }), "fromImdsCredentials"); + var DEFAULT_TIMEOUT = 1e3; + var DEFAULT_MAX_RETRIES = 0; + var providerConfigFromInit = /* @__PURE__ */ __name(({ + maxRetries = DEFAULT_MAX_RETRIES, + timeout = DEFAULT_TIMEOUT + }) => ({ maxRetries, timeout }), "providerConfigFromInit"); + var retry = /* @__PURE__ */ __name((toRetry, maxRetries) => { + let promise = toRetry(); + for (let i = 0; i < maxRetries; i++) { + promise = promise.catch(toRetry); } - }; - var de_DeleteStateMachineAliasCommand = async (output, context) => { - if (output.statusCode >= 300) { - return de_DeleteStateMachineAliasCommandError(output, context); - } - const data = await parseBody(output.body, context); - let contents = {}; - contents = (0, smithy_client_1._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; - }; - exports2.de_DeleteStateMachineAliasCommand = de_DeleteStateMachineAliasCommand; - var de_DeleteStateMachineAliasCommandError = async (output, context) => { - const parsedOutput = { - ...output, - body: await parseErrorBody(output.body, context) - }; - const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); - switch (errorCode) { - case "ConflictException": - case "com.amazonaws.sfn#ConflictException": - throw await de_ConflictExceptionRes(parsedOutput, context); - case "InvalidArn": - case "com.amazonaws.sfn#InvalidArn": - throw await de_InvalidArnRes(parsedOutput, context); - case "ResourceNotFound": - case "com.amazonaws.sfn#ResourceNotFound": - throw await de_ResourceNotFoundRes(parsedOutput, context); - case "ValidationException": - case "com.amazonaws.sfn#ValidationException": - throw await de_ValidationExceptionRes(parsedOutput, context); - default: - const parsedBody = parsedOutput.body; - return throwDefaultError({ - output, - parsedBody, - errorCode + return promise; + }, "retry"); + var ENV_CMDS_FULL_URI = "AWS_CONTAINER_CREDENTIALS_FULL_URI"; + var ENV_CMDS_RELATIVE_URI = "AWS_CONTAINER_CREDENTIALS_RELATIVE_URI"; + var ENV_CMDS_AUTH_TOKEN = "AWS_CONTAINER_AUTHORIZATION_TOKEN"; + var fromContainerMetadata = /* @__PURE__ */ __name((init = {}) => { + const { timeout, maxRetries } = providerConfigFromInit(init); + return () => retry(async () => { + const requestOptions = await getCmdsUri({ logger: init.logger }); + const credsResponse = JSON.parse(await requestFromEcsImds(timeout, requestOptions)); + if (!isImdsCredentials(credsResponse)) { + throw new import_property_provider2.CredentialsProviderError("Invalid response received from instance metadata service.", { + logger: init.logger }); + } + return fromImdsCredentials(credsResponse); + }, maxRetries); + }, "fromContainerMetadata"); + var requestFromEcsImds = /* @__PURE__ */ __name(async (timeout, options) => { + if (process.env[ENV_CMDS_AUTH_TOKEN]) { + options.headers = { + ...options.headers, + Authorization: process.env[ENV_CMDS_AUTH_TOKEN] + }; } + const buffer = await httpRequest({ + ...options, + timeout + }); + return buffer.toString(); + }, "requestFromEcsImds"); + var CMDS_IP = "169.254.170.2"; + var GREENGRASS_HOSTS = { + localhost: true, + "127.0.0.1": true }; - var de_DeleteStateMachineVersionCommand = async (output, context) => { - if (output.statusCode >= 300) { - return de_DeleteStateMachineVersionCommandError(output, context); - } - const data = await parseBody(output.body, context); - let contents = {}; - contents = (0, smithy_client_1._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; + var GREENGRASS_PROTOCOLS = { + "http:": true, + "https:": true }; - exports2.de_DeleteStateMachineVersionCommand = de_DeleteStateMachineVersionCommand; - var de_DeleteStateMachineVersionCommandError = async (output, context) => { - const parsedOutput = { - ...output, - body: await parseErrorBody(output.body, context) - }; - const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); - switch (errorCode) { - case "ConflictException": - case "com.amazonaws.sfn#ConflictException": - throw await de_ConflictExceptionRes(parsedOutput, context); - case "InvalidArn": - case "com.amazonaws.sfn#InvalidArn": - throw await de_InvalidArnRes(parsedOutput, context); - case "ValidationException": - case "com.amazonaws.sfn#ValidationException": - throw await de_ValidationExceptionRes(parsedOutput, context); - default: - const parsedBody = parsedOutput.body; - return throwDefaultError({ - output, - parsedBody, - errorCode + var getCmdsUri = /* @__PURE__ */ __name(async ({ logger }) => { + if (process.env[ENV_CMDS_RELATIVE_URI]) { + return { + hostname: CMDS_IP, + path: process.env[ENV_CMDS_RELATIVE_URI] + }; + } + if (process.env[ENV_CMDS_FULL_URI]) { + const parsed = (0, import_url.parse)(process.env[ENV_CMDS_FULL_URI]); + if (!parsed.hostname || !(parsed.hostname in GREENGRASS_HOSTS)) { + throw new import_property_provider2.CredentialsProviderError(`${parsed.hostname} is not a valid container metadata service hostname`, { + tryNextLink: false, + logger + }); + } + if (!parsed.protocol || !(parsed.protocol in GREENGRASS_PROTOCOLS)) { + throw new import_property_provider2.CredentialsProviderError(`${parsed.protocol} is not a valid container metadata service protocol`, { + tryNextLink: false, + logger }); + } + return { + ...parsed, + port: parsed.port ? parseInt(parsed.port, 10) : void 0 + }; + } + throw new import_property_provider2.CredentialsProviderError( + `The container metadata credential provider cannot be used unless the ${ENV_CMDS_RELATIVE_URI} or ${ENV_CMDS_FULL_URI} environment variable is set`, + { + tryNextLink: false, + logger + } + ); + }, "getCmdsUri"); + var _InstanceMetadataV1FallbackError = class _InstanceMetadataV1FallbackError2 extends import_property_provider2.CredentialsProviderError { + constructor(message, tryNextLink = true) { + super(message, tryNextLink); + this.tryNextLink = tryNextLink; + this.name = "InstanceMetadataV1FallbackError"; + Object.setPrototypeOf(this, _InstanceMetadataV1FallbackError2.prototype); } }; - var de_DescribeActivityCommand = async (output, context) => { - if (output.statusCode >= 300) { - return de_DescribeActivityCommandError(output, context); + __name(_InstanceMetadataV1FallbackError, "InstanceMetadataV1FallbackError"); + var InstanceMetadataV1FallbackError = _InstanceMetadataV1FallbackError; + var import_node_config_provider = require_dist_cjs65(); + var import_url_parser = require_dist_cjs67(); + var Endpoint = /* @__PURE__ */ ((Endpoint2) => { + Endpoint2["IPv4"] = "http://169.254.169.254"; + Endpoint2["IPv6"] = "http://[fd00:ec2::254]"; + return Endpoint2; + })(Endpoint || {}); + var ENV_ENDPOINT_NAME = "AWS_EC2_METADATA_SERVICE_ENDPOINT"; + var CONFIG_ENDPOINT_NAME = "ec2_metadata_service_endpoint"; + var ENDPOINT_CONFIG_OPTIONS = { + environmentVariableSelector: (env) => env[ENV_ENDPOINT_NAME], + configFileSelector: (profile) => profile[CONFIG_ENDPOINT_NAME], + default: void 0 + }; + var EndpointMode = /* @__PURE__ */ ((EndpointMode2) => { + EndpointMode2["IPv4"] = "IPv4"; + EndpointMode2["IPv6"] = "IPv6"; + return EndpointMode2; + })(EndpointMode || {}); + var ENV_ENDPOINT_MODE_NAME = "AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE"; + var CONFIG_ENDPOINT_MODE_NAME = "ec2_metadata_service_endpoint_mode"; + var ENDPOINT_MODE_CONFIG_OPTIONS = { + environmentVariableSelector: (env) => env[ENV_ENDPOINT_MODE_NAME], + configFileSelector: (profile) => profile[CONFIG_ENDPOINT_MODE_NAME], + default: "IPv4" + /* IPv4 */ + }; + var getInstanceMetadataEndpoint = /* @__PURE__ */ __name(async () => (0, import_url_parser.parseUrl)(await getFromEndpointConfig() || await getFromEndpointModeConfig()), "getInstanceMetadataEndpoint"); + var getFromEndpointConfig = /* @__PURE__ */ __name(async () => (0, import_node_config_provider.loadConfig)(ENDPOINT_CONFIG_OPTIONS)(), "getFromEndpointConfig"); + var getFromEndpointModeConfig = /* @__PURE__ */ __name(async () => { + const endpointMode = await (0, import_node_config_provider.loadConfig)(ENDPOINT_MODE_CONFIG_OPTIONS)(); + switch (endpointMode) { + case "IPv4": + return "http://169.254.169.254"; + case "IPv6": + return "http://[fd00:ec2::254]"; + default: + throw new Error(`Unsupported endpoint mode: ${endpointMode}. Select from ${Object.values(EndpointMode)}`); } - const data = await parseBody(output.body, context); - let contents = {}; - contents = de_DescribeActivityOutput(data, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents + }, "getFromEndpointModeConfig"); + var STATIC_STABILITY_REFRESH_INTERVAL_SECONDS = 5 * 60; + var STATIC_STABILITY_REFRESH_INTERVAL_JITTER_WINDOW_SECONDS = 5 * 60; + var STATIC_STABILITY_DOC_URL = "https://docs.aws.amazon.com/sdkref/latest/guide/feature-static-credentials.html"; + var getExtendedInstanceMetadataCredentials = /* @__PURE__ */ __name((credentials, logger) => { + const refreshInterval = STATIC_STABILITY_REFRESH_INTERVAL_SECONDS + Math.floor(Math.random() * STATIC_STABILITY_REFRESH_INTERVAL_JITTER_WINDOW_SECONDS); + const newExpiration = new Date(Date.now() + refreshInterval * 1e3); + logger.warn( + `Attempting credential expiration extension due to a credential service availability issue. A refresh of these credentials will be attempted after ${new Date(newExpiration)}. +For more information, please visit: ` + STATIC_STABILITY_DOC_URL + ); + const originalExpiration = credentials.originalExpiration ?? credentials.expiration; + return { + ...credentials, + ...originalExpiration ? { originalExpiration } : {}, + expiration: newExpiration }; - return response; - }; - exports2.de_DescribeActivityCommand = de_DescribeActivityCommand; - var de_DescribeActivityCommandError = async (output, context) => { - const parsedOutput = { - ...output, - body: await parseErrorBody(output.body, context) + }, "getExtendedInstanceMetadataCredentials"); + var staticStabilityProvider = /* @__PURE__ */ __name((provider, options = {}) => { + const logger = (options == null ? void 0 : options.logger) || console; + let pastCredentials; + return async () => { + let credentials; + try { + credentials = await provider(); + if (credentials.expiration && credentials.expiration.getTime() < Date.now()) { + credentials = getExtendedInstanceMetadataCredentials(credentials, logger); + } + } catch (e) { + if (pastCredentials) { + logger.warn("Credential renew failed: ", e); + credentials = getExtendedInstanceMetadataCredentials(pastCredentials, logger); + } else { + throw e; + } + } + pastCredentials = credentials; + return credentials; }; - const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); - switch (errorCode) { - case "ActivityDoesNotExist": - case "com.amazonaws.sfn#ActivityDoesNotExist": - throw await de_ActivityDoesNotExistRes(parsedOutput, context); - case "InvalidArn": - case "com.amazonaws.sfn#InvalidArn": - throw await de_InvalidArnRes(parsedOutput, context); - default: - const parsedBody = parsedOutput.body; - return throwDefaultError({ - output, - parsedBody, - errorCode + }, "staticStabilityProvider"); + var IMDS_PATH = "/latest/meta-data/iam/security-credentials/"; + var IMDS_TOKEN_PATH = "/latest/api/token"; + var AWS_EC2_METADATA_V1_DISABLED = "AWS_EC2_METADATA_V1_DISABLED"; + var PROFILE_AWS_EC2_METADATA_V1_DISABLED = "ec2_metadata_v1_disabled"; + var X_AWS_EC2_METADATA_TOKEN = "x-aws-ec2-metadata-token"; + var fromInstanceMetadata = /* @__PURE__ */ __name((init = {}) => staticStabilityProvider(getInstanceMetadataProvider(init), { logger: init.logger }), "fromInstanceMetadata"); + var getInstanceMetadataProvider = /* @__PURE__ */ __name((init = {}) => { + let disableFetchToken = false; + const { logger, profile } = init; + const { timeout, maxRetries } = providerConfigFromInit(init); + const getCredentials = /* @__PURE__ */ __name(async (maxRetries2, options) => { + var _a; + const isImdsV1Fallback = disableFetchToken || ((_a = options.headers) == null ? void 0 : _a[X_AWS_EC2_METADATA_TOKEN]) == null; + if (isImdsV1Fallback) { + let fallbackBlockedFromProfile = false; + let fallbackBlockedFromProcessEnv = false; + const configValue = await (0, import_node_config_provider.loadConfig)( + { + environmentVariableSelector: (env) => { + const envValue = env[AWS_EC2_METADATA_V1_DISABLED]; + fallbackBlockedFromProcessEnv = !!envValue && envValue !== "false"; + if (envValue === void 0) { + throw new import_property_provider2.CredentialsProviderError( + `${AWS_EC2_METADATA_V1_DISABLED} not set in env, checking config file next.`, + { logger: init.logger } + ); + } + return fallbackBlockedFromProcessEnv; + }, + configFileSelector: (profile2) => { + const profileValue = profile2[PROFILE_AWS_EC2_METADATA_V1_DISABLED]; + fallbackBlockedFromProfile = !!profileValue && profileValue !== "false"; + return fallbackBlockedFromProfile; + }, + default: false + }, + { + profile + } + )(); + if (init.ec2MetadataV1Disabled || configValue) { + const causes = []; + if (init.ec2MetadataV1Disabled) + causes.push("credential provider initialization (runtime option ec2MetadataV1Disabled)"); + if (fallbackBlockedFromProfile) + causes.push(`config file profile (${PROFILE_AWS_EC2_METADATA_V1_DISABLED})`); + if (fallbackBlockedFromProcessEnv) + causes.push(`process environment variable (${AWS_EC2_METADATA_V1_DISABLED})`); + throw new InstanceMetadataV1FallbackError( + `AWS EC2 Metadata v1 fallback has been blocked by AWS SDK configuration in the following: [${causes.join( + ", " + )}].` + ); + } + } + const imdsProfile = (await retry(async () => { + let profile2; + try { + profile2 = await getProfile(options); + } catch (err) { + if (err.statusCode === 401) { + disableFetchToken = false; + } + throw err; + } + return profile2; + }, maxRetries2)).trim(); + return retry(async () => { + let creds; + try { + creds = await getCredentialsFromProfile(imdsProfile, options, init); + } catch (err) { + if (err.statusCode === 401) { + disableFetchToken = false; + } + throw err; + } + return creds; + }, maxRetries2); + }, "getCredentials"); + return async () => { + const endpoint = await getInstanceMetadataEndpoint(); + if (disableFetchToken) { + logger == null ? void 0 : logger.debug("AWS SDK Instance Metadata", "using v1 fallback (no token fetch)"); + return getCredentials(maxRetries, { ...endpoint, timeout }); + } else { + let token; + try { + token = (await getMetadataToken({ ...endpoint, timeout })).toString(); + } catch (error) { + if ((error == null ? void 0 : error.statusCode) === 400) { + throw Object.assign(error, { + message: "EC2 Metadata token request returned error" + }); + } else if (error.message === "TimeoutError" || [403, 404, 405].includes(error.statusCode)) { + disableFetchToken = true; + } + logger == null ? void 0 : logger.debug("AWS SDK Instance Metadata", "using v1 fallback (initial)"); + return getCredentials(maxRetries, { ...endpoint, timeout }); + } + return getCredentials(maxRetries, { + ...endpoint, + headers: { + [X_AWS_EC2_METADATA_TOKEN]: token + }, + timeout }); + } + }; + }, "getInstanceMetadataProvider"); + var getMetadataToken = /* @__PURE__ */ __name(async (options) => httpRequest({ + ...options, + path: IMDS_TOKEN_PATH, + method: "PUT", + headers: { + "x-aws-ec2-metadata-token-ttl-seconds": "21600" + } + }), "getMetadataToken"); + var getProfile = /* @__PURE__ */ __name(async (options) => (await httpRequest({ ...options, path: IMDS_PATH })).toString(), "getProfile"); + var getCredentialsFromProfile = /* @__PURE__ */ __name(async (profile, options, init) => { + const credentialsResponse = JSON.parse( + (await httpRequest({ + ...options, + path: IMDS_PATH + profile + })).toString() + ); + if (!isImdsCredentials(credentialsResponse)) { + throw new import_property_provider2.CredentialsProviderError("Invalid response received from instance metadata service.", { + logger: init.logger + }); } + return fromImdsCredentials(credentialsResponse); + }, "getCredentialsFromProfile"); + } +}); + +// ../../../node_modules/@smithy/util-defaults-mode-node/dist-cjs/index.js +var require_dist_cjs69 = __commonJS({ + "../../../node_modules/@smithy/util-defaults-mode-node/dist-cjs/index.js"(exports2, module2) { + var __create2 = Object.create; + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __getProtoOf2 = Object.getPrototypeOf; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all) => { + for (var name in all) + __defProp2(target, name, { get: all[name], enumerable: true }); }; - var de_DescribeExecutionCommand = async (output, context) => { - if (output.statusCode >= 300) { - return de_DescribeExecutionCommandError(output, context); + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); } - const data = await parseBody(output.body, context); - let contents = {}; - contents = de_DescribeExecutionOutput(data, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; + return to; }; - exports2.de_DescribeExecutionCommand = de_DescribeExecutionCommand; - var de_DescribeExecutionCommandError = async (output, context) => { - const parsedOutput = { - ...output, - body: await parseErrorBody(output.body, context) - }; - const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); - switch (errorCode) { - case "ExecutionDoesNotExist": - case "com.amazonaws.sfn#ExecutionDoesNotExist": - throw await de_ExecutionDoesNotExistRes(parsedOutput, context); - case "InvalidArn": - case "com.amazonaws.sfn#InvalidArn": - throw await de_InvalidArnRes(parsedOutput, context); + var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target, + mod + )); + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + resolveDefaultsModeConfig: () => resolveDefaultsModeConfig + }); + module2.exports = __toCommonJS2(src_exports); + var import_config_resolver = require_dist_cjs62(); + var import_node_config_provider = require_dist_cjs65(); + var import_property_provider2 = require_dist_cjs63(); + var AWS_EXECUTION_ENV = "AWS_EXECUTION_ENV"; + var AWS_REGION_ENV = "AWS_REGION"; + var AWS_DEFAULT_REGION_ENV = "AWS_DEFAULT_REGION"; + var ENV_IMDS_DISABLED = "AWS_EC2_METADATA_DISABLED"; + var DEFAULTS_MODE_OPTIONS = ["in-region", "cross-region", "mobile", "standard", "legacy"]; + var IMDS_REGION_PATH = "/latest/meta-data/placement/region"; + var AWS_DEFAULTS_MODE_ENV = "AWS_DEFAULTS_MODE"; + var AWS_DEFAULTS_MODE_CONFIG = "defaults_mode"; + var NODE_DEFAULTS_MODE_CONFIG_OPTIONS = { + environmentVariableSelector: (env) => { + return env[AWS_DEFAULTS_MODE_ENV]; + }, + configFileSelector: (profile) => { + return profile[AWS_DEFAULTS_MODE_CONFIG]; + }, + default: "legacy" + }; + var resolveDefaultsModeConfig = /* @__PURE__ */ __name(({ + region = (0, import_node_config_provider.loadConfig)(import_config_resolver.NODE_REGION_CONFIG_OPTIONS), + defaultsMode = (0, import_node_config_provider.loadConfig)(NODE_DEFAULTS_MODE_CONFIG_OPTIONS) + } = {}) => (0, import_property_provider2.memoize)(async () => { + const mode = typeof defaultsMode === "function" ? await defaultsMode() : defaultsMode; + switch (mode == null ? void 0 : mode.toLowerCase()) { + case "auto": + return resolveNodeDefaultsModeAuto(region); + case "in-region": + case "cross-region": + case "mobile": + case "standard": + case "legacy": + return Promise.resolve(mode == null ? void 0 : mode.toLocaleLowerCase()); + case void 0: + return Promise.resolve("legacy"); default: - const parsedBody = parsedOutput.body; - return throwDefaultError({ - output, - parsedBody, - errorCode - }); + throw new Error( + `Invalid parameter for "defaultsMode", expect ${DEFAULTS_MODE_OPTIONS.join(", ")}, got ${mode}` + ); } - }; - var de_DescribeMapRunCommand = async (output, context) => { - if (output.statusCode >= 300) { - return de_DescribeMapRunCommandError(output, context); + }), "resolveDefaultsModeConfig"); + var resolveNodeDefaultsModeAuto = /* @__PURE__ */ __name(async (clientRegion) => { + if (clientRegion) { + const resolvedRegion = typeof clientRegion === "function" ? await clientRegion() : clientRegion; + const inferredRegion = await inferPhysicalRegion(); + if (!inferredRegion) { + return "standard"; + } + if (resolvedRegion === inferredRegion) { + return "in-region"; + } else { + return "cross-region"; + } } - const data = await parseBody(output.body, context); - let contents = {}; - contents = de_DescribeMapRunOutput(data, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; - }; - exports2.de_DescribeMapRunCommand = de_DescribeMapRunCommand; - var de_DescribeMapRunCommandError = async (output, context) => { - const parsedOutput = { - ...output, - body: await parseErrorBody(output.body, context) - }; - const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); - switch (errorCode) { - case "InvalidArn": - case "com.amazonaws.sfn#InvalidArn": - throw await de_InvalidArnRes(parsedOutput, context); - case "ResourceNotFound": - case "com.amazonaws.sfn#ResourceNotFound": - throw await de_ResourceNotFoundRes(parsedOutput, context); - default: - const parsedBody = parsedOutput.body; - return throwDefaultError({ - output, - parsedBody, - errorCode - }); + return "standard"; + }, "resolveNodeDefaultsModeAuto"); + var inferPhysicalRegion = /* @__PURE__ */ __name(async () => { + if (process.env[AWS_EXECUTION_ENV] && (process.env[AWS_REGION_ENV] || process.env[AWS_DEFAULT_REGION_ENV])) { + return process.env[AWS_REGION_ENV] ?? process.env[AWS_DEFAULT_REGION_ENV]; } - }; - var de_DescribeStateMachineCommand = async (output, context) => { - if (output.statusCode >= 300) { - return de_DescribeStateMachineCommandError(output, context); + if (!process.env[ENV_IMDS_DISABLED]) { + try { + const { getInstanceMetadataEndpoint, httpRequest } = await Promise.resolve().then(() => __toESM2(require_dist_cjs68())); + const endpoint = await getInstanceMetadataEndpoint(); + return (await httpRequest({ ...endpoint, path: IMDS_REGION_PATH })).toString(); + } catch (e) { + } } - const data = await parseBody(output.body, context); - let contents = {}; - contents = de_DescribeStateMachineOutput(data, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents + }, "inferPhysicalRegion"); + } +}); + +// ../../../node_modules/@aws-sdk/client-sso/dist-cjs/runtimeConfig.js +var require_runtimeConfig = __commonJS({ + "../../../node_modules/@aws-sdk/client-sso/dist-cjs/runtimeConfig.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getRuntimeConfig = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var package_json_1 = tslib_1.__importDefault(require_package2()); + var core_1 = (init_dist_es2(), __toCommonJS(dist_es_exports2)); + var util_user_agent_node_1 = require_dist_cjs56(); + var config_resolver_1 = require_dist_cjs11(); + var hash_node_1 = require_dist_cjs57(); + var middleware_retry_1 = require_dist_cjs38(); + var node_config_provider_1 = require_dist_cjs42(); + var node_http_handler_1 = require_dist_cjs51(); + var util_body_length_node_1 = require_dist_cjs58(); + var util_retry_1 = require_dist_cjs60(); + var runtimeConfig_shared_1 = require_runtimeConfig_shared(); + var smithy_client_1 = require_dist_cjs37(); + var util_defaults_mode_node_1 = require_dist_cjs69(); + var smithy_client_2 = require_dist_cjs37(); + var getRuntimeConfig = (config) => { + (0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version); + const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config); + const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode); + const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config); + (0, core_1.emitWarningIfUnsupportedVersion)(process.version); + return { + ...clientSharedValues, + ...config, + runtime: "node", + defaultsMode, + bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength, + defaultUserAgentProvider: config?.defaultUserAgentProvider ?? (0, util_user_agent_node_1.defaultUserAgent)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }), + maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS), + region: config?.region ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS), + requestHandler: node_http_handler_1.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider), + retryMode: config?.retryMode ?? (0, node_config_provider_1.loadConfig)({ + ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS, + default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE + }), + sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, "sha256"), + streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS) }; - return response; }; - exports2.de_DescribeStateMachineCommand = de_DescribeStateMachineCommand; - var de_DescribeStateMachineCommandError = async (output, context) => { - const parsedOutput = { - ...output, - body: await parseErrorBody(output.body, context) - }; - const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); - switch (errorCode) { - case "InvalidArn": - case "com.amazonaws.sfn#InvalidArn": - throw await de_InvalidArnRes(parsedOutput, context); - case "StateMachineDoesNotExist": - case "com.amazonaws.sfn#StateMachineDoesNotExist": - throw await de_StateMachineDoesNotExistRes(parsedOutput, context); - default: - const parsedBody = parsedOutput.body; - return throwDefaultError({ - output, - parsedBody, - errorCode - }); - } + exports2.getRuntimeConfig = getRuntimeConfig; + } +}); + +// ../../../node_modules/@aws-sdk/region-config-resolver/dist-cjs/index.js +var require_dist_cjs70 = __commonJS({ + "../../../node_modules/@aws-sdk/region-config-resolver/dist-cjs/index.js"(exports2, module2) { + "use strict"; + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all) => { + for (var name in all) + __defProp2(target, name, { get: all[name], enumerable: true }); }; - var de_DescribeStateMachineAliasCommand = async (output, context) => { - if (output.statusCode >= 300) { - return de_DescribeStateMachineAliasCommandError(output, context); + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); } - const data = await parseBody(output.body, context); - let contents = {}; - contents = de_DescribeStateMachineAliasOutput(data, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; + return to; }; - exports2.de_DescribeStateMachineAliasCommand = de_DescribeStateMachineAliasCommand; - var de_DescribeStateMachineAliasCommandError = async (output, context) => { - const parsedOutput = { - ...output, - body: await parseErrorBody(output.body, context) + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + NODE_REGION_CONFIG_FILE_OPTIONS: () => NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS: () => NODE_REGION_CONFIG_OPTIONS, + REGION_ENV_NAME: () => REGION_ENV_NAME, + REGION_INI_NAME: () => REGION_INI_NAME, + getAwsRegionExtensionConfiguration: () => getAwsRegionExtensionConfiguration, + resolveAwsRegionExtensionConfiguration: () => resolveAwsRegionExtensionConfiguration, + resolveRegionConfig: () => resolveRegionConfig + }); + module2.exports = __toCommonJS2(src_exports); + var getAwsRegionExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => { + let runtimeConfigRegion = /* @__PURE__ */ __name(async () => { + if (runtimeConfig.region === void 0) { + throw new Error("Region is missing from runtimeConfig"); + } + const region = runtimeConfig.region; + if (typeof region === "string") { + return region; + } + return region(); + }, "runtimeConfigRegion"); + return { + setRegion(region) { + runtimeConfigRegion = region; + }, + region() { + return runtimeConfigRegion; + } }; - const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); - switch (errorCode) { - case "InvalidArn": - case "com.amazonaws.sfn#InvalidArn": - throw await de_InvalidArnRes(parsedOutput, context); - case "ResourceNotFound": - case "com.amazonaws.sfn#ResourceNotFound": - throw await de_ResourceNotFoundRes(parsedOutput, context); - case "ValidationException": - case "com.amazonaws.sfn#ValidationException": - throw await de_ValidationExceptionRes(parsedOutput, context); - default: - const parsedBody = parsedOutput.body; - return throwDefaultError({ - output, - parsedBody, - errorCode - }); + }, "getAwsRegionExtensionConfiguration"); + var resolveAwsRegionExtensionConfiguration = /* @__PURE__ */ __name((awsRegionExtensionConfiguration) => { + return { + region: awsRegionExtensionConfiguration.region() + }; + }, "resolveAwsRegionExtensionConfiguration"); + var REGION_ENV_NAME = "AWS_REGION"; + var REGION_INI_NAME = "region"; + var NODE_REGION_CONFIG_OPTIONS = { + environmentVariableSelector: (env) => env[REGION_ENV_NAME], + configFileSelector: (profile) => profile[REGION_INI_NAME], + default: () => { + throw new Error("Region is missing"); } }; - var de_DescribeStateMachineForExecutionCommand = async (output, context) => { - if (output.statusCode >= 300) { - return de_DescribeStateMachineForExecutionCommandError(output, context); + var NODE_REGION_CONFIG_FILE_OPTIONS = { + preferredFile: "credentials" + }; + var isFipsRegion = /* @__PURE__ */ __name((region) => typeof region === "string" && (region.startsWith("fips-") || region.endsWith("-fips")), "isFipsRegion"); + var getRealRegion = /* @__PURE__ */ __name((region) => isFipsRegion(region) ? ["fips-aws-global", "aws-fips"].includes(region) ? "us-east-1" : region.replace(/fips-(dkr-|prod-)?|-fips/, "") : region, "getRealRegion"); + var resolveRegionConfig = /* @__PURE__ */ __name((input) => { + const { region, useFipsEndpoint } = input; + if (!region) { + throw new Error("Region is missing"); } - const data = await parseBody(output.body, context); - let contents = {}; - contents = de_DescribeStateMachineForExecutionOutput(data, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents + return { + ...input, + region: async () => { + if (typeof region === "string") { + return getRealRegion(region); + } + const providedRegion = await region(); + return getRealRegion(providedRegion); + }, + useFipsEndpoint: async () => { + const providedRegion = typeof region === "string" ? region : await region(); + if (isFipsRegion(providedRegion)) { + return true; + } + return typeof useFipsEndpoint !== "function" ? Promise.resolve(!!useFipsEndpoint) : useFipsEndpoint(); + } }; - return response; + }, "resolveRegionConfig"); + } +}); + +// ../../../node_modules/@aws-sdk/client-sso/dist-cjs/index.js +var require_dist_cjs71 = __commonJS({ + "../../../node_modules/@aws-sdk/client-sso/dist-cjs/index.js"(exports2, module2) { + "use strict"; + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all) => { + for (var name in all) + __defProp2(target, name, { get: all[name], enumerable: true }); }; - exports2.de_DescribeStateMachineForExecutionCommand = de_DescribeStateMachineForExecutionCommand; - var de_DescribeStateMachineForExecutionCommandError = async (output, context) => { - const parsedOutput = { - ...output, - body: await parseErrorBody(output.body, context) - }; - const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); - switch (errorCode) { - case "ExecutionDoesNotExist": - case "com.amazonaws.sfn#ExecutionDoesNotExist": - throw await de_ExecutionDoesNotExistRes(parsedOutput, context); - case "InvalidArn": - case "com.amazonaws.sfn#InvalidArn": - throw await de_InvalidArnRes(parsedOutput, context); - default: - const parsedBody = parsedOutput.body; - return throwDefaultError({ - output, - parsedBody, - errorCode - }); + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); } + return to; }; - var de_GetActivityTaskCommand = async (output, context) => { - if (output.statusCode >= 300) { - return de_GetActivityTaskCommandError(output, context); - } - const data = await parseBody(output.body, context); - let contents = {}; - contents = (0, smithy_client_1._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + GetRoleCredentialsCommand: () => GetRoleCredentialsCommand, + GetRoleCredentialsRequestFilterSensitiveLog: () => GetRoleCredentialsRequestFilterSensitiveLog, + GetRoleCredentialsResponseFilterSensitiveLog: () => GetRoleCredentialsResponseFilterSensitiveLog, + InvalidRequestException: () => InvalidRequestException, + ListAccountRolesCommand: () => ListAccountRolesCommand, + ListAccountRolesRequestFilterSensitiveLog: () => ListAccountRolesRequestFilterSensitiveLog, + ListAccountsCommand: () => ListAccountsCommand, + ListAccountsRequestFilterSensitiveLog: () => ListAccountsRequestFilterSensitiveLog, + LogoutCommand: () => LogoutCommand, + LogoutRequestFilterSensitiveLog: () => LogoutRequestFilterSensitiveLog, + ResourceNotFoundException: () => ResourceNotFoundException, + RoleCredentialsFilterSensitiveLog: () => RoleCredentialsFilterSensitiveLog, + SSO: () => SSO, + SSOClient: () => SSOClient, + SSOServiceException: () => SSOServiceException, + TooManyRequestsException: () => TooManyRequestsException, + UnauthorizedException: () => UnauthorizedException, + __Client: () => import_smithy_client5.Client, + paginateListAccountRoles: () => paginateListAccountRoles, + paginateListAccounts: () => paginateListAccounts + }); + module2.exports = __toCommonJS2(src_exports); + var import_middleware_host_header = require_dist_cjs3(); + var import_middleware_logger = require_dist_cjs4(); + var import_middleware_recursion_detection = require_dist_cjs5(); + var import_middleware_user_agent = require_dist_cjs8(); + var import_config_resolver = require_dist_cjs11(); + var import_core3 = (init_dist_es(), __toCommonJS(dist_es_exports)); + var import_middleware_content_length = require_dist_cjs39(); + var import_middleware_endpoint2 = require_dist_cjs46(); + var import_middleware_retry2 = require_dist_cjs38(); + var import_httpAuthSchemeProvider = require_httpAuthSchemeProvider2(); + var resolveClientEndpointParameters = /* @__PURE__ */ __name((options) => { + return { + ...options, + useDualstackEndpoint: options.useDualstackEndpoint ?? false, + useFipsEndpoint: options.useFipsEndpoint ?? false, + defaultSigningName: "awsssoportal" }; - return response; - }; - exports2.de_GetActivityTaskCommand = de_GetActivityTaskCommand; - var de_GetActivityTaskCommandError = async (output, context) => { - const parsedOutput = { - ...output, - body: await parseErrorBody(output.body, context) + }, "resolveClientEndpointParameters"); + var commonParams = { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" } + }; + var import_runtimeConfig = require_runtimeConfig(); + var import_region_config_resolver = require_dist_cjs70(); + var import_protocol_http8 = require_dist_cjs2(); + var import_smithy_client5 = require_dist_cjs37(); + var getHttpAuthExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => { + const _httpAuthSchemes = runtimeConfig.httpAuthSchemes; + let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider; + let _credentials = runtimeConfig.credentials; + return { + setHttpAuthScheme(httpAuthScheme) { + const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId); + if (index === -1) { + _httpAuthSchemes.push(httpAuthScheme); + } else { + _httpAuthSchemes.splice(index, 1, httpAuthScheme); + } + }, + httpAuthSchemes() { + return _httpAuthSchemes; + }, + setHttpAuthSchemeProvider(httpAuthSchemeProvider) { + _httpAuthSchemeProvider = httpAuthSchemeProvider; + }, + httpAuthSchemeProvider() { + return _httpAuthSchemeProvider; + }, + setCredentials(credentials) { + _credentials = credentials; + }, + credentials() { + return _credentials; + } }; - const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); - switch (errorCode) { - case "ActivityDoesNotExist": - case "com.amazonaws.sfn#ActivityDoesNotExist": - throw await de_ActivityDoesNotExistRes(parsedOutput, context); - case "ActivityWorkerLimitExceeded": - case "com.amazonaws.sfn#ActivityWorkerLimitExceeded": - throw await de_ActivityWorkerLimitExceededRes(parsedOutput, context); - case "InvalidArn": - case "com.amazonaws.sfn#InvalidArn": - throw await de_InvalidArnRes(parsedOutput, context); - default: - const parsedBody = parsedOutput.body; - return throwDefaultError({ - output, - parsedBody, - errorCode - }); + }, "getHttpAuthExtensionConfiguration"); + var resolveHttpAuthRuntimeConfig = /* @__PURE__ */ __name((config) => { + return { + httpAuthSchemes: config.httpAuthSchemes(), + httpAuthSchemeProvider: config.httpAuthSchemeProvider(), + credentials: config.credentials() + }; + }, "resolveHttpAuthRuntimeConfig"); + var asPartial = /* @__PURE__ */ __name((t) => t, "asPartial"); + var resolveRuntimeExtensions = /* @__PURE__ */ __name((runtimeConfig, extensions) => { + const extensionConfiguration = { + ...asPartial((0, import_region_config_resolver.getAwsRegionExtensionConfiguration)(runtimeConfig)), + ...asPartial((0, import_smithy_client5.getDefaultExtensionConfiguration)(runtimeConfig)), + ...asPartial((0, import_protocol_http8.getHttpHandlerExtensionConfiguration)(runtimeConfig)), + ...asPartial(getHttpAuthExtensionConfiguration(runtimeConfig)) + }; + extensions.forEach((extension) => extension.configure(extensionConfiguration)); + return { + ...runtimeConfig, + ...(0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration), + ...(0, import_smithy_client5.resolveDefaultRuntimeConfig)(extensionConfiguration), + ...(0, import_protocol_http8.resolveHttpHandlerRuntimeConfig)(extensionConfiguration), + ...resolveHttpAuthRuntimeConfig(extensionConfiguration) + }; + }, "resolveRuntimeExtensions"); + var _SSOClient = class _SSOClient extends import_smithy_client5.Client { + constructor(...[configuration]) { + const _config_0 = (0, import_runtimeConfig.getRuntimeConfig)(configuration || {}); + const _config_1 = resolveClientEndpointParameters(_config_0); + const _config_2 = (0, import_middleware_user_agent.resolveUserAgentConfig)(_config_1); + const _config_3 = (0, import_middleware_retry2.resolveRetryConfig)(_config_2); + const _config_4 = (0, import_config_resolver.resolveRegionConfig)(_config_3); + const _config_5 = (0, import_middleware_host_header.resolveHostHeaderConfig)(_config_4); + const _config_6 = (0, import_middleware_endpoint2.resolveEndpointConfig)(_config_5); + const _config_7 = (0, import_httpAuthSchemeProvider.resolveHttpAuthSchemeConfig)(_config_6); + const _config_8 = resolveRuntimeExtensions(_config_7, (configuration == null ? void 0 : configuration.extensions) || []); + super(_config_8); + this.config = _config_8; + this.middlewareStack.use((0, import_middleware_user_agent.getUserAgentPlugin)(this.config)); + this.middlewareStack.use((0, import_middleware_retry2.getRetryPlugin)(this.config)); + this.middlewareStack.use((0, import_middleware_content_length.getContentLengthPlugin)(this.config)); + this.middlewareStack.use((0, import_middleware_host_header.getHostHeaderPlugin)(this.config)); + this.middlewareStack.use((0, import_middleware_logger.getLoggerPlugin)(this.config)); + this.middlewareStack.use((0, import_middleware_recursion_detection.getRecursionDetectionPlugin)(this.config)); + this.middlewareStack.use( + (0, import_core3.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config, { + httpAuthSchemeParametersProvider: import_httpAuthSchemeProvider.defaultSSOHttpAuthSchemeParametersProvider, + identityProviderConfigProvider: async (config) => new import_core3.DefaultIdentityProviderConfig({ + "aws.auth#sigv4": config.credentials + }) + }) + ); + this.middlewareStack.use((0, import_core3.getHttpSigningPlugin)(this.config)); + } + /** + * Destroy underlying resources, like sockets. It's usually not necessary to do this. + * However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed. + * Otherwise, sockets might stay open for quite a long time before the server terminates them. + */ + destroy() { + super.destroy(); } }; - var de_GetExecutionHistoryCommand = async (output, context) => { - if (output.statusCode >= 300) { - return de_GetExecutionHistoryCommandError(output, context); + __name(_SSOClient, "SSOClient"); + var SSOClient = _SSOClient; + var import_middleware_serde2 = require_dist_cjs45(); + var _SSOServiceException = class _SSOServiceException2 extends import_smithy_client5.ServiceException { + /** + * @internal + */ + constructor(options) { + super(options); + Object.setPrototypeOf(this, _SSOServiceException2.prototype); } - const data = await parseBody(output.body, context); - let contents = {}; - contents = de_GetExecutionHistoryOutput(data, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; }; - exports2.de_GetExecutionHistoryCommand = de_GetExecutionHistoryCommand; - var de_GetExecutionHistoryCommandError = async (output, context) => { - const parsedOutput = { - ...output, - body: await parseErrorBody(output.body, context) - }; - const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); - switch (errorCode) { - case "ExecutionDoesNotExist": - case "com.amazonaws.sfn#ExecutionDoesNotExist": - throw await de_ExecutionDoesNotExistRes(parsedOutput, context); - case "InvalidArn": - case "com.amazonaws.sfn#InvalidArn": - throw await de_InvalidArnRes(parsedOutput, context); - case "InvalidToken": - case "com.amazonaws.sfn#InvalidToken": - throw await de_InvalidTokenRes(parsedOutput, context); - default: - const parsedBody = parsedOutput.body; - return throwDefaultError({ - output, - parsedBody, - errorCode - }); + __name(_SSOServiceException, "SSOServiceException"); + var SSOServiceException = _SSOServiceException; + var _InvalidRequestException = class _InvalidRequestException2 extends SSOServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "InvalidRequestException", + $fault: "client", + ...opts + }); + this.name = "InvalidRequestException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _InvalidRequestException2.prototype); } }; - var de_ListActivitiesCommand = async (output, context) => { - if (output.statusCode >= 300) { - return de_ListActivitiesCommandError(output, context); + __name(_InvalidRequestException, "InvalidRequestException"); + var InvalidRequestException = _InvalidRequestException; + var _ResourceNotFoundException = class _ResourceNotFoundException2 extends SSOServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "ResourceNotFoundException", + $fault: "client", + ...opts + }); + this.name = "ResourceNotFoundException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _ResourceNotFoundException2.prototype); } - const data = await parseBody(output.body, context); - let contents = {}; - contents = de_ListActivitiesOutput(data, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; }; - exports2.de_ListActivitiesCommand = de_ListActivitiesCommand; - var de_ListActivitiesCommandError = async (output, context) => { - const parsedOutput = { - ...output, - body: await parseErrorBody(output.body, context) - }; - const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); - switch (errorCode) { - case "InvalidToken": - case "com.amazonaws.sfn#InvalidToken": - throw await de_InvalidTokenRes(parsedOutput, context); - default: - const parsedBody = parsedOutput.body; - return throwDefaultError({ - output, - parsedBody, - errorCode - }); + __name(_ResourceNotFoundException, "ResourceNotFoundException"); + var ResourceNotFoundException = _ResourceNotFoundException; + var _TooManyRequestsException = class _TooManyRequestsException2 extends SSOServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "TooManyRequestsException", + $fault: "client", + ...opts + }); + this.name = "TooManyRequestsException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _TooManyRequestsException2.prototype); } }; - var de_ListExecutionsCommand = async (output, context) => { - if (output.statusCode >= 300) { - return de_ListExecutionsCommandError(output, context); + __name(_TooManyRequestsException, "TooManyRequestsException"); + var TooManyRequestsException = _TooManyRequestsException; + var _UnauthorizedException = class _UnauthorizedException2 extends SSOServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "UnauthorizedException", + $fault: "client", + ...opts + }); + this.name = "UnauthorizedException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _UnauthorizedException2.prototype); } - const data = await parseBody(output.body, context); - let contents = {}; - contents = de_ListExecutionsOutput(data, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; }; - exports2.de_ListExecutionsCommand = de_ListExecutionsCommand; - var de_ListExecutionsCommandError = async (output, context) => { - const parsedOutput = { - ...output, - body: await parseErrorBody(output.body, context) - }; - const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); - switch (errorCode) { - case "InvalidArn": - case "com.amazonaws.sfn#InvalidArn": - throw await de_InvalidArnRes(parsedOutput, context); - case "InvalidToken": - case "com.amazonaws.sfn#InvalidToken": - throw await de_InvalidTokenRes(parsedOutput, context); - case "ResourceNotFound": - case "com.amazonaws.sfn#ResourceNotFound": - throw await de_ResourceNotFoundRes(parsedOutput, context); - case "StateMachineDoesNotExist": - case "com.amazonaws.sfn#StateMachineDoesNotExist": - throw await de_StateMachineDoesNotExistRes(parsedOutput, context); - case "StateMachineTypeNotSupported": - case "com.amazonaws.sfn#StateMachineTypeNotSupported": - throw await de_StateMachineTypeNotSupportedRes(parsedOutput, context); - case "ValidationException": - case "com.amazonaws.sfn#ValidationException": - throw await de_ValidationExceptionRes(parsedOutput, context); - default: - const parsedBody = parsedOutput.body; - return throwDefaultError({ - output, - parsedBody, - errorCode - }); + __name(_UnauthorizedException, "UnauthorizedException"); + var UnauthorizedException = _UnauthorizedException; + var GetRoleCredentialsRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.accessToken && { accessToken: import_smithy_client5.SENSITIVE_STRING } + }), "GetRoleCredentialsRequestFilterSensitiveLog"); + var RoleCredentialsFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.secretAccessKey && { secretAccessKey: import_smithy_client5.SENSITIVE_STRING }, + ...obj.sessionToken && { sessionToken: import_smithy_client5.SENSITIVE_STRING } + }), "RoleCredentialsFilterSensitiveLog"); + var GetRoleCredentialsResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.roleCredentials && { roleCredentials: RoleCredentialsFilterSensitiveLog(obj.roleCredentials) } + }), "GetRoleCredentialsResponseFilterSensitiveLog"); + var ListAccountRolesRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.accessToken && { accessToken: import_smithy_client5.SENSITIVE_STRING } + }), "ListAccountRolesRequestFilterSensitiveLog"); + var ListAccountsRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.accessToken && { accessToken: import_smithy_client5.SENSITIVE_STRING } + }), "ListAccountsRequestFilterSensitiveLog"); + var LogoutRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.accessToken && { accessToken: import_smithy_client5.SENSITIVE_STRING } + }), "LogoutRequestFilterSensitiveLog"); + var import_core22 = (init_dist_es2(), __toCommonJS(dist_es_exports2)); + var se_GetRoleCredentialsCommand = /* @__PURE__ */ __name(async (input, context) => { + const b = (0, import_core3.requestBuilder)(input, context); + const headers = (0, import_smithy_client5.map)({}, isSerializableHeaderValue, { + [_xasbt]: input[_aT] + }); + b.bp("/federation/credentials"); + const query = (0, import_smithy_client5.map)({ + [_rn]: [, (0, import_smithy_client5.expectNonNull)(input[_rN], `roleName`)], + [_ai]: [, (0, import_smithy_client5.expectNonNull)(input[_aI], `accountId`)] + }); + let body; + b.m("GET").h(headers).q(query).b(body); + return b.build(); + }, "se_GetRoleCredentialsCommand"); + var se_ListAccountRolesCommand = /* @__PURE__ */ __name(async (input, context) => { + const b = (0, import_core3.requestBuilder)(input, context); + const headers = (0, import_smithy_client5.map)({}, isSerializableHeaderValue, { + [_xasbt]: input[_aT] + }); + b.bp("/assignment/roles"); + const query = (0, import_smithy_client5.map)({ + [_nt]: [, input[_nT]], + [_mr]: [() => input.maxResults !== void 0, () => input[_mR].toString()], + [_ai]: [, (0, import_smithy_client5.expectNonNull)(input[_aI], `accountId`)] + }); + let body; + b.m("GET").h(headers).q(query).b(body); + return b.build(); + }, "se_ListAccountRolesCommand"); + var se_ListAccountsCommand = /* @__PURE__ */ __name(async (input, context) => { + const b = (0, import_core3.requestBuilder)(input, context); + const headers = (0, import_smithy_client5.map)({}, isSerializableHeaderValue, { + [_xasbt]: input[_aT] + }); + b.bp("/assignment/accounts"); + const query = (0, import_smithy_client5.map)({ + [_nt]: [, input[_nT]], + [_mr]: [() => input.maxResults !== void 0, () => input[_mR].toString()] + }); + let body; + b.m("GET").h(headers).q(query).b(body); + return b.build(); + }, "se_ListAccountsCommand"); + var se_LogoutCommand = /* @__PURE__ */ __name(async (input, context) => { + const b = (0, import_core3.requestBuilder)(input, context); + const headers = (0, import_smithy_client5.map)({}, isSerializableHeaderValue, { + [_xasbt]: input[_aT] + }); + b.bp("/logout"); + let body; + b.m("POST").h(headers).b(body); + return b.build(); + }, "se_LogoutCommand"); + var de_GetRoleCredentialsCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError(output, context); + } + const contents = (0, import_smithy_client5.map)({ + $metadata: deserializeMetadata(output) + }); + const data = (0, import_smithy_client5.expectNonNull)((0, import_smithy_client5.expectObject)(await (0, import_core22.parseJsonBody)(output.body, context)), "body"); + const doc = (0, import_smithy_client5.take)(data, { + roleCredentials: import_smithy_client5._json + }); + Object.assign(contents, doc); + return contents; + }, "de_GetRoleCredentialsCommand"); + var de_ListAccountRolesCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError(output, context); + } + const contents = (0, import_smithy_client5.map)({ + $metadata: deserializeMetadata(output) + }); + const data = (0, import_smithy_client5.expectNonNull)((0, import_smithy_client5.expectObject)(await (0, import_core22.parseJsonBody)(output.body, context)), "body"); + const doc = (0, import_smithy_client5.take)(data, { + nextToken: import_smithy_client5.expectString, + roleList: import_smithy_client5._json + }); + Object.assign(contents, doc); + return contents; + }, "de_ListAccountRolesCommand"); + var de_ListAccountsCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError(output, context); } - }; - var de_ListMapRunsCommand = async (output, context) => { - if (output.statusCode >= 300) { - return de_ListMapRunsCommandError(output, context); + const contents = (0, import_smithy_client5.map)({ + $metadata: deserializeMetadata(output) + }); + const data = (0, import_smithy_client5.expectNonNull)((0, import_smithy_client5.expectObject)(await (0, import_core22.parseJsonBody)(output.body, context)), "body"); + const doc = (0, import_smithy_client5.take)(data, { + accountList: import_smithy_client5._json, + nextToken: import_smithy_client5.expectString + }); + Object.assign(contents, doc); + return contents; + }, "de_ListAccountsCommand"); + var de_LogoutCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError(output, context); } - const data = await parseBody(output.body, context); - let contents = {}; - contents = de_ListMapRunsOutput(data, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; - }; - exports2.de_ListMapRunsCommand = de_ListMapRunsCommand; - var de_ListMapRunsCommandError = async (output, context) => { + const contents = (0, import_smithy_client5.map)({ + $metadata: deserializeMetadata(output) + }); + await (0, import_smithy_client5.collectBody)(output.body, context); + return contents; + }, "de_LogoutCommand"); + var de_CommandError = /* @__PURE__ */ __name(async (output, context) => { const parsedOutput = { ...output, - body: await parseErrorBody(output.body, context) + body: await (0, import_core22.parseJsonErrorBody)(output.body, context) }; - const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + const errorCode = (0, import_core22.loadRestJsonErrorCode)(output, parsedOutput.body); switch (errorCode) { - case "ExecutionDoesNotExist": - case "com.amazonaws.sfn#ExecutionDoesNotExist": - throw await de_ExecutionDoesNotExistRes(parsedOutput, context); - case "InvalidArn": - case "com.amazonaws.sfn#InvalidArn": - throw await de_InvalidArnRes(parsedOutput, context); - case "InvalidToken": - case "com.amazonaws.sfn#InvalidToken": - throw await de_InvalidTokenRes(parsedOutput, context); + case "InvalidRequestException": + case "com.amazonaws.sso#InvalidRequestException": + throw await de_InvalidRequestExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.sso#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "TooManyRequestsException": + case "com.amazonaws.sso#TooManyRequestsException": + throw await de_TooManyRequestsExceptionRes(parsedOutput, context); + case "UnauthorizedException": + case "com.amazonaws.sso#UnauthorizedException": + throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; return throwDefaultError({ @@ -19012,676 +18643,1172 @@ var require_Aws_json1_0 = __commonJS({ errorCode }); } - }; - var de_ListStateMachineAliasesCommand = async (output, context) => { - if (output.statusCode >= 300) { - return de_ListStateMachineAliasesCommandError(output, context); - } - const data = await parseBody(output.body, context); - let contents = {}; - contents = de_ListStateMachineAliasesOutput(data, context); - const response = { - $metadata: deserializeMetadata(output), + }, "de_CommandError"); + var throwDefaultError = (0, import_smithy_client5.withBaseException)(SSOServiceException); + var de_InvalidRequestExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const contents = (0, import_smithy_client5.map)({}); + const data = parsedOutput.body; + const doc = (0, import_smithy_client5.take)(data, { + message: import_smithy_client5.expectString + }); + Object.assign(contents, doc); + const exception = new InvalidRequestException({ + $metadata: deserializeMetadata(parsedOutput), ...contents - }; - return response; + }); + return (0, import_smithy_client5.decorateServiceException)(exception, parsedOutput.body); + }, "de_InvalidRequestExceptionRes"); + var de_ResourceNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const contents = (0, import_smithy_client5.map)({}); + const data = parsedOutput.body; + const doc = (0, import_smithy_client5.take)(data, { + message: import_smithy_client5.expectString + }); + Object.assign(contents, doc); + const exception = new ResourceNotFoundException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents + }); + return (0, import_smithy_client5.decorateServiceException)(exception, parsedOutput.body); + }, "de_ResourceNotFoundExceptionRes"); + var de_TooManyRequestsExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const contents = (0, import_smithy_client5.map)({}); + const data = parsedOutput.body; + const doc = (0, import_smithy_client5.take)(data, { + message: import_smithy_client5.expectString + }); + Object.assign(contents, doc); + const exception = new TooManyRequestsException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents + }); + return (0, import_smithy_client5.decorateServiceException)(exception, parsedOutput.body); + }, "de_TooManyRequestsExceptionRes"); + var de_UnauthorizedExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const contents = (0, import_smithy_client5.map)({}); + const data = parsedOutput.body; + const doc = (0, import_smithy_client5.take)(data, { + message: import_smithy_client5.expectString + }); + Object.assign(contents, doc); + const exception = new UnauthorizedException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents + }); + return (0, import_smithy_client5.decorateServiceException)(exception, parsedOutput.body); + }, "de_UnauthorizedExceptionRes"); + var deserializeMetadata = /* @__PURE__ */ __name((output) => ({ + httpStatusCode: output.statusCode, + requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"], + extendedRequestId: output.headers["x-amz-id-2"], + cfId: output.headers["x-amz-cf-id"] + }), "deserializeMetadata"); + var isSerializableHeaderValue = /* @__PURE__ */ __name((value) => value !== void 0 && value !== null && value !== "" && (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) && (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0), "isSerializableHeaderValue"); + var _aI = "accountId"; + var _aT = "accessToken"; + var _ai = "account_id"; + var _mR = "maxResults"; + var _mr = "max_result"; + var _nT = "nextToken"; + var _nt = "next_token"; + var _rN = "roleName"; + var _rn = "role_name"; + var _xasbt = "x-amz-sso_bearer_token"; + var _GetRoleCredentialsCommand = class _GetRoleCredentialsCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("SWBPortalService", "GetRoleCredentials", {}).n("SSOClient", "GetRoleCredentialsCommand").f(GetRoleCredentialsRequestFilterSensitiveLog, GetRoleCredentialsResponseFilterSensitiveLog).ser(se_GetRoleCredentialsCommand).de(de_GetRoleCredentialsCommand).build() { + }; + __name(_GetRoleCredentialsCommand, "GetRoleCredentialsCommand"); + var GetRoleCredentialsCommand = _GetRoleCredentialsCommand; + var _ListAccountRolesCommand = class _ListAccountRolesCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("SWBPortalService", "ListAccountRoles", {}).n("SSOClient", "ListAccountRolesCommand").f(ListAccountRolesRequestFilterSensitiveLog, void 0).ser(se_ListAccountRolesCommand).de(de_ListAccountRolesCommand).build() { + }; + __name(_ListAccountRolesCommand, "ListAccountRolesCommand"); + var ListAccountRolesCommand = _ListAccountRolesCommand; + var _ListAccountsCommand = class _ListAccountsCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("SWBPortalService", "ListAccounts", {}).n("SSOClient", "ListAccountsCommand").f(ListAccountsRequestFilterSensitiveLog, void 0).ser(se_ListAccountsCommand).de(de_ListAccountsCommand).build() { + }; + __name(_ListAccountsCommand, "ListAccountsCommand"); + var ListAccountsCommand = _ListAccountsCommand; + var _LogoutCommand = class _LogoutCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("SWBPortalService", "Logout", {}).n("SSOClient", "LogoutCommand").f(LogoutRequestFilterSensitiveLog, void 0).ser(se_LogoutCommand).de(de_LogoutCommand).build() { }; - exports2.de_ListStateMachineAliasesCommand = de_ListStateMachineAliasesCommand; - var de_ListStateMachineAliasesCommandError = async (output, context) => { - const parsedOutput = { - ...output, - body: await parseErrorBody(output.body, context) - }; - const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); - switch (errorCode) { - case "InvalidArn": - case "com.amazonaws.sfn#InvalidArn": - throw await de_InvalidArnRes(parsedOutput, context); - case "InvalidToken": - case "com.amazonaws.sfn#InvalidToken": - throw await de_InvalidTokenRes(parsedOutput, context); - case "ResourceNotFound": - case "com.amazonaws.sfn#ResourceNotFound": - throw await de_ResourceNotFoundRes(parsedOutput, context); - case "StateMachineDeleting": - case "com.amazonaws.sfn#StateMachineDeleting": - throw await de_StateMachineDeletingRes(parsedOutput, context); - case "StateMachineDoesNotExist": - case "com.amazonaws.sfn#StateMachineDoesNotExist": - throw await de_StateMachineDoesNotExistRes(parsedOutput, context); - default: - const parsedBody = parsedOutput.body; - return throwDefaultError({ - output, - parsedBody, - errorCode - }); - } + __name(_LogoutCommand, "LogoutCommand"); + var LogoutCommand = _LogoutCommand; + var commands = { + GetRoleCredentialsCommand, + ListAccountRolesCommand, + ListAccountsCommand, + LogoutCommand }; - var de_ListStateMachinesCommand = async (output, context) => { - if (output.statusCode >= 300) { - return de_ListStateMachinesCommandError(output, context); - } - const data = await parseBody(output.body, context); - let contents = {}; - contents = de_ListStateMachinesOutput(data, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents + var _SSO = class _SSO extends SSOClient { + }; + __name(_SSO, "SSO"); + var SSO = _SSO; + (0, import_smithy_client5.createAggregatedClient)(commands, SSO); + var paginateListAccountRoles = (0, import_core3.createPaginator)(SSOClient, ListAccountRolesCommand, "nextToken", "nextToken", "maxResults"); + var paginateListAccounts = (0, import_core3.createPaginator)(SSOClient, ListAccountsCommand, "nextToken", "nextToken", "maxResults"); + } +}); + +// ../../../node_modules/@aws-sdk/client-sso-oidc/dist-cjs/auth/httpAuthSchemeProvider.js +var require_httpAuthSchemeProvider3 = __commonJS({ + "../../../node_modules/@aws-sdk/client-sso-oidc/dist-cjs/auth/httpAuthSchemeProvider.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.resolveHttpAuthSchemeConfig = exports2.defaultSSOOIDCHttpAuthSchemeProvider = exports2.defaultSSOOIDCHttpAuthSchemeParametersProvider = void 0; + var core_1 = (init_dist_es2(), __toCommonJS(dist_es_exports2)); + var util_middleware_1 = require_dist_cjs10(); + var defaultSSOOIDCHttpAuthSchemeParametersProvider = async (config, context, input) => { + return { + operation: (0, util_middleware_1.getSmithyContext)(context).operation, + region: await (0, util_middleware_1.normalizeProvider)(config.region)() || (() => { + throw new Error("expected `region` to be configured for `aws.auth#sigv4`"); + })() }; - return response; }; - exports2.de_ListStateMachinesCommand = de_ListStateMachinesCommand; - var de_ListStateMachinesCommandError = async (output, context) => { - const parsedOutput = { - ...output, - body: await parseErrorBody(output.body, context) + exports2.defaultSSOOIDCHttpAuthSchemeParametersProvider = defaultSSOOIDCHttpAuthSchemeParametersProvider; + function createAwsAuthSigv4HttpAuthOption(authParameters) { + return { + schemeId: "aws.auth#sigv4", + signingProperties: { + name: "sso-oauth", + region: authParameters.region + }, + propertiesExtractor: (config, context) => ({ + signingProperties: { + config, + context + } + }) }; - const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); - switch (errorCode) { - case "InvalidToken": - case "com.amazonaws.sfn#InvalidToken": - throw await de_InvalidTokenRes(parsedOutput, context); - default: - const parsedBody = parsedOutput.body; - return throwDefaultError({ - output, - parsedBody, - errorCode - }); + } + function createSmithyApiNoAuthHttpAuthOption(authParameters) { + return { + schemeId: "smithy.api#noAuth" + }; + } + var defaultSSOOIDCHttpAuthSchemeProvider = (authParameters) => { + const options = []; + switch (authParameters.operation) { + case "CreateToken": { + options.push(createSmithyApiNoAuthHttpAuthOption(authParameters)); + break; + } + case "RegisterClient": { + options.push(createSmithyApiNoAuthHttpAuthOption(authParameters)); + break; + } + case "StartDeviceAuthorization": { + options.push(createSmithyApiNoAuthHttpAuthOption(authParameters)); + break; + } + default: { + options.push(createAwsAuthSigv4HttpAuthOption(authParameters)); + } } + return options; }; - var de_ListStateMachineVersionsCommand = async (output, context) => { - if (output.statusCode >= 300) { - return de_ListStateMachineVersionsCommandError(output, context); - } - const data = await parseBody(output.body, context); - let contents = {}; - contents = de_ListStateMachineVersionsOutput(data, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents + exports2.defaultSSOOIDCHttpAuthSchemeProvider = defaultSSOOIDCHttpAuthSchemeProvider; + var resolveHttpAuthSchemeConfig = (config) => { + const config_0 = (0, core_1.resolveAwsSdkSigV4Config)(config); + return { + ...config_0 }; - return response; }; - exports2.de_ListStateMachineVersionsCommand = de_ListStateMachineVersionsCommand; - var de_ListStateMachineVersionsCommandError = async (output, context) => { - const parsedOutput = { - ...output, - body: await parseErrorBody(output.body, context) - }; - const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); - switch (errorCode) { - case "InvalidArn": - case "com.amazonaws.sfn#InvalidArn": - throw await de_InvalidArnRes(parsedOutput, context); - case "InvalidToken": - case "com.amazonaws.sfn#InvalidToken": - throw await de_InvalidTokenRes(parsedOutput, context); - case "ValidationException": - case "com.amazonaws.sfn#ValidationException": - throw await de_ValidationExceptionRes(parsedOutput, context); - default: - const parsedBody = parsedOutput.body; - return throwDefaultError({ - output, - parsedBody, - errorCode - }); + exports2.resolveHttpAuthSchemeConfig = resolveHttpAuthSchemeConfig; + } +}); + +// ../../../node_modules/@aws-sdk/client-sso-oidc/package.json +var require_package3 = __commonJS({ + "../../../node_modules/@aws-sdk/client-sso-oidc/package.json"(exports2, module2) { + module2.exports = { + name: "@aws-sdk/client-sso-oidc", + description: "AWS SDK for JavaScript Sso Oidc Client for Node.js, Browser and React Native", + version: "3.632.0", + scripts: { + build: "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'", + "build:cjs": "node ../../scripts/compilation/inline client-sso-oidc", + "build:es": "tsc -p tsconfig.es.json", + "build:include:deps": "lerna run --scope $npm_package_name --include-dependencies build", + "build:types": "tsc -p tsconfig.types.json", + "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4", + clean: "rimraf ./dist-* && rimraf *.tsbuildinfo", + "extract:docs": "api-extractor run --local", + "generate:client": "node ../../scripts/generate-clients/single-service --solo sso-oidc" + }, + main: "./dist-cjs/index.js", + types: "./dist-types/index.d.ts", + module: "./dist-es/index.js", + sideEffects: false, + dependencies: { + "@aws-crypto/sha256-browser": "5.2.0", + "@aws-crypto/sha256-js": "5.2.0", + "@aws-sdk/core": "3.629.0", + "@aws-sdk/credential-provider-node": "3.632.0", + "@aws-sdk/middleware-host-header": "3.620.0", + "@aws-sdk/middleware-logger": "3.609.0", + "@aws-sdk/middleware-recursion-detection": "3.620.0", + "@aws-sdk/middleware-user-agent": "3.632.0", + "@aws-sdk/region-config-resolver": "3.614.0", + "@aws-sdk/types": "3.609.0", + "@aws-sdk/util-endpoints": "3.632.0", + "@aws-sdk/util-user-agent-browser": "3.609.0", + "@aws-sdk/util-user-agent-node": "3.614.0", + "@smithy/config-resolver": "^3.0.5", + "@smithy/core": "^2.3.2", + "@smithy/fetch-http-handler": "^3.2.4", + "@smithy/hash-node": "^3.0.3", + "@smithy/invalid-dependency": "^3.0.3", + "@smithy/middleware-content-length": "^3.0.5", + "@smithy/middleware-endpoint": "^3.1.0", + "@smithy/middleware-retry": "^3.0.14", + "@smithy/middleware-serde": "^3.0.3", + "@smithy/middleware-stack": "^3.0.3", + "@smithy/node-config-provider": "^3.1.4", + "@smithy/node-http-handler": "^3.1.4", + "@smithy/protocol-http": "^4.1.0", + "@smithy/smithy-client": "^3.1.12", + "@smithy/types": "^3.3.0", + "@smithy/url-parser": "^3.0.3", + "@smithy/util-base64": "^3.0.0", + "@smithy/util-body-length-browser": "^3.0.0", + "@smithy/util-body-length-node": "^3.0.0", + "@smithy/util-defaults-mode-browser": "^3.0.14", + "@smithy/util-defaults-mode-node": "^3.0.14", + "@smithy/util-endpoints": "^2.0.5", + "@smithy/util-middleware": "^3.0.3", + "@smithy/util-retry": "^3.0.3", + "@smithy/util-utf8": "^3.0.0", + tslib: "^2.6.2" + }, + devDependencies: { + "@tsconfig/node16": "16.1.3", + "@types/node": "^16.18.96", + concurrently: "7.0.0", + "downlevel-dts": "0.10.1", + rimraf: "3.0.2", + typescript: "~4.9.5" + }, + engines: { + node: ">=16.0.0" + }, + typesVersions: { + "<4.0": { + "dist-types/*": [ + "dist-types/ts3.4/*" + ] + } + }, + files: [ + "dist-*/**" + ], + author: { + name: "AWS SDK for JavaScript Team", + url: "https://aws.amazon.com/javascript/" + }, + license: "Apache-2.0", + peerDependencies: { + "@aws-sdk/client-sts": "^3.632.0" + }, + browser: { + "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.browser" + }, + "react-native": { + "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.native" + }, + homepage: "https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sso-oidc", + repository: { + type: "git", + url: "https://github.com/aws/aws-sdk-js-v3.git", + directory: "clients/client-sso-oidc" } }; - var de_ListTagsForResourceCommand = async (output, context) => { - if (output.statusCode >= 300) { - return de_ListTagsForResourceCommandError(output, context); - } - const data = await parseBody(output.body, context); - let contents = {}; - contents = (0, smithy_client_1._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents + } +}); + +// ../../../node_modules/@aws-sdk/client-sso-oidc/dist-cjs/endpoint/ruleset.js +var require_ruleset2 = __commonJS({ + "../../../node_modules/@aws-sdk/client-sso-oidc/dist-cjs/endpoint/ruleset.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ruleSet = void 0; + var u = "required"; + var v = "fn"; + var w = "argv"; + var x = "ref"; + var a = true; + var b = "isSet"; + var c = "booleanEquals"; + var d = "error"; + var e = "endpoint"; + var f = "tree"; + var g = "PartitionResult"; + var h = "getAttr"; + var i = { [u]: false, "type": "String" }; + var j = { [u]: true, "default": false, "type": "Boolean" }; + var k = { [x]: "Endpoint" }; + var l = { [v]: c, [w]: [{ [x]: "UseFIPS" }, true] }; + var m = { [v]: c, [w]: [{ [x]: "UseDualStack" }, true] }; + var n = {}; + var o = { [v]: h, [w]: [{ [x]: g }, "supportsFIPS"] }; + var p = { [x]: g }; + var q = { [v]: c, [w]: [true, { [v]: h, [w]: [p, "supportsDualStack"] }] }; + var r = [l]; + var s = [m]; + var t = [{ [x]: "Region" }]; + var _data = { version: "1.0", parameters: { Region: i, UseDualStack: j, UseFIPS: j, Endpoint: i }, rules: [{ conditions: [{ [v]: b, [w]: [k] }], rules: [{ conditions: r, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: d }, { conditions: s, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: d }, { endpoint: { url: k, properties: n, headers: n }, type: e }], type: f }, { conditions: [{ [v]: b, [w]: t }], rules: [{ conditions: [{ [v]: "aws.partition", [w]: t, assign: g }], rules: [{ conditions: [l, m], rules: [{ conditions: [{ [v]: c, [w]: [a, o] }, q], rules: [{ endpoint: { url: "https://oidc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: n, headers: n }, type: e }], type: f }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: d }], type: f }, { conditions: r, rules: [{ conditions: [{ [v]: c, [w]: [o, a] }], rules: [{ conditions: [{ [v]: "stringEquals", [w]: [{ [v]: h, [w]: [p, "name"] }, "aws-us-gov"] }], endpoint: { url: "https://oidc.{Region}.amazonaws.com", properties: n, headers: n }, type: e }, { endpoint: { url: "https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}", properties: n, headers: n }, type: e }], type: f }, { error: "FIPS is enabled but this partition does not support FIPS", type: d }], type: f }, { conditions: s, rules: [{ conditions: [q], rules: [{ endpoint: { url: "https://oidc.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: n, headers: n }, type: e }], type: f }, { error: "DualStack is enabled but this partition does not support DualStack", type: d }], type: f }, { endpoint: { url: "https://oidc.{Region}.{PartitionResult#dnsSuffix}", properties: n, headers: n }, type: e }], type: f }], type: f }, { error: "Invalid Configuration: Missing Region", type: d }] }; + exports2.ruleSet = _data; + } +}); + +// ../../../node_modules/@aws-sdk/client-sso-oidc/dist-cjs/endpoint/endpointResolver.js +var require_endpointResolver2 = __commonJS({ + "../../../node_modules/@aws-sdk/client-sso-oidc/dist-cjs/endpoint/endpointResolver.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.defaultEndpointResolver = void 0; + var util_endpoints_1 = require_dist_cjs7(); + var util_endpoints_2 = require_dist_cjs6(); + var ruleset_1 = require_ruleset2(); + var defaultEndpointResolver = (endpointParams, context = {}) => { + return (0, util_endpoints_2.resolveEndpoint)(ruleset_1.ruleSet, { + endpointParams, + logger: context.logger + }); + }; + exports2.defaultEndpointResolver = defaultEndpointResolver; + util_endpoints_2.customEndpointFunctions.aws = util_endpoints_1.awsEndpointFunctions; + } +}); + +// ../../../node_modules/@aws-sdk/client-sso-oidc/dist-cjs/runtimeConfig.shared.js +var require_runtimeConfig_shared2 = __commonJS({ + "../../../node_modules/@aws-sdk/client-sso-oidc/dist-cjs/runtimeConfig.shared.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getRuntimeConfig = void 0; + var core_1 = (init_dist_es2(), __toCommonJS(dist_es_exports2)); + var core_2 = (init_dist_es(), __toCommonJS(dist_es_exports)); + var smithy_client_1 = require_dist_cjs37(); + var url_parser_1 = require_dist_cjs44(); + var util_base64_1 = require_dist_cjs29(); + var util_utf8_1 = require_dist_cjs28(); + var httpAuthSchemeProvider_1 = require_httpAuthSchemeProvider3(); + var endpointResolver_1 = require_endpointResolver2(); + var getRuntimeConfig = (config) => { + return { + apiVersion: "2019-06-10", + base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64, + base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64, + disableHostPrefix: config?.disableHostPrefix ?? false, + endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver, + extensions: config?.extensions ?? [], + httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? httpAuthSchemeProvider_1.defaultSSOOIDCHttpAuthSchemeProvider, + httpAuthSchemes: config?.httpAuthSchemes ?? [ + { + schemeId: "aws.auth#sigv4", + identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"), + signer: new core_1.AwsSdkSigV4Signer() + }, + { + schemeId: "smithy.api#noAuth", + identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})), + signer: new core_2.NoAuthSigner() + } + ], + logger: config?.logger ?? new smithy_client_1.NoOpLogger(), + serviceId: config?.serviceId ?? "SSO OIDC", + urlParser: config?.urlParser ?? url_parser_1.parseUrl, + utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8, + utf8Encoder: config?.utf8Encoder ?? util_utf8_1.toUtf8 }; - return response; }; - exports2.de_ListTagsForResourceCommand = de_ListTagsForResourceCommand; - var de_ListTagsForResourceCommandError = async (output, context) => { - const parsedOutput = { - ...output, - body: await parseErrorBody(output.body, context) + exports2.getRuntimeConfig = getRuntimeConfig; + } +}); + +// ../../../node_modules/@aws-sdk/client-sso-oidc/dist-cjs/runtimeConfig.js +var require_runtimeConfig2 = __commonJS({ + "../../../node_modules/@aws-sdk/client-sso-oidc/dist-cjs/runtimeConfig.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getRuntimeConfig = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var package_json_1 = tslib_1.__importDefault(require_package3()); + var core_1 = (init_dist_es2(), __toCommonJS(dist_es_exports2)); + var credential_provider_node_1 = require_dist_cjs79(); + var util_user_agent_node_1 = require_dist_cjs56(); + var config_resolver_1 = require_dist_cjs11(); + var hash_node_1 = require_dist_cjs57(); + var middleware_retry_1 = require_dist_cjs38(); + var node_config_provider_1 = require_dist_cjs42(); + var node_http_handler_1 = require_dist_cjs51(); + var util_body_length_node_1 = require_dist_cjs58(); + var util_retry_1 = require_dist_cjs60(); + var runtimeConfig_shared_1 = require_runtimeConfig_shared2(); + var smithy_client_1 = require_dist_cjs37(); + var util_defaults_mode_node_1 = require_dist_cjs69(); + var smithy_client_2 = require_dist_cjs37(); + var getRuntimeConfig = (config) => { + (0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version); + const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config); + const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode); + const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config); + (0, core_1.emitWarningIfUnsupportedVersion)(process.version); + return { + ...clientSharedValues, + ...config, + runtime: "node", + defaultsMode, + bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength, + credentialDefaultProvider: config?.credentialDefaultProvider ?? credential_provider_node_1.defaultProvider, + defaultUserAgentProvider: config?.defaultUserAgentProvider ?? (0, util_user_agent_node_1.defaultUserAgent)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }), + maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS), + region: config?.region ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS), + requestHandler: node_http_handler_1.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider), + retryMode: config?.retryMode ?? (0, node_config_provider_1.loadConfig)({ + ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS, + default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE + }), + sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, "sha256"), + streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS) }; - const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); - switch (errorCode) { - case "InvalidArn": - case "com.amazonaws.sfn#InvalidArn": - throw await de_InvalidArnRes(parsedOutput, context); - case "ResourceNotFound": - case "com.amazonaws.sfn#ResourceNotFound": - throw await de_ResourceNotFoundRes(parsedOutput, context); - default: - const parsedBody = parsedOutput.body; - return throwDefaultError({ - output, - parsedBody, - errorCode - }); - } }; - var de_PublishStateMachineVersionCommand = async (output, context) => { - if (output.statusCode >= 300) { - return de_PublishStateMachineVersionCommandError(output, context); - } - const data = await parseBody(output.body, context); - let contents = {}; - contents = de_PublishStateMachineVersionOutput(data, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; + exports2.getRuntimeConfig = getRuntimeConfig; + } +}); + +// ../../../node_modules/@aws-sdk/client-sso-oidc/dist-cjs/index.js +var require_dist_cjs72 = __commonJS({ + "../../../node_modules/@aws-sdk/client-sso-oidc/dist-cjs/index.js"(exports2, module2) { + "use strict"; + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all) => { + for (var name in all) + __defProp2(target, name, { get: all[name], enumerable: true }); }; - exports2.de_PublishStateMachineVersionCommand = de_PublishStateMachineVersionCommand; - var de_PublishStateMachineVersionCommandError = async (output, context) => { - const parsedOutput = { - ...output, - body: await parseErrorBody(output.body, context) - }; - const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); - switch (errorCode) { - case "ConflictException": - case "com.amazonaws.sfn#ConflictException": - throw await de_ConflictExceptionRes(parsedOutput, context); - case "InvalidArn": - case "com.amazonaws.sfn#InvalidArn": - throw await de_InvalidArnRes(parsedOutput, context); - case "ServiceQuotaExceededException": - case "com.amazonaws.sfn#ServiceQuotaExceededException": - throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context); - case "StateMachineDeleting": - case "com.amazonaws.sfn#StateMachineDeleting": - throw await de_StateMachineDeletingRes(parsedOutput, context); - case "StateMachineDoesNotExist": - case "com.amazonaws.sfn#StateMachineDoesNotExist": - throw await de_StateMachineDoesNotExistRes(parsedOutput, context); - case "ValidationException": - case "com.amazonaws.sfn#ValidationException": - throw await de_ValidationExceptionRes(parsedOutput, context); - default: - const parsedBody = parsedOutput.body; - return throwDefaultError({ - output, - parsedBody, - errorCode - }); + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); } + return to; }; - var de_SendTaskFailureCommand = async (output, context) => { - if (output.statusCode >= 300) { - return de_SendTaskFailureCommandError(output, context); - } - const data = await parseBody(output.body, context); - let contents = {}; - contents = (0, smithy_client_1._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + AccessDeniedException: () => AccessDeniedException, + AuthorizationPendingException: () => AuthorizationPendingException, + CreateTokenCommand: () => CreateTokenCommand, + CreateTokenRequestFilterSensitiveLog: () => CreateTokenRequestFilterSensitiveLog, + CreateTokenResponseFilterSensitiveLog: () => CreateTokenResponseFilterSensitiveLog, + CreateTokenWithIAMCommand: () => CreateTokenWithIAMCommand, + CreateTokenWithIAMRequestFilterSensitiveLog: () => CreateTokenWithIAMRequestFilterSensitiveLog, + CreateTokenWithIAMResponseFilterSensitiveLog: () => CreateTokenWithIAMResponseFilterSensitiveLog, + ExpiredTokenException: () => ExpiredTokenException, + InternalServerException: () => InternalServerException, + InvalidClientException: () => InvalidClientException, + InvalidClientMetadataException: () => InvalidClientMetadataException, + InvalidGrantException: () => InvalidGrantException, + InvalidRedirectUriException: () => InvalidRedirectUriException, + InvalidRequestException: () => InvalidRequestException, + InvalidRequestRegionException: () => InvalidRequestRegionException, + InvalidScopeException: () => InvalidScopeException, + RegisterClientCommand: () => RegisterClientCommand, + RegisterClientResponseFilterSensitiveLog: () => RegisterClientResponseFilterSensitiveLog, + SSOOIDC: () => SSOOIDC, + SSOOIDCClient: () => SSOOIDCClient, + SSOOIDCServiceException: () => SSOOIDCServiceException, + SlowDownException: () => SlowDownException, + StartDeviceAuthorizationCommand: () => StartDeviceAuthorizationCommand, + StartDeviceAuthorizationRequestFilterSensitiveLog: () => StartDeviceAuthorizationRequestFilterSensitiveLog, + UnauthorizedClientException: () => UnauthorizedClientException, + UnsupportedGrantTypeException: () => UnsupportedGrantTypeException, + __Client: () => import_smithy_client5.Client + }); + module2.exports = __toCommonJS2(src_exports); + var import_middleware_host_header = require_dist_cjs3(); + var import_middleware_logger = require_dist_cjs4(); + var import_middleware_recursion_detection = require_dist_cjs5(); + var import_middleware_user_agent = require_dist_cjs8(); + var import_config_resolver = require_dist_cjs11(); + var import_core3 = (init_dist_es(), __toCommonJS(dist_es_exports)); + var import_middleware_content_length = require_dist_cjs39(); + var import_middleware_endpoint2 = require_dist_cjs46(); + var import_middleware_retry2 = require_dist_cjs38(); + var import_httpAuthSchemeProvider = require_httpAuthSchemeProvider3(); + var resolveClientEndpointParameters = /* @__PURE__ */ __name((options) => { + return { + ...options, + useDualstackEndpoint: options.useDualstackEndpoint ?? false, + useFipsEndpoint: options.useFipsEndpoint ?? false, + defaultSigningName: "sso-oauth" }; - return response; - }; - exports2.de_SendTaskFailureCommand = de_SendTaskFailureCommand; - var de_SendTaskFailureCommandError = async (output, context) => { - const parsedOutput = { - ...output, - body: await parseErrorBody(output.body, context) + }, "resolveClientEndpointParameters"); + var commonParams = { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" } + }; + var import_runtimeConfig = require_runtimeConfig2(); + var import_region_config_resolver = require_dist_cjs70(); + var import_protocol_http8 = require_dist_cjs2(); + var import_smithy_client5 = require_dist_cjs37(); + var getHttpAuthExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => { + const _httpAuthSchemes = runtimeConfig.httpAuthSchemes; + let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider; + let _credentials = runtimeConfig.credentials; + return { + setHttpAuthScheme(httpAuthScheme) { + const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId); + if (index === -1) { + _httpAuthSchemes.push(httpAuthScheme); + } else { + _httpAuthSchemes.splice(index, 1, httpAuthScheme); + } + }, + httpAuthSchemes() { + return _httpAuthSchemes; + }, + setHttpAuthSchemeProvider(httpAuthSchemeProvider) { + _httpAuthSchemeProvider = httpAuthSchemeProvider; + }, + httpAuthSchemeProvider() { + return _httpAuthSchemeProvider; + }, + setCredentials(credentials) { + _credentials = credentials; + }, + credentials() { + return _credentials; + } }; - const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); - switch (errorCode) { - case "InvalidToken": - case "com.amazonaws.sfn#InvalidToken": - throw await de_InvalidTokenRes(parsedOutput, context); - case "TaskDoesNotExist": - case "com.amazonaws.sfn#TaskDoesNotExist": - throw await de_TaskDoesNotExistRes(parsedOutput, context); - case "TaskTimedOut": - case "com.amazonaws.sfn#TaskTimedOut": - throw await de_TaskTimedOutRes(parsedOutput, context); - default: - const parsedBody = parsedOutput.body; - return throwDefaultError({ - output, - parsedBody, - errorCode - }); - } - }; - var de_SendTaskHeartbeatCommand = async (output, context) => { - if (output.statusCode >= 300) { - return de_SendTaskHeartbeatCommandError(output, context); - } - const data = await parseBody(output.body, context); - let contents = {}; - contents = (0, smithy_client_1._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents + }, "getHttpAuthExtensionConfiguration"); + var resolveHttpAuthRuntimeConfig = /* @__PURE__ */ __name((config) => { + return { + httpAuthSchemes: config.httpAuthSchemes(), + httpAuthSchemeProvider: config.httpAuthSchemeProvider(), + credentials: config.credentials() }; - return response; - }; - exports2.de_SendTaskHeartbeatCommand = de_SendTaskHeartbeatCommand; - var de_SendTaskHeartbeatCommandError = async (output, context) => { - const parsedOutput = { - ...output, - body: await parseErrorBody(output.body, context) + }, "resolveHttpAuthRuntimeConfig"); + var asPartial = /* @__PURE__ */ __name((t) => t, "asPartial"); + var resolveRuntimeExtensions = /* @__PURE__ */ __name((runtimeConfig, extensions) => { + const extensionConfiguration = { + ...asPartial((0, import_region_config_resolver.getAwsRegionExtensionConfiguration)(runtimeConfig)), + ...asPartial((0, import_smithy_client5.getDefaultExtensionConfiguration)(runtimeConfig)), + ...asPartial((0, import_protocol_http8.getHttpHandlerExtensionConfiguration)(runtimeConfig)), + ...asPartial(getHttpAuthExtensionConfiguration(runtimeConfig)) }; - const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); - switch (errorCode) { - case "InvalidToken": - case "com.amazonaws.sfn#InvalidToken": - throw await de_InvalidTokenRes(parsedOutput, context); - case "TaskDoesNotExist": - case "com.amazonaws.sfn#TaskDoesNotExist": - throw await de_TaskDoesNotExistRes(parsedOutput, context); - case "TaskTimedOut": - case "com.amazonaws.sfn#TaskTimedOut": - throw await de_TaskTimedOutRes(parsedOutput, context); - default: - const parsedBody = parsedOutput.body; - return throwDefaultError({ - output, - parsedBody, - errorCode - }); + extensions.forEach((extension) => extension.configure(extensionConfiguration)); + return { + ...runtimeConfig, + ...(0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration), + ...(0, import_smithy_client5.resolveDefaultRuntimeConfig)(extensionConfiguration), + ...(0, import_protocol_http8.resolveHttpHandlerRuntimeConfig)(extensionConfiguration), + ...resolveHttpAuthRuntimeConfig(extensionConfiguration) + }; + }, "resolveRuntimeExtensions"); + var _SSOOIDCClient = class _SSOOIDCClient extends import_smithy_client5.Client { + constructor(...[configuration]) { + const _config_0 = (0, import_runtimeConfig.getRuntimeConfig)(configuration || {}); + const _config_1 = resolveClientEndpointParameters(_config_0); + const _config_2 = (0, import_middleware_user_agent.resolveUserAgentConfig)(_config_1); + const _config_3 = (0, import_middleware_retry2.resolveRetryConfig)(_config_2); + const _config_4 = (0, import_config_resolver.resolveRegionConfig)(_config_3); + const _config_5 = (0, import_middleware_host_header.resolveHostHeaderConfig)(_config_4); + const _config_6 = (0, import_middleware_endpoint2.resolveEndpointConfig)(_config_5); + const _config_7 = (0, import_httpAuthSchemeProvider.resolveHttpAuthSchemeConfig)(_config_6); + const _config_8 = resolveRuntimeExtensions(_config_7, (configuration == null ? void 0 : configuration.extensions) || []); + super(_config_8); + this.config = _config_8; + this.middlewareStack.use((0, import_middleware_user_agent.getUserAgentPlugin)(this.config)); + this.middlewareStack.use((0, import_middleware_retry2.getRetryPlugin)(this.config)); + this.middlewareStack.use((0, import_middleware_content_length.getContentLengthPlugin)(this.config)); + this.middlewareStack.use((0, import_middleware_host_header.getHostHeaderPlugin)(this.config)); + this.middlewareStack.use((0, import_middleware_logger.getLoggerPlugin)(this.config)); + this.middlewareStack.use((0, import_middleware_recursion_detection.getRecursionDetectionPlugin)(this.config)); + this.middlewareStack.use( + (0, import_core3.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config, { + httpAuthSchemeParametersProvider: import_httpAuthSchemeProvider.defaultSSOOIDCHttpAuthSchemeParametersProvider, + identityProviderConfigProvider: async (config) => new import_core3.DefaultIdentityProviderConfig({ + "aws.auth#sigv4": config.credentials + }) + }) + ); + this.middlewareStack.use((0, import_core3.getHttpSigningPlugin)(this.config)); } - }; - var de_SendTaskSuccessCommand = async (output, context) => { - if (output.statusCode >= 300) { - return de_SendTaskSuccessCommandError(output, context); + /** + * Destroy underlying resources, like sockets. It's usually not necessary to do this. + * However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed. + * Otherwise, sockets might stay open for quite a long time before the server terminates them. + */ + destroy() { + super.destroy(); } - const data = await parseBody(output.body, context); - let contents = {}; - contents = (0, smithy_client_1._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; }; - exports2.de_SendTaskSuccessCommand = de_SendTaskSuccessCommand; - var de_SendTaskSuccessCommandError = async (output, context) => { - const parsedOutput = { - ...output, - body: await parseErrorBody(output.body, context) - }; - const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); - switch (errorCode) { - case "InvalidOutput": - case "com.amazonaws.sfn#InvalidOutput": - throw await de_InvalidOutputRes(parsedOutput, context); - case "InvalidToken": - case "com.amazonaws.sfn#InvalidToken": - throw await de_InvalidTokenRes(parsedOutput, context); - case "TaskDoesNotExist": - case "com.amazonaws.sfn#TaskDoesNotExist": - throw await de_TaskDoesNotExistRes(parsedOutput, context); - case "TaskTimedOut": - case "com.amazonaws.sfn#TaskTimedOut": - throw await de_TaskTimedOutRes(parsedOutput, context); - default: - const parsedBody = parsedOutput.body; - return throwDefaultError({ - output, - parsedBody, - errorCode - }); + __name(_SSOOIDCClient, "SSOOIDCClient"); + var SSOOIDCClient = _SSOOIDCClient; + var import_middleware_serde2 = require_dist_cjs45(); + var _SSOOIDCServiceException = class _SSOOIDCServiceException2 extends import_smithy_client5.ServiceException { + /** + * @internal + */ + constructor(options) { + super(options); + Object.setPrototypeOf(this, _SSOOIDCServiceException2.prototype); } }; - var de_StartExecutionCommand = async (output, context) => { - if (output.statusCode >= 300) { - return de_StartExecutionCommandError(output, context); + __name(_SSOOIDCServiceException, "SSOOIDCServiceException"); + var SSOOIDCServiceException = _SSOOIDCServiceException; + var _AccessDeniedException = class _AccessDeniedException2 extends SSOOIDCServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "AccessDeniedException", + $fault: "client", + ...opts + }); + this.name = "AccessDeniedException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _AccessDeniedException2.prototype); + this.error = opts.error; + this.error_description = opts.error_description; } - const data = await parseBody(output.body, context); - let contents = {}; - contents = de_StartExecutionOutput(data, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; }; - exports2.de_StartExecutionCommand = de_StartExecutionCommand; - var de_StartExecutionCommandError = async (output, context) => { - const parsedOutput = { - ...output, - body: await parseErrorBody(output.body, context) - }; - const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); - switch (errorCode) { - case "ExecutionAlreadyExists": - case "com.amazonaws.sfn#ExecutionAlreadyExists": - throw await de_ExecutionAlreadyExistsRes(parsedOutput, context); - case "ExecutionLimitExceeded": - case "com.amazonaws.sfn#ExecutionLimitExceeded": - throw await de_ExecutionLimitExceededRes(parsedOutput, context); - case "InvalidArn": - case "com.amazonaws.sfn#InvalidArn": - throw await de_InvalidArnRes(parsedOutput, context); - case "InvalidExecutionInput": - case "com.amazonaws.sfn#InvalidExecutionInput": - throw await de_InvalidExecutionInputRes(parsedOutput, context); - case "InvalidName": - case "com.amazonaws.sfn#InvalidName": - throw await de_InvalidNameRes(parsedOutput, context); - case "StateMachineDeleting": - case "com.amazonaws.sfn#StateMachineDeleting": - throw await de_StateMachineDeletingRes(parsedOutput, context); - case "StateMachineDoesNotExist": - case "com.amazonaws.sfn#StateMachineDoesNotExist": - throw await de_StateMachineDoesNotExistRes(parsedOutput, context); - case "ValidationException": - case "com.amazonaws.sfn#ValidationException": - throw await de_ValidationExceptionRes(parsedOutput, context); - default: - const parsedBody = parsedOutput.body; - return throwDefaultError({ - output, - parsedBody, - errorCode - }); + __name(_AccessDeniedException, "AccessDeniedException"); + var AccessDeniedException = _AccessDeniedException; + var _AuthorizationPendingException = class _AuthorizationPendingException2 extends SSOOIDCServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "AuthorizationPendingException", + $fault: "client", + ...opts + }); + this.name = "AuthorizationPendingException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _AuthorizationPendingException2.prototype); + this.error = opts.error; + this.error_description = opts.error_description; } }; - var de_StartSyncExecutionCommand = async (output, context) => { - if (output.statusCode >= 300) { - return de_StartSyncExecutionCommandError(output, context); + __name(_AuthorizationPendingException, "AuthorizationPendingException"); + var AuthorizationPendingException = _AuthorizationPendingException; + var _ExpiredTokenException = class _ExpiredTokenException2 extends SSOOIDCServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "ExpiredTokenException", + $fault: "client", + ...opts + }); + this.name = "ExpiredTokenException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _ExpiredTokenException2.prototype); + this.error = opts.error; + this.error_description = opts.error_description; } - const data = await parseBody(output.body, context); - let contents = {}; - contents = de_StartSyncExecutionOutput(data, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; }; - exports2.de_StartSyncExecutionCommand = de_StartSyncExecutionCommand; - var de_StartSyncExecutionCommandError = async (output, context) => { - const parsedOutput = { - ...output, - body: await parseErrorBody(output.body, context) - }; - const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); - switch (errorCode) { - case "InvalidArn": - case "com.amazonaws.sfn#InvalidArn": - throw await de_InvalidArnRes(parsedOutput, context); - case "InvalidExecutionInput": - case "com.amazonaws.sfn#InvalidExecutionInput": - throw await de_InvalidExecutionInputRes(parsedOutput, context); - case "InvalidName": - case "com.amazonaws.sfn#InvalidName": - throw await de_InvalidNameRes(parsedOutput, context); - case "StateMachineDeleting": - case "com.amazonaws.sfn#StateMachineDeleting": - throw await de_StateMachineDeletingRes(parsedOutput, context); - case "StateMachineDoesNotExist": - case "com.amazonaws.sfn#StateMachineDoesNotExist": - throw await de_StateMachineDoesNotExistRes(parsedOutput, context); - case "StateMachineTypeNotSupported": - case "com.amazonaws.sfn#StateMachineTypeNotSupported": - throw await de_StateMachineTypeNotSupportedRes(parsedOutput, context); - default: - const parsedBody = parsedOutput.body; - return throwDefaultError({ - output, - parsedBody, - errorCode - }); + __name(_ExpiredTokenException, "ExpiredTokenException"); + var ExpiredTokenException = _ExpiredTokenException; + var _InternalServerException = class _InternalServerException2 extends SSOOIDCServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "InternalServerException", + $fault: "server", + ...opts + }); + this.name = "InternalServerException"; + this.$fault = "server"; + Object.setPrototypeOf(this, _InternalServerException2.prototype); + this.error = opts.error; + this.error_description = opts.error_description; } }; - var de_StopExecutionCommand = async (output, context) => { - if (output.statusCode >= 300) { - return de_StopExecutionCommandError(output, context); + __name(_InternalServerException, "InternalServerException"); + var InternalServerException = _InternalServerException; + var _InvalidClientException = class _InvalidClientException2 extends SSOOIDCServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "InvalidClientException", + $fault: "client", + ...opts + }); + this.name = "InvalidClientException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _InvalidClientException2.prototype); + this.error = opts.error; + this.error_description = opts.error_description; } - const data = await parseBody(output.body, context); - let contents = {}; - contents = de_StopExecutionOutput(data, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; }; - exports2.de_StopExecutionCommand = de_StopExecutionCommand; - var de_StopExecutionCommandError = async (output, context) => { - const parsedOutput = { - ...output, - body: await parseErrorBody(output.body, context) - }; - const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); - switch (errorCode) { - case "ExecutionDoesNotExist": - case "com.amazonaws.sfn#ExecutionDoesNotExist": - throw await de_ExecutionDoesNotExistRes(parsedOutput, context); - case "InvalidArn": - case "com.amazonaws.sfn#InvalidArn": - throw await de_InvalidArnRes(parsedOutput, context); - case "ValidationException": - case "com.amazonaws.sfn#ValidationException": - throw await de_ValidationExceptionRes(parsedOutput, context); - default: - const parsedBody = parsedOutput.body; - return throwDefaultError({ - output, - parsedBody, - errorCode - }); + __name(_InvalidClientException, "InvalidClientException"); + var InvalidClientException = _InvalidClientException; + var _InvalidGrantException = class _InvalidGrantException2 extends SSOOIDCServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "InvalidGrantException", + $fault: "client", + ...opts + }); + this.name = "InvalidGrantException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _InvalidGrantException2.prototype); + this.error = opts.error; + this.error_description = opts.error_description; } }; - var de_TagResourceCommand = async (output, context) => { - if (output.statusCode >= 300) { - return de_TagResourceCommandError(output, context); + __name(_InvalidGrantException, "InvalidGrantException"); + var InvalidGrantException = _InvalidGrantException; + var _InvalidRequestException = class _InvalidRequestException2 extends SSOOIDCServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "InvalidRequestException", + $fault: "client", + ...opts + }); + this.name = "InvalidRequestException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _InvalidRequestException2.prototype); + this.error = opts.error; + this.error_description = opts.error_description; } - const data = await parseBody(output.body, context); - let contents = {}; - contents = (0, smithy_client_1._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; }; - exports2.de_TagResourceCommand = de_TagResourceCommand; - var de_TagResourceCommandError = async (output, context) => { - const parsedOutput = { - ...output, - body: await parseErrorBody(output.body, context) - }; - const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); - switch (errorCode) { - case "InvalidArn": - case "com.amazonaws.sfn#InvalidArn": - throw await de_InvalidArnRes(parsedOutput, context); - case "ResourceNotFound": - case "com.amazonaws.sfn#ResourceNotFound": - throw await de_ResourceNotFoundRes(parsedOutput, context); - case "TooManyTags": - case "com.amazonaws.sfn#TooManyTags": - throw await de_TooManyTagsRes(parsedOutput, context); - default: - const parsedBody = parsedOutput.body; - return throwDefaultError({ - output, - parsedBody, - errorCode - }); + __name(_InvalidRequestException, "InvalidRequestException"); + var InvalidRequestException = _InvalidRequestException; + var _InvalidScopeException = class _InvalidScopeException2 extends SSOOIDCServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "InvalidScopeException", + $fault: "client", + ...opts + }); + this.name = "InvalidScopeException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _InvalidScopeException2.prototype); + this.error = opts.error; + this.error_description = opts.error_description; + } + }; + __name(_InvalidScopeException, "InvalidScopeException"); + var InvalidScopeException = _InvalidScopeException; + var _SlowDownException = class _SlowDownException2 extends SSOOIDCServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "SlowDownException", + $fault: "client", + ...opts + }); + this.name = "SlowDownException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _SlowDownException2.prototype); + this.error = opts.error; + this.error_description = opts.error_description; } }; - var de_UntagResourceCommand = async (output, context) => { - if (output.statusCode >= 300) { - return de_UntagResourceCommandError(output, context); + __name(_SlowDownException, "SlowDownException"); + var SlowDownException = _SlowDownException; + var _UnauthorizedClientException = class _UnauthorizedClientException2 extends SSOOIDCServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "UnauthorizedClientException", + $fault: "client", + ...opts + }); + this.name = "UnauthorizedClientException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _UnauthorizedClientException2.prototype); + this.error = opts.error; + this.error_description = opts.error_description; } - const data = await parseBody(output.body, context); - let contents = {}; - contents = (0, smithy_client_1._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; }; - exports2.de_UntagResourceCommand = de_UntagResourceCommand; - var de_UntagResourceCommandError = async (output, context) => { - const parsedOutput = { - ...output, - body: await parseErrorBody(output.body, context) - }; - const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); - switch (errorCode) { - case "InvalidArn": - case "com.amazonaws.sfn#InvalidArn": - throw await de_InvalidArnRes(parsedOutput, context); - case "ResourceNotFound": - case "com.amazonaws.sfn#ResourceNotFound": - throw await de_ResourceNotFoundRes(parsedOutput, context); - default: - const parsedBody = parsedOutput.body; - return throwDefaultError({ - output, - parsedBody, - errorCode - }); + __name(_UnauthorizedClientException, "UnauthorizedClientException"); + var UnauthorizedClientException = _UnauthorizedClientException; + var _UnsupportedGrantTypeException = class _UnsupportedGrantTypeException2 extends SSOOIDCServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "UnsupportedGrantTypeException", + $fault: "client", + ...opts + }); + this.name = "UnsupportedGrantTypeException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _UnsupportedGrantTypeException2.prototype); + this.error = opts.error; + this.error_description = opts.error_description; } }; - var de_UpdateMapRunCommand = async (output, context) => { - if (output.statusCode >= 300) { - return de_UpdateMapRunCommandError(output, context); + __name(_UnsupportedGrantTypeException, "UnsupportedGrantTypeException"); + var UnsupportedGrantTypeException = _UnsupportedGrantTypeException; + var _InvalidRequestRegionException = class _InvalidRequestRegionException2 extends SSOOIDCServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "InvalidRequestRegionException", + $fault: "client", + ...opts + }); + this.name = "InvalidRequestRegionException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _InvalidRequestRegionException2.prototype); + this.error = opts.error; + this.error_description = opts.error_description; + this.endpoint = opts.endpoint; + this.region = opts.region; } - const data = await parseBody(output.body, context); - let contents = {}; - contents = (0, smithy_client_1._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; }; - exports2.de_UpdateMapRunCommand = de_UpdateMapRunCommand; - var de_UpdateMapRunCommandError = async (output, context) => { - const parsedOutput = { - ...output, - body: await parseErrorBody(output.body, context) - }; - const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); - switch (errorCode) { - case "InvalidArn": - case "com.amazonaws.sfn#InvalidArn": - throw await de_InvalidArnRes(parsedOutput, context); - case "ResourceNotFound": - case "com.amazonaws.sfn#ResourceNotFound": - throw await de_ResourceNotFoundRes(parsedOutput, context); - case "ValidationException": - case "com.amazonaws.sfn#ValidationException": - throw await de_ValidationExceptionRes(parsedOutput, context); - default: - const parsedBody = parsedOutput.body; - return throwDefaultError({ - output, - parsedBody, - errorCode - }); + __name(_InvalidRequestRegionException, "InvalidRequestRegionException"); + var InvalidRequestRegionException = _InvalidRequestRegionException; + var _InvalidClientMetadataException = class _InvalidClientMetadataException2 extends SSOOIDCServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "InvalidClientMetadataException", + $fault: "client", + ...opts + }); + this.name = "InvalidClientMetadataException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _InvalidClientMetadataException2.prototype); + this.error = opts.error; + this.error_description = opts.error_description; } }; - var de_UpdateStateMachineCommand = async (output, context) => { - if (output.statusCode >= 300) { - return de_UpdateStateMachineCommandError(output, context); + __name(_InvalidClientMetadataException, "InvalidClientMetadataException"); + var InvalidClientMetadataException = _InvalidClientMetadataException; + var _InvalidRedirectUriException = class _InvalidRedirectUriException2 extends SSOOIDCServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "InvalidRedirectUriException", + $fault: "client", + ...opts + }); + this.name = "InvalidRedirectUriException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _InvalidRedirectUriException2.prototype); + this.error = opts.error; + this.error_description = opts.error_description; } - const data = await parseBody(output.body, context); - let contents = {}; - contents = de_UpdateStateMachineOutput(data, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; }; - exports2.de_UpdateStateMachineCommand = de_UpdateStateMachineCommand; - var de_UpdateStateMachineCommandError = async (output, context) => { - const parsedOutput = { - ...output, - body: await parseErrorBody(output.body, context) + __name(_InvalidRedirectUriException, "InvalidRedirectUriException"); + var InvalidRedirectUriException = _InvalidRedirectUriException; + var CreateTokenRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.clientSecret && { clientSecret: import_smithy_client5.SENSITIVE_STRING }, + ...obj.refreshToken && { refreshToken: import_smithy_client5.SENSITIVE_STRING }, + ...obj.codeVerifier && { codeVerifier: import_smithy_client5.SENSITIVE_STRING } + }), "CreateTokenRequestFilterSensitiveLog"); + var CreateTokenResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.accessToken && { accessToken: import_smithy_client5.SENSITIVE_STRING }, + ...obj.refreshToken && { refreshToken: import_smithy_client5.SENSITIVE_STRING }, + ...obj.idToken && { idToken: import_smithy_client5.SENSITIVE_STRING } + }), "CreateTokenResponseFilterSensitiveLog"); + var CreateTokenWithIAMRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.refreshToken && { refreshToken: import_smithy_client5.SENSITIVE_STRING }, + ...obj.assertion && { assertion: import_smithy_client5.SENSITIVE_STRING }, + ...obj.subjectToken && { subjectToken: import_smithy_client5.SENSITIVE_STRING }, + ...obj.codeVerifier && { codeVerifier: import_smithy_client5.SENSITIVE_STRING } + }), "CreateTokenWithIAMRequestFilterSensitiveLog"); + var CreateTokenWithIAMResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.accessToken && { accessToken: import_smithy_client5.SENSITIVE_STRING }, + ...obj.refreshToken && { refreshToken: import_smithy_client5.SENSITIVE_STRING }, + ...obj.idToken && { idToken: import_smithy_client5.SENSITIVE_STRING } + }), "CreateTokenWithIAMResponseFilterSensitiveLog"); + var RegisterClientResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.clientSecret && { clientSecret: import_smithy_client5.SENSITIVE_STRING } + }), "RegisterClientResponseFilterSensitiveLog"); + var StartDeviceAuthorizationRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.clientSecret && { clientSecret: import_smithy_client5.SENSITIVE_STRING } + }), "StartDeviceAuthorizationRequestFilterSensitiveLog"); + var import_core22 = (init_dist_es2(), __toCommonJS(dist_es_exports2)); + var se_CreateTokenCommand = /* @__PURE__ */ __name(async (input, context) => { + const b = (0, import_core3.requestBuilder)(input, context); + const headers = { + "content-type": "application/json" }; - const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); - switch (errorCode) { - case "ConflictException": - case "com.amazonaws.sfn#ConflictException": - throw await de_ConflictExceptionRes(parsedOutput, context); - case "InvalidArn": - case "com.amazonaws.sfn#InvalidArn": - throw await de_InvalidArnRes(parsedOutput, context); - case "InvalidDefinition": - case "com.amazonaws.sfn#InvalidDefinition": - throw await de_InvalidDefinitionRes(parsedOutput, context); - case "InvalidLoggingConfiguration": - case "com.amazonaws.sfn#InvalidLoggingConfiguration": - throw await de_InvalidLoggingConfigurationRes(parsedOutput, context); - case "InvalidTracingConfiguration": - case "com.amazonaws.sfn#InvalidTracingConfiguration": - throw await de_InvalidTracingConfigurationRes(parsedOutput, context); - case "MissingRequiredParameter": - case "com.amazonaws.sfn#MissingRequiredParameter": - throw await de_MissingRequiredParameterRes(parsedOutput, context); - case "ServiceQuotaExceededException": - case "com.amazonaws.sfn#ServiceQuotaExceededException": - throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context); - case "StateMachineDeleting": - case "com.amazonaws.sfn#StateMachineDeleting": - throw await de_StateMachineDeletingRes(parsedOutput, context); - case "StateMachineDoesNotExist": - case "com.amazonaws.sfn#StateMachineDoesNotExist": - throw await de_StateMachineDoesNotExistRes(parsedOutput, context); - case "ValidationException": - case "com.amazonaws.sfn#ValidationException": - throw await de_ValidationExceptionRes(parsedOutput, context); - default: - const parsedBody = parsedOutput.body; - return throwDefaultError({ - output, - parsedBody, - errorCode - }); + b.bp("/token"); + let body; + body = JSON.stringify( + (0, import_smithy_client5.take)(input, { + clientId: [], + clientSecret: [], + code: [], + codeVerifier: [], + deviceCode: [], + grantType: [], + redirectUri: [], + refreshToken: [], + scope: (_) => (0, import_smithy_client5._json)(_) + }) + ); + b.m("POST").h(headers).b(body); + return b.build(); + }, "se_CreateTokenCommand"); + var se_CreateTokenWithIAMCommand = /* @__PURE__ */ __name(async (input, context) => { + const b = (0, import_core3.requestBuilder)(input, context); + const headers = { + "content-type": "application/json" + }; + b.bp("/token"); + const query = (0, import_smithy_client5.map)({ + [_ai]: [, "t"] + }); + let body; + body = JSON.stringify( + (0, import_smithy_client5.take)(input, { + assertion: [], + clientId: [], + code: [], + codeVerifier: [], + grantType: [], + redirectUri: [], + refreshToken: [], + requestedTokenType: [], + scope: (_) => (0, import_smithy_client5._json)(_), + subjectToken: [], + subjectTokenType: [] + }) + ); + b.m("POST").h(headers).q(query).b(body); + return b.build(); + }, "se_CreateTokenWithIAMCommand"); + var se_RegisterClientCommand = /* @__PURE__ */ __name(async (input, context) => { + const b = (0, import_core3.requestBuilder)(input, context); + const headers = { + "content-type": "application/json" + }; + b.bp("/client/register"); + let body; + body = JSON.stringify( + (0, import_smithy_client5.take)(input, { + clientName: [], + clientType: [], + entitledApplicationArn: [], + grantTypes: (_) => (0, import_smithy_client5._json)(_), + issuerUrl: [], + redirectUris: (_) => (0, import_smithy_client5._json)(_), + scopes: (_) => (0, import_smithy_client5._json)(_) + }) + ); + b.m("POST").h(headers).b(body); + return b.build(); + }, "se_RegisterClientCommand"); + var se_StartDeviceAuthorizationCommand = /* @__PURE__ */ __name(async (input, context) => { + const b = (0, import_core3.requestBuilder)(input, context); + const headers = { + "content-type": "application/json" + }; + b.bp("/device_authorization"); + let body; + body = JSON.stringify( + (0, import_smithy_client5.take)(input, { + clientId: [], + clientSecret: [], + startUrl: [] + }) + ); + b.m("POST").h(headers).b(body); + return b.build(); + }, "se_StartDeviceAuthorizationCommand"); + var de_CreateTokenCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError(output, context); } - }; - var de_UpdateStateMachineAliasCommand = async (output, context) => { - if (output.statusCode >= 300) { - return de_UpdateStateMachineAliasCommandError(output, context); + const contents = (0, import_smithy_client5.map)({ + $metadata: deserializeMetadata(output) + }); + const data = (0, import_smithy_client5.expectNonNull)((0, import_smithy_client5.expectObject)(await (0, import_core22.parseJsonBody)(output.body, context)), "body"); + const doc = (0, import_smithy_client5.take)(data, { + accessToken: import_smithy_client5.expectString, + expiresIn: import_smithy_client5.expectInt32, + idToken: import_smithy_client5.expectString, + refreshToken: import_smithy_client5.expectString, + tokenType: import_smithy_client5.expectString + }); + Object.assign(contents, doc); + return contents; + }, "de_CreateTokenCommand"); + var de_CreateTokenWithIAMCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError(output, context); } - const data = await parseBody(output.body, context); - let contents = {}; - contents = de_UpdateStateMachineAliasOutput(data, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; - }; - exports2.de_UpdateStateMachineAliasCommand = de_UpdateStateMachineAliasCommand; - var de_UpdateStateMachineAliasCommandError = async (output, context) => { + const contents = (0, import_smithy_client5.map)({ + $metadata: deserializeMetadata(output) + }); + const data = (0, import_smithy_client5.expectNonNull)((0, import_smithy_client5.expectObject)(await (0, import_core22.parseJsonBody)(output.body, context)), "body"); + const doc = (0, import_smithy_client5.take)(data, { + accessToken: import_smithy_client5.expectString, + expiresIn: import_smithy_client5.expectInt32, + idToken: import_smithy_client5.expectString, + issuedTokenType: import_smithy_client5.expectString, + refreshToken: import_smithy_client5.expectString, + scope: import_smithy_client5._json, + tokenType: import_smithy_client5.expectString + }); + Object.assign(contents, doc); + return contents; + }, "de_CreateTokenWithIAMCommand"); + var de_RegisterClientCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError(output, context); + } + const contents = (0, import_smithy_client5.map)({ + $metadata: deserializeMetadata(output) + }); + const data = (0, import_smithy_client5.expectNonNull)((0, import_smithy_client5.expectObject)(await (0, import_core22.parseJsonBody)(output.body, context)), "body"); + const doc = (0, import_smithy_client5.take)(data, { + authorizationEndpoint: import_smithy_client5.expectString, + clientId: import_smithy_client5.expectString, + clientIdIssuedAt: import_smithy_client5.expectLong, + clientSecret: import_smithy_client5.expectString, + clientSecretExpiresAt: import_smithy_client5.expectLong, + tokenEndpoint: import_smithy_client5.expectString + }); + Object.assign(contents, doc); + return contents; + }, "de_RegisterClientCommand"); + var de_StartDeviceAuthorizationCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError(output, context); + } + const contents = (0, import_smithy_client5.map)({ + $metadata: deserializeMetadata(output) + }); + const data = (0, import_smithy_client5.expectNonNull)((0, import_smithy_client5.expectObject)(await (0, import_core22.parseJsonBody)(output.body, context)), "body"); + const doc = (0, import_smithy_client5.take)(data, { + deviceCode: import_smithy_client5.expectString, + expiresIn: import_smithy_client5.expectInt32, + interval: import_smithy_client5.expectInt32, + userCode: import_smithy_client5.expectString, + verificationUri: import_smithy_client5.expectString, + verificationUriComplete: import_smithy_client5.expectString + }); + Object.assign(contents, doc); + return contents; + }, "de_StartDeviceAuthorizationCommand"); + var de_CommandError = /* @__PURE__ */ __name(async (output, context) => { const parsedOutput = { ...output, - body: await parseErrorBody(output.body, context) + body: await (0, import_core22.parseJsonErrorBody)(output.body, context) }; - const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + const errorCode = (0, import_core22.loadRestJsonErrorCode)(output, parsedOutput.body); switch (errorCode) { - case "ConflictException": - case "com.amazonaws.sfn#ConflictException": - throw await de_ConflictExceptionRes(parsedOutput, context); - case "InvalidArn": - case "com.amazonaws.sfn#InvalidArn": - throw await de_InvalidArnRes(parsedOutput, context); - case "ResourceNotFound": - case "com.amazonaws.sfn#ResourceNotFound": - throw await de_ResourceNotFoundRes(parsedOutput, context); - case "ValidationException": - case "com.amazonaws.sfn#ValidationException": - throw await de_ValidationExceptionRes(parsedOutput, context); + case "AccessDeniedException": + case "com.amazonaws.ssooidc#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "AuthorizationPendingException": + case "com.amazonaws.ssooidc#AuthorizationPendingException": + throw await de_AuthorizationPendingExceptionRes(parsedOutput, context); + case "ExpiredTokenException": + case "com.amazonaws.ssooidc#ExpiredTokenException": + throw await de_ExpiredTokenExceptionRes(parsedOutput, context); + case "InternalServerException": + case "com.amazonaws.ssooidc#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "InvalidClientException": + case "com.amazonaws.ssooidc#InvalidClientException": + throw await de_InvalidClientExceptionRes(parsedOutput, context); + case "InvalidGrantException": + case "com.amazonaws.ssooidc#InvalidGrantException": + throw await de_InvalidGrantExceptionRes(parsedOutput, context); + case "InvalidRequestException": + case "com.amazonaws.ssooidc#InvalidRequestException": + throw await de_InvalidRequestExceptionRes(parsedOutput, context); + case "InvalidScopeException": + case "com.amazonaws.ssooidc#InvalidScopeException": + throw await de_InvalidScopeExceptionRes(parsedOutput, context); + case "SlowDownException": + case "com.amazonaws.ssooidc#SlowDownException": + throw await de_SlowDownExceptionRes(parsedOutput, context); + case "UnauthorizedClientException": + case "com.amazonaws.ssooidc#UnauthorizedClientException": + throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); + case "UnsupportedGrantTypeException": + case "com.amazonaws.ssooidc#UnsupportedGrantTypeException": + throw await de_UnsupportedGrantTypeExceptionRes(parsedOutput, context); + case "InvalidRequestRegionException": + case "com.amazonaws.ssooidc#InvalidRequestRegionException": + throw await de_InvalidRequestRegionExceptionRes(parsedOutput, context); + case "InvalidClientMetadataException": + case "com.amazonaws.ssooidc#InvalidClientMetadataException": + throw await de_InvalidClientMetadataExceptionRes(parsedOutput, context); + case "InvalidRedirectUriException": + case "com.amazonaws.ssooidc#InvalidRedirectUriException": + throw await de_InvalidRedirectUriExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; return throwDefaultError({ @@ -19690,590 +19817,2227 @@ var require_Aws_json1_0 = __commonJS({ errorCode }); } - }; - var de_ActivityDoesNotExistRes = async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = (0, smithy_client_1._json)(body); - const exception = new models_0_1.ActivityDoesNotExist({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized + }, "de_CommandError"); + var throwDefaultError = (0, import_smithy_client5.withBaseException)(SSOOIDCServiceException); + var de_AccessDeniedExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const contents = (0, import_smithy_client5.map)({}); + const data = parsedOutput.body; + const doc = (0, import_smithy_client5.take)(data, { + error: import_smithy_client5.expectString, + error_description: import_smithy_client5.expectString }); - return (0, smithy_client_1.decorateServiceException)(exception, body); - }; - var de_ActivityLimitExceededRes = async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = (0, smithy_client_1._json)(body); - const exception = new models_0_1.ActivityLimitExceeded({ + Object.assign(contents, doc); + const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), - ...deserialized + ...contents }); - return (0, smithy_client_1.decorateServiceException)(exception, body); - }; - var de_ActivityWorkerLimitExceededRes = async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = (0, smithy_client_1._json)(body); - const exception = new models_0_1.ActivityWorkerLimitExceeded({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized + return (0, import_smithy_client5.decorateServiceException)(exception, parsedOutput.body); + }, "de_AccessDeniedExceptionRes"); + var de_AuthorizationPendingExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const contents = (0, import_smithy_client5.map)({}); + const data = parsedOutput.body; + const doc = (0, import_smithy_client5.take)(data, { + error: import_smithy_client5.expectString, + error_description: import_smithy_client5.expectString }); - return (0, smithy_client_1.decorateServiceException)(exception, body); - }; - var de_ConflictExceptionRes = async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = (0, smithy_client_1._json)(body); - const exception = new models_0_1.ConflictException({ + Object.assign(contents, doc); + const exception = new AuthorizationPendingException({ $metadata: deserializeMetadata(parsedOutput), - ...deserialized + ...contents }); - return (0, smithy_client_1.decorateServiceException)(exception, body); - }; - var de_ExecutionAlreadyExistsRes = async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = (0, smithy_client_1._json)(body); - const exception = new models_0_1.ExecutionAlreadyExists({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized + return (0, import_smithy_client5.decorateServiceException)(exception, parsedOutput.body); + }, "de_AuthorizationPendingExceptionRes"); + var de_ExpiredTokenExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const contents = (0, import_smithy_client5.map)({}); + const data = parsedOutput.body; + const doc = (0, import_smithy_client5.take)(data, { + error: import_smithy_client5.expectString, + error_description: import_smithy_client5.expectString }); - return (0, smithy_client_1.decorateServiceException)(exception, body); - }; - var de_ExecutionDoesNotExistRes = async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = (0, smithy_client_1._json)(body); - const exception = new models_0_1.ExecutionDoesNotExist({ + Object.assign(contents, doc); + const exception = new ExpiredTokenException({ $metadata: deserializeMetadata(parsedOutput), - ...deserialized + ...contents }); - return (0, smithy_client_1.decorateServiceException)(exception, body); - }; - var de_ExecutionLimitExceededRes = async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = (0, smithy_client_1._json)(body); - const exception = new models_0_1.ExecutionLimitExceeded({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized + return (0, import_smithy_client5.decorateServiceException)(exception, parsedOutput.body); + }, "de_ExpiredTokenExceptionRes"); + var de_InternalServerExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const contents = (0, import_smithy_client5.map)({}); + const data = parsedOutput.body; + const doc = (0, import_smithy_client5.take)(data, { + error: import_smithy_client5.expectString, + error_description: import_smithy_client5.expectString }); - return (0, smithy_client_1.decorateServiceException)(exception, body); - }; - var de_InvalidArnRes = async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = (0, smithy_client_1._json)(body); - const exception = new models_0_1.InvalidArn({ + Object.assign(contents, doc); + const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), - ...deserialized + ...contents }); - return (0, smithy_client_1.decorateServiceException)(exception, body); - }; - var de_InvalidDefinitionRes = async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = (0, smithy_client_1._json)(body); - const exception = new models_0_1.InvalidDefinition({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized + return (0, import_smithy_client5.decorateServiceException)(exception, parsedOutput.body); + }, "de_InternalServerExceptionRes"); + var de_InvalidClientExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const contents = (0, import_smithy_client5.map)({}); + const data = parsedOutput.body; + const doc = (0, import_smithy_client5.take)(data, { + error: import_smithy_client5.expectString, + error_description: import_smithy_client5.expectString }); - return (0, smithy_client_1.decorateServiceException)(exception, body); - }; - var de_InvalidExecutionInputRes = async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = (0, smithy_client_1._json)(body); - const exception = new models_0_1.InvalidExecutionInput({ + Object.assign(contents, doc); + const exception = new InvalidClientException({ $metadata: deserializeMetadata(parsedOutput), - ...deserialized + ...contents }); - return (0, smithy_client_1.decorateServiceException)(exception, body); - }; - var de_InvalidLoggingConfigurationRes = async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = (0, smithy_client_1._json)(body); - const exception = new models_0_1.InvalidLoggingConfiguration({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized + return (0, import_smithy_client5.decorateServiceException)(exception, parsedOutput.body); + }, "de_InvalidClientExceptionRes"); + var de_InvalidClientMetadataExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const contents = (0, import_smithy_client5.map)({}); + const data = parsedOutput.body; + const doc = (0, import_smithy_client5.take)(data, { + error: import_smithy_client5.expectString, + error_description: import_smithy_client5.expectString }); - return (0, smithy_client_1.decorateServiceException)(exception, body); - }; - var de_InvalidNameRes = async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = (0, smithy_client_1._json)(body); - const exception = new models_0_1.InvalidName({ + Object.assign(contents, doc); + const exception = new InvalidClientMetadataException({ $metadata: deserializeMetadata(parsedOutput), - ...deserialized + ...contents }); - return (0, smithy_client_1.decorateServiceException)(exception, body); - }; - var de_InvalidOutputRes = async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = (0, smithy_client_1._json)(body); - const exception = new models_0_1.InvalidOutput({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized + return (0, import_smithy_client5.decorateServiceException)(exception, parsedOutput.body); + }, "de_InvalidClientMetadataExceptionRes"); + var de_InvalidGrantExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const contents = (0, import_smithy_client5.map)({}); + const data = parsedOutput.body; + const doc = (0, import_smithy_client5.take)(data, { + error: import_smithy_client5.expectString, + error_description: import_smithy_client5.expectString }); - return (0, smithy_client_1.decorateServiceException)(exception, body); - }; - var de_InvalidTokenRes = async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = (0, smithy_client_1._json)(body); - const exception = new models_0_1.InvalidToken({ + Object.assign(contents, doc); + const exception = new InvalidGrantException({ $metadata: deserializeMetadata(parsedOutput), - ...deserialized + ...contents }); - return (0, smithy_client_1.decorateServiceException)(exception, body); - }; - var de_InvalidTracingConfigurationRes = async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = (0, smithy_client_1._json)(body); - const exception = new models_0_1.InvalidTracingConfiguration({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized + return (0, import_smithy_client5.decorateServiceException)(exception, parsedOutput.body); + }, "de_InvalidGrantExceptionRes"); + var de_InvalidRedirectUriExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const contents = (0, import_smithy_client5.map)({}); + const data = parsedOutput.body; + const doc = (0, import_smithy_client5.take)(data, { + error: import_smithy_client5.expectString, + error_description: import_smithy_client5.expectString }); - return (0, smithy_client_1.decorateServiceException)(exception, body); - }; - var de_MissingRequiredParameterRes = async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = (0, smithy_client_1._json)(body); - const exception = new models_0_1.MissingRequiredParameter({ + Object.assign(contents, doc); + const exception = new InvalidRedirectUriException({ $metadata: deserializeMetadata(parsedOutput), - ...deserialized + ...contents }); - return (0, smithy_client_1.decorateServiceException)(exception, body); - }; - var de_ResourceNotFoundRes = async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = (0, smithy_client_1._json)(body); - const exception = new models_0_1.ResourceNotFound({ + return (0, import_smithy_client5.decorateServiceException)(exception, parsedOutput.body); + }, "de_InvalidRedirectUriExceptionRes"); + var de_InvalidRequestExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const contents = (0, import_smithy_client5.map)({}); + const data = parsedOutput.body; + const doc = (0, import_smithy_client5.take)(data, { + error: import_smithy_client5.expectString, + error_description: import_smithy_client5.expectString + }); + Object.assign(contents, doc); + const exception = new InvalidRequestException({ $metadata: deserializeMetadata(parsedOutput), - ...deserialized + ...contents }); - return (0, smithy_client_1.decorateServiceException)(exception, body); - }; - var de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = (0, smithy_client_1._json)(body); - const exception = new models_0_1.ServiceQuotaExceededException({ + return (0, import_smithy_client5.decorateServiceException)(exception, parsedOutput.body); + }, "de_InvalidRequestExceptionRes"); + var de_InvalidRequestRegionExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const contents = (0, import_smithy_client5.map)({}); + const data = parsedOutput.body; + const doc = (0, import_smithy_client5.take)(data, { + endpoint: import_smithy_client5.expectString, + error: import_smithy_client5.expectString, + error_description: import_smithy_client5.expectString, + region: import_smithy_client5.expectString + }); + Object.assign(contents, doc); + const exception = new InvalidRequestRegionException({ $metadata: deserializeMetadata(parsedOutput), - ...deserialized + ...contents }); - return (0, smithy_client_1.decorateServiceException)(exception, body); - }; - var de_StateMachineAlreadyExistsRes = async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = (0, smithy_client_1._json)(body); - const exception = new models_0_1.StateMachineAlreadyExists({ + return (0, import_smithy_client5.decorateServiceException)(exception, parsedOutput.body); + }, "de_InvalidRequestRegionExceptionRes"); + var de_InvalidScopeExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const contents = (0, import_smithy_client5.map)({}); + const data = parsedOutput.body; + const doc = (0, import_smithy_client5.take)(data, { + error: import_smithy_client5.expectString, + error_description: import_smithy_client5.expectString + }); + Object.assign(contents, doc); + const exception = new InvalidScopeException({ $metadata: deserializeMetadata(parsedOutput), - ...deserialized + ...contents }); - return (0, smithy_client_1.decorateServiceException)(exception, body); - }; - var de_StateMachineDeletingRes = async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = (0, smithy_client_1._json)(body); - const exception = new models_0_1.StateMachineDeleting({ + return (0, import_smithy_client5.decorateServiceException)(exception, parsedOutput.body); + }, "de_InvalidScopeExceptionRes"); + var de_SlowDownExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const contents = (0, import_smithy_client5.map)({}); + const data = parsedOutput.body; + const doc = (0, import_smithy_client5.take)(data, { + error: import_smithy_client5.expectString, + error_description: import_smithy_client5.expectString + }); + Object.assign(contents, doc); + const exception = new SlowDownException({ $metadata: deserializeMetadata(parsedOutput), - ...deserialized + ...contents }); - return (0, smithy_client_1.decorateServiceException)(exception, body); - }; - var de_StateMachineDoesNotExistRes = async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = (0, smithy_client_1._json)(body); - const exception = new models_0_1.StateMachineDoesNotExist({ + return (0, import_smithy_client5.decorateServiceException)(exception, parsedOutput.body); + }, "de_SlowDownExceptionRes"); + var de_UnauthorizedClientExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const contents = (0, import_smithy_client5.map)({}); + const data = parsedOutput.body; + const doc = (0, import_smithy_client5.take)(data, { + error: import_smithy_client5.expectString, + error_description: import_smithy_client5.expectString + }); + Object.assign(contents, doc); + const exception = new UnauthorizedClientException({ $metadata: deserializeMetadata(parsedOutput), - ...deserialized + ...contents }); - return (0, smithy_client_1.decorateServiceException)(exception, body); - }; - var de_StateMachineLimitExceededRes = async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = (0, smithy_client_1._json)(body); - const exception = new models_0_1.StateMachineLimitExceeded({ + return (0, import_smithy_client5.decorateServiceException)(exception, parsedOutput.body); + }, "de_UnauthorizedClientExceptionRes"); + var de_UnsupportedGrantTypeExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const contents = (0, import_smithy_client5.map)({}); + const data = parsedOutput.body; + const doc = (0, import_smithy_client5.take)(data, { + error: import_smithy_client5.expectString, + error_description: import_smithy_client5.expectString + }); + Object.assign(contents, doc); + const exception = new UnsupportedGrantTypeException({ $metadata: deserializeMetadata(parsedOutput), - ...deserialized + ...contents }); - return (0, smithy_client_1.decorateServiceException)(exception, body); + return (0, import_smithy_client5.decorateServiceException)(exception, parsedOutput.body); + }, "de_UnsupportedGrantTypeExceptionRes"); + var deserializeMetadata = /* @__PURE__ */ __name((output) => ({ + httpStatusCode: output.statusCode, + requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"], + extendedRequestId: output.headers["x-amz-id-2"], + cfId: output.headers["x-amz-cf-id"] + }), "deserializeMetadata"); + var _ai = "aws_iam"; + var _CreateTokenCommand = class _CreateTokenCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("AWSSSOOIDCService", "CreateToken", {}).n("SSOOIDCClient", "CreateTokenCommand").f(CreateTokenRequestFilterSensitiveLog, CreateTokenResponseFilterSensitiveLog).ser(se_CreateTokenCommand).de(de_CreateTokenCommand).build() { + }; + __name(_CreateTokenCommand, "CreateTokenCommand"); + var CreateTokenCommand = _CreateTokenCommand; + var _CreateTokenWithIAMCommand = class _CreateTokenWithIAMCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("AWSSSOOIDCService", "CreateTokenWithIAM", {}).n("SSOOIDCClient", "CreateTokenWithIAMCommand").f(CreateTokenWithIAMRequestFilterSensitiveLog, CreateTokenWithIAMResponseFilterSensitiveLog).ser(se_CreateTokenWithIAMCommand).de(de_CreateTokenWithIAMCommand).build() { + }; + __name(_CreateTokenWithIAMCommand, "CreateTokenWithIAMCommand"); + var CreateTokenWithIAMCommand = _CreateTokenWithIAMCommand; + var _RegisterClientCommand = class _RegisterClientCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("AWSSSOOIDCService", "RegisterClient", {}).n("SSOOIDCClient", "RegisterClientCommand").f(void 0, RegisterClientResponseFilterSensitiveLog).ser(se_RegisterClientCommand).de(de_RegisterClientCommand).build() { + }; + __name(_RegisterClientCommand, "RegisterClientCommand"); + var RegisterClientCommand = _RegisterClientCommand; + var _StartDeviceAuthorizationCommand = class _StartDeviceAuthorizationCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("AWSSSOOIDCService", "StartDeviceAuthorization", {}).n("SSOOIDCClient", "StartDeviceAuthorizationCommand").f(StartDeviceAuthorizationRequestFilterSensitiveLog, void 0).ser(se_StartDeviceAuthorizationCommand).de(de_StartDeviceAuthorizationCommand).build() { + }; + __name(_StartDeviceAuthorizationCommand, "StartDeviceAuthorizationCommand"); + var StartDeviceAuthorizationCommand = _StartDeviceAuthorizationCommand; + var commands = { + CreateTokenCommand, + CreateTokenWithIAMCommand, + RegisterClientCommand, + StartDeviceAuthorizationCommand + }; + var _SSOOIDC = class _SSOOIDC extends SSOOIDCClient { + }; + __name(_SSOOIDC, "SSOOIDC"); + var SSOOIDC = _SSOOIDC; + (0, import_smithy_client5.createAggregatedClient)(commands, SSOOIDC); + } +}); + +// ../../../node_modules/@aws-sdk/token-providers/dist-cjs/index.js +var require_dist_cjs73 = __commonJS({ + "../../../node_modules/@aws-sdk/token-providers/dist-cjs/index.js"(exports2, module2) { + "use strict"; + var __create2 = Object.create; + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __getProtoOf2 = Object.getPrototypeOf; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all) => { + for (var name in all) + __defProp2(target, name, { get: all[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target, + mod + )); + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + fromSso: () => fromSso, + fromStatic: () => fromStatic, + nodeProvider: () => nodeProvider + }); + module2.exports = __toCommonJS2(src_exports); + var EXPIRE_WINDOW_MS = 5 * 60 * 1e3; + var REFRESH_MESSAGE = `To refresh this SSO session run 'aws sso login' with the corresponding profile.`; + var ssoOidcClientsHash = {}; + var getSsoOidcClient = /* @__PURE__ */ __name(async (ssoRegion) => { + const { SSOOIDCClient } = await Promise.resolve().then(() => __toESM2(require_dist_cjs72())); + if (ssoOidcClientsHash[ssoRegion]) { + return ssoOidcClientsHash[ssoRegion]; + } + const ssoOidcClient = new SSOOIDCClient({ region: ssoRegion }); + ssoOidcClientsHash[ssoRegion] = ssoOidcClient; + return ssoOidcClient; + }, "getSsoOidcClient"); + var getNewSsoOidcToken = /* @__PURE__ */ __name(async (ssoToken, ssoRegion) => { + const { CreateTokenCommand } = await Promise.resolve().then(() => __toESM2(require_dist_cjs72())); + const ssoOidcClient = await getSsoOidcClient(ssoRegion); + return ssoOidcClient.send( + new CreateTokenCommand({ + clientId: ssoToken.clientId, + clientSecret: ssoToken.clientSecret, + refreshToken: ssoToken.refreshToken, + grantType: "refresh_token" + }) + ); + }, "getNewSsoOidcToken"); + var import_property_provider2 = require_dist_cjs40(); + var validateTokenExpiry = /* @__PURE__ */ __name((token) => { + if (token.expiration && token.expiration.getTime() < Date.now()) { + throw new import_property_provider2.TokenProviderError(`Token is expired. ${REFRESH_MESSAGE}`, false); + } + }, "validateTokenExpiry"); + var validateTokenKey = /* @__PURE__ */ __name((key, value, forRefresh = false) => { + if (typeof value === "undefined") { + throw new import_property_provider2.TokenProviderError( + `Value not present for '${key}' in SSO Token${forRefresh ? ". Cannot refresh" : ""}. ${REFRESH_MESSAGE}`, + false + ); + } + }, "validateTokenKey"); + var import_shared_ini_file_loader = require_dist_cjs41(); + var import_fs = require("fs"); + var { writeFile } = import_fs.promises; + var writeSSOTokenToFile = /* @__PURE__ */ __name((id, ssoToken) => { + const tokenFilepath = (0, import_shared_ini_file_loader.getSSOTokenFilepath)(id); + const tokenString = JSON.stringify(ssoToken, null, 2); + return writeFile(tokenFilepath, tokenString); + }, "writeSSOTokenToFile"); + var lastRefreshAttemptTime = /* @__PURE__ */ new Date(0); + var fromSso = /* @__PURE__ */ __name((init = {}) => async () => { + var _a; + (_a = init.logger) == null ? void 0 : _a.debug("@aws-sdk/token-providers - fromSso"); + const profiles = await (0, import_shared_ini_file_loader.parseKnownFiles)(init); + const profileName = (0, import_shared_ini_file_loader.getProfileName)(init); + const profile = profiles[profileName]; + if (!profile) { + throw new import_property_provider2.TokenProviderError(`Profile '${profileName}' could not be found in shared credentials file.`, false); + } else if (!profile["sso_session"]) { + throw new import_property_provider2.TokenProviderError(`Profile '${profileName}' is missing required property 'sso_session'.`); + } + const ssoSessionName = profile["sso_session"]; + const ssoSessions = await (0, import_shared_ini_file_loader.loadSsoSessionData)(init); + const ssoSession = ssoSessions[ssoSessionName]; + if (!ssoSession) { + throw new import_property_provider2.TokenProviderError( + `Sso session '${ssoSessionName}' could not be found in shared credentials file.`, + false + ); + } + for (const ssoSessionRequiredKey of ["sso_start_url", "sso_region"]) { + if (!ssoSession[ssoSessionRequiredKey]) { + throw new import_property_provider2.TokenProviderError( + `Sso session '${ssoSessionName}' is missing required property '${ssoSessionRequiredKey}'.`, + false + ); + } + } + const ssoStartUrl = ssoSession["sso_start_url"]; + const ssoRegion = ssoSession["sso_region"]; + let ssoToken; + try { + ssoToken = await (0, import_shared_ini_file_loader.getSSOTokenFromFile)(ssoSessionName); + } catch (e) { + throw new import_property_provider2.TokenProviderError( + `The SSO session token associated with profile=${profileName} was not found or is invalid. ${REFRESH_MESSAGE}`, + false + ); + } + validateTokenKey("accessToken", ssoToken.accessToken); + validateTokenKey("expiresAt", ssoToken.expiresAt); + const { accessToken, expiresAt } = ssoToken; + const existingToken = { token: accessToken, expiration: new Date(expiresAt) }; + if (existingToken.expiration.getTime() - Date.now() > EXPIRE_WINDOW_MS) { + return existingToken; + } + if (Date.now() - lastRefreshAttemptTime.getTime() < 30 * 1e3) { + validateTokenExpiry(existingToken); + return existingToken; + } + validateTokenKey("clientId", ssoToken.clientId, true); + validateTokenKey("clientSecret", ssoToken.clientSecret, true); + validateTokenKey("refreshToken", ssoToken.refreshToken, true); + try { + lastRefreshAttemptTime.setTime(Date.now()); + const newSsoOidcToken = await getNewSsoOidcToken(ssoToken, ssoRegion); + validateTokenKey("accessToken", newSsoOidcToken.accessToken); + validateTokenKey("expiresIn", newSsoOidcToken.expiresIn); + const newTokenExpiration = new Date(Date.now() + newSsoOidcToken.expiresIn * 1e3); + try { + await writeSSOTokenToFile(ssoSessionName, { + ...ssoToken, + accessToken: newSsoOidcToken.accessToken, + expiresAt: newTokenExpiration.toISOString(), + refreshToken: newSsoOidcToken.refreshToken + }); + } catch (error) { + } + return { + token: newSsoOidcToken.accessToken, + expiration: newTokenExpiration + }; + } catch (error) { + validateTokenExpiry(existingToken); + return existingToken; + } + }, "fromSso"); + var fromStatic = /* @__PURE__ */ __name(({ token, logger }) => async () => { + logger == null ? void 0 : logger.debug("@aws-sdk/token-providers - fromStatic"); + if (!token || !token.token) { + throw new import_property_provider2.TokenProviderError(`Please pass a valid token to fromStatic`, false); + } + return token; + }, "fromStatic"); + var nodeProvider = /* @__PURE__ */ __name((init = {}) => (0, import_property_provider2.memoize)( + (0, import_property_provider2.chain)(fromSso(init), async () => { + throw new import_property_provider2.TokenProviderError("Could not load token from any providers", false); + }), + (token) => token.expiration !== void 0 && token.expiration.getTime() - Date.now() < 3e5, + (token) => token.expiration !== void 0 + ), "nodeProvider"); + } +}); + +// ../../../node_modules/@aws-sdk/credential-provider-sso/dist-cjs/index.js +var require_dist_cjs74 = __commonJS({ + "../../../node_modules/@aws-sdk/credential-provider-sso/dist-cjs/index.js"(exports2, module2) { + "use strict"; + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __esm2 = (fn, res) => function __init() { + return fn && (res = (0, fn[__getOwnPropNames2(fn)[0]])(fn = 0)), res; }; - var de_StateMachineTypeNotSupportedRes = async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = (0, smithy_client_1._json)(body); - const exception = new models_0_1.StateMachineTypeNotSupported({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, smithy_client_1.decorateServiceException)(exception, body); + var __export2 = (target, all) => { + for (var name in all) + __defProp2(target, name, { get: all[name], enumerable: true }); }; - var de_TaskDoesNotExistRes = async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = (0, smithy_client_1._json)(body); - const exception = new models_0_1.TaskDoesNotExist({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, smithy_client_1.decorateServiceException)(exception, body); + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; }; - var de_TaskTimedOutRes = async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = (0, smithy_client_1._json)(body); - const exception = new models_0_1.TaskTimedOut({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, smithy_client_1.decorateServiceException)(exception, body); + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var loadSso_exports = {}; + __export2(loadSso_exports, { + GetRoleCredentialsCommand: () => import_client_sso.GetRoleCredentialsCommand, + SSOClient: () => import_client_sso.SSOClient + }); + var import_client_sso; + var init_loadSso = __esm2({ + "src/loadSso.ts"() { + "use strict"; + import_client_sso = require_dist_cjs71(); + } + }); + var src_exports = {}; + __export2(src_exports, { + fromSSO: () => fromSSO, + isSsoProfile: () => isSsoProfile, + validateSsoProfile: () => validateSsoProfile + }); + module2.exports = __toCommonJS2(src_exports); + var isSsoProfile = /* @__PURE__ */ __name((arg) => arg && (typeof arg.sso_start_url === "string" || typeof arg.sso_account_id === "string" || typeof arg.sso_session === "string" || typeof arg.sso_region === "string" || typeof arg.sso_role_name === "string"), "isSsoProfile"); + var import_token_providers = require_dist_cjs73(); + var import_property_provider2 = require_dist_cjs40(); + var import_shared_ini_file_loader = require_dist_cjs41(); + var SHOULD_FAIL_CREDENTIAL_CHAIN = false; + var resolveSSOCredentials = /* @__PURE__ */ __name(async ({ + ssoStartUrl, + ssoSession, + ssoAccountId, + ssoRegion, + ssoRoleName, + ssoClient, + clientConfig, + profile, + logger + }) => { + let token; + const refreshMessage = `To refresh this SSO session run aws sso login with the corresponding profile.`; + if (ssoSession) { + try { + const _token = await (0, import_token_providers.fromSso)({ profile })(); + token = { + accessToken: _token.token, + expiresAt: new Date(_token.expiration).toISOString() + }; + } catch (e) { + throw new import_property_provider2.CredentialsProviderError(e.message, { + tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN, + logger + }); + } + } else { + try { + token = await (0, import_shared_ini_file_loader.getSSOTokenFromFile)(ssoStartUrl); + } catch (e) { + throw new import_property_provider2.CredentialsProviderError(`The SSO session associated with this profile is invalid. ${refreshMessage}`, { + tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN, + logger + }); + } + } + if (new Date(token.expiresAt).getTime() - Date.now() <= 0) { + throw new import_property_provider2.CredentialsProviderError(`The SSO session associated with this profile has expired. ${refreshMessage}`, { + tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN, + logger + }); + } + const { accessToken } = token; + const { SSOClient: SSOClient2, GetRoleCredentialsCommand: GetRoleCredentialsCommand2 } = await Promise.resolve().then(() => (init_loadSso(), loadSso_exports)); + const sso = ssoClient || new SSOClient2( + Object.assign({}, clientConfig ?? {}, { + region: (clientConfig == null ? void 0 : clientConfig.region) ?? ssoRegion + }) + ); + let ssoResp; + try { + ssoResp = await sso.send( + new GetRoleCredentialsCommand2({ + accountId: ssoAccountId, + roleName: ssoRoleName, + accessToken + }) + ); + } catch (e) { + throw new import_property_provider2.CredentialsProviderError(e, { + tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN, + logger + }); + } + const { + roleCredentials: { accessKeyId, secretAccessKey, sessionToken, expiration, credentialScope, accountId } = {} + } = ssoResp; + if (!accessKeyId || !secretAccessKey || !sessionToken || !expiration) { + throw new import_property_provider2.CredentialsProviderError("SSO returns an invalid temporary credential.", { + tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN, + logger + }); + } + return { + accessKeyId, + secretAccessKey, + sessionToken, + expiration: new Date(expiration), + ...credentialScope && { credentialScope }, + ...accountId && { accountId } + }; + }, "resolveSSOCredentials"); + var validateSsoProfile = /* @__PURE__ */ __name((profile, logger) => { + const { sso_start_url, sso_account_id, sso_region, sso_role_name } = profile; + if (!sso_start_url || !sso_account_id || !sso_region || !sso_role_name) { + throw new import_property_provider2.CredentialsProviderError( + `Profile is configured with invalid SSO credentials. Required parameters "sso_account_id", "sso_region", "sso_role_name", "sso_start_url". Got ${Object.keys(profile).join( + ", " + )} +Reference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html`, + { tryNextLink: false, logger } + ); + } + return profile; + }, "validateSsoProfile"); + var fromSSO = /* @__PURE__ */ __name((init = {}) => async () => { + var _a; + (_a = init.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-sso - fromSSO"); + const { ssoStartUrl, ssoAccountId, ssoRegion, ssoRoleName, ssoSession } = init; + const { ssoClient } = init; + const profileName = (0, import_shared_ini_file_loader.getProfileName)(init); + if (!ssoStartUrl && !ssoAccountId && !ssoRegion && !ssoRoleName && !ssoSession) { + const profiles = await (0, import_shared_ini_file_loader.parseKnownFiles)(init); + const profile = profiles[profileName]; + if (!profile) { + throw new import_property_provider2.CredentialsProviderError(`Profile ${profileName} was not found.`, { logger: init.logger }); + } + if (!isSsoProfile(profile)) { + throw new import_property_provider2.CredentialsProviderError(`Profile ${profileName} is not configured with SSO credentials.`, { + logger: init.logger + }); + } + if (profile == null ? void 0 : profile.sso_session) { + const ssoSessions = await (0, import_shared_ini_file_loader.loadSsoSessionData)(init); + const session = ssoSessions[profile.sso_session]; + const conflictMsg = ` configurations in profile ${profileName} and sso-session ${profile.sso_session}`; + if (ssoRegion && ssoRegion !== session.sso_region) { + throw new import_property_provider2.CredentialsProviderError(`Conflicting SSO region` + conflictMsg, { + tryNextLink: false, + logger: init.logger + }); + } + if (ssoStartUrl && ssoStartUrl !== session.sso_start_url) { + throw new import_property_provider2.CredentialsProviderError(`Conflicting SSO start_url` + conflictMsg, { + tryNextLink: false, + logger: init.logger + }); + } + profile.sso_region = session.sso_region; + profile.sso_start_url = session.sso_start_url; + } + const { sso_start_url, sso_account_id, sso_region, sso_role_name, sso_session } = validateSsoProfile( + profile, + init.logger + ); + return resolveSSOCredentials({ + ssoStartUrl: sso_start_url, + ssoSession: sso_session, + ssoAccountId: sso_account_id, + ssoRegion: sso_region, + ssoRoleName: sso_role_name, + ssoClient, + clientConfig: init.clientConfig, + profile: profileName + }); + } else if (!ssoStartUrl || !ssoAccountId || !ssoRegion || !ssoRoleName) { + throw new import_property_provider2.CredentialsProviderError( + 'Incomplete configuration. The fromSSO() argument hash must include "ssoStartUrl", "ssoAccountId", "ssoRegion", "ssoRoleName"', + { tryNextLink: false, logger: init.logger } + ); + } else { + return resolveSSOCredentials({ + ssoStartUrl, + ssoSession, + ssoAccountId, + ssoRegion, + ssoRoleName, + ssoClient, + clientConfig: init.clientConfig, + profile: profileName + }); + } + }, "fromSSO"); + } +}); + +// ../../../node_modules/@aws-sdk/client-sts/dist-cjs/auth/httpAuthSchemeProvider.js +var require_httpAuthSchemeProvider4 = __commonJS({ + "../../../node_modules/@aws-sdk/client-sts/dist-cjs/auth/httpAuthSchemeProvider.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.resolveHttpAuthSchemeConfig = exports2.resolveStsAuthConfig = exports2.defaultSTSHttpAuthSchemeProvider = exports2.defaultSTSHttpAuthSchemeParametersProvider = void 0; + var core_1 = (init_dist_es2(), __toCommonJS(dist_es_exports2)); + var util_middleware_1 = require_dist_cjs10(); + var STSClient_1 = require_STSClient(); + var defaultSTSHttpAuthSchemeParametersProvider = async (config, context, input) => { + return { + operation: (0, util_middleware_1.getSmithyContext)(context).operation, + region: await (0, util_middleware_1.normalizeProvider)(config.region)() || (() => { + throw new Error("expected `region` to be configured for `aws.auth#sigv4`"); + })() + }; }; - var de_TooManyTagsRes = async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = (0, smithy_client_1._json)(body); - const exception = new models_0_1.TooManyTags({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, smithy_client_1.decorateServiceException)(exception, body); + exports2.defaultSTSHttpAuthSchemeParametersProvider = defaultSTSHttpAuthSchemeParametersProvider; + function createAwsAuthSigv4HttpAuthOption(authParameters) { + return { + schemeId: "aws.auth#sigv4", + signingProperties: { + name: "sts", + region: authParameters.region + }, + propertiesExtractor: (config, context) => ({ + signingProperties: { + config, + context + } + }) + }; + } + function createSmithyApiNoAuthHttpAuthOption(authParameters) { + return { + schemeId: "smithy.api#noAuth" + }; + } + var defaultSTSHttpAuthSchemeProvider = (authParameters) => { + const options = []; + switch (authParameters.operation) { + case "AssumeRoleWithSAML": { + options.push(createSmithyApiNoAuthHttpAuthOption(authParameters)); + break; + } + case "AssumeRoleWithWebIdentity": { + options.push(createSmithyApiNoAuthHttpAuthOption(authParameters)); + break; + } + default: { + options.push(createAwsAuthSigv4HttpAuthOption(authParameters)); + } + } + return options; }; - var de_ValidationExceptionRes = async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = (0, smithy_client_1._json)(body); - const exception = new models_0_1.ValidationException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, smithy_client_1.decorateServiceException)(exception, body); + exports2.defaultSTSHttpAuthSchemeProvider = defaultSTSHttpAuthSchemeProvider; + var resolveStsAuthConfig = (input) => ({ + ...input, + stsClientCtor: STSClient_1.STSClient + }); + exports2.resolveStsAuthConfig = resolveStsAuthConfig; + var resolveHttpAuthSchemeConfig = (config) => { + const config_0 = (0, exports2.resolveStsAuthConfig)(config); + const config_1 = (0, core_1.resolveAwsSdkSigV4Config)(config_0); + return { + ...config_1 + }; }; - var se_UpdateMapRunInput = (input, context) => { - return (0, smithy_client_1.take)(input, { - mapRunArn: [], - maxConcurrency: [], - toleratedFailureCount: [], - toleratedFailurePercentage: smithy_client_1.serializeFloat - }); + exports2.resolveHttpAuthSchemeConfig = resolveHttpAuthSchemeConfig; + } +}); + +// ../../../node_modules/@aws-sdk/client-sts/dist-cjs/endpoint/EndpointParameters.js +var require_EndpointParameters = __commonJS({ + "../../../node_modules/@aws-sdk/client-sts/dist-cjs/endpoint/EndpointParameters.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.commonParams = exports2.resolveClientEndpointParameters = void 0; + var resolveClientEndpointParameters = (options) => { + return { + ...options, + useDualstackEndpoint: options.useDualstackEndpoint ?? false, + useFipsEndpoint: options.useFipsEndpoint ?? false, + useGlobalEndpoint: options.useGlobalEndpoint ?? false, + defaultSigningName: "sts" + }; }; - var de_ActivityList = (output, context) => { - const retVal = (output || []).filter((e) => e != null).map((entry) => { - return de_ActivityListItem(entry, context); - }); - return retVal; + exports2.resolveClientEndpointParameters = resolveClientEndpointParameters; + exports2.commonParams = { + UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" } }; - var de_ActivityListItem = (output, context) => { - return (0, smithy_client_1.take)(output, { - activityArn: smithy_client_1.expectString, - creationDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))), - name: smithy_client_1.expectString - }); + } +}); + +// ../../../node_modules/@aws-sdk/client-sts/package.json +var require_package4 = __commonJS({ + "../../../node_modules/@aws-sdk/client-sts/package.json"(exports2, module2) { + module2.exports = { + name: "@aws-sdk/client-sts", + description: "AWS SDK for JavaScript Sts Client for Node.js, Browser and React Native", + version: "3.632.0", + scripts: { + build: "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'", + "build:cjs": "node ../../scripts/compilation/inline client-sts", + "build:es": "tsc -p tsconfig.es.json", + "build:include:deps": "lerna run --scope $npm_package_name --include-dependencies build", + "build:types": "rimraf ./dist-types tsconfig.types.tsbuildinfo && tsc -p tsconfig.types.json", + "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4", + clean: "rimraf ./dist-* && rimraf *.tsbuildinfo", + "extract:docs": "api-extractor run --local", + "generate:client": "node ../../scripts/generate-clients/single-service --solo sts", + test: "yarn test:unit", + "test:unit": "jest" + }, + main: "./dist-cjs/index.js", + types: "./dist-types/index.d.ts", + module: "./dist-es/index.js", + sideEffects: false, + dependencies: { + "@aws-crypto/sha256-browser": "5.2.0", + "@aws-crypto/sha256-js": "5.2.0", + "@aws-sdk/client-sso-oidc": "3.632.0", + "@aws-sdk/core": "3.629.0", + "@aws-sdk/credential-provider-node": "3.632.0", + "@aws-sdk/middleware-host-header": "3.620.0", + "@aws-sdk/middleware-logger": "3.609.0", + "@aws-sdk/middleware-recursion-detection": "3.620.0", + "@aws-sdk/middleware-user-agent": "3.632.0", + "@aws-sdk/region-config-resolver": "3.614.0", + "@aws-sdk/types": "3.609.0", + "@aws-sdk/util-endpoints": "3.632.0", + "@aws-sdk/util-user-agent-browser": "3.609.0", + "@aws-sdk/util-user-agent-node": "3.614.0", + "@smithy/config-resolver": "^3.0.5", + "@smithy/core": "^2.3.2", + "@smithy/fetch-http-handler": "^3.2.4", + "@smithy/hash-node": "^3.0.3", + "@smithy/invalid-dependency": "^3.0.3", + "@smithy/middleware-content-length": "^3.0.5", + "@smithy/middleware-endpoint": "^3.1.0", + "@smithy/middleware-retry": "^3.0.14", + "@smithy/middleware-serde": "^3.0.3", + "@smithy/middleware-stack": "^3.0.3", + "@smithy/node-config-provider": "^3.1.4", + "@smithy/node-http-handler": "^3.1.4", + "@smithy/protocol-http": "^4.1.0", + "@smithy/smithy-client": "^3.1.12", + "@smithy/types": "^3.3.0", + "@smithy/url-parser": "^3.0.3", + "@smithy/util-base64": "^3.0.0", + "@smithy/util-body-length-browser": "^3.0.0", + "@smithy/util-body-length-node": "^3.0.0", + "@smithy/util-defaults-mode-browser": "^3.0.14", + "@smithy/util-defaults-mode-node": "^3.0.14", + "@smithy/util-endpoints": "^2.0.5", + "@smithy/util-middleware": "^3.0.3", + "@smithy/util-retry": "^3.0.3", + "@smithy/util-utf8": "^3.0.0", + tslib: "^2.6.2" + }, + devDependencies: { + "@tsconfig/node16": "16.1.3", + "@types/node": "^16.18.96", + concurrently: "7.0.0", + "downlevel-dts": "0.10.1", + rimraf: "3.0.2", + typescript: "~4.9.5" + }, + engines: { + node: ">=16.0.0" + }, + typesVersions: { + "<4.0": { + "dist-types/*": [ + "dist-types/ts3.4/*" + ] + } + }, + files: [ + "dist-*/**" + ], + author: { + name: "AWS SDK for JavaScript Team", + url: "https://aws.amazon.com/javascript/" + }, + license: "Apache-2.0", + browser: { + "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.browser" + }, + "react-native": { + "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.native" + }, + homepage: "https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sts", + repository: { + type: "git", + url: "https://github.com/aws/aws-sdk-js-v3.git", + directory: "clients/client-sts" + } }; - var de_CreateActivityOutput = (output, context) => { - return (0, smithy_client_1.take)(output, { - activityArn: smithy_client_1.expectString, - creationDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))) + } +}); + +// ../../../node_modules/@aws-sdk/client-sts/dist-cjs/endpoint/ruleset.js +var require_ruleset3 = __commonJS({ + "../../../node_modules/@aws-sdk/client-sts/dist-cjs/endpoint/ruleset.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ruleSet = void 0; + var F = "required"; + var G = "type"; + var H = "fn"; + var I = "argv"; + var J = "ref"; + var a = false; + var b = true; + var c = "booleanEquals"; + var d = "stringEquals"; + var e = "sigv4"; + var f = "sts"; + var g = "us-east-1"; + var h = "endpoint"; + var i = "https://sts.{Region}.{PartitionResult#dnsSuffix}"; + var j = "tree"; + var k = "error"; + var l = "getAttr"; + var m = { [F]: false, [G]: "String" }; + var n = { [F]: true, "default": false, [G]: "Boolean" }; + var o = { [J]: "Endpoint" }; + var p = { [H]: "isSet", [I]: [{ [J]: "Region" }] }; + var q = { [J]: "Region" }; + var r = { [H]: "aws.partition", [I]: [q], "assign": "PartitionResult" }; + var s = { [J]: "UseFIPS" }; + var t = { [J]: "UseDualStack" }; + var u = { "url": "https://sts.amazonaws.com", "properties": { "authSchemes": [{ "name": e, "signingName": f, "signingRegion": g }] }, "headers": {} }; + var v = {}; + var w = { "conditions": [{ [H]: d, [I]: [q, "aws-global"] }], [h]: u, [G]: h }; + var x = { [H]: c, [I]: [s, true] }; + var y = { [H]: c, [I]: [t, true] }; + var z = { [H]: l, [I]: [{ [J]: "PartitionResult" }, "supportsFIPS"] }; + var A = { [J]: "PartitionResult" }; + var B = { [H]: c, [I]: [true, { [H]: l, [I]: [A, "supportsDualStack"] }] }; + var C = [{ [H]: "isSet", [I]: [o] }]; + var D = [x]; + var E = [y]; + var _data = { version: "1.0", parameters: { Region: m, UseDualStack: n, UseFIPS: n, Endpoint: m, UseGlobalEndpoint: n }, rules: [{ conditions: [{ [H]: c, [I]: [{ [J]: "UseGlobalEndpoint" }, b] }, { [H]: "not", [I]: C }, p, r, { [H]: c, [I]: [s, a] }, { [H]: c, [I]: [t, a] }], rules: [{ conditions: [{ [H]: d, [I]: [q, "ap-northeast-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "ap-south-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "ap-southeast-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "ap-southeast-2"] }], endpoint: u, [G]: h }, w, { conditions: [{ [H]: d, [I]: [q, "ca-central-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "eu-central-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "eu-north-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "eu-west-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "eu-west-2"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "eu-west-3"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "sa-east-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, g] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "us-east-2"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "us-west-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "us-west-2"] }], endpoint: u, [G]: h }, { endpoint: { url: i, properties: { authSchemes: [{ name: e, signingName: f, signingRegion: "{Region}" }] }, headers: v }, [G]: h }], [G]: j }, { conditions: C, rules: [{ conditions: D, error: "Invalid Configuration: FIPS and custom endpoint are not supported", [G]: k }, { conditions: E, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", [G]: k }, { endpoint: { url: o, properties: v, headers: v }, [G]: h }], [G]: j }, { conditions: [p], rules: [{ conditions: [r], rules: [{ conditions: [x, y], rules: [{ conditions: [{ [H]: c, [I]: [b, z] }, B], rules: [{ endpoint: { url: "https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: v, headers: v }, [G]: h }], [G]: j }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", [G]: k }], [G]: j }, { conditions: D, rules: [{ conditions: [{ [H]: c, [I]: [z, b] }], rules: [{ conditions: [{ [H]: d, [I]: [{ [H]: l, [I]: [A, "name"] }, "aws-us-gov"] }], endpoint: { url: "https://sts.{Region}.amazonaws.com", properties: v, headers: v }, [G]: h }, { endpoint: { url: "https://sts-fips.{Region}.{PartitionResult#dnsSuffix}", properties: v, headers: v }, [G]: h }], [G]: j }, { error: "FIPS is enabled but this partition does not support FIPS", [G]: k }], [G]: j }, { conditions: E, rules: [{ conditions: [B], rules: [{ endpoint: { url: "https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: v, headers: v }, [G]: h }], [G]: j }, { error: "DualStack is enabled but this partition does not support DualStack", [G]: k }], [G]: j }, w, { endpoint: { url: i, properties: v, headers: v }, [G]: h }], [G]: j }], [G]: j }, { error: "Invalid Configuration: Missing Region", [G]: k }] }; + exports2.ruleSet = _data; + } +}); + +// ../../../node_modules/@aws-sdk/client-sts/dist-cjs/endpoint/endpointResolver.js +var require_endpointResolver3 = __commonJS({ + "../../../node_modules/@aws-sdk/client-sts/dist-cjs/endpoint/endpointResolver.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.defaultEndpointResolver = void 0; + var util_endpoints_1 = require_dist_cjs7(); + var util_endpoints_2 = require_dist_cjs6(); + var ruleset_1 = require_ruleset3(); + var defaultEndpointResolver = (endpointParams, context = {}) => { + return (0, util_endpoints_2.resolveEndpoint)(ruleset_1.ruleSet, { + endpointParams, + logger: context.logger }); }; - var de_CreateStateMachineAliasOutput = (output, context) => { - return (0, smithy_client_1.take)(output, { - creationDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))), - stateMachineAliasArn: smithy_client_1.expectString - }); + exports2.defaultEndpointResolver = defaultEndpointResolver; + util_endpoints_2.customEndpointFunctions.aws = util_endpoints_1.awsEndpointFunctions; + } +}); + +// ../../../node_modules/@aws-sdk/client-sts/dist-cjs/runtimeConfig.shared.js +var require_runtimeConfig_shared3 = __commonJS({ + "../../../node_modules/@aws-sdk/client-sts/dist-cjs/runtimeConfig.shared.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getRuntimeConfig = void 0; + var core_1 = (init_dist_es2(), __toCommonJS(dist_es_exports2)); + var core_2 = (init_dist_es(), __toCommonJS(dist_es_exports)); + var smithy_client_1 = require_dist_cjs37(); + var url_parser_1 = require_dist_cjs44(); + var util_base64_1 = require_dist_cjs29(); + var util_utf8_1 = require_dist_cjs28(); + var httpAuthSchemeProvider_1 = require_httpAuthSchemeProvider4(); + var endpointResolver_1 = require_endpointResolver3(); + var getRuntimeConfig = (config) => { + return { + apiVersion: "2011-06-15", + base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64, + base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64, + disableHostPrefix: config?.disableHostPrefix ?? false, + endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver, + extensions: config?.extensions ?? [], + httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? httpAuthSchemeProvider_1.defaultSTSHttpAuthSchemeProvider, + httpAuthSchemes: config?.httpAuthSchemes ?? [ + { + schemeId: "aws.auth#sigv4", + identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"), + signer: new core_1.AwsSdkSigV4Signer() + }, + { + schemeId: "smithy.api#noAuth", + identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})), + signer: new core_2.NoAuthSigner() + } + ], + logger: config?.logger ?? new smithy_client_1.NoOpLogger(), + serviceId: config?.serviceId ?? "STS", + urlParser: config?.urlParser ?? url_parser_1.parseUrl, + utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8, + utf8Encoder: config?.utf8Encoder ?? util_utf8_1.toUtf8 + }; }; - var de_CreateStateMachineOutput = (output, context) => { - return (0, smithy_client_1.take)(output, { - creationDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))), - stateMachineArn: smithy_client_1.expectString, - stateMachineVersionArn: smithy_client_1.expectString - }); + exports2.getRuntimeConfig = getRuntimeConfig; + } +}); + +// ../../../node_modules/@aws-sdk/client-sts/dist-cjs/runtimeConfig.js +var require_runtimeConfig3 = __commonJS({ + "../../../node_modules/@aws-sdk/client-sts/dist-cjs/runtimeConfig.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getRuntimeConfig = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var package_json_1 = tslib_1.__importDefault(require_package4()); + var core_1 = (init_dist_es2(), __toCommonJS(dist_es_exports2)); + var credential_provider_node_1 = require_dist_cjs79(); + var util_user_agent_node_1 = require_dist_cjs56(); + var config_resolver_1 = require_dist_cjs11(); + var core_2 = (init_dist_es(), __toCommonJS(dist_es_exports)); + var hash_node_1 = require_dist_cjs57(); + var middleware_retry_1 = require_dist_cjs38(); + var node_config_provider_1 = require_dist_cjs42(); + var node_http_handler_1 = require_dist_cjs51(); + var util_body_length_node_1 = require_dist_cjs58(); + var util_retry_1 = require_dist_cjs60(); + var runtimeConfig_shared_1 = require_runtimeConfig_shared3(); + var smithy_client_1 = require_dist_cjs37(); + var util_defaults_mode_node_1 = require_dist_cjs69(); + var smithy_client_2 = require_dist_cjs37(); + var getRuntimeConfig = (config) => { + (0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version); + const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config); + const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode); + const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config); + (0, core_1.emitWarningIfUnsupportedVersion)(process.version); + return { + ...clientSharedValues, + ...config, + runtime: "node", + defaultsMode, + bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength, + credentialDefaultProvider: config?.credentialDefaultProvider ?? credential_provider_node_1.defaultProvider, + defaultUserAgentProvider: config?.defaultUserAgentProvider ?? (0, util_user_agent_node_1.defaultUserAgent)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }), + httpAuthSchemes: config?.httpAuthSchemes ?? [ + { + schemeId: "aws.auth#sigv4", + identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4") || (async (idProps) => await (0, credential_provider_node_1.defaultProvider)(idProps?.__config || {})()), + signer: new core_1.AwsSdkSigV4Signer() + }, + { + schemeId: "smithy.api#noAuth", + identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})), + signer: new core_2.NoAuthSigner() + } + ], + maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS), + region: config?.region ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS), + requestHandler: node_http_handler_1.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider), + retryMode: config?.retryMode ?? (0, node_config_provider_1.loadConfig)({ + ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS, + default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE + }), + sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, "sha256"), + streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS) + }; }; - var de_DescribeActivityOutput = (output, context) => { - return (0, smithy_client_1.take)(output, { - activityArn: smithy_client_1.expectString, - creationDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))), - name: smithy_client_1.expectString - }); + exports2.getRuntimeConfig = getRuntimeConfig; + } +}); + +// ../../../node_modules/@aws-sdk/client-sts/dist-cjs/auth/httpAuthExtensionConfiguration.js +var require_httpAuthExtensionConfiguration = __commonJS({ + "../../../node_modules/@aws-sdk/client-sts/dist-cjs/auth/httpAuthExtensionConfiguration.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.resolveHttpAuthRuntimeConfig = exports2.getHttpAuthExtensionConfiguration = void 0; + var getHttpAuthExtensionConfiguration = (runtimeConfig) => { + const _httpAuthSchemes = runtimeConfig.httpAuthSchemes; + let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider; + let _credentials = runtimeConfig.credentials; + return { + setHttpAuthScheme(httpAuthScheme) { + const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId); + if (index === -1) { + _httpAuthSchemes.push(httpAuthScheme); + } else { + _httpAuthSchemes.splice(index, 1, httpAuthScheme); + } + }, + httpAuthSchemes() { + return _httpAuthSchemes; + }, + setHttpAuthSchemeProvider(httpAuthSchemeProvider) { + _httpAuthSchemeProvider = httpAuthSchemeProvider; + }, + httpAuthSchemeProvider() { + return _httpAuthSchemeProvider; + }, + setCredentials(credentials) { + _credentials = credentials; + }, + credentials() { + return _credentials; + } + }; }; - var de_DescribeExecutionOutput = (output, context) => { - return (0, smithy_client_1.take)(output, { - cause: smithy_client_1.expectString, - error: smithy_client_1.expectString, - executionArn: smithy_client_1.expectString, - input: smithy_client_1.expectString, - inputDetails: smithy_client_1._json, - mapRunArn: smithy_client_1.expectString, - name: smithy_client_1.expectString, - output: smithy_client_1.expectString, - outputDetails: smithy_client_1._json, - startDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))), - stateMachineAliasArn: smithy_client_1.expectString, - stateMachineArn: smithy_client_1.expectString, - stateMachineVersionArn: smithy_client_1.expectString, - status: smithy_client_1.expectString, - stopDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))), - traceHeader: smithy_client_1.expectString - }); + exports2.getHttpAuthExtensionConfiguration = getHttpAuthExtensionConfiguration; + var resolveHttpAuthRuntimeConfig = (config) => { + return { + httpAuthSchemes: config.httpAuthSchemes(), + httpAuthSchemeProvider: config.httpAuthSchemeProvider(), + credentials: config.credentials() + }; }; - var de_DescribeMapRunOutput = (output, context) => { - return (0, smithy_client_1.take)(output, { - executionArn: smithy_client_1.expectString, - executionCounts: smithy_client_1._json, - itemCounts: smithy_client_1._json, - mapRunArn: smithy_client_1.expectString, - maxConcurrency: smithy_client_1.expectInt32, - startDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))), - status: smithy_client_1.expectString, - stopDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))), - toleratedFailureCount: smithy_client_1.expectLong, - toleratedFailurePercentage: smithy_client_1.limitedParseFloat32 - }); + exports2.resolveHttpAuthRuntimeConfig = resolveHttpAuthRuntimeConfig; + } +}); + +// ../../../node_modules/@aws-sdk/client-sts/dist-cjs/runtimeExtensions.js +var require_runtimeExtensions = __commonJS({ + "../../../node_modules/@aws-sdk/client-sts/dist-cjs/runtimeExtensions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.resolveRuntimeExtensions = void 0; + var region_config_resolver_1 = require_dist_cjs70(); + var protocol_http_1 = require_dist_cjs2(); + var smithy_client_1 = require_dist_cjs37(); + var httpAuthExtensionConfiguration_1 = require_httpAuthExtensionConfiguration(); + var asPartial = (t) => t; + var resolveRuntimeExtensions = (runtimeConfig, extensions) => { + const extensionConfiguration = { + ...asPartial((0, region_config_resolver_1.getAwsRegionExtensionConfiguration)(runtimeConfig)), + ...asPartial((0, smithy_client_1.getDefaultExtensionConfiguration)(runtimeConfig)), + ...asPartial((0, protocol_http_1.getHttpHandlerExtensionConfiguration)(runtimeConfig)), + ...asPartial((0, httpAuthExtensionConfiguration_1.getHttpAuthExtensionConfiguration)(runtimeConfig)) + }; + extensions.forEach((extension) => extension.configure(extensionConfiguration)); + return { + ...runtimeConfig, + ...(0, region_config_resolver_1.resolveAwsRegionExtensionConfiguration)(extensionConfiguration), + ...(0, smithy_client_1.resolveDefaultRuntimeConfig)(extensionConfiguration), + ...(0, protocol_http_1.resolveHttpHandlerRuntimeConfig)(extensionConfiguration), + ...(0, httpAuthExtensionConfiguration_1.resolveHttpAuthRuntimeConfig)(extensionConfiguration) + }; }; - var de_DescribeStateMachineAliasOutput = (output, context) => { - return (0, smithy_client_1.take)(output, { - creationDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))), - description: smithy_client_1.expectString, - name: smithy_client_1.expectString, - routingConfiguration: smithy_client_1._json, - stateMachineAliasArn: smithy_client_1.expectString, - updateDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))) - }); + exports2.resolveRuntimeExtensions = resolveRuntimeExtensions; + } +}); + +// ../../../node_modules/@aws-sdk/client-sts/dist-cjs/STSClient.js +var require_STSClient = __commonJS({ + "../../../node_modules/@aws-sdk/client-sts/dist-cjs/STSClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.STSClient = exports2.__Client = void 0; + var middleware_host_header_1 = require_dist_cjs3(); + var middleware_logger_1 = require_dist_cjs4(); + var middleware_recursion_detection_1 = require_dist_cjs5(); + var middleware_user_agent_1 = require_dist_cjs8(); + var config_resolver_1 = require_dist_cjs11(); + var core_1 = (init_dist_es(), __toCommonJS(dist_es_exports)); + var middleware_content_length_1 = require_dist_cjs39(); + var middleware_endpoint_1 = require_dist_cjs46(); + var middleware_retry_1 = require_dist_cjs38(); + var smithy_client_1 = require_dist_cjs37(); + Object.defineProperty(exports2, "__Client", { enumerable: true, get: function() { + return smithy_client_1.Client; + } }); + var httpAuthSchemeProvider_1 = require_httpAuthSchemeProvider4(); + var EndpointParameters_1 = require_EndpointParameters(); + var runtimeConfig_1 = require_runtimeConfig3(); + var runtimeExtensions_1 = require_runtimeExtensions(); + var STSClient2 = class extends smithy_client_1.Client { + constructor(...[configuration]) { + const _config_0 = (0, runtimeConfig_1.getRuntimeConfig)(configuration || {}); + const _config_1 = (0, EndpointParameters_1.resolveClientEndpointParameters)(_config_0); + const _config_2 = (0, middleware_user_agent_1.resolveUserAgentConfig)(_config_1); + const _config_3 = (0, middleware_retry_1.resolveRetryConfig)(_config_2); + const _config_4 = (0, config_resolver_1.resolveRegionConfig)(_config_3); + const _config_5 = (0, middleware_host_header_1.resolveHostHeaderConfig)(_config_4); + const _config_6 = (0, middleware_endpoint_1.resolveEndpointConfig)(_config_5); + const _config_7 = (0, httpAuthSchemeProvider_1.resolveHttpAuthSchemeConfig)(_config_6); + const _config_8 = (0, runtimeExtensions_1.resolveRuntimeExtensions)(_config_7, configuration?.extensions || []); + super(_config_8); + this.config = _config_8; + this.middlewareStack.use((0, middleware_user_agent_1.getUserAgentPlugin)(this.config)); + this.middlewareStack.use((0, middleware_retry_1.getRetryPlugin)(this.config)); + this.middlewareStack.use((0, middleware_content_length_1.getContentLengthPlugin)(this.config)); + this.middlewareStack.use((0, middleware_host_header_1.getHostHeaderPlugin)(this.config)); + this.middlewareStack.use((0, middleware_logger_1.getLoggerPlugin)(this.config)); + this.middlewareStack.use((0, middleware_recursion_detection_1.getRecursionDetectionPlugin)(this.config)); + this.middlewareStack.use((0, core_1.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config, { + httpAuthSchemeParametersProvider: httpAuthSchemeProvider_1.defaultSTSHttpAuthSchemeParametersProvider, + identityProviderConfigProvider: async (config) => new core_1.DefaultIdentityProviderConfig({ + "aws.auth#sigv4": config.credentials + }) + })); + this.middlewareStack.use((0, core_1.getHttpSigningPlugin)(this.config)); + } + destroy() { + super.destroy(); + } }; - var de_DescribeStateMachineForExecutionOutput = (output, context) => { - return (0, smithy_client_1.take)(output, { - definition: smithy_client_1.expectString, - label: smithy_client_1.expectString, - loggingConfiguration: smithy_client_1._json, - mapRunArn: smithy_client_1.expectString, - name: smithy_client_1.expectString, - revisionId: smithy_client_1.expectString, - roleArn: smithy_client_1.expectString, - stateMachineArn: smithy_client_1.expectString, - tracingConfiguration: smithy_client_1._json, - updateDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))) - }); + exports2.STSClient = STSClient2; + } +}); + +// ../../../node_modules/@aws-sdk/client-sts/dist-cjs/index.js +var require_dist_cjs75 = __commonJS({ + "../../../node_modules/@aws-sdk/client-sts/dist-cjs/index.js"(exports2, module2) { + "use strict"; + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all) => { + for (var name in all) + __defProp2(target, name, { get: all[name], enumerable: true }); }; - var de_DescribeStateMachineOutput = (output, context) => { - return (0, smithy_client_1.take)(output, { - creationDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))), - definition: smithy_client_1.expectString, - description: smithy_client_1.expectString, - label: smithy_client_1.expectString, - loggingConfiguration: smithy_client_1._json, - name: smithy_client_1.expectString, - revisionId: smithy_client_1.expectString, - roleArn: smithy_client_1.expectString, - stateMachineArn: smithy_client_1.expectString, - status: smithy_client_1.expectString, - tracingConfiguration: smithy_client_1._json, - type: smithy_client_1.expectString - }); + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; }; - var de_ExecutionList = (output, context) => { - const retVal = (output || []).filter((e) => e != null).map((entry) => { - return de_ExecutionListItem(entry, context); - }); - return retVal; + var __reExport = (target, mod, secondTarget) => (__copyProps2(target, mod, "default"), secondTarget && __copyProps2(secondTarget, mod, "default")); + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + AssumeRoleCommand: () => AssumeRoleCommand, + AssumeRoleResponseFilterSensitiveLog: () => AssumeRoleResponseFilterSensitiveLog, + AssumeRoleWithSAMLCommand: () => AssumeRoleWithSAMLCommand, + AssumeRoleWithSAMLRequestFilterSensitiveLog: () => AssumeRoleWithSAMLRequestFilterSensitiveLog, + AssumeRoleWithSAMLResponseFilterSensitiveLog: () => AssumeRoleWithSAMLResponseFilterSensitiveLog, + AssumeRoleWithWebIdentityCommand: () => AssumeRoleWithWebIdentityCommand, + AssumeRoleWithWebIdentityRequestFilterSensitiveLog: () => AssumeRoleWithWebIdentityRequestFilterSensitiveLog, + AssumeRoleWithWebIdentityResponseFilterSensitiveLog: () => AssumeRoleWithWebIdentityResponseFilterSensitiveLog, + ClientInputEndpointParameters: () => import_EndpointParameters9.ClientInputEndpointParameters, + CredentialsFilterSensitiveLog: () => CredentialsFilterSensitiveLog, + DecodeAuthorizationMessageCommand: () => DecodeAuthorizationMessageCommand, + ExpiredTokenException: () => ExpiredTokenException, + GetAccessKeyInfoCommand: () => GetAccessKeyInfoCommand, + GetCallerIdentityCommand: () => GetCallerIdentityCommand, + GetFederationTokenCommand: () => GetFederationTokenCommand, + GetFederationTokenResponseFilterSensitiveLog: () => GetFederationTokenResponseFilterSensitiveLog, + GetSessionTokenCommand: () => GetSessionTokenCommand, + GetSessionTokenResponseFilterSensitiveLog: () => GetSessionTokenResponseFilterSensitiveLog, + IDPCommunicationErrorException: () => IDPCommunicationErrorException, + IDPRejectedClaimException: () => IDPRejectedClaimException, + InvalidAuthorizationMessageException: () => InvalidAuthorizationMessageException, + InvalidIdentityTokenException: () => InvalidIdentityTokenException, + MalformedPolicyDocumentException: () => MalformedPolicyDocumentException, + PackedPolicyTooLargeException: () => PackedPolicyTooLargeException, + RegionDisabledException: () => RegionDisabledException, + STS: () => STS, + STSServiceException: () => STSServiceException, + decorateDefaultCredentialProvider: () => decorateDefaultCredentialProvider, + getDefaultRoleAssumer: () => getDefaultRoleAssumer2, + getDefaultRoleAssumerWithWebIdentity: () => getDefaultRoleAssumerWithWebIdentity2 + }); + module2.exports = __toCommonJS2(src_exports); + __reExport(src_exports, require_STSClient(), module2.exports); + var import_middleware_endpoint2 = require_dist_cjs46(); + var import_middleware_serde2 = require_dist_cjs45(); + var import_EndpointParameters = require_EndpointParameters(); + var import_smithy_client5 = require_dist_cjs37(); + var _STSServiceException = class _STSServiceException2 extends import_smithy_client5.ServiceException { + /** + * @internal + */ + constructor(options) { + super(options); + Object.setPrototypeOf(this, _STSServiceException2.prototype); + } }; - var de_ExecutionListItem = (output, context) => { - return (0, smithy_client_1.take)(output, { - executionArn: smithy_client_1.expectString, - itemCount: smithy_client_1.expectInt32, - mapRunArn: smithy_client_1.expectString, - name: smithy_client_1.expectString, - startDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))), - stateMachineAliasArn: smithy_client_1.expectString, - stateMachineArn: smithy_client_1.expectString, - stateMachineVersionArn: smithy_client_1.expectString, - status: smithy_client_1.expectString, - stopDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))) - }); + __name(_STSServiceException, "STSServiceException"); + var STSServiceException = _STSServiceException; + var _ExpiredTokenException = class _ExpiredTokenException2 extends STSServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "ExpiredTokenException", + $fault: "client", + ...opts + }); + this.name = "ExpiredTokenException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _ExpiredTokenException2.prototype); + } }; - var de_GetExecutionHistoryOutput = (output, context) => { - return (0, smithy_client_1.take)(output, { - events: (_) => de_HistoryEventList(_, context), - nextToken: smithy_client_1.expectString - }); + __name(_ExpiredTokenException, "ExpiredTokenException"); + var ExpiredTokenException = _ExpiredTokenException; + var _MalformedPolicyDocumentException = class _MalformedPolicyDocumentException2 extends STSServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "MalformedPolicyDocumentException", + $fault: "client", + ...opts + }); + this.name = "MalformedPolicyDocumentException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _MalformedPolicyDocumentException2.prototype); + } }; - var de_HistoryEvent = (output, context) => { - return (0, smithy_client_1.take)(output, { - activityFailedEventDetails: smithy_client_1._json, - activityScheduleFailedEventDetails: smithy_client_1._json, - activityScheduledEventDetails: smithy_client_1._json, - activityStartedEventDetails: smithy_client_1._json, - activitySucceededEventDetails: smithy_client_1._json, - activityTimedOutEventDetails: smithy_client_1._json, - executionAbortedEventDetails: smithy_client_1._json, - executionFailedEventDetails: smithy_client_1._json, - executionStartedEventDetails: smithy_client_1._json, - executionSucceededEventDetails: smithy_client_1._json, - executionTimedOutEventDetails: smithy_client_1._json, - id: smithy_client_1.expectLong, - lambdaFunctionFailedEventDetails: smithy_client_1._json, - lambdaFunctionScheduleFailedEventDetails: smithy_client_1._json, - lambdaFunctionScheduledEventDetails: smithy_client_1._json, - lambdaFunctionStartFailedEventDetails: smithy_client_1._json, - lambdaFunctionSucceededEventDetails: smithy_client_1._json, - lambdaFunctionTimedOutEventDetails: smithy_client_1._json, - mapIterationAbortedEventDetails: smithy_client_1._json, - mapIterationFailedEventDetails: smithy_client_1._json, - mapIterationStartedEventDetails: smithy_client_1._json, - mapIterationSucceededEventDetails: smithy_client_1._json, - mapRunFailedEventDetails: smithy_client_1._json, - mapRunStartedEventDetails: smithy_client_1._json, - mapStateStartedEventDetails: smithy_client_1._json, - previousEventId: smithy_client_1.expectLong, - stateEnteredEventDetails: smithy_client_1._json, - stateExitedEventDetails: smithy_client_1._json, - taskFailedEventDetails: smithy_client_1._json, - taskScheduledEventDetails: smithy_client_1._json, - taskStartFailedEventDetails: smithy_client_1._json, - taskStartedEventDetails: smithy_client_1._json, - taskSubmitFailedEventDetails: smithy_client_1._json, - taskSubmittedEventDetails: smithy_client_1._json, - taskSucceededEventDetails: smithy_client_1._json, - taskTimedOutEventDetails: smithy_client_1._json, - timestamp: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))), - type: smithy_client_1.expectString - }); + __name(_MalformedPolicyDocumentException, "MalformedPolicyDocumentException"); + var MalformedPolicyDocumentException = _MalformedPolicyDocumentException; + var _PackedPolicyTooLargeException = class _PackedPolicyTooLargeException2 extends STSServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "PackedPolicyTooLargeException", + $fault: "client", + ...opts + }); + this.name = "PackedPolicyTooLargeException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _PackedPolicyTooLargeException2.prototype); + } }; - var de_HistoryEventList = (output, context) => { - const retVal = (output || []).filter((e) => e != null).map((entry) => { - return de_HistoryEvent(entry, context); - }); - return retVal; + __name(_PackedPolicyTooLargeException, "PackedPolicyTooLargeException"); + var PackedPolicyTooLargeException = _PackedPolicyTooLargeException; + var _RegionDisabledException = class _RegionDisabledException2 extends STSServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "RegionDisabledException", + $fault: "client", + ...opts + }); + this.name = "RegionDisabledException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _RegionDisabledException2.prototype); + } }; - var de_ListActivitiesOutput = (output, context) => { - return (0, smithy_client_1.take)(output, { - activities: (_) => de_ActivityList(_, context), - nextToken: smithy_client_1.expectString - }); + __name(_RegionDisabledException, "RegionDisabledException"); + var RegionDisabledException = _RegionDisabledException; + var _IDPRejectedClaimException = class _IDPRejectedClaimException2 extends STSServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "IDPRejectedClaimException", + $fault: "client", + ...opts + }); + this.name = "IDPRejectedClaimException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _IDPRejectedClaimException2.prototype); + } }; - var de_ListExecutionsOutput = (output, context) => { - return (0, smithy_client_1.take)(output, { - executions: (_) => de_ExecutionList(_, context), - nextToken: smithy_client_1.expectString - }); + __name(_IDPRejectedClaimException, "IDPRejectedClaimException"); + var IDPRejectedClaimException = _IDPRejectedClaimException; + var _InvalidIdentityTokenException = class _InvalidIdentityTokenException2 extends STSServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "InvalidIdentityTokenException", + $fault: "client", + ...opts + }); + this.name = "InvalidIdentityTokenException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _InvalidIdentityTokenException2.prototype); + } }; - var de_ListMapRunsOutput = (output, context) => { - return (0, smithy_client_1.take)(output, { - mapRuns: (_) => de_MapRunList(_, context), - nextToken: smithy_client_1.expectString - }); + __name(_InvalidIdentityTokenException, "InvalidIdentityTokenException"); + var InvalidIdentityTokenException = _InvalidIdentityTokenException; + var _IDPCommunicationErrorException = class _IDPCommunicationErrorException2 extends STSServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "IDPCommunicationErrorException", + $fault: "client", + ...opts + }); + this.name = "IDPCommunicationErrorException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _IDPCommunicationErrorException2.prototype); + } }; - var de_ListStateMachineAliasesOutput = (output, context) => { - return (0, smithy_client_1.take)(output, { - nextToken: smithy_client_1.expectString, - stateMachineAliases: (_) => de_StateMachineAliasList(_, context) - }); + __name(_IDPCommunicationErrorException, "IDPCommunicationErrorException"); + var IDPCommunicationErrorException = _IDPCommunicationErrorException; + var _InvalidAuthorizationMessageException = class _InvalidAuthorizationMessageException2 extends STSServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "InvalidAuthorizationMessageException", + $fault: "client", + ...opts + }); + this.name = "InvalidAuthorizationMessageException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _InvalidAuthorizationMessageException2.prototype); + } }; - var de_ListStateMachinesOutput = (output, context) => { - return (0, smithy_client_1.take)(output, { - nextToken: smithy_client_1.expectString, - stateMachines: (_) => de_StateMachineList(_, context) + __name(_InvalidAuthorizationMessageException, "InvalidAuthorizationMessageException"); + var InvalidAuthorizationMessageException = _InvalidAuthorizationMessageException; + var CredentialsFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.SecretAccessKey && { SecretAccessKey: import_smithy_client5.SENSITIVE_STRING } + }), "CredentialsFilterSensitiveLog"); + var AssumeRoleResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.Credentials && { Credentials: CredentialsFilterSensitiveLog(obj.Credentials) } + }), "AssumeRoleResponseFilterSensitiveLog"); + var AssumeRoleWithSAMLRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.SAMLAssertion && { SAMLAssertion: import_smithy_client5.SENSITIVE_STRING } + }), "AssumeRoleWithSAMLRequestFilterSensitiveLog"); + var AssumeRoleWithSAMLResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.Credentials && { Credentials: CredentialsFilterSensitiveLog(obj.Credentials) } + }), "AssumeRoleWithSAMLResponseFilterSensitiveLog"); + var AssumeRoleWithWebIdentityRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.WebIdentityToken && { WebIdentityToken: import_smithy_client5.SENSITIVE_STRING } + }), "AssumeRoleWithWebIdentityRequestFilterSensitiveLog"); + var AssumeRoleWithWebIdentityResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.Credentials && { Credentials: CredentialsFilterSensitiveLog(obj.Credentials) } + }), "AssumeRoleWithWebIdentityResponseFilterSensitiveLog"); + var GetFederationTokenResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.Credentials && { Credentials: CredentialsFilterSensitiveLog(obj.Credentials) } + }), "GetFederationTokenResponseFilterSensitiveLog"); + var GetSessionTokenResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.Credentials && { Credentials: CredentialsFilterSensitiveLog(obj.Credentials) } + }), "GetSessionTokenResponseFilterSensitiveLog"); + var import_core3 = (init_dist_es2(), __toCommonJS(dist_es_exports2)); + var import_protocol_http8 = require_dist_cjs2(); + var se_AssumeRoleCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = SHARED_HEADERS; + let body; + body = buildFormUrlencodedString({ + ...se_AssumeRoleRequest(input, context), + [_A]: _AR, + [_V]: _ }); - }; - var de_ListStateMachineVersionsOutput = (output, context) => { - return (0, smithy_client_1.take)(output, { - nextToken: smithy_client_1.expectString, - stateMachineVersions: (_) => de_StateMachineVersionList(_, context) + return buildHttpRpcRequest(context, headers, "/", void 0, body); + }, "se_AssumeRoleCommand"); + var se_AssumeRoleWithSAMLCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = SHARED_HEADERS; + let body; + body = buildFormUrlencodedString({ + ...se_AssumeRoleWithSAMLRequest(input, context), + [_A]: _ARWSAML, + [_V]: _ }); - }; - var de_MapRunList = (output, context) => { - const retVal = (output || []).filter((e) => e != null).map((entry) => { - return de_MapRunListItem(entry, context); + return buildHttpRpcRequest(context, headers, "/", void 0, body); + }, "se_AssumeRoleWithSAMLCommand"); + var se_AssumeRoleWithWebIdentityCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = SHARED_HEADERS; + let body; + body = buildFormUrlencodedString({ + ...se_AssumeRoleWithWebIdentityRequest(input, context), + [_A]: _ARWWI, + [_V]: _ }); - return retVal; - }; - var de_MapRunListItem = (output, context) => { - return (0, smithy_client_1.take)(output, { - executionArn: smithy_client_1.expectString, - mapRunArn: smithy_client_1.expectString, - startDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))), - stateMachineArn: smithy_client_1.expectString, - stopDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))) + return buildHttpRpcRequest(context, headers, "/", void 0, body); + }, "se_AssumeRoleWithWebIdentityCommand"); + var se_DecodeAuthorizationMessageCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = SHARED_HEADERS; + let body; + body = buildFormUrlencodedString({ + ...se_DecodeAuthorizationMessageRequest(input, context), + [_A]: _DAM, + [_V]: _ }); - }; - var de_PublishStateMachineVersionOutput = (output, context) => { - return (0, smithy_client_1.take)(output, { - creationDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))), - stateMachineVersionArn: smithy_client_1.expectString + return buildHttpRpcRequest(context, headers, "/", void 0, body); + }, "se_DecodeAuthorizationMessageCommand"); + var se_GetAccessKeyInfoCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = SHARED_HEADERS; + let body; + body = buildFormUrlencodedString({ + ...se_GetAccessKeyInfoRequest(input, context), + [_A]: _GAKI, + [_V]: _ }); - }; - var de_StartExecutionOutput = (output, context) => { - return (0, smithy_client_1.take)(output, { - executionArn: smithy_client_1.expectString, - startDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))) + return buildHttpRpcRequest(context, headers, "/", void 0, body); + }, "se_GetAccessKeyInfoCommand"); + var se_GetCallerIdentityCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = SHARED_HEADERS; + let body; + body = buildFormUrlencodedString({ + ...se_GetCallerIdentityRequest(input, context), + [_A]: _GCI, + [_V]: _ }); - }; - var de_StartSyncExecutionOutput = (output, context) => { - return (0, smithy_client_1.take)(output, { - billingDetails: smithy_client_1._json, - cause: smithy_client_1.expectString, - error: smithy_client_1.expectString, - executionArn: smithy_client_1.expectString, - input: smithy_client_1.expectString, - inputDetails: smithy_client_1._json, - name: smithy_client_1.expectString, - output: smithy_client_1.expectString, - outputDetails: smithy_client_1._json, - startDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))), - stateMachineArn: smithy_client_1.expectString, - status: smithy_client_1.expectString, - stopDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))), - traceHeader: smithy_client_1.expectString + return buildHttpRpcRequest(context, headers, "/", void 0, body); + }, "se_GetCallerIdentityCommand"); + var se_GetFederationTokenCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = SHARED_HEADERS; + let body; + body = buildFormUrlencodedString({ + ...se_GetFederationTokenRequest(input, context), + [_A]: _GFT, + [_V]: _ }); - }; - var de_StateMachineAliasList = (output, context) => { - const retVal = (output || []).filter((e) => e != null).map((entry) => { - return de_StateMachineAliasListItem(entry, context); + return buildHttpRpcRequest(context, headers, "/", void 0, body); + }, "se_GetFederationTokenCommand"); + var se_GetSessionTokenCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = SHARED_HEADERS; + let body; + body = buildFormUrlencodedString({ + ...se_GetSessionTokenRequest(input, context), + [_A]: _GST, + [_V]: _ }); - return retVal; - }; - var de_StateMachineAliasListItem = (output, context) => { - return (0, smithy_client_1.take)(output, { - creationDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))), - stateMachineAliasArn: smithy_client_1.expectString + return buildHttpRpcRequest(context, headers, "/", void 0, body); + }, "se_GetSessionTokenCommand"); + var de_AssumeRoleCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await (0, import_core3.parseXmlBody)(output.body, context); + let contents = {}; + contents = de_AssumeRoleResponse(data.AssumeRoleResult, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; + }, "de_AssumeRoleCommand"); + var de_AssumeRoleWithSAMLCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await (0, import_core3.parseXmlBody)(output.body, context); + let contents = {}; + contents = de_AssumeRoleWithSAMLResponse(data.AssumeRoleWithSAMLResult, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; + }, "de_AssumeRoleWithSAMLCommand"); + var de_AssumeRoleWithWebIdentityCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await (0, import_core3.parseXmlBody)(output.body, context); + let contents = {}; + contents = de_AssumeRoleWithWebIdentityResponse(data.AssumeRoleWithWebIdentityResult, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; + }, "de_AssumeRoleWithWebIdentityCommand"); + var de_DecodeAuthorizationMessageCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await (0, import_core3.parseXmlBody)(output.body, context); + let contents = {}; + contents = de_DecodeAuthorizationMessageResponse(data.DecodeAuthorizationMessageResult, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; + }, "de_DecodeAuthorizationMessageCommand"); + var de_GetAccessKeyInfoCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await (0, import_core3.parseXmlBody)(output.body, context); + let contents = {}; + contents = de_GetAccessKeyInfoResponse(data.GetAccessKeyInfoResult, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; + }, "de_GetAccessKeyInfoCommand"); + var de_GetCallerIdentityCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await (0, import_core3.parseXmlBody)(output.body, context); + let contents = {}; + contents = de_GetCallerIdentityResponse(data.GetCallerIdentityResult, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; + }, "de_GetCallerIdentityCommand"); + var de_GetFederationTokenCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await (0, import_core3.parseXmlBody)(output.body, context); + let contents = {}; + contents = de_GetFederationTokenResponse(data.GetFederationTokenResult, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; + }, "de_GetFederationTokenCommand"); + var de_GetSessionTokenCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await (0, import_core3.parseXmlBody)(output.body, context); + let contents = {}; + contents = de_GetSessionTokenResponse(data.GetSessionTokenResult, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; + }, "de_GetSessionTokenCommand"); + var de_CommandError = /* @__PURE__ */ __name(async (output, context) => { + const parsedOutput = { + ...output, + body: await (0, import_core3.parseXmlErrorBody)(output.body, context) + }; + const errorCode = loadQueryErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "ExpiredTokenException": + case "com.amazonaws.sts#ExpiredTokenException": + throw await de_ExpiredTokenExceptionRes(parsedOutput, context); + case "MalformedPolicyDocument": + case "com.amazonaws.sts#MalformedPolicyDocumentException": + throw await de_MalformedPolicyDocumentExceptionRes(parsedOutput, context); + case "PackedPolicyTooLarge": + case "com.amazonaws.sts#PackedPolicyTooLargeException": + throw await de_PackedPolicyTooLargeExceptionRes(parsedOutput, context); + case "RegionDisabledException": + case "com.amazonaws.sts#RegionDisabledException": + throw await de_RegionDisabledExceptionRes(parsedOutput, context); + case "IDPRejectedClaim": + case "com.amazonaws.sts#IDPRejectedClaimException": + throw await de_IDPRejectedClaimExceptionRes(parsedOutput, context); + case "InvalidIdentityToken": + case "com.amazonaws.sts#InvalidIdentityTokenException": + throw await de_InvalidIdentityTokenExceptionRes(parsedOutput, context); + case "IDPCommunicationError": + case "com.amazonaws.sts#IDPCommunicationErrorException": + throw await de_IDPCommunicationErrorExceptionRes(parsedOutput, context); + case "InvalidAuthorizationMessageException": + case "com.amazonaws.sts#InvalidAuthorizationMessageException": + throw await de_InvalidAuthorizationMessageExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody: parsedBody.Error, + errorCode + }); + } + }, "de_CommandError"); + var de_ExpiredTokenExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = de_ExpiredTokenException(body.Error, context); + const exception = new ExpiredTokenException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized }); - }; - var de_StateMachineList = (output, context) => { - const retVal = (output || []).filter((e) => e != null).map((entry) => { - return de_StateMachineListItem(entry, context); + return (0, import_smithy_client5.decorateServiceException)(exception, body); + }, "de_ExpiredTokenExceptionRes"); + var de_IDPCommunicationErrorExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = de_IDPCommunicationErrorException(body.Error, context); + const exception = new IDPCommunicationErrorException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized }); - return retVal; - }; - var de_StateMachineListItem = (output, context) => { - return (0, smithy_client_1.take)(output, { - creationDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))), - name: smithy_client_1.expectString, - stateMachineArn: smithy_client_1.expectString, - type: smithy_client_1.expectString + return (0, import_smithy_client5.decorateServiceException)(exception, body); + }, "de_IDPCommunicationErrorExceptionRes"); + var de_IDPRejectedClaimExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = de_IDPRejectedClaimException(body.Error, context); + const exception = new IDPRejectedClaimException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized }); - }; - var de_StateMachineVersionList = (output, context) => { - const retVal = (output || []).filter((e) => e != null).map((entry) => { - return de_StateMachineVersionListItem(entry, context); + return (0, import_smithy_client5.decorateServiceException)(exception, body); + }, "de_IDPRejectedClaimExceptionRes"); + var de_InvalidAuthorizationMessageExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = de_InvalidAuthorizationMessageException(body.Error, context); + const exception = new InvalidAuthorizationMessageException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized }); - return retVal; - }; - var de_StateMachineVersionListItem = (output, context) => { - return (0, smithy_client_1.take)(output, { - creationDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))), - stateMachineVersionArn: smithy_client_1.expectString + return (0, import_smithy_client5.decorateServiceException)(exception, body); + }, "de_InvalidAuthorizationMessageExceptionRes"); + var de_InvalidIdentityTokenExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = de_InvalidIdentityTokenException(body.Error, context); + const exception = new InvalidIdentityTokenException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized }); - }; - var de_StopExecutionOutput = (output, context) => { - return (0, smithy_client_1.take)(output, { - stopDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))) + return (0, import_smithy_client5.decorateServiceException)(exception, body); + }, "de_InvalidIdentityTokenExceptionRes"); + var de_MalformedPolicyDocumentExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = de_MalformedPolicyDocumentException(body.Error, context); + const exception = new MalformedPolicyDocumentException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized }); - }; - var de_UpdateStateMachineAliasOutput = (output, context) => { - return (0, smithy_client_1.take)(output, { - updateDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))) + return (0, import_smithy_client5.decorateServiceException)(exception, body); + }, "de_MalformedPolicyDocumentExceptionRes"); + var de_PackedPolicyTooLargeExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = de_PackedPolicyTooLargeException(body.Error, context); + const exception = new PackedPolicyTooLargeException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized }); - }; - var de_UpdateStateMachineOutput = (output, context) => { - return (0, smithy_client_1.take)(output, { - revisionId: smithy_client_1.expectString, - stateMachineVersionArn: smithy_client_1.expectString, - updateDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))) + return (0, import_smithy_client5.decorateServiceException)(exception, body); + }, "de_PackedPolicyTooLargeExceptionRes"); + var de_RegionDisabledExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = de_RegionDisabledException(body.Error, context); + const exception = new RegionDisabledException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized }); - }; - var deserializeMetadata = (output) => ({ + return (0, import_smithy_client5.decorateServiceException)(exception, body); + }, "de_RegionDisabledExceptionRes"); + var se_AssumeRoleRequest = /* @__PURE__ */ __name((input, context) => { + var _a2, _b, _c, _d; + const entries = {}; + if (input[_RA] != null) { + entries[_RA] = input[_RA]; + } + if (input[_RSN] != null) { + entries[_RSN] = input[_RSN]; + } + if (input[_PA] != null) { + const memberEntries = se_policyDescriptorListType(input[_PA], context); + if (((_a2 = input[_PA]) == null ? void 0 : _a2.length) === 0) { + entries.PolicyArns = []; + } + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `PolicyArns.${key}`; + entries[loc] = value; + }); + } + if (input[_P] != null) { + entries[_P] = input[_P]; + } + if (input[_DS] != null) { + entries[_DS] = input[_DS]; + } + if (input[_T] != null) { + const memberEntries = se_tagListType(input[_T], context); + if (((_b = input[_T]) == null ? void 0 : _b.length) === 0) { + entries.Tags = []; + } + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `Tags.${key}`; + entries[loc] = value; + }); + } + if (input[_TTK] != null) { + const memberEntries = se_tagKeyListType(input[_TTK], context); + if (((_c = input[_TTK]) == null ? void 0 : _c.length) === 0) { + entries.TransitiveTagKeys = []; + } + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `TransitiveTagKeys.${key}`; + entries[loc] = value; + }); + } + if (input[_EI] != null) { + entries[_EI] = input[_EI]; + } + if (input[_SN] != null) { + entries[_SN] = input[_SN]; + } + if (input[_TC] != null) { + entries[_TC] = input[_TC]; + } + if (input[_SI] != null) { + entries[_SI] = input[_SI]; + } + if (input[_PC] != null) { + const memberEntries = se_ProvidedContextsListType(input[_PC], context); + if (((_d = input[_PC]) == null ? void 0 : _d.length) === 0) { + entries.ProvidedContexts = []; + } + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `ProvidedContexts.${key}`; + entries[loc] = value; + }); + } + return entries; + }, "se_AssumeRoleRequest"); + var se_AssumeRoleWithSAMLRequest = /* @__PURE__ */ __name((input, context) => { + var _a2; + const entries = {}; + if (input[_RA] != null) { + entries[_RA] = input[_RA]; + } + if (input[_PAr] != null) { + entries[_PAr] = input[_PAr]; + } + if (input[_SAMLA] != null) { + entries[_SAMLA] = input[_SAMLA]; + } + if (input[_PA] != null) { + const memberEntries = se_policyDescriptorListType(input[_PA], context); + if (((_a2 = input[_PA]) == null ? void 0 : _a2.length) === 0) { + entries.PolicyArns = []; + } + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `PolicyArns.${key}`; + entries[loc] = value; + }); + } + if (input[_P] != null) { + entries[_P] = input[_P]; + } + if (input[_DS] != null) { + entries[_DS] = input[_DS]; + } + return entries; + }, "se_AssumeRoleWithSAMLRequest"); + var se_AssumeRoleWithWebIdentityRequest = /* @__PURE__ */ __name((input, context) => { + var _a2; + const entries = {}; + if (input[_RA] != null) { + entries[_RA] = input[_RA]; + } + if (input[_RSN] != null) { + entries[_RSN] = input[_RSN]; + } + if (input[_WIT] != null) { + entries[_WIT] = input[_WIT]; + } + if (input[_PI] != null) { + entries[_PI] = input[_PI]; + } + if (input[_PA] != null) { + const memberEntries = se_policyDescriptorListType(input[_PA], context); + if (((_a2 = input[_PA]) == null ? void 0 : _a2.length) === 0) { + entries.PolicyArns = []; + } + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `PolicyArns.${key}`; + entries[loc] = value; + }); + } + if (input[_P] != null) { + entries[_P] = input[_P]; + } + if (input[_DS] != null) { + entries[_DS] = input[_DS]; + } + return entries; + }, "se_AssumeRoleWithWebIdentityRequest"); + var se_DecodeAuthorizationMessageRequest = /* @__PURE__ */ __name((input, context) => { + const entries = {}; + if (input[_EM] != null) { + entries[_EM] = input[_EM]; + } + return entries; + }, "se_DecodeAuthorizationMessageRequest"); + var se_GetAccessKeyInfoRequest = /* @__PURE__ */ __name((input, context) => { + const entries = {}; + if (input[_AKI] != null) { + entries[_AKI] = input[_AKI]; + } + return entries; + }, "se_GetAccessKeyInfoRequest"); + var se_GetCallerIdentityRequest = /* @__PURE__ */ __name((input, context) => { + const entries = {}; + return entries; + }, "se_GetCallerIdentityRequest"); + var se_GetFederationTokenRequest = /* @__PURE__ */ __name((input, context) => { + var _a2, _b; + const entries = {}; + if (input[_N] != null) { + entries[_N] = input[_N]; + } + if (input[_P] != null) { + entries[_P] = input[_P]; + } + if (input[_PA] != null) { + const memberEntries = se_policyDescriptorListType(input[_PA], context); + if (((_a2 = input[_PA]) == null ? void 0 : _a2.length) === 0) { + entries.PolicyArns = []; + } + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `PolicyArns.${key}`; + entries[loc] = value; + }); + } + if (input[_DS] != null) { + entries[_DS] = input[_DS]; + } + if (input[_T] != null) { + const memberEntries = se_tagListType(input[_T], context); + if (((_b = input[_T]) == null ? void 0 : _b.length) === 0) { + entries.Tags = []; + } + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `Tags.${key}`; + entries[loc] = value; + }); + } + return entries; + }, "se_GetFederationTokenRequest"); + var se_GetSessionTokenRequest = /* @__PURE__ */ __name((input, context) => { + const entries = {}; + if (input[_DS] != null) { + entries[_DS] = input[_DS]; + } + if (input[_SN] != null) { + entries[_SN] = input[_SN]; + } + if (input[_TC] != null) { + entries[_TC] = input[_TC]; + } + return entries; + }, "se_GetSessionTokenRequest"); + var se_policyDescriptorListType = /* @__PURE__ */ __name((input, context) => { + const entries = {}; + let counter = 1; + for (const entry of input) { + if (entry === null) { + continue; + } + const memberEntries = se_PolicyDescriptorType(entry, context); + Object.entries(memberEntries).forEach(([key, value]) => { + entries[`member.${counter}.${key}`] = value; + }); + counter++; + } + return entries; + }, "se_policyDescriptorListType"); + var se_PolicyDescriptorType = /* @__PURE__ */ __name((input, context) => { + const entries = {}; + if (input[_a] != null) { + entries[_a] = input[_a]; + } + return entries; + }, "se_PolicyDescriptorType"); + var se_ProvidedContext = /* @__PURE__ */ __name((input, context) => { + const entries = {}; + if (input[_PAro] != null) { + entries[_PAro] = input[_PAro]; + } + if (input[_CA] != null) { + entries[_CA] = input[_CA]; + } + return entries; + }, "se_ProvidedContext"); + var se_ProvidedContextsListType = /* @__PURE__ */ __name((input, context) => { + const entries = {}; + let counter = 1; + for (const entry of input) { + if (entry === null) { + continue; + } + const memberEntries = se_ProvidedContext(entry, context); + Object.entries(memberEntries).forEach(([key, value]) => { + entries[`member.${counter}.${key}`] = value; + }); + counter++; + } + return entries; + }, "se_ProvidedContextsListType"); + var se_Tag = /* @__PURE__ */ __name((input, context) => { + const entries = {}; + if (input[_K] != null) { + entries[_K] = input[_K]; + } + if (input[_Va] != null) { + entries[_Va] = input[_Va]; + } + return entries; + }, "se_Tag"); + var se_tagKeyListType = /* @__PURE__ */ __name((input, context) => { + const entries = {}; + let counter = 1; + for (const entry of input) { + if (entry === null) { + continue; + } + entries[`member.${counter}`] = entry; + counter++; + } + return entries; + }, "se_tagKeyListType"); + var se_tagListType = /* @__PURE__ */ __name((input, context) => { + const entries = {}; + let counter = 1; + for (const entry of input) { + if (entry === null) { + continue; + } + const memberEntries = se_Tag(entry, context); + Object.entries(memberEntries).forEach(([key, value]) => { + entries[`member.${counter}.${key}`] = value; + }); + counter++; + } + return entries; + }, "se_tagListType"); + var de_AssumedRoleUser = /* @__PURE__ */ __name((output, context) => { + const contents = {}; + if (output[_ARI] != null) { + contents[_ARI] = (0, import_smithy_client5.expectString)(output[_ARI]); + } + if (output[_Ar] != null) { + contents[_Ar] = (0, import_smithy_client5.expectString)(output[_Ar]); + } + return contents; + }, "de_AssumedRoleUser"); + var de_AssumeRoleResponse = /* @__PURE__ */ __name((output, context) => { + const contents = {}; + if (output[_C] != null) { + contents[_C] = de_Credentials(output[_C], context); + } + if (output[_ARU] != null) { + contents[_ARU] = de_AssumedRoleUser(output[_ARU], context); + } + if (output[_PPS] != null) { + contents[_PPS] = (0, import_smithy_client5.strictParseInt32)(output[_PPS]); + } + if (output[_SI] != null) { + contents[_SI] = (0, import_smithy_client5.expectString)(output[_SI]); + } + return contents; + }, "de_AssumeRoleResponse"); + var de_AssumeRoleWithSAMLResponse = /* @__PURE__ */ __name((output, context) => { + const contents = {}; + if (output[_C] != null) { + contents[_C] = de_Credentials(output[_C], context); + } + if (output[_ARU] != null) { + contents[_ARU] = de_AssumedRoleUser(output[_ARU], context); + } + if (output[_PPS] != null) { + contents[_PPS] = (0, import_smithy_client5.strictParseInt32)(output[_PPS]); + } + if (output[_S] != null) { + contents[_S] = (0, import_smithy_client5.expectString)(output[_S]); + } + if (output[_ST] != null) { + contents[_ST] = (0, import_smithy_client5.expectString)(output[_ST]); + } + if (output[_I] != null) { + contents[_I] = (0, import_smithy_client5.expectString)(output[_I]); + } + if (output[_Au] != null) { + contents[_Au] = (0, import_smithy_client5.expectString)(output[_Au]); + } + if (output[_NQ] != null) { + contents[_NQ] = (0, import_smithy_client5.expectString)(output[_NQ]); + } + if (output[_SI] != null) { + contents[_SI] = (0, import_smithy_client5.expectString)(output[_SI]); + } + return contents; + }, "de_AssumeRoleWithSAMLResponse"); + var de_AssumeRoleWithWebIdentityResponse = /* @__PURE__ */ __name((output, context) => { + const contents = {}; + if (output[_C] != null) { + contents[_C] = de_Credentials(output[_C], context); + } + if (output[_SFWIT] != null) { + contents[_SFWIT] = (0, import_smithy_client5.expectString)(output[_SFWIT]); + } + if (output[_ARU] != null) { + contents[_ARU] = de_AssumedRoleUser(output[_ARU], context); + } + if (output[_PPS] != null) { + contents[_PPS] = (0, import_smithy_client5.strictParseInt32)(output[_PPS]); + } + if (output[_Pr] != null) { + contents[_Pr] = (0, import_smithy_client5.expectString)(output[_Pr]); + } + if (output[_Au] != null) { + contents[_Au] = (0, import_smithy_client5.expectString)(output[_Au]); + } + if (output[_SI] != null) { + contents[_SI] = (0, import_smithy_client5.expectString)(output[_SI]); + } + return contents; + }, "de_AssumeRoleWithWebIdentityResponse"); + var de_Credentials = /* @__PURE__ */ __name((output, context) => { + const contents = {}; + if (output[_AKI] != null) { + contents[_AKI] = (0, import_smithy_client5.expectString)(output[_AKI]); + } + if (output[_SAK] != null) { + contents[_SAK] = (0, import_smithy_client5.expectString)(output[_SAK]); + } + if (output[_STe] != null) { + contents[_STe] = (0, import_smithy_client5.expectString)(output[_STe]); + } + if (output[_E] != null) { + contents[_E] = (0, import_smithy_client5.expectNonNull)((0, import_smithy_client5.parseRfc3339DateTimeWithOffset)(output[_E])); + } + return contents; + }, "de_Credentials"); + var de_DecodeAuthorizationMessageResponse = /* @__PURE__ */ __name((output, context) => { + const contents = {}; + if (output[_DM] != null) { + contents[_DM] = (0, import_smithy_client5.expectString)(output[_DM]); + } + return contents; + }, "de_DecodeAuthorizationMessageResponse"); + var de_ExpiredTokenException = /* @__PURE__ */ __name((output, context) => { + const contents = {}; + if (output[_m] != null) { + contents[_m] = (0, import_smithy_client5.expectString)(output[_m]); + } + return contents; + }, "de_ExpiredTokenException"); + var de_FederatedUser = /* @__PURE__ */ __name((output, context) => { + const contents = {}; + if (output[_FUI] != null) { + contents[_FUI] = (0, import_smithy_client5.expectString)(output[_FUI]); + } + if (output[_Ar] != null) { + contents[_Ar] = (0, import_smithy_client5.expectString)(output[_Ar]); + } + return contents; + }, "de_FederatedUser"); + var de_GetAccessKeyInfoResponse = /* @__PURE__ */ __name((output, context) => { + const contents = {}; + if (output[_Ac] != null) { + contents[_Ac] = (0, import_smithy_client5.expectString)(output[_Ac]); + } + return contents; + }, "de_GetAccessKeyInfoResponse"); + var de_GetCallerIdentityResponse = /* @__PURE__ */ __name((output, context) => { + const contents = {}; + if (output[_UI] != null) { + contents[_UI] = (0, import_smithy_client5.expectString)(output[_UI]); + } + if (output[_Ac] != null) { + contents[_Ac] = (0, import_smithy_client5.expectString)(output[_Ac]); + } + if (output[_Ar] != null) { + contents[_Ar] = (0, import_smithy_client5.expectString)(output[_Ar]); + } + return contents; + }, "de_GetCallerIdentityResponse"); + var de_GetFederationTokenResponse = /* @__PURE__ */ __name((output, context) => { + const contents = {}; + if (output[_C] != null) { + contents[_C] = de_Credentials(output[_C], context); + } + if (output[_FU] != null) { + contents[_FU] = de_FederatedUser(output[_FU], context); + } + if (output[_PPS] != null) { + contents[_PPS] = (0, import_smithy_client5.strictParseInt32)(output[_PPS]); + } + return contents; + }, "de_GetFederationTokenResponse"); + var de_GetSessionTokenResponse = /* @__PURE__ */ __name((output, context) => { + const contents = {}; + if (output[_C] != null) { + contents[_C] = de_Credentials(output[_C], context); + } + return contents; + }, "de_GetSessionTokenResponse"); + var de_IDPCommunicationErrorException = /* @__PURE__ */ __name((output, context) => { + const contents = {}; + if (output[_m] != null) { + contents[_m] = (0, import_smithy_client5.expectString)(output[_m]); + } + return contents; + }, "de_IDPCommunicationErrorException"); + var de_IDPRejectedClaimException = /* @__PURE__ */ __name((output, context) => { + const contents = {}; + if (output[_m] != null) { + contents[_m] = (0, import_smithy_client5.expectString)(output[_m]); + } + return contents; + }, "de_IDPRejectedClaimException"); + var de_InvalidAuthorizationMessageException = /* @__PURE__ */ __name((output, context) => { + const contents = {}; + if (output[_m] != null) { + contents[_m] = (0, import_smithy_client5.expectString)(output[_m]); + } + return contents; + }, "de_InvalidAuthorizationMessageException"); + var de_InvalidIdentityTokenException = /* @__PURE__ */ __name((output, context) => { + const contents = {}; + if (output[_m] != null) { + contents[_m] = (0, import_smithy_client5.expectString)(output[_m]); + } + return contents; + }, "de_InvalidIdentityTokenException"); + var de_MalformedPolicyDocumentException = /* @__PURE__ */ __name((output, context) => { + const contents = {}; + if (output[_m] != null) { + contents[_m] = (0, import_smithy_client5.expectString)(output[_m]); + } + return contents; + }, "de_MalformedPolicyDocumentException"); + var de_PackedPolicyTooLargeException = /* @__PURE__ */ __name((output, context) => { + const contents = {}; + if (output[_m] != null) { + contents[_m] = (0, import_smithy_client5.expectString)(output[_m]); + } + return contents; + }, "de_PackedPolicyTooLargeException"); + var de_RegionDisabledException = /* @__PURE__ */ __name((output, context) => { + const contents = {}; + if (output[_m] != null) { + contents[_m] = (0, import_smithy_client5.expectString)(output[_m]); + } + return contents; + }, "de_RegionDisabledException"); + var deserializeMetadata = /* @__PURE__ */ __name((output) => ({ httpStatusCode: output.statusCode, requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"], extendedRequestId: output.headers["x-amz-id-2"], cfId: output.headers["x-amz-cf-id"] - }); - var collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body)); - var throwDefaultError = (0, smithy_client_1.withBaseException)(SFNServiceException_1.SFNServiceException); - var buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => { + }), "deserializeMetadata"); + var throwDefaultError = (0, import_smithy_client5.withBaseException)(STSServiceException); + var buildHttpRpcRequest = /* @__PURE__ */ __name(async (context, headers, path, resolvedHostname, body) => { const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); const contents = { protocol, @@ -20289,2431 +22053,4360 @@ var require_Aws_json1_0 = __commonJS({ if (body !== void 0) { contents.body = body; } - return new protocol_http_1.HttpRequest(contents); + return new import_protocol_http8.HttpRequest(contents); + }, "buildHttpRpcRequest"); + var SHARED_HEADERS = { + "content-type": "application/x-www-form-urlencoded" }; - function sharedHeaders(operation) { - return { - "content-type": "application/x-amz-json-1.0", - "x-amz-target": `AWSStepFunctions.${operation}` - }; - } - var parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => { - if (encoded.length) { - return JSON.parse(encoded); + var _ = "2011-06-15"; + var _A = "Action"; + var _AKI = "AccessKeyId"; + var _AR = "AssumeRole"; + var _ARI = "AssumedRoleId"; + var _ARU = "AssumedRoleUser"; + var _ARWSAML = "AssumeRoleWithSAML"; + var _ARWWI = "AssumeRoleWithWebIdentity"; + var _Ac = "Account"; + var _Ar = "Arn"; + var _Au = "Audience"; + var _C = "Credentials"; + var _CA = "ContextAssertion"; + var _DAM = "DecodeAuthorizationMessage"; + var _DM = "DecodedMessage"; + var _DS = "DurationSeconds"; + var _E = "Expiration"; + var _EI = "ExternalId"; + var _EM = "EncodedMessage"; + var _FU = "FederatedUser"; + var _FUI = "FederatedUserId"; + var _GAKI = "GetAccessKeyInfo"; + var _GCI = "GetCallerIdentity"; + var _GFT = "GetFederationToken"; + var _GST = "GetSessionToken"; + var _I = "Issuer"; + var _K = "Key"; + var _N = "Name"; + var _NQ = "NameQualifier"; + var _P = "Policy"; + var _PA = "PolicyArns"; + var _PAr = "PrincipalArn"; + var _PAro = "ProviderArn"; + var _PC = "ProvidedContexts"; + var _PI = "ProviderId"; + var _PPS = "PackedPolicySize"; + var _Pr = "Provider"; + var _RA = "RoleArn"; + var _RSN = "RoleSessionName"; + var _S = "Subject"; + var _SAK = "SecretAccessKey"; + var _SAMLA = "SAMLAssertion"; + var _SFWIT = "SubjectFromWebIdentityToken"; + var _SI = "SourceIdentity"; + var _SN = "SerialNumber"; + var _ST = "SubjectType"; + var _STe = "SessionToken"; + var _T = "Tags"; + var _TC = "TokenCode"; + var _TTK = "TransitiveTagKeys"; + var _UI = "UserId"; + var _V = "Version"; + var _Va = "Value"; + var _WIT = "WebIdentityToken"; + var _a = "arn"; + var _m = "message"; + var buildFormUrlencodedString = /* @__PURE__ */ __name((formEntries) => Object.entries(formEntries).map(([key, value]) => (0, import_smithy_client5.extendedEncodeURIComponent)(key) + "=" + (0, import_smithy_client5.extendedEncodeURIComponent)(value)).join("&"), "buildFormUrlencodedString"); + var loadQueryErrorCode = /* @__PURE__ */ __name((output, data) => { + var _a2; + if (((_a2 = data.Error) == null ? void 0 : _a2.Code) !== void 0) { + return data.Error.Code; } - return {}; - }); - var parseErrorBody = async (errorBody, context) => { - const value = await parseBody(errorBody, context); - value.message = value.message ?? value.Message; - return value; + if (output.statusCode == 404) { + return "NotFound"; + } + }, "loadQueryErrorCode"); + var _AssumeRoleCommand = class _AssumeRoleCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...import_EndpointParameters.commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("AWSSecurityTokenServiceV20110615", "AssumeRole", {}).n("STSClient", "AssumeRoleCommand").f(void 0, AssumeRoleResponseFilterSensitiveLog).ser(se_AssumeRoleCommand).de(de_AssumeRoleCommand).build() { + }; + __name(_AssumeRoleCommand, "AssumeRoleCommand"); + var AssumeRoleCommand = _AssumeRoleCommand; + var import_EndpointParameters2 = require_EndpointParameters(); + var _AssumeRoleWithSAMLCommand = class _AssumeRoleWithSAMLCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...import_EndpointParameters2.commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("AWSSecurityTokenServiceV20110615", "AssumeRoleWithSAML", {}).n("STSClient", "AssumeRoleWithSAMLCommand").f(AssumeRoleWithSAMLRequestFilterSensitiveLog, AssumeRoleWithSAMLResponseFilterSensitiveLog).ser(se_AssumeRoleWithSAMLCommand).de(de_AssumeRoleWithSAMLCommand).build() { + }; + __name(_AssumeRoleWithSAMLCommand, "AssumeRoleWithSAMLCommand"); + var AssumeRoleWithSAMLCommand = _AssumeRoleWithSAMLCommand; + var import_EndpointParameters3 = require_EndpointParameters(); + var _AssumeRoleWithWebIdentityCommand = class _AssumeRoleWithWebIdentityCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...import_EndpointParameters3.commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("AWSSecurityTokenServiceV20110615", "AssumeRoleWithWebIdentity", {}).n("STSClient", "AssumeRoleWithWebIdentityCommand").f(AssumeRoleWithWebIdentityRequestFilterSensitiveLog, AssumeRoleWithWebIdentityResponseFilterSensitiveLog).ser(se_AssumeRoleWithWebIdentityCommand).de(de_AssumeRoleWithWebIdentityCommand).build() { + }; + __name(_AssumeRoleWithWebIdentityCommand, "AssumeRoleWithWebIdentityCommand"); + var AssumeRoleWithWebIdentityCommand = _AssumeRoleWithWebIdentityCommand; + var import_EndpointParameters4 = require_EndpointParameters(); + var _DecodeAuthorizationMessageCommand = class _DecodeAuthorizationMessageCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...import_EndpointParameters4.commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("AWSSecurityTokenServiceV20110615", "DecodeAuthorizationMessage", {}).n("STSClient", "DecodeAuthorizationMessageCommand").f(void 0, void 0).ser(se_DecodeAuthorizationMessageCommand).de(de_DecodeAuthorizationMessageCommand).build() { + }; + __name(_DecodeAuthorizationMessageCommand, "DecodeAuthorizationMessageCommand"); + var DecodeAuthorizationMessageCommand = _DecodeAuthorizationMessageCommand; + var import_EndpointParameters5 = require_EndpointParameters(); + var _GetAccessKeyInfoCommand = class _GetAccessKeyInfoCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...import_EndpointParameters5.commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("AWSSecurityTokenServiceV20110615", "GetAccessKeyInfo", {}).n("STSClient", "GetAccessKeyInfoCommand").f(void 0, void 0).ser(se_GetAccessKeyInfoCommand).de(de_GetAccessKeyInfoCommand).build() { + }; + __name(_GetAccessKeyInfoCommand, "GetAccessKeyInfoCommand"); + var GetAccessKeyInfoCommand = _GetAccessKeyInfoCommand; + var import_EndpointParameters6 = require_EndpointParameters(); + var _GetCallerIdentityCommand = class _GetCallerIdentityCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...import_EndpointParameters6.commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("AWSSecurityTokenServiceV20110615", "GetCallerIdentity", {}).n("STSClient", "GetCallerIdentityCommand").f(void 0, void 0).ser(se_GetCallerIdentityCommand).de(de_GetCallerIdentityCommand).build() { + }; + __name(_GetCallerIdentityCommand, "GetCallerIdentityCommand"); + var GetCallerIdentityCommand = _GetCallerIdentityCommand; + var import_EndpointParameters7 = require_EndpointParameters(); + var _GetFederationTokenCommand = class _GetFederationTokenCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...import_EndpointParameters7.commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("AWSSecurityTokenServiceV20110615", "GetFederationToken", {}).n("STSClient", "GetFederationTokenCommand").f(void 0, GetFederationTokenResponseFilterSensitiveLog).ser(se_GetFederationTokenCommand).de(de_GetFederationTokenCommand).build() { + }; + __name(_GetFederationTokenCommand, "GetFederationTokenCommand"); + var GetFederationTokenCommand = _GetFederationTokenCommand; + var import_EndpointParameters8 = require_EndpointParameters(); + var _GetSessionTokenCommand = class _GetSessionTokenCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...import_EndpointParameters8.commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("AWSSecurityTokenServiceV20110615", "GetSessionToken", {}).n("STSClient", "GetSessionTokenCommand").f(void 0, GetSessionTokenResponseFilterSensitiveLog).ser(se_GetSessionTokenCommand).de(de_GetSessionTokenCommand).build() { }; - var loadRestJsonErrorCode = (output, data) => { - const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase()); - const sanitizeErrorCode = (rawValue) => { - let cleanValue = rawValue; - if (typeof cleanValue === "number") { - cleanValue = cleanValue.toString(); - } - if (cleanValue.indexOf(",") >= 0) { - cleanValue = cleanValue.split(",")[0]; + __name(_GetSessionTokenCommand, "GetSessionTokenCommand"); + var GetSessionTokenCommand = _GetSessionTokenCommand; + var import_STSClient = require_STSClient(); + var commands = { + AssumeRoleCommand, + AssumeRoleWithSAMLCommand, + AssumeRoleWithWebIdentityCommand, + DecodeAuthorizationMessageCommand, + GetAccessKeyInfoCommand, + GetCallerIdentityCommand, + GetFederationTokenCommand, + GetSessionTokenCommand + }; + var _STS = class _STS extends import_STSClient.STSClient { + }; + __name(_STS, "STS"); + var STS = _STS; + (0, import_smithy_client5.createAggregatedClient)(commands, STS); + var import_EndpointParameters9 = require_EndpointParameters(); + var ASSUME_ROLE_DEFAULT_REGION = "us-east-1"; + var getAccountIdFromAssumedRoleUser = /* @__PURE__ */ __name((assumedRoleUser) => { + if (typeof (assumedRoleUser == null ? void 0 : assumedRoleUser.Arn) === "string") { + const arnComponents = assumedRoleUser.Arn.split(":"); + if (arnComponents.length > 4 && arnComponents[4] !== "") { + return arnComponents[4]; } - if (cleanValue.indexOf(":") >= 0) { - cleanValue = cleanValue.split(":")[0]; + } + return void 0; + }, "getAccountIdFromAssumedRoleUser"); + var resolveRegion = /* @__PURE__ */ __name(async (_region, _parentRegion, credentialProviderLogger) => { + var _a2; + const region = typeof _region === "function" ? await _region() : _region; + const parentRegion = typeof _parentRegion === "function" ? await _parentRegion() : _parentRegion; + (_a2 = credentialProviderLogger == null ? void 0 : credentialProviderLogger.debug) == null ? void 0 : _a2.call( + credentialProviderLogger, + "@aws-sdk/client-sts::resolveRegion", + "accepting first of:", + `${region} (provider)`, + `${parentRegion} (parent client)`, + `${ASSUME_ROLE_DEFAULT_REGION} (STS default)` + ); + return region ?? parentRegion ?? ASSUME_ROLE_DEFAULT_REGION; + }, "resolveRegion"); + var getDefaultRoleAssumer = /* @__PURE__ */ __name((stsOptions, stsClientCtor) => { + let stsClient; + let closureSourceCreds; + return async (sourceCreds, params) => { + var _a2, _b, _c; + closureSourceCreds = sourceCreds; + if (!stsClient) { + const { + logger = (_a2 = stsOptions == null ? void 0 : stsOptions.parentClientConfig) == null ? void 0 : _a2.logger, + region, + requestHandler = (_b = stsOptions == null ? void 0 : stsOptions.parentClientConfig) == null ? void 0 : _b.requestHandler, + credentialProviderLogger + } = stsOptions; + const resolvedRegion = await resolveRegion( + region, + (_c = stsOptions == null ? void 0 : stsOptions.parentClientConfig) == null ? void 0 : _c.region, + credentialProviderLogger + ); + const isCompatibleRequestHandler = !isH2(requestHandler); + stsClient = new stsClientCtor({ + // A hack to make sts client uses the credential in current closure. + credentialDefaultProvider: () => async () => closureSourceCreds, + region: resolvedRegion, + requestHandler: isCompatibleRequestHandler ? requestHandler : void 0, + logger + }); } - if (cleanValue.indexOf("#") >= 0) { - cleanValue = cleanValue.split("#")[1]; + const { Credentials: Credentials2, AssumedRoleUser: AssumedRoleUser2 } = await stsClient.send(new AssumeRoleCommand(params)); + if (!Credentials2 || !Credentials2.AccessKeyId || !Credentials2.SecretAccessKey) { + throw new Error(`Invalid response from STS.assumeRole call with role ${params.RoleArn}`); } - return cleanValue; - }; - const headerKey = findKey(output.headers, "x-amzn-errortype"); - if (headerKey !== void 0) { - return sanitizeErrorCode(output.headers[headerKey]); - } - if (data.code !== void 0) { - return sanitizeErrorCode(data.code); - } - if (data["__type"] !== void 0) { - return sanitizeErrorCode(data["__type"]); - } - }; - } -}); - -// ../../../node_modules/@aws-sdk/client-sfn/dist-cjs/commands/CreateActivityCommand.js -var require_CreateActivityCommand = __commonJS({ - "../../../node_modules/@aws-sdk/client-sfn/dist-cjs/commands/CreateActivityCommand.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.CreateActivityCommand = exports2.$Command = void 0; - var middleware_endpoint_1 = require_dist_cjs26(); - var middleware_serde_1 = require_dist_cjs25(); - var smithy_client_1 = require_dist_cjs34(); - Object.defineProperty(exports2, "$Command", { enumerable: true, get: function() { - return smithy_client_1.Command; - } }); - var types_1 = require_dist_cjs(); - var Aws_json1_0_1 = require_Aws_json1_0(); - var CreateActivityCommand = class _CreateActivityCommand extends smithy_client_1.Command { - static getEndpointParameterInstructions() { + const accountId = getAccountIdFromAssumedRoleUser(AssumedRoleUser2); return { - UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, - Endpoint: { type: "builtInParams", name: "endpoint" }, - Region: { type: "builtInParams", name: "region" }, - UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" } - }; - } - constructor(input) { - super(); - this.input = input; - } - resolveMiddleware(clientStack, configuration, options) { - this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, _CreateActivityCommand.getEndpointParameterInstructions())); - const stack = clientStack.concat(this.middlewareStack); - const { logger } = configuration; - const clientName = "SFNClient"; - const commandName = "CreateActivityCommand"; - const handlerExecutionContext = { - logger, - clientName, - commandName, - inputFilterSensitiveLog: (_) => _, - outputFilterSensitiveLog: (_) => _, - [types_1.SMITHY_CONTEXT_KEY]: { - service: "AWSStepFunctions", - operation: "CreateActivity" - } + accessKeyId: Credentials2.AccessKeyId, + secretAccessKey: Credentials2.SecretAccessKey, + sessionToken: Credentials2.SessionToken, + expiration: Credentials2.Expiration, + // TODO(credentialScope): access normally when shape is updated. + ...Credentials2.CredentialScope && { credentialScope: Credentials2.CredentialScope }, + ...accountId && { accountId } }; - const { requestHandler } = configuration; - return stack.resolve((request2) => requestHandler.handle(request2.request, options || {}), handlerExecutionContext); - } - serialize(input, context) { - return (0, Aws_json1_0_1.se_CreateActivityCommand)(input, context); - } - deserialize(output, context) { - return (0, Aws_json1_0_1.de_CreateActivityCommand)(output, context); - } - }; - exports2.CreateActivityCommand = CreateActivityCommand; - } -}); - -// ../../../node_modules/@aws-sdk/client-sfn/dist-cjs/commands/CreateStateMachineAliasCommand.js -var require_CreateStateMachineAliasCommand = __commonJS({ - "../../../node_modules/@aws-sdk/client-sfn/dist-cjs/commands/CreateStateMachineAliasCommand.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.CreateStateMachineAliasCommand = exports2.$Command = void 0; - var middleware_endpoint_1 = require_dist_cjs26(); - var middleware_serde_1 = require_dist_cjs25(); - var smithy_client_1 = require_dist_cjs34(); - Object.defineProperty(exports2, "$Command", { enumerable: true, get: function() { - return smithy_client_1.Command; - } }); - var types_1 = require_dist_cjs(); - var models_0_1 = require_models_03(); - var Aws_json1_0_1 = require_Aws_json1_0(); - var CreateStateMachineAliasCommand = class _CreateStateMachineAliasCommand extends smithy_client_1.Command { - static getEndpointParameterInstructions() { + }; + }, "getDefaultRoleAssumer"); + var getDefaultRoleAssumerWithWebIdentity = /* @__PURE__ */ __name((stsOptions, stsClientCtor) => { + let stsClient; + return async (params) => { + var _a2, _b, _c; + if (!stsClient) { + const { + logger = (_a2 = stsOptions == null ? void 0 : stsOptions.parentClientConfig) == null ? void 0 : _a2.logger, + region, + requestHandler = (_b = stsOptions == null ? void 0 : stsOptions.parentClientConfig) == null ? void 0 : _b.requestHandler, + credentialProviderLogger + } = stsOptions; + const resolvedRegion = await resolveRegion( + region, + (_c = stsOptions == null ? void 0 : stsOptions.parentClientConfig) == null ? void 0 : _c.region, + credentialProviderLogger + ); + const isCompatibleRequestHandler = !isH2(requestHandler); + stsClient = new stsClientCtor({ + region: resolvedRegion, + requestHandler: isCompatibleRequestHandler ? requestHandler : void 0, + logger + }); + } + const { Credentials: Credentials2, AssumedRoleUser: AssumedRoleUser2 } = await stsClient.send(new AssumeRoleWithWebIdentityCommand(params)); + if (!Credentials2 || !Credentials2.AccessKeyId || !Credentials2.SecretAccessKey) { + throw new Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${params.RoleArn}`); + } + const accountId = getAccountIdFromAssumedRoleUser(AssumedRoleUser2); return { - UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, - Endpoint: { type: "builtInParams", name: "endpoint" }, - Region: { type: "builtInParams", name: "region" }, - UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" } + accessKeyId: Credentials2.AccessKeyId, + secretAccessKey: Credentials2.SecretAccessKey, + sessionToken: Credentials2.SessionToken, + expiration: Credentials2.Expiration, + // TODO(credentialScope): access normally when shape is updated. + ...Credentials2.CredentialScope && { credentialScope: Credentials2.CredentialScope }, + ...accountId && { accountId } }; - } - constructor(input) { - super(); - this.input = input; - } - resolveMiddleware(clientStack, configuration, options) { - this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, _CreateStateMachineAliasCommand.getEndpointParameterInstructions())); - const stack = clientStack.concat(this.middlewareStack); - const { logger } = configuration; - const clientName = "SFNClient"; - const commandName = "CreateStateMachineAliasCommand"; - const handlerExecutionContext = { - logger, - clientName, - commandName, - inputFilterSensitiveLog: models_0_1.CreateStateMachineAliasInputFilterSensitiveLog, - outputFilterSensitiveLog: (_) => _, - [types_1.SMITHY_CONTEXT_KEY]: { - service: "AWSStepFunctions", - operation: "CreateStateMachineAlias" + }; + }, "getDefaultRoleAssumerWithWebIdentity"); + var isH2 = /* @__PURE__ */ __name((requestHandler) => { + var _a2; + return ((_a2 = requestHandler == null ? void 0 : requestHandler.metadata) == null ? void 0 : _a2.handlerProtocol) === "h2"; + }, "isH2"); + var import_STSClient2 = require_STSClient(); + var getCustomizableStsClientCtor = /* @__PURE__ */ __name((baseCtor, customizations) => { + var _a2; + if (!customizations) + return baseCtor; + else + return _a2 = class extends baseCtor { + constructor(config) { + super(config); + for (const customization of customizations) { + this.middlewareStack.use(customization); + } } - }; - const { requestHandler } = configuration; - return stack.resolve((request2) => requestHandler.handle(request2.request, options || {}), handlerExecutionContext); - } - serialize(input, context) { - return (0, Aws_json1_0_1.se_CreateStateMachineAliasCommand)(input, context); - } - deserialize(output, context) { - return (0, Aws_json1_0_1.de_CreateStateMachineAliasCommand)(output, context); - } - }; - exports2.CreateStateMachineAliasCommand = CreateStateMachineAliasCommand; + }, __name(_a2, "CustomizableSTSClient"), _a2; + }, "getCustomizableStsClientCtor"); + var getDefaultRoleAssumer2 = /* @__PURE__ */ __name((stsOptions = {}, stsPlugins) => getDefaultRoleAssumer(stsOptions, getCustomizableStsClientCtor(import_STSClient2.STSClient, stsPlugins)), "getDefaultRoleAssumer"); + var getDefaultRoleAssumerWithWebIdentity2 = /* @__PURE__ */ __name((stsOptions = {}, stsPlugins) => getDefaultRoleAssumerWithWebIdentity(stsOptions, getCustomizableStsClientCtor(import_STSClient2.STSClient, stsPlugins)), "getDefaultRoleAssumerWithWebIdentity"); + var decorateDefaultCredentialProvider = /* @__PURE__ */ __name((provider) => (input) => provider({ + roleAssumer: getDefaultRoleAssumer2(input), + roleAssumerWithWebIdentity: getDefaultRoleAssumerWithWebIdentity2(input), + ...input + }), "decorateDefaultCredentialProvider"); } }); -// ../../../node_modules/@aws-sdk/client-sfn/dist-cjs/commands/CreateStateMachineCommand.js -var require_CreateStateMachineCommand = __commonJS({ - "../../../node_modules/@aws-sdk/client-sfn/dist-cjs/commands/CreateStateMachineCommand.js"(exports2) { +// ../../../node_modules/@aws-sdk/credential-provider-process/dist-cjs/index.js +var require_dist_cjs76 = __commonJS({ + "../../../node_modules/@aws-sdk/credential-provider-process/dist-cjs/index.js"(exports2, module2) { "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.CreateStateMachineCommand = exports2.$Command = void 0; - var middleware_endpoint_1 = require_dist_cjs26(); - var middleware_serde_1 = require_dist_cjs25(); - var smithy_client_1 = require_dist_cjs34(); - Object.defineProperty(exports2, "$Command", { enumerable: true, get: function() { - return smithy_client_1.Command; - } }); - var types_1 = require_dist_cjs(); - var models_0_1 = require_models_03(); - var Aws_json1_0_1 = require_Aws_json1_0(); - var CreateStateMachineCommand = class _CreateStateMachineCommand extends smithy_client_1.Command { - static getEndpointParameterInstructions() { - return { - UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, - Endpoint: { type: "builtInParams", name: "endpoint" }, - Region: { type: "builtInParams", name: "region" }, - UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" } - }; - } - constructor(input) { - super(); - this.input = input; - } - resolveMiddleware(clientStack, configuration, options) { - this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, _CreateStateMachineCommand.getEndpointParameterInstructions())); - const stack = clientStack.concat(this.middlewareStack); - const { logger } = configuration; - const clientName = "SFNClient"; - const commandName = "CreateStateMachineCommand"; - const handlerExecutionContext = { - logger, - clientName, - commandName, - inputFilterSensitiveLog: models_0_1.CreateStateMachineInputFilterSensitiveLog, - outputFilterSensitiveLog: (_) => _, - [types_1.SMITHY_CONTEXT_KEY]: { - service: "AWSStepFunctions", - operation: "CreateStateMachine" - } - }; - const { requestHandler } = configuration; - return stack.resolve((request2) => requestHandler.handle(request2.request, options || {}), handlerExecutionContext); - } - serialize(input, context) { - return (0, Aws_json1_0_1.se_CreateStateMachineCommand)(input, context); - } - deserialize(output, context) { - return (0, Aws_json1_0_1.de_CreateStateMachineCommand)(output, context); - } + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all) => { + for (var name in all) + __defProp2(target, name, { get: all[name], enumerable: true }); }; - exports2.CreateStateMachineCommand = CreateStateMachineCommand; - } -}); - -// ../../../node_modules/@aws-sdk/client-sfn/dist-cjs/commands/DeleteActivityCommand.js -var require_DeleteActivityCommand = __commonJS({ - "../../../node_modules/@aws-sdk/client-sfn/dist-cjs/commands/DeleteActivityCommand.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.DeleteActivityCommand = exports2.$Command = void 0; - var middleware_endpoint_1 = require_dist_cjs26(); - var middleware_serde_1 = require_dist_cjs25(); - var smithy_client_1 = require_dist_cjs34(); - Object.defineProperty(exports2, "$Command", { enumerable: true, get: function() { - return smithy_client_1.Command; - } }); - var types_1 = require_dist_cjs(); - var Aws_json1_0_1 = require_Aws_json1_0(); - var DeleteActivityCommand = class _DeleteActivityCommand extends smithy_client_1.Command { - static getEndpointParameterInstructions() { - return { - UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, - Endpoint: { type: "builtInParams", name: "endpoint" }, - Region: { type: "builtInParams", name: "region" }, - UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" } - }; - } - constructor(input) { - super(); - this.input = input; - } - resolveMiddleware(clientStack, configuration, options) { - this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, _DeleteActivityCommand.getEndpointParameterInstructions())); - const stack = clientStack.concat(this.middlewareStack); - const { logger } = configuration; - const clientName = "SFNClient"; - const commandName = "DeleteActivityCommand"; - const handlerExecutionContext = { - logger, - clientName, - commandName, - inputFilterSensitiveLog: (_) => _, - outputFilterSensitiveLog: (_) => _, - [types_1.SMITHY_CONTEXT_KEY]: { - service: "AWSStepFunctions", - operation: "DeleteActivity" - } - }; - const { requestHandler } = configuration; - return stack.resolve((request2) => requestHandler.handle(request2.request, options || {}), handlerExecutionContext); - } - serialize(input, context) { - return (0, Aws_json1_0_1.se_DeleteActivityCommand)(input, context); - } - deserialize(output, context) { - return (0, Aws_json1_0_1.de_DeleteActivityCommand)(output, context); + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); } + return to; }; - exports2.DeleteActivityCommand = DeleteActivityCommand; - } -}); - -// ../../../node_modules/@aws-sdk/client-sfn/dist-cjs/commands/DeleteStateMachineAliasCommand.js -var require_DeleteStateMachineAliasCommand = __commonJS({ - "../../../node_modules/@aws-sdk/client-sfn/dist-cjs/commands/DeleteStateMachineAliasCommand.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.DeleteStateMachineAliasCommand = exports2.$Command = void 0; - var middleware_endpoint_1 = require_dist_cjs26(); - var middleware_serde_1 = require_dist_cjs25(); - var smithy_client_1 = require_dist_cjs34(); - Object.defineProperty(exports2, "$Command", { enumerable: true, get: function() { - return smithy_client_1.Command; - } }); - var types_1 = require_dist_cjs(); - var Aws_json1_0_1 = require_Aws_json1_0(); - var DeleteStateMachineAliasCommand = class _DeleteStateMachineAliasCommand extends smithy_client_1.Command { - static getEndpointParameterInstructions() { - return { - UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, - Endpoint: { type: "builtInParams", name: "endpoint" }, - Region: { type: "builtInParams", name: "region" }, - UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" } - }; - } - constructor(input) { - super(); - this.input = input; - } - resolveMiddleware(clientStack, configuration, options) { - this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, _DeleteStateMachineAliasCommand.getEndpointParameterInstructions())); - const stack = clientStack.concat(this.middlewareStack); - const { logger } = configuration; - const clientName = "SFNClient"; - const commandName = "DeleteStateMachineAliasCommand"; - const handlerExecutionContext = { - logger, - clientName, - commandName, - inputFilterSensitiveLog: (_) => _, - outputFilterSensitiveLog: (_) => _, - [types_1.SMITHY_CONTEXT_KEY]: { - service: "AWSStepFunctions", - operation: "DeleteStateMachineAlias" - } - }; - const { requestHandler } = configuration; - return stack.resolve((request2) => requestHandler.handle(request2.request, options || {}), handlerExecutionContext); - } - serialize(input, context) { - return (0, Aws_json1_0_1.se_DeleteStateMachineAliasCommand)(input, context); + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + fromProcess: () => fromProcess + }); + module2.exports = __toCommonJS2(src_exports); + var import_shared_ini_file_loader = require_dist_cjs41(); + var import_property_provider2 = require_dist_cjs40(); + var import_child_process = require("child_process"); + var import_util = require("util"); + var getValidatedProcessCredentials = /* @__PURE__ */ __name((profileName, data, profiles) => { + var _a; + if (data.Version !== 1) { + throw Error(`Profile ${profileName} credential_process did not return Version 1.`); } - deserialize(output, context) { - return (0, Aws_json1_0_1.de_DeleteStateMachineAliasCommand)(output, context); + if (data.AccessKeyId === void 0 || data.SecretAccessKey === void 0) { + throw Error(`Profile ${profileName} credential_process returned invalid credentials.`); } - }; - exports2.DeleteStateMachineAliasCommand = DeleteStateMachineAliasCommand; - } -}); - -// ../../../node_modules/@aws-sdk/client-sfn/dist-cjs/commands/DeleteStateMachineCommand.js -var require_DeleteStateMachineCommand = __commonJS({ - "../../../node_modules/@aws-sdk/client-sfn/dist-cjs/commands/DeleteStateMachineCommand.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.DeleteStateMachineCommand = exports2.$Command = void 0; - var middleware_endpoint_1 = require_dist_cjs26(); - var middleware_serde_1 = require_dist_cjs25(); - var smithy_client_1 = require_dist_cjs34(); - Object.defineProperty(exports2, "$Command", { enumerable: true, get: function() { - return smithy_client_1.Command; - } }); - var types_1 = require_dist_cjs(); - var Aws_json1_0_1 = require_Aws_json1_0(); - var DeleteStateMachineCommand = class _DeleteStateMachineCommand extends smithy_client_1.Command { - static getEndpointParameterInstructions() { - return { - UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, - Endpoint: { type: "builtInParams", name: "endpoint" }, - Region: { type: "builtInParams", name: "region" }, - UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" } - }; + if (data.Expiration) { + const currentTime = /* @__PURE__ */ new Date(); + const expireTime = new Date(data.Expiration); + if (expireTime < currentTime) { + throw Error(`Profile ${profileName} credential_process returned expired credentials.`); + } } - constructor(input) { - super(); - this.input = input; + let accountId = data.AccountId; + if (!accountId && ((_a = profiles == null ? void 0 : profiles[profileName]) == null ? void 0 : _a.aws_account_id)) { + accountId = profiles[profileName].aws_account_id; } - resolveMiddleware(clientStack, configuration, options) { - this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, _DeleteStateMachineCommand.getEndpointParameterInstructions())); - const stack = clientStack.concat(this.middlewareStack); - const { logger } = configuration; - const clientName = "SFNClient"; - const commandName = "DeleteStateMachineCommand"; - const handlerExecutionContext = { - logger, - clientName, - commandName, - inputFilterSensitiveLog: (_) => _, - outputFilterSensitiveLog: (_) => _, - [types_1.SMITHY_CONTEXT_KEY]: { - service: "AWSStepFunctions", - operation: "DeleteStateMachine" + return { + accessKeyId: data.AccessKeyId, + secretAccessKey: data.SecretAccessKey, + ...data.SessionToken && { sessionToken: data.SessionToken }, + ...data.Expiration && { expiration: new Date(data.Expiration) }, + ...data.CredentialScope && { credentialScope: data.CredentialScope }, + ...accountId && { accountId } + }; + }, "getValidatedProcessCredentials"); + var resolveProcessCredentials = /* @__PURE__ */ __name(async (profileName, profiles, logger) => { + const profile = profiles[profileName]; + if (profiles[profileName]) { + const credentialProcess = profile["credential_process"]; + if (credentialProcess !== void 0) { + const execPromise = (0, import_util.promisify)(import_child_process.exec); + try { + const { stdout } = await execPromise(credentialProcess); + let data; + try { + data = JSON.parse(stdout.trim()); + } catch { + throw Error(`Profile ${profileName} credential_process returned invalid JSON.`); + } + return getValidatedProcessCredentials(profileName, data, profiles); + } catch (error) { + throw new import_property_provider2.CredentialsProviderError(error.message, { logger }); } - }; - const { requestHandler } = configuration; - return stack.resolve((request2) => requestHandler.handle(request2.request, options || {}), handlerExecutionContext); - } - serialize(input, context) { - return (0, Aws_json1_0_1.se_DeleteStateMachineCommand)(input, context); - } - deserialize(output, context) { - return (0, Aws_json1_0_1.de_DeleteStateMachineCommand)(output, context); + } else { + throw new import_property_provider2.CredentialsProviderError(`Profile ${profileName} did not contain credential_process.`, { logger }); + } + } else { + throw new import_property_provider2.CredentialsProviderError(`Profile ${profileName} could not be found in shared credentials file.`, { + logger + }); } - }; - exports2.DeleteStateMachineCommand = DeleteStateMachineCommand; + }, "resolveProcessCredentials"); + var fromProcess = /* @__PURE__ */ __name((init = {}) => async () => { + var _a; + (_a = init.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-process - fromProcess"); + const profiles = await (0, import_shared_ini_file_loader.parseKnownFiles)(init); + return resolveProcessCredentials((0, import_shared_ini_file_loader.getProfileName)(init), profiles, init.logger); + }, "fromProcess"); } }); -// ../../../node_modules/@aws-sdk/client-sfn/dist-cjs/commands/DeleteStateMachineVersionCommand.js -var require_DeleteStateMachineVersionCommand = __commonJS({ - "../../../node_modules/@aws-sdk/client-sfn/dist-cjs/commands/DeleteStateMachineVersionCommand.js"(exports2) { +// ../../../node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/fromWebToken.js +var require_fromWebToken = __commonJS({ + "../../../node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/fromWebToken.js"(exports2) { "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.DeleteStateMachineVersionCommand = exports2.$Command = void 0; - var middleware_endpoint_1 = require_dist_cjs26(); - var middleware_serde_1 = require_dist_cjs25(); - var smithy_client_1 = require_dist_cjs34(); - Object.defineProperty(exports2, "$Command", { enumerable: true, get: function() { - return smithy_client_1.Command; - } }); - var types_1 = require_dist_cjs(); - var Aws_json1_0_1 = require_Aws_json1_0(); - var DeleteStateMachineVersionCommand = class _DeleteStateMachineVersionCommand extends smithy_client_1.Command { - static getEndpointParameterInstructions() { - return { - UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, - Endpoint: { type: "builtInParams", name: "endpoint" }, - Region: { type: "builtInParams", name: "region" }, - UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" } - }; - } - constructor(input) { - super(); - this.input = input; - } - resolveMiddleware(clientStack, configuration, options) { - this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, _DeleteStateMachineVersionCommand.getEndpointParameterInstructions())); - const stack = clientStack.concat(this.middlewareStack); - const { logger } = configuration; - const clientName = "SFNClient"; - const commandName = "DeleteStateMachineVersionCommand"; - const handlerExecutionContext = { - logger, - clientName, - commandName, - inputFilterSensitiveLog: (_) => _, - outputFilterSensitiveLog: (_) => _, - [types_1.SMITHY_CONTEXT_KEY]: { - service: "AWSStepFunctions", - operation: "DeleteStateMachineVersion" - } - }; - const { requestHandler } = configuration; - return stack.resolve((request2) => requestHandler.handle(request2.request, options || {}), handlerExecutionContext); + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; } - serialize(input, context) { - return (0, Aws_json1_0_1.se_DeleteStateMachineVersionCommand)(input, context); + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - deserialize(output, context) { - return (0, Aws_json1_0_1.de_DeleteStateMachineVersionCommand)(output, context); + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.fromWebToken = void 0; + var fromWebToken2 = (init) => async () => { + init.logger?.debug("@aws-sdk/credential-provider-web-identity - fromWebToken"); + const { roleArn, roleSessionName, webIdentityToken, providerId, policyArns, policy, durationSeconds } = init; + let { roleAssumerWithWebIdentity } = init; + if (!roleAssumerWithWebIdentity) { + const { getDefaultRoleAssumerWithWebIdentity } = await Promise.resolve().then(() => __importStar2(require_dist_cjs75())); + roleAssumerWithWebIdentity = getDefaultRoleAssumerWithWebIdentity({ + ...init.clientConfig, + credentialProviderLogger: init.logger, + parentClientConfig: init.parentClientConfig + }, init.clientPlugins); } + return roleAssumerWithWebIdentity({ + RoleArn: roleArn, + RoleSessionName: roleSessionName ?? `aws-sdk-js-session-${Date.now()}`, + WebIdentityToken: webIdentityToken, + ProviderId: providerId, + PolicyArns: policyArns, + Policy: policy, + DurationSeconds: durationSeconds + }); }; - exports2.DeleteStateMachineVersionCommand = DeleteStateMachineVersionCommand; + exports2.fromWebToken = fromWebToken2; } }); -// ../../../node_modules/@aws-sdk/client-sfn/dist-cjs/commands/DescribeActivityCommand.js -var require_DescribeActivityCommand = __commonJS({ - "../../../node_modules/@aws-sdk/client-sfn/dist-cjs/commands/DescribeActivityCommand.js"(exports2) { +// ../../../node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/fromTokenFile.js +var require_fromTokenFile = __commonJS({ + "../../../node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/fromTokenFile.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.DescribeActivityCommand = exports2.$Command = void 0; - var middleware_endpoint_1 = require_dist_cjs26(); - var middleware_serde_1 = require_dist_cjs25(); - var smithy_client_1 = require_dist_cjs34(); - Object.defineProperty(exports2, "$Command", { enumerable: true, get: function() { - return smithy_client_1.Command; - } }); - var types_1 = require_dist_cjs(); - var Aws_json1_0_1 = require_Aws_json1_0(); - var DescribeActivityCommand = class _DescribeActivityCommand extends smithy_client_1.Command { - static getEndpointParameterInstructions() { - return { - UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, - Endpoint: { type: "builtInParams", name: "endpoint" }, - Region: { type: "builtInParams", name: "region" }, - UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" } - }; - } - constructor(input) { - super(); - this.input = input; - } - resolveMiddleware(clientStack, configuration, options) { - this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, _DescribeActivityCommand.getEndpointParameterInstructions())); - const stack = clientStack.concat(this.middlewareStack); - const { logger } = configuration; - const clientName = "SFNClient"; - const commandName = "DescribeActivityCommand"; - const handlerExecutionContext = { - logger, - clientName, - commandName, - inputFilterSensitiveLog: (_) => _, - outputFilterSensitiveLog: (_) => _, - [types_1.SMITHY_CONTEXT_KEY]: { - service: "AWSStepFunctions", - operation: "DescribeActivity" - } - }; - const { requestHandler } = configuration; - return stack.resolve((request2) => requestHandler.handle(request2.request, options || {}), handlerExecutionContext); - } - serialize(input, context) { - return (0, Aws_json1_0_1.se_DescribeActivityCommand)(input, context); - } - deserialize(output, context) { - return (0, Aws_json1_0_1.de_DescribeActivityCommand)(output, context); + exports2.fromTokenFile = void 0; + var property_provider_1 = require_dist_cjs40(); + var fs_1 = require("fs"); + var fromWebToken_1 = require_fromWebToken(); + var ENV_TOKEN_FILE = "AWS_WEB_IDENTITY_TOKEN_FILE"; + var ENV_ROLE_ARN = "AWS_ROLE_ARN"; + var ENV_ROLE_SESSION_NAME = "AWS_ROLE_SESSION_NAME"; + var fromTokenFile2 = (init = {}) => async () => { + init.logger?.debug("@aws-sdk/credential-provider-web-identity - fromTokenFile"); + const webIdentityTokenFile = init?.webIdentityTokenFile ?? process.env[ENV_TOKEN_FILE]; + const roleArn = init?.roleArn ?? process.env[ENV_ROLE_ARN]; + const roleSessionName = init?.roleSessionName ?? process.env[ENV_ROLE_SESSION_NAME]; + if (!webIdentityTokenFile || !roleArn) { + throw new property_provider_1.CredentialsProviderError("Web identity configuration not specified", { + logger: init.logger + }); } + return (0, fromWebToken_1.fromWebToken)({ + ...init, + webIdentityToken: (0, fs_1.readFileSync)(webIdentityTokenFile, { encoding: "ascii" }), + roleArn, + roleSessionName + })(); }; - exports2.DescribeActivityCommand = DescribeActivityCommand; + exports2.fromTokenFile = fromTokenFile2; } }); -// ../../../node_modules/@aws-sdk/client-sfn/dist-cjs/commands/DescribeExecutionCommand.js -var require_DescribeExecutionCommand = __commonJS({ - "../../../node_modules/@aws-sdk/client-sfn/dist-cjs/commands/DescribeExecutionCommand.js"(exports2) { +// ../../../node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/index.js +var require_dist_cjs77 = __commonJS({ + "../../../node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/index.js"(exports2, module2) { "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.DescribeExecutionCommand = exports2.$Command = void 0; - var middleware_endpoint_1 = require_dist_cjs26(); - var middleware_serde_1 = require_dist_cjs25(); - var smithy_client_1 = require_dist_cjs34(); - Object.defineProperty(exports2, "$Command", { enumerable: true, get: function() { - return smithy_client_1.Command; - } }); - var types_1 = require_dist_cjs(); - var models_0_1 = require_models_03(); - var Aws_json1_0_1 = require_Aws_json1_0(); - var DescribeExecutionCommand = class _DescribeExecutionCommand extends smithy_client_1.Command { - static getEndpointParameterInstructions() { - return { - UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, - Endpoint: { type: "builtInParams", name: "endpoint" }, - Region: { type: "builtInParams", name: "region" }, - UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" } - }; - } - constructor(input) { - super(); - this.input = input; - } - resolveMiddleware(clientStack, configuration, options) { - this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, _DescribeExecutionCommand.getEndpointParameterInstructions())); - const stack = clientStack.concat(this.middlewareStack); - const { logger } = configuration; - const clientName = "SFNClient"; - const commandName = "DescribeExecutionCommand"; - const handlerExecutionContext = { - logger, - clientName, - commandName, - inputFilterSensitiveLog: (_) => _, - outputFilterSensitiveLog: models_0_1.DescribeExecutionOutputFilterSensitiveLog, - [types_1.SMITHY_CONTEXT_KEY]: { - service: "AWSStepFunctions", - operation: "DescribeExecution" - } - }; - const { requestHandler } = configuration; - return stack.resolve((request2) => requestHandler.handle(request2.request, options || {}), handlerExecutionContext); - } - serialize(input, context) { - return (0, Aws_json1_0_1.se_DescribeExecutionCommand)(input, context); - } - deserialize(output, context) { - return (0, Aws_json1_0_1.de_DescribeExecutionCommand)(output, context); + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); } + return to; }; - exports2.DescribeExecutionCommand = DescribeExecutionCommand; + var __reExport = (target, mod, secondTarget) => (__copyProps2(target, mod, "default"), secondTarget && __copyProps2(secondTarget, mod, "default")); + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + module2.exports = __toCommonJS2(src_exports); + __reExport(src_exports, require_fromTokenFile(), module2.exports); + __reExport(src_exports, require_fromWebToken(), module2.exports); } }); -// ../../../node_modules/@aws-sdk/client-sfn/dist-cjs/commands/DescribeMapRunCommand.js -var require_DescribeMapRunCommand = __commonJS({ - "../../../node_modules/@aws-sdk/client-sfn/dist-cjs/commands/DescribeMapRunCommand.js"(exports2) { +// ../../../node_modules/@aws-sdk/credential-provider-ini/dist-cjs/index.js +var require_dist_cjs78 = __commonJS({ + "../../../node_modules/@aws-sdk/credential-provider-ini/dist-cjs/index.js"(exports2, module2) { "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.DescribeMapRunCommand = exports2.$Command = void 0; - var middleware_endpoint_1 = require_dist_cjs26(); - var middleware_serde_1 = require_dist_cjs25(); - var smithy_client_1 = require_dist_cjs34(); - Object.defineProperty(exports2, "$Command", { enumerable: true, get: function() { - return smithy_client_1.Command; - } }); - var types_1 = require_dist_cjs(); - var Aws_json1_0_1 = require_Aws_json1_0(); - var DescribeMapRunCommand = class _DescribeMapRunCommand extends smithy_client_1.Command { - static getEndpointParameterInstructions() { - return { - UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, - Endpoint: { type: "builtInParams", name: "endpoint" }, - Region: { type: "builtInParams", name: "region" }, - UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" } - }; - } - constructor(input) { - super(); - this.input = input; + var __create2 = Object.create; + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __getProtoOf2 = Object.getPrototypeOf; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all) => { + for (var name in all) + __defProp2(target, name, { get: all[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); } - resolveMiddleware(clientStack, configuration, options) { - this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, _DescribeMapRunCommand.getEndpointParameterInstructions())); - const stack = clientStack.concat(this.middlewareStack); - const { logger } = configuration; - const clientName = "SFNClient"; - const commandName = "DescribeMapRunCommand"; - const handlerExecutionContext = { - logger, - clientName, - commandName, - inputFilterSensitiveLog: (_) => _, - outputFilterSensitiveLog: (_) => _, - [types_1.SMITHY_CONTEXT_KEY]: { - service: "AWSStepFunctions", - operation: "DescribeMapRun" - } - }; - const { requestHandler } = configuration; - return stack.resolve((request2) => requestHandler.handle(request2.request, options || {}), handlerExecutionContext); + return to; + }; + var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target, + mod + )); + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + fromIni: () => fromIni + }); + module2.exports = __toCommonJS2(src_exports); + var import_shared_ini_file_loader = require_dist_cjs41(); + var import_property_provider2 = require_dist_cjs40(); + var resolveCredentialSource = /* @__PURE__ */ __name((credentialSource, profileName, logger) => { + const sourceProvidersMap = { + EcsContainer: async (options) => { + const { fromHttp } = await Promise.resolve().then(() => __toESM2(require_dist_cjs55())); + const { fromContainerMetadata } = await Promise.resolve().then(() => __toESM2(require_dist_cjs49())); + logger == null ? void 0 : logger.debug("@aws-sdk/credential-provider-ini - credential_source is EcsContainer"); + return (0, import_property_provider2.chain)(fromHttp(options ?? {}), fromContainerMetadata(options)); + }, + Ec2InstanceMetadata: async (options) => { + logger == null ? void 0 : logger.debug("@aws-sdk/credential-provider-ini - credential_source is Ec2InstanceMetadata"); + const { fromInstanceMetadata } = await Promise.resolve().then(() => __toESM2(require_dist_cjs49())); + return fromInstanceMetadata(options); + }, + Environment: async (options) => { + logger == null ? void 0 : logger.debug("@aws-sdk/credential-provider-ini - credential_source is Environment"); + const { fromEnv } = await Promise.resolve().then(() => __toESM2(require_dist_cjs48())); + return fromEnv(options); + } + }; + if (credentialSource in sourceProvidersMap) { + return sourceProvidersMap[credentialSource]; + } else { + throw new import_property_provider2.CredentialsProviderError( + `Unsupported credential source in profile ${profileName}. Got ${credentialSource}, expected EcsContainer or Ec2InstanceMetadata or Environment.`, + { logger } + ); } - serialize(input, context) { - return (0, Aws_json1_0_1.se_DescribeMapRunCommand)(input, context); + }, "resolveCredentialSource"); + var isAssumeRoleProfile = /* @__PURE__ */ __name((arg, { profile = "default", logger } = {}) => { + return Boolean(arg) && typeof arg === "object" && typeof arg.role_arn === "string" && ["undefined", "string"].indexOf(typeof arg.role_session_name) > -1 && ["undefined", "string"].indexOf(typeof arg.external_id) > -1 && ["undefined", "string"].indexOf(typeof arg.mfa_serial) > -1 && (isAssumeRoleWithSourceProfile(arg, { profile, logger }) || isCredentialSourceProfile(arg, { profile, logger })); + }, "isAssumeRoleProfile"); + var isAssumeRoleWithSourceProfile = /* @__PURE__ */ __name((arg, { profile, logger }) => { + var _a; + const withSourceProfile = typeof arg.source_profile === "string" && typeof arg.credential_source === "undefined"; + if (withSourceProfile) { + (_a = logger == null ? void 0 : logger.debug) == null ? void 0 : _a.call(logger, ` ${profile} isAssumeRoleWithSourceProfile source_profile=${arg.source_profile}`); } - deserialize(output, context) { - return (0, Aws_json1_0_1.de_DescribeMapRunCommand)(output, context); + return withSourceProfile; + }, "isAssumeRoleWithSourceProfile"); + var isCredentialSourceProfile = /* @__PURE__ */ __name((arg, { profile, logger }) => { + var _a; + const withProviderProfile = typeof arg.credential_source === "string" && typeof arg.source_profile === "undefined"; + if (withProviderProfile) { + (_a = logger == null ? void 0 : logger.debug) == null ? void 0 : _a.call(logger, ` ${profile} isCredentialSourceProfile credential_source=${arg.credential_source}`); } - }; - exports2.DescribeMapRunCommand = DescribeMapRunCommand; - } -}); - -// ../../../node_modules/@aws-sdk/client-sfn/dist-cjs/commands/DescribeStateMachineAliasCommand.js -var require_DescribeStateMachineAliasCommand = __commonJS({ - "../../../node_modules/@aws-sdk/client-sfn/dist-cjs/commands/DescribeStateMachineAliasCommand.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.DescribeStateMachineAliasCommand = exports2.$Command = void 0; - var middleware_endpoint_1 = require_dist_cjs26(); - var middleware_serde_1 = require_dist_cjs25(); - var smithy_client_1 = require_dist_cjs34(); - Object.defineProperty(exports2, "$Command", { enumerable: true, get: function() { - return smithy_client_1.Command; - } }); - var types_1 = require_dist_cjs(); - var models_0_1 = require_models_03(); - var Aws_json1_0_1 = require_Aws_json1_0(); - var DescribeStateMachineAliasCommand = class _DescribeStateMachineAliasCommand extends smithy_client_1.Command { - static getEndpointParameterInstructions() { - return { - UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, - Endpoint: { type: "builtInParams", name: "endpoint" }, - Region: { type: "builtInParams", name: "region" }, - UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" } - }; + return withProviderProfile; + }, "isCredentialSourceProfile"); + var resolveAssumeRoleCredentials = /* @__PURE__ */ __name(async (profileName, profiles, options, visitedProfiles = {}) => { + var _a, _b; + (_a = options.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-ini - resolveAssumeRoleCredentials (STS)"); + const data = profiles[profileName]; + if (!options.roleAssumer) { + const { getDefaultRoleAssumer } = await Promise.resolve().then(() => __toESM2(require_dist_cjs75())); + options.roleAssumer = getDefaultRoleAssumer( + { + ...options.clientConfig, + credentialProviderLogger: options.logger, + parentClientConfig: options == null ? void 0 : options.parentClientConfig + }, + options.clientPlugins + ); } - constructor(input) { - super(); - this.input = input; + const { source_profile } = data; + if (source_profile && source_profile in visitedProfiles) { + throw new import_property_provider2.CredentialsProviderError( + `Detected a cycle attempting to resolve credentials for profile ${(0, import_shared_ini_file_loader.getProfileName)(options)}. Profiles visited: ` + Object.keys(visitedProfiles).join(", "), + { logger: options.logger } + ); } - resolveMiddleware(clientStack, configuration, options) { - this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, _DescribeStateMachineAliasCommand.getEndpointParameterInstructions())); - const stack = clientStack.concat(this.middlewareStack); - const { logger } = configuration; - const clientName = "SFNClient"; - const commandName = "DescribeStateMachineAliasCommand"; - const handlerExecutionContext = { - logger, - clientName, - commandName, - inputFilterSensitiveLog: (_) => _, - outputFilterSensitiveLog: models_0_1.DescribeStateMachineAliasOutputFilterSensitiveLog, - [types_1.SMITHY_CONTEXT_KEY]: { - service: "AWSStepFunctions", - operation: "DescribeStateMachineAlias" + (_b = options.logger) == null ? void 0 : _b.debug( + `@aws-sdk/credential-provider-ini - finding credential resolver using ${source_profile ? `source_profile=[${source_profile}]` : `profile=[${profileName}]`}` + ); + const sourceCredsProvider = source_profile ? resolveProfileData( + source_profile, + { + ...profiles, + [source_profile]: { + ...profiles[source_profile], + // This assigns the role_arn of the "root" profile + // to the credential_source profile so this recursive call knows + // what role to assume. + role_arn: data.role_arn ?? profiles[source_profile].role_arn } - }; - const { requestHandler } = configuration; - return stack.resolve((request2) => requestHandler.handle(request2.request, options || {}), handlerExecutionContext); - } - serialize(input, context) { - return (0, Aws_json1_0_1.se_DescribeStateMachineAliasCommand)(input, context); + }, + options, + { + ...visitedProfiles, + [source_profile]: true + } + ) : (await resolveCredentialSource(data.credential_source, profileName, options.logger)(options))(); + const params = { + RoleArn: data.role_arn, + RoleSessionName: data.role_session_name || `aws-sdk-js-${Date.now()}`, + ExternalId: data.external_id, + DurationSeconds: parseInt(data.duration_seconds || "3600", 10) + }; + const { mfa_serial } = data; + if (mfa_serial) { + if (!options.mfaCodeProvider) { + throw new import_property_provider2.CredentialsProviderError( + `Profile ${profileName} requires multi-factor authentication, but no MFA code callback was provided.`, + { logger: options.logger, tryNextLink: false } + ); + } + params.SerialNumber = mfa_serial; + params.TokenCode = await options.mfaCodeProvider(mfa_serial); } - deserialize(output, context) { - return (0, Aws_json1_0_1.de_DescribeStateMachineAliasCommand)(output, context); + const sourceCreds = await sourceCredsProvider; + return options.roleAssumer(sourceCreds, params); + }, "resolveAssumeRoleCredentials"); + var isProcessProfile = /* @__PURE__ */ __name((arg) => Boolean(arg) && typeof arg === "object" && typeof arg.credential_process === "string", "isProcessProfile"); + var resolveProcessCredentials = /* @__PURE__ */ __name(async (options, profile) => Promise.resolve().then(() => __toESM2(require_dist_cjs76())).then( + ({ fromProcess }) => fromProcess({ + ...options, + profile + })() + ), "resolveProcessCredentials"); + var resolveSsoCredentials = /* @__PURE__ */ __name(async (profile, options = {}) => { + const { fromSSO } = await Promise.resolve().then(() => __toESM2(require_dist_cjs74())); + return fromSSO({ + profile, + logger: options.logger + })(); + }, "resolveSsoCredentials"); + var isSsoProfile = /* @__PURE__ */ __name((arg) => arg && (typeof arg.sso_start_url === "string" || typeof arg.sso_account_id === "string" || typeof arg.sso_session === "string" || typeof arg.sso_region === "string" || typeof arg.sso_role_name === "string"), "isSsoProfile"); + var isStaticCredsProfile = /* @__PURE__ */ __name((arg) => Boolean(arg) && typeof arg === "object" && typeof arg.aws_access_key_id === "string" && typeof arg.aws_secret_access_key === "string" && ["undefined", "string"].indexOf(typeof arg.aws_session_token) > -1 && ["undefined", "string"].indexOf(typeof arg.aws_account_id) > -1, "isStaticCredsProfile"); + var resolveStaticCredentials = /* @__PURE__ */ __name((profile, options) => { + var _a; + (_a = options == null ? void 0 : options.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-ini - resolveStaticCredentials"); + return Promise.resolve({ + accessKeyId: profile.aws_access_key_id, + secretAccessKey: profile.aws_secret_access_key, + sessionToken: profile.aws_session_token, + ...profile.aws_credential_scope && { credentialScope: profile.aws_credential_scope }, + ...profile.aws_account_id && { accountId: profile.aws_account_id } + }); + }, "resolveStaticCredentials"); + var isWebIdentityProfile = /* @__PURE__ */ __name((arg) => Boolean(arg) && typeof arg === "object" && typeof arg.web_identity_token_file === "string" && typeof arg.role_arn === "string" && ["undefined", "string"].indexOf(typeof arg.role_session_name) > -1, "isWebIdentityProfile"); + var resolveWebIdentityCredentials = /* @__PURE__ */ __name(async (profile, options) => Promise.resolve().then(() => __toESM2(require_dist_cjs77())).then( + ({ fromTokenFile: fromTokenFile2 }) => fromTokenFile2({ + webIdentityTokenFile: profile.web_identity_token_file, + roleArn: profile.role_arn, + roleSessionName: profile.role_session_name, + roleAssumerWithWebIdentity: options.roleAssumerWithWebIdentity, + logger: options.logger, + parentClientConfig: options.parentClientConfig + })() + ), "resolveWebIdentityCredentials"); + var resolveProfileData = /* @__PURE__ */ __name(async (profileName, profiles, options, visitedProfiles = {}) => { + const data = profiles[profileName]; + if (Object.keys(visitedProfiles).length > 0 && isStaticCredsProfile(data)) { + return resolveStaticCredentials(data, options); } - }; - exports2.DescribeStateMachineAliasCommand = DescribeStateMachineAliasCommand; - } -}); - -// ../../../node_modules/@aws-sdk/client-sfn/dist-cjs/commands/DescribeStateMachineCommand.js -var require_DescribeStateMachineCommand = __commonJS({ - "../../../node_modules/@aws-sdk/client-sfn/dist-cjs/commands/DescribeStateMachineCommand.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.DescribeStateMachineCommand = exports2.$Command = void 0; - var middleware_endpoint_1 = require_dist_cjs26(); - var middleware_serde_1 = require_dist_cjs25(); - var smithy_client_1 = require_dist_cjs34(); - Object.defineProperty(exports2, "$Command", { enumerable: true, get: function() { - return smithy_client_1.Command; - } }); - var types_1 = require_dist_cjs(); - var models_0_1 = require_models_03(); - var Aws_json1_0_1 = require_Aws_json1_0(); - var DescribeStateMachineCommand = class _DescribeStateMachineCommand extends smithy_client_1.Command { - static getEndpointParameterInstructions() { - return { - UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, - Endpoint: { type: "builtInParams", name: "endpoint" }, - Region: { type: "builtInParams", name: "region" }, - UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" } - }; + if (isAssumeRoleProfile(data, { profile: profileName, logger: options.logger })) { + return resolveAssumeRoleCredentials(profileName, profiles, options, visitedProfiles); } - constructor(input) { - super(); - this.input = input; + if (isStaticCredsProfile(data)) { + return resolveStaticCredentials(data, options); } - resolveMiddleware(clientStack, configuration, options) { - this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, _DescribeStateMachineCommand.getEndpointParameterInstructions())); - const stack = clientStack.concat(this.middlewareStack); - const { logger } = configuration; - const clientName = "SFNClient"; - const commandName = "DescribeStateMachineCommand"; - const handlerExecutionContext = { - logger, - clientName, - commandName, - inputFilterSensitiveLog: (_) => _, - outputFilterSensitiveLog: models_0_1.DescribeStateMachineOutputFilterSensitiveLog, - [types_1.SMITHY_CONTEXT_KEY]: { - service: "AWSStepFunctions", - operation: "DescribeStateMachine" - } - }; - const { requestHandler } = configuration; - return stack.resolve((request2) => requestHandler.handle(request2.request, options || {}), handlerExecutionContext); + if (isWebIdentityProfile(data)) { + return resolveWebIdentityCredentials(data, options); } - serialize(input, context) { - return (0, Aws_json1_0_1.se_DescribeStateMachineCommand)(input, context); + if (isProcessProfile(data)) { + return resolveProcessCredentials(options, profileName); } - deserialize(output, context) { - return (0, Aws_json1_0_1.de_DescribeStateMachineCommand)(output, context); + if (isSsoProfile(data)) { + return await resolveSsoCredentials(profileName, options); } - }; - exports2.DescribeStateMachineCommand = DescribeStateMachineCommand; + throw new import_property_provider2.CredentialsProviderError( + `Could not resolve credentials using profile: [${profileName}] in configuration/credentials file(s).`, + { logger: options.logger } + ); + }, "resolveProfileData"); + var fromIni = /* @__PURE__ */ __name((init = {}) => async () => { + var _a; + (_a = init.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-ini - fromIni"); + const profiles = await (0, import_shared_ini_file_loader.parseKnownFiles)(init); + return resolveProfileData((0, import_shared_ini_file_loader.getProfileName)(init), profiles, init); + }, "fromIni"); } }); -// ../../../node_modules/@aws-sdk/client-sfn/dist-cjs/commands/DescribeStateMachineForExecutionCommand.js -var require_DescribeStateMachineForExecutionCommand = __commonJS({ - "../../../node_modules/@aws-sdk/client-sfn/dist-cjs/commands/DescribeStateMachineForExecutionCommand.js"(exports2) { +// ../../../node_modules/@aws-sdk/credential-provider-node/dist-cjs/index.js +var require_dist_cjs79 = __commonJS({ + "../../../node_modules/@aws-sdk/credential-provider-node/dist-cjs/index.js"(exports2, module2) { "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.DescribeStateMachineForExecutionCommand = exports2.$Command = void 0; - var middleware_endpoint_1 = require_dist_cjs26(); - var middleware_serde_1 = require_dist_cjs25(); - var smithy_client_1 = require_dist_cjs34(); - Object.defineProperty(exports2, "$Command", { enumerable: true, get: function() { - return smithy_client_1.Command; - } }); - var types_1 = require_dist_cjs(); - var models_0_1 = require_models_03(); - var Aws_json1_0_1 = require_Aws_json1_0(); - var DescribeStateMachineForExecutionCommand = class _DescribeStateMachineForExecutionCommand extends smithy_client_1.Command { - static getEndpointParameterInstructions() { - return { - UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, - Endpoint: { type: "builtInParams", name: "endpoint" }, - Region: { type: "builtInParams", name: "region" }, - UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" } - }; + var __create2 = Object.create; + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __getProtoOf2 = Object.getPrototypeOf; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all) => { + for (var name in all) + __defProp2(target, name, { get: all[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); } - constructor(input) { - super(); - this.input = input; + return to; + }; + var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target, + mod + )); + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + credentialsTreatedAsExpired: () => credentialsTreatedAsExpired, + credentialsWillNeedRefresh: () => credentialsWillNeedRefresh, + defaultProvider: () => defaultProvider + }); + module2.exports = __toCommonJS2(src_exports); + var import_credential_provider_env = require_dist_cjs48(); + var import_shared_ini_file_loader = require_dist_cjs41(); + var import_property_provider2 = require_dist_cjs40(); + var ENV_IMDS_DISABLED = "AWS_EC2_METADATA_DISABLED"; + var remoteProvider = /* @__PURE__ */ __name(async (init) => { + var _a, _b; + const { ENV_CMDS_FULL_URI, ENV_CMDS_RELATIVE_URI, fromContainerMetadata, fromInstanceMetadata } = await Promise.resolve().then(() => __toESM2(require_dist_cjs49())); + if (process.env[ENV_CMDS_RELATIVE_URI] || process.env[ENV_CMDS_FULL_URI]) { + (_a = init.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-node - remoteProvider::fromHttp/fromContainerMetadata"); + const { fromHttp } = await Promise.resolve().then(() => __toESM2(require_dist_cjs55())); + return (0, import_property_provider2.chain)(fromHttp(init), fromContainerMetadata(init)); } - resolveMiddleware(clientStack, configuration, options) { - this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, _DescribeStateMachineForExecutionCommand.getEndpointParameterInstructions())); - const stack = clientStack.concat(this.middlewareStack); - const { logger } = configuration; - const clientName = "SFNClient"; - const commandName = "DescribeStateMachineForExecutionCommand"; - const handlerExecutionContext = { - logger, - clientName, - commandName, - inputFilterSensitiveLog: (_) => _, - outputFilterSensitiveLog: models_0_1.DescribeStateMachineForExecutionOutputFilterSensitiveLog, - [types_1.SMITHY_CONTEXT_KEY]: { - service: "AWSStepFunctions", - operation: "DescribeStateMachineForExecution" - } + if (process.env[ENV_IMDS_DISABLED]) { + return async () => { + throw new import_property_provider2.CredentialsProviderError("EC2 Instance Metadata Service access disabled", { logger: init.logger }); }; - const { requestHandler } = configuration; - return stack.resolve((request2) => requestHandler.handle(request2.request, options || {}), handlerExecutionContext); - } - serialize(input, context) { - return (0, Aws_json1_0_1.se_DescribeStateMachineForExecutionCommand)(input, context); - } - deserialize(output, context) { - return (0, Aws_json1_0_1.de_DescribeStateMachineForExecutionCommand)(output, context); } - }; - exports2.DescribeStateMachineForExecutionCommand = DescribeStateMachineForExecutionCommand; + (_b = init.logger) == null ? void 0 : _b.debug("@aws-sdk/credential-provider-node - remoteProvider::fromInstanceMetadata"); + return fromInstanceMetadata(init); + }, "remoteProvider"); + var multipleCredentialSourceWarningEmitted = false; + var defaultProvider = /* @__PURE__ */ __name((init = {}) => (0, import_property_provider2.memoize)( + (0, import_property_provider2.chain)( + async () => { + var _a, _b, _c, _d; + const profile = init.profile ?? process.env[import_shared_ini_file_loader.ENV_PROFILE]; + if (profile) { + const envStaticCredentialsAreSet = process.env[import_credential_provider_env.ENV_KEY] && process.env[import_credential_provider_env.ENV_SECRET]; + if (envStaticCredentialsAreSet) { + if (!multipleCredentialSourceWarningEmitted) { + const warnFn = ((_a = init.logger) == null ? void 0 : _a.warn) && ((_c = (_b = init.logger) == null ? void 0 : _b.constructor) == null ? void 0 : _c.name) !== "NoOpLogger" ? init.logger.warn : console.warn; + warnFn( + `@aws-sdk/credential-provider-node - defaultProvider::fromEnv WARNING: + Multiple credential sources detected: + Both AWS_PROFILE and the pair AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY static credentials are set. + This SDK will proceed with the AWS_PROFILE value. + + However, a future version may change this behavior to prefer the ENV static credentials. + Please ensure that your environment only sets either the AWS_PROFILE or the + AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY pair. +` + ); + multipleCredentialSourceWarningEmitted = true; + } + } + throw new import_property_provider2.CredentialsProviderError("AWS_PROFILE is set, skipping fromEnv provider.", { + logger: init.logger, + tryNextLink: true + }); + } + (_d = init.logger) == null ? void 0 : _d.debug("@aws-sdk/credential-provider-node - defaultProvider::fromEnv"); + return (0, import_credential_provider_env.fromEnv)(init)(); + }, + async () => { + var _a; + (_a = init.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-node - defaultProvider::fromSSO"); + const { ssoStartUrl, ssoAccountId, ssoRegion, ssoRoleName, ssoSession } = init; + if (!ssoStartUrl && !ssoAccountId && !ssoRegion && !ssoRoleName && !ssoSession) { + throw new import_property_provider2.CredentialsProviderError( + "Skipping SSO provider in default chain (inputs do not include SSO fields).", + { logger: init.logger } + ); + } + const { fromSSO } = await Promise.resolve().then(() => __toESM2(require_dist_cjs74())); + return fromSSO(init)(); + }, + async () => { + var _a; + (_a = init.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-node - defaultProvider::fromIni"); + const { fromIni } = await Promise.resolve().then(() => __toESM2(require_dist_cjs78())); + return fromIni(init)(); + }, + async () => { + var _a; + (_a = init.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-node - defaultProvider::fromProcess"); + const { fromProcess } = await Promise.resolve().then(() => __toESM2(require_dist_cjs76())); + return fromProcess(init)(); + }, + async () => { + var _a; + (_a = init.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-node - defaultProvider::fromTokenFile"); + const { fromTokenFile: fromTokenFile2 } = await Promise.resolve().then(() => __toESM2(require_dist_cjs77())); + return fromTokenFile2(init)(); + }, + async () => { + var _a; + (_a = init.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-node - defaultProvider::remoteProvider"); + return (await remoteProvider(init))(); + }, + async () => { + throw new import_property_provider2.CredentialsProviderError("Could not load credentials from any providers", { + tryNextLink: false, + logger: init.logger + }); + } + ), + credentialsTreatedAsExpired, + credentialsWillNeedRefresh + ), "defaultProvider"); + var credentialsWillNeedRefresh = /* @__PURE__ */ __name((credentials) => (credentials == null ? void 0 : credentials.expiration) !== void 0, "credentialsWillNeedRefresh"); + var credentialsTreatedAsExpired = /* @__PURE__ */ __name((credentials) => (credentials == null ? void 0 : credentials.expiration) !== void 0 && credentials.expiration.getTime() - Date.now() < 3e5, "credentialsTreatedAsExpired"); } }); -// ../../../node_modules/@aws-sdk/client-sfn/dist-cjs/commands/GetActivityTaskCommand.js -var require_GetActivityTaskCommand = __commonJS({ - "../../../node_modules/@aws-sdk/client-sfn/dist-cjs/commands/GetActivityTaskCommand.js"(exports2) { +// ../../../node_modules/@aws-sdk/client-sfn/dist-cjs/endpoint/ruleset.js +var require_ruleset4 = __commonJS({ + "../../../node_modules/@aws-sdk/client-sfn/dist-cjs/endpoint/ruleset.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.GetActivityTaskCommand = exports2.$Command = void 0; - var middleware_endpoint_1 = require_dist_cjs26(); - var middleware_serde_1 = require_dist_cjs25(); - var smithy_client_1 = require_dist_cjs34(); - Object.defineProperty(exports2, "$Command", { enumerable: true, get: function() { - return smithy_client_1.Command; - } }); - var types_1 = require_dist_cjs(); - var models_0_1 = require_models_03(); - var Aws_json1_0_1 = require_Aws_json1_0(); - var GetActivityTaskCommand = class _GetActivityTaskCommand extends smithy_client_1.Command { - static getEndpointParameterInstructions() { - return { - UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, - Endpoint: { type: "builtInParams", name: "endpoint" }, - Region: { type: "builtInParams", name: "region" }, - UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" } - }; - } - constructor(input) { - super(); - this.input = input; - } - resolveMiddleware(clientStack, configuration, options) { - this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, _GetActivityTaskCommand.getEndpointParameterInstructions())); - const stack = clientStack.concat(this.middlewareStack); - const { logger } = configuration; - const clientName = "SFNClient"; - const commandName = "GetActivityTaskCommand"; - const handlerExecutionContext = { - logger, - clientName, - commandName, - inputFilterSensitiveLog: (_) => _, - outputFilterSensitiveLog: models_0_1.GetActivityTaskOutputFilterSensitiveLog, - [types_1.SMITHY_CONTEXT_KEY]: { - service: "AWSStepFunctions", - operation: "GetActivityTask" - } - }; - const { requestHandler } = configuration; - return stack.resolve((request2) => requestHandler.handle(request2.request, options || {}), handlerExecutionContext); - } - serialize(input, context) { - return (0, Aws_json1_0_1.se_GetActivityTaskCommand)(input, context); - } - deserialize(output, context) { - return (0, Aws_json1_0_1.de_GetActivityTaskCommand)(output, context); - } - }; - exports2.GetActivityTaskCommand = GetActivityTaskCommand; + exports2.ruleSet = void 0; + var t = "required"; + var u = "fn"; + var v = "argv"; + var w = "ref"; + var a = true; + var b = "isSet"; + var c = "booleanEquals"; + var d = "error"; + var e = "endpoint"; + var f = "tree"; + var g = "PartitionResult"; + var h = { [t]: false, "type": "String" }; + var i = { [t]: true, "default": false, "type": "Boolean" }; + var j = { [w]: "Endpoint" }; + var k = { [u]: c, [v]: [{ [w]: "UseFIPS" }, true] }; + var l = { [u]: c, [v]: [{ [w]: "UseDualStack" }, true] }; + var m = {}; + var n = { [w]: "Region" }; + var o = { [u]: "getAttr", [v]: [{ [w]: g }, "supportsFIPS"] }; + var p = { [u]: c, [v]: [true, { [u]: "getAttr", [v]: [{ [w]: g }, "supportsDualStack"] }] }; + var q = [k]; + var r = [l]; + var s = [n]; + var _data = { version: "1.0", parameters: { Region: h, UseDualStack: i, UseFIPS: i, Endpoint: h }, rules: [{ conditions: [{ [u]: b, [v]: [j] }], rules: [{ conditions: q, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: d }, { conditions: r, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: d }, { endpoint: { url: j, properties: m, headers: m }, type: e }], type: f }, { conditions: [{ [u]: b, [v]: s }], rules: [{ conditions: [{ [u]: "aws.partition", [v]: s, assign: g }], rules: [{ conditions: [k, l], rules: [{ conditions: [{ [u]: c, [v]: [a, o] }, p], rules: [{ endpoint: { url: "https://states-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: m, headers: m }, type: e }], type: f }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: d }], type: f }, { conditions: q, rules: [{ conditions: [{ [u]: c, [v]: [o, a] }], rules: [{ conditions: [{ [u]: "stringEquals", [v]: [n, "us-gov-west-1"] }], endpoint: { url: "https://states.us-gov-west-1.amazonaws.com", properties: m, headers: m }, type: e }, { endpoint: { url: "https://states-fips.{Region}.{PartitionResult#dnsSuffix}", properties: m, headers: m }, type: e }], type: f }, { error: "FIPS is enabled but this partition does not support FIPS", type: d }], type: f }, { conditions: r, rules: [{ conditions: [p], rules: [{ endpoint: { url: "https://states.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: m, headers: m }, type: e }], type: f }, { error: "DualStack is enabled but this partition does not support DualStack", type: d }], type: f }, { endpoint: { url: "https://states.{Region}.{PartitionResult#dnsSuffix}", properties: m, headers: m }, type: e }], type: f }], type: f }, { error: "Invalid Configuration: Missing Region", type: d }] }; + exports2.ruleSet = _data; } }); -// ../../../node_modules/@aws-sdk/client-sfn/dist-cjs/commands/GetExecutionHistoryCommand.js -var require_GetExecutionHistoryCommand = __commonJS({ - "../../../node_modules/@aws-sdk/client-sfn/dist-cjs/commands/GetExecutionHistoryCommand.js"(exports2) { +// ../../../node_modules/@aws-sdk/client-sfn/dist-cjs/endpoint/endpointResolver.js +var require_endpointResolver4 = __commonJS({ + "../../../node_modules/@aws-sdk/client-sfn/dist-cjs/endpoint/endpointResolver.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.GetExecutionHistoryCommand = exports2.$Command = void 0; - var middleware_endpoint_1 = require_dist_cjs26(); - var middleware_serde_1 = require_dist_cjs25(); - var smithy_client_1 = require_dist_cjs34(); - Object.defineProperty(exports2, "$Command", { enumerable: true, get: function() { - return smithy_client_1.Command; - } }); - var types_1 = require_dist_cjs(); - var models_0_1 = require_models_03(); - var Aws_json1_0_1 = require_Aws_json1_0(); - var GetExecutionHistoryCommand = class _GetExecutionHistoryCommand extends smithy_client_1.Command { - static getEndpointParameterInstructions() { - return { - UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, - Endpoint: { type: "builtInParams", name: "endpoint" }, - Region: { type: "builtInParams", name: "region" }, - UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" } - }; - } - constructor(input) { - super(); - this.input = input; - } - resolveMiddleware(clientStack, configuration, options) { - this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, _GetExecutionHistoryCommand.getEndpointParameterInstructions())); - const stack = clientStack.concat(this.middlewareStack); - const { logger } = configuration; - const clientName = "SFNClient"; - const commandName = "GetExecutionHistoryCommand"; - const handlerExecutionContext = { - logger, - clientName, - commandName, - inputFilterSensitiveLog: (_) => _, - outputFilterSensitiveLog: models_0_1.GetExecutionHistoryOutputFilterSensitiveLog, - [types_1.SMITHY_CONTEXT_KEY]: { - service: "AWSStepFunctions", - operation: "GetExecutionHistory" - } - }; - const { requestHandler } = configuration; - return stack.resolve((request2) => requestHandler.handle(request2.request, options || {}), handlerExecutionContext); - } - serialize(input, context) { - return (0, Aws_json1_0_1.se_GetExecutionHistoryCommand)(input, context); - } - deserialize(output, context) { - return (0, Aws_json1_0_1.de_GetExecutionHistoryCommand)(output, context); - } + exports2.defaultEndpointResolver = void 0; + var util_endpoints_1 = require_dist_cjs7(); + var util_endpoints_2 = require_dist_cjs6(); + var ruleset_1 = require_ruleset4(); + var defaultEndpointResolver = (endpointParams, context = {}) => { + return (0, util_endpoints_2.resolveEndpoint)(ruleset_1.ruleSet, { + endpointParams, + logger: context.logger + }); }; - exports2.GetExecutionHistoryCommand = GetExecutionHistoryCommand; + exports2.defaultEndpointResolver = defaultEndpointResolver; + util_endpoints_2.customEndpointFunctions.aws = util_endpoints_1.awsEndpointFunctions; } }); -// ../../../node_modules/@aws-sdk/client-sfn/dist-cjs/commands/ListActivitiesCommand.js -var require_ListActivitiesCommand = __commonJS({ - "../../../node_modules/@aws-sdk/client-sfn/dist-cjs/commands/ListActivitiesCommand.js"(exports2) { +// ../../../node_modules/@aws-sdk/client-sfn/dist-cjs/runtimeConfig.shared.js +var require_runtimeConfig_shared4 = __commonJS({ + "../../../node_modules/@aws-sdk/client-sfn/dist-cjs/runtimeConfig.shared.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.ListActivitiesCommand = exports2.$Command = void 0; - var middleware_endpoint_1 = require_dist_cjs26(); - var middleware_serde_1 = require_dist_cjs25(); - var smithy_client_1 = require_dist_cjs34(); - Object.defineProperty(exports2, "$Command", { enumerable: true, get: function() { - return smithy_client_1.Command; - } }); - var types_1 = require_dist_cjs(); - var Aws_json1_0_1 = require_Aws_json1_0(); - var ListActivitiesCommand = class _ListActivitiesCommand extends smithy_client_1.Command { - static getEndpointParameterInstructions() { - return { - UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, - Endpoint: { type: "builtInParams", name: "endpoint" }, - Region: { type: "builtInParams", name: "region" }, - UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" } - }; - } - constructor(input) { - super(); - this.input = input; - } - resolveMiddleware(clientStack, configuration, options) { - this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, _ListActivitiesCommand.getEndpointParameterInstructions())); - const stack = clientStack.concat(this.middlewareStack); - const { logger } = configuration; - const clientName = "SFNClient"; - const commandName = "ListActivitiesCommand"; - const handlerExecutionContext = { - logger, - clientName, - commandName, - inputFilterSensitiveLog: (_) => _, - outputFilterSensitiveLog: (_) => _, - [types_1.SMITHY_CONTEXT_KEY]: { - service: "AWSStepFunctions", - operation: "ListActivities" - } - }; - const { requestHandler } = configuration; - return stack.resolve((request2) => requestHandler.handle(request2.request, options || {}), handlerExecutionContext); - } - serialize(input, context) { - return (0, Aws_json1_0_1.se_ListActivitiesCommand)(input, context); - } - deserialize(output, context) { - return (0, Aws_json1_0_1.de_ListActivitiesCommand)(output, context); - } + exports2.getRuntimeConfig = void 0; + var core_1 = (init_dist_es2(), __toCommonJS(dist_es_exports2)); + var smithy_client_1 = require_dist_cjs37(); + var url_parser_1 = require_dist_cjs44(); + var util_base64_1 = require_dist_cjs29(); + var util_utf8_1 = require_dist_cjs28(); + var httpAuthSchemeProvider_1 = require_httpAuthSchemeProvider(); + var endpointResolver_1 = require_endpointResolver4(); + var getRuntimeConfig = (config) => { + return { + apiVersion: "2016-11-23", + base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64, + base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64, + disableHostPrefix: config?.disableHostPrefix ?? false, + endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver, + extensions: config?.extensions ?? [], + httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? httpAuthSchemeProvider_1.defaultSFNHttpAuthSchemeProvider, + httpAuthSchemes: config?.httpAuthSchemes ?? [ + { + schemeId: "aws.auth#sigv4", + identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"), + signer: new core_1.AwsSdkSigV4Signer() + } + ], + logger: config?.logger ?? new smithy_client_1.NoOpLogger(), + serviceId: config?.serviceId ?? "SFN", + urlParser: config?.urlParser ?? url_parser_1.parseUrl, + utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8, + utf8Encoder: config?.utf8Encoder ?? util_utf8_1.toUtf8 + }; }; - exports2.ListActivitiesCommand = ListActivitiesCommand; + exports2.getRuntimeConfig = getRuntimeConfig; } }); -// ../../../node_modules/@aws-sdk/client-sfn/dist-cjs/commands/ListExecutionsCommand.js -var require_ListExecutionsCommand = __commonJS({ - "../../../node_modules/@aws-sdk/client-sfn/dist-cjs/commands/ListExecutionsCommand.js"(exports2) { +// ../../../node_modules/@aws-sdk/client-sfn/dist-cjs/runtimeConfig.js +var require_runtimeConfig4 = __commonJS({ + "../../../node_modules/@aws-sdk/client-sfn/dist-cjs/runtimeConfig.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.ListExecutionsCommand = exports2.$Command = void 0; - var middleware_endpoint_1 = require_dist_cjs26(); - var middleware_serde_1 = require_dist_cjs25(); - var smithy_client_1 = require_dist_cjs34(); - Object.defineProperty(exports2, "$Command", { enumerable: true, get: function() { - return smithy_client_1.Command; - } }); - var types_1 = require_dist_cjs(); - var Aws_json1_0_1 = require_Aws_json1_0(); - var ListExecutionsCommand = class _ListExecutionsCommand extends smithy_client_1.Command { - static getEndpointParameterInstructions() { - return { - UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, - Endpoint: { type: "builtInParams", name: "endpoint" }, - Region: { type: "builtInParams", name: "region" }, - UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" } - }; - } - constructor(input) { - super(); - this.input = input; - } - resolveMiddleware(clientStack, configuration, options) { - this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, _ListExecutionsCommand.getEndpointParameterInstructions())); - const stack = clientStack.concat(this.middlewareStack); - const { logger } = configuration; - const clientName = "SFNClient"; - const commandName = "ListExecutionsCommand"; - const handlerExecutionContext = { - logger, - clientName, - commandName, - inputFilterSensitiveLog: (_) => _, - outputFilterSensitiveLog: (_) => _, - [types_1.SMITHY_CONTEXT_KEY]: { - service: "AWSStepFunctions", - operation: "ListExecutions" - } - }; - const { requestHandler } = configuration; - return stack.resolve((request2) => requestHandler.handle(request2.request, options || {}), handlerExecutionContext); - } - serialize(input, context) { - return (0, Aws_json1_0_1.se_ListExecutionsCommand)(input, context); - } - deserialize(output, context) { - return (0, Aws_json1_0_1.de_ListExecutionsCommand)(output, context); - } + exports2.getRuntimeConfig = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var package_json_1 = tslib_1.__importDefault(require_package()); + var core_1 = (init_dist_es2(), __toCommonJS(dist_es_exports2)); + var credential_provider_node_1 = require_dist_cjs79(); + var util_user_agent_node_1 = require_dist_cjs56(); + var config_resolver_1 = require_dist_cjs11(); + var hash_node_1 = require_dist_cjs57(); + var middleware_retry_1 = require_dist_cjs38(); + var node_config_provider_1 = require_dist_cjs42(); + var node_http_handler_1 = require_dist_cjs51(); + var util_body_length_node_1 = require_dist_cjs58(); + var util_retry_1 = require_dist_cjs60(); + var runtimeConfig_shared_1 = require_runtimeConfig_shared4(); + var smithy_client_1 = require_dist_cjs37(); + var util_defaults_mode_node_1 = require_dist_cjs69(); + var smithy_client_2 = require_dist_cjs37(); + var getRuntimeConfig = (config) => { + (0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version); + const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config); + const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode); + const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config); + (0, core_1.emitWarningIfUnsupportedVersion)(process.version); + return { + ...clientSharedValues, + ...config, + runtime: "node", + defaultsMode, + bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength, + credentialDefaultProvider: config?.credentialDefaultProvider ?? credential_provider_node_1.defaultProvider, + defaultUserAgentProvider: config?.defaultUserAgentProvider ?? (0, util_user_agent_node_1.defaultUserAgent)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }), + maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS), + region: config?.region ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS), + requestHandler: node_http_handler_1.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider), + retryMode: config?.retryMode ?? (0, node_config_provider_1.loadConfig)({ + ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS, + default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE + }), + sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, "sha256"), + streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS) + }; }; - exports2.ListExecutionsCommand = ListExecutionsCommand; + exports2.getRuntimeConfig = getRuntimeConfig; } }); -// ../../../node_modules/@aws-sdk/client-sfn/dist-cjs/commands/ListMapRunsCommand.js -var require_ListMapRunsCommand = __commonJS({ - "../../../node_modules/@aws-sdk/client-sfn/dist-cjs/commands/ListMapRunsCommand.js"(exports2) { +// ../../../node_modules/@aws-sdk/client-sfn/dist-cjs/index.js +var require_dist_cjs80 = __commonJS({ + "../../../node_modules/@aws-sdk/client-sfn/dist-cjs/index.js"(exports2, module2) { "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.ListMapRunsCommand = exports2.$Command = void 0; - var middleware_endpoint_1 = require_dist_cjs26(); - var middleware_serde_1 = require_dist_cjs25(); - var smithy_client_1 = require_dist_cjs34(); - Object.defineProperty(exports2, "$Command", { enumerable: true, get: function() { - return smithy_client_1.Command; - } }); - var types_1 = require_dist_cjs(); - var Aws_json1_0_1 = require_Aws_json1_0(); - var ListMapRunsCommand = class _ListMapRunsCommand extends smithy_client_1.Command { - static getEndpointParameterInstructions() { - return { - UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, - Endpoint: { type: "builtInParams", name: "endpoint" }, - Region: { type: "builtInParams", name: "region" }, - UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" } - }; - } - constructor(input) { - super(); - this.input = input; + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all) => { + for (var name in all) + __defProp2(target, name, { get: all[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); } - resolveMiddleware(clientStack, configuration, options) { - this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, _ListMapRunsCommand.getEndpointParameterInstructions())); - const stack = clientStack.concat(this.middlewareStack); - const { logger } = configuration; - const clientName = "SFNClient"; - const commandName = "ListMapRunsCommand"; - const handlerExecutionContext = { - logger, - clientName, - commandName, - inputFilterSensitiveLog: (_) => _, - outputFilterSensitiveLog: (_) => _, - [types_1.SMITHY_CONTEXT_KEY]: { - service: "AWSStepFunctions", - operation: "ListMapRuns" + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + ActivityAlreadyExists: () => ActivityAlreadyExists, + ActivityDoesNotExist: () => ActivityDoesNotExist, + ActivityFailedEventDetailsFilterSensitiveLog: () => ActivityFailedEventDetailsFilterSensitiveLog, + ActivityLimitExceeded: () => ActivityLimitExceeded, + ActivityScheduleFailedEventDetailsFilterSensitiveLog: () => ActivityScheduleFailedEventDetailsFilterSensitiveLog, + ActivityScheduledEventDetailsFilterSensitiveLog: () => ActivityScheduledEventDetailsFilterSensitiveLog, + ActivitySucceededEventDetailsFilterSensitiveLog: () => ActivitySucceededEventDetailsFilterSensitiveLog, + ActivityTimedOutEventDetailsFilterSensitiveLog: () => ActivityTimedOutEventDetailsFilterSensitiveLog, + ActivityWorkerLimitExceeded: () => ActivityWorkerLimitExceeded, + ConflictException: () => ConflictException, + CreateActivityCommand: () => CreateActivityCommand, + CreateStateMachineAliasCommand: () => CreateStateMachineAliasCommand, + CreateStateMachineAliasInputFilterSensitiveLog: () => CreateStateMachineAliasInputFilterSensitiveLog, + CreateStateMachineCommand: () => CreateStateMachineCommand, + CreateStateMachineInputFilterSensitiveLog: () => CreateStateMachineInputFilterSensitiveLog, + DeleteActivityCommand: () => DeleteActivityCommand, + DeleteStateMachineAliasCommand: () => DeleteStateMachineAliasCommand, + DeleteStateMachineCommand: () => DeleteStateMachineCommand, + DeleteStateMachineVersionCommand: () => DeleteStateMachineVersionCommand, + DescribeActivityCommand: () => DescribeActivityCommand, + DescribeExecutionCommand: () => DescribeExecutionCommand, + DescribeExecutionOutputFilterSensitiveLog: () => DescribeExecutionOutputFilterSensitiveLog, + DescribeMapRunCommand: () => DescribeMapRunCommand, + DescribeStateMachineAliasCommand: () => DescribeStateMachineAliasCommand, + DescribeStateMachineAliasOutputFilterSensitiveLog: () => DescribeStateMachineAliasOutputFilterSensitiveLog, + DescribeStateMachineCommand: () => DescribeStateMachineCommand, + DescribeStateMachineForExecutionCommand: () => DescribeStateMachineForExecutionCommand, + DescribeStateMachineForExecutionOutputFilterSensitiveLog: () => DescribeStateMachineForExecutionOutputFilterSensitiveLog, + DescribeStateMachineOutputFilterSensitiveLog: () => DescribeStateMachineOutputFilterSensitiveLog, + EncryptionType: () => EncryptionType, + ExecutionAbortedEventDetailsFilterSensitiveLog: () => ExecutionAbortedEventDetailsFilterSensitiveLog, + ExecutionAlreadyExists: () => ExecutionAlreadyExists, + ExecutionDoesNotExist: () => ExecutionDoesNotExist, + ExecutionFailedEventDetailsFilterSensitiveLog: () => ExecutionFailedEventDetailsFilterSensitiveLog, + ExecutionLimitExceeded: () => ExecutionLimitExceeded, + ExecutionNotRedrivable: () => ExecutionNotRedrivable, + ExecutionRedriveFilter: () => ExecutionRedriveFilter, + ExecutionRedriveStatus: () => ExecutionRedriveStatus, + ExecutionStartedEventDetailsFilterSensitiveLog: () => ExecutionStartedEventDetailsFilterSensitiveLog, + ExecutionStatus: () => ExecutionStatus, + ExecutionSucceededEventDetailsFilterSensitiveLog: () => ExecutionSucceededEventDetailsFilterSensitiveLog, + ExecutionTimedOutEventDetailsFilterSensitiveLog: () => ExecutionTimedOutEventDetailsFilterSensitiveLog, + GetActivityTaskCommand: () => GetActivityTaskCommand, + GetActivityTaskOutputFilterSensitiveLog: () => GetActivityTaskOutputFilterSensitiveLog, + GetExecutionHistoryCommand: () => GetExecutionHistoryCommand, + GetExecutionHistoryOutputFilterSensitiveLog: () => GetExecutionHistoryOutputFilterSensitiveLog, + HistoryEventFilterSensitiveLog: () => HistoryEventFilterSensitiveLog, + HistoryEventType: () => HistoryEventType, + IncludedData: () => IncludedData, + InspectionDataFilterSensitiveLog: () => InspectionDataFilterSensitiveLog, + InspectionLevel: () => InspectionLevel, + InvalidArn: () => InvalidArn, + InvalidDefinition: () => InvalidDefinition, + InvalidEncryptionConfiguration: () => InvalidEncryptionConfiguration, + InvalidExecutionInput: () => InvalidExecutionInput, + InvalidLoggingConfiguration: () => InvalidLoggingConfiguration, + InvalidName: () => InvalidName, + InvalidOutput: () => InvalidOutput, + InvalidToken: () => InvalidToken, + InvalidTracingConfiguration: () => InvalidTracingConfiguration, + KmsAccessDeniedException: () => KmsAccessDeniedException, + KmsInvalidStateException: () => KmsInvalidStateException, + KmsKeyState: () => KmsKeyState, + KmsThrottlingException: () => KmsThrottlingException, + LambdaFunctionFailedEventDetailsFilterSensitiveLog: () => LambdaFunctionFailedEventDetailsFilterSensitiveLog, + LambdaFunctionScheduleFailedEventDetailsFilterSensitiveLog: () => LambdaFunctionScheduleFailedEventDetailsFilterSensitiveLog, + LambdaFunctionScheduledEventDetailsFilterSensitiveLog: () => LambdaFunctionScheduledEventDetailsFilterSensitiveLog, + LambdaFunctionStartFailedEventDetailsFilterSensitiveLog: () => LambdaFunctionStartFailedEventDetailsFilterSensitiveLog, + LambdaFunctionSucceededEventDetailsFilterSensitiveLog: () => LambdaFunctionSucceededEventDetailsFilterSensitiveLog, + LambdaFunctionTimedOutEventDetailsFilterSensitiveLog: () => LambdaFunctionTimedOutEventDetailsFilterSensitiveLog, + ListActivitiesCommand: () => ListActivitiesCommand, + ListExecutionsCommand: () => ListExecutionsCommand, + ListMapRunsCommand: () => ListMapRunsCommand, + ListStateMachineAliasesCommand: () => ListStateMachineAliasesCommand, + ListStateMachineVersionsCommand: () => ListStateMachineVersionsCommand, + ListStateMachinesCommand: () => ListStateMachinesCommand, + ListTagsForResourceCommand: () => ListTagsForResourceCommand, + LogLevel: () => LogLevel, + MapRunFailedEventDetailsFilterSensitiveLog: () => MapRunFailedEventDetailsFilterSensitiveLog, + MapRunStatus: () => MapRunStatus, + MissingRequiredParameter: () => MissingRequiredParameter, + PublishStateMachineVersionCommand: () => PublishStateMachineVersionCommand, + PublishStateMachineVersionInputFilterSensitiveLog: () => PublishStateMachineVersionInputFilterSensitiveLog, + RedriveExecutionCommand: () => RedriveExecutionCommand, + ResourceNotFound: () => ResourceNotFound, + SFN: () => SFN2, + SFNClient: () => SFNClient, + SFNServiceException: () => SFNServiceException, + SendTaskFailureCommand: () => SendTaskFailureCommand, + SendTaskFailureInputFilterSensitiveLog: () => SendTaskFailureInputFilterSensitiveLog, + SendTaskHeartbeatCommand: () => SendTaskHeartbeatCommand, + SendTaskSuccessCommand: () => SendTaskSuccessCommand, + SendTaskSuccessInputFilterSensitiveLog: () => SendTaskSuccessInputFilterSensitiveLog, + ServiceQuotaExceededException: () => ServiceQuotaExceededException, + StartExecutionCommand: () => StartExecutionCommand, + StartExecutionInputFilterSensitiveLog: () => StartExecutionInputFilterSensitiveLog, + StartSyncExecutionCommand: () => StartSyncExecutionCommand, + StartSyncExecutionInputFilterSensitiveLog: () => StartSyncExecutionInputFilterSensitiveLog, + StartSyncExecutionOutputFilterSensitiveLog: () => StartSyncExecutionOutputFilterSensitiveLog, + StateEnteredEventDetailsFilterSensitiveLog: () => StateEnteredEventDetailsFilterSensitiveLog, + StateExitedEventDetailsFilterSensitiveLog: () => StateExitedEventDetailsFilterSensitiveLog, + StateMachineAlreadyExists: () => StateMachineAlreadyExists, + StateMachineDeleting: () => StateMachineDeleting, + StateMachineDoesNotExist: () => StateMachineDoesNotExist, + StateMachineLimitExceeded: () => StateMachineLimitExceeded, + StateMachineStatus: () => StateMachineStatus, + StateMachineType: () => StateMachineType, + StateMachineTypeNotSupported: () => StateMachineTypeNotSupported, + StopExecutionCommand: () => StopExecutionCommand, + StopExecutionInputFilterSensitiveLog: () => StopExecutionInputFilterSensitiveLog, + SyncExecutionStatus: () => SyncExecutionStatus, + TagResourceCommand: () => TagResourceCommand, + TaskDoesNotExist: () => TaskDoesNotExist, + TaskFailedEventDetailsFilterSensitiveLog: () => TaskFailedEventDetailsFilterSensitiveLog, + TaskScheduledEventDetailsFilterSensitiveLog: () => TaskScheduledEventDetailsFilterSensitiveLog, + TaskStartFailedEventDetailsFilterSensitiveLog: () => TaskStartFailedEventDetailsFilterSensitiveLog, + TaskSubmitFailedEventDetailsFilterSensitiveLog: () => TaskSubmitFailedEventDetailsFilterSensitiveLog, + TaskSubmittedEventDetailsFilterSensitiveLog: () => TaskSubmittedEventDetailsFilterSensitiveLog, + TaskSucceededEventDetailsFilterSensitiveLog: () => TaskSucceededEventDetailsFilterSensitiveLog, + TaskTimedOut: () => TaskTimedOut, + TaskTimedOutEventDetailsFilterSensitiveLog: () => TaskTimedOutEventDetailsFilterSensitiveLog, + TestExecutionStatus: () => TestExecutionStatus, + TestStateCommand: () => TestStateCommand, + TestStateInputFilterSensitiveLog: () => TestStateInputFilterSensitiveLog, + TestStateOutputFilterSensitiveLog: () => TestStateOutputFilterSensitiveLog, + TooManyTags: () => TooManyTags, + UntagResourceCommand: () => UntagResourceCommand, + UpdateMapRunCommand: () => UpdateMapRunCommand, + UpdateStateMachineAliasCommand: () => UpdateStateMachineAliasCommand, + UpdateStateMachineAliasInputFilterSensitiveLog: () => UpdateStateMachineAliasInputFilterSensitiveLog, + UpdateStateMachineCommand: () => UpdateStateMachineCommand, + UpdateStateMachineInputFilterSensitiveLog: () => UpdateStateMachineInputFilterSensitiveLog, + ValidateStateMachineDefinitionCommand: () => ValidateStateMachineDefinitionCommand, + ValidateStateMachineDefinitionInputFilterSensitiveLog: () => ValidateStateMachineDefinitionInputFilterSensitiveLog, + ValidateStateMachineDefinitionResultCode: () => ValidateStateMachineDefinitionResultCode, + ValidateStateMachineDefinitionSeverity: () => ValidateStateMachineDefinitionSeverity, + ValidationException: () => ValidationException, + ValidationExceptionReason: () => ValidationExceptionReason, + __Client: () => import_smithy_client5.Client, + paginateGetExecutionHistory: () => paginateGetExecutionHistory, + paginateListActivities: () => paginateListActivities, + paginateListExecutions: () => paginateListExecutions, + paginateListMapRuns: () => paginateListMapRuns, + paginateListStateMachines: () => paginateListStateMachines + }); + module2.exports = __toCommonJS2(src_exports); + var import_middleware_host_header = require_dist_cjs3(); + var import_middleware_logger = require_dist_cjs4(); + var import_middleware_recursion_detection = require_dist_cjs5(); + var import_middleware_user_agent = require_dist_cjs8(); + var import_config_resolver = require_dist_cjs11(); + var import_core3 = (init_dist_es(), __toCommonJS(dist_es_exports)); + var import_middleware_content_length = require_dist_cjs39(); + var import_middleware_endpoint2 = require_dist_cjs46(); + var import_middleware_retry2 = require_dist_cjs38(); + var import_httpAuthSchemeProvider = require_httpAuthSchemeProvider(); + var resolveClientEndpointParameters = /* @__PURE__ */ __name((options) => { + return { + ...options, + useDualstackEndpoint: options.useDualstackEndpoint ?? false, + useFipsEndpoint: options.useFipsEndpoint ?? false, + defaultSigningName: "states" + }; + }, "resolveClientEndpointParameters"); + var commonParams = { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" } + }; + var import_runtimeConfig = require_runtimeConfig4(); + var import_region_config_resolver = require_dist_cjs70(); + var import_protocol_http8 = require_dist_cjs2(); + var import_smithy_client5 = require_dist_cjs37(); + var getHttpAuthExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => { + const _httpAuthSchemes = runtimeConfig.httpAuthSchemes; + let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider; + let _credentials = runtimeConfig.credentials; + return { + setHttpAuthScheme(httpAuthScheme) { + const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId); + if (index === -1) { + _httpAuthSchemes.push(httpAuthScheme); + } else { + _httpAuthSchemes.splice(index, 1, httpAuthScheme); } - }; - const { requestHandler } = configuration; - return stack.resolve((request2) => requestHandler.handle(request2.request, options || {}), handlerExecutionContext); - } - serialize(input, context) { - return (0, Aws_json1_0_1.se_ListMapRunsCommand)(input, context); + }, + httpAuthSchemes() { + return _httpAuthSchemes; + }, + setHttpAuthSchemeProvider(httpAuthSchemeProvider) { + _httpAuthSchemeProvider = httpAuthSchemeProvider; + }, + httpAuthSchemeProvider() { + return _httpAuthSchemeProvider; + }, + setCredentials(credentials) { + _credentials = credentials; + }, + credentials() { + return _credentials; + } + }; + }, "getHttpAuthExtensionConfiguration"); + var resolveHttpAuthRuntimeConfig = /* @__PURE__ */ __name((config) => { + return { + httpAuthSchemes: config.httpAuthSchemes(), + httpAuthSchemeProvider: config.httpAuthSchemeProvider(), + credentials: config.credentials() + }; + }, "resolveHttpAuthRuntimeConfig"); + var asPartial = /* @__PURE__ */ __name((t) => t, "asPartial"); + var resolveRuntimeExtensions = /* @__PURE__ */ __name((runtimeConfig, extensions) => { + const extensionConfiguration = { + ...asPartial((0, import_region_config_resolver.getAwsRegionExtensionConfiguration)(runtimeConfig)), + ...asPartial((0, import_smithy_client5.getDefaultExtensionConfiguration)(runtimeConfig)), + ...asPartial((0, import_protocol_http8.getHttpHandlerExtensionConfiguration)(runtimeConfig)), + ...asPartial(getHttpAuthExtensionConfiguration(runtimeConfig)) + }; + extensions.forEach((extension) => extension.configure(extensionConfiguration)); + return { + ...runtimeConfig, + ...(0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration), + ...(0, import_smithy_client5.resolveDefaultRuntimeConfig)(extensionConfiguration), + ...(0, import_protocol_http8.resolveHttpHandlerRuntimeConfig)(extensionConfiguration), + ...resolveHttpAuthRuntimeConfig(extensionConfiguration) + }; + }, "resolveRuntimeExtensions"); + var _SFNClient = class _SFNClient extends import_smithy_client5.Client { + constructor(...[configuration]) { + const _config_0 = (0, import_runtimeConfig.getRuntimeConfig)(configuration || {}); + const _config_1 = resolveClientEndpointParameters(_config_0); + const _config_2 = (0, import_middleware_user_agent.resolveUserAgentConfig)(_config_1); + const _config_3 = (0, import_middleware_retry2.resolveRetryConfig)(_config_2); + const _config_4 = (0, import_config_resolver.resolveRegionConfig)(_config_3); + const _config_5 = (0, import_middleware_host_header.resolveHostHeaderConfig)(_config_4); + const _config_6 = (0, import_middleware_endpoint2.resolveEndpointConfig)(_config_5); + const _config_7 = (0, import_httpAuthSchemeProvider.resolveHttpAuthSchemeConfig)(_config_6); + const _config_8 = resolveRuntimeExtensions(_config_7, (configuration == null ? void 0 : configuration.extensions) || []); + super(_config_8); + this.config = _config_8; + this.middlewareStack.use((0, import_middleware_user_agent.getUserAgentPlugin)(this.config)); + this.middlewareStack.use((0, import_middleware_retry2.getRetryPlugin)(this.config)); + this.middlewareStack.use((0, import_middleware_content_length.getContentLengthPlugin)(this.config)); + this.middlewareStack.use((0, import_middleware_host_header.getHostHeaderPlugin)(this.config)); + this.middlewareStack.use((0, import_middleware_logger.getLoggerPlugin)(this.config)); + this.middlewareStack.use((0, import_middleware_recursion_detection.getRecursionDetectionPlugin)(this.config)); + this.middlewareStack.use( + (0, import_core3.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config, { + httpAuthSchemeParametersProvider: import_httpAuthSchemeProvider.defaultSFNHttpAuthSchemeParametersProvider, + identityProviderConfigProvider: async (config) => new import_core3.DefaultIdentityProviderConfig({ + "aws.auth#sigv4": config.credentials + }) + }) + ); + this.middlewareStack.use((0, import_core3.getHttpSigningPlugin)(this.config)); } - deserialize(output, context) { - return (0, Aws_json1_0_1.de_ListMapRunsCommand)(output, context); + /** + * Destroy underlying resources, like sockets. It's usually not necessary to do this. + * However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed. + * Otherwise, sockets might stay open for quite a long time before the server terminates them. + */ + destroy() { + super.destroy(); } }; - exports2.ListMapRunsCommand = ListMapRunsCommand; - } -}); - -// ../../../node_modules/@aws-sdk/client-sfn/dist-cjs/commands/ListStateMachineAliasesCommand.js -var require_ListStateMachineAliasesCommand = __commonJS({ - "../../../node_modules/@aws-sdk/client-sfn/dist-cjs/commands/ListStateMachineAliasesCommand.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.ListStateMachineAliasesCommand = exports2.$Command = void 0; - var middleware_endpoint_1 = require_dist_cjs26(); - var middleware_serde_1 = require_dist_cjs25(); - var smithy_client_1 = require_dist_cjs34(); - Object.defineProperty(exports2, "$Command", { enumerable: true, get: function() { - return smithy_client_1.Command; - } }); - var types_1 = require_dist_cjs(); - var Aws_json1_0_1 = require_Aws_json1_0(); - var ListStateMachineAliasesCommand = class _ListStateMachineAliasesCommand extends smithy_client_1.Command { - static getEndpointParameterInstructions() { - return { - UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, - Endpoint: { type: "builtInParams", name: "endpoint" }, - Region: { type: "builtInParams", name: "region" }, - UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" } - }; + __name(_SFNClient, "SFNClient"); + var SFNClient = _SFNClient; + var import_middleware_serde2 = require_dist_cjs45(); + var import_core22 = (init_dist_es2(), __toCommonJS(dist_es_exports2)); + var import_uuid = (init_esm_node(), __toCommonJS(esm_node_exports)); + var _SFNServiceException = class _SFNServiceException2 extends import_smithy_client5.ServiceException { + /** + * @internal + */ + constructor(options) { + super(options); + Object.setPrototypeOf(this, _SFNServiceException2.prototype); } - constructor(input) { - super(); - this.input = input; + }; + __name(_SFNServiceException, "SFNServiceException"); + var SFNServiceException = _SFNServiceException; + var _ActivityAlreadyExists = class _ActivityAlreadyExists2 extends SFNServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "ActivityAlreadyExists", + $fault: "client", + ...opts + }); + this.name = "ActivityAlreadyExists"; + this.$fault = "client"; + Object.setPrototypeOf(this, _ActivityAlreadyExists2.prototype); } - resolveMiddleware(clientStack, configuration, options) { - this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, _ListStateMachineAliasesCommand.getEndpointParameterInstructions())); - const stack = clientStack.concat(this.middlewareStack); - const { logger } = configuration; - const clientName = "SFNClient"; - const commandName = "ListStateMachineAliasesCommand"; - const handlerExecutionContext = { - logger, - clientName, - commandName, - inputFilterSensitiveLog: (_) => _, - outputFilterSensitiveLog: (_) => _, - [types_1.SMITHY_CONTEXT_KEY]: { - service: "AWSStepFunctions", - operation: "ListStateMachineAliases" - } - }; - const { requestHandler } = configuration; - return stack.resolve((request2) => requestHandler.handle(request2.request, options || {}), handlerExecutionContext); + }; + __name(_ActivityAlreadyExists, "ActivityAlreadyExists"); + var ActivityAlreadyExists = _ActivityAlreadyExists; + var _ActivityDoesNotExist = class _ActivityDoesNotExist2 extends SFNServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "ActivityDoesNotExist", + $fault: "client", + ...opts + }); + this.name = "ActivityDoesNotExist"; + this.$fault = "client"; + Object.setPrototypeOf(this, _ActivityDoesNotExist2.prototype); } - serialize(input, context) { - return (0, Aws_json1_0_1.se_ListStateMachineAliasesCommand)(input, context); + }; + __name(_ActivityDoesNotExist, "ActivityDoesNotExist"); + var ActivityDoesNotExist = _ActivityDoesNotExist; + var _ActivityLimitExceeded = class _ActivityLimitExceeded2 extends SFNServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "ActivityLimitExceeded", + $fault: "client", + ...opts + }); + this.name = "ActivityLimitExceeded"; + this.$fault = "client"; + Object.setPrototypeOf(this, _ActivityLimitExceeded2.prototype); } - deserialize(output, context) { - return (0, Aws_json1_0_1.de_ListStateMachineAliasesCommand)(output, context); + }; + __name(_ActivityLimitExceeded, "ActivityLimitExceeded"); + var ActivityLimitExceeded = _ActivityLimitExceeded; + var _ActivityWorkerLimitExceeded = class _ActivityWorkerLimitExceeded2 extends SFNServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "ActivityWorkerLimitExceeded", + $fault: "client", + ...opts + }); + this.name = "ActivityWorkerLimitExceeded"; + this.$fault = "client"; + Object.setPrototypeOf(this, _ActivityWorkerLimitExceeded2.prototype); } }; - exports2.ListStateMachineAliasesCommand = ListStateMachineAliasesCommand; - } -}); - -// ../../../node_modules/@aws-sdk/client-sfn/dist-cjs/commands/ListStateMachinesCommand.js -var require_ListStateMachinesCommand = __commonJS({ - "../../../node_modules/@aws-sdk/client-sfn/dist-cjs/commands/ListStateMachinesCommand.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.ListStateMachinesCommand = exports2.$Command = void 0; - var middleware_endpoint_1 = require_dist_cjs26(); - var middleware_serde_1 = require_dist_cjs25(); - var smithy_client_1 = require_dist_cjs34(); - Object.defineProperty(exports2, "$Command", { enumerable: true, get: function() { - return smithy_client_1.Command; - } }); - var types_1 = require_dist_cjs(); - var Aws_json1_0_1 = require_Aws_json1_0(); - var ListStateMachinesCommand = class _ListStateMachinesCommand extends smithy_client_1.Command { - static getEndpointParameterInstructions() { - return { - UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, - Endpoint: { type: "builtInParams", name: "endpoint" }, - Region: { type: "builtInParams", name: "region" }, - UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" } - }; + __name(_ActivityWorkerLimitExceeded, "ActivityWorkerLimitExceeded"); + var ActivityWorkerLimitExceeded = _ActivityWorkerLimitExceeded; + var EncryptionType = { + AWS_OWNED_KEY: "AWS_OWNED_KEY", + CUSTOMER_MANAGED_KMS_KEY: "CUSTOMER_MANAGED_KMS_KEY" + }; + var _InvalidEncryptionConfiguration = class _InvalidEncryptionConfiguration2 extends SFNServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "InvalidEncryptionConfiguration", + $fault: "client", + ...opts + }); + this.name = "InvalidEncryptionConfiguration"; + this.$fault = "client"; + Object.setPrototypeOf(this, _InvalidEncryptionConfiguration2.prototype); } - constructor(input) { - super(); - this.input = input; + }; + __name(_InvalidEncryptionConfiguration, "InvalidEncryptionConfiguration"); + var InvalidEncryptionConfiguration = _InvalidEncryptionConfiguration; + var _InvalidName = class _InvalidName2 extends SFNServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "InvalidName", + $fault: "client", + ...opts + }); + this.name = "InvalidName"; + this.$fault = "client"; + Object.setPrototypeOf(this, _InvalidName2.prototype); } - resolveMiddleware(clientStack, configuration, options) { - this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, _ListStateMachinesCommand.getEndpointParameterInstructions())); - const stack = clientStack.concat(this.middlewareStack); - const { logger } = configuration; - const clientName = "SFNClient"; - const commandName = "ListStateMachinesCommand"; - const handlerExecutionContext = { - logger, - clientName, - commandName, - inputFilterSensitiveLog: (_) => _, - outputFilterSensitiveLog: (_) => _, - [types_1.SMITHY_CONTEXT_KEY]: { - service: "AWSStepFunctions", - operation: "ListStateMachines" - } - }; - const { requestHandler } = configuration; - return stack.resolve((request2) => requestHandler.handle(request2.request, options || {}), handlerExecutionContext); + }; + __name(_InvalidName, "InvalidName"); + var InvalidName = _InvalidName; + var _KmsAccessDeniedException = class _KmsAccessDeniedException2 extends SFNServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "KmsAccessDeniedException", + $fault: "client", + ...opts + }); + this.name = "KmsAccessDeniedException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _KmsAccessDeniedException2.prototype); } - serialize(input, context) { - return (0, Aws_json1_0_1.se_ListStateMachinesCommand)(input, context); + }; + __name(_KmsAccessDeniedException, "KmsAccessDeniedException"); + var KmsAccessDeniedException = _KmsAccessDeniedException; + var _KmsThrottlingException = class _KmsThrottlingException2 extends SFNServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "KmsThrottlingException", + $fault: "client", + ...opts + }); + this.name = "KmsThrottlingException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _KmsThrottlingException2.prototype); } - deserialize(output, context) { - return (0, Aws_json1_0_1.de_ListStateMachinesCommand)(output, context); + }; + __name(_KmsThrottlingException, "KmsThrottlingException"); + var KmsThrottlingException = _KmsThrottlingException; + var _TooManyTags = class _TooManyTags2 extends SFNServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "TooManyTags", + $fault: "client", + ...opts + }); + this.name = "TooManyTags"; + this.$fault = "client"; + Object.setPrototypeOf(this, _TooManyTags2.prototype); + this.resourceName = opts.resourceName; } }; - exports2.ListStateMachinesCommand = ListStateMachinesCommand; - } -}); - -// ../../../node_modules/@aws-sdk/client-sfn/dist-cjs/commands/ListStateMachineVersionsCommand.js -var require_ListStateMachineVersionsCommand = __commonJS({ - "../../../node_modules/@aws-sdk/client-sfn/dist-cjs/commands/ListStateMachineVersionsCommand.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.ListStateMachineVersionsCommand = exports2.$Command = void 0; - var middleware_endpoint_1 = require_dist_cjs26(); - var middleware_serde_1 = require_dist_cjs25(); - var smithy_client_1 = require_dist_cjs34(); - Object.defineProperty(exports2, "$Command", { enumerable: true, get: function() { - return smithy_client_1.Command; - } }); - var types_1 = require_dist_cjs(); - var Aws_json1_0_1 = require_Aws_json1_0(); - var ListStateMachineVersionsCommand = class _ListStateMachineVersionsCommand extends smithy_client_1.Command { - static getEndpointParameterInstructions() { - return { - UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, - Endpoint: { type: "builtInParams", name: "endpoint" }, - Region: { type: "builtInParams", name: "region" }, - UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" } - }; + __name(_TooManyTags, "TooManyTags"); + var TooManyTags = _TooManyTags; + var _ConflictException = class _ConflictException2 extends SFNServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "ConflictException", + $fault: "client", + ...opts + }); + this.name = "ConflictException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _ConflictException2.prototype); } - constructor(input) { - super(); - this.input = input; + }; + __name(_ConflictException, "ConflictException"); + var ConflictException = _ConflictException; + var LogLevel = { + ALL: "ALL", + ERROR: "ERROR", + FATAL: "FATAL", + OFF: "OFF" + }; + var StateMachineType = { + EXPRESS: "EXPRESS", + STANDARD: "STANDARD" + }; + var _InvalidArn = class _InvalidArn2 extends SFNServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "InvalidArn", + $fault: "client", + ...opts + }); + this.name = "InvalidArn"; + this.$fault = "client"; + Object.setPrototypeOf(this, _InvalidArn2.prototype); } - resolveMiddleware(clientStack, configuration, options) { - this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, _ListStateMachineVersionsCommand.getEndpointParameterInstructions())); - const stack = clientStack.concat(this.middlewareStack); - const { logger } = configuration; - const clientName = "SFNClient"; - const commandName = "ListStateMachineVersionsCommand"; - const handlerExecutionContext = { - logger, - clientName, - commandName, - inputFilterSensitiveLog: (_) => _, - outputFilterSensitiveLog: (_) => _, - [types_1.SMITHY_CONTEXT_KEY]: { - service: "AWSStepFunctions", - operation: "ListStateMachineVersions" - } - }; - const { requestHandler } = configuration; - return stack.resolve((request2) => requestHandler.handle(request2.request, options || {}), handlerExecutionContext); + }; + __name(_InvalidArn, "InvalidArn"); + var InvalidArn = _InvalidArn; + var _InvalidDefinition = class _InvalidDefinition2 extends SFNServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "InvalidDefinition", + $fault: "client", + ...opts + }); + this.name = "InvalidDefinition"; + this.$fault = "client"; + Object.setPrototypeOf(this, _InvalidDefinition2.prototype); } - serialize(input, context) { - return (0, Aws_json1_0_1.se_ListStateMachineVersionsCommand)(input, context); + }; + __name(_InvalidDefinition, "InvalidDefinition"); + var InvalidDefinition = _InvalidDefinition; + var _InvalidLoggingConfiguration = class _InvalidLoggingConfiguration2 extends SFNServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "InvalidLoggingConfiguration", + $fault: "client", + ...opts + }); + this.name = "InvalidLoggingConfiguration"; + this.$fault = "client"; + Object.setPrototypeOf(this, _InvalidLoggingConfiguration2.prototype); } - deserialize(output, context) { - return (0, Aws_json1_0_1.de_ListStateMachineVersionsCommand)(output, context); + }; + __name(_InvalidLoggingConfiguration, "InvalidLoggingConfiguration"); + var InvalidLoggingConfiguration = _InvalidLoggingConfiguration; + var _InvalidTracingConfiguration = class _InvalidTracingConfiguration2 extends SFNServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "InvalidTracingConfiguration", + $fault: "client", + ...opts + }); + this.name = "InvalidTracingConfiguration"; + this.$fault = "client"; + Object.setPrototypeOf(this, _InvalidTracingConfiguration2.prototype); } }; - exports2.ListStateMachineVersionsCommand = ListStateMachineVersionsCommand; - } -}); - -// ../../../node_modules/@aws-sdk/client-sfn/dist-cjs/commands/ListTagsForResourceCommand.js -var require_ListTagsForResourceCommand = __commonJS({ - "../../../node_modules/@aws-sdk/client-sfn/dist-cjs/commands/ListTagsForResourceCommand.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.ListTagsForResourceCommand = exports2.$Command = void 0; - var middleware_endpoint_1 = require_dist_cjs26(); - var middleware_serde_1 = require_dist_cjs25(); - var smithy_client_1 = require_dist_cjs34(); - Object.defineProperty(exports2, "$Command", { enumerable: true, get: function() { - return smithy_client_1.Command; - } }); - var types_1 = require_dist_cjs(); - var Aws_json1_0_1 = require_Aws_json1_0(); - var ListTagsForResourceCommand = class _ListTagsForResourceCommand extends smithy_client_1.Command { - static getEndpointParameterInstructions() { - return { - UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, - Endpoint: { type: "builtInParams", name: "endpoint" }, - Region: { type: "builtInParams", name: "region" }, - UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" } - }; + __name(_InvalidTracingConfiguration, "InvalidTracingConfiguration"); + var InvalidTracingConfiguration = _InvalidTracingConfiguration; + var _StateMachineAlreadyExists = class _StateMachineAlreadyExists2 extends SFNServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "StateMachineAlreadyExists", + $fault: "client", + ...opts + }); + this.name = "StateMachineAlreadyExists"; + this.$fault = "client"; + Object.setPrototypeOf(this, _StateMachineAlreadyExists2.prototype); } - constructor(input) { - super(); - this.input = input; + }; + __name(_StateMachineAlreadyExists, "StateMachineAlreadyExists"); + var StateMachineAlreadyExists = _StateMachineAlreadyExists; + var _StateMachineDeleting = class _StateMachineDeleting2 extends SFNServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "StateMachineDeleting", + $fault: "client", + ...opts + }); + this.name = "StateMachineDeleting"; + this.$fault = "client"; + Object.setPrototypeOf(this, _StateMachineDeleting2.prototype); } - resolveMiddleware(clientStack, configuration, options) { - this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, _ListTagsForResourceCommand.getEndpointParameterInstructions())); - const stack = clientStack.concat(this.middlewareStack); - const { logger } = configuration; - const clientName = "SFNClient"; - const commandName = "ListTagsForResourceCommand"; - const handlerExecutionContext = { - logger, - clientName, - commandName, - inputFilterSensitiveLog: (_) => _, - outputFilterSensitiveLog: (_) => _, - [types_1.SMITHY_CONTEXT_KEY]: { - service: "AWSStepFunctions", - operation: "ListTagsForResource" - } - }; - const { requestHandler } = configuration; - return stack.resolve((request2) => requestHandler.handle(request2.request, options || {}), handlerExecutionContext); + }; + __name(_StateMachineDeleting, "StateMachineDeleting"); + var StateMachineDeleting = _StateMachineDeleting; + var _StateMachineLimitExceeded = class _StateMachineLimitExceeded2 extends SFNServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "StateMachineLimitExceeded", + $fault: "client", + ...opts + }); + this.name = "StateMachineLimitExceeded"; + this.$fault = "client"; + Object.setPrototypeOf(this, _StateMachineLimitExceeded2.prototype); } - serialize(input, context) { - return (0, Aws_json1_0_1.se_ListTagsForResourceCommand)(input, context); + }; + __name(_StateMachineLimitExceeded, "StateMachineLimitExceeded"); + var StateMachineLimitExceeded = _StateMachineLimitExceeded; + var _StateMachineTypeNotSupported = class _StateMachineTypeNotSupported2 extends SFNServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "StateMachineTypeNotSupported", + $fault: "client", + ...opts + }); + this.name = "StateMachineTypeNotSupported"; + this.$fault = "client"; + Object.setPrototypeOf(this, _StateMachineTypeNotSupported2.prototype); } - deserialize(output, context) { - return (0, Aws_json1_0_1.de_ListTagsForResourceCommand)(output, context); + }; + __name(_StateMachineTypeNotSupported, "StateMachineTypeNotSupported"); + var StateMachineTypeNotSupported = _StateMachineTypeNotSupported; + var ValidationExceptionReason = { + API_DOES_NOT_SUPPORT_LABELED_ARNS: "API_DOES_NOT_SUPPORT_LABELED_ARNS", + CANNOT_UPDATE_COMPLETED_MAP_RUN: "CANNOT_UPDATE_COMPLETED_MAP_RUN", + INVALID_ROUTING_CONFIGURATION: "INVALID_ROUTING_CONFIGURATION", + MISSING_REQUIRED_PARAMETER: "MISSING_REQUIRED_PARAMETER" + }; + var _ValidationException = class _ValidationException2 extends SFNServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "ValidationException", + $fault: "client", + ...opts + }); + this.name = "ValidationException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _ValidationException2.prototype); + this.reason = opts.reason; } }; - exports2.ListTagsForResourceCommand = ListTagsForResourceCommand; - } -}); - -// ../../../node_modules/@aws-sdk/client-sfn/dist-cjs/commands/PublishStateMachineVersionCommand.js -var require_PublishStateMachineVersionCommand = __commonJS({ - "../../../node_modules/@aws-sdk/client-sfn/dist-cjs/commands/PublishStateMachineVersionCommand.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.PublishStateMachineVersionCommand = exports2.$Command = void 0; - var middleware_endpoint_1 = require_dist_cjs26(); - var middleware_serde_1 = require_dist_cjs25(); - var smithy_client_1 = require_dist_cjs34(); - Object.defineProperty(exports2, "$Command", { enumerable: true, get: function() { - return smithy_client_1.Command; - } }); - var types_1 = require_dist_cjs(); - var models_0_1 = require_models_03(); - var Aws_json1_0_1 = require_Aws_json1_0(); - var PublishStateMachineVersionCommand = class _PublishStateMachineVersionCommand extends smithy_client_1.Command { - static getEndpointParameterInstructions() { - return { - UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, - Endpoint: { type: "builtInParams", name: "endpoint" }, - Region: { type: "builtInParams", name: "region" }, - UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" } - }; + __name(_ValidationException, "ValidationException"); + var ValidationException = _ValidationException; + var _ResourceNotFound = class _ResourceNotFound2 extends SFNServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "ResourceNotFound", + $fault: "client", + ...opts + }); + this.name = "ResourceNotFound"; + this.$fault = "client"; + Object.setPrototypeOf(this, _ResourceNotFound2.prototype); + this.resourceName = opts.resourceName; } - constructor(input) { - super(); - this.input = input; + }; + __name(_ResourceNotFound, "ResourceNotFound"); + var ResourceNotFound = _ResourceNotFound; + var _ServiceQuotaExceededException = class _ServiceQuotaExceededException2 extends SFNServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "ServiceQuotaExceededException", + $fault: "client", + ...opts + }); + this.name = "ServiceQuotaExceededException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _ServiceQuotaExceededException2.prototype); } - resolveMiddleware(clientStack, configuration, options) { - this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, _PublishStateMachineVersionCommand.getEndpointParameterInstructions())); - const stack = clientStack.concat(this.middlewareStack); - const { logger } = configuration; - const clientName = "SFNClient"; - const commandName = "PublishStateMachineVersionCommand"; - const handlerExecutionContext = { - logger, - clientName, - commandName, - inputFilterSensitiveLog: models_0_1.PublishStateMachineVersionInputFilterSensitiveLog, - outputFilterSensitiveLog: (_) => _, - [types_1.SMITHY_CONTEXT_KEY]: { - service: "AWSStepFunctions", - operation: "PublishStateMachineVersion" - } - }; - const { requestHandler } = configuration; - return stack.resolve((request2) => requestHandler.handle(request2.request, options || {}), handlerExecutionContext); + }; + __name(_ServiceQuotaExceededException, "ServiceQuotaExceededException"); + var ServiceQuotaExceededException = _ServiceQuotaExceededException; + var IncludedData = { + ALL_DATA: "ALL_DATA", + METADATA_ONLY: "METADATA_ONLY" + }; + var ExecutionRedriveStatus = { + NOT_REDRIVABLE: "NOT_REDRIVABLE", + REDRIVABLE: "REDRIVABLE", + REDRIVABLE_BY_MAP_RUN: "REDRIVABLE_BY_MAP_RUN" + }; + var ExecutionStatus = { + ABORTED: "ABORTED", + FAILED: "FAILED", + PENDING_REDRIVE: "PENDING_REDRIVE", + RUNNING: "RUNNING", + SUCCEEDED: "SUCCEEDED", + TIMED_OUT: "TIMED_OUT" + }; + var _ExecutionDoesNotExist = class _ExecutionDoesNotExist2 extends SFNServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "ExecutionDoesNotExist", + $fault: "client", + ...opts + }); + this.name = "ExecutionDoesNotExist"; + this.$fault = "client"; + Object.setPrototypeOf(this, _ExecutionDoesNotExist2.prototype); } - serialize(input, context) { - return (0, Aws_json1_0_1.se_PublishStateMachineVersionCommand)(input, context); + }; + __name(_ExecutionDoesNotExist, "ExecutionDoesNotExist"); + var ExecutionDoesNotExist = _ExecutionDoesNotExist; + var KmsKeyState = { + CREATING: "CREATING", + DISABLED: "DISABLED", + PENDING_DELETION: "PENDING_DELETION", + PENDING_IMPORT: "PENDING_IMPORT", + UNAVAILABLE: "UNAVAILABLE" + }; + var _KmsInvalidStateException = class _KmsInvalidStateException2 extends SFNServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "KmsInvalidStateException", + $fault: "client", + ...opts + }); + this.name = "KmsInvalidStateException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _KmsInvalidStateException2.prototype); + this.kmsKeyState = opts.kmsKeyState; } - deserialize(output, context) { - return (0, Aws_json1_0_1.de_PublishStateMachineVersionCommand)(output, context); + }; + __name(_KmsInvalidStateException, "KmsInvalidStateException"); + var KmsInvalidStateException = _KmsInvalidStateException; + var MapRunStatus = { + ABORTED: "ABORTED", + FAILED: "FAILED", + RUNNING: "RUNNING", + SUCCEEDED: "SUCCEEDED" + }; + var StateMachineStatus = { + ACTIVE: "ACTIVE", + DELETING: "DELETING" + }; + var _StateMachineDoesNotExist = class _StateMachineDoesNotExist2 extends SFNServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "StateMachineDoesNotExist", + $fault: "client", + ...opts + }); + this.name = "StateMachineDoesNotExist"; + this.$fault = "client"; + Object.setPrototypeOf(this, _StateMachineDoesNotExist2.prototype); } }; - exports2.PublishStateMachineVersionCommand = PublishStateMachineVersionCommand; - } -}); - -// ../../../node_modules/@aws-sdk/client-sfn/dist-cjs/commands/SendTaskFailureCommand.js -var require_SendTaskFailureCommand = __commonJS({ - "../../../node_modules/@aws-sdk/client-sfn/dist-cjs/commands/SendTaskFailureCommand.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.SendTaskFailureCommand = exports2.$Command = void 0; - var middleware_endpoint_1 = require_dist_cjs26(); - var middleware_serde_1 = require_dist_cjs25(); - var smithy_client_1 = require_dist_cjs34(); - Object.defineProperty(exports2, "$Command", { enumerable: true, get: function() { - return smithy_client_1.Command; - } }); - var types_1 = require_dist_cjs(); - var models_0_1 = require_models_03(); - var Aws_json1_0_1 = require_Aws_json1_0(); - var SendTaskFailureCommand = class _SendTaskFailureCommand extends smithy_client_1.Command { - static getEndpointParameterInstructions() { - return { - UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, - Endpoint: { type: "builtInParams", name: "endpoint" }, - Region: { type: "builtInParams", name: "region" }, - UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" } - }; - } - constructor(input) { - super(); - this.input = input; - } - resolveMiddleware(clientStack, configuration, options) { - this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, _SendTaskFailureCommand.getEndpointParameterInstructions())); - const stack = clientStack.concat(this.middlewareStack); - const { logger } = configuration; - const clientName = "SFNClient"; - const commandName = "SendTaskFailureCommand"; - const handlerExecutionContext = { - logger, - clientName, - commandName, - inputFilterSensitiveLog: models_0_1.SendTaskFailureInputFilterSensitiveLog, - outputFilterSensitiveLog: (_) => _, - [types_1.SMITHY_CONTEXT_KEY]: { - service: "AWSStepFunctions", - operation: "SendTaskFailure" - } - }; - const { requestHandler } = configuration; - return stack.resolve((request2) => requestHandler.handle(request2.request, options || {}), handlerExecutionContext); - } - serialize(input, context) { - return (0, Aws_json1_0_1.se_SendTaskFailureCommand)(input, context); - } - deserialize(output, context) { - return (0, Aws_json1_0_1.de_SendTaskFailureCommand)(output, context); + __name(_StateMachineDoesNotExist, "StateMachineDoesNotExist"); + var StateMachineDoesNotExist = _StateMachineDoesNotExist; + var HistoryEventType = { + ActivityFailed: "ActivityFailed", + ActivityScheduleFailed: "ActivityScheduleFailed", + ActivityScheduled: "ActivityScheduled", + ActivityStarted: "ActivityStarted", + ActivitySucceeded: "ActivitySucceeded", + ActivityTimedOut: "ActivityTimedOut", + ChoiceStateEntered: "ChoiceStateEntered", + ChoiceStateExited: "ChoiceStateExited", + ExecutionAborted: "ExecutionAborted", + ExecutionFailed: "ExecutionFailed", + ExecutionRedriven: "ExecutionRedriven", + ExecutionStarted: "ExecutionStarted", + ExecutionSucceeded: "ExecutionSucceeded", + ExecutionTimedOut: "ExecutionTimedOut", + FailStateEntered: "FailStateEntered", + LambdaFunctionFailed: "LambdaFunctionFailed", + LambdaFunctionScheduleFailed: "LambdaFunctionScheduleFailed", + LambdaFunctionScheduled: "LambdaFunctionScheduled", + LambdaFunctionStartFailed: "LambdaFunctionStartFailed", + LambdaFunctionStarted: "LambdaFunctionStarted", + LambdaFunctionSucceeded: "LambdaFunctionSucceeded", + LambdaFunctionTimedOut: "LambdaFunctionTimedOut", + MapIterationAborted: "MapIterationAborted", + MapIterationFailed: "MapIterationFailed", + MapIterationStarted: "MapIterationStarted", + MapIterationSucceeded: "MapIterationSucceeded", + MapRunAborted: "MapRunAborted", + MapRunFailed: "MapRunFailed", + MapRunRedriven: "MapRunRedriven", + MapRunStarted: "MapRunStarted", + MapRunSucceeded: "MapRunSucceeded", + MapStateAborted: "MapStateAborted", + MapStateEntered: "MapStateEntered", + MapStateExited: "MapStateExited", + MapStateFailed: "MapStateFailed", + MapStateStarted: "MapStateStarted", + MapStateSucceeded: "MapStateSucceeded", + ParallelStateAborted: "ParallelStateAborted", + ParallelStateEntered: "ParallelStateEntered", + ParallelStateExited: "ParallelStateExited", + ParallelStateFailed: "ParallelStateFailed", + ParallelStateStarted: "ParallelStateStarted", + ParallelStateSucceeded: "ParallelStateSucceeded", + PassStateEntered: "PassStateEntered", + PassStateExited: "PassStateExited", + SucceedStateEntered: "SucceedStateEntered", + SucceedStateExited: "SucceedStateExited", + TaskFailed: "TaskFailed", + TaskScheduled: "TaskScheduled", + TaskStartFailed: "TaskStartFailed", + TaskStarted: "TaskStarted", + TaskStateAborted: "TaskStateAborted", + TaskStateEntered: "TaskStateEntered", + TaskStateExited: "TaskStateExited", + TaskSubmitFailed: "TaskSubmitFailed", + TaskSubmitted: "TaskSubmitted", + TaskSucceeded: "TaskSucceeded", + TaskTimedOut: "TaskTimedOut", + WaitStateAborted: "WaitStateAborted", + WaitStateEntered: "WaitStateEntered", + WaitStateExited: "WaitStateExited" + }; + var _InvalidToken = class _InvalidToken2 extends SFNServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "InvalidToken", + $fault: "client", + ...opts + }); + this.name = "InvalidToken"; + this.$fault = "client"; + Object.setPrototypeOf(this, _InvalidToken2.prototype); } }; - exports2.SendTaskFailureCommand = SendTaskFailureCommand; - } -}); - -// ../../../node_modules/@aws-sdk/client-sfn/dist-cjs/commands/SendTaskHeartbeatCommand.js -var require_SendTaskHeartbeatCommand = __commonJS({ - "../../../node_modules/@aws-sdk/client-sfn/dist-cjs/commands/SendTaskHeartbeatCommand.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.SendTaskHeartbeatCommand = exports2.$Command = void 0; - var middleware_endpoint_1 = require_dist_cjs26(); - var middleware_serde_1 = require_dist_cjs25(); - var smithy_client_1 = require_dist_cjs34(); - Object.defineProperty(exports2, "$Command", { enumerable: true, get: function() { - return smithy_client_1.Command; - } }); - var types_1 = require_dist_cjs(); - var Aws_json1_0_1 = require_Aws_json1_0(); - var SendTaskHeartbeatCommand = class _SendTaskHeartbeatCommand extends smithy_client_1.Command { - static getEndpointParameterInstructions() { - return { - UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, - Endpoint: { type: "builtInParams", name: "endpoint" }, - Region: { type: "builtInParams", name: "region" }, - UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" } - }; + __name(_InvalidToken, "InvalidToken"); + var InvalidToken = _InvalidToken; + var ExecutionRedriveFilter = { + NOT_REDRIVEN: "NOT_REDRIVEN", + REDRIVEN: "REDRIVEN" + }; + var _ExecutionLimitExceeded = class _ExecutionLimitExceeded2 extends SFNServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "ExecutionLimitExceeded", + $fault: "client", + ...opts + }); + this.name = "ExecutionLimitExceeded"; + this.$fault = "client"; + Object.setPrototypeOf(this, _ExecutionLimitExceeded2.prototype); } - constructor(input) { - super(); - this.input = input; + }; + __name(_ExecutionLimitExceeded, "ExecutionLimitExceeded"); + var ExecutionLimitExceeded = _ExecutionLimitExceeded; + var _ExecutionNotRedrivable = class _ExecutionNotRedrivable2 extends SFNServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "ExecutionNotRedrivable", + $fault: "client", + ...opts + }); + this.name = "ExecutionNotRedrivable"; + this.$fault = "client"; + Object.setPrototypeOf(this, _ExecutionNotRedrivable2.prototype); } - resolveMiddleware(clientStack, configuration, options) { - this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, _SendTaskHeartbeatCommand.getEndpointParameterInstructions())); - const stack = clientStack.concat(this.middlewareStack); - const { logger } = configuration; - const clientName = "SFNClient"; - const commandName = "SendTaskHeartbeatCommand"; - const handlerExecutionContext = { - logger, - clientName, - commandName, - inputFilterSensitiveLog: (_) => _, - outputFilterSensitiveLog: (_) => _, - [types_1.SMITHY_CONTEXT_KEY]: { - service: "AWSStepFunctions", - operation: "SendTaskHeartbeat" - } - }; - const { requestHandler } = configuration; - return stack.resolve((request2) => requestHandler.handle(request2.request, options || {}), handlerExecutionContext); + }; + __name(_ExecutionNotRedrivable, "ExecutionNotRedrivable"); + var ExecutionNotRedrivable = _ExecutionNotRedrivable; + var _TaskDoesNotExist = class _TaskDoesNotExist2 extends SFNServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "TaskDoesNotExist", + $fault: "client", + ...opts + }); + this.name = "TaskDoesNotExist"; + this.$fault = "client"; + Object.setPrototypeOf(this, _TaskDoesNotExist2.prototype); } - serialize(input, context) { - return (0, Aws_json1_0_1.se_SendTaskHeartbeatCommand)(input, context); + }; + __name(_TaskDoesNotExist, "TaskDoesNotExist"); + var TaskDoesNotExist = _TaskDoesNotExist; + var _TaskTimedOut = class _TaskTimedOut2 extends SFNServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "TaskTimedOut", + $fault: "client", + ...opts + }); + this.name = "TaskTimedOut"; + this.$fault = "client"; + Object.setPrototypeOf(this, _TaskTimedOut2.prototype); } - deserialize(output, context) { - return (0, Aws_json1_0_1.de_SendTaskHeartbeatCommand)(output, context); + }; + __name(_TaskTimedOut, "TaskTimedOut"); + var TaskTimedOut = _TaskTimedOut; + var _InvalidOutput = class _InvalidOutput2 extends SFNServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "InvalidOutput", + $fault: "client", + ...opts + }); + this.name = "InvalidOutput"; + this.$fault = "client"; + Object.setPrototypeOf(this, _InvalidOutput2.prototype); } }; - exports2.SendTaskHeartbeatCommand = SendTaskHeartbeatCommand; - } -}); - -// ../../../node_modules/@aws-sdk/client-sfn/dist-cjs/commands/SendTaskSuccessCommand.js -var require_SendTaskSuccessCommand = __commonJS({ - "../../../node_modules/@aws-sdk/client-sfn/dist-cjs/commands/SendTaskSuccessCommand.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.SendTaskSuccessCommand = exports2.$Command = void 0; - var middleware_endpoint_1 = require_dist_cjs26(); - var middleware_serde_1 = require_dist_cjs25(); - var smithy_client_1 = require_dist_cjs34(); - Object.defineProperty(exports2, "$Command", { enumerable: true, get: function() { - return smithy_client_1.Command; - } }); - var types_1 = require_dist_cjs(); - var models_0_1 = require_models_03(); - var Aws_json1_0_1 = require_Aws_json1_0(); - var SendTaskSuccessCommand = class _SendTaskSuccessCommand extends smithy_client_1.Command { - static getEndpointParameterInstructions() { - return { - UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, - Endpoint: { type: "builtInParams", name: "endpoint" }, - Region: { type: "builtInParams", name: "region" }, - UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" } - }; + __name(_InvalidOutput, "InvalidOutput"); + var InvalidOutput = _InvalidOutput; + var _ExecutionAlreadyExists = class _ExecutionAlreadyExists2 extends SFNServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "ExecutionAlreadyExists", + $fault: "client", + ...opts + }); + this.name = "ExecutionAlreadyExists"; + this.$fault = "client"; + Object.setPrototypeOf(this, _ExecutionAlreadyExists2.prototype); } - constructor(input) { - super(); - this.input = input; + }; + __name(_ExecutionAlreadyExists, "ExecutionAlreadyExists"); + var ExecutionAlreadyExists = _ExecutionAlreadyExists; + var _InvalidExecutionInput = class _InvalidExecutionInput2 extends SFNServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "InvalidExecutionInput", + $fault: "client", + ...opts + }); + this.name = "InvalidExecutionInput"; + this.$fault = "client"; + Object.setPrototypeOf(this, _InvalidExecutionInput2.prototype); } - resolveMiddleware(clientStack, configuration, options) { - this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, _SendTaskSuccessCommand.getEndpointParameterInstructions())); - const stack = clientStack.concat(this.middlewareStack); - const { logger } = configuration; - const clientName = "SFNClient"; - const commandName = "SendTaskSuccessCommand"; - const handlerExecutionContext = { - logger, - clientName, - commandName, - inputFilterSensitiveLog: models_0_1.SendTaskSuccessInputFilterSensitiveLog, - outputFilterSensitiveLog: (_) => _, - [types_1.SMITHY_CONTEXT_KEY]: { - service: "AWSStepFunctions", - operation: "SendTaskSuccess" - } - }; - const { requestHandler } = configuration; - return stack.resolve((request2) => requestHandler.handle(request2.request, options || {}), handlerExecutionContext); + }; + __name(_InvalidExecutionInput, "InvalidExecutionInput"); + var InvalidExecutionInput = _InvalidExecutionInput; + var SyncExecutionStatus = { + FAILED: "FAILED", + SUCCEEDED: "SUCCEEDED", + TIMED_OUT: "TIMED_OUT" + }; + var InspectionLevel = { + DEBUG: "DEBUG", + INFO: "INFO", + TRACE: "TRACE" + }; + var TestExecutionStatus = { + CAUGHT_ERROR: "CAUGHT_ERROR", + FAILED: "FAILED", + RETRIABLE: "RETRIABLE", + SUCCEEDED: "SUCCEEDED" + }; + var _MissingRequiredParameter = class _MissingRequiredParameter2 extends SFNServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "MissingRequiredParameter", + $fault: "client", + ...opts + }); + this.name = "MissingRequiredParameter"; + this.$fault = "client"; + Object.setPrototypeOf(this, _MissingRequiredParameter2.prototype); } - serialize(input, context) { - return (0, Aws_json1_0_1.se_SendTaskSuccessCommand)(input, context); + }; + __name(_MissingRequiredParameter, "MissingRequiredParameter"); + var MissingRequiredParameter = _MissingRequiredParameter; + var ValidateStateMachineDefinitionSeverity = { + ERROR: "ERROR" + }; + var ValidateStateMachineDefinitionResultCode = { + FAIL: "FAIL", + OK: "OK" + }; + var ActivityFailedEventDetailsFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.error && { error: import_smithy_client5.SENSITIVE_STRING }, + ...obj.cause && { cause: import_smithy_client5.SENSITIVE_STRING } + }), "ActivityFailedEventDetailsFilterSensitiveLog"); + var ActivityScheduledEventDetailsFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.input && { input: import_smithy_client5.SENSITIVE_STRING } + }), "ActivityScheduledEventDetailsFilterSensitiveLog"); + var ActivityScheduleFailedEventDetailsFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.error && { error: import_smithy_client5.SENSITIVE_STRING }, + ...obj.cause && { cause: import_smithy_client5.SENSITIVE_STRING } + }), "ActivityScheduleFailedEventDetailsFilterSensitiveLog"); + var ActivitySucceededEventDetailsFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.output && { output: import_smithy_client5.SENSITIVE_STRING } + }), "ActivitySucceededEventDetailsFilterSensitiveLog"); + var ActivityTimedOutEventDetailsFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.error && { error: import_smithy_client5.SENSITIVE_STRING }, + ...obj.cause && { cause: import_smithy_client5.SENSITIVE_STRING } + }), "ActivityTimedOutEventDetailsFilterSensitiveLog"); + var CreateStateMachineInputFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.definition && { definition: import_smithy_client5.SENSITIVE_STRING }, + ...obj.versionDescription && { versionDescription: import_smithy_client5.SENSITIVE_STRING } + }), "CreateStateMachineInputFilterSensitiveLog"); + var CreateStateMachineAliasInputFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.description && { description: import_smithy_client5.SENSITIVE_STRING } + }), "CreateStateMachineAliasInputFilterSensitiveLog"); + var DescribeExecutionOutputFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.input && { input: import_smithy_client5.SENSITIVE_STRING }, + ...obj.output && { output: import_smithy_client5.SENSITIVE_STRING }, + ...obj.error && { error: import_smithy_client5.SENSITIVE_STRING }, + ...obj.cause && { cause: import_smithy_client5.SENSITIVE_STRING }, + ...obj.redriveStatusReason && { redriveStatusReason: import_smithy_client5.SENSITIVE_STRING } + }), "DescribeExecutionOutputFilterSensitiveLog"); + var DescribeStateMachineOutputFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.definition && { definition: import_smithy_client5.SENSITIVE_STRING }, + ...obj.description && { description: import_smithy_client5.SENSITIVE_STRING } + }), "DescribeStateMachineOutputFilterSensitiveLog"); + var DescribeStateMachineAliasOutputFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.description && { description: import_smithy_client5.SENSITIVE_STRING } + }), "DescribeStateMachineAliasOutputFilterSensitiveLog"); + var DescribeStateMachineForExecutionOutputFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.definition && { definition: import_smithy_client5.SENSITIVE_STRING } + }), "DescribeStateMachineForExecutionOutputFilterSensitiveLog"); + var GetActivityTaskOutputFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.input && { input: import_smithy_client5.SENSITIVE_STRING } + }), "GetActivityTaskOutputFilterSensitiveLog"); + var ExecutionAbortedEventDetailsFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.error && { error: import_smithy_client5.SENSITIVE_STRING }, + ...obj.cause && { cause: import_smithy_client5.SENSITIVE_STRING } + }), "ExecutionAbortedEventDetailsFilterSensitiveLog"); + var ExecutionFailedEventDetailsFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.error && { error: import_smithy_client5.SENSITIVE_STRING }, + ...obj.cause && { cause: import_smithy_client5.SENSITIVE_STRING } + }), "ExecutionFailedEventDetailsFilterSensitiveLog"); + var ExecutionStartedEventDetailsFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.input && { input: import_smithy_client5.SENSITIVE_STRING } + }), "ExecutionStartedEventDetailsFilterSensitiveLog"); + var ExecutionSucceededEventDetailsFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.output && { output: import_smithy_client5.SENSITIVE_STRING } + }), "ExecutionSucceededEventDetailsFilterSensitiveLog"); + var ExecutionTimedOutEventDetailsFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.error && { error: import_smithy_client5.SENSITIVE_STRING }, + ...obj.cause && { cause: import_smithy_client5.SENSITIVE_STRING } + }), "ExecutionTimedOutEventDetailsFilterSensitiveLog"); + var LambdaFunctionFailedEventDetailsFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.error && { error: import_smithy_client5.SENSITIVE_STRING }, + ...obj.cause && { cause: import_smithy_client5.SENSITIVE_STRING } + }), "LambdaFunctionFailedEventDetailsFilterSensitiveLog"); + var LambdaFunctionScheduledEventDetailsFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.input && { input: import_smithy_client5.SENSITIVE_STRING } + }), "LambdaFunctionScheduledEventDetailsFilterSensitiveLog"); + var LambdaFunctionScheduleFailedEventDetailsFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.error && { error: import_smithy_client5.SENSITIVE_STRING }, + ...obj.cause && { cause: import_smithy_client5.SENSITIVE_STRING } + }), "LambdaFunctionScheduleFailedEventDetailsFilterSensitiveLog"); + var LambdaFunctionStartFailedEventDetailsFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.error && { error: import_smithy_client5.SENSITIVE_STRING }, + ...obj.cause && { cause: import_smithy_client5.SENSITIVE_STRING } + }), "LambdaFunctionStartFailedEventDetailsFilterSensitiveLog"); + var LambdaFunctionSucceededEventDetailsFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.output && { output: import_smithy_client5.SENSITIVE_STRING } + }), "LambdaFunctionSucceededEventDetailsFilterSensitiveLog"); + var LambdaFunctionTimedOutEventDetailsFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.error && { error: import_smithy_client5.SENSITIVE_STRING }, + ...obj.cause && { cause: import_smithy_client5.SENSITIVE_STRING } + }), "LambdaFunctionTimedOutEventDetailsFilterSensitiveLog"); + var MapRunFailedEventDetailsFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.error && { error: import_smithy_client5.SENSITIVE_STRING }, + ...obj.cause && { cause: import_smithy_client5.SENSITIVE_STRING } + }), "MapRunFailedEventDetailsFilterSensitiveLog"); + var StateEnteredEventDetailsFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.input && { input: import_smithy_client5.SENSITIVE_STRING } + }), "StateEnteredEventDetailsFilterSensitiveLog"); + var StateExitedEventDetailsFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.output && { output: import_smithy_client5.SENSITIVE_STRING } + }), "StateExitedEventDetailsFilterSensitiveLog"); + var TaskFailedEventDetailsFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.error && { error: import_smithy_client5.SENSITIVE_STRING }, + ...obj.cause && { cause: import_smithy_client5.SENSITIVE_STRING } + }), "TaskFailedEventDetailsFilterSensitiveLog"); + var TaskScheduledEventDetailsFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.parameters && { parameters: import_smithy_client5.SENSITIVE_STRING } + }), "TaskScheduledEventDetailsFilterSensitiveLog"); + var TaskStartFailedEventDetailsFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.error && { error: import_smithy_client5.SENSITIVE_STRING }, + ...obj.cause && { cause: import_smithy_client5.SENSITIVE_STRING } + }), "TaskStartFailedEventDetailsFilterSensitiveLog"); + var TaskSubmitFailedEventDetailsFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.error && { error: import_smithy_client5.SENSITIVE_STRING }, + ...obj.cause && { cause: import_smithy_client5.SENSITIVE_STRING } + }), "TaskSubmitFailedEventDetailsFilterSensitiveLog"); + var TaskSubmittedEventDetailsFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.output && { output: import_smithy_client5.SENSITIVE_STRING } + }), "TaskSubmittedEventDetailsFilterSensitiveLog"); + var TaskSucceededEventDetailsFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.output && { output: import_smithy_client5.SENSITIVE_STRING } + }), "TaskSucceededEventDetailsFilterSensitiveLog"); + var TaskTimedOutEventDetailsFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.error && { error: import_smithy_client5.SENSITIVE_STRING }, + ...obj.cause && { cause: import_smithy_client5.SENSITIVE_STRING } + }), "TaskTimedOutEventDetailsFilterSensitiveLog"); + var HistoryEventFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.activityFailedEventDetails && { + activityFailedEventDetails: ActivityFailedEventDetailsFilterSensitiveLog(obj.activityFailedEventDetails) + }, + ...obj.activityScheduleFailedEventDetails && { + activityScheduleFailedEventDetails: ActivityScheduleFailedEventDetailsFilterSensitiveLog( + obj.activityScheduleFailedEventDetails + ) + }, + ...obj.activityScheduledEventDetails && { + activityScheduledEventDetails: ActivityScheduledEventDetailsFilterSensitiveLog(obj.activityScheduledEventDetails) + }, + ...obj.activitySucceededEventDetails && { + activitySucceededEventDetails: ActivitySucceededEventDetailsFilterSensitiveLog(obj.activitySucceededEventDetails) + }, + ...obj.activityTimedOutEventDetails && { + activityTimedOutEventDetails: ActivityTimedOutEventDetailsFilterSensitiveLog(obj.activityTimedOutEventDetails) + }, + ...obj.taskFailedEventDetails && { + taskFailedEventDetails: TaskFailedEventDetailsFilterSensitiveLog(obj.taskFailedEventDetails) + }, + ...obj.taskScheduledEventDetails && { + taskScheduledEventDetails: TaskScheduledEventDetailsFilterSensitiveLog(obj.taskScheduledEventDetails) + }, + ...obj.taskStartFailedEventDetails && { + taskStartFailedEventDetails: TaskStartFailedEventDetailsFilterSensitiveLog(obj.taskStartFailedEventDetails) + }, + ...obj.taskSubmitFailedEventDetails && { + taskSubmitFailedEventDetails: TaskSubmitFailedEventDetailsFilterSensitiveLog(obj.taskSubmitFailedEventDetails) + }, + ...obj.taskSubmittedEventDetails && { + taskSubmittedEventDetails: TaskSubmittedEventDetailsFilterSensitiveLog(obj.taskSubmittedEventDetails) + }, + ...obj.taskSucceededEventDetails && { + taskSucceededEventDetails: TaskSucceededEventDetailsFilterSensitiveLog(obj.taskSucceededEventDetails) + }, + ...obj.taskTimedOutEventDetails && { + taskTimedOutEventDetails: TaskTimedOutEventDetailsFilterSensitiveLog(obj.taskTimedOutEventDetails) + }, + ...obj.executionFailedEventDetails && { + executionFailedEventDetails: ExecutionFailedEventDetailsFilterSensitiveLog(obj.executionFailedEventDetails) + }, + ...obj.executionStartedEventDetails && { + executionStartedEventDetails: ExecutionStartedEventDetailsFilterSensitiveLog(obj.executionStartedEventDetails) + }, + ...obj.executionSucceededEventDetails && { + executionSucceededEventDetails: ExecutionSucceededEventDetailsFilterSensitiveLog( + obj.executionSucceededEventDetails + ) + }, + ...obj.executionAbortedEventDetails && { + executionAbortedEventDetails: ExecutionAbortedEventDetailsFilterSensitiveLog(obj.executionAbortedEventDetails) + }, + ...obj.executionTimedOutEventDetails && { + executionTimedOutEventDetails: ExecutionTimedOutEventDetailsFilterSensitiveLog(obj.executionTimedOutEventDetails) + }, + ...obj.lambdaFunctionFailedEventDetails && { + lambdaFunctionFailedEventDetails: LambdaFunctionFailedEventDetailsFilterSensitiveLog( + obj.lambdaFunctionFailedEventDetails + ) + }, + ...obj.lambdaFunctionScheduleFailedEventDetails && { + lambdaFunctionScheduleFailedEventDetails: LambdaFunctionScheduleFailedEventDetailsFilterSensitiveLog( + obj.lambdaFunctionScheduleFailedEventDetails + ) + }, + ...obj.lambdaFunctionScheduledEventDetails && { + lambdaFunctionScheduledEventDetails: LambdaFunctionScheduledEventDetailsFilterSensitiveLog( + obj.lambdaFunctionScheduledEventDetails + ) + }, + ...obj.lambdaFunctionStartFailedEventDetails && { + lambdaFunctionStartFailedEventDetails: LambdaFunctionStartFailedEventDetailsFilterSensitiveLog( + obj.lambdaFunctionStartFailedEventDetails + ) + }, + ...obj.lambdaFunctionSucceededEventDetails && { + lambdaFunctionSucceededEventDetails: LambdaFunctionSucceededEventDetailsFilterSensitiveLog( + obj.lambdaFunctionSucceededEventDetails + ) + }, + ...obj.lambdaFunctionTimedOutEventDetails && { + lambdaFunctionTimedOutEventDetails: LambdaFunctionTimedOutEventDetailsFilterSensitiveLog( + obj.lambdaFunctionTimedOutEventDetails + ) + }, + ...obj.stateEnteredEventDetails && { + stateEnteredEventDetails: StateEnteredEventDetailsFilterSensitiveLog(obj.stateEnteredEventDetails) + }, + ...obj.stateExitedEventDetails && { + stateExitedEventDetails: StateExitedEventDetailsFilterSensitiveLog(obj.stateExitedEventDetails) + }, + ...obj.mapRunFailedEventDetails && { + mapRunFailedEventDetails: MapRunFailedEventDetailsFilterSensitiveLog(obj.mapRunFailedEventDetails) } - deserialize(output, context) { - return (0, Aws_json1_0_1.de_SendTaskSuccessCommand)(output, context); + }), "HistoryEventFilterSensitiveLog"); + var GetExecutionHistoryOutputFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.events && { events: obj.events.map((item) => HistoryEventFilterSensitiveLog(item)) } + }), "GetExecutionHistoryOutputFilterSensitiveLog"); + var PublishStateMachineVersionInputFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.description && { description: import_smithy_client5.SENSITIVE_STRING } + }), "PublishStateMachineVersionInputFilterSensitiveLog"); + var SendTaskFailureInputFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.error && { error: import_smithy_client5.SENSITIVE_STRING }, + ...obj.cause && { cause: import_smithy_client5.SENSITIVE_STRING } + }), "SendTaskFailureInputFilterSensitiveLog"); + var SendTaskSuccessInputFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.output && { output: import_smithy_client5.SENSITIVE_STRING } + }), "SendTaskSuccessInputFilterSensitiveLog"); + var StartExecutionInputFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.input && { input: import_smithy_client5.SENSITIVE_STRING } + }), "StartExecutionInputFilterSensitiveLog"); + var StartSyncExecutionInputFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.input && { input: import_smithy_client5.SENSITIVE_STRING } + }), "StartSyncExecutionInputFilterSensitiveLog"); + var StartSyncExecutionOutputFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.error && { error: import_smithy_client5.SENSITIVE_STRING }, + ...obj.cause && { cause: import_smithy_client5.SENSITIVE_STRING }, + ...obj.input && { input: import_smithy_client5.SENSITIVE_STRING }, + ...obj.output && { output: import_smithy_client5.SENSITIVE_STRING } + }), "StartSyncExecutionOutputFilterSensitiveLog"); + var StopExecutionInputFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.error && { error: import_smithy_client5.SENSITIVE_STRING }, + ...obj.cause && { cause: import_smithy_client5.SENSITIVE_STRING } + }), "StopExecutionInputFilterSensitiveLog"); + var TestStateInputFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.definition && { definition: import_smithy_client5.SENSITIVE_STRING }, + ...obj.input && { input: import_smithy_client5.SENSITIVE_STRING } + }), "TestStateInputFilterSensitiveLog"); + var InspectionDataFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.input && { input: import_smithy_client5.SENSITIVE_STRING }, + ...obj.afterInputPath && { afterInputPath: import_smithy_client5.SENSITIVE_STRING }, + ...obj.afterParameters && { afterParameters: import_smithy_client5.SENSITIVE_STRING }, + ...obj.result && { result: import_smithy_client5.SENSITIVE_STRING }, + ...obj.afterResultSelector && { afterResultSelector: import_smithy_client5.SENSITIVE_STRING }, + ...obj.afterResultPath && { afterResultPath: import_smithy_client5.SENSITIVE_STRING } + }), "InspectionDataFilterSensitiveLog"); + var TestStateOutputFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.output && { output: import_smithy_client5.SENSITIVE_STRING }, + ...obj.error && { error: import_smithy_client5.SENSITIVE_STRING }, + ...obj.cause && { cause: import_smithy_client5.SENSITIVE_STRING }, + ...obj.inspectionData && { inspectionData: import_smithy_client5.SENSITIVE_STRING } + }), "TestStateOutputFilterSensitiveLog"); + var UpdateStateMachineInputFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.definition && { definition: import_smithy_client5.SENSITIVE_STRING }, + ...obj.versionDescription && { versionDescription: import_smithy_client5.SENSITIVE_STRING } + }), "UpdateStateMachineInputFilterSensitiveLog"); + var UpdateStateMachineAliasInputFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.description && { description: import_smithy_client5.SENSITIVE_STRING } + }), "UpdateStateMachineAliasInputFilterSensitiveLog"); + var ValidateStateMachineDefinitionInputFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.definition && { definition: import_smithy_client5.SENSITIVE_STRING } + }), "ValidateStateMachineDefinitionInputFilterSensitiveLog"); + var se_CreateActivityCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = sharedHeaders("CreateActivity"); + let body; + body = JSON.stringify((0, import_smithy_client5._json)(input)); + return buildHttpRpcRequest(context, headers, "/", void 0, body); + }, "se_CreateActivityCommand"); + var se_CreateStateMachineCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = sharedHeaders("CreateStateMachine"); + let body; + body = JSON.stringify((0, import_smithy_client5._json)(input)); + return buildHttpRpcRequest(context, headers, "/", void 0, body); + }, "se_CreateStateMachineCommand"); + var se_CreateStateMachineAliasCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = sharedHeaders("CreateStateMachineAlias"); + let body; + body = JSON.stringify((0, import_smithy_client5._json)(input)); + return buildHttpRpcRequest(context, headers, "/", void 0, body); + }, "se_CreateStateMachineAliasCommand"); + var se_DeleteActivityCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = sharedHeaders("DeleteActivity"); + let body; + body = JSON.stringify((0, import_smithy_client5._json)(input)); + return buildHttpRpcRequest(context, headers, "/", void 0, body); + }, "se_DeleteActivityCommand"); + var se_DeleteStateMachineCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = sharedHeaders("DeleteStateMachine"); + let body; + body = JSON.stringify((0, import_smithy_client5._json)(input)); + return buildHttpRpcRequest(context, headers, "/", void 0, body); + }, "se_DeleteStateMachineCommand"); + var se_DeleteStateMachineAliasCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = sharedHeaders("DeleteStateMachineAlias"); + let body; + body = JSON.stringify((0, import_smithy_client5._json)(input)); + return buildHttpRpcRequest(context, headers, "/", void 0, body); + }, "se_DeleteStateMachineAliasCommand"); + var se_DeleteStateMachineVersionCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = sharedHeaders("DeleteStateMachineVersion"); + let body; + body = JSON.stringify((0, import_smithy_client5._json)(input)); + return buildHttpRpcRequest(context, headers, "/", void 0, body); + }, "se_DeleteStateMachineVersionCommand"); + var se_DescribeActivityCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = sharedHeaders("DescribeActivity"); + let body; + body = JSON.stringify((0, import_smithy_client5._json)(input)); + return buildHttpRpcRequest(context, headers, "/", void 0, body); + }, "se_DescribeActivityCommand"); + var se_DescribeExecutionCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = sharedHeaders("DescribeExecution"); + let body; + body = JSON.stringify((0, import_smithy_client5._json)(input)); + return buildHttpRpcRequest(context, headers, "/", void 0, body); + }, "se_DescribeExecutionCommand"); + var se_DescribeMapRunCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = sharedHeaders("DescribeMapRun"); + let body; + body = JSON.stringify((0, import_smithy_client5._json)(input)); + return buildHttpRpcRequest(context, headers, "/", void 0, body); + }, "se_DescribeMapRunCommand"); + var se_DescribeStateMachineCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = sharedHeaders("DescribeStateMachine"); + let body; + body = JSON.stringify((0, import_smithy_client5._json)(input)); + return buildHttpRpcRequest(context, headers, "/", void 0, body); + }, "se_DescribeStateMachineCommand"); + var se_DescribeStateMachineAliasCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = sharedHeaders("DescribeStateMachineAlias"); + let body; + body = JSON.stringify((0, import_smithy_client5._json)(input)); + return buildHttpRpcRequest(context, headers, "/", void 0, body); + }, "se_DescribeStateMachineAliasCommand"); + var se_DescribeStateMachineForExecutionCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = sharedHeaders("DescribeStateMachineForExecution"); + let body; + body = JSON.stringify((0, import_smithy_client5._json)(input)); + return buildHttpRpcRequest(context, headers, "/", void 0, body); + }, "se_DescribeStateMachineForExecutionCommand"); + var se_GetActivityTaskCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = sharedHeaders("GetActivityTask"); + let body; + body = JSON.stringify((0, import_smithy_client5._json)(input)); + return buildHttpRpcRequest(context, headers, "/", void 0, body); + }, "se_GetActivityTaskCommand"); + var se_GetExecutionHistoryCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = sharedHeaders("GetExecutionHistory"); + let body; + body = JSON.stringify((0, import_smithy_client5._json)(input)); + return buildHttpRpcRequest(context, headers, "/", void 0, body); + }, "se_GetExecutionHistoryCommand"); + var se_ListActivitiesCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = sharedHeaders("ListActivities"); + let body; + body = JSON.stringify((0, import_smithy_client5._json)(input)); + return buildHttpRpcRequest(context, headers, "/", void 0, body); + }, "se_ListActivitiesCommand"); + var se_ListExecutionsCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = sharedHeaders("ListExecutions"); + let body; + body = JSON.stringify((0, import_smithy_client5._json)(input)); + return buildHttpRpcRequest(context, headers, "/", void 0, body); + }, "se_ListExecutionsCommand"); + var se_ListMapRunsCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = sharedHeaders("ListMapRuns"); + let body; + body = JSON.stringify((0, import_smithy_client5._json)(input)); + return buildHttpRpcRequest(context, headers, "/", void 0, body); + }, "se_ListMapRunsCommand"); + var se_ListStateMachineAliasesCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = sharedHeaders("ListStateMachineAliases"); + let body; + body = JSON.stringify((0, import_smithy_client5._json)(input)); + return buildHttpRpcRequest(context, headers, "/", void 0, body); + }, "se_ListStateMachineAliasesCommand"); + var se_ListStateMachinesCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = sharedHeaders("ListStateMachines"); + let body; + body = JSON.stringify((0, import_smithy_client5._json)(input)); + return buildHttpRpcRequest(context, headers, "/", void 0, body); + }, "se_ListStateMachinesCommand"); + var se_ListStateMachineVersionsCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = sharedHeaders("ListStateMachineVersions"); + let body; + body = JSON.stringify((0, import_smithy_client5._json)(input)); + return buildHttpRpcRequest(context, headers, "/", void 0, body); + }, "se_ListStateMachineVersionsCommand"); + var se_ListTagsForResourceCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = sharedHeaders("ListTagsForResource"); + let body; + body = JSON.stringify((0, import_smithy_client5._json)(input)); + return buildHttpRpcRequest(context, headers, "/", void 0, body); + }, "se_ListTagsForResourceCommand"); + var se_PublishStateMachineVersionCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = sharedHeaders("PublishStateMachineVersion"); + let body; + body = JSON.stringify((0, import_smithy_client5._json)(input)); + return buildHttpRpcRequest(context, headers, "/", void 0, body); + }, "se_PublishStateMachineVersionCommand"); + var se_RedriveExecutionCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = sharedHeaders("RedriveExecution"); + let body; + body = JSON.stringify(se_RedriveExecutionInput(input, context)); + return buildHttpRpcRequest(context, headers, "/", void 0, body); + }, "se_RedriveExecutionCommand"); + var se_SendTaskFailureCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = sharedHeaders("SendTaskFailure"); + let body; + body = JSON.stringify((0, import_smithy_client5._json)(input)); + return buildHttpRpcRequest(context, headers, "/", void 0, body); + }, "se_SendTaskFailureCommand"); + var se_SendTaskHeartbeatCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = sharedHeaders("SendTaskHeartbeat"); + let body; + body = JSON.stringify((0, import_smithy_client5._json)(input)); + return buildHttpRpcRequest(context, headers, "/", void 0, body); + }, "se_SendTaskHeartbeatCommand"); + var se_SendTaskSuccessCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = sharedHeaders("SendTaskSuccess"); + let body; + body = JSON.stringify((0, import_smithy_client5._json)(input)); + return buildHttpRpcRequest(context, headers, "/", void 0, body); + }, "se_SendTaskSuccessCommand"); + var se_StartExecutionCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = sharedHeaders("StartExecution"); + let body; + body = JSON.stringify((0, import_smithy_client5._json)(input)); + return buildHttpRpcRequest(context, headers, "/", void 0, body); + }, "se_StartExecutionCommand"); + var se_StartSyncExecutionCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = sharedHeaders("StartSyncExecution"); + let body; + body = JSON.stringify((0, import_smithy_client5._json)(input)); + let { hostname: resolvedHostname } = await context.endpoint(); + if (context.disableHostPrefix !== true) { + resolvedHostname = "sync-" + resolvedHostname; + if (!(0, import_protocol_http8.isValidHostname)(resolvedHostname)) { + throw new Error("ValidationError: prefixed hostname must be hostname compatible."); + } } - }; - exports2.SendTaskSuccessCommand = SendTaskSuccessCommand; - } -}); - -// ../../../node_modules/@aws-sdk/client-sfn/dist-cjs/commands/StartExecutionCommand.js -var require_StartExecutionCommand = __commonJS({ - "../../../node_modules/@aws-sdk/client-sfn/dist-cjs/commands/StartExecutionCommand.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.StartExecutionCommand = exports2.$Command = void 0; - var middleware_endpoint_1 = require_dist_cjs26(); - var middleware_serde_1 = require_dist_cjs25(); - var smithy_client_1 = require_dist_cjs34(); - Object.defineProperty(exports2, "$Command", { enumerable: true, get: function() { - return smithy_client_1.Command; - } }); - var types_1 = require_dist_cjs(); - var models_0_1 = require_models_03(); - var Aws_json1_0_1 = require_Aws_json1_0(); - var StartExecutionCommand = class _StartExecutionCommand extends smithy_client_1.Command { - static getEndpointParameterInstructions() { - return { - UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, - Endpoint: { type: "builtInParams", name: "endpoint" }, - Region: { type: "builtInParams", name: "region" }, - UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" } - }; + return buildHttpRpcRequest(context, headers, "/", resolvedHostname, body); + }, "se_StartSyncExecutionCommand"); + var se_StopExecutionCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = sharedHeaders("StopExecution"); + let body; + body = JSON.stringify((0, import_smithy_client5._json)(input)); + return buildHttpRpcRequest(context, headers, "/", void 0, body); + }, "se_StopExecutionCommand"); + var se_TagResourceCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = sharedHeaders("TagResource"); + let body; + body = JSON.stringify((0, import_smithy_client5._json)(input)); + return buildHttpRpcRequest(context, headers, "/", void 0, body); + }, "se_TagResourceCommand"); + var se_TestStateCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = sharedHeaders("TestState"); + let body; + body = JSON.stringify((0, import_smithy_client5._json)(input)); + let { hostname: resolvedHostname } = await context.endpoint(); + if (context.disableHostPrefix !== true) { + resolvedHostname = "sync-" + resolvedHostname; + if (!(0, import_protocol_http8.isValidHostname)(resolvedHostname)) { + throw new Error("ValidationError: prefixed hostname must be hostname compatible."); + } } - constructor(input) { - super(); - this.input = input; + return buildHttpRpcRequest(context, headers, "/", resolvedHostname, body); + }, "se_TestStateCommand"); + var se_UntagResourceCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = sharedHeaders("UntagResource"); + let body; + body = JSON.stringify((0, import_smithy_client5._json)(input)); + return buildHttpRpcRequest(context, headers, "/", void 0, body); + }, "se_UntagResourceCommand"); + var se_UpdateMapRunCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = sharedHeaders("UpdateMapRun"); + let body; + body = JSON.stringify(se_UpdateMapRunInput(input, context)); + return buildHttpRpcRequest(context, headers, "/", void 0, body); + }, "se_UpdateMapRunCommand"); + var se_UpdateStateMachineCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = sharedHeaders("UpdateStateMachine"); + let body; + body = JSON.stringify((0, import_smithy_client5._json)(input)); + return buildHttpRpcRequest(context, headers, "/", void 0, body); + }, "se_UpdateStateMachineCommand"); + var se_UpdateStateMachineAliasCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = sharedHeaders("UpdateStateMachineAlias"); + let body; + body = JSON.stringify((0, import_smithy_client5._json)(input)); + return buildHttpRpcRequest(context, headers, "/", void 0, body); + }, "se_UpdateStateMachineAliasCommand"); + var se_ValidateStateMachineDefinitionCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = sharedHeaders("ValidateStateMachineDefinition"); + let body; + body = JSON.stringify((0, import_smithy_client5._json)(input)); + return buildHttpRpcRequest(context, headers, "/", void 0, body); + }, "se_ValidateStateMachineDefinitionCommand"); + var de_CreateActivityCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); } - resolveMiddleware(clientStack, configuration, options) { - this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, _StartExecutionCommand.getEndpointParameterInstructions())); - const stack = clientStack.concat(this.middlewareStack); - const { logger } = configuration; - const clientName = "SFNClient"; - const commandName = "StartExecutionCommand"; - const handlerExecutionContext = { - logger, - clientName, - commandName, - inputFilterSensitiveLog: models_0_1.StartExecutionInputFilterSensitiveLog, - outputFilterSensitiveLog: (_) => _, - [types_1.SMITHY_CONTEXT_KEY]: { - service: "AWSStepFunctions", - operation: "StartExecution" - } - }; - const { requestHandler } = configuration; - return stack.resolve((request2) => requestHandler.handle(request2.request, options || {}), handlerExecutionContext); + const data = await (0, import_core22.parseJsonBody)(output.body, context); + let contents = {}; + contents = de_CreateActivityOutput(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; + }, "de_CreateActivityCommand"); + var de_CreateStateMachineCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); } - serialize(input, context) { - return (0, Aws_json1_0_1.se_StartExecutionCommand)(input, context); + const data = await (0, import_core22.parseJsonBody)(output.body, context); + let contents = {}; + contents = de_CreateStateMachineOutput(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; + }, "de_CreateStateMachineCommand"); + var de_CreateStateMachineAliasCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); } - deserialize(output, context) { - return (0, Aws_json1_0_1.de_StartExecutionCommand)(output, context); + const data = await (0, import_core22.parseJsonBody)(output.body, context); + let contents = {}; + contents = de_CreateStateMachineAliasOutput(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; + }, "de_CreateStateMachineAliasCommand"); + var de_DeleteActivityCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); } - }; - exports2.StartExecutionCommand = StartExecutionCommand; - } -}); - -// ../../../node_modules/@aws-sdk/client-sfn/dist-cjs/commands/StartSyncExecutionCommand.js -var require_StartSyncExecutionCommand = __commonJS({ - "../../../node_modules/@aws-sdk/client-sfn/dist-cjs/commands/StartSyncExecutionCommand.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.StartSyncExecutionCommand = exports2.$Command = void 0; - var middleware_endpoint_1 = require_dist_cjs26(); - var middleware_serde_1 = require_dist_cjs25(); - var smithy_client_1 = require_dist_cjs34(); - Object.defineProperty(exports2, "$Command", { enumerable: true, get: function() { - return smithy_client_1.Command; - } }); - var types_1 = require_dist_cjs(); - var models_0_1 = require_models_03(); - var Aws_json1_0_1 = require_Aws_json1_0(); - var StartSyncExecutionCommand = class _StartSyncExecutionCommand extends smithy_client_1.Command { - static getEndpointParameterInstructions() { - return { - UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, - Endpoint: { type: "builtInParams", name: "endpoint" }, - Region: { type: "builtInParams", name: "region" }, - UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" } - }; + const data = await (0, import_core22.parseJsonBody)(output.body, context); + let contents = {}; + contents = (0, import_smithy_client5._json)(data); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; + }, "de_DeleteActivityCommand"); + var de_DeleteStateMachineCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); } - constructor(input) { - super(); - this.input = input; + const data = await (0, import_core22.parseJsonBody)(output.body, context); + let contents = {}; + contents = (0, import_smithy_client5._json)(data); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; + }, "de_DeleteStateMachineCommand"); + var de_DeleteStateMachineAliasCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); } - resolveMiddleware(clientStack, configuration, options) { - this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, _StartSyncExecutionCommand.getEndpointParameterInstructions())); - const stack = clientStack.concat(this.middlewareStack); - const { logger } = configuration; - const clientName = "SFNClient"; - const commandName = "StartSyncExecutionCommand"; - const handlerExecutionContext = { - logger, - clientName, - commandName, - inputFilterSensitiveLog: models_0_1.StartSyncExecutionInputFilterSensitiveLog, - outputFilterSensitiveLog: models_0_1.StartSyncExecutionOutputFilterSensitiveLog, - [types_1.SMITHY_CONTEXT_KEY]: { - service: "AWSStepFunctions", - operation: "StartSyncExecution" - } - }; - const { requestHandler } = configuration; - return stack.resolve((request2) => requestHandler.handle(request2.request, options || {}), handlerExecutionContext); + const data = await (0, import_core22.parseJsonBody)(output.body, context); + let contents = {}; + contents = (0, import_smithy_client5._json)(data); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; + }, "de_DeleteStateMachineAliasCommand"); + var de_DeleteStateMachineVersionCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); } - serialize(input, context) { - return (0, Aws_json1_0_1.se_StartSyncExecutionCommand)(input, context); + const data = await (0, import_core22.parseJsonBody)(output.body, context); + let contents = {}; + contents = (0, import_smithy_client5._json)(data); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; + }, "de_DeleteStateMachineVersionCommand"); + var de_DescribeActivityCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); } - deserialize(output, context) { - return (0, Aws_json1_0_1.de_StartSyncExecutionCommand)(output, context); + const data = await (0, import_core22.parseJsonBody)(output.body, context); + let contents = {}; + contents = de_DescribeActivityOutput(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; + }, "de_DescribeActivityCommand"); + var de_DescribeExecutionCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); } - }; - exports2.StartSyncExecutionCommand = StartSyncExecutionCommand; - } -}); - -// ../../../node_modules/@aws-sdk/client-sfn/dist-cjs/commands/StopExecutionCommand.js -var require_StopExecutionCommand = __commonJS({ - "../../../node_modules/@aws-sdk/client-sfn/dist-cjs/commands/StopExecutionCommand.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.StopExecutionCommand = exports2.$Command = void 0; - var middleware_endpoint_1 = require_dist_cjs26(); - var middleware_serde_1 = require_dist_cjs25(); - var smithy_client_1 = require_dist_cjs34(); - Object.defineProperty(exports2, "$Command", { enumerable: true, get: function() { - return smithy_client_1.Command; - } }); - var types_1 = require_dist_cjs(); - var models_0_1 = require_models_03(); - var Aws_json1_0_1 = require_Aws_json1_0(); - var StopExecutionCommand = class _StopExecutionCommand extends smithy_client_1.Command { - static getEndpointParameterInstructions() { - return { - UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, - Endpoint: { type: "builtInParams", name: "endpoint" }, - Region: { type: "builtInParams", name: "region" }, - UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" } - }; + const data = await (0, import_core22.parseJsonBody)(output.body, context); + let contents = {}; + contents = de_DescribeExecutionOutput(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; + }, "de_DescribeExecutionCommand"); + var de_DescribeMapRunCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); } - constructor(input) { - super(); - this.input = input; + const data = await (0, import_core22.parseJsonBody)(output.body, context); + let contents = {}; + contents = de_DescribeMapRunOutput(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; + }, "de_DescribeMapRunCommand"); + var de_DescribeStateMachineCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); } - resolveMiddleware(clientStack, configuration, options) { - this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, _StopExecutionCommand.getEndpointParameterInstructions())); - const stack = clientStack.concat(this.middlewareStack); - const { logger } = configuration; - const clientName = "SFNClient"; - const commandName = "StopExecutionCommand"; - const handlerExecutionContext = { - logger, - clientName, - commandName, - inputFilterSensitiveLog: models_0_1.StopExecutionInputFilterSensitiveLog, - outputFilterSensitiveLog: (_) => _, - [types_1.SMITHY_CONTEXT_KEY]: { - service: "AWSStepFunctions", - operation: "StopExecution" - } - }; - const { requestHandler } = configuration; - return stack.resolve((request2) => requestHandler.handle(request2.request, options || {}), handlerExecutionContext); + const data = await (0, import_core22.parseJsonBody)(output.body, context); + let contents = {}; + contents = de_DescribeStateMachineOutput(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; + }, "de_DescribeStateMachineCommand"); + var de_DescribeStateMachineAliasCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); } - serialize(input, context) { - return (0, Aws_json1_0_1.se_StopExecutionCommand)(input, context); + const data = await (0, import_core22.parseJsonBody)(output.body, context); + let contents = {}; + contents = de_DescribeStateMachineAliasOutput(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; + }, "de_DescribeStateMachineAliasCommand"); + var de_DescribeStateMachineForExecutionCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); } - deserialize(output, context) { - return (0, Aws_json1_0_1.de_StopExecutionCommand)(output, context); + const data = await (0, import_core22.parseJsonBody)(output.body, context); + let contents = {}; + contents = de_DescribeStateMachineForExecutionOutput(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; + }, "de_DescribeStateMachineForExecutionCommand"); + var de_GetActivityTaskCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); } - }; - exports2.StopExecutionCommand = StopExecutionCommand; - } -}); - -// ../../../node_modules/@aws-sdk/client-sfn/dist-cjs/commands/TagResourceCommand.js -var require_TagResourceCommand = __commonJS({ - "../../../node_modules/@aws-sdk/client-sfn/dist-cjs/commands/TagResourceCommand.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.TagResourceCommand = exports2.$Command = void 0; - var middleware_endpoint_1 = require_dist_cjs26(); - var middleware_serde_1 = require_dist_cjs25(); - var smithy_client_1 = require_dist_cjs34(); - Object.defineProperty(exports2, "$Command", { enumerable: true, get: function() { - return smithy_client_1.Command; - } }); - var types_1 = require_dist_cjs(); - var Aws_json1_0_1 = require_Aws_json1_0(); - var TagResourceCommand = class _TagResourceCommand extends smithy_client_1.Command { - static getEndpointParameterInstructions() { - return { - UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, - Endpoint: { type: "builtInParams", name: "endpoint" }, - Region: { type: "builtInParams", name: "region" }, - UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" } - }; + const data = await (0, import_core22.parseJsonBody)(output.body, context); + let contents = {}; + contents = (0, import_smithy_client5._json)(data); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; + }, "de_GetActivityTaskCommand"); + var de_GetExecutionHistoryCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); } - constructor(input) { - super(); - this.input = input; + const data = await (0, import_core22.parseJsonBody)(output.body, context); + let contents = {}; + contents = de_GetExecutionHistoryOutput(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; + }, "de_GetExecutionHistoryCommand"); + var de_ListActivitiesCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); } - resolveMiddleware(clientStack, configuration, options) { - this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, _TagResourceCommand.getEndpointParameterInstructions())); - const stack = clientStack.concat(this.middlewareStack); - const { logger } = configuration; - const clientName = "SFNClient"; - const commandName = "TagResourceCommand"; - const handlerExecutionContext = { - logger, - clientName, - commandName, - inputFilterSensitiveLog: (_) => _, - outputFilterSensitiveLog: (_) => _, - [types_1.SMITHY_CONTEXT_KEY]: { - service: "AWSStepFunctions", - operation: "TagResource" - } - }; - const { requestHandler } = configuration; - return stack.resolve((request2) => requestHandler.handle(request2.request, options || {}), handlerExecutionContext); + const data = await (0, import_core22.parseJsonBody)(output.body, context); + let contents = {}; + contents = de_ListActivitiesOutput(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; + }, "de_ListActivitiesCommand"); + var de_ListExecutionsCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); } - serialize(input, context) { - return (0, Aws_json1_0_1.se_TagResourceCommand)(input, context); + const data = await (0, import_core22.parseJsonBody)(output.body, context); + let contents = {}; + contents = de_ListExecutionsOutput(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; + }, "de_ListExecutionsCommand"); + var de_ListMapRunsCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); } - deserialize(output, context) { - return (0, Aws_json1_0_1.de_TagResourceCommand)(output, context); + const data = await (0, import_core22.parseJsonBody)(output.body, context); + let contents = {}; + contents = de_ListMapRunsOutput(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; + }, "de_ListMapRunsCommand"); + var de_ListStateMachineAliasesCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); } - }; - exports2.TagResourceCommand = TagResourceCommand; - } -}); - -// ../../../node_modules/@aws-sdk/client-sfn/dist-cjs/commands/UntagResourceCommand.js -var require_UntagResourceCommand = __commonJS({ - "../../../node_modules/@aws-sdk/client-sfn/dist-cjs/commands/UntagResourceCommand.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.UntagResourceCommand = exports2.$Command = void 0; - var middleware_endpoint_1 = require_dist_cjs26(); - var middleware_serde_1 = require_dist_cjs25(); - var smithy_client_1 = require_dist_cjs34(); - Object.defineProperty(exports2, "$Command", { enumerable: true, get: function() { - return smithy_client_1.Command; - } }); - var types_1 = require_dist_cjs(); - var Aws_json1_0_1 = require_Aws_json1_0(); - var UntagResourceCommand = class _UntagResourceCommand extends smithy_client_1.Command { - static getEndpointParameterInstructions() { - return { - UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, - Endpoint: { type: "builtInParams", name: "endpoint" }, - Region: { type: "builtInParams", name: "region" }, - UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" } - }; + const data = await (0, import_core22.parseJsonBody)(output.body, context); + let contents = {}; + contents = de_ListStateMachineAliasesOutput(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; + }, "de_ListStateMachineAliasesCommand"); + var de_ListStateMachinesCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); } - constructor(input) { - super(); - this.input = input; + const data = await (0, import_core22.parseJsonBody)(output.body, context); + let contents = {}; + contents = de_ListStateMachinesOutput(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; + }, "de_ListStateMachinesCommand"); + var de_ListStateMachineVersionsCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); } - resolveMiddleware(clientStack, configuration, options) { - this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, _UntagResourceCommand.getEndpointParameterInstructions())); - const stack = clientStack.concat(this.middlewareStack); - const { logger } = configuration; - const clientName = "SFNClient"; - const commandName = "UntagResourceCommand"; - const handlerExecutionContext = { - logger, - clientName, - commandName, - inputFilterSensitiveLog: (_) => _, - outputFilterSensitiveLog: (_) => _, - [types_1.SMITHY_CONTEXT_KEY]: { - service: "AWSStepFunctions", - operation: "UntagResource" - } - }; - const { requestHandler } = configuration; - return stack.resolve((request2) => requestHandler.handle(request2.request, options || {}), handlerExecutionContext); + const data = await (0, import_core22.parseJsonBody)(output.body, context); + let contents = {}; + contents = de_ListStateMachineVersionsOutput(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; + }, "de_ListStateMachineVersionsCommand"); + var de_ListTagsForResourceCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); } - serialize(input, context) { - return (0, Aws_json1_0_1.se_UntagResourceCommand)(input, context); + const data = await (0, import_core22.parseJsonBody)(output.body, context); + let contents = {}; + contents = (0, import_smithy_client5._json)(data); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; + }, "de_ListTagsForResourceCommand"); + var de_PublishStateMachineVersionCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); } - deserialize(output, context) { - return (0, Aws_json1_0_1.de_UntagResourceCommand)(output, context); + const data = await (0, import_core22.parseJsonBody)(output.body, context); + let contents = {}; + contents = de_PublishStateMachineVersionOutput(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; + }, "de_PublishStateMachineVersionCommand"); + var de_RedriveExecutionCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); } - }; - exports2.UntagResourceCommand = UntagResourceCommand; - } -}); - -// ../../../node_modules/@aws-sdk/client-sfn/dist-cjs/commands/UpdateMapRunCommand.js -var require_UpdateMapRunCommand = __commonJS({ - "../../../node_modules/@aws-sdk/client-sfn/dist-cjs/commands/UpdateMapRunCommand.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.UpdateMapRunCommand = exports2.$Command = void 0; - var middleware_endpoint_1 = require_dist_cjs26(); - var middleware_serde_1 = require_dist_cjs25(); - var smithy_client_1 = require_dist_cjs34(); - Object.defineProperty(exports2, "$Command", { enumerable: true, get: function() { - return smithy_client_1.Command; - } }); - var types_1 = require_dist_cjs(); - var Aws_json1_0_1 = require_Aws_json1_0(); - var UpdateMapRunCommand = class _UpdateMapRunCommand extends smithy_client_1.Command { - static getEndpointParameterInstructions() { - return { - UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, - Endpoint: { type: "builtInParams", name: "endpoint" }, - Region: { type: "builtInParams", name: "region" }, - UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" } - }; + const data = await (0, import_core22.parseJsonBody)(output.body, context); + let contents = {}; + contents = de_RedriveExecutionOutput(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; + }, "de_RedriveExecutionCommand"); + var de_SendTaskFailureCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); } - constructor(input) { - super(); - this.input = input; + const data = await (0, import_core22.parseJsonBody)(output.body, context); + let contents = {}; + contents = (0, import_smithy_client5._json)(data); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; + }, "de_SendTaskFailureCommand"); + var de_SendTaskHeartbeatCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); } - resolveMiddleware(clientStack, configuration, options) { - this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, _UpdateMapRunCommand.getEndpointParameterInstructions())); - const stack = clientStack.concat(this.middlewareStack); - const { logger } = configuration; - const clientName = "SFNClient"; - const commandName = "UpdateMapRunCommand"; - const handlerExecutionContext = { - logger, - clientName, - commandName, - inputFilterSensitiveLog: (_) => _, - outputFilterSensitiveLog: (_) => _, - [types_1.SMITHY_CONTEXT_KEY]: { - service: "AWSStepFunctions", - operation: "UpdateMapRun" - } - }; - const { requestHandler } = configuration; - return stack.resolve((request2) => requestHandler.handle(request2.request, options || {}), handlerExecutionContext); + const data = await (0, import_core22.parseJsonBody)(output.body, context); + let contents = {}; + contents = (0, import_smithy_client5._json)(data); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; + }, "de_SendTaskHeartbeatCommand"); + var de_SendTaskSuccessCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); } - serialize(input, context) { - return (0, Aws_json1_0_1.se_UpdateMapRunCommand)(input, context); + const data = await (0, import_core22.parseJsonBody)(output.body, context); + let contents = {}; + contents = (0, import_smithy_client5._json)(data); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; + }, "de_SendTaskSuccessCommand"); + var de_StartExecutionCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); } - deserialize(output, context) { - return (0, Aws_json1_0_1.de_UpdateMapRunCommand)(output, context); + const data = await (0, import_core22.parseJsonBody)(output.body, context); + let contents = {}; + contents = de_StartExecutionOutput(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; + }, "de_StartExecutionCommand"); + var de_StartSyncExecutionCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); } - }; - exports2.UpdateMapRunCommand = UpdateMapRunCommand; - } -}); - -// ../../../node_modules/@aws-sdk/client-sfn/dist-cjs/commands/UpdateStateMachineAliasCommand.js -var require_UpdateStateMachineAliasCommand = __commonJS({ - "../../../node_modules/@aws-sdk/client-sfn/dist-cjs/commands/UpdateStateMachineAliasCommand.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.UpdateStateMachineAliasCommand = exports2.$Command = void 0; - var middleware_endpoint_1 = require_dist_cjs26(); - var middleware_serde_1 = require_dist_cjs25(); - var smithy_client_1 = require_dist_cjs34(); - Object.defineProperty(exports2, "$Command", { enumerable: true, get: function() { - return smithy_client_1.Command; - } }); - var types_1 = require_dist_cjs(); - var models_0_1 = require_models_03(); - var Aws_json1_0_1 = require_Aws_json1_0(); - var UpdateStateMachineAliasCommand = class _UpdateStateMachineAliasCommand extends smithy_client_1.Command { - static getEndpointParameterInstructions() { - return { - UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, - Endpoint: { type: "builtInParams", name: "endpoint" }, - Region: { type: "builtInParams", name: "region" }, - UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" } - }; + const data = await (0, import_core22.parseJsonBody)(output.body, context); + let contents = {}; + contents = de_StartSyncExecutionOutput(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; + }, "de_StartSyncExecutionCommand"); + var de_StopExecutionCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); } - constructor(input) { - super(); - this.input = input; + const data = await (0, import_core22.parseJsonBody)(output.body, context); + let contents = {}; + contents = de_StopExecutionOutput(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; + }, "de_StopExecutionCommand"); + var de_TagResourceCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); } - resolveMiddleware(clientStack, configuration, options) { - this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, _UpdateStateMachineAliasCommand.getEndpointParameterInstructions())); - const stack = clientStack.concat(this.middlewareStack); - const { logger } = configuration; - const clientName = "SFNClient"; - const commandName = "UpdateStateMachineAliasCommand"; - const handlerExecutionContext = { - logger, - clientName, - commandName, - inputFilterSensitiveLog: models_0_1.UpdateStateMachineAliasInputFilterSensitiveLog, - outputFilterSensitiveLog: (_) => _, - [types_1.SMITHY_CONTEXT_KEY]: { - service: "AWSStepFunctions", - operation: "UpdateStateMachineAlias" - } - }; - const { requestHandler } = configuration; - return stack.resolve((request2) => requestHandler.handle(request2.request, options || {}), handlerExecutionContext); + const data = await (0, import_core22.parseJsonBody)(output.body, context); + let contents = {}; + contents = (0, import_smithy_client5._json)(data); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; + }, "de_TagResourceCommand"); + var de_TestStateCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); } - serialize(input, context) { - return (0, Aws_json1_0_1.se_UpdateStateMachineAliasCommand)(input, context); + const data = await (0, import_core22.parseJsonBody)(output.body, context); + let contents = {}; + contents = (0, import_smithy_client5._json)(data); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; + }, "de_TestStateCommand"); + var de_UntagResourceCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); } - deserialize(output, context) { - return (0, Aws_json1_0_1.de_UpdateStateMachineAliasCommand)(output, context); + const data = await (0, import_core22.parseJsonBody)(output.body, context); + let contents = {}; + contents = (0, import_smithy_client5._json)(data); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; + }, "de_UntagResourceCommand"); + var de_UpdateMapRunCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); } - }; - exports2.UpdateStateMachineAliasCommand = UpdateStateMachineAliasCommand; - } -}); - -// ../../../node_modules/@aws-sdk/client-sfn/dist-cjs/commands/UpdateStateMachineCommand.js -var require_UpdateStateMachineCommand = __commonJS({ - "../../../node_modules/@aws-sdk/client-sfn/dist-cjs/commands/UpdateStateMachineCommand.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.UpdateStateMachineCommand = exports2.$Command = void 0; - var middleware_endpoint_1 = require_dist_cjs26(); - var middleware_serde_1 = require_dist_cjs25(); - var smithy_client_1 = require_dist_cjs34(); - Object.defineProperty(exports2, "$Command", { enumerable: true, get: function() { - return smithy_client_1.Command; - } }); - var types_1 = require_dist_cjs(); - var models_0_1 = require_models_03(); - var Aws_json1_0_1 = require_Aws_json1_0(); - var UpdateStateMachineCommand = class _UpdateStateMachineCommand extends smithy_client_1.Command { - static getEndpointParameterInstructions() { - return { - UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, - Endpoint: { type: "builtInParams", name: "endpoint" }, - Region: { type: "builtInParams", name: "region" }, - UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" } - }; + const data = await (0, import_core22.parseJsonBody)(output.body, context); + let contents = {}; + contents = (0, import_smithy_client5._json)(data); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; + }, "de_UpdateMapRunCommand"); + var de_UpdateStateMachineCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); } - constructor(input) { - super(); - this.input = input; + const data = await (0, import_core22.parseJsonBody)(output.body, context); + let contents = {}; + contents = de_UpdateStateMachineOutput(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; + }, "de_UpdateStateMachineCommand"); + var de_UpdateStateMachineAliasCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); } - resolveMiddleware(clientStack, configuration, options) { - this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, _UpdateStateMachineCommand.getEndpointParameterInstructions())); - const stack = clientStack.concat(this.middlewareStack); - const { logger } = configuration; - const clientName = "SFNClient"; - const commandName = "UpdateStateMachineCommand"; - const handlerExecutionContext = { - logger, - clientName, - commandName, - inputFilterSensitiveLog: models_0_1.UpdateStateMachineInputFilterSensitiveLog, - outputFilterSensitiveLog: (_) => _, - [types_1.SMITHY_CONTEXT_KEY]: { - service: "AWSStepFunctions", - operation: "UpdateStateMachine" - } - }; - const { requestHandler } = configuration; - return stack.resolve((request2) => requestHandler.handle(request2.request, options || {}), handlerExecutionContext); + const data = await (0, import_core22.parseJsonBody)(output.body, context); + let contents = {}; + contents = de_UpdateStateMachineAliasOutput(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; + }, "de_UpdateStateMachineAliasCommand"); + var de_ValidateStateMachineDefinitionCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await (0, import_core22.parseJsonBody)(output.body, context); + let contents = {}; + contents = (0, import_smithy_client5._json)(data); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; + }, "de_ValidateStateMachineDefinitionCommand"); + var de_CommandError = /* @__PURE__ */ __name(async (output, context) => { + const parsedOutput = { + ...output, + body: await (0, import_core22.parseJsonErrorBody)(output.body, context) + }; + const errorCode = (0, import_core22.loadRestJsonErrorCode)(output, parsedOutput.body); + switch (errorCode) { + case "ActivityAlreadyExists": + case "com.amazonaws.sfn#ActivityAlreadyExists": + throw await de_ActivityAlreadyExistsRes(parsedOutput, context); + case "ActivityLimitExceeded": + case "com.amazonaws.sfn#ActivityLimitExceeded": + throw await de_ActivityLimitExceededRes(parsedOutput, context); + case "InvalidEncryptionConfiguration": + case "com.amazonaws.sfn#InvalidEncryptionConfiguration": + throw await de_InvalidEncryptionConfigurationRes(parsedOutput, context); + case "InvalidName": + case "com.amazonaws.sfn#InvalidName": + throw await de_InvalidNameRes(parsedOutput, context); + case "KmsAccessDeniedException": + case "com.amazonaws.sfn#KmsAccessDeniedException": + throw await de_KmsAccessDeniedExceptionRes(parsedOutput, context); + case "KmsThrottlingException": + case "com.amazonaws.sfn#KmsThrottlingException": + throw await de_KmsThrottlingExceptionRes(parsedOutput, context); + case "TooManyTags": + case "com.amazonaws.sfn#TooManyTags": + throw await de_TooManyTagsRes(parsedOutput, context); + case "ConflictException": + case "com.amazonaws.sfn#ConflictException": + throw await de_ConflictExceptionRes(parsedOutput, context); + case "InvalidArn": + case "com.amazonaws.sfn#InvalidArn": + throw await de_InvalidArnRes(parsedOutput, context); + case "InvalidDefinition": + case "com.amazonaws.sfn#InvalidDefinition": + throw await de_InvalidDefinitionRes(parsedOutput, context); + case "InvalidLoggingConfiguration": + case "com.amazonaws.sfn#InvalidLoggingConfiguration": + throw await de_InvalidLoggingConfigurationRes(parsedOutput, context); + case "InvalidTracingConfiguration": + case "com.amazonaws.sfn#InvalidTracingConfiguration": + throw await de_InvalidTracingConfigurationRes(parsedOutput, context); + case "StateMachineAlreadyExists": + case "com.amazonaws.sfn#StateMachineAlreadyExists": + throw await de_StateMachineAlreadyExistsRes(parsedOutput, context); + case "StateMachineDeleting": + case "com.amazonaws.sfn#StateMachineDeleting": + throw await de_StateMachineDeletingRes(parsedOutput, context); + case "StateMachineLimitExceeded": + case "com.amazonaws.sfn#StateMachineLimitExceeded": + throw await de_StateMachineLimitExceededRes(parsedOutput, context); + case "StateMachineTypeNotSupported": + case "com.amazonaws.sfn#StateMachineTypeNotSupported": + throw await de_StateMachineTypeNotSupportedRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.sfn#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + case "ResourceNotFound": + case "com.amazonaws.sfn#ResourceNotFound": + throw await de_ResourceNotFoundRes(parsedOutput, context); + case "ServiceQuotaExceededException": + case "com.amazonaws.sfn#ServiceQuotaExceededException": + throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context); + case "ActivityDoesNotExist": + case "com.amazonaws.sfn#ActivityDoesNotExist": + throw await de_ActivityDoesNotExistRes(parsedOutput, context); + case "ExecutionDoesNotExist": + case "com.amazonaws.sfn#ExecutionDoesNotExist": + throw await de_ExecutionDoesNotExistRes(parsedOutput, context); + case "KmsInvalidStateException": + case "com.amazonaws.sfn#KmsInvalidStateException": + throw await de_KmsInvalidStateExceptionRes(parsedOutput, context); + case "StateMachineDoesNotExist": + case "com.amazonaws.sfn#StateMachineDoesNotExist": + throw await de_StateMachineDoesNotExistRes(parsedOutput, context); + case "ActivityWorkerLimitExceeded": + case "com.amazonaws.sfn#ActivityWorkerLimitExceeded": + throw await de_ActivityWorkerLimitExceededRes(parsedOutput, context); + case "InvalidToken": + case "com.amazonaws.sfn#InvalidToken": + throw await de_InvalidTokenRes(parsedOutput, context); + case "ExecutionLimitExceeded": + case "com.amazonaws.sfn#ExecutionLimitExceeded": + throw await de_ExecutionLimitExceededRes(parsedOutput, context); + case "ExecutionNotRedrivable": + case "com.amazonaws.sfn#ExecutionNotRedrivable": + throw await de_ExecutionNotRedrivableRes(parsedOutput, context); + case "TaskDoesNotExist": + case "com.amazonaws.sfn#TaskDoesNotExist": + throw await de_TaskDoesNotExistRes(parsedOutput, context); + case "TaskTimedOut": + case "com.amazonaws.sfn#TaskTimedOut": + throw await de_TaskTimedOutRes(parsedOutput, context); + case "InvalidOutput": + case "com.amazonaws.sfn#InvalidOutput": + throw await de_InvalidOutputRes(parsedOutput, context); + case "ExecutionAlreadyExists": + case "com.amazonaws.sfn#ExecutionAlreadyExists": + throw await de_ExecutionAlreadyExistsRes(parsedOutput, context); + case "InvalidExecutionInput": + case "com.amazonaws.sfn#InvalidExecutionInput": + throw await de_InvalidExecutionInputRes(parsedOutput, context); + case "MissingRequiredParameter": + case "com.amazonaws.sfn#MissingRequiredParameter": + throw await de_MissingRequiredParameterRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode + }); } - serialize(input, context) { - return (0, Aws_json1_0_1.se_UpdateStateMachineCommand)(input, context); + }, "de_CommandError"); + var de_ActivityAlreadyExistsRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = (0, import_smithy_client5._json)(body); + const exception = new ActivityAlreadyExists({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client5.decorateServiceException)(exception, body); + }, "de_ActivityAlreadyExistsRes"); + var de_ActivityDoesNotExistRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = (0, import_smithy_client5._json)(body); + const exception = new ActivityDoesNotExist({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client5.decorateServiceException)(exception, body); + }, "de_ActivityDoesNotExistRes"); + var de_ActivityLimitExceededRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = (0, import_smithy_client5._json)(body); + const exception = new ActivityLimitExceeded({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client5.decorateServiceException)(exception, body); + }, "de_ActivityLimitExceededRes"); + var de_ActivityWorkerLimitExceededRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = (0, import_smithy_client5._json)(body); + const exception = new ActivityWorkerLimitExceeded({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client5.decorateServiceException)(exception, body); + }, "de_ActivityWorkerLimitExceededRes"); + var de_ConflictExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = (0, import_smithy_client5._json)(body); + const exception = new ConflictException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client5.decorateServiceException)(exception, body); + }, "de_ConflictExceptionRes"); + var de_ExecutionAlreadyExistsRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = (0, import_smithy_client5._json)(body); + const exception = new ExecutionAlreadyExists({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client5.decorateServiceException)(exception, body); + }, "de_ExecutionAlreadyExistsRes"); + var de_ExecutionDoesNotExistRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = (0, import_smithy_client5._json)(body); + const exception = new ExecutionDoesNotExist({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client5.decorateServiceException)(exception, body); + }, "de_ExecutionDoesNotExistRes"); + var de_ExecutionLimitExceededRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = (0, import_smithy_client5._json)(body); + const exception = new ExecutionLimitExceeded({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client5.decorateServiceException)(exception, body); + }, "de_ExecutionLimitExceededRes"); + var de_ExecutionNotRedrivableRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = (0, import_smithy_client5._json)(body); + const exception = new ExecutionNotRedrivable({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client5.decorateServiceException)(exception, body); + }, "de_ExecutionNotRedrivableRes"); + var de_InvalidArnRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = (0, import_smithy_client5._json)(body); + const exception = new InvalidArn({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client5.decorateServiceException)(exception, body); + }, "de_InvalidArnRes"); + var de_InvalidDefinitionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = (0, import_smithy_client5._json)(body); + const exception = new InvalidDefinition({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client5.decorateServiceException)(exception, body); + }, "de_InvalidDefinitionRes"); + var de_InvalidEncryptionConfigurationRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = (0, import_smithy_client5._json)(body); + const exception = new InvalidEncryptionConfiguration({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client5.decorateServiceException)(exception, body); + }, "de_InvalidEncryptionConfigurationRes"); + var de_InvalidExecutionInputRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = (0, import_smithy_client5._json)(body); + const exception = new InvalidExecutionInput({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client5.decorateServiceException)(exception, body); + }, "de_InvalidExecutionInputRes"); + var de_InvalidLoggingConfigurationRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = (0, import_smithy_client5._json)(body); + const exception = new InvalidLoggingConfiguration({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client5.decorateServiceException)(exception, body); + }, "de_InvalidLoggingConfigurationRes"); + var de_InvalidNameRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = (0, import_smithy_client5._json)(body); + const exception = new InvalidName({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client5.decorateServiceException)(exception, body); + }, "de_InvalidNameRes"); + var de_InvalidOutputRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = (0, import_smithy_client5._json)(body); + const exception = new InvalidOutput({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client5.decorateServiceException)(exception, body); + }, "de_InvalidOutputRes"); + var de_InvalidTokenRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = (0, import_smithy_client5._json)(body); + const exception = new InvalidToken({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client5.decorateServiceException)(exception, body); + }, "de_InvalidTokenRes"); + var de_InvalidTracingConfigurationRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = (0, import_smithy_client5._json)(body); + const exception = new InvalidTracingConfiguration({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client5.decorateServiceException)(exception, body); + }, "de_InvalidTracingConfigurationRes"); + var de_KmsAccessDeniedExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = (0, import_smithy_client5._json)(body); + const exception = new KmsAccessDeniedException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client5.decorateServiceException)(exception, body); + }, "de_KmsAccessDeniedExceptionRes"); + var de_KmsInvalidStateExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = (0, import_smithy_client5._json)(body); + const exception = new KmsInvalidStateException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client5.decorateServiceException)(exception, body); + }, "de_KmsInvalidStateExceptionRes"); + var de_KmsThrottlingExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = (0, import_smithy_client5._json)(body); + const exception = new KmsThrottlingException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client5.decorateServiceException)(exception, body); + }, "de_KmsThrottlingExceptionRes"); + var de_MissingRequiredParameterRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = (0, import_smithy_client5._json)(body); + const exception = new MissingRequiredParameter({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client5.decorateServiceException)(exception, body); + }, "de_MissingRequiredParameterRes"); + var de_ResourceNotFoundRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = (0, import_smithy_client5._json)(body); + const exception = new ResourceNotFound({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client5.decorateServiceException)(exception, body); + }, "de_ResourceNotFoundRes"); + var de_ServiceQuotaExceededExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = (0, import_smithy_client5._json)(body); + const exception = new ServiceQuotaExceededException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client5.decorateServiceException)(exception, body); + }, "de_ServiceQuotaExceededExceptionRes"); + var de_StateMachineAlreadyExistsRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = (0, import_smithy_client5._json)(body); + const exception = new StateMachineAlreadyExists({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client5.decorateServiceException)(exception, body); + }, "de_StateMachineAlreadyExistsRes"); + var de_StateMachineDeletingRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = (0, import_smithy_client5._json)(body); + const exception = new StateMachineDeleting({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client5.decorateServiceException)(exception, body); + }, "de_StateMachineDeletingRes"); + var de_StateMachineDoesNotExistRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = (0, import_smithy_client5._json)(body); + const exception = new StateMachineDoesNotExist({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client5.decorateServiceException)(exception, body); + }, "de_StateMachineDoesNotExistRes"); + var de_StateMachineLimitExceededRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = (0, import_smithy_client5._json)(body); + const exception = new StateMachineLimitExceeded({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client5.decorateServiceException)(exception, body); + }, "de_StateMachineLimitExceededRes"); + var de_StateMachineTypeNotSupportedRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = (0, import_smithy_client5._json)(body); + const exception = new StateMachineTypeNotSupported({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client5.decorateServiceException)(exception, body); + }, "de_StateMachineTypeNotSupportedRes"); + var de_TaskDoesNotExistRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = (0, import_smithy_client5._json)(body); + const exception = new TaskDoesNotExist({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client5.decorateServiceException)(exception, body); + }, "de_TaskDoesNotExistRes"); + var de_TaskTimedOutRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = (0, import_smithy_client5._json)(body); + const exception = new TaskTimedOut({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client5.decorateServiceException)(exception, body); + }, "de_TaskTimedOutRes"); + var de_TooManyTagsRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = (0, import_smithy_client5._json)(body); + const exception = new TooManyTags({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client5.decorateServiceException)(exception, body); + }, "de_TooManyTagsRes"); + var de_ValidationExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = (0, import_smithy_client5._json)(body); + const exception = new ValidationException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client5.decorateServiceException)(exception, body); + }, "de_ValidationExceptionRes"); + var se_RedriveExecutionInput = /* @__PURE__ */ __name((input, context) => { + return (0, import_smithy_client5.take)(input, { + clientToken: [true, (_) => _ ?? (0, import_uuid.v4)()], + executionArn: [] + }); + }, "se_RedriveExecutionInput"); + var se_UpdateMapRunInput = /* @__PURE__ */ __name((input, context) => { + return (0, import_smithy_client5.take)(input, { + mapRunArn: [], + maxConcurrency: [], + toleratedFailureCount: [], + toleratedFailurePercentage: import_smithy_client5.serializeFloat + }); + }, "se_UpdateMapRunInput"); + var de_ActivityList = /* @__PURE__ */ __name((output, context) => { + const retVal = (output || []).filter((e) => e != null).map((entry) => { + return de_ActivityListItem(entry, context); + }); + return retVal; + }, "de_ActivityList"); + var de_ActivityListItem = /* @__PURE__ */ __name((output, context) => { + return (0, import_smithy_client5.take)(output, { + activityArn: import_smithy_client5.expectString, + creationDate: (_) => (0, import_smithy_client5.expectNonNull)((0, import_smithy_client5.parseEpochTimestamp)((0, import_smithy_client5.expectNumber)(_))), + name: import_smithy_client5.expectString + }); + }, "de_ActivityListItem"); + var de_CreateActivityOutput = /* @__PURE__ */ __name((output, context) => { + return (0, import_smithy_client5.take)(output, { + activityArn: import_smithy_client5.expectString, + creationDate: (_) => (0, import_smithy_client5.expectNonNull)((0, import_smithy_client5.parseEpochTimestamp)((0, import_smithy_client5.expectNumber)(_))) + }); + }, "de_CreateActivityOutput"); + var de_CreateStateMachineAliasOutput = /* @__PURE__ */ __name((output, context) => { + return (0, import_smithy_client5.take)(output, { + creationDate: (_) => (0, import_smithy_client5.expectNonNull)((0, import_smithy_client5.parseEpochTimestamp)((0, import_smithy_client5.expectNumber)(_))), + stateMachineAliasArn: import_smithy_client5.expectString + }); + }, "de_CreateStateMachineAliasOutput"); + var de_CreateStateMachineOutput = /* @__PURE__ */ __name((output, context) => { + return (0, import_smithy_client5.take)(output, { + creationDate: (_) => (0, import_smithy_client5.expectNonNull)((0, import_smithy_client5.parseEpochTimestamp)((0, import_smithy_client5.expectNumber)(_))), + stateMachineArn: import_smithy_client5.expectString, + stateMachineVersionArn: import_smithy_client5.expectString + }); + }, "de_CreateStateMachineOutput"); + var de_DescribeActivityOutput = /* @__PURE__ */ __name((output, context) => { + return (0, import_smithy_client5.take)(output, { + activityArn: import_smithy_client5.expectString, + creationDate: (_) => (0, import_smithy_client5.expectNonNull)((0, import_smithy_client5.parseEpochTimestamp)((0, import_smithy_client5.expectNumber)(_))), + encryptionConfiguration: import_smithy_client5._json, + name: import_smithy_client5.expectString + }); + }, "de_DescribeActivityOutput"); + var de_DescribeExecutionOutput = /* @__PURE__ */ __name((output, context) => { + return (0, import_smithy_client5.take)(output, { + cause: import_smithy_client5.expectString, + error: import_smithy_client5.expectString, + executionArn: import_smithy_client5.expectString, + input: import_smithy_client5.expectString, + inputDetails: import_smithy_client5._json, + mapRunArn: import_smithy_client5.expectString, + name: import_smithy_client5.expectString, + output: import_smithy_client5.expectString, + outputDetails: import_smithy_client5._json, + redriveCount: import_smithy_client5.expectInt32, + redriveDate: (_) => (0, import_smithy_client5.expectNonNull)((0, import_smithy_client5.parseEpochTimestamp)((0, import_smithy_client5.expectNumber)(_))), + redriveStatus: import_smithy_client5.expectString, + redriveStatusReason: import_smithy_client5.expectString, + startDate: (_) => (0, import_smithy_client5.expectNonNull)((0, import_smithy_client5.parseEpochTimestamp)((0, import_smithy_client5.expectNumber)(_))), + stateMachineAliasArn: import_smithy_client5.expectString, + stateMachineArn: import_smithy_client5.expectString, + stateMachineVersionArn: import_smithy_client5.expectString, + status: import_smithy_client5.expectString, + stopDate: (_) => (0, import_smithy_client5.expectNonNull)((0, import_smithy_client5.parseEpochTimestamp)((0, import_smithy_client5.expectNumber)(_))), + traceHeader: import_smithy_client5.expectString + }); + }, "de_DescribeExecutionOutput"); + var de_DescribeMapRunOutput = /* @__PURE__ */ __name((output, context) => { + return (0, import_smithy_client5.take)(output, { + executionArn: import_smithy_client5.expectString, + executionCounts: import_smithy_client5._json, + itemCounts: import_smithy_client5._json, + mapRunArn: import_smithy_client5.expectString, + maxConcurrency: import_smithy_client5.expectInt32, + redriveCount: import_smithy_client5.expectInt32, + redriveDate: (_) => (0, import_smithy_client5.expectNonNull)((0, import_smithy_client5.parseEpochTimestamp)((0, import_smithy_client5.expectNumber)(_))), + startDate: (_) => (0, import_smithy_client5.expectNonNull)((0, import_smithy_client5.parseEpochTimestamp)((0, import_smithy_client5.expectNumber)(_))), + status: import_smithy_client5.expectString, + stopDate: (_) => (0, import_smithy_client5.expectNonNull)((0, import_smithy_client5.parseEpochTimestamp)((0, import_smithy_client5.expectNumber)(_))), + toleratedFailureCount: import_smithy_client5.expectLong, + toleratedFailurePercentage: import_smithy_client5.limitedParseFloat32 + }); + }, "de_DescribeMapRunOutput"); + var de_DescribeStateMachineAliasOutput = /* @__PURE__ */ __name((output, context) => { + return (0, import_smithy_client5.take)(output, { + creationDate: (_) => (0, import_smithy_client5.expectNonNull)((0, import_smithy_client5.parseEpochTimestamp)((0, import_smithy_client5.expectNumber)(_))), + description: import_smithy_client5.expectString, + name: import_smithy_client5.expectString, + routingConfiguration: import_smithy_client5._json, + stateMachineAliasArn: import_smithy_client5.expectString, + updateDate: (_) => (0, import_smithy_client5.expectNonNull)((0, import_smithy_client5.parseEpochTimestamp)((0, import_smithy_client5.expectNumber)(_))) + }); + }, "de_DescribeStateMachineAliasOutput"); + var de_DescribeStateMachineForExecutionOutput = /* @__PURE__ */ __name((output, context) => { + return (0, import_smithy_client5.take)(output, { + definition: import_smithy_client5.expectString, + encryptionConfiguration: import_smithy_client5._json, + label: import_smithy_client5.expectString, + loggingConfiguration: import_smithy_client5._json, + mapRunArn: import_smithy_client5.expectString, + name: import_smithy_client5.expectString, + revisionId: import_smithy_client5.expectString, + roleArn: import_smithy_client5.expectString, + stateMachineArn: import_smithy_client5.expectString, + tracingConfiguration: import_smithy_client5._json, + updateDate: (_) => (0, import_smithy_client5.expectNonNull)((0, import_smithy_client5.parseEpochTimestamp)((0, import_smithy_client5.expectNumber)(_))) + }); + }, "de_DescribeStateMachineForExecutionOutput"); + var de_DescribeStateMachineOutput = /* @__PURE__ */ __name((output, context) => { + return (0, import_smithy_client5.take)(output, { + creationDate: (_) => (0, import_smithy_client5.expectNonNull)((0, import_smithy_client5.parseEpochTimestamp)((0, import_smithy_client5.expectNumber)(_))), + definition: import_smithy_client5.expectString, + description: import_smithy_client5.expectString, + encryptionConfiguration: import_smithy_client5._json, + label: import_smithy_client5.expectString, + loggingConfiguration: import_smithy_client5._json, + name: import_smithy_client5.expectString, + revisionId: import_smithy_client5.expectString, + roleArn: import_smithy_client5.expectString, + stateMachineArn: import_smithy_client5.expectString, + status: import_smithy_client5.expectString, + tracingConfiguration: import_smithy_client5._json, + type: import_smithy_client5.expectString + }); + }, "de_DescribeStateMachineOutput"); + var de_ExecutionList = /* @__PURE__ */ __name((output, context) => { + const retVal = (output || []).filter((e) => e != null).map((entry) => { + return de_ExecutionListItem(entry, context); + }); + return retVal; + }, "de_ExecutionList"); + var de_ExecutionListItem = /* @__PURE__ */ __name((output, context) => { + return (0, import_smithy_client5.take)(output, { + executionArn: import_smithy_client5.expectString, + itemCount: import_smithy_client5.expectInt32, + mapRunArn: import_smithy_client5.expectString, + name: import_smithy_client5.expectString, + redriveCount: import_smithy_client5.expectInt32, + redriveDate: (_) => (0, import_smithy_client5.expectNonNull)((0, import_smithy_client5.parseEpochTimestamp)((0, import_smithy_client5.expectNumber)(_))), + startDate: (_) => (0, import_smithy_client5.expectNonNull)((0, import_smithy_client5.parseEpochTimestamp)((0, import_smithy_client5.expectNumber)(_))), + stateMachineAliasArn: import_smithy_client5.expectString, + stateMachineArn: import_smithy_client5.expectString, + stateMachineVersionArn: import_smithy_client5.expectString, + status: import_smithy_client5.expectString, + stopDate: (_) => (0, import_smithy_client5.expectNonNull)((0, import_smithy_client5.parseEpochTimestamp)((0, import_smithy_client5.expectNumber)(_))) + }); + }, "de_ExecutionListItem"); + var de_GetExecutionHistoryOutput = /* @__PURE__ */ __name((output, context) => { + return (0, import_smithy_client5.take)(output, { + events: (_) => de_HistoryEventList(_, context), + nextToken: import_smithy_client5.expectString + }); + }, "de_GetExecutionHistoryOutput"); + var de_HistoryEvent = /* @__PURE__ */ __name((output, context) => { + return (0, import_smithy_client5.take)(output, { + activityFailedEventDetails: import_smithy_client5._json, + activityScheduleFailedEventDetails: import_smithy_client5._json, + activityScheduledEventDetails: import_smithy_client5._json, + activityStartedEventDetails: import_smithy_client5._json, + activitySucceededEventDetails: import_smithy_client5._json, + activityTimedOutEventDetails: import_smithy_client5._json, + executionAbortedEventDetails: import_smithy_client5._json, + executionFailedEventDetails: import_smithy_client5._json, + executionRedrivenEventDetails: import_smithy_client5._json, + executionStartedEventDetails: import_smithy_client5._json, + executionSucceededEventDetails: import_smithy_client5._json, + executionTimedOutEventDetails: import_smithy_client5._json, + id: import_smithy_client5.expectLong, + lambdaFunctionFailedEventDetails: import_smithy_client5._json, + lambdaFunctionScheduleFailedEventDetails: import_smithy_client5._json, + lambdaFunctionScheduledEventDetails: import_smithy_client5._json, + lambdaFunctionStartFailedEventDetails: import_smithy_client5._json, + lambdaFunctionSucceededEventDetails: import_smithy_client5._json, + lambdaFunctionTimedOutEventDetails: import_smithy_client5._json, + mapIterationAbortedEventDetails: import_smithy_client5._json, + mapIterationFailedEventDetails: import_smithy_client5._json, + mapIterationStartedEventDetails: import_smithy_client5._json, + mapIterationSucceededEventDetails: import_smithy_client5._json, + mapRunFailedEventDetails: import_smithy_client5._json, + mapRunRedrivenEventDetails: import_smithy_client5._json, + mapRunStartedEventDetails: import_smithy_client5._json, + mapStateStartedEventDetails: import_smithy_client5._json, + previousEventId: import_smithy_client5.expectLong, + stateEnteredEventDetails: import_smithy_client5._json, + stateExitedEventDetails: import_smithy_client5._json, + taskFailedEventDetails: import_smithy_client5._json, + taskScheduledEventDetails: import_smithy_client5._json, + taskStartFailedEventDetails: import_smithy_client5._json, + taskStartedEventDetails: import_smithy_client5._json, + taskSubmitFailedEventDetails: import_smithy_client5._json, + taskSubmittedEventDetails: import_smithy_client5._json, + taskSucceededEventDetails: import_smithy_client5._json, + taskTimedOutEventDetails: import_smithy_client5._json, + timestamp: (_) => (0, import_smithy_client5.expectNonNull)((0, import_smithy_client5.parseEpochTimestamp)((0, import_smithy_client5.expectNumber)(_))), + type: import_smithy_client5.expectString + }); + }, "de_HistoryEvent"); + var de_HistoryEventList = /* @__PURE__ */ __name((output, context) => { + const retVal = (output || []).filter((e) => e != null).map((entry) => { + return de_HistoryEvent(entry, context); + }); + return retVal; + }, "de_HistoryEventList"); + var de_ListActivitiesOutput = /* @__PURE__ */ __name((output, context) => { + return (0, import_smithy_client5.take)(output, { + activities: (_) => de_ActivityList(_, context), + nextToken: import_smithy_client5.expectString + }); + }, "de_ListActivitiesOutput"); + var de_ListExecutionsOutput = /* @__PURE__ */ __name((output, context) => { + return (0, import_smithy_client5.take)(output, { + executions: (_) => de_ExecutionList(_, context), + nextToken: import_smithy_client5.expectString + }); + }, "de_ListExecutionsOutput"); + var de_ListMapRunsOutput = /* @__PURE__ */ __name((output, context) => { + return (0, import_smithy_client5.take)(output, { + mapRuns: (_) => de_MapRunList(_, context), + nextToken: import_smithy_client5.expectString + }); + }, "de_ListMapRunsOutput"); + var de_ListStateMachineAliasesOutput = /* @__PURE__ */ __name((output, context) => { + return (0, import_smithy_client5.take)(output, { + nextToken: import_smithy_client5.expectString, + stateMachineAliases: (_) => de_StateMachineAliasList(_, context) + }); + }, "de_ListStateMachineAliasesOutput"); + var de_ListStateMachinesOutput = /* @__PURE__ */ __name((output, context) => { + return (0, import_smithy_client5.take)(output, { + nextToken: import_smithy_client5.expectString, + stateMachines: (_) => de_StateMachineList(_, context) + }); + }, "de_ListStateMachinesOutput"); + var de_ListStateMachineVersionsOutput = /* @__PURE__ */ __name((output, context) => { + return (0, import_smithy_client5.take)(output, { + nextToken: import_smithy_client5.expectString, + stateMachineVersions: (_) => de_StateMachineVersionList(_, context) + }); + }, "de_ListStateMachineVersionsOutput"); + var de_MapRunList = /* @__PURE__ */ __name((output, context) => { + const retVal = (output || []).filter((e) => e != null).map((entry) => { + return de_MapRunListItem(entry, context); + }); + return retVal; + }, "de_MapRunList"); + var de_MapRunListItem = /* @__PURE__ */ __name((output, context) => { + return (0, import_smithy_client5.take)(output, { + executionArn: import_smithy_client5.expectString, + mapRunArn: import_smithy_client5.expectString, + startDate: (_) => (0, import_smithy_client5.expectNonNull)((0, import_smithy_client5.parseEpochTimestamp)((0, import_smithy_client5.expectNumber)(_))), + stateMachineArn: import_smithy_client5.expectString, + stopDate: (_) => (0, import_smithy_client5.expectNonNull)((0, import_smithy_client5.parseEpochTimestamp)((0, import_smithy_client5.expectNumber)(_))) + }); + }, "de_MapRunListItem"); + var de_PublishStateMachineVersionOutput = /* @__PURE__ */ __name((output, context) => { + return (0, import_smithy_client5.take)(output, { + creationDate: (_) => (0, import_smithy_client5.expectNonNull)((0, import_smithy_client5.parseEpochTimestamp)((0, import_smithy_client5.expectNumber)(_))), + stateMachineVersionArn: import_smithy_client5.expectString + }); + }, "de_PublishStateMachineVersionOutput"); + var de_RedriveExecutionOutput = /* @__PURE__ */ __name((output, context) => { + return (0, import_smithy_client5.take)(output, { + redriveDate: (_) => (0, import_smithy_client5.expectNonNull)((0, import_smithy_client5.parseEpochTimestamp)((0, import_smithy_client5.expectNumber)(_))) + }); + }, "de_RedriveExecutionOutput"); + var de_StartExecutionOutput = /* @__PURE__ */ __name((output, context) => { + return (0, import_smithy_client5.take)(output, { + executionArn: import_smithy_client5.expectString, + startDate: (_) => (0, import_smithy_client5.expectNonNull)((0, import_smithy_client5.parseEpochTimestamp)((0, import_smithy_client5.expectNumber)(_))) + }); + }, "de_StartExecutionOutput"); + var de_StartSyncExecutionOutput = /* @__PURE__ */ __name((output, context) => { + return (0, import_smithy_client5.take)(output, { + billingDetails: import_smithy_client5._json, + cause: import_smithy_client5.expectString, + error: import_smithy_client5.expectString, + executionArn: import_smithy_client5.expectString, + input: import_smithy_client5.expectString, + inputDetails: import_smithy_client5._json, + name: import_smithy_client5.expectString, + output: import_smithy_client5.expectString, + outputDetails: import_smithy_client5._json, + startDate: (_) => (0, import_smithy_client5.expectNonNull)((0, import_smithy_client5.parseEpochTimestamp)((0, import_smithy_client5.expectNumber)(_))), + stateMachineArn: import_smithy_client5.expectString, + status: import_smithy_client5.expectString, + stopDate: (_) => (0, import_smithy_client5.expectNonNull)((0, import_smithy_client5.parseEpochTimestamp)((0, import_smithy_client5.expectNumber)(_))), + traceHeader: import_smithy_client5.expectString + }); + }, "de_StartSyncExecutionOutput"); + var de_StateMachineAliasList = /* @__PURE__ */ __name((output, context) => { + const retVal = (output || []).filter((e) => e != null).map((entry) => { + return de_StateMachineAliasListItem(entry, context); + }); + return retVal; + }, "de_StateMachineAliasList"); + var de_StateMachineAliasListItem = /* @__PURE__ */ __name((output, context) => { + return (0, import_smithy_client5.take)(output, { + creationDate: (_) => (0, import_smithy_client5.expectNonNull)((0, import_smithy_client5.parseEpochTimestamp)((0, import_smithy_client5.expectNumber)(_))), + stateMachineAliasArn: import_smithy_client5.expectString + }); + }, "de_StateMachineAliasListItem"); + var de_StateMachineList = /* @__PURE__ */ __name((output, context) => { + const retVal = (output || []).filter((e) => e != null).map((entry) => { + return de_StateMachineListItem(entry, context); + }); + return retVal; + }, "de_StateMachineList"); + var de_StateMachineListItem = /* @__PURE__ */ __name((output, context) => { + return (0, import_smithy_client5.take)(output, { + creationDate: (_) => (0, import_smithy_client5.expectNonNull)((0, import_smithy_client5.parseEpochTimestamp)((0, import_smithy_client5.expectNumber)(_))), + name: import_smithy_client5.expectString, + stateMachineArn: import_smithy_client5.expectString, + type: import_smithy_client5.expectString + }); + }, "de_StateMachineListItem"); + var de_StateMachineVersionList = /* @__PURE__ */ __name((output, context) => { + const retVal = (output || []).filter((e) => e != null).map((entry) => { + return de_StateMachineVersionListItem(entry, context); + }); + return retVal; + }, "de_StateMachineVersionList"); + var de_StateMachineVersionListItem = /* @__PURE__ */ __name((output, context) => { + return (0, import_smithy_client5.take)(output, { + creationDate: (_) => (0, import_smithy_client5.expectNonNull)((0, import_smithy_client5.parseEpochTimestamp)((0, import_smithy_client5.expectNumber)(_))), + stateMachineVersionArn: import_smithy_client5.expectString + }); + }, "de_StateMachineVersionListItem"); + var de_StopExecutionOutput = /* @__PURE__ */ __name((output, context) => { + return (0, import_smithy_client5.take)(output, { + stopDate: (_) => (0, import_smithy_client5.expectNonNull)((0, import_smithy_client5.parseEpochTimestamp)((0, import_smithy_client5.expectNumber)(_))) + }); + }, "de_StopExecutionOutput"); + var de_UpdateStateMachineAliasOutput = /* @__PURE__ */ __name((output, context) => { + return (0, import_smithy_client5.take)(output, { + updateDate: (_) => (0, import_smithy_client5.expectNonNull)((0, import_smithy_client5.parseEpochTimestamp)((0, import_smithy_client5.expectNumber)(_))) + }); + }, "de_UpdateStateMachineAliasOutput"); + var de_UpdateStateMachineOutput = /* @__PURE__ */ __name((output, context) => { + return (0, import_smithy_client5.take)(output, { + revisionId: import_smithy_client5.expectString, + stateMachineVersionArn: import_smithy_client5.expectString, + updateDate: (_) => (0, import_smithy_client5.expectNonNull)((0, import_smithy_client5.parseEpochTimestamp)((0, import_smithy_client5.expectNumber)(_))) + }); + }, "de_UpdateStateMachineOutput"); + var deserializeMetadata = /* @__PURE__ */ __name((output) => ({ + httpStatusCode: output.statusCode, + requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"], + extendedRequestId: output.headers["x-amz-id-2"], + cfId: output.headers["x-amz-cf-id"] + }), "deserializeMetadata"); + var throwDefaultError = (0, import_smithy_client5.withBaseException)(SFNServiceException); + var buildHttpRpcRequest = /* @__PURE__ */ __name(async (context, headers, path, resolvedHostname, body) => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const contents = { + protocol, + hostname, + port, + method: "POST", + path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path, + headers + }; + if (resolvedHostname !== void 0) { + contents.hostname = resolvedHostname; } - deserialize(output, context) { - return (0, Aws_json1_0_1.de_UpdateStateMachineCommand)(output, context); + if (body !== void 0) { + contents.body = body; } + return new import_protocol_http8.HttpRequest(contents); + }, "buildHttpRpcRequest"); + function sharedHeaders(operation) { + return { + "content-type": "application/x-amz-json-1.0", + "x-amz-target": `AWSStepFunctions.${operation}` + }; + } + __name(sharedHeaders, "sharedHeaders"); + var _CreateActivityCommand = class _CreateActivityCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("AWSStepFunctions", "CreateActivity", {}).n("SFNClient", "CreateActivityCommand").f(void 0, void 0).ser(se_CreateActivityCommand).de(de_CreateActivityCommand).build() { + }; + __name(_CreateActivityCommand, "CreateActivityCommand"); + var CreateActivityCommand = _CreateActivityCommand; + var _CreateStateMachineAliasCommand = class _CreateStateMachineAliasCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("AWSStepFunctions", "CreateStateMachineAlias", {}).n("SFNClient", "CreateStateMachineAliasCommand").f(CreateStateMachineAliasInputFilterSensitiveLog, void 0).ser(se_CreateStateMachineAliasCommand).de(de_CreateStateMachineAliasCommand).build() { + }; + __name(_CreateStateMachineAliasCommand, "CreateStateMachineAliasCommand"); + var CreateStateMachineAliasCommand = _CreateStateMachineAliasCommand; + var _CreateStateMachineCommand = class _CreateStateMachineCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("AWSStepFunctions", "CreateStateMachine", {}).n("SFNClient", "CreateStateMachineCommand").f(CreateStateMachineInputFilterSensitiveLog, void 0).ser(se_CreateStateMachineCommand).de(de_CreateStateMachineCommand).build() { + }; + __name(_CreateStateMachineCommand, "CreateStateMachineCommand"); + var CreateStateMachineCommand = _CreateStateMachineCommand; + var _DeleteActivityCommand = class _DeleteActivityCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("AWSStepFunctions", "DeleteActivity", {}).n("SFNClient", "DeleteActivityCommand").f(void 0, void 0).ser(se_DeleteActivityCommand).de(de_DeleteActivityCommand).build() { + }; + __name(_DeleteActivityCommand, "DeleteActivityCommand"); + var DeleteActivityCommand = _DeleteActivityCommand; + var _DeleteStateMachineAliasCommand = class _DeleteStateMachineAliasCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("AWSStepFunctions", "DeleteStateMachineAlias", {}).n("SFNClient", "DeleteStateMachineAliasCommand").f(void 0, void 0).ser(se_DeleteStateMachineAliasCommand).de(de_DeleteStateMachineAliasCommand).build() { + }; + __name(_DeleteStateMachineAliasCommand, "DeleteStateMachineAliasCommand"); + var DeleteStateMachineAliasCommand = _DeleteStateMachineAliasCommand; + var _DeleteStateMachineCommand = class _DeleteStateMachineCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("AWSStepFunctions", "DeleteStateMachine", {}).n("SFNClient", "DeleteStateMachineCommand").f(void 0, void 0).ser(se_DeleteStateMachineCommand).de(de_DeleteStateMachineCommand).build() { + }; + __name(_DeleteStateMachineCommand, "DeleteStateMachineCommand"); + var DeleteStateMachineCommand = _DeleteStateMachineCommand; + var _DeleteStateMachineVersionCommand = class _DeleteStateMachineVersionCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("AWSStepFunctions", "DeleteStateMachineVersion", {}).n("SFNClient", "DeleteStateMachineVersionCommand").f(void 0, void 0).ser(se_DeleteStateMachineVersionCommand).de(de_DeleteStateMachineVersionCommand).build() { + }; + __name(_DeleteStateMachineVersionCommand, "DeleteStateMachineVersionCommand"); + var DeleteStateMachineVersionCommand = _DeleteStateMachineVersionCommand; + var _DescribeActivityCommand = class _DescribeActivityCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("AWSStepFunctions", "DescribeActivity", {}).n("SFNClient", "DescribeActivityCommand").f(void 0, void 0).ser(se_DescribeActivityCommand).de(de_DescribeActivityCommand).build() { + }; + __name(_DescribeActivityCommand, "DescribeActivityCommand"); + var DescribeActivityCommand = _DescribeActivityCommand; + var _DescribeExecutionCommand = class _DescribeExecutionCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("AWSStepFunctions", "DescribeExecution", {}).n("SFNClient", "DescribeExecutionCommand").f(void 0, DescribeExecutionOutputFilterSensitiveLog).ser(se_DescribeExecutionCommand).de(de_DescribeExecutionCommand).build() { + }; + __name(_DescribeExecutionCommand, "DescribeExecutionCommand"); + var DescribeExecutionCommand = _DescribeExecutionCommand; + var _DescribeMapRunCommand = class _DescribeMapRunCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("AWSStepFunctions", "DescribeMapRun", {}).n("SFNClient", "DescribeMapRunCommand").f(void 0, void 0).ser(se_DescribeMapRunCommand).de(de_DescribeMapRunCommand).build() { + }; + __name(_DescribeMapRunCommand, "DescribeMapRunCommand"); + var DescribeMapRunCommand = _DescribeMapRunCommand; + var _DescribeStateMachineAliasCommand = class _DescribeStateMachineAliasCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("AWSStepFunctions", "DescribeStateMachineAlias", {}).n("SFNClient", "DescribeStateMachineAliasCommand").f(void 0, DescribeStateMachineAliasOutputFilterSensitiveLog).ser(se_DescribeStateMachineAliasCommand).de(de_DescribeStateMachineAliasCommand).build() { + }; + __name(_DescribeStateMachineAliasCommand, "DescribeStateMachineAliasCommand"); + var DescribeStateMachineAliasCommand = _DescribeStateMachineAliasCommand; + var _DescribeStateMachineCommand = class _DescribeStateMachineCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("AWSStepFunctions", "DescribeStateMachine", {}).n("SFNClient", "DescribeStateMachineCommand").f(void 0, DescribeStateMachineOutputFilterSensitiveLog).ser(se_DescribeStateMachineCommand).de(de_DescribeStateMachineCommand).build() { + }; + __name(_DescribeStateMachineCommand, "DescribeStateMachineCommand"); + var DescribeStateMachineCommand = _DescribeStateMachineCommand; + var _DescribeStateMachineForExecutionCommand = class _DescribeStateMachineForExecutionCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("AWSStepFunctions", "DescribeStateMachineForExecution", {}).n("SFNClient", "DescribeStateMachineForExecutionCommand").f(void 0, DescribeStateMachineForExecutionOutputFilterSensitiveLog).ser(se_DescribeStateMachineForExecutionCommand).de(de_DescribeStateMachineForExecutionCommand).build() { + }; + __name(_DescribeStateMachineForExecutionCommand, "DescribeStateMachineForExecutionCommand"); + var DescribeStateMachineForExecutionCommand = _DescribeStateMachineForExecutionCommand; + var _GetActivityTaskCommand = class _GetActivityTaskCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("AWSStepFunctions", "GetActivityTask", {}).n("SFNClient", "GetActivityTaskCommand").f(void 0, GetActivityTaskOutputFilterSensitiveLog).ser(se_GetActivityTaskCommand).de(de_GetActivityTaskCommand).build() { + }; + __name(_GetActivityTaskCommand, "GetActivityTaskCommand"); + var GetActivityTaskCommand = _GetActivityTaskCommand; + var _GetExecutionHistoryCommand = class _GetExecutionHistoryCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("AWSStepFunctions", "GetExecutionHistory", {}).n("SFNClient", "GetExecutionHistoryCommand").f(void 0, GetExecutionHistoryOutputFilterSensitiveLog).ser(se_GetExecutionHistoryCommand).de(de_GetExecutionHistoryCommand).build() { + }; + __name(_GetExecutionHistoryCommand, "GetExecutionHistoryCommand"); + var GetExecutionHistoryCommand = _GetExecutionHistoryCommand; + var _ListActivitiesCommand = class _ListActivitiesCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("AWSStepFunctions", "ListActivities", {}).n("SFNClient", "ListActivitiesCommand").f(void 0, void 0).ser(se_ListActivitiesCommand).de(de_ListActivitiesCommand).build() { + }; + __name(_ListActivitiesCommand, "ListActivitiesCommand"); + var ListActivitiesCommand = _ListActivitiesCommand; + var _ListExecutionsCommand = class _ListExecutionsCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("AWSStepFunctions", "ListExecutions", {}).n("SFNClient", "ListExecutionsCommand").f(void 0, void 0).ser(se_ListExecutionsCommand).de(de_ListExecutionsCommand).build() { + }; + __name(_ListExecutionsCommand, "ListExecutionsCommand"); + var ListExecutionsCommand = _ListExecutionsCommand; + var _ListMapRunsCommand = class _ListMapRunsCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("AWSStepFunctions", "ListMapRuns", {}).n("SFNClient", "ListMapRunsCommand").f(void 0, void 0).ser(se_ListMapRunsCommand).de(de_ListMapRunsCommand).build() { + }; + __name(_ListMapRunsCommand, "ListMapRunsCommand"); + var ListMapRunsCommand = _ListMapRunsCommand; + var _ListStateMachineAliasesCommand = class _ListStateMachineAliasesCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("AWSStepFunctions", "ListStateMachineAliases", {}).n("SFNClient", "ListStateMachineAliasesCommand").f(void 0, void 0).ser(se_ListStateMachineAliasesCommand).de(de_ListStateMachineAliasesCommand).build() { + }; + __name(_ListStateMachineAliasesCommand, "ListStateMachineAliasesCommand"); + var ListStateMachineAliasesCommand = _ListStateMachineAliasesCommand; + var _ListStateMachinesCommand = class _ListStateMachinesCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("AWSStepFunctions", "ListStateMachines", {}).n("SFNClient", "ListStateMachinesCommand").f(void 0, void 0).ser(se_ListStateMachinesCommand).de(de_ListStateMachinesCommand).build() { + }; + __name(_ListStateMachinesCommand, "ListStateMachinesCommand"); + var ListStateMachinesCommand = _ListStateMachinesCommand; + var _ListStateMachineVersionsCommand = class _ListStateMachineVersionsCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("AWSStepFunctions", "ListStateMachineVersions", {}).n("SFNClient", "ListStateMachineVersionsCommand").f(void 0, void 0).ser(se_ListStateMachineVersionsCommand).de(de_ListStateMachineVersionsCommand).build() { + }; + __name(_ListStateMachineVersionsCommand, "ListStateMachineVersionsCommand"); + var ListStateMachineVersionsCommand = _ListStateMachineVersionsCommand; + var _ListTagsForResourceCommand = class _ListTagsForResourceCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("AWSStepFunctions", "ListTagsForResource", {}).n("SFNClient", "ListTagsForResourceCommand").f(void 0, void 0).ser(se_ListTagsForResourceCommand).de(de_ListTagsForResourceCommand).build() { + }; + __name(_ListTagsForResourceCommand, "ListTagsForResourceCommand"); + var ListTagsForResourceCommand = _ListTagsForResourceCommand; + var _PublishStateMachineVersionCommand = class _PublishStateMachineVersionCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("AWSStepFunctions", "PublishStateMachineVersion", {}).n("SFNClient", "PublishStateMachineVersionCommand").f(PublishStateMachineVersionInputFilterSensitiveLog, void 0).ser(se_PublishStateMachineVersionCommand).de(de_PublishStateMachineVersionCommand).build() { + }; + __name(_PublishStateMachineVersionCommand, "PublishStateMachineVersionCommand"); + var PublishStateMachineVersionCommand = _PublishStateMachineVersionCommand; + var _RedriveExecutionCommand = class _RedriveExecutionCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("AWSStepFunctions", "RedriveExecution", {}).n("SFNClient", "RedriveExecutionCommand").f(void 0, void 0).ser(se_RedriveExecutionCommand).de(de_RedriveExecutionCommand).build() { + }; + __name(_RedriveExecutionCommand, "RedriveExecutionCommand"); + var RedriveExecutionCommand = _RedriveExecutionCommand; + var _SendTaskFailureCommand = class _SendTaskFailureCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("AWSStepFunctions", "SendTaskFailure", {}).n("SFNClient", "SendTaskFailureCommand").f(SendTaskFailureInputFilterSensitiveLog, void 0).ser(se_SendTaskFailureCommand).de(de_SendTaskFailureCommand).build() { + }; + __name(_SendTaskFailureCommand, "SendTaskFailureCommand"); + var SendTaskFailureCommand = _SendTaskFailureCommand; + var _SendTaskHeartbeatCommand = class _SendTaskHeartbeatCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("AWSStepFunctions", "SendTaskHeartbeat", {}).n("SFNClient", "SendTaskHeartbeatCommand").f(void 0, void 0).ser(se_SendTaskHeartbeatCommand).de(de_SendTaskHeartbeatCommand).build() { + }; + __name(_SendTaskHeartbeatCommand, "SendTaskHeartbeatCommand"); + var SendTaskHeartbeatCommand = _SendTaskHeartbeatCommand; + var _SendTaskSuccessCommand = class _SendTaskSuccessCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("AWSStepFunctions", "SendTaskSuccess", {}).n("SFNClient", "SendTaskSuccessCommand").f(SendTaskSuccessInputFilterSensitiveLog, void 0).ser(se_SendTaskSuccessCommand).de(de_SendTaskSuccessCommand).build() { + }; + __name(_SendTaskSuccessCommand, "SendTaskSuccessCommand"); + var SendTaskSuccessCommand = _SendTaskSuccessCommand; + var _StartExecutionCommand = class _StartExecutionCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("AWSStepFunctions", "StartExecution", {}).n("SFNClient", "StartExecutionCommand").f(StartExecutionInputFilterSensitiveLog, void 0).ser(se_StartExecutionCommand).de(de_StartExecutionCommand).build() { + }; + __name(_StartExecutionCommand, "StartExecutionCommand"); + var StartExecutionCommand = _StartExecutionCommand; + var _StartSyncExecutionCommand = class _StartSyncExecutionCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("AWSStepFunctions", "StartSyncExecution", {}).n("SFNClient", "StartSyncExecutionCommand").f(StartSyncExecutionInputFilterSensitiveLog, StartSyncExecutionOutputFilterSensitiveLog).ser(se_StartSyncExecutionCommand).de(de_StartSyncExecutionCommand).build() { + }; + __name(_StartSyncExecutionCommand, "StartSyncExecutionCommand"); + var StartSyncExecutionCommand = _StartSyncExecutionCommand; + var _StopExecutionCommand = class _StopExecutionCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("AWSStepFunctions", "StopExecution", {}).n("SFNClient", "StopExecutionCommand").f(StopExecutionInputFilterSensitiveLog, void 0).ser(se_StopExecutionCommand).de(de_StopExecutionCommand).build() { + }; + __name(_StopExecutionCommand, "StopExecutionCommand"); + var StopExecutionCommand = _StopExecutionCommand; + var _TagResourceCommand = class _TagResourceCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("AWSStepFunctions", "TagResource", {}).n("SFNClient", "TagResourceCommand").f(void 0, void 0).ser(se_TagResourceCommand).de(de_TagResourceCommand).build() { + }; + __name(_TagResourceCommand, "TagResourceCommand"); + var TagResourceCommand = _TagResourceCommand; + var _TestStateCommand = class _TestStateCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("AWSStepFunctions", "TestState", {}).n("SFNClient", "TestStateCommand").f(TestStateInputFilterSensitiveLog, TestStateOutputFilterSensitiveLog).ser(se_TestStateCommand).de(de_TestStateCommand).build() { + }; + __name(_TestStateCommand, "TestStateCommand"); + var TestStateCommand = _TestStateCommand; + var _UntagResourceCommand = class _UntagResourceCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("AWSStepFunctions", "UntagResource", {}).n("SFNClient", "UntagResourceCommand").f(void 0, void 0).ser(se_UntagResourceCommand).de(de_UntagResourceCommand).build() { + }; + __name(_UntagResourceCommand, "UntagResourceCommand"); + var UntagResourceCommand = _UntagResourceCommand; + var _UpdateMapRunCommand = class _UpdateMapRunCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("AWSStepFunctions", "UpdateMapRun", {}).n("SFNClient", "UpdateMapRunCommand").f(void 0, void 0).ser(se_UpdateMapRunCommand).de(de_UpdateMapRunCommand).build() { + }; + __name(_UpdateMapRunCommand, "UpdateMapRunCommand"); + var UpdateMapRunCommand = _UpdateMapRunCommand; + var _UpdateStateMachineAliasCommand = class _UpdateStateMachineAliasCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("AWSStepFunctions", "UpdateStateMachineAlias", {}).n("SFNClient", "UpdateStateMachineAliasCommand").f(UpdateStateMachineAliasInputFilterSensitiveLog, void 0).ser(se_UpdateStateMachineAliasCommand).de(de_UpdateStateMachineAliasCommand).build() { + }; + __name(_UpdateStateMachineAliasCommand, "UpdateStateMachineAliasCommand"); + var UpdateStateMachineAliasCommand = _UpdateStateMachineAliasCommand; + var _UpdateStateMachineCommand = class _UpdateStateMachineCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("AWSStepFunctions", "UpdateStateMachine", {}).n("SFNClient", "UpdateStateMachineCommand").f(UpdateStateMachineInputFilterSensitiveLog, void 0).ser(se_UpdateStateMachineCommand).de(de_UpdateStateMachineCommand).build() { + }; + __name(_UpdateStateMachineCommand, "UpdateStateMachineCommand"); + var UpdateStateMachineCommand = _UpdateStateMachineCommand; + var _ValidateStateMachineDefinitionCommand = class _ValidateStateMachineDefinitionCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("AWSStepFunctions", "ValidateStateMachineDefinition", {}).n("SFNClient", "ValidateStateMachineDefinitionCommand").f(ValidateStateMachineDefinitionInputFilterSensitiveLog, void 0).ser(se_ValidateStateMachineDefinitionCommand).de(de_ValidateStateMachineDefinitionCommand).build() { }; - exports2.UpdateStateMachineCommand = UpdateStateMachineCommand; - } -}); - -// ../../../node_modules/@aws-sdk/client-sfn/dist-cjs/SFN.js -var require_SFN = __commonJS({ - "../../../node_modules/@aws-sdk/client-sfn/dist-cjs/SFN.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.SFN = void 0; - var smithy_client_1 = require_dist_cjs34(); - var CreateActivityCommand_1 = require_CreateActivityCommand(); - var CreateStateMachineAliasCommand_1 = require_CreateStateMachineAliasCommand(); - var CreateStateMachineCommand_1 = require_CreateStateMachineCommand(); - var DeleteActivityCommand_1 = require_DeleteActivityCommand(); - var DeleteStateMachineAliasCommand_1 = require_DeleteStateMachineAliasCommand(); - var DeleteStateMachineCommand_1 = require_DeleteStateMachineCommand(); - var DeleteStateMachineVersionCommand_1 = require_DeleteStateMachineVersionCommand(); - var DescribeActivityCommand_1 = require_DescribeActivityCommand(); - var DescribeExecutionCommand_1 = require_DescribeExecutionCommand(); - var DescribeMapRunCommand_1 = require_DescribeMapRunCommand(); - var DescribeStateMachineAliasCommand_1 = require_DescribeStateMachineAliasCommand(); - var DescribeStateMachineCommand_1 = require_DescribeStateMachineCommand(); - var DescribeStateMachineForExecutionCommand_1 = require_DescribeStateMachineForExecutionCommand(); - var GetActivityTaskCommand_1 = require_GetActivityTaskCommand(); - var GetExecutionHistoryCommand_1 = require_GetExecutionHistoryCommand(); - var ListActivitiesCommand_1 = require_ListActivitiesCommand(); - var ListExecutionsCommand_1 = require_ListExecutionsCommand(); - var ListMapRunsCommand_1 = require_ListMapRunsCommand(); - var ListStateMachineAliasesCommand_1 = require_ListStateMachineAliasesCommand(); - var ListStateMachinesCommand_1 = require_ListStateMachinesCommand(); - var ListStateMachineVersionsCommand_1 = require_ListStateMachineVersionsCommand(); - var ListTagsForResourceCommand_1 = require_ListTagsForResourceCommand(); - var PublishStateMachineVersionCommand_1 = require_PublishStateMachineVersionCommand(); - var SendTaskFailureCommand_1 = require_SendTaskFailureCommand(); - var SendTaskHeartbeatCommand_1 = require_SendTaskHeartbeatCommand(); - var SendTaskSuccessCommand_1 = require_SendTaskSuccessCommand(); - var StartExecutionCommand_1 = require_StartExecutionCommand(); - var StartSyncExecutionCommand_1 = require_StartSyncExecutionCommand(); - var StopExecutionCommand_1 = require_StopExecutionCommand(); - var TagResourceCommand_1 = require_TagResourceCommand(); - var UntagResourceCommand_1 = require_UntagResourceCommand(); - var UpdateMapRunCommand_1 = require_UpdateMapRunCommand(); - var UpdateStateMachineAliasCommand_1 = require_UpdateStateMachineAliasCommand(); - var UpdateStateMachineCommand_1 = require_UpdateStateMachineCommand(); - var SFNClient_1 = require_SFNClient(); + __name(_ValidateStateMachineDefinitionCommand, "ValidateStateMachineDefinitionCommand"); + var ValidateStateMachineDefinitionCommand = _ValidateStateMachineDefinitionCommand; var commands = { - CreateActivityCommand: CreateActivityCommand_1.CreateActivityCommand, - CreateStateMachineCommand: CreateStateMachineCommand_1.CreateStateMachineCommand, - CreateStateMachineAliasCommand: CreateStateMachineAliasCommand_1.CreateStateMachineAliasCommand, - DeleteActivityCommand: DeleteActivityCommand_1.DeleteActivityCommand, - DeleteStateMachineCommand: DeleteStateMachineCommand_1.DeleteStateMachineCommand, - DeleteStateMachineAliasCommand: DeleteStateMachineAliasCommand_1.DeleteStateMachineAliasCommand, - DeleteStateMachineVersionCommand: DeleteStateMachineVersionCommand_1.DeleteStateMachineVersionCommand, - DescribeActivityCommand: DescribeActivityCommand_1.DescribeActivityCommand, - DescribeExecutionCommand: DescribeExecutionCommand_1.DescribeExecutionCommand, - DescribeMapRunCommand: DescribeMapRunCommand_1.DescribeMapRunCommand, - DescribeStateMachineCommand: DescribeStateMachineCommand_1.DescribeStateMachineCommand, - DescribeStateMachineAliasCommand: DescribeStateMachineAliasCommand_1.DescribeStateMachineAliasCommand, - DescribeStateMachineForExecutionCommand: DescribeStateMachineForExecutionCommand_1.DescribeStateMachineForExecutionCommand, - GetActivityTaskCommand: GetActivityTaskCommand_1.GetActivityTaskCommand, - GetExecutionHistoryCommand: GetExecutionHistoryCommand_1.GetExecutionHistoryCommand, - ListActivitiesCommand: ListActivitiesCommand_1.ListActivitiesCommand, - ListExecutionsCommand: ListExecutionsCommand_1.ListExecutionsCommand, - ListMapRunsCommand: ListMapRunsCommand_1.ListMapRunsCommand, - ListStateMachineAliasesCommand: ListStateMachineAliasesCommand_1.ListStateMachineAliasesCommand, - ListStateMachinesCommand: ListStateMachinesCommand_1.ListStateMachinesCommand, - ListStateMachineVersionsCommand: ListStateMachineVersionsCommand_1.ListStateMachineVersionsCommand, - ListTagsForResourceCommand: ListTagsForResourceCommand_1.ListTagsForResourceCommand, - PublishStateMachineVersionCommand: PublishStateMachineVersionCommand_1.PublishStateMachineVersionCommand, - SendTaskFailureCommand: SendTaskFailureCommand_1.SendTaskFailureCommand, - SendTaskHeartbeatCommand: SendTaskHeartbeatCommand_1.SendTaskHeartbeatCommand, - SendTaskSuccessCommand: SendTaskSuccessCommand_1.SendTaskSuccessCommand, - StartExecutionCommand: StartExecutionCommand_1.StartExecutionCommand, - StartSyncExecutionCommand: StartSyncExecutionCommand_1.StartSyncExecutionCommand, - StopExecutionCommand: StopExecutionCommand_1.StopExecutionCommand, - TagResourceCommand: TagResourceCommand_1.TagResourceCommand, - UntagResourceCommand: UntagResourceCommand_1.UntagResourceCommand, - UpdateMapRunCommand: UpdateMapRunCommand_1.UpdateMapRunCommand, - UpdateStateMachineCommand: UpdateStateMachineCommand_1.UpdateStateMachineCommand, - UpdateStateMachineAliasCommand: UpdateStateMachineAliasCommand_1.UpdateStateMachineAliasCommand - }; - var SFN2 = class extends SFNClient_1.SFNClient { - }; - exports2.SFN = SFN2; - (0, smithy_client_1.createAggregatedClient)(commands, SFN2); - } -}); - -// ../../../node_modules/@aws-sdk/client-sfn/dist-cjs/commands/index.js -var require_commands3 = __commonJS({ - "../../../node_modules/@aws-sdk/client-sfn/dist-cjs/commands/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); - tslib_1.__exportStar(require_CreateActivityCommand(), exports2); - tslib_1.__exportStar(require_CreateStateMachineAliasCommand(), exports2); - tslib_1.__exportStar(require_CreateStateMachineCommand(), exports2); - tslib_1.__exportStar(require_DeleteActivityCommand(), exports2); - tslib_1.__exportStar(require_DeleteStateMachineAliasCommand(), exports2); - tslib_1.__exportStar(require_DeleteStateMachineCommand(), exports2); - tslib_1.__exportStar(require_DeleteStateMachineVersionCommand(), exports2); - tslib_1.__exportStar(require_DescribeActivityCommand(), exports2); - tslib_1.__exportStar(require_DescribeExecutionCommand(), exports2); - tslib_1.__exportStar(require_DescribeMapRunCommand(), exports2); - tslib_1.__exportStar(require_DescribeStateMachineAliasCommand(), exports2); - tslib_1.__exportStar(require_DescribeStateMachineCommand(), exports2); - tslib_1.__exportStar(require_DescribeStateMachineForExecutionCommand(), exports2); - tslib_1.__exportStar(require_GetActivityTaskCommand(), exports2); - tslib_1.__exportStar(require_GetExecutionHistoryCommand(), exports2); - tslib_1.__exportStar(require_ListActivitiesCommand(), exports2); - tslib_1.__exportStar(require_ListExecutionsCommand(), exports2); - tslib_1.__exportStar(require_ListMapRunsCommand(), exports2); - tslib_1.__exportStar(require_ListStateMachineAliasesCommand(), exports2); - tslib_1.__exportStar(require_ListStateMachineVersionsCommand(), exports2); - tslib_1.__exportStar(require_ListStateMachinesCommand(), exports2); - tslib_1.__exportStar(require_ListTagsForResourceCommand(), exports2); - tslib_1.__exportStar(require_PublishStateMachineVersionCommand(), exports2); - tslib_1.__exportStar(require_SendTaskFailureCommand(), exports2); - tslib_1.__exportStar(require_SendTaskHeartbeatCommand(), exports2); - tslib_1.__exportStar(require_SendTaskSuccessCommand(), exports2); - tslib_1.__exportStar(require_StartExecutionCommand(), exports2); - tslib_1.__exportStar(require_StartSyncExecutionCommand(), exports2); - tslib_1.__exportStar(require_StopExecutionCommand(), exports2); - tslib_1.__exportStar(require_TagResourceCommand(), exports2); - tslib_1.__exportStar(require_UntagResourceCommand(), exports2); - tslib_1.__exportStar(require_UpdateMapRunCommand(), exports2); - tslib_1.__exportStar(require_UpdateStateMachineAliasCommand(), exports2); - tslib_1.__exportStar(require_UpdateStateMachineCommand(), exports2); - } -}); - -// ../../../node_modules/@aws-sdk/client-sfn/dist-cjs/pagination/GetExecutionHistoryPaginator.js -var require_GetExecutionHistoryPaginator = __commonJS({ - "../../../node_modules/@aws-sdk/client-sfn/dist-cjs/pagination/GetExecutionHistoryPaginator.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.paginateGetExecutionHistory = void 0; - var GetExecutionHistoryCommand_1 = require_GetExecutionHistoryCommand(); - var SFNClient_1 = require_SFNClient(); - var makePagedClientRequest = async (client, input, ...args) => { - return await client.send(new GetExecutionHistoryCommand_1.GetExecutionHistoryCommand(input), ...args); - }; - async function* paginateGetExecutionHistory(config, input, ...additionalArguments) { - let token = config.startingToken || void 0; - let hasNext = true; - let page; - while (hasNext) { - input.nextToken = token; - input["maxResults"] = config.pageSize; - if (config.client instanceof SFNClient_1.SFNClient) { - page = await makePagedClientRequest(config.client, input, ...additionalArguments); - } else { - throw new Error("Invalid client, expected SFN | SFNClient"); - } - yield page; - const prevToken = token; - token = page.nextToken; - hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken)); - } - return void 0; - } - exports2.paginateGetExecutionHistory = paginateGetExecutionHistory; - } -}); - -// ../../../node_modules/@aws-sdk/client-sfn/dist-cjs/pagination/Interfaces.js -var require_Interfaces2 = __commonJS({ - "../../../node_modules/@aws-sdk/client-sfn/dist-cjs/pagination/Interfaces.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - } -}); - -// ../../../node_modules/@aws-sdk/client-sfn/dist-cjs/pagination/ListActivitiesPaginator.js -var require_ListActivitiesPaginator = __commonJS({ - "../../../node_modules/@aws-sdk/client-sfn/dist-cjs/pagination/ListActivitiesPaginator.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.paginateListActivities = void 0; - var ListActivitiesCommand_1 = require_ListActivitiesCommand(); - var SFNClient_1 = require_SFNClient(); - var makePagedClientRequest = async (client, input, ...args) => { - return await client.send(new ListActivitiesCommand_1.ListActivitiesCommand(input), ...args); - }; - async function* paginateListActivities(config, input, ...additionalArguments) { - let token = config.startingToken || void 0; - let hasNext = true; - let page; - while (hasNext) { - input.nextToken = token; - input["maxResults"] = config.pageSize; - if (config.client instanceof SFNClient_1.SFNClient) { - page = await makePagedClientRequest(config.client, input, ...additionalArguments); - } else { - throw new Error("Invalid client, expected SFN | SFNClient"); - } - yield page; - const prevToken = token; - token = page.nextToken; - hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken)); - } - return void 0; - } - exports2.paginateListActivities = paginateListActivities; - } -}); - -// ../../../node_modules/@aws-sdk/client-sfn/dist-cjs/pagination/ListExecutionsPaginator.js -var require_ListExecutionsPaginator = __commonJS({ - "../../../node_modules/@aws-sdk/client-sfn/dist-cjs/pagination/ListExecutionsPaginator.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.paginateListExecutions = void 0; - var ListExecutionsCommand_1 = require_ListExecutionsCommand(); - var SFNClient_1 = require_SFNClient(); - var makePagedClientRequest = async (client, input, ...args) => { - return await client.send(new ListExecutionsCommand_1.ListExecutionsCommand(input), ...args); - }; - async function* paginateListExecutions(config, input, ...additionalArguments) { - let token = config.startingToken || void 0; - let hasNext = true; - let page; - while (hasNext) { - input.nextToken = token; - input["maxResults"] = config.pageSize; - if (config.client instanceof SFNClient_1.SFNClient) { - page = await makePagedClientRequest(config.client, input, ...additionalArguments); - } else { - throw new Error("Invalid client, expected SFN | SFNClient"); - } - yield page; - const prevToken = token; - token = page.nextToken; - hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken)); - } - return void 0; - } - exports2.paginateListExecutions = paginateListExecutions; - } -}); - -// ../../../node_modules/@aws-sdk/client-sfn/dist-cjs/pagination/ListMapRunsPaginator.js -var require_ListMapRunsPaginator = __commonJS({ - "../../../node_modules/@aws-sdk/client-sfn/dist-cjs/pagination/ListMapRunsPaginator.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.paginateListMapRuns = void 0; - var ListMapRunsCommand_1 = require_ListMapRunsCommand(); - var SFNClient_1 = require_SFNClient(); - var makePagedClientRequest = async (client, input, ...args) => { - return await client.send(new ListMapRunsCommand_1.ListMapRunsCommand(input), ...args); - }; - async function* paginateListMapRuns(config, input, ...additionalArguments) { - let token = config.startingToken || void 0; - let hasNext = true; - let page; - while (hasNext) { - input.nextToken = token; - input["maxResults"] = config.pageSize; - if (config.client instanceof SFNClient_1.SFNClient) { - page = await makePagedClientRequest(config.client, input, ...additionalArguments); - } else { - throw new Error("Invalid client, expected SFN | SFNClient"); - } - yield page; - const prevToken = token; - token = page.nextToken; - hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken)); - } - return void 0; - } - exports2.paginateListMapRuns = paginateListMapRuns; - } -}); - -// ../../../node_modules/@aws-sdk/client-sfn/dist-cjs/pagination/ListStateMachinesPaginator.js -var require_ListStateMachinesPaginator = __commonJS({ - "../../../node_modules/@aws-sdk/client-sfn/dist-cjs/pagination/ListStateMachinesPaginator.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.paginateListStateMachines = void 0; - var ListStateMachinesCommand_1 = require_ListStateMachinesCommand(); - var SFNClient_1 = require_SFNClient(); - var makePagedClientRequest = async (client, input, ...args) => { - return await client.send(new ListStateMachinesCommand_1.ListStateMachinesCommand(input), ...args); - }; - async function* paginateListStateMachines(config, input, ...additionalArguments) { - let token = config.startingToken || void 0; - let hasNext = true; - let page; - while (hasNext) { - input.nextToken = token; - input["maxResults"] = config.pageSize; - if (config.client instanceof SFNClient_1.SFNClient) { - page = await makePagedClientRequest(config.client, input, ...additionalArguments); - } else { - throw new Error("Invalid client, expected SFN | SFNClient"); - } - yield page; - const prevToken = token; - token = page.nextToken; - hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken)); - } - return void 0; - } - exports2.paginateListStateMachines = paginateListStateMachines; - } -}); - -// ../../../node_modules/@aws-sdk/client-sfn/dist-cjs/pagination/index.js -var require_pagination3 = __commonJS({ - "../../../node_modules/@aws-sdk/client-sfn/dist-cjs/pagination/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); - tslib_1.__exportStar(require_GetExecutionHistoryPaginator(), exports2); - tslib_1.__exportStar(require_Interfaces2(), exports2); - tslib_1.__exportStar(require_ListActivitiesPaginator(), exports2); - tslib_1.__exportStar(require_ListExecutionsPaginator(), exports2); - tslib_1.__exportStar(require_ListMapRunsPaginator(), exports2); - tslib_1.__exportStar(require_ListStateMachinesPaginator(), exports2); - } -}); - -// ../../../node_modules/@aws-sdk/client-sfn/dist-cjs/models/index.js -var require_models3 = __commonJS({ - "../../../node_modules/@aws-sdk/client-sfn/dist-cjs/models/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); - tslib_1.__exportStar(require_models_03(), exports2); - } -}); - -// ../../../node_modules/@aws-sdk/client-sfn/dist-cjs/index.js -var require_dist_cjs52 = __commonJS({ - "../../../node_modules/@aws-sdk/client-sfn/dist-cjs/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.SFNServiceException = void 0; - var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); - tslib_1.__exportStar(require_SFNClient(), exports2); - tslib_1.__exportStar(require_SFN(), exports2); - tslib_1.__exportStar(require_commands3(), exports2); - tslib_1.__exportStar(require_pagination3(), exports2); - tslib_1.__exportStar(require_models3(), exports2); - var SFNServiceException_1 = require_SFNServiceException(); - Object.defineProperty(exports2, "SFNServiceException", { enumerable: true, get: function() { - return SFNServiceException_1.SFNServiceException; - } }); + CreateActivityCommand, + CreateStateMachineCommand, + CreateStateMachineAliasCommand, + DeleteActivityCommand, + DeleteStateMachineCommand, + DeleteStateMachineAliasCommand, + DeleteStateMachineVersionCommand, + DescribeActivityCommand, + DescribeExecutionCommand, + DescribeMapRunCommand, + DescribeStateMachineCommand, + DescribeStateMachineAliasCommand, + DescribeStateMachineForExecutionCommand, + GetActivityTaskCommand, + GetExecutionHistoryCommand, + ListActivitiesCommand, + ListExecutionsCommand, + ListMapRunsCommand, + ListStateMachineAliasesCommand, + ListStateMachinesCommand, + ListStateMachineVersionsCommand, + ListTagsForResourceCommand, + PublishStateMachineVersionCommand, + RedriveExecutionCommand, + SendTaskFailureCommand, + SendTaskHeartbeatCommand, + SendTaskSuccessCommand, + StartExecutionCommand, + StartSyncExecutionCommand, + StopExecutionCommand, + TagResourceCommand, + TestStateCommand, + UntagResourceCommand, + UpdateMapRunCommand, + UpdateStateMachineCommand, + UpdateStateMachineAliasCommand, + ValidateStateMachineDefinitionCommand + }; + var _SFN = class _SFN extends SFNClient { + }; + __name(_SFN, "SFN"); + var SFN2 = _SFN; + (0, import_smithy_client5.createAggregatedClient)(commands, SFN2); + var paginateGetExecutionHistory = (0, import_core3.createPaginator)(SFNClient, GetExecutionHistoryCommand, "nextToken", "nextToken", "maxResults"); + var paginateListActivities = (0, import_core3.createPaginator)(SFNClient, ListActivitiesCommand, "nextToken", "nextToken", "maxResults"); + var paginateListExecutions = (0, import_core3.createPaginator)(SFNClient, ListExecutionsCommand, "nextToken", "nextToken", "maxResults"); + var paginateListMapRuns = (0, import_core3.createPaginator)(SFNClient, ListMapRunsCommand, "nextToken", "nextToken", "maxResults"); + var paginateListStateMachines = (0, import_core3.createPaginator)(SFNClient, ListStateMachinesCommand, "nextToken", "nextToken", "maxResults"); } }); // ../../../node_modules/webidl-conversions/lib/index.js -var require_lib2 = __commonJS({ +var require_lib = __commonJS({ "../../../node_modules/webidl-conversions/lib/index.js"(exports2, module2) { "use strict"; var conversions = {}; @@ -22866,7 +26559,7 @@ var require_lib2 = __commonJS({ }); // ../../../node_modules/whatwg-url/lib/utils.js -var require_utils2 = __commonJS({ +var require_utils = __commonJS({ "../../../node_modules/whatwg-url/lib/utils.js"(exports2, module2) { "use strict"; module2.exports.mixin = function mixin(target, source) { @@ -24287,8 +27980,8 @@ var require_URL_impl = __commonJS({ var require_URL = __commonJS({ "../../../node_modules/whatwg-url/lib/URL.js"(exports2, module2) { "use strict"; - var conversions = require_lib2(); - var utils = require_utils2(); + var conversions = require_lib(); + var utils = require_utils(); var Impl = require_URL_impl(); var impl = utils.implSymbol; function URL3(url2) { @@ -27998,7 +31691,7 @@ var require_streams = __commonJS({ }); // ../../../node_modules/iconv-lite/lib/index.js -var require_lib3 = __commonJS({ +var require_lib2 = __commonJS({ "../../../node_modules/iconv-lite/lib/index.js"(exports2, module2) { "use strict"; var Buffer2 = require_safer().Buffer; @@ -28121,7 +31814,7 @@ var require_lib3 = __commonJS({ var require_encoding = __commonJS({ "../../../node_modules/encoding/lib/encoding.js"(exports2, module2) { "use strict"; - var iconvLite = require_lib3(); + var iconvLite = require_lib2(); module2.exports.convert = convert; function convert(str, to, from) { from = checkEncoding(from || "UTF-8"); @@ -28166,7 +31859,7 @@ var require_encoding = __commonJS({ }); // ../../../node_modules/node-fetch/lib/index.js -var require_lib4 = __commonJS({ +var require_lib3 = __commonJS({ "../../../node_modules/node-fetch/lib/index.js"(exports2, module2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -28182,7 +31875,7 @@ var require_lib4 = __commonJS({ var Readable = Stream.Readable; var BUFFER = Symbol("buffer"); var TYPE = Symbol("type"); - var Blob = class _Blob { + var Blob2 = class _Blob { constructor() { this[TYPE] = ""; const blobParts = arguments[0]; @@ -28268,12 +31961,12 @@ var require_lib4 = __commonJS({ return blob; } }; - Object.defineProperties(Blob.prototype, { + Object.defineProperties(Blob2.prototype, { size: { enumerable: true }, type: { enumerable: true }, slice: { enumerable: true } }); - Object.defineProperty(Blob.prototype, Symbol.toStringTag, { + Object.defineProperty(Blob2.prototype, Symbol.toStringTag, { value: "Blob", writable: false, enumerable: false, @@ -28359,7 +32052,7 @@ var require_lib4 = __commonJS({ return consumeBody.call(this).then(function(buf) { return Object.assign( // Prevent copying - new Blob([], { + new Blob2([], { type: ct.toLowerCase() }), { @@ -28637,7 +32330,7 @@ var require_lib4 = __commonJS({ return void 0; } var MAP = Symbol("map"); - var Headers = class _Headers { + var Headers2 = class _Headers { /** * Headers class * @@ -28815,14 +32508,14 @@ var require_lib4 = __commonJS({ return createHeadersIterator(this, "key+value"); } }; - Headers.prototype.entries = Headers.prototype[Symbol.iterator]; - Object.defineProperty(Headers.prototype, Symbol.toStringTag, { + Headers2.prototype.entries = Headers2.prototype[Symbol.iterator]; + Object.defineProperty(Headers2.prototype, Symbol.toStringTag, { value: "Headers", writable: false, enumerable: false, configurable: true }); - Object.defineProperties(Headers.prototype, { + Object.defineProperties(Headers2.prototype, { get: { enumerable: true }, forEach: { enumerable: true }, set: { enumerable: true }, @@ -28891,7 +32584,7 @@ var require_lib4 = __commonJS({ return obj; } function createHeadersLenient(obj) { - const headers = new Headers(); + const headers = new Headers2(); for (const name of Object.keys(obj)) { if (invalidTokenRegex.test(name)) { continue; @@ -28921,7 +32614,7 @@ var require_lib4 = __commonJS({ let opts = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; Body.call(this, body, opts); const status = opts.status || 200; - const headers = new Headers(opts.headers); + const headers = new Headers2(opts.headers); if (body != null && !headers.has("Content-Type")) { const contentType = extractContentType(body); if (contentType) { @@ -29007,7 +32700,7 @@ var require_lib4 = __commonJS({ const proto = signal && typeof signal === "object" && Object.getPrototypeOf(signal); return !!(proto && proto.constructor.name === "AbortSignal"); } - var Request = class _Request { + var Request2 = class _Request { constructor(input) { let init = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; let parsedURL; @@ -29031,7 +32724,7 @@ var require_lib4 = __commonJS({ timeout: init.timeout || input.timeout || 0, size: init.size || input.size || 0 }); - const headers = new Headers(init.headers || input.headers || {}); + const headers = new Headers2(init.headers || input.headers || {}); if (inputBody != null && !headers.has("Content-Type")) { const contentType = extractContentType(inputBody); if (contentType) { @@ -29079,14 +32772,14 @@ var require_lib4 = __commonJS({ return new _Request(this); } }; - Body.mixIn(Request.prototype); - Object.defineProperty(Request.prototype, Symbol.toStringTag, { + Body.mixIn(Request2.prototype); + Object.defineProperty(Request2.prototype, Symbol.toStringTag, { value: "Request", writable: false, enumerable: false, configurable: true }); - Object.defineProperties(Request.prototype, { + Object.defineProperties(Request2.prototype, { method: { enumerable: true }, url: { enumerable: true }, headers: { enumerable: true }, @@ -29096,7 +32789,7 @@ var require_lib4 = __commonJS({ }); function getNodeRequestOptions(request2) { const parsedURL = request2[INTERNALS$2].parsedURL; - const headers = new Headers(request2[INTERNALS$2].headers); + const headers = new Headers2(request2[INTERNALS$2].headers); if (!headers.has("Accept")) { headers.set("Accept", "*/*"); } @@ -29159,13 +32852,13 @@ var require_lib4 = __commonJS({ const dest = new URL$1(destination).protocol; return orig === dest; }; - function fetch2(url2, opts) { - if (!fetch2.Promise) { + function fetch3(url2, opts) { + if (!fetch3.Promise) { throw new Error("native promise missing, set fetch.Promise to your favorite alternative"); } - Body.Promise = fetch2.Promise; - return new fetch2.Promise(function(resolve, reject) { - const request2 = new Request(url2, opts); + Body.Promise = fetch3.Promise; + return new fetch3.Promise(function(resolve, reject) { + const request2 = new Request2(url2, opts); const options = getNodeRequestOptions(request2); const send = (options.protocol === "https:" ? https2 : http).request; const signal = request2.signal; @@ -29235,7 +32928,7 @@ var require_lib4 = __commonJS({ req.on("response", function(res) { clearTimeout(reqTimeout); const headers = createHeadersLenient(res.headers); - if (fetch2.isRedirect(res.statusCode)) { + if (fetch3.isRedirect(res.statusCode)) { const location = headers.get("Location"); let locationURL = null; try { @@ -29271,7 +32964,7 @@ var require_lib4 = __commonJS({ return; } const requestOpts = { - headers: new Headers(request2.headers), + headers: new Headers2(request2.headers), follow: request2.follow, counter: request2.counter + 1, agent: request2.agent, @@ -29297,7 +32990,7 @@ var require_lib4 = __commonJS({ requestOpts.body = void 0; requestOpts.headers.delete("content-length"); } - resolve(fetch2(new Request(locationURL, requestOpts))); + resolve(fetch3(new Request2(locationURL, requestOpts))); finalize(); return; } @@ -29389,15 +33082,15 @@ var require_lib4 = __commonJS({ stream.end(); } } - fetch2.isRedirect = function(code) { + fetch3.isRedirect = function(code) { return code === 301 || code === 302 || code === 303 || code === 307 || code === 308; }; - fetch2.Promise = global.Promise; - module2.exports = exports2 = fetch2; + fetch3.Promise = global.Promise; + module2.exports = exports2 = fetch3; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = exports2; - exports2.Headers = Headers; - exports2.Request = Request; + exports2.Headers = Headers2; + exports2.Request = Request2; exports2.Response = Response2; exports2.FetchError = FetchError; exports2.AbortError = AbortError; @@ -30992,7 +34685,7 @@ var init_api_call = __esm({ }); // ../aws-custom-resource-sdk-adapter/lib/index.js -var require_lib5 = __commonJS({ +var require_lib4 = __commonJS({ "../aws-custom-resource-sdk-adapter/lib/index.js"(exports2) { "use strict"; var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { @@ -31047,7 +34740,7 @@ var import_helpers_internal = __toESM(require_helpers_internal()); // lib/assertions/providers/lambda-handler/base.ts var https = __toESM(require("https")); var url = __toESM(require("url")); -var import_client_sfn = __toESM(require_dist_cjs52()); +var import_client_sfn = __toESM(require_dist_cjs80()); var CustomResourceHandler = class { constructor(event, context) { this.event = event; @@ -31303,7 +34996,7 @@ function decodeCall(call) { } // lib/assertions/providers/lambda-handler/http.ts -var import_node_fetch = __toESM(require_lib4()); +var import_node_fetch = __toESM(require_lib3()); var HttpHandler = class extends CustomResourceHandler { async processEvent(request2) { console.log("request", request2); @@ -31326,7 +35019,7 @@ var HttpHandler = class extends CustomResourceHandler { }; // lib/assertions/providers/lambda-handler/sdk.ts -var import_aws_custom_resource_sdk_adapter = __toESM(require_lib5()); +var import_aws_custom_resource_sdk_adapter = __toESM(require_lib4()); // lib/assertions/providers/lambda-handler/utils.ts function deepParseJson(x) { diff --git a/packages/@aws-cdk-testing/framework-integ/test/triggers/test/integ.triggers.js.snapshot/asset.ac5727a1b8e23c42dabba9ff5155c8fb26ae68568e083beac0908af8e70fc606/__entrypoint__.js b/packages/@aws-cdk-testing/framework-integ/test/triggers/test/integ.triggers.js.snapshot/asset.6e5c0f63875937fea22d274138fc297c2a753e7516d437661017ee38ced6816c/__entrypoint__.js similarity index 100% rename from packages/@aws-cdk-testing/framework-integ/test/triggers/test/integ.triggers.js.snapshot/asset.ac5727a1b8e23c42dabba9ff5155c8fb26ae68568e083beac0908af8e70fc606/__entrypoint__.js rename to packages/@aws-cdk-testing/framework-integ/test/triggers/test/integ.triggers.js.snapshot/asset.6e5c0f63875937fea22d274138fc297c2a753e7516d437661017ee38ced6816c/__entrypoint__.js diff --git a/packages/@aws-cdk-testing/framework-integ/test/triggers/test/integ.triggers.js.snapshot/asset.6e5c0f63875937fea22d274138fc297c2a753e7516d437661017ee38ced6816c/index.js b/packages/@aws-cdk-testing/framework-integ/test/triggers/test/integ.triggers.js.snapshot/asset.6e5c0f63875937fea22d274138fc297c2a753e7516d437661017ee38ced6816c/index.js new file mode 100644 index 0000000000000..45ab08cbe4a1d --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/triggers/test/integ.triggers.js.snapshot/asset.6e5c0f63875937fea22d274138fc297c2a753e7516d437661017ee38ced6816c/index.js @@ -0,0 +1,4 @@ +"use strict";var Be=Object.create;var S=Object.defineProperty;var Qe=Object.getOwnPropertyDescriptor;var We=Object.getOwnPropertyNames;var Ke=Object.getPrototypeOf,Ve=Object.prototype.hasOwnProperty;var H=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Ye=(t,e)=>{for(var r in e)S(t,r,{get:e[r],enumerable:!0})},Q=(t,e,r,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of We(e))!Ve.call(t,n)&&n!==r&&S(t,n,{get:()=>e[n],enumerable:!(o=Qe(e,n))||o.enumerable});return t};var Je=(t,e,r)=>(r=t!=null?Be(Ke(t)):{},Q(e||!t||!t.__esModule?S(r,"default",{value:t,enumerable:!0}):r,t)),ze=t=>Q(S({},"__esModule",{value:!0}),t);var ee=H((cr,Z)=>{"use strict";var O=Object.defineProperty,Xe=Object.getOwnPropertyDescriptor,Ge=Object.getOwnPropertyNames,Ze=Object.prototype.hasOwnProperty,A=(t,e)=>O(t,"name",{value:e,configurable:!0}),et=(t,e)=>{for(var r in e)O(t,r,{get:e[r],enumerable:!0})},tt=(t,e,r,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Ge(e))!Ze.call(t,n)&&n!==r&&O(t,n,{get:()=>e[n],enumerable:!(o=Xe(e,n))||o.enumerable});return t},rt=t=>tt(O({},"__esModule",{value:!0}),t),W={};et(W,{AlgorithmId:()=>J,EndpointURLScheme:()=>Y,FieldPosition:()=>z,HttpApiKeyAuthLocation:()=>V,HttpAuthLocation:()=>K,IniSectionType:()=>X,RequestHandlerProtocol:()=>G,SMITHY_CONTEXT_KEY:()=>at,getDefaultClientConfiguration:()=>st,resolveDefaultRuntimeConfig:()=>it});Z.exports=rt(W);var K=(t=>(t.HEADER="header",t.QUERY="query",t))(K||{}),V=(t=>(t.HEADER="header",t.QUERY="query",t))(V||{}),Y=(t=>(t.HTTP="http",t.HTTPS="https",t))(Y||{}),J=(t=>(t.MD5="md5",t.CRC32="crc32",t.CRC32C="crc32c",t.SHA1="sha1",t.SHA256="sha256",t))(J||{}),ot=A(t=>{let e=[];return t.sha256!==void 0&&e.push({algorithmId:()=>"sha256",checksumConstructor:()=>t.sha256}),t.md5!=null&&e.push({algorithmId:()=>"md5",checksumConstructor:()=>t.md5}),{_checksumAlgorithms:e,addChecksumAlgorithm(r){this._checksumAlgorithms.push(r)},checksumAlgorithms(){return this._checksumAlgorithms}}},"getChecksumConfiguration"),nt=A(t=>{let e={};return t.checksumAlgorithms().forEach(r=>{e[r.algorithmId()]=r.checksumConstructor()}),e},"resolveChecksumRuntimeConfig"),st=A(t=>({...ot(t)}),"getDefaultClientConfiguration"),it=A(t=>({...nt(t)}),"resolveDefaultRuntimeConfig"),z=(t=>(t[t.HEADER=0]="HEADER",t[t.TRAILER=1]="TRAILER",t))(z||{}),at="__smithy_context",X=(t=>(t.PROFILE="profile",t.SSO_SESSION="sso-session",t.SERVICES="services",t))(X||{}),G=(t=>(t.HTTP_0_9="http/0.9",t.HTTP_1_0="http/1.0",t.TDS_8_0="tds/8.0",t))(G||{})});var le=H((hr,ue)=>{"use strict";var k=Object.defineProperty,ct=Object.getOwnPropertyDescriptor,ut=Object.getOwnPropertyNames,lt=Object.prototype.hasOwnProperty,E=(t,e)=>k(t,"name",{value:e,configurable:!0}),dt=(t,e)=>{for(var r in e)k(t,r,{get:e[r],enumerable:!0})},ht=(t,e,r,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of ut(e))!lt.call(t,n)&&n!==r&&k(t,n,{get:()=>e[n],enumerable:!(o=ct(e,n))||o.enumerable});return t},ft=t=>ht(k({},"__esModule",{value:!0}),t),te={};dt(te,{Field:()=>gt,Fields:()=>vt,HttpRequest:()=>yt,HttpResponse:()=>_t,IHttpRequest:()=>re.HttpRequest,getHttpHandlerExtensionConfiguration:()=>pt,isValidHostname:()=>ce,resolveHttpHandlerRuntimeConfig:()=>mt});ue.exports=ft(te);var pt=E(t=>{let e=t.httpHandler;return{setHttpHandler(r){e=r},httpHandler(){return e},updateHttpClientConfig(r,o){e.updateHttpClientConfig(r,o)},httpHandlerConfigs(){return e.httpHandlerConfigs()}}},"getHttpHandlerExtensionConfiguration"),mt=E(t=>({httpHandler:t.httpHandler()}),"resolveHttpHandlerRuntimeConfig"),re=ee(),oe=class{constructor({name:e,kind:r=re.FieldPosition.HEADER,values:o=[]}){this.name=e,this.kind=r,this.values=o}add(e){this.values.push(e)}set(e){this.values=e}remove(e){this.values=this.values.filter(r=>r!==e)}toString(){return this.values.map(e=>e.includes(",")||e.includes(" ")?`"${e}"`:e).join(", ")}get(){return this.values}};E(oe,"Field");var gt=oe,ne=class{constructor({fields:e=[],encoding:r="utf-8"}){this.entries={},e.forEach(this.setField.bind(this)),this.encoding=r}setField(e){this.entries[e.name.toLowerCase()]=e}getField(e){return this.entries[e.toLowerCase()]}removeField(e){delete this.entries[e.toLowerCase()]}getByType(e){return Object.values(this.entries).filter(r=>r.kind===e)}};E(ne,"Fields");var vt=ne,se=class j{constructor(e){this.method=e.method||"GET",this.hostname=e.hostname||"localhost",this.port=e.port,this.query=e.query||{},this.headers=e.headers||{},this.body=e.body,this.protocol=e.protocol?e.protocol.slice(-1)!==":"?`${e.protocol}:`:e.protocol:"https:",this.path=e.path?e.path.charAt(0)!=="/"?`/${e.path}`:e.path:"/",this.username=e.username,this.password=e.password,this.fragment=e.fragment}static clone(e){let r=new j({...e,headers:{...e.headers}});return r.query&&(r.query=ie(r.query)),r}static isInstance(e){if(!e)return!1;let r=e;return"method"in r&&"protocol"in r&&"hostname"in r&&"path"in r&&typeof r.query=="object"&&typeof r.headers=="object"}clone(){return j.clone(this)}};E(se,"HttpRequest");var yt=se;function ie(t){return Object.keys(t).reduce((e,r)=>{let o=t[r];return{...e,[r]:Array.isArray(o)?[...o]:o}},{})}E(ie,"cloneQuery");var ae=class{constructor(e){this.statusCode=e.statusCode,this.reason=e.reason,this.headers=e.headers||{},this.body=e.body}static isInstance(e){if(!e)return!1;let r=e;return typeof r.statusCode=="number"&&typeof r.headers=="object"}};E(ae,"HttpResponse");var _t=ae;function ce(t){return/^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/.test(t)}E(ce,"isValidHostname")});var pe=H((fr,fe)=>{"use strict";var x=Object.defineProperty,Et=Object.getOwnPropertyDescriptor,bt=Object.getOwnPropertyNames,Ct=Object.prototype.hasOwnProperty,U=(t,e)=>x(t,"name",{value:e,configurable:!0}),wt=(t,e)=>{for(var r in e)x(t,r,{get:e[r],enumerable:!0})},Tt=(t,e,r,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of bt(e))!Ct.call(t,n)&&n!==r&&x(t,n,{get:()=>e[n],enumerable:!(o=Et(e,n))||o.enumerable});return t},Ht=t=>Tt(x({},"__esModule",{value:!0}),t),de={};wt(de,{escapeUri:()=>he,escapeUriPath:()=>Rt});fe.exports=Ht(de);var he=U(t=>encodeURIComponent(t).replace(/[!'()*]/g,Pt),"escapeUri"),Pt=U(t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`,"hexEncode"),Rt=U(t=>t.split("/").map(he).join("/"),"escapeUriPath")});var ye=H((pr,ve)=>{"use strict";var D=Object.defineProperty,St=Object.getOwnPropertyDescriptor,Ot=Object.getOwnPropertyNames,At=Object.prototype.hasOwnProperty,kt=(t,e)=>D(t,"name",{value:e,configurable:!0}),xt=(t,e)=>{for(var r in e)D(t,r,{get:e[r],enumerable:!0})},Dt=(t,e,r,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Ot(e))!At.call(t,n)&&n!==r&&D(t,n,{get:()=>e[n],enumerable:!(o=St(e,n))||o.enumerable});return t},Nt=t=>Dt(D({},"__esModule",{value:!0}),t),me={};xt(me,{buildQueryString:()=>ge});ve.exports=Nt(me);var I=pe();function ge(t){let e=[];for(let r of Object.keys(t).sort()){let o=t[r];if(r=(0,I.escapeUri)(r),Array.isArray(o))for(let n=0,s=o.length;n{"use strict";var jt=Object.create,P=Object.defineProperty,Ut=Object.getOwnPropertyDescriptor,It=Object.getOwnPropertyNames,Lt=Object.getPrototypeOf,$t=Object.prototype.hasOwnProperty,u=(t,e)=>P(t,"name",{value:e,configurable:!0}),Ft=(t,e)=>{for(var r in e)P(t,r,{get:e[r],enumerable:!0})},we=(t,e,r,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of It(e))!$t.call(t,n)&&n!==r&&P(t,n,{get:()=>e[n],enumerable:!(o=Ut(e,n))||o.enumerable});return t},Mt=(t,e,r)=>(r=t!=null?jt(Lt(t)):{},we(e||!t||!t.__esModule?P(r,"default",{value:t,enumerable:!0}):r,t)),qt=t=>we(P({},"__esModule",{value:!0}),t),Te={};Ft(Te,{DEFAULT_REQUEST_TIMEOUT:()=>Yt,NodeHttp2Handler:()=>Zt,NodeHttpHandler:()=>Jt,streamCollector:()=>tr});Ie.exports=qt(Te);var He=le(),Pe=ye(),L=require("http"),$=require("https"),Bt=["ECONNRESET","EPIPE","ETIMEDOUT"],Re=u(t=>{let e={};for(let r of Object.keys(t)){let o=t[r];e[r]=Array.isArray(o)?o.join(","):o}return e},"getTransformedHeaders"),_e=1e3,Qt=u((t,e,r=0)=>{if(!r)return-1;let o=u(n=>{let s=setTimeout(()=>{t.destroy(),e(Object.assign(new Error(`Socket timed out without establishing a connection within ${r} ms`),{name:"TimeoutError"}))},r-n),i=u(a=>{a?.connecting?a.on("connect",()=>{clearTimeout(s)}):clearTimeout(s)},"doWithSocket");t.socket?i(t.socket):t.on("socket",i)},"registerTimeout");return r<2e3?(o(0),0):setTimeout(o.bind(null,_e),_e)},"setConnectionTimeout"),Wt=3e3,Kt=u((t,{keepAlive:e,keepAliveMsecs:r},o=Wt)=>{if(e!==!0)return-1;let n=u(()=>{t.socket?t.socket.setKeepAlive(e,r||0):t.on("socket",s=>{s.setKeepAlive(e,r||0)})},"registerListener");return o===0?(n(),0):setTimeout(n,o)},"setSocketKeepAlive"),Ee=3e3,Vt=u((t,e,r=0)=>{let o=u(n=>{t.setTimeout(r-n,()=>{t.destroy(),e(Object.assign(new Error(`Connection timed out after ${r} ms`),{name:"TimeoutError"}))})},"registerTimeout");return 0{s=Number(setTimeout(a,Math.max(be,r)))}),new Promise(a=>{t.on("continue",()=>{clearTimeout(s),a()}),t.on("error",()=>{i=!0,clearTimeout(s),a()})})]),i||Oe(t,e.body)}u(M,"writeRequestBody");function Oe(t,e){if(e instanceof Se.Readable){e.pipe(t);return}if(e){if(Buffer.isBuffer(e)||typeof e=="string"){t.end(e);return}let r=e;if(typeof r=="object"&&r.buffer&&typeof r.byteOffset=="number"&&typeof r.byteLength=="number"){t.end(Buffer.from(r.buffer,r.byteOffset,r.byteLength));return}t.end(Buffer.from(e));return}t.end()}u(Oe,"writeBody");var Yt=0,Ae=class F{constructor(e){this.socketWarningTimestamp=0,this.metadata={handlerProtocol:"http/1.1"},this.configProvider=new Promise((r,o)=>{typeof e=="function"?e().then(n=>{r(this.resolveDefaultConfig(n))}).catch(o):r(this.resolveDefaultConfig(e))})}static create(e){return typeof e?.handle=="function"?e:new F(e)}static checkSocketUsage(e,r,o=console){var n,s,i;let{sockets:a,requests:c,maxSockets:f}=e;if(typeof f!="number"||f===1/0||Date.now()-15e3=f&&y>=2*f)return(i=o?.warn)==null||i.call(o,`@smithy/node-http-handler:WARN - socket usage at capacity=${C} and ${y} additional requests are enqueued. +See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html +or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`),Date.now()}return r}resolveDefaultConfig(e){let{requestTimeout:r,connectionTimeout:o,socketTimeout:n,httpAgent:s,httpsAgent:i}=e||{},a=!0,c=50;return{connectionTimeout:o,requestTimeout:r??n,httpAgent:s instanceof L.Agent||typeof s?.destroy=="function"?s:new L.Agent({keepAlive:a,maxSockets:c,...s}),httpsAgent:i instanceof $.Agent||typeof i?.destroy=="function"?i:new $.Agent({keepAlive:a,maxSockets:c,...i}),logger:console}}destroy(){var e,r,o,n;(r=(e=this.config)==null?void 0:e.httpAgent)==null||r.destroy(),(n=(o=this.config)==null?void 0:o.httpsAgent)==null||n.destroy()}async handle(e,{abortSignal:r}={}){return this.config||(this.config=await this.configProvider),new Promise((o,n)=>{let s,i=[],a=u(async l=>{await s,i.forEach(clearTimeout),o(l)},"resolve"),c=u(async l=>{await s,i.forEach(clearTimeout),n(l)},"reject");if(!this.config)throw new Error("Node HTTP request handler config is not resolved");if(r?.aborted){let l=new Error("Request aborted");l.name="AbortError",c(l);return}let f=e.protocol==="https:",b=f?this.config.httpsAgent:this.config.httpAgent;i.push(setTimeout(()=>{this.socketWarningTimestamp=F.checkSocketUsage(b,this.socketWarningTimestamp,this.config.logger)},this.config.socketAcquisitionWarningTimeout??(this.config.requestTimeout??2e3)+(this.config.connectionTimeout??1e3)));let v=(0,Pe.buildQueryString)(e.query||{}),C;if(e.username!=null||e.password!=null){let l=e.username??"",h=e.password??"";C=`${l}:${h}`}let y=e.path;v&&(y+=`?${v}`),e.fragment&&(y+=`#${e.fragment}`);let _=e.hostname??"";_[0]==="["&&_.endsWith("]")?_=e.hostname.slice(1,-1):_=e.hostname;let R={headers:e.headers,host:_,method:e.method,path:y,port:e.port,agent:b,auth:C},g=(f?$.request:L.request)(R,l=>{let h=new He.HttpResponse({statusCode:l.statusCode||-1,reason:l.statusMessage,headers:Re(l.headers),body:l});a({response:h})});if(g.on("error",l=>{Bt.includes(l.code)?c(Object.assign(l,{name:"TimeoutError"})):c(l)}),r){let l=u(()=>{g.destroy();let h=new Error("Request aborted");h.name="AbortError",c(h)},"onAbort");if(typeof r.addEventListener=="function"){let h=r;h.addEventListener("abort",l,{once:!0}),g.once("close",()=>h.removeEventListener("abort",l))}else r.onabort=l}i.push(Qt(g,c,this.config.connectionTimeout)),i.push(Vt(g,c,this.config.requestTimeout));let w=R.agent;typeof w=="object"&&"keepAlive"in w&&i.push(Kt(g,{keepAlive:w.keepAlive,keepAliveMsecs:w.keepAliveMsecs})),s=M(g,e,this.config.requestTimeout).catch(l=>(i.forEach(clearTimeout),n(l)))})}updateHttpClientConfig(e,r){this.config=void 0,this.configProvider=this.configProvider.then(o=>({...o,[e]:r}))}httpHandlerConfigs(){return this.config??{}}};u(Ae,"NodeHttpHandler");var Jt=Ae,Ce=require("http2"),zt=Mt(require("http2")),ke=class{constructor(e){this.sessions=[],this.sessions=e??[]}poll(){if(this.sessions.length>0)return this.sessions.shift()}offerLast(e){this.sessions.push(e)}contains(e){return this.sessions.includes(e)}remove(e){this.sessions=this.sessions.filter(r=>r!==e)}[Symbol.iterator](){return this.sessions[Symbol.iterator]()}destroy(e){for(let r of this.sessions)r===e&&(r.destroyed||r.destroy())}};u(ke,"NodeHttp2ConnectionPool");var Xt=ke,xe=class{constructor(e){if(this.sessionCache=new Map,this.config=e,this.config.maxConcurrency&&this.config.maxConcurrency<=0)throw new RangeError("maxConcurrency must be greater than zero.")}lease(e,r){let o=this.getUrlString(e),n=this.sessionCache.get(o);if(n){let c=n.poll();if(c&&!this.config.disableConcurrency)return c}let s=zt.default.connect(o);this.config.maxConcurrency&&s.settings({maxConcurrentStreams:this.config.maxConcurrency},c=>{if(c)throw new Error("Fail to set maxConcurrentStreams to "+this.config.maxConcurrency+"when creating new session for "+e.destination.toString())}),s.unref();let i=u(()=>{s.destroy(),this.deleteSession(o,s)},"destroySessionCb");s.on("goaway",i),s.on("error",i),s.on("frameError",i),s.on("close",()=>this.deleteSession(o,s)),r.requestTimeout&&s.setTimeout(r.requestTimeout,i);let a=this.sessionCache.get(o)||new Xt;return a.offerLast(s),this.sessionCache.set(o,a),s}deleteSession(e,r){let o=this.sessionCache.get(e);o&&o.contains(r)&&(o.remove(r),this.sessionCache.set(e,o))}release(e,r){var o;let n=this.getUrlString(e);(o=this.sessionCache.get(n))==null||o.offerLast(r)}destroy(){for(let[e,r]of this.sessionCache){for(let o of r)o.destroyed||o.destroy(),r.remove(o);this.sessionCache.delete(e)}}setMaxConcurrentStreams(e){if(this.config.maxConcurrency&&this.config.maxConcurrency<=0)throw new RangeError("maxConcurrentStreams must be greater than zero.");this.config.maxConcurrency=e}setDisableConcurrentStreams(e){this.config.disableConcurrency=e}getUrlString(e){return e.destination.toString()}};u(xe,"NodeHttp2ConnectionManager");var Gt=xe,De=class Ne{constructor(e){this.metadata={handlerProtocol:"h2"},this.connectionManager=new Gt({}),this.configProvider=new Promise((r,o)=>{typeof e=="function"?e().then(n=>{r(n||{})}).catch(o):r(e||{})})}static create(e){return typeof e?.handle=="function"?e:new Ne(e)}destroy(){this.connectionManager.destroy()}async handle(e,{abortSignal:r}={}){this.config||(this.config=await this.configProvider,this.connectionManager.setDisableConcurrentStreams(this.config.disableConcurrentStreams||!1),this.config.maxConcurrentStreams&&this.connectionManager.setMaxConcurrentStreams(this.config.maxConcurrentStreams));let{requestTimeout:o,disableConcurrentStreams:n}=this.config;return new Promise((s,i)=>{var a;let c=!1,f,b=u(async d=>{await f,s(d)},"resolve"),v=u(async d=>{await f,i(d)},"reject");if(r?.aborted){c=!0;let d=new Error("Request aborted");d.name="AbortError",v(d);return}let{hostname:C,method:y,port:_,protocol:R,query:q}=e,g="";if(e.username!=null||e.password!=null){let d=e.username??"",m=e.password??"";g=`${d}:${m}@`}let w=`${R}//${g}${C}${_?`:${_}`:""}`,l={destination:new URL(w)},h=this.connectionManager.lease(l,{requestTimeout:(a=this.config)==null?void 0:a.sessionTimeout,disableConcurrentStreams:n||!1}),T=u(d=>{n&&this.destroySession(h),c=!0,v(d)},"rejectWithDestroy"),B=(0,Pe.buildQueryString)(q||{}),N=e.path;B&&(N+=`?${B}`),e.fragment&&(N+=`#${e.fragment}`);let p=h.request({...e.headers,[Ce.constants.HTTP2_HEADER_PATH]:N,[Ce.constants.HTTP2_HEADER_METHOD]:y});if(h.ref(),p.on("response",d=>{let m=new He.HttpResponse({statusCode:d[":status"]||-1,headers:Re(d),body:p});c=!0,b({response:m}),n&&(h.close(),this.connectionManager.deleteSession(w,h))}),o&&p.setTimeout(o,()=>{p.close();let d=new Error(`Stream timed out because of no activity for ${o} ms`);d.name="TimeoutError",T(d)}),r){let d=u(()=>{p.close();let m=new Error("Request aborted");m.name="AbortError",T(m)},"onAbort");if(typeof r.addEventListener=="function"){let m=r;m.addEventListener("abort",d,{once:!0}),p.once("close",()=>m.removeEventListener("abort",d))}else r.onabort=d}p.on("frameError",(d,m,qe)=>{T(new Error(`Frame type id ${d} in stream id ${qe} has failed with code ${m}.`))}),p.on("error",T),p.on("aborted",()=>{T(new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${p.rstCode}.`))}),p.on("close",()=>{h.unref(),n&&h.destroy(),c||T(new Error("Unexpected error: http2 request did not get a response"))}),f=M(p,e,o)})}updateHttpClientConfig(e,r){this.config=void 0,this.configProvider=this.configProvider.then(o=>({...o,[e]:r}))}httpHandlerConfigs(){return this.config??{}}destroySession(e){e.destroyed||e.destroy()}};u(De,"NodeHttp2Handler");var Zt=De,je=class extends Se.Writable{constructor(){super(...arguments),this.bufferedBytes=[]}_write(e,r,o){this.bufferedBytes.push(e),o()}};u(je,"Collector");var er=je,tr=u(t=>rr(t)?Ue(t):new Promise((e,r)=>{let o=new er;t.pipe(o),t.on("error",n=>{o.end(),r(n)}),o.on("error",r),o.on("finish",function(){let n=new Uint8Array(Buffer.concat(this.bufferedBytes));e(n)})}),"streamCollector"),rr=u(t=>typeof ReadableStream=="function"&&t instanceof ReadableStream,"isReadableStreamInstance");async function Ue(t){let e=[],r=t.getReader(),o=!1,n=0;for(;!o;){let{done:a,value:c}=await r.read();c&&(e.push(c),n+=c.length),o=a}let s=new Uint8Array(n),i=0;for(let a of e)s.set(a,i),i+=a.length;return s}u(Ue,"collectReadableStream")});var ir={};Ye(ir,{handler:()=>nr,invoke:()=>Me});module.exports=ze(ir);var $e=require("@aws-sdk/client-lambda"),Fe=Je(Le()),or=t=>{if(t)return new TextDecoder().decode(Buffer.from(t))},Me=async(t,e,r)=>{let o=new $e.Lambda({requestHandler:new Fe.NodeHttpHandler({socketTimeout:r})}),n={FunctionName:t,InvocationType:e};console.log({invokeRequest:n});let s=0,i=5e3,a;for(;;)try{a=await o.invoke(n);break}catch(f){if(f.name==="AccessDeniedException"&&s<12){s++,await new Promise(b=>{setTimeout(b,i)});continue}throw f}let c={...a,Payload:or(a.Payload)};return console.log({invokeResponse:c}),c};async function nr(t){if(console.log({...t,ResponseURL:"..."}),t.RequestType==="Delete"){console.log("not calling trigger on DELETE");return}if(t.RequestType==="Update"&&t.ResourceProperties.ExecuteOnHandlerChange==="false"){console.log("not calling trigger because ExecuteOnHandlerChange is false");return}let e=t.ResourceProperties.HandlerArn;if(!e)throw new Error('The "HandlerArn" property is required');let r=t.ResourceProperties.InvocationType,o=t.ResourceProperties.Timeout,n=parseInt(o);if(isNaN(n))throw new Error(`The "Timeout" property with value ${o} is not parsable to a number`);let s=await Me(e,r,n);if(s.StatusCode&&s.StatusCode>=400)throw new Error(`Trigger handler failed with status code ${s.StatusCode}`);if(s.FunctionError)throw new Error(sr(s.Payload))}function sr(t){if(!t)return"unknown handler error";console.log(`Error payload: ${t}`);try{let e=JSON.parse(t),r=[e.errorMessage,e.trace].filter(o=>o).join(` +`);return r.length>0?r:t}catch{return t}}0&&(module.exports={handler,invoke}); diff --git a/packages/@aws-cdk-testing/framework-integ/test/triggers/test/integ.triggers.js.snapshot/asset.ac5727a1b8e23c42dabba9ff5155c8fb26ae68568e083beac0908af8e70fc606/index.js b/packages/@aws-cdk-testing/framework-integ/test/triggers/test/integ.triggers.js.snapshot/asset.ac5727a1b8e23c42dabba9ff5155c8fb26ae68568e083beac0908af8e70fc606/index.js deleted file mode 100644 index c1a41ef3d8afe..0000000000000 --- a/packages/@aws-cdk-testing/framework-integ/test/triggers/test/integ.triggers.js.snapshot/asset.ac5727a1b8e23c42dabba9ff5155c8fb26ae68568e083beac0908af8e70fc606/index.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict";var a=Object.defineProperty;var f=Object.getOwnPropertyDescriptor;var w=Object.getOwnPropertyNames;var y=Object.prototype.hasOwnProperty;var h=(e,o)=>{for(var r in o)a(e,r,{get:o[r],enumerable:!0})},R=(e,o,r,t)=>{if(o&&typeof o=="object"||typeof o=="function")for(let n of w(o))!y.call(e,n)&&n!==r&&a(e,n,{get:()=>o[n],enumerable:!(t=f(o,n))||t.enumerable});return e};var T=e=>R(a({},"__esModule",{value:!0}),e);var k={};h(k,{handler:()=>P,invoke:()=>p});module.exports=T(k);var l=require("@aws-sdk/client-lambda"),d=require("@aws-sdk/node-http-handler"),E=e=>{if(e)return new TextDecoder().decode(Buffer.from(e))},p=async(e,o,r)=>{let t=new l.Lambda({requestHandler:new d.NodeHttpHandler({socketTimeout:r})}),n={FunctionName:e,InvocationType:o};console.log({invokeRequest:n});let s=0,m=5e3,i;for(;;)try{i=await t.invoke(n);break}catch(u){if(u.name==="AccessDeniedException"&&s<12){s++,await new Promise(g=>{setTimeout(g,m)});continue}throw u}let c={...i,Payload:E(i.Payload)};return console.log({invokeResponse:c}),c};async function P(e){if(console.log({...e,ResponseURL:"..."}),e.RequestType==="Delete"){console.log("not calling trigger on DELETE");return}if(e.RequestType==="Update"&&e.ResourceProperties.ExecuteOnHandlerChange==="false"){console.log("not calling trigger because ExecuteOnHandlerChange is false");return}let o=e.ResourceProperties.HandlerArn;if(!o)throw new Error('The "HandlerArn" property is required');let r=e.ResourceProperties.InvocationType,t=e.ResourceProperties.Timeout,n=parseInt(t);if(isNaN(n))throw new Error(`The "Timeout" property with value ${t} is not parsable to a number`);let s=await p(o,r,n);if(s.StatusCode&&s.StatusCode>=400)throw new Error(`Trigger handler failed with status code ${s.StatusCode}`);if(s.FunctionError)throw new Error(v(s.Payload))}function v(e){if(!e)return"unknown handler error";console.log(`Error payload: ${e}`);try{let o=JSON.parse(e),r=[o.errorMessage,o.trace].filter(t=>t).join(` -`);return r.length>0?r:e}catch{return e}}0&&(module.exports={handler,invoke}); diff --git a/packages/@aws-cdk-testing/framework-integ/test/triggers/test/integ.triggers.js.snapshot/cdk.out b/packages/@aws-cdk-testing/framework-integ/test/triggers/test/integ.triggers.js.snapshot/cdk.out index 1f0068d32659a..c6e612584e352 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/triggers/test/integ.triggers.js.snapshot/cdk.out +++ b/packages/@aws-cdk-testing/framework-integ/test/triggers/test/integ.triggers.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"36.0.0"} \ No newline at end of file +{"version":"38.0.1"} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/triggers/test/integ.triggers.js.snapshot/integ.json b/packages/@aws-cdk-testing/framework-integ/test/triggers/test/integ.triggers.js.snapshot/integ.json index 8aaeacec53796..87ddb3f8d3d11 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/triggers/test/integ.triggers.js.snapshot/integ.json +++ b/packages/@aws-cdk-testing/framework-integ/test/triggers/test/integ.triggers.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "36.0.0", + "version": "38.0.1", "testCases": { "TriggerTest/DefaultTest": { "stacks": [ diff --git a/packages/@aws-cdk-testing/framework-integ/test/triggers/test/integ.triggers.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/triggers/test/integ.triggers.js.snapshot/manifest.json index cf4e787f64264..38c27bf1d37bd 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/triggers/test/integ.triggers.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/triggers/test/integ.triggers.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "36.0.0", + "version": "38.0.1", "artifacts": { "MyStack.assets": { "type": "cdk:asset-manifest", @@ -16,9 +16,10 @@ "templateFile": "MyStack.template.json", "terminationProtection": false, "validateOnSynth": false, + "notificationArns": [], "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/ce264f57d80761f1f09f852c9e7ac4a647536bdd6e8875070887a405e2e9d3c4.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/405096350538d9b2fd4362846aa7b97d1b919746d8755a37b122474e26ec33df.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -76,6 +77,12 @@ "data": "LatestNodeRuntimeMap" } ], + "/MyStack/AWSCDK.TriggerCustomResourceProviderCustomResourceProvider": [ + { + "type": "aws:cdk:is-custom-resource-handler-customResourceProvider", + "data": true + } + ], "/MyStack/AWSCDK.TriggerCustomResourceProviderCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", @@ -214,9 +221,10 @@ "templateFile": "TriggerTestDefaultTestDeployAssert61636546.template.json", "terminationProtection": false, "validateOnSynth": false, + "notificationArns": [], "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/beca986e0d699d3ab910f77655b15b9ed94483e459af80f1c4028d1a510111e6.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/fe34876576f78090d8652805e3567a392266c4b5cdb1c80c49c6aba3334bc86f.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/packages/@aws-cdk/aws-amplify-alpha/package.json b/packages/@aws-cdk/aws-amplify-alpha/package.json index 73d7741aa90f5..38c278034b8aa 100644 --- a/packages/@aws-cdk/aws-amplify-alpha/package.json +++ b/packages/@aws-cdk/aws-amplify-alpha/package.json @@ -90,9 +90,9 @@ "@aws-cdk/integ-runner": "0.0.0", "@aws-cdk/pkglint": "0.0.0", "@aws-cdk/custom-resource-handlers": "0.0.0", - "@aws-sdk/client-amplify": "3.451.0", - "@aws-sdk/client-s3": "3.451.0", - "@aws-sdk/s3-request-presigner": "3.451.0", + "@aws-sdk/client-amplify": "3.632.0", + "@aws-sdk/client-s3": "3.632.0", + "@aws-sdk/s3-request-presigner": "3.632.0", "@types/jest": "^29.5.12", "aws-cdk-lib": "0.0.0", "@aws-cdk/integ-tests-alpha": "0.0.0", diff --git a/packages/@aws-cdk/aws-custom-resource-sdk-adapter/package.json b/packages/@aws-cdk/aws-custom-resource-sdk-adapter/package.json index a8ab7389aab0d..441bf24026860 100644 --- a/packages/@aws-cdk/aws-custom-resource-sdk-adapter/package.json +++ b/packages/@aws-cdk/aws-custom-resource-sdk-adapter/package.json @@ -27,8 +27,8 @@ "devDependencies": { "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@aws-sdk/client-s3": "3.421.0", - "@smithy/types": "^2.12.0", + "@aws-sdk/client-s3": "3.632.0", + "@smithy/types": "3.5.0", "@types/jest": "^29.5.12", "jest": "^29.7.0" }, diff --git a/packages/@aws-cdk/aws-redshift-alpha/package.json b/packages/@aws-cdk/aws-redshift-alpha/package.json index 92a68447f7d5d..0bb0d31560b9d 100644 --- a/packages/@aws-cdk/aws-redshift-alpha/package.json +++ b/packages/@aws-cdk/aws-redshift-alpha/package.json @@ -88,9 +88,9 @@ "@aws-cdk/integ-runner": "0.0.0", "@aws-cdk/pkglint": "0.0.0", "@aws-cdk/custom-resource-handlers": "0.0.0", - "@aws-sdk/client-redshift": "3.452.0", - "@aws-sdk/client-redshift-data": "3.451.0", - "@aws-sdk/client-secrets-manager": "3.451.0", + "@aws-sdk/client-redshift": "3.632.0", + "@aws-sdk/client-redshift-data": "3.632.0", + "@aws-sdk/client-secrets-manager": "3.632.0", "@types/jest": "^29.5.12", "aws-cdk-lib": "0.0.0", "constructs": "^10.0.0", diff --git a/packages/@aws-cdk/cloudformation-diff/package.json b/packages/@aws-cdk/cloudformation-diff/package.json index 5de262e0b45de..71a1c66ecd1b6 100644 --- a/packages/@aws-cdk/cloudformation-diff/package.json +++ b/packages/@aws-cdk/cloudformation-diff/package.json @@ -34,7 +34,7 @@ "devDependencies": { "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/pkglint": "0.0.0", - "@aws-sdk/client-cloudformation": "^3.529.1", + "@aws-sdk/client-cloudformation": "3.662.0", "@types/jest": "^29.5.12", "@types/string-width": "^4.0.1", "fast-check": "^3.22.0", diff --git a/packages/@aws-cdk/custom-resource-handlers/lib/aws-eks/cluster-resource-handler/index.ts b/packages/@aws-cdk/custom-resource-handlers/lib/aws-eks/cluster-resource-handler/index.ts index 5828e5720db61..af32fef98e5d3 100644 --- a/packages/@aws-cdk/custom-resource-handlers/lib/aws-eks/cluster-resource-handler/index.ts +++ b/packages/@aws-cdk/custom-resource-handlers/lib/aws-eks/cluster-resource-handler/index.ts @@ -4,7 +4,7 @@ import { EKS } from '@aws-sdk/client-eks'; // eslint-disable-next-line import/no-extraneous-dependencies import { fromTemporaryCredentials } from '@aws-sdk/credential-providers'; // eslint-disable-next-line import/no-extraneous-dependencies -import { NodeHttpHandler } from '@aws-sdk/node-http-handler'; +import { NodeHttpHandler } from '@smithy/node-http-handler'; // eslint-disable-next-line import/no-extraneous-dependencies import { ProxyAgent } from 'proxy-agent'; import { ClusterResourceHandler } from './cluster'; diff --git a/packages/@aws-cdk/custom-resource-handlers/lib/aws-route53/delete-existing-record-set-handler/index.ts b/packages/@aws-cdk/custom-resource-handlers/lib/aws-route53/delete-existing-record-set-handler/index.ts index 277278eec5726..cbd83745d5235 100644 --- a/packages/@aws-cdk/custom-resource-handlers/lib/aws-route53/delete-existing-record-set-handler/index.ts +++ b/packages/@aws-cdk/custom-resource-handlers/lib/aws-route53/delete-existing-record-set-handler/index.ts @@ -1,9 +1,9 @@ -import { Route53, waitUntilResourceRecordSetsChanged } from '@aws-sdk/client-route-53'; // eslint-disable-line import/no-extraneous-dependencies +import { Route53, RRType, waitUntilResourceRecordSetsChanged } from '@aws-sdk/client-route-53'; // eslint-disable-line import/no-extraneous-dependencies interface ResourceProperties { HostedZoneId: string; RecordName: string; - RecordType: string; + RecordType: RRType; } export async function handler(event: AWSLambda.CloudFormationCustomResourceEvent) { diff --git a/packages/@aws-cdk/custom-resource-handlers/lib/triggers/lambda/index.ts b/packages/@aws-cdk/custom-resource-handlers/lib/triggers/lambda/index.ts index 774a045f8e351..c1f7e2e01392f 100644 --- a/packages/@aws-cdk/custom-resource-handlers/lib/triggers/lambda/index.ts +++ b/packages/@aws-cdk/custom-resource-handlers/lib/triggers/lambda/index.ts @@ -1,14 +1,14 @@ /* eslint-disable no-console */ /* eslint-disable import/no-extraneous-dependencies */ -import { Lambda, InvocationResponse } from '@aws-sdk/client-lambda'; -import { NodeHttpHandler } from '@aws-sdk/node-http-handler'; +import { Lambda, InvocationResponse, InvocationType } from '@aws-sdk/client-lambda'; +import { NodeHttpHandler } from '@smithy/node-http-handler'; export type DecodedInvocationResponse = Omit & { Payload?: string } -export type InvokeFunction = (functionName: string, invocationType: string, timeout: number) => Promise; +export type InvokeFunction = (functionName: string, invocationType: InvocationType, timeout: number) => Promise; const decodePayload = (payload?: Uint8Array): string | undefined => { if (!payload) { diff --git a/packages/@aws-cdk/custom-resource-handlers/package.json b/packages/@aws-cdk/custom-resource-handlers/package.json index 84b97d51df115..fceae0fd906f8 100644 --- a/packages/@aws-cdk/custom-resource-handlers/package.json +++ b/packages/@aws-cdk/custom-resource-handlers/package.json @@ -28,26 +28,26 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/pkglint": "0.0.0", "@aws-cdk/aws-custom-resource-sdk-adapter": "0.0.0", - "@aws-sdk/client-ecs": "3.451.0", - "@aws-sdk/client-ssm": "3.453.0", - "@aws-sdk/client-kinesis": "3.451.0", - "@aws-sdk/client-codepipeline": "3.451.0", - "@aws-sdk/client-redshift": "3.452.0", - "@aws-sdk/client-account": "3.451.0", - "@aws-sdk/client-amplify": "3.451.0", - "@aws-sdk/s3-request-presigner": "3.451.0", - "@aws-sdk/client-ec2": "3.421.0", - "@aws-sdk/client-acm": "3.421.0", - "@aws-sdk/client-route-53": "3.421.0", - "@aws-sdk/client-cloudwatch-logs": "3.421.0", - "@aws-sdk/client-dynamodb": "3.421.0", - "@aws-sdk/client-eks": "3.476.0", - "@aws-sdk/client-sts": "3.421.0", - "@aws-sdk/node-http-handler": "^3.370.0", - "@smithy/util-stream": "^2.2.0", + "@aws-sdk/client-ecs": "3.632.0", + "@aws-sdk/client-ssm": "3.632.0", + "@aws-sdk/client-kinesis": "3.632.0", + "@aws-sdk/client-codepipeline": "3.632.0", + "@aws-sdk/client-redshift": "3.632.0", + "@aws-sdk/client-account": "3.632.0", + "@aws-sdk/client-amplify": "3.632.0", + "@aws-sdk/s3-request-presigner": "3.632.0", + "@aws-sdk/client-ec2": "3.632.0", + "@aws-sdk/client-acm": "3.632.0", + "@aws-sdk/client-route-53": "3.632.0", + "@aws-sdk/client-cloudwatch-logs": "3.632.0", + "@aws-sdk/client-dynamodb": "3.632.0", + "@aws-sdk/client-eks": "3.632.0", + "@aws-sdk/client-sts": "3.632.0", + "@smithy/node-http-handler": "3.2.4", + "@smithy/util-stream": "3.1.9", "@types/jest": "^29.5.12", - "aws-sdk-client-mock": "^3.1.0", - "aws-sdk-client-mock-jest": "^3.1.0", + "aws-sdk-client-mock": "4.0.1", + "aws-sdk-client-mock-jest": "4.0.1", "@cdklabs/typewriter": "^0.0.3", "jest": "^29.7.0", "sinon": "^9.2.4", @@ -57,12 +57,12 @@ }, "dependencies": { "@aws-cdk/asset-node-proxy-agent-v6": "^2.1.0", - "@aws-sdk/client-lambda": "3.421.0", - "@aws-sdk/client-synthetics": "3.421.0", - "@aws-sdk/client-ecr": "3.421.0", - "@aws-sdk/client-kms": "3.451.0", - "@aws-sdk/client-s3": "3.421.0", - "@aws-sdk/client-cloudwatch": "3.421.0", + "@aws-sdk/client-lambda": "3.632.0", + "@aws-sdk/client-synthetics": "3.632.0", + "@aws-sdk/client-ecr": "3.632.0", + "@aws-sdk/client-kms": "3.632.0", + "@aws-sdk/client-s3": "3.632.0", + "@aws-sdk/client-cloudwatch": "3.632.0", "p-limit": "^3.1.0" }, "repository": { diff --git a/packages/@aws-cdk/integ-tests-alpha/package.json b/packages/@aws-cdk/integ-tests-alpha/package.json index 37f308b69034e..a0006484a17e3 100644 --- a/packages/@aws-cdk/integ-tests-alpha/package.json +++ b/packages/@aws-cdk/integ-tests-alpha/package.json @@ -70,14 +70,14 @@ "@aws-cdk/integ-runner": "0.0.0", "@aws-cdk/pkglint": "0.0.0", "@aws-cdk/aws-custom-resource-sdk-adapter": "0.0.0", - "@aws-sdk/client-ec2": "3.421.0", - "@aws-sdk/client-s3": "3.421.0", - "@aws-sdk/client-sfn": "3.421.0", - "@aws-sdk/types": "^3.433.0", + "@aws-sdk/client-ec2": "3.632.0", + "@aws-sdk/client-s3": "3.632.0", + "@aws-sdk/client-sfn": "3.632.0", + "@smithy/types": "3.5.0", "@types/fs-extra": "^9.0.13", "@types/jest": "^29.5.12", - "aws-sdk-client-mock": "^3.1.0", - "aws-sdk-client-mock-jest": "^3.1.0", + "aws-sdk-client-mock": "4.0.1", + "aws-sdk-client-mock-jest": "4.0.1", "jest": "^29.7.0", "nock": "^13.5.5", "sinon": "^9.2.4", diff --git a/packages/aws-cdk-lib/package.json b/packages/aws-cdk-lib/package.json index 9be2acf76bb78..bd881886ad093 100644 --- a/packages/aws-cdk-lib/package.json +++ b/packages/aws-cdk-lib/package.json @@ -142,33 +142,33 @@ "@aws-cdk/pkglint": "0.0.0", "@aws-cdk/aws-custom-resource-sdk-adapter": "0.0.0", "@aws-cdk/spec2cdk": "0.0.0", - "@aws-sdk/client-acm": "3.421.0", - "@aws-sdk/client-account": "3.421.0", - "@aws-sdk/client-codepipeline": "3.421.0", - "@aws-sdk/client-cloudwatch-logs": "3.421.0", - "@aws-sdk/client-dynamodb": "3.421.0", - "@aws-sdk/client-ec2": "3.421.0", - "@aws-sdk/client-ecr": "3.421.0", - "@aws-sdk/client-eks": "3.421.0", - "@aws-sdk/client-iam": "3.421.0", - "@aws-sdk/client-lambda": "3.421.0", - "@aws-sdk/client-route-53": "3.421.0", - "@aws-sdk/client-s3": "3.421.0", - "@aws-sdk/client-sfn": "3.421.0", - "@aws-sdk/client-ssm": "3.421.0", - "@aws-sdk/client-sts": "3.421.0", - "@aws-sdk/credential-providers": "3.421.0", - "@aws-sdk/node-http-handler": "^3.370.0", - "@aws-sdk/types": "^3.433.0", - "@smithy/util-stream": "^2.2.0", + "@aws-sdk/client-acm": "3.632.0", + "@aws-sdk/client-account": "3.632.0", + "@aws-sdk/client-codepipeline": "3.632.0", + "@aws-sdk/client-cloudwatch-logs": "3.632.0", + "@aws-sdk/client-dynamodb": "3.632.0", + "@aws-sdk/client-ec2": "3.632.0", + "@aws-sdk/client-ecr": "3.632.0", + "@aws-sdk/client-eks": "3.632.0", + "@aws-sdk/client-iam": "3.632.0", + "@aws-sdk/client-lambda": "3.632.0", + "@aws-sdk/client-route-53": "3.632.0", + "@aws-sdk/client-s3": "3.632.0", + "@aws-sdk/client-sfn": "3.632.0", + "@aws-sdk/client-ssm": "3.632.0", + "@aws-sdk/client-sts": "3.632.0", + "@aws-sdk/credential-providers": "3.632.0", + "@smithy/node-http-handler": "3.2.4", + "@smithy/types": "3.5.0", + "@smithy/util-stream": "3.1.9", "@types/aws-lambda": "^8.10.145", "@types/jest": "^29.5.12", "@types/lodash": "^4.17.7", "@types/punycode": "^2.1.4", "@types/mime-types": "^2.1.4", "@aws-cdk/lazify": "0.0.0", - "aws-sdk-client-mock": "^3.1.0", - "aws-sdk-client-mock-jest": "^3.1.0", + "aws-sdk-client-mock": "4.0.1", + "aws-sdk-client-mock-jest": "4.0.1", "cdk8s": "2.69.0", "constructs": "^10.0.0", "delay": "5.0.0", diff --git a/tools/@aws-cdk/cdk-build-tools/config/jest.config.js b/tools/@aws-cdk/cdk-build-tools/config/jest.config.js index 80e8f52f53b2c..ae1e7ec62c009 100644 --- a/tools/@aws-cdk/cdk-build-tools/config/jest.config.js +++ b/tools/@aws-cdk/cdk-build-tools/config/jest.config.js @@ -1,5 +1,3 @@ -const { cpus } = require('os'); - module.exports = { // The preset deals with preferring TS over JS moduleFileExtensions: [ @@ -7,9 +5,7 @@ module.exports = { 'ts', 'js', ], - testMatch: [ - '/test/**/?(*.)+(test).ts', - ], + testMatch: ['/test/**/?(*.)+(test).ts'], // Transform TypeScript using ts-jest. Use of this preset still requires the depending // package to depend on `ts-jest` directly. @@ -32,20 +28,13 @@ module.exports = { }, }, collectCoverage: true, - coverageReporters: [ - 'lcov', - 'html', - 'text-summary', - ['text', { file: 'coverage.txt' }], - ], - coveragePathIgnorePatterns: [ - '\\.generated\\.[jt]s$', - '/test/', - '.warnings.jsii.js$', - '/node_modules/', - ], - reporters: [ - 'default', - ['jest-junit', { suiteName: 'jest tests', outputDirectory: 'coverage' }], - ], + coverageReporters: ['lcov', 'html', 'text-summary', ['text', { file: 'coverage.txt' }]], + coveragePathIgnorePatterns: ['\\.generated\\.[jt]s$', '/test/', '.warnings.jsii.js$', '/node_modules/'], + reporters: ['default', ['jest-junit', { suiteName: 'jest tests', outputDirectory: 'coverage' }]], + /** + * This will still show us helpful information when running tests but remove console statements. + * The exception is when we use our custom logger in the CLI or when other processes are spun up + * within tests. It has no impact there. + */ + silent: true, }; diff --git a/yarn.lock b/yarn.lock index b524b5075a12b..10ff2bbe956ca 100644 --- a/yarn.lock +++ b/yarn.lock @@ -112,15 +112,6 @@ dependencies: "@cdklabs/tskb" "^0.0.3" -"@aws-crypto/crc32@3.0.0": - version "3.0.0" - resolved "https://registry.npmjs.org/@aws-crypto/crc32/-/crc32-3.0.0.tgz#07300eca214409c33e3ff769cd5697b57fdd38fa" - integrity sha512-IzSgsrxUcsrejQbPVilIKy16kAT52EwB6zSaI+M3xxIhKh5+aldEyvI+z6erM7TCLB2BJsFrtHjp6/4/sr+3dA== - dependencies: - "@aws-crypto/util" "^3.0.0" - "@aws-sdk/types" "^3.222.0" - tslib "^1.11.1" - "@aws-crypto/crc32@5.2.0": version "5.2.0" resolved "https://registry.npmjs.org/@aws-crypto/crc32/-/crc32-5.2.0.tgz#cfcc22570949c98c6689cfcbd2d693d36cdae2e1" @@ -130,15 +121,6 @@ "@aws-sdk/types" "^3.222.0" tslib "^2.6.2" -"@aws-crypto/crc32c@3.0.0": - version "3.0.0" - resolved "https://registry.npmjs.org/@aws-crypto/crc32c/-/crc32c-3.0.0.tgz#016c92da559ef638a84a245eecb75c3e97cb664f" - integrity sha512-ENNPPManmnVJ4BTXlOjAgD7URidbAznURqD0KvfREyc4o20DPYdEldU1f5cQ7Jbj0CJJSPaMIk/9ZshdB3210w== - dependencies: - "@aws-crypto/util" "^3.0.0" - "@aws-sdk/types" "^3.222.0" - tslib "^1.11.1" - "@aws-crypto/crc32c@5.2.0": version "5.2.0" resolved "https://registry.npmjs.org/@aws-crypto/crc32c/-/crc32c-5.2.0.tgz#4e34aab7f419307821509a98b9b08e84e0c1917e" @@ -148,26 +130,6 @@ "@aws-sdk/types" "^3.222.0" tslib "^2.6.2" -"@aws-crypto/ie11-detection@^3.0.0": - version "3.0.0" - resolved "https://registry.npmjs.org/@aws-crypto/ie11-detection/-/ie11-detection-3.0.0.tgz#640ae66b4ec3395cee6a8e94ebcd9f80c24cd688" - integrity sha512-341lBBkiY1DfDNKai/wXM3aujNBkXR7tq1URPQDL9wi3AUbI80NR74uF1TXHMm7po1AcnFk8iu2S2IeU/+/A+Q== - dependencies: - tslib "^1.11.1" - -"@aws-crypto/sha1-browser@3.0.0": - version "3.0.0" - resolved "https://registry.npmjs.org/@aws-crypto/sha1-browser/-/sha1-browser-3.0.0.tgz#f9083c00782b24714f528b1a1fef2174002266a3" - integrity sha512-NJth5c997GLHs6nOYTzFKTbYdMNA6/1XlKVgnZoaZcQ7z7UJlOgj2JdbHE8tiYLS3fzXNCguct77SPGat2raSw== - dependencies: - "@aws-crypto/ie11-detection" "^3.0.0" - "@aws-crypto/supports-web-crypto" "^3.0.0" - "@aws-crypto/util" "^3.0.0" - "@aws-sdk/types" "^3.222.0" - "@aws-sdk/util-locate-window" "^3.0.0" - "@aws-sdk/util-utf8-browser" "^3.0.0" - tslib "^1.11.1" - "@aws-crypto/sha1-browser@5.2.0": version "5.2.0" resolved "https://registry.npmjs.org/@aws-crypto/sha1-browser/-/sha1-browser-5.2.0.tgz#b0ee2d2821d3861f017e965ef3b4cb38e3b6a0f4" @@ -180,20 +142,6 @@ "@smithy/util-utf8" "^2.0.0" tslib "^2.6.2" -"@aws-crypto/sha256-browser@3.0.0": - version "3.0.0" - resolved "https://registry.npmjs.org/@aws-crypto/sha256-browser/-/sha256-browser-3.0.0.tgz#05f160138ab893f1c6ba5be57cfd108f05827766" - integrity sha512-8VLmW2B+gjFbU5uMeqtQM6Nj0/F1bro80xQXCW6CQBWgosFWXTx77aeOF5CAIAmbOK64SdMBJdNr6J41yP5mvQ== - dependencies: - "@aws-crypto/ie11-detection" "^3.0.0" - "@aws-crypto/sha256-js" "^3.0.0" - "@aws-crypto/supports-web-crypto" "^3.0.0" - "@aws-crypto/util" "^3.0.0" - "@aws-sdk/types" "^3.222.0" - "@aws-sdk/util-locate-window" "^3.0.0" - "@aws-sdk/util-utf8-browser" "^3.0.0" - tslib "^1.11.1" - "@aws-crypto/sha256-browser@5.2.0": version "5.2.0" resolved "https://registry.npmjs.org/@aws-crypto/sha256-browser/-/sha256-browser-5.2.0.tgz#153895ef1dba6f9fce38af550e0ef58988eb649e" @@ -207,15 +155,6 @@ "@smithy/util-utf8" "^2.0.0" tslib "^2.6.2" -"@aws-crypto/sha256-js@3.0.0", "@aws-crypto/sha256-js@^3.0.0": - version "3.0.0" - resolved "https://registry.npmjs.org/@aws-crypto/sha256-js/-/sha256-js-3.0.0.tgz#f06b84d550d25521e60d2a0e2a90139341e007c2" - integrity sha512-PnNN7os0+yd1XvXAy23CFOmTbMaDxgxXtTKHybrJ39Y8kGzBATgBFibWJKH6BhytLI/Zyszs87xCOBNyBig6vQ== - dependencies: - "@aws-crypto/util" "^3.0.0" - "@aws-sdk/types" "^3.222.0" - tslib "^1.11.1" - "@aws-crypto/sha256-js@5.2.0", "@aws-crypto/sha256-js@^5.2.0": version "5.2.0" resolved "https://registry.npmjs.org/@aws-crypto/sha256-js/-/sha256-js-5.2.0.tgz#c4fdb773fdbed9a664fc1a95724e206cf3860042" @@ -225,13 +164,6 @@ "@aws-sdk/types" "^3.222.0" tslib "^2.6.2" -"@aws-crypto/supports-web-crypto@^3.0.0": - version "3.0.0" - resolved "https://registry.npmjs.org/@aws-crypto/supports-web-crypto/-/supports-web-crypto-3.0.0.tgz#5d1bf825afa8072af2717c3e455f35cda0103ec2" - integrity sha512-06hBdMwUAb2WFTuGG73LSC0wfPu93xWwo5vL2et9eymgmu3Id5vFAHBbajVWiGhPO37qcsdCap/FqXvJGJWPIg== - dependencies: - tslib "^1.11.1" - "@aws-crypto/supports-web-crypto@^5.2.0": version "5.2.0" resolved "https://registry.npmjs.org/@aws-crypto/supports-web-crypto/-/supports-web-crypto-5.2.0.tgz#a1e399af29269be08e695109aa15da0a07b5b5fb" @@ -239,15 +171,6 @@ dependencies: tslib "^2.6.2" -"@aws-crypto/util@^3.0.0": - version "3.0.0" - resolved "https://registry.npmjs.org/@aws-crypto/util/-/util-3.0.0.tgz#1c7ca90c29293f0883468ad48117937f0fe5bfb0" - integrity sha512-2OJlpeJpCR48CC8r+uKVChzs9Iungj9wkZrl8Z041DWEWvyIHILYKCPNzJghKsivj+S3mLo6BVc7mBNzdxA46w== - dependencies: - "@aws-sdk/types" "^3.222.0" - "@aws-sdk/util-utf8-browser" "^3.0.0" - tslib "^1.11.1" - "@aws-crypto/util@^5.2.0": version "5.2.0" resolved "https://registry.npmjs.org/@aws-crypto/util/-/util-5.2.0.tgz#71284c9cffe7927ddadac793c14f14886d3876da" @@ -257,224 +180,189 @@ "@smithy/util-utf8" "^2.0.0" tslib "^2.6.2" -"@aws-sdk/client-account@3.421.0": - version "3.421.0" - resolved "https://registry.npmjs.org/@aws-sdk/client-account/-/client-account-3.421.0.tgz#54c10aea19cc7716f5da80d9d5deffad860d6968" - integrity sha512-hEMg4NxV4p1hcn1DR4rxzXrj7vkz9UQl5BO8i4zIS8Oi7nTSP+8MHTK24SJ/h+bcJBJOTMphVCUBrHyCQgaEIg== - dependencies: - "@aws-crypto/sha256-browser" "3.0.0" - "@aws-crypto/sha256-js" "3.0.0" - "@aws-sdk/client-sts" "3.421.0" - "@aws-sdk/credential-provider-node" "3.421.0" - "@aws-sdk/middleware-host-header" "3.418.0" - "@aws-sdk/middleware-logger" "3.418.0" - "@aws-sdk/middleware-recursion-detection" "3.418.0" - "@aws-sdk/middleware-signing" "3.418.0" - "@aws-sdk/middleware-user-agent" "3.418.0" - "@aws-sdk/region-config-resolver" "3.418.0" - "@aws-sdk/types" "3.418.0" - "@aws-sdk/util-endpoints" "3.418.0" - "@aws-sdk/util-user-agent-browser" "3.418.0" - "@aws-sdk/util-user-agent-node" "3.418.0" - "@smithy/config-resolver" "^2.0.10" - "@smithy/fetch-http-handler" "^2.1.5" - "@smithy/hash-node" "^2.0.9" - "@smithy/invalid-dependency" "^2.0.9" - "@smithy/middleware-content-length" "^2.0.11" - "@smithy/middleware-endpoint" "^2.0.9" - "@smithy/middleware-retry" "^2.0.12" - "@smithy/middleware-serde" "^2.0.9" - "@smithy/middleware-stack" "^2.0.2" - "@smithy/node-config-provider" "^2.0.12" - "@smithy/node-http-handler" "^2.1.5" - "@smithy/protocol-http" "^3.0.5" - "@smithy/smithy-client" "^2.1.6" - "@smithy/types" "^2.3.3" - "@smithy/url-parser" "^2.0.9" - "@smithy/util-base64" "^2.0.0" - "@smithy/util-body-length-browser" "^2.0.0" - "@smithy/util-body-length-node" "^2.1.0" - "@smithy/util-defaults-mode-browser" "^2.0.10" - "@smithy/util-defaults-mode-node" "^2.0.12" - "@smithy/util-retry" "^2.0.2" - "@smithy/util-utf8" "^2.0.0" - tslib "^2.5.0" - -"@aws-sdk/client-account@3.451.0": - version "3.451.0" - resolved "https://registry.npmjs.org/@aws-sdk/client-account/-/client-account-3.451.0.tgz#91f858247b7482891a688bb36d3a52448aef18e5" - integrity sha512-+OdPPGxXFUN02kgI3infymNTqUPmBtBZlumQZwlfqhdfhJ6yGk3pJE1psEN2DRrAZhfDyORYJtsJBWJ4ZfCLKQ== - dependencies: - "@aws-crypto/sha256-browser" "3.0.0" - "@aws-crypto/sha256-js" "3.0.0" - "@aws-sdk/client-sts" "3.451.0" - "@aws-sdk/core" "3.451.0" - "@aws-sdk/credential-provider-node" "3.451.0" - "@aws-sdk/middleware-host-header" "3.451.0" - "@aws-sdk/middleware-logger" "3.451.0" - "@aws-sdk/middleware-recursion-detection" "3.451.0" - "@aws-sdk/middleware-signing" "3.451.0" - "@aws-sdk/middleware-user-agent" "3.451.0" - "@aws-sdk/region-config-resolver" "3.451.0" - "@aws-sdk/types" "3.451.0" - "@aws-sdk/util-endpoints" "3.451.0" - "@aws-sdk/util-user-agent-browser" "3.451.0" - "@aws-sdk/util-user-agent-node" "3.451.0" - "@smithy/config-resolver" "^2.0.18" - "@smithy/fetch-http-handler" "^2.2.6" - "@smithy/hash-node" "^2.0.15" - "@smithy/invalid-dependency" "^2.0.13" - "@smithy/middleware-content-length" "^2.0.15" - "@smithy/middleware-endpoint" "^2.2.0" - "@smithy/middleware-retry" "^2.0.20" - "@smithy/middleware-serde" "^2.0.13" - "@smithy/middleware-stack" "^2.0.7" - "@smithy/node-config-provider" "^2.1.5" - "@smithy/node-http-handler" "^2.1.9" - "@smithy/protocol-http" "^3.0.9" - "@smithy/smithy-client" "^2.1.15" - "@smithy/types" "^2.5.0" - "@smithy/url-parser" "^2.0.13" - "@smithy/util-base64" "^2.0.1" - "@smithy/util-body-length-browser" "^2.0.0" - "@smithy/util-body-length-node" "^2.1.0" - "@smithy/util-defaults-mode-browser" "^2.0.19" - "@smithy/util-defaults-mode-node" "^2.0.25" - "@smithy/util-endpoints" "^1.0.4" - "@smithy/util-retry" "^2.0.6" - "@smithy/util-utf8" "^2.0.2" - tslib "^2.5.0" - -"@aws-sdk/client-acm@3.421.0": - version "3.421.0" - resolved "https://registry.npmjs.org/@aws-sdk/client-acm/-/client-acm-3.421.0.tgz#9b80383232d7d8f82d26bf0ec0f3841de33254e6" - integrity sha512-2qC1cc4ykNOFmg8t3svWwIZOxxuOkcqucFyBsFABNvcUtdwOdmPJppnjUxZFohOxSzMXLiGPReZPz/5QZEKaQg== - dependencies: - "@aws-crypto/sha256-browser" "3.0.0" - "@aws-crypto/sha256-js" "3.0.0" - "@aws-sdk/client-sts" "3.421.0" - "@aws-sdk/credential-provider-node" "3.421.0" - "@aws-sdk/middleware-host-header" "3.418.0" - "@aws-sdk/middleware-logger" "3.418.0" - "@aws-sdk/middleware-recursion-detection" "3.418.0" - "@aws-sdk/middleware-signing" "3.418.0" - "@aws-sdk/middleware-user-agent" "3.418.0" - "@aws-sdk/region-config-resolver" "3.418.0" - "@aws-sdk/types" "3.418.0" - "@aws-sdk/util-endpoints" "3.418.0" - "@aws-sdk/util-user-agent-browser" "3.418.0" - "@aws-sdk/util-user-agent-node" "3.418.0" - "@smithy/config-resolver" "^2.0.10" - "@smithy/fetch-http-handler" "^2.1.5" - "@smithy/hash-node" "^2.0.9" - "@smithy/invalid-dependency" "^2.0.9" - "@smithy/middleware-content-length" "^2.0.11" - "@smithy/middleware-endpoint" "^2.0.9" - "@smithy/middleware-retry" "^2.0.12" - "@smithy/middleware-serde" "^2.0.9" - "@smithy/middleware-stack" "^2.0.2" - "@smithy/node-config-provider" "^2.0.12" - "@smithy/node-http-handler" "^2.1.5" - "@smithy/protocol-http" "^3.0.5" - "@smithy/smithy-client" "^2.1.6" - "@smithy/types" "^2.3.3" - "@smithy/url-parser" "^2.0.9" - "@smithy/util-base64" "^2.0.0" - "@smithy/util-body-length-browser" "^2.0.0" - "@smithy/util-body-length-node" "^2.1.0" - "@smithy/util-defaults-mode-browser" "^2.0.10" - "@smithy/util-defaults-mode-node" "^2.0.12" - "@smithy/util-retry" "^2.0.2" - "@smithy/util-utf8" "^2.0.0" - "@smithy/util-waiter" "^2.0.9" - tslib "^2.5.0" - -"@aws-sdk/client-amplify@3.451.0": - version "3.451.0" - resolved "https://registry.npmjs.org/@aws-sdk/client-amplify/-/client-amplify-3.451.0.tgz#28d697ea8ede6b333a58f12bbc7306de28f669b1" - integrity sha512-drx5T3Eg/kfgK651I943AUDK84DGjyqK+XJgyjynqGhZrA3o92eygW26tMMqCda/ZyWyfG0iJN4M/R/3GpuB3Q== - dependencies: - "@aws-crypto/sha256-browser" "3.0.0" - "@aws-crypto/sha256-js" "3.0.0" - "@aws-sdk/client-sts" "3.451.0" - "@aws-sdk/core" "3.451.0" - "@aws-sdk/credential-provider-node" "3.451.0" - "@aws-sdk/middleware-host-header" "3.451.0" - "@aws-sdk/middleware-logger" "3.451.0" - "@aws-sdk/middleware-recursion-detection" "3.451.0" - "@aws-sdk/middleware-signing" "3.451.0" - "@aws-sdk/middleware-user-agent" "3.451.0" - "@aws-sdk/region-config-resolver" "3.451.0" - "@aws-sdk/types" "3.451.0" - "@aws-sdk/util-endpoints" "3.451.0" - "@aws-sdk/util-user-agent-browser" "3.451.0" - "@aws-sdk/util-user-agent-node" "3.451.0" - "@smithy/config-resolver" "^2.0.18" - "@smithy/fetch-http-handler" "^2.2.6" - "@smithy/hash-node" "^2.0.15" - "@smithy/invalid-dependency" "^2.0.13" - "@smithy/middleware-content-length" "^2.0.15" - "@smithy/middleware-endpoint" "^2.2.0" - "@smithy/middleware-retry" "^2.0.20" - "@smithy/middleware-serde" "^2.0.13" - "@smithy/middleware-stack" "^2.0.7" - "@smithy/node-config-provider" "^2.1.5" - "@smithy/node-http-handler" "^2.1.9" - "@smithy/protocol-http" "^3.0.9" - "@smithy/smithy-client" "^2.1.15" - "@smithy/types" "^2.5.0" - "@smithy/url-parser" "^2.0.13" - "@smithy/util-base64" "^2.0.1" - "@smithy/util-body-length-browser" "^2.0.0" - "@smithy/util-body-length-node" "^2.1.0" - "@smithy/util-defaults-mode-browser" "^2.0.19" - "@smithy/util-defaults-mode-node" "^2.0.25" - "@smithy/util-endpoints" "^1.0.4" - "@smithy/util-retry" "^2.0.6" - "@smithy/util-utf8" "^2.0.2" - tslib "^2.5.0" - -"@aws-sdk/client-cloudformation@3.637.0": - version "3.637.0" - resolved "https://registry.npmjs.org/@aws-sdk/client-cloudformation/-/client-cloudformation-3.637.0.tgz#c4f8b2599b62bcfac82a5aa0613da99608ddc10f" - integrity sha512-fjXVo7nDnp13yNq2xZywOuCC2x4Y4PLGN9fHyC4QTgoqmdieNoPVsFyVKUVhi79T0Emz+vd6AqmeuBbYeX/w6A== +"@aws-sdk/client-account@3.632.0": + version "3.632.0" + resolved "https://registry.npmjs.org/@aws-sdk/client-account/-/client-account-3.632.0.tgz#ca4abada7c0a9073a73512af96e19d54c99363f2" + integrity sha512-dnOw27v5Gz1MuIkv/0OKAOSUshYROACIlK94WibWo4mCEKxrc5bW1OeE00p1tcMm9l5Mhl6IYSoUwVaziUhTLA== + dependencies: + "@aws-crypto/sha256-browser" "5.2.0" + "@aws-crypto/sha256-js" "5.2.0" + "@aws-sdk/client-sso-oidc" "3.632.0" + "@aws-sdk/client-sts" "3.632.0" + "@aws-sdk/core" "3.629.0" + "@aws-sdk/credential-provider-node" "3.632.0" + "@aws-sdk/middleware-host-header" "3.620.0" + "@aws-sdk/middleware-logger" "3.609.0" + "@aws-sdk/middleware-recursion-detection" "3.620.0" + "@aws-sdk/middleware-user-agent" "3.632.0" + "@aws-sdk/region-config-resolver" "3.614.0" + "@aws-sdk/types" "3.609.0" + "@aws-sdk/util-endpoints" "3.632.0" + "@aws-sdk/util-user-agent-browser" "3.609.0" + "@aws-sdk/util-user-agent-node" "3.614.0" + "@smithy/config-resolver" "^3.0.5" + "@smithy/core" "^2.3.2" + "@smithy/fetch-http-handler" "^3.2.4" + "@smithy/hash-node" "^3.0.3" + "@smithy/invalid-dependency" "^3.0.3" + "@smithy/middleware-content-length" "^3.0.5" + "@smithy/middleware-endpoint" "^3.1.0" + "@smithy/middleware-retry" "^3.0.14" + "@smithy/middleware-serde" "^3.0.3" + "@smithy/middleware-stack" "^3.0.3" + "@smithy/node-config-provider" "^3.1.4" + "@smithy/node-http-handler" "^3.1.4" + "@smithy/protocol-http" "^4.1.0" + "@smithy/smithy-client" "^3.1.12" + "@smithy/types" "^3.3.0" + "@smithy/url-parser" "^3.0.3" + "@smithy/util-base64" "^3.0.0" + "@smithy/util-body-length-browser" "^3.0.0" + "@smithy/util-body-length-node" "^3.0.0" + "@smithy/util-defaults-mode-browser" "^3.0.14" + "@smithy/util-defaults-mode-node" "^3.0.14" + "@smithy/util-endpoints" "^2.0.5" + "@smithy/util-middleware" "^3.0.3" + "@smithy/util-retry" "^3.0.3" + "@smithy/util-utf8" "^3.0.0" + tslib "^2.6.2" + +"@aws-sdk/client-acm@3.632.0": + version "3.632.0" + resolved "https://registry.npmjs.org/@aws-sdk/client-acm/-/client-acm-3.632.0.tgz#a476d9964a2c06060e14f69e6afb0ba8a227ef54" + integrity sha512-uPsDoJFmFTJXTSJ8Dmi1u901Drss9CXsxRHX+kUp30A92HK4C7LbnmUh0gHaXM4OgFeRbklrGNbqQr6AxRRKBA== + dependencies: + "@aws-crypto/sha256-browser" "5.2.0" + "@aws-crypto/sha256-js" "5.2.0" + "@aws-sdk/client-sso-oidc" "3.632.0" + "@aws-sdk/client-sts" "3.632.0" + "@aws-sdk/core" "3.629.0" + "@aws-sdk/credential-provider-node" "3.632.0" + "@aws-sdk/middleware-host-header" "3.620.0" + "@aws-sdk/middleware-logger" "3.609.0" + "@aws-sdk/middleware-recursion-detection" "3.620.0" + "@aws-sdk/middleware-user-agent" "3.632.0" + "@aws-sdk/region-config-resolver" "3.614.0" + "@aws-sdk/types" "3.609.0" + "@aws-sdk/util-endpoints" "3.632.0" + "@aws-sdk/util-user-agent-browser" "3.609.0" + "@aws-sdk/util-user-agent-node" "3.614.0" + "@smithy/config-resolver" "^3.0.5" + "@smithy/core" "^2.3.2" + "@smithy/fetch-http-handler" "^3.2.4" + "@smithy/hash-node" "^3.0.3" + "@smithy/invalid-dependency" "^3.0.3" + "@smithy/middleware-content-length" "^3.0.5" + "@smithy/middleware-endpoint" "^3.1.0" + "@smithy/middleware-retry" "^3.0.14" + "@smithy/middleware-serde" "^3.0.3" + "@smithy/middleware-stack" "^3.0.3" + "@smithy/node-config-provider" "^3.1.4" + "@smithy/node-http-handler" "^3.1.4" + "@smithy/protocol-http" "^4.1.0" + "@smithy/smithy-client" "^3.1.12" + "@smithy/types" "^3.3.0" + "@smithy/url-parser" "^3.0.3" + "@smithy/util-base64" "^3.0.0" + "@smithy/util-body-length-browser" "^3.0.0" + "@smithy/util-body-length-node" "^3.0.0" + "@smithy/util-defaults-mode-browser" "^3.0.14" + "@smithy/util-defaults-mode-node" "^3.0.14" + "@smithy/util-endpoints" "^2.0.5" + "@smithy/util-middleware" "^3.0.3" + "@smithy/util-retry" "^3.0.3" + "@smithy/util-utf8" "^3.0.0" + "@smithy/util-waiter" "^3.1.2" + tslib "^2.6.2" + +"@aws-sdk/client-amplify@3.632.0": + version "3.632.0" + resolved "https://registry.npmjs.org/@aws-sdk/client-amplify/-/client-amplify-3.632.0.tgz#9960f36c282de8f78e5582c57a7eaba54eccd975" + integrity sha512-ktlje4aC+R1ZgmJzITeGm17YkBEPPPOim+HnHpyu5+W5k55LaQ9q2uHM0wcNrNCu6BwN3jJ2s2+v+z7jT2GQuw== + dependencies: + "@aws-crypto/sha256-browser" "5.2.0" + "@aws-crypto/sha256-js" "5.2.0" + "@aws-sdk/client-sso-oidc" "3.632.0" + "@aws-sdk/client-sts" "3.632.0" + "@aws-sdk/core" "3.629.0" + "@aws-sdk/credential-provider-node" "3.632.0" + "@aws-sdk/middleware-host-header" "3.620.0" + "@aws-sdk/middleware-logger" "3.609.0" + "@aws-sdk/middleware-recursion-detection" "3.620.0" + "@aws-sdk/middleware-user-agent" "3.632.0" + "@aws-sdk/region-config-resolver" "3.614.0" + "@aws-sdk/types" "3.609.0" + "@aws-sdk/util-endpoints" "3.632.0" + "@aws-sdk/util-user-agent-browser" "3.609.0" + "@aws-sdk/util-user-agent-node" "3.614.0" + "@smithy/config-resolver" "^3.0.5" + "@smithy/core" "^2.3.2" + "@smithy/fetch-http-handler" "^3.2.4" + "@smithy/hash-node" "^3.0.3" + "@smithy/invalid-dependency" "^3.0.3" + "@smithy/middleware-content-length" "^3.0.5" + "@smithy/middleware-endpoint" "^3.1.0" + "@smithy/middleware-retry" "^3.0.14" + "@smithy/middleware-serde" "^3.0.3" + "@smithy/middleware-stack" "^3.0.3" + "@smithy/node-config-provider" "^3.1.4" + "@smithy/node-http-handler" "^3.1.4" + "@smithy/protocol-http" "^4.1.0" + "@smithy/smithy-client" "^3.1.12" + "@smithy/types" "^3.3.0" + "@smithy/url-parser" "^3.0.3" + "@smithy/util-base64" "^3.0.0" + "@smithy/util-body-length-browser" "^3.0.0" + "@smithy/util-body-length-node" "^3.0.0" + "@smithy/util-defaults-mode-browser" "^3.0.14" + "@smithy/util-defaults-mode-node" "^3.0.14" + "@smithy/util-endpoints" "^2.0.5" + "@smithy/util-middleware" "^3.0.3" + "@smithy/util-retry" "^3.0.3" + "@smithy/util-utf8" "^3.0.0" + tslib "^2.6.2" + +"@aws-sdk/client-cloudformation@3.632.0": + version "3.632.0" + resolved "https://registry.npmjs.org/@aws-sdk/client-cloudformation/-/client-cloudformation-3.632.0.tgz#bb9f4da81d4f33dad331fced83c5d0de2adfb893" + integrity sha512-8UpEsCuw7lzt0+DoEtbSKkcnEJWpvauWerqFGJD2sm661fgbU/9OqQ2ki/dD+eu9SEsDcJ8lZX2VfXXX7ngZuQ== dependencies: "@aws-crypto/sha256-browser" "5.2.0" "@aws-crypto/sha256-js" "5.2.0" - "@aws-sdk/client-sso-oidc" "3.637.0" - "@aws-sdk/client-sts" "3.637.0" - "@aws-sdk/core" "3.635.0" - "@aws-sdk/credential-provider-node" "3.637.0" + "@aws-sdk/client-sso-oidc" "3.632.0" + "@aws-sdk/client-sts" "3.632.0" + "@aws-sdk/core" "3.629.0" + "@aws-sdk/credential-provider-node" "3.632.0" "@aws-sdk/middleware-host-header" "3.620.0" "@aws-sdk/middleware-logger" "3.609.0" "@aws-sdk/middleware-recursion-detection" "3.620.0" - "@aws-sdk/middleware-user-agent" "3.637.0" + "@aws-sdk/middleware-user-agent" "3.632.0" "@aws-sdk/region-config-resolver" "3.614.0" "@aws-sdk/types" "3.609.0" - "@aws-sdk/util-endpoints" "3.637.0" + "@aws-sdk/util-endpoints" "3.632.0" "@aws-sdk/util-user-agent-browser" "3.609.0" "@aws-sdk/util-user-agent-node" "3.614.0" "@smithy/config-resolver" "^3.0.5" - "@smithy/core" "^2.4.0" + "@smithy/core" "^2.3.2" "@smithy/fetch-http-handler" "^3.2.4" "@smithy/hash-node" "^3.0.3" "@smithy/invalid-dependency" "^3.0.3" "@smithy/middleware-content-length" "^3.0.5" "@smithy/middleware-endpoint" "^3.1.0" - "@smithy/middleware-retry" "^3.0.15" + "@smithy/middleware-retry" "^3.0.14" "@smithy/middleware-serde" "^3.0.3" "@smithy/middleware-stack" "^3.0.3" "@smithy/node-config-provider" "^3.1.4" "@smithy/node-http-handler" "^3.1.4" "@smithy/protocol-http" "^4.1.0" - "@smithy/smithy-client" "^3.2.0" + "@smithy/smithy-client" "^3.1.12" "@smithy/types" "^3.3.0" "@smithy/url-parser" "^3.0.3" "@smithy/util-base64" "^3.0.0" "@smithy/util-body-length-browser" "^3.0.0" "@smithy/util-body-length-node" "^3.0.0" - "@smithy/util-defaults-mode-browser" "^3.0.15" - "@smithy/util-defaults-mode-node" "^3.0.15" + "@smithy/util-defaults-mode-browser" "^3.0.14" + "@smithy/util-defaults-mode-node" "^3.0.14" "@smithy/util-endpoints" "^2.0.5" "@smithy/util-middleware" "^3.0.3" "@smithy/util-retry" "^3.0.3" @@ -483,185 +371,196 @@ tslib "^2.6.2" uuid "^9.0.1" -"@aws-sdk/client-cloudformation@^3.529.1": - version "3.649.0" - resolved "https://registry.npmjs.org/@aws-sdk/client-cloudformation/-/client-cloudformation-3.649.0.tgz#b7a5c871d46fb79162a65adec21dcdf7abe7daba" - integrity sha512-bddxRUCM/JxbQdBj1unWC12yVai7mEPFyPuj03zI0FXWChvJKuQGhod6MccwfJ4fEi3fptY8i3S1VtCKLDuGvw== +"@aws-sdk/client-cloudformation@3.662.0": + version "3.662.0" + resolved "https://registry.npmjs.org/@aws-sdk/client-cloudformation/-/client-cloudformation-3.662.0.tgz#a0f4491441c37e0266541b8b72b978176032d36b" + integrity sha512-BO/9KsGdVAUnNMuZaGwJidUr6MlKt0mKjHXUdYCa4PcYj3uLyK8jyy1pUmQbmw0xocT9/Cq682h6OKKQ+AE0EQ== dependencies: "@aws-crypto/sha256-browser" "5.2.0" "@aws-crypto/sha256-js" "5.2.0" - "@aws-sdk/client-sso-oidc" "3.649.0" - "@aws-sdk/client-sts" "3.649.0" - "@aws-sdk/core" "3.649.0" - "@aws-sdk/credential-provider-node" "3.649.0" - "@aws-sdk/middleware-host-header" "3.649.0" - "@aws-sdk/middleware-logger" "3.649.0" - "@aws-sdk/middleware-recursion-detection" "3.649.0" - "@aws-sdk/middleware-user-agent" "3.649.0" - "@aws-sdk/region-config-resolver" "3.649.0" - "@aws-sdk/types" "3.649.0" - "@aws-sdk/util-endpoints" "3.649.0" - "@aws-sdk/util-user-agent-browser" "3.649.0" - "@aws-sdk/util-user-agent-node" "3.649.0" - "@smithy/config-resolver" "^3.0.6" - "@smithy/core" "^2.4.1" - "@smithy/fetch-http-handler" "^3.2.5" - "@smithy/hash-node" "^3.0.4" - "@smithy/invalid-dependency" "^3.0.4" - "@smithy/middleware-content-length" "^3.0.6" - "@smithy/middleware-endpoint" "^3.1.1" - "@smithy/middleware-retry" "^3.0.16" - "@smithy/middleware-serde" "^3.0.4" - "@smithy/middleware-stack" "^3.0.4" - "@smithy/node-config-provider" "^3.1.5" - "@smithy/node-http-handler" "^3.2.0" - "@smithy/protocol-http" "^4.1.1" - "@smithy/smithy-client" "^3.3.0" - "@smithy/types" "^3.4.0" - "@smithy/url-parser" "^3.0.4" + "@aws-sdk/client-sso-oidc" "3.662.0" + "@aws-sdk/client-sts" "3.662.0" + "@aws-sdk/core" "3.662.0" + "@aws-sdk/credential-provider-node" "3.662.0" + "@aws-sdk/middleware-host-header" "3.662.0" + "@aws-sdk/middleware-logger" "3.662.0" + "@aws-sdk/middleware-recursion-detection" "3.662.0" + "@aws-sdk/middleware-user-agent" "3.662.0" + "@aws-sdk/region-config-resolver" "3.662.0" + "@aws-sdk/types" "3.662.0" + "@aws-sdk/util-endpoints" "3.662.0" + "@aws-sdk/util-user-agent-browser" "3.662.0" + "@aws-sdk/util-user-agent-node" "3.662.0" + "@smithy/config-resolver" "^3.0.9" + "@smithy/core" "^2.4.7" + "@smithy/fetch-http-handler" "^3.2.9" + "@smithy/hash-node" "^3.0.7" + "@smithy/invalid-dependency" "^3.0.7" + "@smithy/middleware-content-length" "^3.0.9" + "@smithy/middleware-endpoint" "^3.1.4" + "@smithy/middleware-retry" "^3.0.22" + "@smithy/middleware-serde" "^3.0.7" + "@smithy/middleware-stack" "^3.0.7" + "@smithy/node-config-provider" "^3.1.8" + "@smithy/node-http-handler" "^3.2.4" + "@smithy/protocol-http" "^4.1.4" + "@smithy/smithy-client" "^3.3.6" + "@smithy/types" "^3.5.0" + "@smithy/url-parser" "^3.0.7" "@smithy/util-base64" "^3.0.0" "@smithy/util-body-length-browser" "^3.0.0" "@smithy/util-body-length-node" "^3.0.0" - "@smithy/util-defaults-mode-browser" "^3.0.16" - "@smithy/util-defaults-mode-node" "^3.0.16" - "@smithy/util-endpoints" "^2.1.0" - "@smithy/util-middleware" "^3.0.4" - "@smithy/util-retry" "^3.0.4" + "@smithy/util-defaults-mode-browser" "^3.0.22" + "@smithy/util-defaults-mode-node" "^3.0.22" + "@smithy/util-endpoints" "^2.1.3" + "@smithy/util-middleware" "^3.0.7" + "@smithy/util-retry" "^3.0.7" "@smithy/util-utf8" "^3.0.0" - "@smithy/util-waiter" "^3.1.3" + "@smithy/util-waiter" "^3.1.6" tslib "^2.6.2" uuid "^9.0.1" -"@aws-sdk/client-cloudwatch-logs@3.421.0": - version "3.421.0" - resolved "https://registry.npmjs.org/@aws-sdk/client-cloudwatch-logs/-/client-cloudwatch-logs-3.421.0.tgz#90de138ba92487ee8d6ac989994c62c5c5e64f3d" - integrity sha512-wCG5aqXzVH9M6Eo7vMHOD15j9EII0h8pWzxnC6sqOGChhgd4/3IFIra5REBFHYH3XvtpQn0qjTSOFMCvMqg7vg== - dependencies: - "@aws-crypto/sha256-browser" "3.0.0" - "@aws-crypto/sha256-js" "3.0.0" - "@aws-sdk/client-sts" "3.421.0" - "@aws-sdk/credential-provider-node" "3.421.0" - "@aws-sdk/middleware-host-header" "3.418.0" - "@aws-sdk/middleware-logger" "3.418.0" - "@aws-sdk/middleware-recursion-detection" "3.418.0" - "@aws-sdk/middleware-signing" "3.418.0" - "@aws-sdk/middleware-user-agent" "3.418.0" - "@aws-sdk/region-config-resolver" "3.418.0" - "@aws-sdk/types" "3.418.0" - "@aws-sdk/util-endpoints" "3.418.0" - "@aws-sdk/util-user-agent-browser" "3.418.0" - "@aws-sdk/util-user-agent-node" "3.418.0" - "@smithy/config-resolver" "^2.0.10" - "@smithy/fetch-http-handler" "^2.1.5" - "@smithy/hash-node" "^2.0.9" - "@smithy/invalid-dependency" "^2.0.9" - "@smithy/middleware-content-length" "^2.0.11" - "@smithy/middleware-endpoint" "^2.0.9" - "@smithy/middleware-retry" "^2.0.12" - "@smithy/middleware-serde" "^2.0.9" - "@smithy/middleware-stack" "^2.0.2" - "@smithy/node-config-provider" "^2.0.12" - "@smithy/node-http-handler" "^2.1.5" - "@smithy/protocol-http" "^3.0.5" - "@smithy/smithy-client" "^2.1.6" - "@smithy/types" "^2.3.3" - "@smithy/url-parser" "^2.0.9" - "@smithy/util-base64" "^2.0.0" - "@smithy/util-body-length-browser" "^2.0.0" - "@smithy/util-body-length-node" "^2.1.0" - "@smithy/util-defaults-mode-browser" "^2.0.10" - "@smithy/util-defaults-mode-node" "^2.0.12" - "@smithy/util-retry" "^2.0.2" - "@smithy/util-utf8" "^2.0.0" - tslib "^2.5.0" - uuid "^8.3.2" +"@aws-sdk/client-cloudwatch-logs@3.632.0": + version "3.632.0" + resolved "https://registry.npmjs.org/@aws-sdk/client-cloudwatch-logs/-/client-cloudwatch-logs-3.632.0.tgz#53355665b04a2131a80bcaba7a3f88ecf6c7c929" + integrity sha512-QrG04Ss2/KDsvGmoBH9QHjaC/wx7Gf9U2F5o8gYbHVU5ZGDW+zMX2Sj/6jjSyZ4qLD4sxK7sRHwK+fYA21OQQA== + dependencies: + "@aws-crypto/sha256-browser" "5.2.0" + "@aws-crypto/sha256-js" "5.2.0" + "@aws-sdk/client-sso-oidc" "3.632.0" + "@aws-sdk/client-sts" "3.632.0" + "@aws-sdk/core" "3.629.0" + "@aws-sdk/credential-provider-node" "3.632.0" + "@aws-sdk/middleware-host-header" "3.620.0" + "@aws-sdk/middleware-logger" "3.609.0" + "@aws-sdk/middleware-recursion-detection" "3.620.0" + "@aws-sdk/middleware-user-agent" "3.632.0" + "@aws-sdk/region-config-resolver" "3.614.0" + "@aws-sdk/types" "3.609.0" + "@aws-sdk/util-endpoints" "3.632.0" + "@aws-sdk/util-user-agent-browser" "3.609.0" + "@aws-sdk/util-user-agent-node" "3.614.0" + "@smithy/config-resolver" "^3.0.5" + "@smithy/core" "^2.3.2" + "@smithy/eventstream-serde-browser" "^3.0.6" + "@smithy/eventstream-serde-config-resolver" "^3.0.3" + "@smithy/eventstream-serde-node" "^3.0.5" + "@smithy/fetch-http-handler" "^3.2.4" + "@smithy/hash-node" "^3.0.3" + "@smithy/invalid-dependency" "^3.0.3" + "@smithy/middleware-content-length" "^3.0.5" + "@smithy/middleware-endpoint" "^3.1.0" + "@smithy/middleware-retry" "^3.0.14" + "@smithy/middleware-serde" "^3.0.3" + "@smithy/middleware-stack" "^3.0.3" + "@smithy/node-config-provider" "^3.1.4" + "@smithy/node-http-handler" "^3.1.4" + "@smithy/protocol-http" "^4.1.0" + "@smithy/smithy-client" "^3.1.12" + "@smithy/types" "^3.3.0" + "@smithy/url-parser" "^3.0.3" + "@smithy/util-base64" "^3.0.0" + "@smithy/util-body-length-browser" "^3.0.0" + "@smithy/util-body-length-node" "^3.0.0" + "@smithy/util-defaults-mode-browser" "^3.0.14" + "@smithy/util-defaults-mode-node" "^3.0.14" + "@smithy/util-endpoints" "^2.0.5" + "@smithy/util-middleware" "^3.0.3" + "@smithy/util-retry" "^3.0.3" + "@smithy/util-utf8" "^3.0.0" + tslib "^2.6.2" + uuid "^9.0.1" -"@aws-sdk/client-cloudwatch@3.421.0": - version "3.421.0" - resolved "https://registry.npmjs.org/@aws-sdk/client-cloudwatch/-/client-cloudwatch-3.421.0.tgz#4589cb1e03e05188870e18340b256fc8fb74fb95" - integrity sha512-EBegld7Ks/g1tyNL+0AgTS0ZdgF0njz/AgyQwDIHXgsJVDn9tNga8wL3V2l2aj37gASJAC6PEXwK1rb0pVz4lw== - dependencies: - "@aws-crypto/sha256-browser" "3.0.0" - "@aws-crypto/sha256-js" "3.0.0" - "@aws-sdk/client-sts" "3.421.0" - "@aws-sdk/credential-provider-node" "3.421.0" - "@aws-sdk/middleware-host-header" "3.418.0" - "@aws-sdk/middleware-logger" "3.418.0" - "@aws-sdk/middleware-recursion-detection" "3.418.0" - "@aws-sdk/middleware-signing" "3.418.0" - "@aws-sdk/middleware-user-agent" "3.418.0" - "@aws-sdk/region-config-resolver" "3.418.0" - "@aws-sdk/types" "3.418.0" - "@aws-sdk/util-endpoints" "3.418.0" - "@aws-sdk/util-user-agent-browser" "3.418.0" - "@aws-sdk/util-user-agent-node" "3.418.0" - "@smithy/config-resolver" "^2.0.10" - "@smithy/fetch-http-handler" "^2.1.5" - "@smithy/hash-node" "^2.0.9" - "@smithy/invalid-dependency" "^2.0.9" - "@smithy/middleware-content-length" "^2.0.11" - "@smithy/middleware-endpoint" "^2.0.9" - "@smithy/middleware-retry" "^2.0.12" - "@smithy/middleware-serde" "^2.0.9" - "@smithy/middleware-stack" "^2.0.2" - "@smithy/node-config-provider" "^2.0.12" - "@smithy/node-http-handler" "^2.1.5" - "@smithy/protocol-http" "^3.0.5" - "@smithy/smithy-client" "^2.1.6" - "@smithy/types" "^2.3.3" - "@smithy/url-parser" "^2.0.9" - "@smithy/util-base64" "^2.0.0" - "@smithy/util-body-length-browser" "^2.0.0" - "@smithy/util-body-length-node" "^2.1.0" - "@smithy/util-defaults-mode-browser" "^2.0.10" - "@smithy/util-defaults-mode-node" "^2.0.12" - "@smithy/util-retry" "^2.0.2" - "@smithy/util-utf8" "^2.0.0" - "@smithy/util-waiter" "^2.0.9" - fast-xml-parser "4.2.5" - tslib "^2.5.0" +"@aws-sdk/client-cloudwatch@3.632.0": + version "3.632.0" + resolved "https://registry.npmjs.org/@aws-sdk/client-cloudwatch/-/client-cloudwatch-3.632.0.tgz#865a01e2eea926d80caeec7b461c126c5f51b7b5" + integrity sha512-RIItCf874T8aiE17yikJ6VcARvRv/sn86WMpyJCN0+aUMSOB8X86OHe7KCUN72EkvFKeWXim808RPpS8fZLXKw== + dependencies: + "@aws-crypto/sha256-browser" "5.2.0" + "@aws-crypto/sha256-js" "5.2.0" + "@aws-sdk/client-sso-oidc" "3.632.0" + "@aws-sdk/client-sts" "3.632.0" + "@aws-sdk/core" "3.629.0" + "@aws-sdk/credential-provider-node" "3.632.0" + "@aws-sdk/middleware-host-header" "3.620.0" + "@aws-sdk/middleware-logger" "3.609.0" + "@aws-sdk/middleware-recursion-detection" "3.620.0" + "@aws-sdk/middleware-user-agent" "3.632.0" + "@aws-sdk/region-config-resolver" "3.614.0" + "@aws-sdk/types" "3.609.0" + "@aws-sdk/util-endpoints" "3.632.0" + "@aws-sdk/util-user-agent-browser" "3.609.0" + "@aws-sdk/util-user-agent-node" "3.614.0" + "@smithy/config-resolver" "^3.0.5" + "@smithy/core" "^2.3.2" + "@smithy/fetch-http-handler" "^3.2.4" + "@smithy/hash-node" "^3.0.3" + "@smithy/invalid-dependency" "^3.0.3" + "@smithy/middleware-compression" "^3.0.7" + "@smithy/middleware-content-length" "^3.0.5" + "@smithy/middleware-endpoint" "^3.1.0" + "@smithy/middleware-retry" "^3.0.14" + "@smithy/middleware-serde" "^3.0.3" + "@smithy/middleware-stack" "^3.0.3" + "@smithy/node-config-provider" "^3.1.4" + "@smithy/node-http-handler" "^3.1.4" + "@smithy/protocol-http" "^4.1.0" + "@smithy/smithy-client" "^3.1.12" + "@smithy/types" "^3.3.0" + "@smithy/url-parser" "^3.0.3" + "@smithy/util-base64" "^3.0.0" + "@smithy/util-body-length-browser" "^3.0.0" + "@smithy/util-body-length-node" "^3.0.0" + "@smithy/util-defaults-mode-browser" "^3.0.14" + "@smithy/util-defaults-mode-node" "^3.0.14" + "@smithy/util-endpoints" "^2.0.5" + "@smithy/util-middleware" "^3.0.3" + "@smithy/util-retry" "^3.0.3" + "@smithy/util-utf8" "^3.0.0" + "@smithy/util-waiter" "^3.1.2" + tslib "^2.6.2" -"@aws-sdk/client-codeartifact@3.637.0": - version "3.637.0" - resolved "https://registry.npmjs.org/@aws-sdk/client-codeartifact/-/client-codeartifact-3.637.0.tgz#a46fe5bc621253cd538b259678d1e196e5d3066b" - integrity sha512-gWuQi9hktfQ5rQE4MrQZYQoREK6xAFH0dyJeRAhUXSG3OFOmtzk+zYXcjaLCLzYfTpnx7iaYUSQo5nq/HmOZvQ== +"@aws-sdk/client-codeartifact@3.632.0": + version "3.632.0" + resolved "https://registry.npmjs.org/@aws-sdk/client-codeartifact/-/client-codeartifact-3.632.0.tgz#4eacd46f4fa97dc8418b4b6ffa1c14bb002b60d5" + integrity sha512-jaR9tgZN/rzvs8iFdGlSlShHJU+PD0U54i/XZB+w8EnDOlKU1J35DObF5Mqty98Z1LsZWuKAvOyFMVj5lAmQZQ== dependencies: "@aws-crypto/sha256-browser" "5.2.0" "@aws-crypto/sha256-js" "5.2.0" - "@aws-sdk/client-sso-oidc" "3.637.0" - "@aws-sdk/client-sts" "3.637.0" - "@aws-sdk/core" "3.635.0" - "@aws-sdk/credential-provider-node" "3.637.0" + "@aws-sdk/client-sso-oidc" "3.632.0" + "@aws-sdk/client-sts" "3.632.0" + "@aws-sdk/core" "3.629.0" + "@aws-sdk/credential-provider-node" "3.632.0" "@aws-sdk/middleware-host-header" "3.620.0" "@aws-sdk/middleware-logger" "3.609.0" "@aws-sdk/middleware-recursion-detection" "3.620.0" - "@aws-sdk/middleware-user-agent" "3.637.0" + "@aws-sdk/middleware-user-agent" "3.632.0" "@aws-sdk/region-config-resolver" "3.614.0" "@aws-sdk/types" "3.609.0" - "@aws-sdk/util-endpoints" "3.637.0" + "@aws-sdk/util-endpoints" "3.632.0" "@aws-sdk/util-user-agent-browser" "3.609.0" "@aws-sdk/util-user-agent-node" "3.614.0" "@smithy/config-resolver" "^3.0.5" - "@smithy/core" "^2.4.0" + "@smithy/core" "^2.3.2" "@smithy/fetch-http-handler" "^3.2.4" "@smithy/hash-node" "^3.0.3" "@smithy/invalid-dependency" "^3.0.3" "@smithy/middleware-content-length" "^3.0.5" "@smithy/middleware-endpoint" "^3.1.0" - "@smithy/middleware-retry" "^3.0.15" + "@smithy/middleware-retry" "^3.0.14" "@smithy/middleware-serde" "^3.0.3" "@smithy/middleware-stack" "^3.0.3" "@smithy/node-config-provider" "^3.1.4" "@smithy/node-http-handler" "^3.1.4" "@smithy/protocol-http" "^4.1.0" - "@smithy/smithy-client" "^3.2.0" + "@smithy/smithy-client" "^3.1.12" "@smithy/types" "^3.3.0" "@smithy/url-parser" "^3.0.3" "@smithy/util-base64" "^3.0.0" "@smithy/util-body-length-browser" "^3.0.0" "@smithy/util-body-length-node" "^3.0.0" - "@smithy/util-defaults-mode-browser" "^3.0.15" - "@smithy/util-defaults-mode-node" "^3.0.15" + "@smithy/util-defaults-mode-browser" "^3.0.14" + "@smithy/util-defaults-mode-node" "^3.0.14" "@smithy/util-endpoints" "^2.0.5" "@smithy/util-middleware" "^3.0.3" "@smithy/util-retry" "^3.0.3" @@ -669,2125 +568,1356 @@ "@smithy/util-utf8" "^3.0.0" tslib "^2.6.2" -"@aws-sdk/client-codepipeline@3.421.0": - version "3.421.0" - resolved "https://registry.npmjs.org/@aws-sdk/client-codepipeline/-/client-codepipeline-3.421.0.tgz#d5afaf6f3adaa5ca41770d7ec6a13a8662d53344" - integrity sha512-X24n1KZk9RuAoDd659N56XyLjGiv1RyE0uHgo5hQOhI3hxgEuwgTnnb61nq6oBELa83Eu33gaKG6G1ukayVv/w== - dependencies: - "@aws-crypto/sha256-browser" "3.0.0" - "@aws-crypto/sha256-js" "3.0.0" - "@aws-sdk/client-sts" "3.421.0" - "@aws-sdk/credential-provider-node" "3.421.0" - "@aws-sdk/middleware-host-header" "3.418.0" - "@aws-sdk/middleware-logger" "3.418.0" - "@aws-sdk/middleware-recursion-detection" "3.418.0" - "@aws-sdk/middleware-signing" "3.418.0" - "@aws-sdk/middleware-user-agent" "3.418.0" - "@aws-sdk/region-config-resolver" "3.418.0" - "@aws-sdk/types" "3.418.0" - "@aws-sdk/util-endpoints" "3.418.0" - "@aws-sdk/util-user-agent-browser" "3.418.0" - "@aws-sdk/util-user-agent-node" "3.418.0" - "@smithy/config-resolver" "^2.0.10" - "@smithy/fetch-http-handler" "^2.1.5" - "@smithy/hash-node" "^2.0.9" - "@smithy/invalid-dependency" "^2.0.9" - "@smithy/middleware-content-length" "^2.0.11" - "@smithy/middleware-endpoint" "^2.0.9" - "@smithy/middleware-retry" "^2.0.12" - "@smithy/middleware-serde" "^2.0.9" - "@smithy/middleware-stack" "^2.0.2" - "@smithy/node-config-provider" "^2.0.12" - "@smithy/node-http-handler" "^2.1.5" - "@smithy/protocol-http" "^3.0.5" - "@smithy/smithy-client" "^2.1.6" - "@smithy/types" "^2.3.3" - "@smithy/url-parser" "^2.0.9" - "@smithy/util-base64" "^2.0.0" - "@smithy/util-body-length-browser" "^2.0.0" - "@smithy/util-body-length-node" "^2.1.0" - "@smithy/util-defaults-mode-browser" "^2.0.10" - "@smithy/util-defaults-mode-node" "^2.0.12" - "@smithy/util-retry" "^2.0.2" - "@smithy/util-utf8" "^2.0.0" - tslib "^2.5.0" - uuid "^8.3.2" - -"@aws-sdk/client-codepipeline@3.451.0": - version "3.451.0" - resolved "https://registry.npmjs.org/@aws-sdk/client-codepipeline/-/client-codepipeline-3.451.0.tgz#b568e4ab622afa3ced51a16b2954cba52f14813d" - integrity sha512-XUpu5m4//WzLqHfYrcfZMzB+ifVz/IswasQwFkBOsVG+gUobv4IFfkWfpdPqkiBkekgRDNyP113clF/egEqkPw== - dependencies: - "@aws-crypto/sha256-browser" "3.0.0" - "@aws-crypto/sha256-js" "3.0.0" - "@aws-sdk/client-sts" "3.451.0" - "@aws-sdk/core" "3.451.0" - "@aws-sdk/credential-provider-node" "3.451.0" - "@aws-sdk/middleware-host-header" "3.451.0" - "@aws-sdk/middleware-logger" "3.451.0" - "@aws-sdk/middleware-recursion-detection" "3.451.0" - "@aws-sdk/middleware-signing" "3.451.0" - "@aws-sdk/middleware-user-agent" "3.451.0" - "@aws-sdk/region-config-resolver" "3.451.0" - "@aws-sdk/types" "3.451.0" - "@aws-sdk/util-endpoints" "3.451.0" - "@aws-sdk/util-user-agent-browser" "3.451.0" - "@aws-sdk/util-user-agent-node" "3.451.0" - "@smithy/config-resolver" "^2.0.18" - "@smithy/fetch-http-handler" "^2.2.6" - "@smithy/hash-node" "^2.0.15" - "@smithy/invalid-dependency" "^2.0.13" - "@smithy/middleware-content-length" "^2.0.15" - "@smithy/middleware-endpoint" "^2.2.0" - "@smithy/middleware-retry" "^2.0.20" - "@smithy/middleware-serde" "^2.0.13" - "@smithy/middleware-stack" "^2.0.7" - "@smithy/node-config-provider" "^2.1.5" - "@smithy/node-http-handler" "^2.1.9" - "@smithy/protocol-http" "^3.0.9" - "@smithy/smithy-client" "^2.1.15" - "@smithy/types" "^2.5.0" - "@smithy/url-parser" "^2.0.13" - "@smithy/util-base64" "^2.0.1" - "@smithy/util-body-length-browser" "^2.0.0" - "@smithy/util-body-length-node" "^2.1.0" - "@smithy/util-defaults-mode-browser" "^2.0.19" - "@smithy/util-defaults-mode-node" "^2.0.25" - "@smithy/util-endpoints" "^1.0.4" - "@smithy/util-retry" "^2.0.6" - "@smithy/util-utf8" "^2.0.2" - tslib "^2.5.0" - uuid "^8.3.2" - -"@aws-sdk/client-cognito-identity@3.421.0": - version "3.421.0" - resolved "https://registry.npmjs.org/@aws-sdk/client-cognito-identity/-/client-cognito-identity-3.421.0.tgz#ee1e4c82d11001ad2a93dfeb6a736b39ee4e185c" - integrity sha512-9htG14uDA/2XhU+vRhBcCG8GAOJ29rV53cxlc6I1YRKD6imXdU+X0ZfMPZCkPjEPGT4hHTpO0vR2J7zY8FXfzg== - dependencies: - "@aws-crypto/sha256-browser" "3.0.0" - "@aws-crypto/sha256-js" "3.0.0" - "@aws-sdk/client-sts" "3.421.0" - "@aws-sdk/credential-provider-node" "3.421.0" - "@aws-sdk/middleware-host-header" "3.418.0" - "@aws-sdk/middleware-logger" "3.418.0" - "@aws-sdk/middleware-recursion-detection" "3.418.0" - "@aws-sdk/middleware-signing" "3.418.0" - "@aws-sdk/middleware-user-agent" "3.418.0" - "@aws-sdk/region-config-resolver" "3.418.0" - "@aws-sdk/types" "3.418.0" - "@aws-sdk/util-endpoints" "3.418.0" - "@aws-sdk/util-user-agent-browser" "3.418.0" - "@aws-sdk/util-user-agent-node" "3.418.0" - "@smithy/config-resolver" "^2.0.10" - "@smithy/fetch-http-handler" "^2.1.5" - "@smithy/hash-node" "^2.0.9" - "@smithy/invalid-dependency" "^2.0.9" - "@smithy/middleware-content-length" "^2.0.11" - "@smithy/middleware-endpoint" "^2.0.9" - "@smithy/middleware-retry" "^2.0.12" - "@smithy/middleware-serde" "^2.0.9" - "@smithy/middleware-stack" "^2.0.2" - "@smithy/node-config-provider" "^2.0.12" - "@smithy/node-http-handler" "^2.1.5" - "@smithy/protocol-http" "^3.0.5" - "@smithy/smithy-client" "^2.1.6" - "@smithy/types" "^2.3.3" - "@smithy/url-parser" "^2.0.9" - "@smithy/util-base64" "^2.0.0" - "@smithy/util-body-length-browser" "^2.0.0" - "@smithy/util-body-length-node" "^2.1.0" - "@smithy/util-defaults-mode-browser" "^2.0.10" - "@smithy/util-defaults-mode-node" "^2.0.12" - "@smithy/util-retry" "^2.0.2" - "@smithy/util-utf8" "^2.0.0" - tslib "^2.5.0" - -"@aws-sdk/client-cognito-identity@3.637.0": - version "3.637.0" - resolved "https://registry.npmjs.org/@aws-sdk/client-cognito-identity/-/client-cognito-identity-3.637.0.tgz#77c755a0faa53d94910b76fc34ac0aee59263855" - integrity sha512-391mca6yEfXVcSOTLGcxzlT0QCFfvoymLlVHfb//bzl806UUTq12cR2k+AnaCKLj+QSejmA7n6lwZWADm00Fvg== +"@aws-sdk/client-codepipeline@3.632.0": + version "3.632.0" + resolved "https://registry.npmjs.org/@aws-sdk/client-codepipeline/-/client-codepipeline-3.632.0.tgz#c09564b38aea90001767aa3640e4456bdc7a28a0" + integrity sha512-5Cl8W/tG7k/sGmEEst2NY9o9ID2bTvdaPLT0ICpi8Ehq8K17Q79nMKgSzBGvgkQv6lvYxgsdFU3Cv0lkcXw75Q== dependencies: "@aws-crypto/sha256-browser" "5.2.0" "@aws-crypto/sha256-js" "5.2.0" - "@aws-sdk/client-sso-oidc" "3.637.0" - "@aws-sdk/client-sts" "3.637.0" - "@aws-sdk/core" "3.635.0" - "@aws-sdk/credential-provider-node" "3.637.0" + "@aws-sdk/client-sso-oidc" "3.632.0" + "@aws-sdk/client-sts" "3.632.0" + "@aws-sdk/core" "3.629.0" + "@aws-sdk/credential-provider-node" "3.632.0" "@aws-sdk/middleware-host-header" "3.620.0" "@aws-sdk/middleware-logger" "3.609.0" "@aws-sdk/middleware-recursion-detection" "3.620.0" - "@aws-sdk/middleware-user-agent" "3.637.0" + "@aws-sdk/middleware-user-agent" "3.632.0" "@aws-sdk/region-config-resolver" "3.614.0" "@aws-sdk/types" "3.609.0" - "@aws-sdk/util-endpoints" "3.637.0" + "@aws-sdk/util-endpoints" "3.632.0" "@aws-sdk/util-user-agent-browser" "3.609.0" "@aws-sdk/util-user-agent-node" "3.614.0" "@smithy/config-resolver" "^3.0.5" - "@smithy/core" "^2.4.0" + "@smithy/core" "^2.3.2" "@smithy/fetch-http-handler" "^3.2.4" "@smithy/hash-node" "^3.0.3" "@smithy/invalid-dependency" "^3.0.3" "@smithy/middleware-content-length" "^3.0.5" "@smithy/middleware-endpoint" "^3.1.0" - "@smithy/middleware-retry" "^3.0.15" + "@smithy/middleware-retry" "^3.0.14" "@smithy/middleware-serde" "^3.0.3" "@smithy/middleware-stack" "^3.0.3" "@smithy/node-config-provider" "^3.1.4" "@smithy/node-http-handler" "^3.1.4" "@smithy/protocol-http" "^4.1.0" - "@smithy/smithy-client" "^3.2.0" + "@smithy/smithy-client" "^3.1.12" "@smithy/types" "^3.3.0" "@smithy/url-parser" "^3.0.3" "@smithy/util-base64" "^3.0.0" "@smithy/util-body-length-browser" "^3.0.0" "@smithy/util-body-length-node" "^3.0.0" - "@smithy/util-defaults-mode-browser" "^3.0.15" - "@smithy/util-defaults-mode-node" "^3.0.15" + "@smithy/util-defaults-mode-browser" "^3.0.14" + "@smithy/util-defaults-mode-node" "^3.0.14" "@smithy/util-endpoints" "^2.0.5" "@smithy/util-middleware" "^3.0.3" "@smithy/util-retry" "^3.0.3" "@smithy/util-utf8" "^3.0.0" tslib "^2.6.2" + uuid "^9.0.1" -"@aws-sdk/client-dynamodb@3.421.0": - version "3.421.0" - resolved "https://registry.npmjs.org/@aws-sdk/client-dynamodb/-/client-dynamodb-3.421.0.tgz#f41ecf81a8b5192b5a3f24ec4746d6d7e0436a7b" - integrity sha512-TXyKvEYAxoz3LNpXSvPaLp139X06yzz35SNzKKNt/z7lfbmZ/jY7jVK4nur/Y5GSSlL+duW5yeS4iqq67kdl9Q== - dependencies: - "@aws-crypto/sha256-browser" "3.0.0" - "@aws-crypto/sha256-js" "3.0.0" - "@aws-sdk/client-sts" "3.421.0" - "@aws-sdk/credential-provider-node" "3.421.0" - "@aws-sdk/middleware-endpoint-discovery" "3.418.0" - "@aws-sdk/middleware-host-header" "3.418.0" - "@aws-sdk/middleware-logger" "3.418.0" - "@aws-sdk/middleware-recursion-detection" "3.418.0" - "@aws-sdk/middleware-signing" "3.418.0" - "@aws-sdk/middleware-user-agent" "3.418.0" - "@aws-sdk/region-config-resolver" "3.418.0" - "@aws-sdk/types" "3.418.0" - "@aws-sdk/util-endpoints" "3.418.0" - "@aws-sdk/util-user-agent-browser" "3.418.0" - "@aws-sdk/util-user-agent-node" "3.418.0" - "@smithy/config-resolver" "^2.0.10" - "@smithy/fetch-http-handler" "^2.1.5" - "@smithy/hash-node" "^2.0.9" - "@smithy/invalid-dependency" "^2.0.9" - "@smithy/middleware-content-length" "^2.0.11" - "@smithy/middleware-endpoint" "^2.0.9" - "@smithy/middleware-retry" "^2.0.12" - "@smithy/middleware-serde" "^2.0.9" - "@smithy/middleware-stack" "^2.0.2" - "@smithy/node-config-provider" "^2.0.12" - "@smithy/node-http-handler" "^2.1.5" - "@smithy/protocol-http" "^3.0.5" - "@smithy/smithy-client" "^2.1.6" - "@smithy/types" "^2.3.3" - "@smithy/url-parser" "^2.0.9" - "@smithy/util-base64" "^2.0.0" - "@smithy/util-body-length-browser" "^2.0.0" - "@smithy/util-body-length-node" "^2.1.0" - "@smithy/util-defaults-mode-browser" "^2.0.10" - "@smithy/util-defaults-mode-node" "^2.0.12" - "@smithy/util-retry" "^2.0.2" - "@smithy/util-utf8" "^2.0.0" - "@smithy/util-waiter" "^2.0.9" - tslib "^2.5.0" - uuid "^8.3.2" - -"@aws-sdk/client-ec2@3.421.0": - version "3.421.0" - resolved "https://registry.npmjs.org/@aws-sdk/client-ec2/-/client-ec2-3.421.0.tgz#9755ed88ed265344d38377600dff9b161811a553" - integrity sha512-TOB0d123LhQn3Zi9QNzCi9tCF3NIc+mNUTO+ZkgXRZSkSZ+NnyARZjwKR4x3+HKLsLsebnLV9lJWjCQo42pNOA== - dependencies: - "@aws-crypto/sha256-browser" "3.0.0" - "@aws-crypto/sha256-js" "3.0.0" - "@aws-sdk/client-sts" "3.421.0" - "@aws-sdk/credential-provider-node" "3.421.0" - "@aws-sdk/middleware-host-header" "3.418.0" - "@aws-sdk/middleware-logger" "3.418.0" - "@aws-sdk/middleware-recursion-detection" "3.418.0" - "@aws-sdk/middleware-sdk-ec2" "3.418.0" - "@aws-sdk/middleware-signing" "3.418.0" - "@aws-sdk/middleware-user-agent" "3.418.0" - "@aws-sdk/region-config-resolver" "3.418.0" - "@aws-sdk/types" "3.418.0" - "@aws-sdk/util-endpoints" "3.418.0" - "@aws-sdk/util-user-agent-browser" "3.418.0" - "@aws-sdk/util-user-agent-node" "3.418.0" - "@smithy/config-resolver" "^2.0.10" - "@smithy/fetch-http-handler" "^2.1.5" - "@smithy/hash-node" "^2.0.9" - "@smithy/invalid-dependency" "^2.0.9" - "@smithy/middleware-content-length" "^2.0.11" - "@smithy/middleware-endpoint" "^2.0.9" - "@smithy/middleware-retry" "^2.0.12" - "@smithy/middleware-serde" "^2.0.9" - "@smithy/middleware-stack" "^2.0.2" - "@smithy/node-config-provider" "^2.0.12" - "@smithy/node-http-handler" "^2.1.5" - "@smithy/protocol-http" "^3.0.5" - "@smithy/smithy-client" "^2.1.6" - "@smithy/types" "^2.3.3" - "@smithy/url-parser" "^2.0.9" - "@smithy/util-base64" "^2.0.0" - "@smithy/util-body-length-browser" "^2.0.0" - "@smithy/util-body-length-node" "^2.1.0" - "@smithy/util-defaults-mode-browser" "^2.0.10" - "@smithy/util-defaults-mode-node" "^2.0.12" - "@smithy/util-retry" "^2.0.2" - "@smithy/util-utf8" "^2.0.0" - "@smithy/util-waiter" "^2.0.9" - fast-xml-parser "4.2.5" - tslib "^2.5.0" - uuid "^8.3.2" - -"@aws-sdk/client-ecr@3.421.0": - version "3.421.0" - resolved "https://registry.npmjs.org/@aws-sdk/client-ecr/-/client-ecr-3.421.0.tgz#bb752b31fdf4029f16a501d5d16f95d47e07f4dd" - integrity sha512-Xb2vnuUUXFZ1bD1uAWYMPG09y6wf6lxUddWXNwXd4b7+DznkaE46TdYSlDR+hvqCj+h8hC23bqy60PY84Fml7A== - dependencies: - "@aws-crypto/sha256-browser" "3.0.0" - "@aws-crypto/sha256-js" "3.0.0" - "@aws-sdk/client-sts" "3.421.0" - "@aws-sdk/credential-provider-node" "3.421.0" - "@aws-sdk/middleware-host-header" "3.418.0" - "@aws-sdk/middleware-logger" "3.418.0" - "@aws-sdk/middleware-recursion-detection" "3.418.0" - "@aws-sdk/middleware-signing" "3.418.0" - "@aws-sdk/middleware-user-agent" "3.418.0" - "@aws-sdk/region-config-resolver" "3.418.0" - "@aws-sdk/types" "3.418.0" - "@aws-sdk/util-endpoints" "3.418.0" - "@aws-sdk/util-user-agent-browser" "3.418.0" - "@aws-sdk/util-user-agent-node" "3.418.0" - "@smithy/config-resolver" "^2.0.10" - "@smithy/fetch-http-handler" "^2.1.5" - "@smithy/hash-node" "^2.0.9" - "@smithy/invalid-dependency" "^2.0.9" - "@smithy/middleware-content-length" "^2.0.11" - "@smithy/middleware-endpoint" "^2.0.9" - "@smithy/middleware-retry" "^2.0.12" - "@smithy/middleware-serde" "^2.0.9" - "@smithy/middleware-stack" "^2.0.2" - "@smithy/node-config-provider" "^2.0.12" - "@smithy/node-http-handler" "^2.1.5" - "@smithy/protocol-http" "^3.0.5" - "@smithy/smithy-client" "^2.1.6" - "@smithy/types" "^2.3.3" - "@smithy/url-parser" "^2.0.9" - "@smithy/util-base64" "^2.0.0" - "@smithy/util-body-length-browser" "^2.0.0" - "@smithy/util-body-length-node" "^2.1.0" - "@smithy/util-defaults-mode-browser" "^2.0.10" - "@smithy/util-defaults-mode-node" "^2.0.12" - "@smithy/util-retry" "^2.0.2" - "@smithy/util-utf8" "^2.0.0" - "@smithy/util-waiter" "^2.0.9" - tslib "^2.5.0" +"@aws-sdk/client-cognito-identity@3.632.0": + version "3.632.0" + resolved "https://registry.npmjs.org/@aws-sdk/client-cognito-identity/-/client-cognito-identity-3.632.0.tgz#9b8b95885e21eecce2593f7a8f45ec5828ddf0be" + integrity sha512-ciPZZ0jxMmXuaKCVdJthWogfqJ/4nb1zCxm7D/XkKcSbANjAiJ+1l+yiu7ZPTLGKKPRQQkPsWUknw5xb/5LxeQ== + dependencies: + "@aws-crypto/sha256-browser" "5.2.0" + "@aws-crypto/sha256-js" "5.2.0" + "@aws-sdk/client-sso-oidc" "3.632.0" + "@aws-sdk/client-sts" "3.632.0" + "@aws-sdk/core" "3.629.0" + "@aws-sdk/credential-provider-node" "3.632.0" + "@aws-sdk/middleware-host-header" "3.620.0" + "@aws-sdk/middleware-logger" "3.609.0" + "@aws-sdk/middleware-recursion-detection" "3.620.0" + "@aws-sdk/middleware-user-agent" "3.632.0" + "@aws-sdk/region-config-resolver" "3.614.0" + "@aws-sdk/types" "3.609.0" + "@aws-sdk/util-endpoints" "3.632.0" + "@aws-sdk/util-user-agent-browser" "3.609.0" + "@aws-sdk/util-user-agent-node" "3.614.0" + "@smithy/config-resolver" "^3.0.5" + "@smithy/core" "^2.3.2" + "@smithy/fetch-http-handler" "^3.2.4" + "@smithy/hash-node" "^3.0.3" + "@smithy/invalid-dependency" "^3.0.3" + "@smithy/middleware-content-length" "^3.0.5" + "@smithy/middleware-endpoint" "^3.1.0" + "@smithy/middleware-retry" "^3.0.14" + "@smithy/middleware-serde" "^3.0.3" + "@smithy/middleware-stack" "^3.0.3" + "@smithy/node-config-provider" "^3.1.4" + "@smithy/node-http-handler" "^3.1.4" + "@smithy/protocol-http" "^4.1.0" + "@smithy/smithy-client" "^3.1.12" + "@smithy/types" "^3.3.0" + "@smithy/url-parser" "^3.0.3" + "@smithy/util-base64" "^3.0.0" + "@smithy/util-body-length-browser" "^3.0.0" + "@smithy/util-body-length-node" "^3.0.0" + "@smithy/util-defaults-mode-browser" "^3.0.14" + "@smithy/util-defaults-mode-node" "^3.0.14" + "@smithy/util-endpoints" "^2.0.5" + "@smithy/util-middleware" "^3.0.3" + "@smithy/util-retry" "^3.0.3" + "@smithy/util-utf8" "^3.0.0" + tslib "^2.6.2" -"@aws-sdk/client-ecr@3.637.0": - version "3.637.0" - resolved "https://registry.npmjs.org/@aws-sdk/client-ecr/-/client-ecr-3.637.0.tgz#ce6980c9dea69945484e590f7acc1c17dc618cd3" - integrity sha512-Ai9/NcHBYdfnJdbLyYhO+mGh2JLkkIcAQ1trijMyr1U3KVRdPsUofZapBygdeJz/4wmwH+CDqFGXQnq3sI9w7Q== +"@aws-sdk/client-dynamodb@3.632.0": + version "3.632.0" + resolved "https://registry.npmjs.org/@aws-sdk/client-dynamodb/-/client-dynamodb-3.632.0.tgz#c1980d0ec06f8663b795043c5436e94060ac7b80" + integrity sha512-Y7u/B/lyLdLZBrBSXjYZviyck0e3dZLL/Va6HIShNlDG8FyWuArefWr57/bu9Q8smdqpEduldprSRSWI7MPykg== dependencies: "@aws-crypto/sha256-browser" "5.2.0" "@aws-crypto/sha256-js" "5.2.0" - "@aws-sdk/client-sso-oidc" "3.637.0" - "@aws-sdk/client-sts" "3.637.0" - "@aws-sdk/core" "3.635.0" - "@aws-sdk/credential-provider-node" "3.637.0" + "@aws-sdk/client-sso-oidc" "3.632.0" + "@aws-sdk/client-sts" "3.632.0" + "@aws-sdk/core" "3.629.0" + "@aws-sdk/credential-provider-node" "3.632.0" + "@aws-sdk/middleware-endpoint-discovery" "3.620.0" "@aws-sdk/middleware-host-header" "3.620.0" "@aws-sdk/middleware-logger" "3.609.0" "@aws-sdk/middleware-recursion-detection" "3.620.0" - "@aws-sdk/middleware-user-agent" "3.637.0" + "@aws-sdk/middleware-user-agent" "3.632.0" "@aws-sdk/region-config-resolver" "3.614.0" "@aws-sdk/types" "3.609.0" - "@aws-sdk/util-endpoints" "3.637.0" + "@aws-sdk/util-endpoints" "3.632.0" "@aws-sdk/util-user-agent-browser" "3.609.0" "@aws-sdk/util-user-agent-node" "3.614.0" "@smithy/config-resolver" "^3.0.5" - "@smithy/core" "^2.4.0" + "@smithy/core" "^2.3.2" + "@smithy/fetch-http-handler" "^3.2.4" + "@smithy/hash-node" "^3.0.3" + "@smithy/invalid-dependency" "^3.0.3" + "@smithy/middleware-content-length" "^3.0.5" + "@smithy/middleware-endpoint" "^3.1.0" + "@smithy/middleware-retry" "^3.0.14" + "@smithy/middleware-serde" "^3.0.3" + "@smithy/middleware-stack" "^3.0.3" + "@smithy/node-config-provider" "^3.1.4" + "@smithy/node-http-handler" "^3.1.4" + "@smithy/protocol-http" "^4.1.0" + "@smithy/smithy-client" "^3.1.12" + "@smithy/types" "^3.3.0" + "@smithy/url-parser" "^3.0.3" + "@smithy/util-base64" "^3.0.0" + "@smithy/util-body-length-browser" "^3.0.0" + "@smithy/util-body-length-node" "^3.0.0" + "@smithy/util-defaults-mode-browser" "^3.0.14" + "@smithy/util-defaults-mode-node" "^3.0.14" + "@smithy/util-endpoints" "^2.0.5" + "@smithy/util-middleware" "^3.0.3" + "@smithy/util-retry" "^3.0.3" + "@smithy/util-utf8" "^3.0.0" + "@smithy/util-waiter" "^3.1.2" + tslib "^2.6.2" + uuid "^9.0.1" + +"@aws-sdk/client-ec2@3.632.0": + version "3.632.0" + resolved "https://registry.npmjs.org/@aws-sdk/client-ec2/-/client-ec2-3.632.0.tgz#291c496fbef8b1f3e166470e7dffff8911e3e53b" + integrity sha512-hjXIfn5OEISL5rous2G5N3/YgcBMwsKgwKZgrHissJjH/HralJIqQVCjxcE7X6diopgsbX0Lj/EbxkX2eudH/A== + dependencies: + "@aws-crypto/sha256-browser" "5.2.0" + "@aws-crypto/sha256-js" "5.2.0" + "@aws-sdk/client-sso-oidc" "3.632.0" + "@aws-sdk/client-sts" "3.632.0" + "@aws-sdk/core" "3.629.0" + "@aws-sdk/credential-provider-node" "3.632.0" + "@aws-sdk/middleware-host-header" "3.620.0" + "@aws-sdk/middleware-logger" "3.609.0" + "@aws-sdk/middleware-recursion-detection" "3.620.0" + "@aws-sdk/middleware-sdk-ec2" "3.622.0" + "@aws-sdk/middleware-user-agent" "3.632.0" + "@aws-sdk/region-config-resolver" "3.614.0" + "@aws-sdk/types" "3.609.0" + "@aws-sdk/util-endpoints" "3.632.0" + "@aws-sdk/util-user-agent-browser" "3.609.0" + "@aws-sdk/util-user-agent-node" "3.614.0" + "@smithy/config-resolver" "^3.0.5" + "@smithy/core" "^2.3.2" + "@smithy/fetch-http-handler" "^3.2.4" + "@smithy/hash-node" "^3.0.3" + "@smithy/invalid-dependency" "^3.0.3" + "@smithy/middleware-content-length" "^3.0.5" + "@smithy/middleware-endpoint" "^3.1.0" + "@smithy/middleware-retry" "^3.0.14" + "@smithy/middleware-serde" "^3.0.3" + "@smithy/middleware-stack" "^3.0.3" + "@smithy/node-config-provider" "^3.1.4" + "@smithy/node-http-handler" "^3.1.4" + "@smithy/protocol-http" "^4.1.0" + "@smithy/smithy-client" "^3.1.12" + "@smithy/types" "^3.3.0" + "@smithy/url-parser" "^3.0.3" + "@smithy/util-base64" "^3.0.0" + "@smithy/util-body-length-browser" "^3.0.0" + "@smithy/util-body-length-node" "^3.0.0" + "@smithy/util-defaults-mode-browser" "^3.0.14" + "@smithy/util-defaults-mode-node" "^3.0.14" + "@smithy/util-endpoints" "^2.0.5" + "@smithy/util-middleware" "^3.0.3" + "@smithy/util-retry" "^3.0.3" + "@smithy/util-utf8" "^3.0.0" + "@smithy/util-waiter" "^3.1.2" + tslib "^2.6.2" + uuid "^9.0.1" + +"@aws-sdk/client-ecr@3.632.0": + version "3.632.0" + resolved "https://registry.npmjs.org/@aws-sdk/client-ecr/-/client-ecr-3.632.0.tgz#cf6d09e55e50c1a864c4b7fb34b9fc24e5b0b8cc" + integrity sha512-J5EvnmMz3JCoQbhNIwSX7H4Ojrwndoh/xd/3rzehSBMSONARfl6RM5tWCxlDDR9cObnL6I503aoCxbP1LRwILw== + dependencies: + "@aws-crypto/sha256-browser" "5.2.0" + "@aws-crypto/sha256-js" "5.2.0" + "@aws-sdk/client-sso-oidc" "3.632.0" + "@aws-sdk/client-sts" "3.632.0" + "@aws-sdk/core" "3.629.0" + "@aws-sdk/credential-provider-node" "3.632.0" + "@aws-sdk/middleware-host-header" "3.620.0" + "@aws-sdk/middleware-logger" "3.609.0" + "@aws-sdk/middleware-recursion-detection" "3.620.0" + "@aws-sdk/middleware-user-agent" "3.632.0" + "@aws-sdk/region-config-resolver" "3.614.0" + "@aws-sdk/types" "3.609.0" + "@aws-sdk/util-endpoints" "3.632.0" + "@aws-sdk/util-user-agent-browser" "3.609.0" + "@aws-sdk/util-user-agent-node" "3.614.0" + "@smithy/config-resolver" "^3.0.5" + "@smithy/core" "^2.3.2" + "@smithy/fetch-http-handler" "^3.2.4" + "@smithy/hash-node" "^3.0.3" + "@smithy/invalid-dependency" "^3.0.3" + "@smithy/middleware-content-length" "^3.0.5" + "@smithy/middleware-endpoint" "^3.1.0" + "@smithy/middleware-retry" "^3.0.14" + "@smithy/middleware-serde" "^3.0.3" + "@smithy/middleware-stack" "^3.0.3" + "@smithy/node-config-provider" "^3.1.4" + "@smithy/node-http-handler" "^3.1.4" + "@smithy/protocol-http" "^4.1.0" + "@smithy/smithy-client" "^3.1.12" + "@smithy/types" "^3.3.0" + "@smithy/url-parser" "^3.0.3" + "@smithy/util-base64" "^3.0.0" + "@smithy/util-body-length-browser" "^3.0.0" + "@smithy/util-body-length-node" "^3.0.0" + "@smithy/util-defaults-mode-browser" "^3.0.14" + "@smithy/util-defaults-mode-node" "^3.0.14" + "@smithy/util-endpoints" "^2.0.5" + "@smithy/util-middleware" "^3.0.3" + "@smithy/util-retry" "^3.0.3" + "@smithy/util-utf8" "^3.0.0" + "@smithy/util-waiter" "^3.1.2" + tslib "^2.6.2" + +"@aws-sdk/client-ecs@3.632.0": + version "3.632.0" + resolved "https://registry.npmjs.org/@aws-sdk/client-ecs/-/client-ecs-3.632.0.tgz#1f346349cfadb88c473ce63a547bfb80d288adc8" + integrity sha512-g1euXlFQ99CScMb9Tn9baGoNxRoeJclm+cDv7jf//F/eZCUCQq7Iah2dlOR2nZkrjpWAY3dvQ3MwVEB1z662Sg== + dependencies: + "@aws-crypto/sha256-browser" "5.2.0" + "@aws-crypto/sha256-js" "5.2.0" + "@aws-sdk/client-sso-oidc" "3.632.0" + "@aws-sdk/client-sts" "3.632.0" + "@aws-sdk/core" "3.629.0" + "@aws-sdk/credential-provider-node" "3.632.0" + "@aws-sdk/middleware-host-header" "3.620.0" + "@aws-sdk/middleware-logger" "3.609.0" + "@aws-sdk/middleware-recursion-detection" "3.620.0" + "@aws-sdk/middleware-user-agent" "3.632.0" + "@aws-sdk/region-config-resolver" "3.614.0" + "@aws-sdk/types" "3.609.0" + "@aws-sdk/util-endpoints" "3.632.0" + "@aws-sdk/util-user-agent-browser" "3.609.0" + "@aws-sdk/util-user-agent-node" "3.614.0" + "@smithy/config-resolver" "^3.0.5" + "@smithy/core" "^2.3.2" + "@smithy/fetch-http-handler" "^3.2.4" + "@smithy/hash-node" "^3.0.3" + "@smithy/invalid-dependency" "^3.0.3" + "@smithy/middleware-content-length" "^3.0.5" + "@smithy/middleware-endpoint" "^3.1.0" + "@smithy/middleware-retry" "^3.0.14" + "@smithy/middleware-serde" "^3.0.3" + "@smithy/middleware-stack" "^3.0.3" + "@smithy/node-config-provider" "^3.1.4" + "@smithy/node-http-handler" "^3.1.4" + "@smithy/protocol-http" "^4.1.0" + "@smithy/smithy-client" "^3.1.12" + "@smithy/types" "^3.3.0" + "@smithy/url-parser" "^3.0.3" + "@smithy/util-base64" "^3.0.0" + "@smithy/util-body-length-browser" "^3.0.0" + "@smithy/util-body-length-node" "^3.0.0" + "@smithy/util-defaults-mode-browser" "^3.0.14" + "@smithy/util-defaults-mode-node" "^3.0.14" + "@smithy/util-endpoints" "^2.0.5" + "@smithy/util-middleware" "^3.0.3" + "@smithy/util-retry" "^3.0.3" + "@smithy/util-utf8" "^3.0.0" + "@smithy/util-waiter" "^3.1.2" + tslib "^2.6.2" + uuid "^9.0.1" + +"@aws-sdk/client-eks@3.632.0": + version "3.632.0" + resolved "https://registry.npmjs.org/@aws-sdk/client-eks/-/client-eks-3.632.0.tgz#c9dff3f2d59ca1b46ea220937efb93ddc5cc389d" + integrity sha512-ax8XRTThlIYicCOxOZ0zViVpMJrR3XVN9/MtQUtO1thHxFiSdcw74qFXEYsB/rM4FpzWvFIWVx5lMLoBWmb1wQ== + dependencies: + "@aws-crypto/sha256-browser" "5.2.0" + "@aws-crypto/sha256-js" "5.2.0" + "@aws-sdk/client-sso-oidc" "3.632.0" + "@aws-sdk/client-sts" "3.632.0" + "@aws-sdk/core" "3.629.0" + "@aws-sdk/credential-provider-node" "3.632.0" + "@aws-sdk/middleware-host-header" "3.620.0" + "@aws-sdk/middleware-logger" "3.609.0" + "@aws-sdk/middleware-recursion-detection" "3.620.0" + "@aws-sdk/middleware-user-agent" "3.632.0" + "@aws-sdk/region-config-resolver" "3.614.0" + "@aws-sdk/types" "3.609.0" + "@aws-sdk/util-endpoints" "3.632.0" + "@aws-sdk/util-user-agent-browser" "3.609.0" + "@aws-sdk/util-user-agent-node" "3.614.0" + "@smithy/config-resolver" "^3.0.5" + "@smithy/core" "^2.3.2" + "@smithy/fetch-http-handler" "^3.2.4" + "@smithy/hash-node" "^3.0.3" + "@smithy/invalid-dependency" "^3.0.3" + "@smithy/middleware-content-length" "^3.0.5" + "@smithy/middleware-endpoint" "^3.1.0" + "@smithy/middleware-retry" "^3.0.14" + "@smithy/middleware-serde" "^3.0.3" + "@smithy/middleware-stack" "^3.0.3" + "@smithy/node-config-provider" "^3.1.4" + "@smithy/node-http-handler" "^3.1.4" + "@smithy/protocol-http" "^4.1.0" + "@smithy/smithy-client" "^3.1.12" + "@smithy/types" "^3.3.0" + "@smithy/url-parser" "^3.0.3" + "@smithy/util-base64" "^3.0.0" + "@smithy/util-body-length-browser" "^3.0.0" + "@smithy/util-body-length-node" "^3.0.0" + "@smithy/util-defaults-mode-browser" "^3.0.14" + "@smithy/util-defaults-mode-node" "^3.0.14" + "@smithy/util-endpoints" "^2.0.5" + "@smithy/util-middleware" "^3.0.3" + "@smithy/util-retry" "^3.0.3" + "@smithy/util-utf8" "^3.0.0" + "@smithy/util-waiter" "^3.1.2" + tslib "^2.6.2" + uuid "^9.0.1" + +"@aws-sdk/client-iam@3.632.0": + version "3.632.0" + resolved "https://registry.npmjs.org/@aws-sdk/client-iam/-/client-iam-3.632.0.tgz#43ee70a7957d4b77b68279205b64679146f81363" + integrity sha512-iwivASUliVxCEbT/mu5s03SCyqQKNXbJUpG17ywT4taA2xvLisGRI5iNV3OYT1qDmK9DOLMSJYpeX2GWCijPxw== + dependencies: + "@aws-crypto/sha256-browser" "5.2.0" + "@aws-crypto/sha256-js" "5.2.0" + "@aws-sdk/client-sso-oidc" "3.632.0" + "@aws-sdk/client-sts" "3.632.0" + "@aws-sdk/core" "3.629.0" + "@aws-sdk/credential-provider-node" "3.632.0" + "@aws-sdk/middleware-host-header" "3.620.0" + "@aws-sdk/middleware-logger" "3.609.0" + "@aws-sdk/middleware-recursion-detection" "3.620.0" + "@aws-sdk/middleware-user-agent" "3.632.0" + "@aws-sdk/region-config-resolver" "3.614.0" + "@aws-sdk/types" "3.609.0" + "@aws-sdk/util-endpoints" "3.632.0" + "@aws-sdk/util-user-agent-browser" "3.609.0" + "@aws-sdk/util-user-agent-node" "3.614.0" + "@smithy/config-resolver" "^3.0.5" + "@smithy/core" "^2.3.2" + "@smithy/fetch-http-handler" "^3.2.4" + "@smithy/hash-node" "^3.0.3" + "@smithy/invalid-dependency" "^3.0.3" + "@smithy/middleware-content-length" "^3.0.5" + "@smithy/middleware-endpoint" "^3.1.0" + "@smithy/middleware-retry" "^3.0.14" + "@smithy/middleware-serde" "^3.0.3" + "@smithy/middleware-stack" "^3.0.3" + "@smithy/node-config-provider" "^3.1.4" + "@smithy/node-http-handler" "^3.1.4" + "@smithy/protocol-http" "^4.1.0" + "@smithy/smithy-client" "^3.1.12" + "@smithy/types" "^3.3.0" + "@smithy/url-parser" "^3.0.3" + "@smithy/util-base64" "^3.0.0" + "@smithy/util-body-length-browser" "^3.0.0" + "@smithy/util-body-length-node" "^3.0.0" + "@smithy/util-defaults-mode-browser" "^3.0.14" + "@smithy/util-defaults-mode-node" "^3.0.14" + "@smithy/util-endpoints" "^2.0.5" + "@smithy/util-middleware" "^3.0.3" + "@smithy/util-retry" "^3.0.3" + "@smithy/util-utf8" "^3.0.0" + "@smithy/util-waiter" "^3.1.2" + tslib "^2.6.2" + +"@aws-sdk/client-kinesis@3.632.0": + version "3.632.0" + resolved "https://registry.npmjs.org/@aws-sdk/client-kinesis/-/client-kinesis-3.632.0.tgz#c22b2e652409626c993d0fd1997a47d1709d7cb0" + integrity sha512-4CVhckeqvpWKATFwKdwysbnaJY9e9+zmJnnH8fQqqfOqijoH2KNkygPCFoiRKwYl+UHl99KDu1Vt8+/3M490Ug== + dependencies: + "@aws-crypto/sha256-browser" "5.2.0" + "@aws-crypto/sha256-js" "5.2.0" + "@aws-sdk/client-sso-oidc" "3.632.0" + "@aws-sdk/client-sts" "3.632.0" + "@aws-sdk/core" "3.629.0" + "@aws-sdk/credential-provider-node" "3.632.0" + "@aws-sdk/middleware-host-header" "3.620.0" + "@aws-sdk/middleware-logger" "3.609.0" + "@aws-sdk/middleware-recursion-detection" "3.620.0" + "@aws-sdk/middleware-user-agent" "3.632.0" + "@aws-sdk/region-config-resolver" "3.614.0" + "@aws-sdk/types" "3.609.0" + "@aws-sdk/util-endpoints" "3.632.0" + "@aws-sdk/util-user-agent-browser" "3.609.0" + "@aws-sdk/util-user-agent-node" "3.614.0" + "@smithy/config-resolver" "^3.0.5" + "@smithy/core" "^2.3.2" + "@smithy/eventstream-serde-browser" "^3.0.6" + "@smithy/eventstream-serde-config-resolver" "^3.0.3" + "@smithy/eventstream-serde-node" "^3.0.5" + "@smithy/fetch-http-handler" "^3.2.4" + "@smithy/hash-node" "^3.0.3" + "@smithy/invalid-dependency" "^3.0.3" + "@smithy/middleware-content-length" "^3.0.5" + "@smithy/middleware-endpoint" "^3.1.0" + "@smithy/middleware-retry" "^3.0.14" + "@smithy/middleware-serde" "^3.0.3" + "@smithy/middleware-stack" "^3.0.3" + "@smithy/node-config-provider" "^3.1.4" + "@smithy/node-http-handler" "^3.1.4" + "@smithy/protocol-http" "^4.1.0" + "@smithy/smithy-client" "^3.1.12" + "@smithy/types" "^3.3.0" + "@smithy/url-parser" "^3.0.3" + "@smithy/util-base64" "^3.0.0" + "@smithy/util-body-length-browser" "^3.0.0" + "@smithy/util-body-length-node" "^3.0.0" + "@smithy/util-defaults-mode-browser" "^3.0.14" + "@smithy/util-defaults-mode-node" "^3.0.14" + "@smithy/util-endpoints" "^2.0.5" + "@smithy/util-middleware" "^3.0.3" + "@smithy/util-retry" "^3.0.3" + "@smithy/util-utf8" "^3.0.0" + "@smithy/util-waiter" "^3.1.2" + tslib "^2.6.2" + +"@aws-sdk/client-kms@3.632.0": + version "3.632.0" + resolved "https://registry.npmjs.org/@aws-sdk/client-kms/-/client-kms-3.632.0.tgz#c917414a017c83294f6ee27a51a2191dfa6bb1e0" + integrity sha512-uMm1fAIdImaBKwKXnpcD1cpRlTAbLisbRbNJqzJdH+snN0jAkukLNUMUheb0XKaczk7eQrp5w4inlWrRvEmjSA== + dependencies: + "@aws-crypto/sha256-browser" "5.2.0" + "@aws-crypto/sha256-js" "5.2.0" + "@aws-sdk/client-sso-oidc" "3.632.0" + "@aws-sdk/client-sts" "3.632.0" + "@aws-sdk/core" "3.629.0" + "@aws-sdk/credential-provider-node" "3.632.0" + "@aws-sdk/middleware-host-header" "3.620.0" + "@aws-sdk/middleware-logger" "3.609.0" + "@aws-sdk/middleware-recursion-detection" "3.620.0" + "@aws-sdk/middleware-user-agent" "3.632.0" + "@aws-sdk/region-config-resolver" "3.614.0" + "@aws-sdk/types" "3.609.0" + "@aws-sdk/util-endpoints" "3.632.0" + "@aws-sdk/util-user-agent-browser" "3.609.0" + "@aws-sdk/util-user-agent-node" "3.614.0" + "@smithy/config-resolver" "^3.0.5" + "@smithy/core" "^2.3.2" + "@smithy/fetch-http-handler" "^3.2.4" + "@smithy/hash-node" "^3.0.3" + "@smithy/invalid-dependency" "^3.0.3" + "@smithy/middleware-content-length" "^3.0.5" + "@smithy/middleware-endpoint" "^3.1.0" + "@smithy/middleware-retry" "^3.0.14" + "@smithy/middleware-serde" "^3.0.3" + "@smithy/middleware-stack" "^3.0.3" + "@smithy/node-config-provider" "^3.1.4" + "@smithy/node-http-handler" "^3.1.4" + "@smithy/protocol-http" "^4.1.0" + "@smithy/smithy-client" "^3.1.12" + "@smithy/types" "^3.3.0" + "@smithy/url-parser" "^3.0.3" + "@smithy/util-base64" "^3.0.0" + "@smithy/util-body-length-browser" "^3.0.0" + "@smithy/util-body-length-node" "^3.0.0" + "@smithy/util-defaults-mode-browser" "^3.0.14" + "@smithy/util-defaults-mode-node" "^3.0.14" + "@smithy/util-endpoints" "^2.0.5" + "@smithy/util-middleware" "^3.0.3" + "@smithy/util-retry" "^3.0.3" + "@smithy/util-utf8" "^3.0.0" + tslib "^2.6.2" + +"@aws-sdk/client-lambda@3.632.0": + version "3.632.0" + resolved "https://registry.npmjs.org/@aws-sdk/client-lambda/-/client-lambda-3.632.0.tgz#6e31acb2f4484d61ade5928eba329a1e45f27354" + integrity sha512-vF4KRuHGr6EfW+dssm56S6b+jAa8dKqdWduHNms1TQFah0iOkjc9Dpo4p4j6bobZcuricGko/OZy9ynb1Dwldg== + dependencies: + "@aws-crypto/sha256-browser" "5.2.0" + "@aws-crypto/sha256-js" "5.2.0" + "@aws-sdk/client-sso-oidc" "3.632.0" + "@aws-sdk/client-sts" "3.632.0" + "@aws-sdk/core" "3.629.0" + "@aws-sdk/credential-provider-node" "3.632.0" + "@aws-sdk/middleware-host-header" "3.620.0" + "@aws-sdk/middleware-logger" "3.609.0" + "@aws-sdk/middleware-recursion-detection" "3.620.0" + "@aws-sdk/middleware-user-agent" "3.632.0" + "@aws-sdk/region-config-resolver" "3.614.0" + "@aws-sdk/types" "3.609.0" + "@aws-sdk/util-endpoints" "3.632.0" + "@aws-sdk/util-user-agent-browser" "3.609.0" + "@aws-sdk/util-user-agent-node" "3.614.0" + "@smithy/config-resolver" "^3.0.5" + "@smithy/core" "^2.3.2" + "@smithy/eventstream-serde-browser" "^3.0.6" + "@smithy/eventstream-serde-config-resolver" "^3.0.3" + "@smithy/eventstream-serde-node" "^3.0.5" + "@smithy/fetch-http-handler" "^3.2.4" + "@smithy/hash-node" "^3.0.3" + "@smithy/invalid-dependency" "^3.0.3" + "@smithy/middleware-content-length" "^3.0.5" + "@smithy/middleware-endpoint" "^3.1.0" + "@smithy/middleware-retry" "^3.0.14" + "@smithy/middleware-serde" "^3.0.3" + "@smithy/middleware-stack" "^3.0.3" + "@smithy/node-config-provider" "^3.1.4" + "@smithy/node-http-handler" "^3.1.4" + "@smithy/protocol-http" "^4.1.0" + "@smithy/smithy-client" "^3.1.12" + "@smithy/types" "^3.3.0" + "@smithy/url-parser" "^3.0.3" + "@smithy/util-base64" "^3.0.0" + "@smithy/util-body-length-browser" "^3.0.0" + "@smithy/util-body-length-node" "^3.0.0" + "@smithy/util-defaults-mode-browser" "^3.0.14" + "@smithy/util-defaults-mode-node" "^3.0.14" + "@smithy/util-endpoints" "^2.0.5" + "@smithy/util-middleware" "^3.0.3" + "@smithy/util-retry" "^3.0.3" + "@smithy/util-stream" "^3.1.3" + "@smithy/util-utf8" "^3.0.0" + "@smithy/util-waiter" "^3.1.2" + tslib "^2.6.2" + +"@aws-sdk/client-rds@3.632.0": + version "3.632.0" + resolved "https://registry.npmjs.org/@aws-sdk/client-rds/-/client-rds-3.632.0.tgz#ff8a78b81c8a58930c1f80db77ddfee4efdb5242" + integrity sha512-dKltgfhjPjeRQc3DLQQGFKUpW7Cnr/oyh8iDNP20EPQww6f7rif3KPmShiXBp/PAkYmXeaWqu6MSsoC3PTyMqA== + dependencies: + "@aws-crypto/sha256-browser" "5.2.0" + "@aws-crypto/sha256-js" "5.2.0" + "@aws-sdk/client-sso-oidc" "3.632.0" + "@aws-sdk/client-sts" "3.632.0" + "@aws-sdk/core" "3.629.0" + "@aws-sdk/credential-provider-node" "3.632.0" + "@aws-sdk/middleware-host-header" "3.620.0" + "@aws-sdk/middleware-logger" "3.609.0" + "@aws-sdk/middleware-recursion-detection" "3.620.0" + "@aws-sdk/middleware-sdk-rds" "3.620.0" + "@aws-sdk/middleware-user-agent" "3.632.0" + "@aws-sdk/region-config-resolver" "3.614.0" + "@aws-sdk/types" "3.609.0" + "@aws-sdk/util-endpoints" "3.632.0" + "@aws-sdk/util-user-agent-browser" "3.609.0" + "@aws-sdk/util-user-agent-node" "3.614.0" + "@smithy/config-resolver" "^3.0.5" + "@smithy/core" "^2.3.2" + "@smithy/fetch-http-handler" "^3.2.4" + "@smithy/hash-node" "^3.0.3" + "@smithy/invalid-dependency" "^3.0.3" + "@smithy/middleware-content-length" "^3.0.5" + "@smithy/middleware-endpoint" "^3.1.0" + "@smithy/middleware-retry" "^3.0.14" + "@smithy/middleware-serde" "^3.0.3" + "@smithy/middleware-stack" "^3.0.3" + "@smithy/node-config-provider" "^3.1.4" + "@smithy/node-http-handler" "^3.1.4" + "@smithy/protocol-http" "^4.1.0" + "@smithy/smithy-client" "^3.1.12" + "@smithy/types" "^3.3.0" + "@smithy/url-parser" "^3.0.3" + "@smithy/util-base64" "^3.0.0" + "@smithy/util-body-length-browser" "^3.0.0" + "@smithy/util-body-length-node" "^3.0.0" + "@smithy/util-defaults-mode-browser" "^3.0.14" + "@smithy/util-defaults-mode-node" "^3.0.14" + "@smithy/util-endpoints" "^2.0.5" + "@smithy/util-middleware" "^3.0.3" + "@smithy/util-retry" "^3.0.3" + "@smithy/util-utf8" "^3.0.0" + "@smithy/util-waiter" "^3.1.2" + tslib "^2.6.2" + +"@aws-sdk/client-redshift-data@3.632.0": + version "3.632.0" + resolved "https://registry.npmjs.org/@aws-sdk/client-redshift-data/-/client-redshift-data-3.632.0.tgz#0412f25f42eacd8986af3164603c1f8f52a8868b" + integrity sha512-Hphh1/OwlZhIRvrxjFX/6p+tRKlXSc2Uvkv6q/ekkHth9otZg5BUei/vLXzbixQiCKVhay60EYn4ecd/6jPAsA== + dependencies: + "@aws-crypto/sha256-browser" "5.2.0" + "@aws-crypto/sha256-js" "5.2.0" + "@aws-sdk/client-sso-oidc" "3.632.0" + "@aws-sdk/client-sts" "3.632.0" + "@aws-sdk/core" "3.629.0" + "@aws-sdk/credential-provider-node" "3.632.0" + "@aws-sdk/middleware-host-header" "3.620.0" + "@aws-sdk/middleware-logger" "3.609.0" + "@aws-sdk/middleware-recursion-detection" "3.620.0" + "@aws-sdk/middleware-user-agent" "3.632.0" + "@aws-sdk/region-config-resolver" "3.614.0" + "@aws-sdk/types" "3.609.0" + "@aws-sdk/util-endpoints" "3.632.0" + "@aws-sdk/util-user-agent-browser" "3.609.0" + "@aws-sdk/util-user-agent-node" "3.614.0" + "@smithy/config-resolver" "^3.0.5" + "@smithy/core" "^2.3.2" + "@smithy/fetch-http-handler" "^3.2.4" + "@smithy/hash-node" "^3.0.3" + "@smithy/invalid-dependency" "^3.0.3" + "@smithy/middleware-content-length" "^3.0.5" + "@smithy/middleware-endpoint" "^3.1.0" + "@smithy/middleware-retry" "^3.0.14" + "@smithy/middleware-serde" "^3.0.3" + "@smithy/middleware-stack" "^3.0.3" + "@smithy/node-config-provider" "^3.1.4" + "@smithy/node-http-handler" "^3.1.4" + "@smithy/protocol-http" "^4.1.0" + "@smithy/smithy-client" "^3.1.12" + "@smithy/types" "^3.3.0" + "@smithy/url-parser" "^3.0.3" + "@smithy/util-base64" "^3.0.0" + "@smithy/util-body-length-browser" "^3.0.0" + "@smithy/util-body-length-node" "^3.0.0" + "@smithy/util-defaults-mode-browser" "^3.0.14" + "@smithy/util-defaults-mode-node" "^3.0.14" + "@smithy/util-endpoints" "^2.0.5" + "@smithy/util-middleware" "^3.0.3" + "@smithy/util-retry" "^3.0.3" + "@smithy/util-utf8" "^3.0.0" + tslib "^2.6.2" + uuid "^9.0.1" + +"@aws-sdk/client-redshift@3.632.0": + version "3.632.0" + resolved "https://registry.npmjs.org/@aws-sdk/client-redshift/-/client-redshift-3.632.0.tgz#2671660fc7a3108eef97ddd189bb2ecccfef6cf5" + integrity sha512-+3/D4TvIHlFVyFbWey3a2eu1LUAtQFMHMSaKm37b+qWi8lM1ME2nocUC/4n8wKR0XRhHUF5sDFbXZVF0jk2GhA== + dependencies: + "@aws-crypto/sha256-browser" "5.2.0" + "@aws-crypto/sha256-js" "5.2.0" + "@aws-sdk/client-sso-oidc" "3.632.0" + "@aws-sdk/client-sts" "3.632.0" + "@aws-sdk/core" "3.629.0" + "@aws-sdk/credential-provider-node" "3.632.0" + "@aws-sdk/middleware-host-header" "3.620.0" + "@aws-sdk/middleware-logger" "3.609.0" + "@aws-sdk/middleware-recursion-detection" "3.620.0" + "@aws-sdk/middleware-user-agent" "3.632.0" + "@aws-sdk/region-config-resolver" "3.614.0" + "@aws-sdk/types" "3.609.0" + "@aws-sdk/util-endpoints" "3.632.0" + "@aws-sdk/util-user-agent-browser" "3.609.0" + "@aws-sdk/util-user-agent-node" "3.614.0" + "@smithy/config-resolver" "^3.0.5" + "@smithy/core" "^2.3.2" + "@smithy/fetch-http-handler" "^3.2.4" + "@smithy/hash-node" "^3.0.3" + "@smithy/invalid-dependency" "^3.0.3" + "@smithy/middleware-content-length" "^3.0.5" + "@smithy/middleware-endpoint" "^3.1.0" + "@smithy/middleware-retry" "^3.0.14" + "@smithy/middleware-serde" "^3.0.3" + "@smithy/middleware-stack" "^3.0.3" + "@smithy/node-config-provider" "^3.1.4" + "@smithy/node-http-handler" "^3.1.4" + "@smithy/protocol-http" "^4.1.0" + "@smithy/smithy-client" "^3.1.12" + "@smithy/types" "^3.3.0" + "@smithy/url-parser" "^3.0.3" + "@smithy/util-base64" "^3.0.0" + "@smithy/util-body-length-browser" "^3.0.0" + "@smithy/util-body-length-node" "^3.0.0" + "@smithy/util-defaults-mode-browser" "^3.0.14" + "@smithy/util-defaults-mode-node" "^3.0.14" + "@smithy/util-endpoints" "^2.0.5" + "@smithy/util-middleware" "^3.0.3" + "@smithy/util-retry" "^3.0.3" + "@smithy/util-utf8" "^3.0.0" + "@smithy/util-waiter" "^3.1.2" + tslib "^2.6.2" + +"@aws-sdk/client-route-53@3.632.0": + version "3.632.0" + resolved "https://registry.npmjs.org/@aws-sdk/client-route-53/-/client-route-53-3.632.0.tgz#3c6a7eb2bac2701411f8a9b4bf56461d8a03471f" + integrity sha512-BEMRHWxmXBzWlnCuW1rTaqYHUSGPDMpQbZdsC7dCuVcYdIBwKfJrPe1HtvT0+6W/KkDQqxoEgKrl47+Jzl06qw== + dependencies: + "@aws-crypto/sha256-browser" "5.2.0" + "@aws-crypto/sha256-js" "5.2.0" + "@aws-sdk/client-sso-oidc" "3.632.0" + "@aws-sdk/client-sts" "3.632.0" + "@aws-sdk/core" "3.629.0" + "@aws-sdk/credential-provider-node" "3.632.0" + "@aws-sdk/middleware-host-header" "3.620.0" + "@aws-sdk/middleware-logger" "3.609.0" + "@aws-sdk/middleware-recursion-detection" "3.620.0" + "@aws-sdk/middleware-sdk-route53" "3.609.0" + "@aws-sdk/middleware-user-agent" "3.632.0" + "@aws-sdk/region-config-resolver" "3.614.0" + "@aws-sdk/types" "3.609.0" + "@aws-sdk/util-endpoints" "3.632.0" + "@aws-sdk/util-user-agent-browser" "3.609.0" + "@aws-sdk/util-user-agent-node" "3.614.0" + "@aws-sdk/xml-builder" "3.609.0" + "@smithy/config-resolver" "^3.0.5" + "@smithy/core" "^2.3.2" + "@smithy/fetch-http-handler" "^3.2.4" + "@smithy/hash-node" "^3.0.3" + "@smithy/invalid-dependency" "^3.0.3" + "@smithy/middleware-content-length" "^3.0.5" + "@smithy/middleware-endpoint" "^3.1.0" + "@smithy/middleware-retry" "^3.0.14" + "@smithy/middleware-serde" "^3.0.3" + "@smithy/middleware-stack" "^3.0.3" + "@smithy/node-config-provider" "^3.1.4" + "@smithy/node-http-handler" "^3.1.4" + "@smithy/protocol-http" "^4.1.0" + "@smithy/smithy-client" "^3.1.12" + "@smithy/types" "^3.3.0" + "@smithy/url-parser" "^3.0.3" + "@smithy/util-base64" "^3.0.0" + "@smithy/util-body-length-browser" "^3.0.0" + "@smithy/util-body-length-node" "^3.0.0" + "@smithy/util-defaults-mode-browser" "^3.0.14" + "@smithy/util-defaults-mode-node" "^3.0.14" + "@smithy/util-endpoints" "^2.0.5" + "@smithy/util-middleware" "^3.0.3" + "@smithy/util-retry" "^3.0.3" + "@smithy/util-utf8" "^3.0.0" + "@smithy/util-waiter" "^3.1.2" + tslib "^2.6.2" + +"@aws-sdk/client-s3@3.632.0": + version "3.632.0" + resolved "https://registry.npmjs.org/@aws-sdk/client-s3/-/client-s3-3.632.0.tgz#8a22b393f9fd469b1fbd006f60d18d4e039a6846" + integrity sha512-GlhLo/t/E9w3EG3ZhFsSeSM3op2lfhc1LrLMXHFsmH1xIPkjIoxV+aHYIenuF7b/MGgMQDOjf07QeQNXfAr1gg== + dependencies: + "@aws-crypto/sha1-browser" "5.2.0" + "@aws-crypto/sha256-browser" "5.2.0" + "@aws-crypto/sha256-js" "5.2.0" + "@aws-sdk/client-sso-oidc" "3.632.0" + "@aws-sdk/client-sts" "3.632.0" + "@aws-sdk/core" "3.629.0" + "@aws-sdk/credential-provider-node" "3.632.0" + "@aws-sdk/middleware-bucket-endpoint" "3.620.0" + "@aws-sdk/middleware-expect-continue" "3.620.0" + "@aws-sdk/middleware-flexible-checksums" "3.620.0" + "@aws-sdk/middleware-host-header" "3.620.0" + "@aws-sdk/middleware-location-constraint" "3.609.0" + "@aws-sdk/middleware-logger" "3.609.0" + "@aws-sdk/middleware-recursion-detection" "3.620.0" + "@aws-sdk/middleware-sdk-s3" "3.629.0" + "@aws-sdk/middleware-ssec" "3.609.0" + "@aws-sdk/middleware-user-agent" "3.632.0" + "@aws-sdk/region-config-resolver" "3.614.0" + "@aws-sdk/signature-v4-multi-region" "3.629.0" + "@aws-sdk/types" "3.609.0" + "@aws-sdk/util-endpoints" "3.632.0" + "@aws-sdk/util-user-agent-browser" "3.609.0" + "@aws-sdk/util-user-agent-node" "3.614.0" + "@aws-sdk/xml-builder" "3.609.0" + "@smithy/config-resolver" "^3.0.5" + "@smithy/core" "^2.3.2" + "@smithy/eventstream-serde-browser" "^3.0.6" + "@smithy/eventstream-serde-config-resolver" "^3.0.3" + "@smithy/eventstream-serde-node" "^3.0.5" "@smithy/fetch-http-handler" "^3.2.4" + "@smithy/hash-blob-browser" "^3.1.2" "@smithy/hash-node" "^3.0.3" + "@smithy/hash-stream-node" "^3.1.2" "@smithy/invalid-dependency" "^3.0.3" + "@smithy/md5-js" "^3.0.3" "@smithy/middleware-content-length" "^3.0.5" "@smithy/middleware-endpoint" "^3.1.0" - "@smithy/middleware-retry" "^3.0.15" + "@smithy/middleware-retry" "^3.0.14" "@smithy/middleware-serde" "^3.0.3" "@smithy/middleware-stack" "^3.0.3" "@smithy/node-config-provider" "^3.1.4" "@smithy/node-http-handler" "^3.1.4" "@smithy/protocol-http" "^4.1.0" - "@smithy/smithy-client" "^3.2.0" + "@smithy/smithy-client" "^3.1.12" "@smithy/types" "^3.3.0" "@smithy/url-parser" "^3.0.3" "@smithy/util-base64" "^3.0.0" "@smithy/util-body-length-browser" "^3.0.0" "@smithy/util-body-length-node" "^3.0.0" - "@smithy/util-defaults-mode-browser" "^3.0.15" - "@smithy/util-defaults-mode-node" "^3.0.15" + "@smithy/util-defaults-mode-browser" "^3.0.14" + "@smithy/util-defaults-mode-node" "^3.0.14" "@smithy/util-endpoints" "^2.0.5" "@smithy/util-middleware" "^3.0.3" "@smithy/util-retry" "^3.0.3" + "@smithy/util-stream" "^3.1.3" "@smithy/util-utf8" "^3.0.0" "@smithy/util-waiter" "^3.1.2" tslib "^2.6.2" -"@aws-sdk/client-ecs@3.451.0": - version "3.451.0" - resolved "https://registry.npmjs.org/@aws-sdk/client-ecs/-/client-ecs-3.451.0.tgz#3e9a4b242615a5bc88d51dd710772ae724a59677" - integrity sha512-vS4xJMDPERiteTryEh4MxtYzFgrDEaxeFpjYaywA9iApmNN+YWRymik+MlAq2ny2cOqlVhN8DKON03eXuBEh/A== - dependencies: - "@aws-crypto/sha256-browser" "3.0.0" - "@aws-crypto/sha256-js" "3.0.0" - "@aws-sdk/client-sts" "3.451.0" - "@aws-sdk/core" "3.451.0" - "@aws-sdk/credential-provider-node" "3.451.0" - "@aws-sdk/middleware-host-header" "3.451.0" - "@aws-sdk/middleware-logger" "3.451.0" - "@aws-sdk/middleware-recursion-detection" "3.451.0" - "@aws-sdk/middleware-signing" "3.451.0" - "@aws-sdk/middleware-user-agent" "3.451.0" - "@aws-sdk/region-config-resolver" "3.451.0" - "@aws-sdk/types" "3.451.0" - "@aws-sdk/util-endpoints" "3.451.0" - "@aws-sdk/util-user-agent-browser" "3.451.0" - "@aws-sdk/util-user-agent-node" "3.451.0" - "@smithy/config-resolver" "^2.0.18" - "@smithy/fetch-http-handler" "^2.2.6" - "@smithy/hash-node" "^2.0.15" - "@smithy/invalid-dependency" "^2.0.13" - "@smithy/middleware-content-length" "^2.0.15" - "@smithy/middleware-endpoint" "^2.2.0" - "@smithy/middleware-retry" "^2.0.20" - "@smithy/middleware-serde" "^2.0.13" - "@smithy/middleware-stack" "^2.0.7" - "@smithy/node-config-provider" "^2.1.5" - "@smithy/node-http-handler" "^2.1.9" - "@smithy/protocol-http" "^3.0.9" - "@smithy/smithy-client" "^2.1.15" - "@smithy/types" "^2.5.0" - "@smithy/url-parser" "^2.0.13" - "@smithy/util-base64" "^2.0.1" - "@smithy/util-body-length-browser" "^2.0.0" - "@smithy/util-body-length-node" "^2.1.0" - "@smithy/util-defaults-mode-browser" "^2.0.19" - "@smithy/util-defaults-mode-node" "^2.0.25" - "@smithy/util-endpoints" "^1.0.4" - "@smithy/util-retry" "^2.0.6" - "@smithy/util-utf8" "^2.0.2" - "@smithy/util-waiter" "^2.0.13" - tslib "^2.5.0" - uuid "^8.3.2" - -"@aws-sdk/client-ecs@3.637.0": - version "3.637.0" - resolved "https://registry.npmjs.org/@aws-sdk/client-ecs/-/client-ecs-3.637.0.tgz#a0c43af287ce02d7f5aeddcb078f0be9f7d00964" - integrity sha512-/PcQKx4kBoWBpSu+10HXfU4LtUjTq92mCcJXYhjtlI8sQwkA1zvPThW0bjLJ34mIXhxvHSnUXG1NrjNZQ9ps4g== +"@aws-sdk/client-secrets-manager@3.632.0": + version "3.632.0" + resolved "https://registry.npmjs.org/@aws-sdk/client-secrets-manager/-/client-secrets-manager-3.632.0.tgz#821b28489da90229a8718ba1d7bc3d9a7ba694e1" + integrity sha512-WsQhPHHK1yPfALcP1B7nBSGDzky6vFTUEXnUdfzb5Xy2cT+JTBTS6ChtQGqqOuGHDP/3t/9soqZ+L6rUCYBb/Q== dependencies: "@aws-crypto/sha256-browser" "5.2.0" "@aws-crypto/sha256-js" "5.2.0" - "@aws-sdk/client-sso-oidc" "3.637.0" - "@aws-sdk/client-sts" "3.637.0" - "@aws-sdk/core" "3.635.0" - "@aws-sdk/credential-provider-node" "3.637.0" + "@aws-sdk/client-sso-oidc" "3.632.0" + "@aws-sdk/client-sts" "3.632.0" + "@aws-sdk/core" "3.629.0" + "@aws-sdk/credential-provider-node" "3.632.0" "@aws-sdk/middleware-host-header" "3.620.0" "@aws-sdk/middleware-logger" "3.609.0" "@aws-sdk/middleware-recursion-detection" "3.620.0" - "@aws-sdk/middleware-user-agent" "3.637.0" + "@aws-sdk/middleware-user-agent" "3.632.0" "@aws-sdk/region-config-resolver" "3.614.0" "@aws-sdk/types" "3.609.0" - "@aws-sdk/util-endpoints" "3.637.0" + "@aws-sdk/util-endpoints" "3.632.0" "@aws-sdk/util-user-agent-browser" "3.609.0" "@aws-sdk/util-user-agent-node" "3.614.0" "@smithy/config-resolver" "^3.0.5" - "@smithy/core" "^2.4.0" + "@smithy/core" "^2.3.2" "@smithy/fetch-http-handler" "^3.2.4" "@smithy/hash-node" "^3.0.3" "@smithy/invalid-dependency" "^3.0.3" "@smithy/middleware-content-length" "^3.0.5" "@smithy/middleware-endpoint" "^3.1.0" - "@smithy/middleware-retry" "^3.0.15" + "@smithy/middleware-retry" "^3.0.14" "@smithy/middleware-serde" "^3.0.3" "@smithy/middleware-stack" "^3.0.3" "@smithy/node-config-provider" "^3.1.4" "@smithy/node-http-handler" "^3.1.4" "@smithy/protocol-http" "^4.1.0" - "@smithy/smithy-client" "^3.2.0" + "@smithy/smithy-client" "^3.1.12" "@smithy/types" "^3.3.0" "@smithy/url-parser" "^3.0.3" "@smithy/util-base64" "^3.0.0" "@smithy/util-body-length-browser" "^3.0.0" "@smithy/util-body-length-node" "^3.0.0" - "@smithy/util-defaults-mode-browser" "^3.0.15" - "@smithy/util-defaults-mode-node" "^3.0.15" + "@smithy/util-defaults-mode-browser" "^3.0.14" + "@smithy/util-defaults-mode-node" "^3.0.14" "@smithy/util-endpoints" "^2.0.5" "@smithy/util-middleware" "^3.0.3" "@smithy/util-retry" "^3.0.3" "@smithy/util-utf8" "^3.0.0" - "@smithy/util-waiter" "^3.1.2" tslib "^2.6.2" uuid "^9.0.1" -"@aws-sdk/client-eks@3.421.0": - version "3.421.0" - resolved "https://registry.npmjs.org/@aws-sdk/client-eks/-/client-eks-3.421.0.tgz#b47f701498c7d3babff6f358a677128cd3ae864d" - integrity sha512-56vy/qBquCnjHWVvOOyzr8NwNx7xTEvRZ7au1NZaZv0EYrd7Dyon9vHT5i9blZ+sMl1ZHTwU/y1W5RTVqv/1+g== - dependencies: - "@aws-crypto/sha256-browser" "3.0.0" - "@aws-crypto/sha256-js" "3.0.0" - "@aws-sdk/client-sts" "3.421.0" - "@aws-sdk/credential-provider-node" "3.421.0" - "@aws-sdk/middleware-host-header" "3.418.0" - "@aws-sdk/middleware-logger" "3.418.0" - "@aws-sdk/middleware-recursion-detection" "3.418.0" - "@aws-sdk/middleware-signing" "3.418.0" - "@aws-sdk/middleware-user-agent" "3.418.0" - "@aws-sdk/region-config-resolver" "3.418.0" - "@aws-sdk/types" "3.418.0" - "@aws-sdk/util-endpoints" "3.418.0" - "@aws-sdk/util-user-agent-browser" "3.418.0" - "@aws-sdk/util-user-agent-node" "3.418.0" - "@smithy/config-resolver" "^2.0.10" - "@smithy/fetch-http-handler" "^2.1.5" - "@smithy/hash-node" "^2.0.9" - "@smithy/invalid-dependency" "^2.0.9" - "@smithy/middleware-content-length" "^2.0.11" - "@smithy/middleware-endpoint" "^2.0.9" - "@smithy/middleware-retry" "^2.0.12" - "@smithy/middleware-serde" "^2.0.9" - "@smithy/middleware-stack" "^2.0.2" - "@smithy/node-config-provider" "^2.0.12" - "@smithy/node-http-handler" "^2.1.5" - "@smithy/protocol-http" "^3.0.5" - "@smithy/smithy-client" "^2.1.6" - "@smithy/types" "^2.3.3" - "@smithy/url-parser" "^2.0.9" - "@smithy/util-base64" "^2.0.0" - "@smithy/util-body-length-browser" "^2.0.0" - "@smithy/util-body-length-node" "^2.1.0" - "@smithy/util-defaults-mode-browser" "^2.0.10" - "@smithy/util-defaults-mode-node" "^2.0.12" - "@smithy/util-retry" "^2.0.2" - "@smithy/util-utf8" "^2.0.0" - "@smithy/util-waiter" "^2.0.9" - tslib "^2.5.0" - uuid "^8.3.2" - -"@aws-sdk/client-eks@3.476.0": - version "3.476.0" - resolved "https://registry.npmjs.org/@aws-sdk/client-eks/-/client-eks-3.476.0.tgz#0822b79c5553345a479b6ed1364a8477c533b94a" - integrity sha512-8368gwGDylhm7H5JwIpMeConl8bK4C1HiEiiCbEew/LDOdIrYr4CdaEex1xMrUcZXMi/0h+0JL++3CwUbKXx/g== - dependencies: - "@aws-crypto/sha256-browser" "3.0.0" - "@aws-crypto/sha256-js" "3.0.0" - "@aws-sdk/client-sts" "3.476.0" - "@aws-sdk/core" "3.476.0" - "@aws-sdk/credential-provider-node" "3.476.0" - "@aws-sdk/middleware-host-header" "3.468.0" - "@aws-sdk/middleware-logger" "3.468.0" - "@aws-sdk/middleware-recursion-detection" "3.468.0" - "@aws-sdk/middleware-signing" "3.468.0" - "@aws-sdk/middleware-user-agent" "3.470.0" - "@aws-sdk/region-config-resolver" "3.470.0" - "@aws-sdk/types" "3.468.0" - "@aws-sdk/util-endpoints" "3.470.0" - "@aws-sdk/util-user-agent-browser" "3.468.0" - "@aws-sdk/util-user-agent-node" "3.470.0" - "@smithy/config-resolver" "^2.0.21" - "@smithy/fetch-http-handler" "^2.3.1" - "@smithy/hash-node" "^2.0.17" - "@smithy/invalid-dependency" "^2.0.15" - "@smithy/middleware-content-length" "^2.0.17" - "@smithy/middleware-endpoint" "^2.2.3" - "@smithy/middleware-retry" "^2.0.24" - "@smithy/middleware-serde" "^2.0.15" - "@smithy/middleware-stack" "^2.0.9" - "@smithy/node-config-provider" "^2.1.8" - "@smithy/node-http-handler" "^2.2.1" - "@smithy/protocol-http" "^3.0.11" - "@smithy/smithy-client" "^2.1.18" - "@smithy/types" "^2.7.0" - "@smithy/url-parser" "^2.0.15" - "@smithy/util-base64" "^2.0.1" - "@smithy/util-body-length-browser" "^2.0.1" - "@smithy/util-body-length-node" "^2.1.0" - "@smithy/util-defaults-mode-browser" "^2.0.22" - "@smithy/util-defaults-mode-node" "^2.0.29" - "@smithy/util-endpoints" "^1.0.7" - "@smithy/util-retry" "^2.0.8" - "@smithy/util-utf8" "^2.0.2" - "@smithy/util-waiter" "^2.0.15" - tslib "^2.5.0" - uuid "^8.3.2" - -"@aws-sdk/client-iam@3.421.0": - version "3.421.0" - resolved "https://registry.npmjs.org/@aws-sdk/client-iam/-/client-iam-3.421.0.tgz#37b6357100a362ef48eb05816aca941af2eb7343" - integrity sha512-ZpIN6Q6VWPOmuZ4YQLMAJKIYbH2j6eEPT23X/M14hNrMwc8hFnT4OfkRgH0h0Ud+t4VPyL++Jsq5Ft0NRL1QWg== - dependencies: - "@aws-crypto/sha256-browser" "3.0.0" - "@aws-crypto/sha256-js" "3.0.0" - "@aws-sdk/client-sts" "3.421.0" - "@aws-sdk/credential-provider-node" "3.421.0" - "@aws-sdk/middleware-host-header" "3.418.0" - "@aws-sdk/middleware-logger" "3.418.0" - "@aws-sdk/middleware-recursion-detection" "3.418.0" - "@aws-sdk/middleware-signing" "3.418.0" - "@aws-sdk/middleware-user-agent" "3.418.0" - "@aws-sdk/region-config-resolver" "3.418.0" - "@aws-sdk/types" "3.418.0" - "@aws-sdk/util-endpoints" "3.418.0" - "@aws-sdk/util-user-agent-browser" "3.418.0" - "@aws-sdk/util-user-agent-node" "3.418.0" - "@smithy/config-resolver" "^2.0.10" - "@smithy/fetch-http-handler" "^2.1.5" - "@smithy/hash-node" "^2.0.9" - "@smithy/invalid-dependency" "^2.0.9" - "@smithy/middleware-content-length" "^2.0.11" - "@smithy/middleware-endpoint" "^2.0.9" - "@smithy/middleware-retry" "^2.0.12" - "@smithy/middleware-serde" "^2.0.9" - "@smithy/middleware-stack" "^2.0.2" - "@smithy/node-config-provider" "^2.0.12" - "@smithy/node-http-handler" "^2.1.5" - "@smithy/protocol-http" "^3.0.5" - "@smithy/smithy-client" "^2.1.6" - "@smithy/types" "^2.3.3" - "@smithy/url-parser" "^2.0.9" - "@smithy/util-base64" "^2.0.0" - "@smithy/util-body-length-browser" "^2.0.0" - "@smithy/util-body-length-node" "^2.1.0" - "@smithy/util-defaults-mode-browser" "^2.0.10" - "@smithy/util-defaults-mode-node" "^2.0.12" - "@smithy/util-retry" "^2.0.2" - "@smithy/util-utf8" "^2.0.0" - "@smithy/util-waiter" "^2.0.9" - fast-xml-parser "4.2.5" - tslib "^2.5.0" - -"@aws-sdk/client-iam@3.637.0": - version "3.637.0" - resolved "https://registry.npmjs.org/@aws-sdk/client-iam/-/client-iam-3.637.0.tgz#a436709b9303bd7810315d0182935dc7504069d6" - integrity sha512-mo1gCm3yayuiFPCQkY5i5wbL6jjgCprpAfeMP5zFOcDsr7BqX9ijTrRzK+dx0SwiTdRKOW6zJaDiWA1UZgb60A== +"@aws-sdk/client-sfn@3.632.0": + version "3.632.0" + resolved "https://registry.npmjs.org/@aws-sdk/client-sfn/-/client-sfn-3.632.0.tgz#6b4fd93ad9adb4619d322dbf73478ff90ff2f971" + integrity sha512-LPaMqALuArGX1Y5N3tHX4lNlZabsqgfGJZjwyLTHawqiGNDMlMqOUg4Dl0e2Ies8yvMjs//YXtMWz26x24cGkQ== dependencies: "@aws-crypto/sha256-browser" "5.2.0" "@aws-crypto/sha256-js" "5.2.0" - "@aws-sdk/client-sso-oidc" "3.637.0" - "@aws-sdk/client-sts" "3.637.0" - "@aws-sdk/core" "3.635.0" - "@aws-sdk/credential-provider-node" "3.637.0" + "@aws-sdk/client-sso-oidc" "3.632.0" + "@aws-sdk/client-sts" "3.632.0" + "@aws-sdk/core" "3.629.0" + "@aws-sdk/credential-provider-node" "3.632.0" "@aws-sdk/middleware-host-header" "3.620.0" "@aws-sdk/middleware-logger" "3.609.0" "@aws-sdk/middleware-recursion-detection" "3.620.0" - "@aws-sdk/middleware-user-agent" "3.637.0" + "@aws-sdk/middleware-user-agent" "3.632.0" "@aws-sdk/region-config-resolver" "3.614.0" "@aws-sdk/types" "3.609.0" - "@aws-sdk/util-endpoints" "3.637.0" + "@aws-sdk/util-endpoints" "3.632.0" "@aws-sdk/util-user-agent-browser" "3.609.0" "@aws-sdk/util-user-agent-node" "3.614.0" "@smithy/config-resolver" "^3.0.5" - "@smithy/core" "^2.4.0" + "@smithy/core" "^2.3.2" "@smithy/fetch-http-handler" "^3.2.4" "@smithy/hash-node" "^3.0.3" "@smithy/invalid-dependency" "^3.0.3" "@smithy/middleware-content-length" "^3.0.5" "@smithy/middleware-endpoint" "^3.1.0" - "@smithy/middleware-retry" "^3.0.15" + "@smithy/middleware-retry" "^3.0.14" "@smithy/middleware-serde" "^3.0.3" "@smithy/middleware-stack" "^3.0.3" "@smithy/node-config-provider" "^3.1.4" "@smithy/node-http-handler" "^3.1.4" "@smithy/protocol-http" "^4.1.0" - "@smithy/smithy-client" "^3.2.0" + "@smithy/smithy-client" "^3.1.12" "@smithy/types" "^3.3.0" "@smithy/url-parser" "^3.0.3" "@smithy/util-base64" "^3.0.0" "@smithy/util-body-length-browser" "^3.0.0" "@smithy/util-body-length-node" "^3.0.0" - "@smithy/util-defaults-mode-browser" "^3.0.15" - "@smithy/util-defaults-mode-node" "^3.0.15" + "@smithy/util-defaults-mode-browser" "^3.0.14" + "@smithy/util-defaults-mode-node" "^3.0.14" "@smithy/util-endpoints" "^2.0.5" "@smithy/util-middleware" "^3.0.3" "@smithy/util-retry" "^3.0.3" "@smithy/util-utf8" "^3.0.0" - "@smithy/util-waiter" "^3.1.2" tslib "^2.6.2" + uuid "^9.0.1" -"@aws-sdk/client-kinesis@3.451.0": - version "3.451.0" - resolved "https://registry.npmjs.org/@aws-sdk/client-kinesis/-/client-kinesis-3.451.0.tgz#4ee6fbe2629dd331d52316b1d1137f0b2c403f62" - integrity sha512-Wz2mQCmCWbcgtOwY7Rchyi2sVUEnqMPrQNnpovXZ9gceoVPyl+IHzHCFoqD+6tFrnDMOUOYG31gW4xz82OrUoQ== - dependencies: - "@aws-crypto/sha256-browser" "3.0.0" - "@aws-crypto/sha256-js" "3.0.0" - "@aws-sdk/client-sts" "3.451.0" - "@aws-sdk/core" "3.451.0" - "@aws-sdk/credential-provider-node" "3.451.0" - "@aws-sdk/middleware-host-header" "3.451.0" - "@aws-sdk/middleware-logger" "3.451.0" - "@aws-sdk/middleware-recursion-detection" "3.451.0" - "@aws-sdk/middleware-signing" "3.451.0" - "@aws-sdk/middleware-user-agent" "3.451.0" - "@aws-sdk/region-config-resolver" "3.451.0" - "@aws-sdk/types" "3.451.0" - "@aws-sdk/util-endpoints" "3.451.0" - "@aws-sdk/util-user-agent-browser" "3.451.0" - "@aws-sdk/util-user-agent-node" "3.451.0" - "@smithy/config-resolver" "^2.0.18" - "@smithy/eventstream-serde-browser" "^2.0.13" - "@smithy/eventstream-serde-config-resolver" "^2.0.13" - "@smithy/eventstream-serde-node" "^2.0.13" - "@smithy/fetch-http-handler" "^2.2.6" - "@smithy/hash-node" "^2.0.15" - "@smithy/invalid-dependency" "^2.0.13" - "@smithy/middleware-content-length" "^2.0.15" - "@smithy/middleware-endpoint" "^2.2.0" - "@smithy/middleware-retry" "^2.0.20" - "@smithy/middleware-serde" "^2.0.13" - "@smithy/middleware-stack" "^2.0.7" - "@smithy/node-config-provider" "^2.1.5" - "@smithy/node-http-handler" "^2.1.9" - "@smithy/protocol-http" "^3.0.9" - "@smithy/smithy-client" "^2.1.15" - "@smithy/types" "^2.5.0" - "@smithy/url-parser" "^2.0.13" - "@smithy/util-base64" "^2.0.1" - "@smithy/util-body-length-browser" "^2.0.0" - "@smithy/util-body-length-node" "^2.1.0" - "@smithy/util-defaults-mode-browser" "^2.0.19" - "@smithy/util-defaults-mode-node" "^2.0.25" - "@smithy/util-endpoints" "^1.0.4" - "@smithy/util-retry" "^2.0.6" - "@smithy/util-utf8" "^2.0.2" - "@smithy/util-waiter" "^2.0.13" - tslib "^2.5.0" - -"@aws-sdk/client-kms@3.451.0": - version "3.451.0" - resolved "https://registry.npmjs.org/@aws-sdk/client-kms/-/client-kms-3.451.0.tgz#cb00e9150f294a76372921a226101d5788fdffe1" - integrity sha512-RBpPx9dAn6zCnlaOKtlGmryhXKH4vj4mBYxnrNmogfoktlMCz+zGEtCdCud7HbILNdw2PugBUhBFqX5noH2T2Q== - dependencies: - "@aws-crypto/sha256-browser" "3.0.0" - "@aws-crypto/sha256-js" "3.0.0" - "@aws-sdk/client-sts" "3.451.0" - "@aws-sdk/core" "3.451.0" - "@aws-sdk/credential-provider-node" "3.451.0" - "@aws-sdk/middleware-host-header" "3.451.0" - "@aws-sdk/middleware-logger" "3.451.0" - "@aws-sdk/middleware-recursion-detection" "3.451.0" - "@aws-sdk/middleware-signing" "3.451.0" - "@aws-sdk/middleware-user-agent" "3.451.0" - "@aws-sdk/region-config-resolver" "3.451.0" - "@aws-sdk/types" "3.451.0" - "@aws-sdk/util-endpoints" "3.451.0" - "@aws-sdk/util-user-agent-browser" "3.451.0" - "@aws-sdk/util-user-agent-node" "3.451.0" - "@smithy/config-resolver" "^2.0.18" - "@smithy/fetch-http-handler" "^2.2.6" - "@smithy/hash-node" "^2.0.15" - "@smithy/invalid-dependency" "^2.0.13" - "@smithy/middleware-content-length" "^2.0.15" - "@smithy/middleware-endpoint" "^2.2.0" - "@smithy/middleware-retry" "^2.0.20" - "@smithy/middleware-serde" "^2.0.13" - "@smithy/middleware-stack" "^2.0.7" - "@smithy/node-config-provider" "^2.1.5" - "@smithy/node-http-handler" "^2.1.9" - "@smithy/protocol-http" "^3.0.9" - "@smithy/smithy-client" "^2.1.15" - "@smithy/types" "^2.5.0" - "@smithy/url-parser" "^2.0.13" - "@smithy/util-base64" "^2.0.1" - "@smithy/util-body-length-browser" "^2.0.0" - "@smithy/util-body-length-node" "^2.1.0" - "@smithy/util-defaults-mode-browser" "^2.0.19" - "@smithy/util-defaults-mode-node" "^2.0.25" - "@smithy/util-endpoints" "^1.0.4" - "@smithy/util-retry" "^2.0.6" - "@smithy/util-utf8" "^2.0.2" - tslib "^2.5.0" - -"@aws-sdk/client-lambda@3.421.0": - version "3.421.0" - resolved "https://registry.npmjs.org/@aws-sdk/client-lambda/-/client-lambda-3.421.0.tgz#cf6736abdd4ceffae213490f1310c04b10360fe0" - integrity sha512-cMk7JeQlyoeIxabVsZXr3rwIfgxSL4kJpoDgFu8q+hnifOdgD8gP6AhMfYu+NMroXjUntXu+ZJbo5eBTn80OtQ== - dependencies: - "@aws-crypto/sha256-browser" "3.0.0" - "@aws-crypto/sha256-js" "3.0.0" - "@aws-sdk/client-sts" "3.421.0" - "@aws-sdk/credential-provider-node" "3.421.0" - "@aws-sdk/middleware-host-header" "3.418.0" - "@aws-sdk/middleware-logger" "3.418.0" - "@aws-sdk/middleware-recursion-detection" "3.418.0" - "@aws-sdk/middleware-signing" "3.418.0" - "@aws-sdk/middleware-user-agent" "3.418.0" - "@aws-sdk/region-config-resolver" "3.418.0" - "@aws-sdk/types" "3.418.0" - "@aws-sdk/util-endpoints" "3.418.0" - "@aws-sdk/util-user-agent-browser" "3.418.0" - "@aws-sdk/util-user-agent-node" "3.418.0" - "@smithy/config-resolver" "^2.0.10" - "@smithy/eventstream-serde-browser" "^2.0.9" - "@smithy/eventstream-serde-config-resolver" "^2.0.9" - "@smithy/eventstream-serde-node" "^2.0.9" - "@smithy/fetch-http-handler" "^2.1.5" - "@smithy/hash-node" "^2.0.9" - "@smithy/invalid-dependency" "^2.0.9" - "@smithy/middleware-content-length" "^2.0.11" - "@smithy/middleware-endpoint" "^2.0.9" - "@smithy/middleware-retry" "^2.0.12" - "@smithy/middleware-serde" "^2.0.9" - "@smithy/middleware-stack" "^2.0.2" - "@smithy/node-config-provider" "^2.0.12" - "@smithy/node-http-handler" "^2.1.5" - "@smithy/protocol-http" "^3.0.5" - "@smithy/smithy-client" "^2.1.6" - "@smithy/types" "^2.3.3" - "@smithy/url-parser" "^2.0.9" - "@smithy/util-base64" "^2.0.0" - "@smithy/util-body-length-browser" "^2.0.0" - "@smithy/util-body-length-node" "^2.1.0" - "@smithy/util-defaults-mode-browser" "^2.0.10" - "@smithy/util-defaults-mode-node" "^2.0.12" - "@smithy/util-retry" "^2.0.2" - "@smithy/util-stream" "^2.0.12" - "@smithy/util-utf8" "^2.0.0" - "@smithy/util-waiter" "^2.0.9" - tslib "^2.5.0" - -"@aws-sdk/client-lambda@3.637.0": - version "3.637.0" - resolved "https://registry.npmjs.org/@aws-sdk/client-lambda/-/client-lambda-3.637.0.tgz#b038535f47bde2783f7785c16814091ee1ffe7ff" - integrity sha512-XVQn4p/9XNMEImxCY97WlA83Q63HRrDhks4kby5YGG2fZckaNJxXE+/FFYsznse8hXKLUJ1/aI3hZSnXTthq5g== +"@aws-sdk/client-sns@3.632.0": + version "3.632.0" + resolved "https://registry.npmjs.org/@aws-sdk/client-sns/-/client-sns-3.632.0.tgz#0a6359aa7fba6b80fb9e7d0d0db7f78e3a8b4a37" + integrity sha512-I8S0tFx26LL59/PiL4Reqna+LW7oIbRB+jygl4vrf4XIvpX5o4tmZmOmR0caYA+Cks3AomCi4cp+7WuwUpuATQ== dependencies: "@aws-crypto/sha256-browser" "5.2.0" "@aws-crypto/sha256-js" "5.2.0" - "@aws-sdk/client-sso-oidc" "3.637.0" - "@aws-sdk/client-sts" "3.637.0" - "@aws-sdk/core" "3.635.0" - "@aws-sdk/credential-provider-node" "3.637.0" + "@aws-sdk/client-sso-oidc" "3.632.0" + "@aws-sdk/client-sts" "3.632.0" + "@aws-sdk/core" "3.629.0" + "@aws-sdk/credential-provider-node" "3.632.0" "@aws-sdk/middleware-host-header" "3.620.0" "@aws-sdk/middleware-logger" "3.609.0" "@aws-sdk/middleware-recursion-detection" "3.620.0" - "@aws-sdk/middleware-user-agent" "3.637.0" + "@aws-sdk/middleware-user-agent" "3.632.0" "@aws-sdk/region-config-resolver" "3.614.0" "@aws-sdk/types" "3.609.0" - "@aws-sdk/util-endpoints" "3.637.0" + "@aws-sdk/util-endpoints" "3.632.0" "@aws-sdk/util-user-agent-browser" "3.609.0" "@aws-sdk/util-user-agent-node" "3.614.0" "@smithy/config-resolver" "^3.0.5" - "@smithy/core" "^2.4.0" - "@smithy/eventstream-serde-browser" "^3.0.6" - "@smithy/eventstream-serde-config-resolver" "^3.0.3" - "@smithy/eventstream-serde-node" "^3.0.5" + "@smithy/core" "^2.3.2" "@smithy/fetch-http-handler" "^3.2.4" "@smithy/hash-node" "^3.0.3" "@smithy/invalid-dependency" "^3.0.3" "@smithy/middleware-content-length" "^3.0.5" "@smithy/middleware-endpoint" "^3.1.0" - "@smithy/middleware-retry" "^3.0.15" + "@smithy/middleware-retry" "^3.0.14" "@smithy/middleware-serde" "^3.0.3" "@smithy/middleware-stack" "^3.0.3" "@smithy/node-config-provider" "^3.1.4" "@smithy/node-http-handler" "^3.1.4" "@smithy/protocol-http" "^4.1.0" - "@smithy/smithy-client" "^3.2.0" + "@smithy/smithy-client" "^3.1.12" "@smithy/types" "^3.3.0" "@smithy/url-parser" "^3.0.3" "@smithy/util-base64" "^3.0.0" "@smithy/util-body-length-browser" "^3.0.0" "@smithy/util-body-length-node" "^3.0.0" - "@smithy/util-defaults-mode-browser" "^3.0.15" - "@smithy/util-defaults-mode-node" "^3.0.15" + "@smithy/util-defaults-mode-browser" "^3.0.14" + "@smithy/util-defaults-mode-node" "^3.0.14" "@smithy/util-endpoints" "^2.0.5" "@smithy/util-middleware" "^3.0.3" "@smithy/util-retry" "^3.0.3" - "@smithy/util-stream" "^3.1.3" "@smithy/util-utf8" "^3.0.0" - "@smithy/util-waiter" "^3.1.2" tslib "^2.6.2" -"@aws-sdk/client-rds@3.421.0": - version "3.421.0" - resolved "https://registry.npmjs.org/@aws-sdk/client-rds/-/client-rds-3.421.0.tgz#67e91a32e0a2694c66e6a93826ddb9e2ddc634b1" - integrity sha512-Z9ic3a/UPQKa2oDaUh3wBTHZOxD/9CV+zAsFSOq/R6tMnV+ueA5KMJDl49q7BpiTu8p0H2sGoBDrQr6C3YU0hQ== - dependencies: - "@aws-crypto/sha256-browser" "3.0.0" - "@aws-crypto/sha256-js" "3.0.0" - "@aws-sdk/client-sts" "3.421.0" - "@aws-sdk/credential-provider-node" "3.421.0" - "@aws-sdk/middleware-host-header" "3.418.0" - "@aws-sdk/middleware-logger" "3.418.0" - "@aws-sdk/middleware-recursion-detection" "3.418.0" - "@aws-sdk/middleware-sdk-rds" "3.418.0" - "@aws-sdk/middleware-signing" "3.418.0" - "@aws-sdk/middleware-user-agent" "3.418.0" - "@aws-sdk/region-config-resolver" "3.418.0" - "@aws-sdk/types" "3.418.0" - "@aws-sdk/util-endpoints" "3.418.0" - "@aws-sdk/util-user-agent-browser" "3.418.0" - "@aws-sdk/util-user-agent-node" "3.418.0" - "@smithy/config-resolver" "^2.0.10" - "@smithy/fetch-http-handler" "^2.1.5" - "@smithy/hash-node" "^2.0.9" - "@smithy/invalid-dependency" "^2.0.9" - "@smithy/middleware-content-length" "^2.0.11" - "@smithy/middleware-endpoint" "^2.0.9" - "@smithy/middleware-retry" "^2.0.12" - "@smithy/middleware-serde" "^2.0.9" - "@smithy/middleware-stack" "^2.0.2" - "@smithy/node-config-provider" "^2.0.12" - "@smithy/node-http-handler" "^2.1.5" - "@smithy/protocol-http" "^3.0.5" - "@smithy/smithy-client" "^2.1.6" - "@smithy/types" "^2.3.3" - "@smithy/url-parser" "^2.0.9" - "@smithy/util-base64" "^2.0.0" - "@smithy/util-body-length-browser" "^2.0.0" - "@smithy/util-body-length-node" "^2.1.0" - "@smithy/util-defaults-mode-browser" "^2.0.10" - "@smithy/util-defaults-mode-node" "^2.0.12" - "@smithy/util-retry" "^2.0.2" - "@smithy/util-utf8" "^2.0.0" - "@smithy/util-waiter" "^2.0.9" - fast-xml-parser "4.2.5" - tslib "^2.5.0" - -"@aws-sdk/client-redshift-data@3.451.0": - version "3.451.0" - resolved "https://registry.npmjs.org/@aws-sdk/client-redshift-data/-/client-redshift-data-3.451.0.tgz#5f16561bff957cd916a8e7bf4ba00c6f8ba598a1" - integrity sha512-wWjKG5lNZC+yaqn29gyxvgBl2GQb0rg9xIpuI6DyEDbPyScFYB3tCaM137sEc68c+whhmhph5QHQ3utAhYjYTA== - dependencies: - "@aws-crypto/sha256-browser" "3.0.0" - "@aws-crypto/sha256-js" "3.0.0" - "@aws-sdk/client-sts" "3.451.0" - "@aws-sdk/core" "3.451.0" - "@aws-sdk/credential-provider-node" "3.451.0" - "@aws-sdk/middleware-host-header" "3.451.0" - "@aws-sdk/middleware-logger" "3.451.0" - "@aws-sdk/middleware-recursion-detection" "3.451.0" - "@aws-sdk/middleware-signing" "3.451.0" - "@aws-sdk/middleware-user-agent" "3.451.0" - "@aws-sdk/region-config-resolver" "3.451.0" - "@aws-sdk/types" "3.451.0" - "@aws-sdk/util-endpoints" "3.451.0" - "@aws-sdk/util-user-agent-browser" "3.451.0" - "@aws-sdk/util-user-agent-node" "3.451.0" - "@smithy/config-resolver" "^2.0.18" - "@smithy/fetch-http-handler" "^2.2.6" - "@smithy/hash-node" "^2.0.15" - "@smithy/invalid-dependency" "^2.0.13" - "@smithy/middleware-content-length" "^2.0.15" - "@smithy/middleware-endpoint" "^2.2.0" - "@smithy/middleware-retry" "^2.0.20" - "@smithy/middleware-serde" "^2.0.13" - "@smithy/middleware-stack" "^2.0.7" - "@smithy/node-config-provider" "^2.1.5" - "@smithy/node-http-handler" "^2.1.9" - "@smithy/protocol-http" "^3.0.9" - "@smithy/smithy-client" "^2.1.15" - "@smithy/types" "^2.5.0" - "@smithy/url-parser" "^2.0.13" - "@smithy/util-base64" "^2.0.1" - "@smithy/util-body-length-browser" "^2.0.0" - "@smithy/util-body-length-node" "^2.1.0" - "@smithy/util-defaults-mode-browser" "^2.0.19" - "@smithy/util-defaults-mode-node" "^2.0.25" - "@smithy/util-endpoints" "^1.0.4" - "@smithy/util-retry" "^2.0.6" - "@smithy/util-utf8" "^2.0.2" - tslib "^2.5.0" - uuid "^8.3.2" - -"@aws-sdk/client-redshift@3.452.0": - version "3.452.0" - resolved "https://registry.npmjs.org/@aws-sdk/client-redshift/-/client-redshift-3.452.0.tgz#f63066588681ff557691637bdbbf59a33fb934a0" - integrity sha512-bz/LN6A5C3j/NCNOQWOjjDYSbMCyFNJcGDfr+nMbzCvvLEx+plcWV2hZf0h8COoIYtI7uZwK2s6Ne8QwYBVHIQ== - dependencies: - "@aws-crypto/sha256-browser" "3.0.0" - "@aws-crypto/sha256-js" "3.0.0" - "@aws-sdk/client-sts" "3.451.0" - "@aws-sdk/core" "3.451.0" - "@aws-sdk/credential-provider-node" "3.451.0" - "@aws-sdk/middleware-host-header" "3.451.0" - "@aws-sdk/middleware-logger" "3.451.0" - "@aws-sdk/middleware-recursion-detection" "3.451.0" - "@aws-sdk/middleware-signing" "3.451.0" - "@aws-sdk/middleware-user-agent" "3.451.0" - "@aws-sdk/region-config-resolver" "3.451.0" - "@aws-sdk/types" "3.451.0" - "@aws-sdk/util-endpoints" "3.451.0" - "@aws-sdk/util-user-agent-browser" "3.451.0" - "@aws-sdk/util-user-agent-node" "3.451.0" - "@smithy/config-resolver" "^2.0.18" - "@smithy/fetch-http-handler" "^2.2.6" - "@smithy/hash-node" "^2.0.15" - "@smithy/invalid-dependency" "^2.0.13" - "@smithy/middleware-content-length" "^2.0.15" - "@smithy/middleware-endpoint" "^2.2.0" - "@smithy/middleware-retry" "^2.0.20" - "@smithy/middleware-serde" "^2.0.13" - "@smithy/middleware-stack" "^2.0.7" - "@smithy/node-config-provider" "^2.1.5" - "@smithy/node-http-handler" "^2.1.9" - "@smithy/protocol-http" "^3.0.9" - "@smithy/smithy-client" "^2.1.15" - "@smithy/types" "^2.5.0" - "@smithy/url-parser" "^2.0.13" - "@smithy/util-base64" "^2.0.1" - "@smithy/util-body-length-browser" "^2.0.0" - "@smithy/util-body-length-node" "^2.1.0" - "@smithy/util-defaults-mode-browser" "^2.0.19" - "@smithy/util-defaults-mode-node" "^2.0.25" - "@smithy/util-endpoints" "^1.0.4" - "@smithy/util-retry" "^2.0.6" - "@smithy/util-utf8" "^2.0.2" - "@smithy/util-waiter" "^2.0.13" - fast-xml-parser "4.2.5" - tslib "^2.5.0" - -"@aws-sdk/client-route-53@3.421.0": - version "3.421.0" - resolved "https://registry.npmjs.org/@aws-sdk/client-route-53/-/client-route-53-3.421.0.tgz#5bd03a46c0978d53193b628f320f753bf3e1dc14" - integrity sha512-JVV3XIT+AVYyoFv/cmsuAKEtFyKVXJ6LQQ2LnR3Z0FcKNzpZCbZlZmiYTeNl7y8ZNcLr5V9T1QIJa4HfZov3pw== - dependencies: - "@aws-crypto/sha256-browser" "3.0.0" - "@aws-crypto/sha256-js" "3.0.0" - "@aws-sdk/client-sts" "3.421.0" - "@aws-sdk/credential-provider-node" "3.421.0" - "@aws-sdk/middleware-host-header" "3.418.0" - "@aws-sdk/middleware-logger" "3.418.0" - "@aws-sdk/middleware-recursion-detection" "3.418.0" - "@aws-sdk/middleware-sdk-route53" "3.418.0" - "@aws-sdk/middleware-signing" "3.418.0" - "@aws-sdk/middleware-user-agent" "3.418.0" - "@aws-sdk/region-config-resolver" "3.418.0" - "@aws-sdk/types" "3.418.0" - "@aws-sdk/util-endpoints" "3.418.0" - "@aws-sdk/util-user-agent-browser" "3.418.0" - "@aws-sdk/util-user-agent-node" "3.418.0" - "@aws-sdk/xml-builder" "3.310.0" - "@smithy/config-resolver" "^2.0.10" - "@smithy/fetch-http-handler" "^2.1.5" - "@smithy/hash-node" "^2.0.9" - "@smithy/invalid-dependency" "^2.0.9" - "@smithy/middleware-content-length" "^2.0.11" - "@smithy/middleware-endpoint" "^2.0.9" - "@smithy/middleware-retry" "^2.0.12" - "@smithy/middleware-serde" "^2.0.9" - "@smithy/middleware-stack" "^2.0.2" - "@smithy/node-config-provider" "^2.0.12" - "@smithy/node-http-handler" "^2.1.5" - "@smithy/protocol-http" "^3.0.5" - "@smithy/smithy-client" "^2.1.6" - "@smithy/types" "^2.3.3" - "@smithy/url-parser" "^2.0.9" - "@smithy/util-base64" "^2.0.0" - "@smithy/util-body-length-browser" "^2.0.0" - "@smithy/util-body-length-node" "^2.1.0" - "@smithy/util-defaults-mode-browser" "^2.0.10" - "@smithy/util-defaults-mode-node" "^2.0.12" - "@smithy/util-retry" "^2.0.2" - "@smithy/util-utf8" "^2.0.0" - "@smithy/util-waiter" "^2.0.9" - fast-xml-parser "4.2.5" - tslib "^2.5.0" - -"@aws-sdk/client-s3@3.421.0": - version "3.421.0" - resolved "https://registry.npmjs.org/@aws-sdk/client-s3/-/client-s3-3.421.0.tgz#cf0e4a5e394c55463839b405af9dc6e3271509e4" - integrity sha512-vUXTY4toeHDf5EY2kOn04Ww9vTW2IVGy4+cymFp1cz5QT7g9KKj4Okj5DMdPld2y7wjgc+J/viTWEf26By49vw== - dependencies: - "@aws-crypto/sha1-browser" "3.0.0" - "@aws-crypto/sha256-browser" "3.0.0" - "@aws-crypto/sha256-js" "3.0.0" - "@aws-sdk/client-sts" "3.421.0" - "@aws-sdk/credential-provider-node" "3.421.0" - "@aws-sdk/middleware-bucket-endpoint" "3.418.0" - "@aws-sdk/middleware-expect-continue" "3.418.0" - "@aws-sdk/middleware-flexible-checksums" "3.418.0" - "@aws-sdk/middleware-host-header" "3.418.0" - "@aws-sdk/middleware-location-constraint" "3.418.0" - "@aws-sdk/middleware-logger" "3.418.0" - "@aws-sdk/middleware-recursion-detection" "3.418.0" - "@aws-sdk/middleware-sdk-s3" "3.418.0" - "@aws-sdk/middleware-signing" "3.418.0" - "@aws-sdk/middleware-ssec" "3.418.0" - "@aws-sdk/middleware-user-agent" "3.418.0" - "@aws-sdk/region-config-resolver" "3.418.0" - "@aws-sdk/signature-v4-multi-region" "3.418.0" - "@aws-sdk/types" "3.418.0" - "@aws-sdk/util-endpoints" "3.418.0" - "@aws-sdk/util-user-agent-browser" "3.418.0" - "@aws-sdk/util-user-agent-node" "3.418.0" - "@aws-sdk/xml-builder" "3.310.0" - "@smithy/config-resolver" "^2.0.10" - "@smithy/eventstream-serde-browser" "^2.0.9" - "@smithy/eventstream-serde-config-resolver" "^2.0.9" - "@smithy/eventstream-serde-node" "^2.0.9" - "@smithy/fetch-http-handler" "^2.1.5" - "@smithy/hash-blob-browser" "^2.0.9" - "@smithy/hash-node" "^2.0.9" - "@smithy/hash-stream-node" "^2.0.9" - "@smithy/invalid-dependency" "^2.0.9" - "@smithy/md5-js" "^2.0.9" - "@smithy/middleware-content-length" "^2.0.11" - "@smithy/middleware-endpoint" "^2.0.9" - "@smithy/middleware-retry" "^2.0.12" - "@smithy/middleware-serde" "^2.0.9" - "@smithy/middleware-stack" "^2.0.2" - "@smithy/node-config-provider" "^2.0.12" - "@smithy/node-http-handler" "^2.1.5" - "@smithy/protocol-http" "^3.0.5" - "@smithy/smithy-client" "^2.1.6" - "@smithy/types" "^2.3.3" - "@smithy/url-parser" "^2.0.9" - "@smithy/util-base64" "^2.0.0" - "@smithy/util-body-length-browser" "^2.0.0" - "@smithy/util-body-length-node" "^2.1.0" - "@smithy/util-defaults-mode-browser" "^2.0.10" - "@smithy/util-defaults-mode-node" "^2.0.12" - "@smithy/util-retry" "^2.0.2" - "@smithy/util-stream" "^2.0.12" - "@smithy/util-utf8" "^2.0.0" - "@smithy/util-waiter" "^2.0.9" - fast-xml-parser "4.2.5" - tslib "^2.5.0" - -"@aws-sdk/client-s3@3.451.0": - version "3.451.0" - resolved "https://registry.npmjs.org/@aws-sdk/client-s3/-/client-s3-3.451.0.tgz#f187b3879bf21f5dbf7b77fecc029516efe0696d" - integrity sha512-wDQjG/5jEswus1JclfcWeTIwrAXfAFSPz1tvwo7mRrfDNH8UPFjKKBI9ArBBwwaWUj4ou++56CHFKhKX4ytaQw== - dependencies: - "@aws-crypto/sha1-browser" "3.0.0" - "@aws-crypto/sha256-browser" "3.0.0" - "@aws-crypto/sha256-js" "3.0.0" - "@aws-sdk/client-sts" "3.451.0" - "@aws-sdk/core" "3.451.0" - "@aws-sdk/credential-provider-node" "3.451.0" - "@aws-sdk/middleware-bucket-endpoint" "3.451.0" - "@aws-sdk/middleware-expect-continue" "3.451.0" - "@aws-sdk/middleware-flexible-checksums" "3.451.0" - "@aws-sdk/middleware-host-header" "3.451.0" - "@aws-sdk/middleware-location-constraint" "3.451.0" - "@aws-sdk/middleware-logger" "3.451.0" - "@aws-sdk/middleware-recursion-detection" "3.451.0" - "@aws-sdk/middleware-sdk-s3" "3.451.0" - "@aws-sdk/middleware-signing" "3.451.0" - "@aws-sdk/middleware-ssec" "3.451.0" - "@aws-sdk/middleware-user-agent" "3.451.0" - "@aws-sdk/region-config-resolver" "3.451.0" - "@aws-sdk/signature-v4-multi-region" "3.451.0" - "@aws-sdk/types" "3.451.0" - "@aws-sdk/util-endpoints" "3.451.0" - "@aws-sdk/util-user-agent-browser" "3.451.0" - "@aws-sdk/util-user-agent-node" "3.451.0" - "@aws-sdk/xml-builder" "3.310.0" - "@smithy/config-resolver" "^2.0.18" - "@smithy/eventstream-serde-browser" "^2.0.13" - "@smithy/eventstream-serde-config-resolver" "^2.0.13" - "@smithy/eventstream-serde-node" "^2.0.13" - "@smithy/fetch-http-handler" "^2.2.6" - "@smithy/hash-blob-browser" "^2.0.14" - "@smithy/hash-node" "^2.0.15" - "@smithy/hash-stream-node" "^2.0.15" - "@smithy/invalid-dependency" "^2.0.13" - "@smithy/md5-js" "^2.0.15" - "@smithy/middleware-content-length" "^2.0.15" - "@smithy/middleware-endpoint" "^2.2.0" - "@smithy/middleware-retry" "^2.0.20" - "@smithy/middleware-serde" "^2.0.13" - "@smithy/middleware-stack" "^2.0.7" - "@smithy/node-config-provider" "^2.1.5" - "@smithy/node-http-handler" "^2.1.9" - "@smithy/protocol-http" "^3.0.9" - "@smithy/smithy-client" "^2.1.15" - "@smithy/types" "^2.5.0" - "@smithy/url-parser" "^2.0.13" - "@smithy/util-base64" "^2.0.1" - "@smithy/util-body-length-browser" "^2.0.0" - "@smithy/util-body-length-node" "^2.1.0" - "@smithy/util-defaults-mode-browser" "^2.0.19" - "@smithy/util-defaults-mode-node" "^2.0.25" - "@smithy/util-endpoints" "^1.0.4" - "@smithy/util-retry" "^2.0.6" - "@smithy/util-stream" "^2.0.20" - "@smithy/util-utf8" "^2.0.2" - "@smithy/util-waiter" "^2.0.13" - fast-xml-parser "4.2.5" - tslib "^2.5.0" - -"@aws-sdk/client-s3@3.637.0": - version "3.637.0" - resolved "https://registry.npmjs.org/@aws-sdk/client-s3/-/client-s3-3.637.0.tgz#2879bd8ddef84397b65fa9e61bca10bb4ba08211" - integrity sha512-y6UC94fsMvhKbf0dzfnjVP1HePeGjplfcYfilZU1COIJLyTkMcUv4XcT4I407CGIrvgEafONHkiC09ygqUauNA== +"@aws-sdk/client-ssm@3.632.0": + version "3.632.0" + resolved "https://registry.npmjs.org/@aws-sdk/client-ssm/-/client-ssm-3.632.0.tgz#4997995530e40dd45b8883ddd66e20dd4c6a3bf8" + integrity sha512-p9QZguhC6NB6CQTFgLcYhU1yhGF7SN9kDMtFwtFBxTPO/SQJ/PJcEyL40yXPbuPUXFtT/YRhT9mIwQagfkXzAA== dependencies: - "@aws-crypto/sha1-browser" "5.2.0" "@aws-crypto/sha256-browser" "5.2.0" "@aws-crypto/sha256-js" "5.2.0" - "@aws-sdk/client-sso-oidc" "3.637.0" - "@aws-sdk/client-sts" "3.637.0" - "@aws-sdk/core" "3.635.0" - "@aws-sdk/credential-provider-node" "3.637.0" - "@aws-sdk/middleware-bucket-endpoint" "3.620.0" - "@aws-sdk/middleware-expect-continue" "3.620.0" - "@aws-sdk/middleware-flexible-checksums" "3.620.0" + "@aws-sdk/client-sso-oidc" "3.632.0" + "@aws-sdk/client-sts" "3.632.0" + "@aws-sdk/core" "3.629.0" + "@aws-sdk/credential-provider-node" "3.632.0" "@aws-sdk/middleware-host-header" "3.620.0" - "@aws-sdk/middleware-location-constraint" "3.609.0" "@aws-sdk/middleware-logger" "3.609.0" "@aws-sdk/middleware-recursion-detection" "3.620.0" - "@aws-sdk/middleware-sdk-s3" "3.635.0" - "@aws-sdk/middleware-ssec" "3.609.0" - "@aws-sdk/middleware-user-agent" "3.637.0" + "@aws-sdk/middleware-user-agent" "3.632.0" "@aws-sdk/region-config-resolver" "3.614.0" - "@aws-sdk/signature-v4-multi-region" "3.635.0" "@aws-sdk/types" "3.609.0" - "@aws-sdk/util-endpoints" "3.637.0" + "@aws-sdk/util-endpoints" "3.632.0" "@aws-sdk/util-user-agent-browser" "3.609.0" "@aws-sdk/util-user-agent-node" "3.614.0" - "@aws-sdk/xml-builder" "3.609.0" "@smithy/config-resolver" "^3.0.5" - "@smithy/core" "^2.4.0" - "@smithy/eventstream-serde-browser" "^3.0.6" - "@smithy/eventstream-serde-config-resolver" "^3.0.3" - "@smithy/eventstream-serde-node" "^3.0.5" + "@smithy/core" "^2.3.2" "@smithy/fetch-http-handler" "^3.2.4" - "@smithy/hash-blob-browser" "^3.1.2" "@smithy/hash-node" "^3.0.3" - "@smithy/hash-stream-node" "^3.1.2" "@smithy/invalid-dependency" "^3.0.3" - "@smithy/md5-js" "^3.0.3" "@smithy/middleware-content-length" "^3.0.5" "@smithy/middleware-endpoint" "^3.1.0" - "@smithy/middleware-retry" "^3.0.15" + "@smithy/middleware-retry" "^3.0.14" "@smithy/middleware-serde" "^3.0.3" "@smithy/middleware-stack" "^3.0.3" "@smithy/node-config-provider" "^3.1.4" "@smithy/node-http-handler" "^3.1.4" "@smithy/protocol-http" "^4.1.0" - "@smithy/smithy-client" "^3.2.0" + "@smithy/smithy-client" "^3.1.12" "@smithy/types" "^3.3.0" "@smithy/url-parser" "^3.0.3" "@smithy/util-base64" "^3.0.0" "@smithy/util-body-length-browser" "^3.0.0" "@smithy/util-body-length-node" "^3.0.0" - "@smithy/util-defaults-mode-browser" "^3.0.15" - "@smithy/util-defaults-mode-node" "^3.0.15" + "@smithy/util-defaults-mode-browser" "^3.0.14" + "@smithy/util-defaults-mode-node" "^3.0.14" "@smithy/util-endpoints" "^2.0.5" "@smithy/util-middleware" "^3.0.3" "@smithy/util-retry" "^3.0.3" - "@smithy/util-stream" "^3.1.3" "@smithy/util-utf8" "^3.0.0" "@smithy/util-waiter" "^3.1.2" tslib "^2.6.2" + uuid "^9.0.1" -"@aws-sdk/client-secrets-manager@3.451.0": - version "3.451.0" - resolved "https://registry.npmjs.org/@aws-sdk/client-secrets-manager/-/client-secrets-manager-3.451.0.tgz#f2f528ebe8b4d9514289e97d8b6c865256e5463a" - integrity sha512-TNuYOXoALEhdaqxiBE4H+XA35BH2pekBXP594LGlmXgon3Ca+G2wx1EjVMRpo1K9GrzhwZSEWZsUyji4RwTs2w== - dependencies: - "@aws-crypto/sha256-browser" "3.0.0" - "@aws-crypto/sha256-js" "3.0.0" - "@aws-sdk/client-sts" "3.451.0" - "@aws-sdk/core" "3.451.0" - "@aws-sdk/credential-provider-node" "3.451.0" - "@aws-sdk/middleware-host-header" "3.451.0" - "@aws-sdk/middleware-logger" "3.451.0" - "@aws-sdk/middleware-recursion-detection" "3.451.0" - "@aws-sdk/middleware-signing" "3.451.0" - "@aws-sdk/middleware-user-agent" "3.451.0" - "@aws-sdk/region-config-resolver" "3.451.0" - "@aws-sdk/types" "3.451.0" - "@aws-sdk/util-endpoints" "3.451.0" - "@aws-sdk/util-user-agent-browser" "3.451.0" - "@aws-sdk/util-user-agent-node" "3.451.0" - "@smithy/config-resolver" "^2.0.18" - "@smithy/fetch-http-handler" "^2.2.6" - "@smithy/hash-node" "^2.0.15" - "@smithy/invalid-dependency" "^2.0.13" - "@smithy/middleware-content-length" "^2.0.15" - "@smithy/middleware-endpoint" "^2.2.0" - "@smithy/middleware-retry" "^2.0.20" - "@smithy/middleware-serde" "^2.0.13" - "@smithy/middleware-stack" "^2.0.7" - "@smithy/node-config-provider" "^2.1.5" - "@smithy/node-http-handler" "^2.1.9" - "@smithy/protocol-http" "^3.0.9" - "@smithy/smithy-client" "^2.1.15" - "@smithy/types" "^2.5.0" - "@smithy/url-parser" "^2.0.13" - "@smithy/util-base64" "^2.0.1" - "@smithy/util-body-length-browser" "^2.0.0" - "@smithy/util-body-length-node" "^2.1.0" - "@smithy/util-defaults-mode-browser" "^2.0.19" - "@smithy/util-defaults-mode-node" "^2.0.25" - "@smithy/util-endpoints" "^1.0.4" - "@smithy/util-retry" "^2.0.6" - "@smithy/util-utf8" "^2.0.2" - tslib "^2.5.0" - uuid "^8.3.2" - -"@aws-sdk/client-sfn@3.421.0": - version "3.421.0" - resolved "https://registry.npmjs.org/@aws-sdk/client-sfn/-/client-sfn-3.421.0.tgz#f39cb5f0c0907252697f31dd457d225b1b8aa0c9" - integrity sha512-L+1vZMaqHEaVI7VeYtdEIjYeRnQRDf9ctc3YSPB2o0YayGUvxwqimuSUkYLoGVyVd/WQCc+glS+WWmbQzR2oHg== - dependencies: - "@aws-crypto/sha256-browser" "3.0.0" - "@aws-crypto/sha256-js" "3.0.0" - "@aws-sdk/client-sts" "3.421.0" - "@aws-sdk/credential-provider-node" "3.421.0" - "@aws-sdk/middleware-host-header" "3.418.0" - "@aws-sdk/middleware-logger" "3.418.0" - "@aws-sdk/middleware-recursion-detection" "3.418.0" - "@aws-sdk/middleware-signing" "3.418.0" - "@aws-sdk/middleware-user-agent" "3.418.0" - "@aws-sdk/region-config-resolver" "3.418.0" - "@aws-sdk/types" "3.418.0" - "@aws-sdk/util-endpoints" "3.418.0" - "@aws-sdk/util-user-agent-browser" "3.418.0" - "@aws-sdk/util-user-agent-node" "3.418.0" - "@smithy/config-resolver" "^2.0.10" - "@smithy/fetch-http-handler" "^2.1.5" - "@smithy/hash-node" "^2.0.9" - "@smithy/invalid-dependency" "^2.0.9" - "@smithy/middleware-content-length" "^2.0.11" - "@smithy/middleware-endpoint" "^2.0.9" - "@smithy/middleware-retry" "^2.0.12" - "@smithy/middleware-serde" "^2.0.9" - "@smithy/middleware-stack" "^2.0.2" - "@smithy/node-config-provider" "^2.0.12" - "@smithy/node-http-handler" "^2.1.5" - "@smithy/protocol-http" "^3.0.5" - "@smithy/smithy-client" "^2.1.6" - "@smithy/types" "^2.3.3" - "@smithy/url-parser" "^2.0.9" - "@smithy/util-base64" "^2.0.0" - "@smithy/util-body-length-browser" "^2.0.0" - "@smithy/util-body-length-node" "^2.1.0" - "@smithy/util-defaults-mode-browser" "^2.0.10" - "@smithy/util-defaults-mode-node" "^2.0.12" - "@smithy/util-retry" "^2.0.2" - "@smithy/util-utf8" "^2.0.0" - tslib "^2.5.0" - -"@aws-sdk/client-sns@3.637.0": - version "3.637.0" - resolved "https://registry.npmjs.org/@aws-sdk/client-sns/-/client-sns-3.637.0.tgz#36a63419e58310b6b2750c3a2e6fc6fe0f7bae46" - integrity sha512-6FDeWqTCeIPgImMyabqoFd9/EFS3XIaMYrqmHUTSPNlrhRkuJWh+3zS/S5a7tPxqkadOIqajf9UCzMCvjJru8g== +"@aws-sdk/client-sso-oidc@3.632.0": + version "3.632.0" + resolved "https://registry.npmjs.org/@aws-sdk/client-sso-oidc/-/client-sso-oidc-3.632.0.tgz#38d0b11980f0716c85e63acf2bce0ac1e6ccc9b5" + integrity sha512-Oh1fIWaoZluihOCb/zDEpRTi+6an82fgJz7fyRBugyLhEtDjmvpCQ3oKjzaOhoN+4EvXAm1ZS/ZgpvXBlIRTgw== dependencies: "@aws-crypto/sha256-browser" "5.2.0" "@aws-crypto/sha256-js" "5.2.0" - "@aws-sdk/client-sso-oidc" "3.637.0" - "@aws-sdk/client-sts" "3.637.0" - "@aws-sdk/core" "3.635.0" - "@aws-sdk/credential-provider-node" "3.637.0" + "@aws-sdk/core" "3.629.0" + "@aws-sdk/credential-provider-node" "3.632.0" "@aws-sdk/middleware-host-header" "3.620.0" "@aws-sdk/middleware-logger" "3.609.0" "@aws-sdk/middleware-recursion-detection" "3.620.0" - "@aws-sdk/middleware-user-agent" "3.637.0" + "@aws-sdk/middleware-user-agent" "3.632.0" "@aws-sdk/region-config-resolver" "3.614.0" "@aws-sdk/types" "3.609.0" - "@aws-sdk/util-endpoints" "3.637.0" + "@aws-sdk/util-endpoints" "3.632.0" "@aws-sdk/util-user-agent-browser" "3.609.0" "@aws-sdk/util-user-agent-node" "3.614.0" "@smithy/config-resolver" "^3.0.5" - "@smithy/core" "^2.4.0" + "@smithy/core" "^2.3.2" "@smithy/fetch-http-handler" "^3.2.4" "@smithy/hash-node" "^3.0.3" "@smithy/invalid-dependency" "^3.0.3" "@smithy/middleware-content-length" "^3.0.5" "@smithy/middleware-endpoint" "^3.1.0" - "@smithy/middleware-retry" "^3.0.15" + "@smithy/middleware-retry" "^3.0.14" "@smithy/middleware-serde" "^3.0.3" "@smithy/middleware-stack" "^3.0.3" "@smithy/node-config-provider" "^3.1.4" "@smithy/node-http-handler" "^3.1.4" "@smithy/protocol-http" "^4.1.0" - "@smithy/smithy-client" "^3.2.0" + "@smithy/smithy-client" "^3.1.12" "@smithy/types" "^3.3.0" "@smithy/url-parser" "^3.0.3" "@smithy/util-base64" "^3.0.0" "@smithy/util-body-length-browser" "^3.0.0" "@smithy/util-body-length-node" "^3.0.0" - "@smithy/util-defaults-mode-browser" "^3.0.15" - "@smithy/util-defaults-mode-node" "^3.0.15" + "@smithy/util-defaults-mode-browser" "^3.0.14" + "@smithy/util-defaults-mode-node" "^3.0.14" "@smithy/util-endpoints" "^2.0.5" "@smithy/util-middleware" "^3.0.3" "@smithy/util-retry" "^3.0.3" "@smithy/util-utf8" "^3.0.0" tslib "^2.6.2" -"@aws-sdk/client-ssm@3.421.0": - version "3.421.0" - resolved "https://registry.npmjs.org/@aws-sdk/client-ssm/-/client-ssm-3.421.0.tgz#0bb2c73a2028a6fcc7497cff4651392f0e412dd2" - integrity sha512-xdysVX+b0kmt8uEAIlkWNqyvYKVHFQepDlERHa9sXxPB8KEdzgm/To+WlAHE0Ujg6ju0Vf4FZdKA5k/+1Pbydw== - dependencies: - "@aws-crypto/sha256-browser" "3.0.0" - "@aws-crypto/sha256-js" "3.0.0" - "@aws-sdk/client-sts" "3.421.0" - "@aws-sdk/credential-provider-node" "3.421.0" - "@aws-sdk/middleware-host-header" "3.418.0" - "@aws-sdk/middleware-logger" "3.418.0" - "@aws-sdk/middleware-recursion-detection" "3.418.0" - "@aws-sdk/middleware-signing" "3.418.0" - "@aws-sdk/middleware-user-agent" "3.418.0" - "@aws-sdk/region-config-resolver" "3.418.0" - "@aws-sdk/types" "3.418.0" - "@aws-sdk/util-endpoints" "3.418.0" - "@aws-sdk/util-user-agent-browser" "3.418.0" - "@aws-sdk/util-user-agent-node" "3.418.0" - "@smithy/config-resolver" "^2.0.10" - "@smithy/fetch-http-handler" "^2.1.5" - "@smithy/hash-node" "^2.0.9" - "@smithy/invalid-dependency" "^2.0.9" - "@smithy/middleware-content-length" "^2.0.11" - "@smithy/middleware-endpoint" "^2.0.9" - "@smithy/middleware-retry" "^2.0.12" - "@smithy/middleware-serde" "^2.0.9" - "@smithy/middleware-stack" "^2.0.2" - "@smithy/node-config-provider" "^2.0.12" - "@smithy/node-http-handler" "^2.1.5" - "@smithy/protocol-http" "^3.0.5" - "@smithy/smithy-client" "^2.1.6" - "@smithy/types" "^2.3.3" - "@smithy/url-parser" "^2.0.9" - "@smithy/util-base64" "^2.0.0" - "@smithy/util-body-length-browser" "^2.0.0" - "@smithy/util-body-length-node" "^2.1.0" - "@smithy/util-defaults-mode-browser" "^2.0.10" - "@smithy/util-defaults-mode-node" "^2.0.12" - "@smithy/util-retry" "^2.0.2" - "@smithy/util-utf8" "^2.0.0" - "@smithy/util-waiter" "^2.0.9" - tslib "^2.5.0" - uuid "^8.3.2" - -"@aws-sdk/client-ssm@3.453.0": - version "3.453.0" - resolved "https://registry.npmjs.org/@aws-sdk/client-ssm/-/client-ssm-3.453.0.tgz#cee9bf371a924b214f3da69daf61089c3e31c950" - integrity sha512-SRAnMwfCH+vUgXRdn0k9Ly5xRJNH9VZ2pSoGzyp/fON7LYZf/yEa6Vu/s0/Lr3nCDgKhsc/KTq/8XqcjVal8ag== - dependencies: - "@aws-crypto/sha256-browser" "3.0.0" - "@aws-crypto/sha256-js" "3.0.0" - "@aws-sdk/client-sts" "3.451.0" - "@aws-sdk/core" "3.451.0" - "@aws-sdk/credential-provider-node" "3.451.0" - "@aws-sdk/middleware-host-header" "3.451.0" - "@aws-sdk/middleware-logger" "3.451.0" - "@aws-sdk/middleware-recursion-detection" "3.451.0" - "@aws-sdk/middleware-signing" "3.451.0" - "@aws-sdk/middleware-user-agent" "3.451.0" - "@aws-sdk/region-config-resolver" "3.451.0" - "@aws-sdk/types" "3.451.0" - "@aws-sdk/util-endpoints" "3.451.0" - "@aws-sdk/util-user-agent-browser" "3.451.0" - "@aws-sdk/util-user-agent-node" "3.451.0" - "@smithy/config-resolver" "^2.0.18" - "@smithy/fetch-http-handler" "^2.2.6" - "@smithy/hash-node" "^2.0.15" - "@smithy/invalid-dependency" "^2.0.13" - "@smithy/middleware-content-length" "^2.0.15" - "@smithy/middleware-endpoint" "^2.2.0" - "@smithy/middleware-retry" "^2.0.20" - "@smithy/middleware-serde" "^2.0.13" - "@smithy/middleware-stack" "^2.0.7" - "@smithy/node-config-provider" "^2.1.5" - "@smithy/node-http-handler" "^2.1.9" - "@smithy/protocol-http" "^3.0.9" - "@smithy/smithy-client" "^2.1.15" - "@smithy/types" "^2.5.0" - "@smithy/url-parser" "^2.0.13" - "@smithy/util-base64" "^2.0.1" - "@smithy/util-body-length-browser" "^2.0.0" - "@smithy/util-body-length-node" "^2.1.0" - "@smithy/util-defaults-mode-browser" "^2.0.19" - "@smithy/util-defaults-mode-node" "^2.0.25" - "@smithy/util-endpoints" "^1.0.4" - "@smithy/util-retry" "^2.0.6" - "@smithy/util-utf8" "^2.0.2" - "@smithy/util-waiter" "^2.0.13" - tslib "^2.5.0" - uuid "^8.3.2" +"@aws-sdk/client-sso-oidc@3.662.0": + version "3.662.0" + resolved "https://registry.npmjs.org/@aws-sdk/client-sso-oidc/-/client-sso-oidc-3.662.0.tgz#f2816f674b4125ff900435cc8b7fadc227455c81" + integrity sha512-YZrH0sftdmjvEIY8u0LCrfEhyaMVpN0+K0K9WsUrFRMZ7DK6nB9YD1f5EaKUN5UjNw5S7gbjSdI8neSCoELjhw== + dependencies: + "@aws-crypto/sha256-browser" "5.2.0" + "@aws-crypto/sha256-js" "5.2.0" + "@aws-sdk/core" "3.662.0" + "@aws-sdk/credential-provider-node" "3.662.0" + "@aws-sdk/middleware-host-header" "3.662.0" + "@aws-sdk/middleware-logger" "3.662.0" + "@aws-sdk/middleware-recursion-detection" "3.662.0" + "@aws-sdk/middleware-user-agent" "3.662.0" + "@aws-sdk/region-config-resolver" "3.662.0" + "@aws-sdk/types" "3.662.0" + "@aws-sdk/util-endpoints" "3.662.0" + "@aws-sdk/util-user-agent-browser" "3.662.0" + "@aws-sdk/util-user-agent-node" "3.662.0" + "@smithy/config-resolver" "^3.0.9" + "@smithy/core" "^2.4.7" + "@smithy/fetch-http-handler" "^3.2.9" + "@smithy/hash-node" "^3.0.7" + "@smithy/invalid-dependency" "^3.0.7" + "@smithy/middleware-content-length" "^3.0.9" + "@smithy/middleware-endpoint" "^3.1.4" + "@smithy/middleware-retry" "^3.0.22" + "@smithy/middleware-serde" "^3.0.7" + "@smithy/middleware-stack" "^3.0.7" + "@smithy/node-config-provider" "^3.1.8" + "@smithy/node-http-handler" "^3.2.4" + "@smithy/protocol-http" "^4.1.4" + "@smithy/smithy-client" "^3.3.6" + "@smithy/types" "^3.5.0" + "@smithy/url-parser" "^3.0.7" + "@smithy/util-base64" "^3.0.0" + "@smithy/util-body-length-browser" "^3.0.0" + "@smithy/util-body-length-node" "^3.0.0" + "@smithy/util-defaults-mode-browser" "^3.0.22" + "@smithy/util-defaults-mode-node" "^3.0.22" + "@smithy/util-endpoints" "^2.1.3" + "@smithy/util-middleware" "^3.0.7" + "@smithy/util-retry" "^3.0.7" + "@smithy/util-utf8" "^3.0.0" + tslib "^2.6.2" -"@aws-sdk/client-sso-oidc@3.637.0": - version "3.637.0" - resolved "https://registry.npmjs.org/@aws-sdk/client-sso-oidc/-/client-sso-oidc-3.637.0.tgz#d7e22ce6627c3285bf311e6c9e64c22b99bbd76a" - integrity sha512-27bHALN6Qb6m6KZmPvRieJ/QRlj1lyac/GT2Rn5kJpre8Mpp+yxrtvp3h9PjNBty4lCeFEENfY4dGNSozBuBcw== +"@aws-sdk/client-sso@3.632.0": + version "3.632.0" + resolved "https://registry.npmjs.org/@aws-sdk/client-sso/-/client-sso-3.632.0.tgz#cc7d7c7578ba34d3689574dc015a0a71b35872e1" + integrity sha512-iYWHiKBz44m3chCFvtvHnvCpL2rALzyr1e6tOZV3dLlOKtQtDUlPy6OtnXDu4y+wyJCniy8ivG3+LAe4klzn1Q== dependencies: "@aws-crypto/sha256-browser" "5.2.0" "@aws-crypto/sha256-js" "5.2.0" - "@aws-sdk/core" "3.635.0" - "@aws-sdk/credential-provider-node" "3.637.0" + "@aws-sdk/core" "3.629.0" "@aws-sdk/middleware-host-header" "3.620.0" "@aws-sdk/middleware-logger" "3.609.0" "@aws-sdk/middleware-recursion-detection" "3.620.0" - "@aws-sdk/middleware-user-agent" "3.637.0" + "@aws-sdk/middleware-user-agent" "3.632.0" "@aws-sdk/region-config-resolver" "3.614.0" "@aws-sdk/types" "3.609.0" - "@aws-sdk/util-endpoints" "3.637.0" + "@aws-sdk/util-endpoints" "3.632.0" "@aws-sdk/util-user-agent-browser" "3.609.0" "@aws-sdk/util-user-agent-node" "3.614.0" "@smithy/config-resolver" "^3.0.5" - "@smithy/core" "^2.4.0" + "@smithy/core" "^2.3.2" "@smithy/fetch-http-handler" "^3.2.4" "@smithy/hash-node" "^3.0.3" "@smithy/invalid-dependency" "^3.0.3" "@smithy/middleware-content-length" "^3.0.5" "@smithy/middleware-endpoint" "^3.1.0" - "@smithy/middleware-retry" "^3.0.15" + "@smithy/middleware-retry" "^3.0.14" "@smithy/middleware-serde" "^3.0.3" "@smithy/middleware-stack" "^3.0.3" "@smithy/node-config-provider" "^3.1.4" "@smithy/node-http-handler" "^3.1.4" "@smithy/protocol-http" "^4.1.0" - "@smithy/smithy-client" "^3.2.0" + "@smithy/smithy-client" "^3.1.12" "@smithy/types" "^3.3.0" "@smithy/url-parser" "^3.0.3" "@smithy/util-base64" "^3.0.0" "@smithy/util-body-length-browser" "^3.0.0" "@smithy/util-body-length-node" "^3.0.0" - "@smithy/util-defaults-mode-browser" "^3.0.15" - "@smithy/util-defaults-mode-node" "^3.0.15" + "@smithy/util-defaults-mode-browser" "^3.0.14" + "@smithy/util-defaults-mode-node" "^3.0.14" "@smithy/util-endpoints" "^2.0.5" "@smithy/util-middleware" "^3.0.3" "@smithy/util-retry" "^3.0.3" "@smithy/util-utf8" "^3.0.0" tslib "^2.6.2" -"@aws-sdk/client-sso-oidc@3.649.0": - version "3.649.0" - resolved "https://registry.npmjs.org/@aws-sdk/client-sso-oidc/-/client-sso-oidc-3.649.0.tgz#23d0177d1c0a2b670e1f149d134f3baca4eefcd6" - integrity sha512-yaKbOFLk1F1lqAAPUbpoN95pDxgqB/7Rd03yndtV+o3/QLK+etKcgzuIkqGpYycvi6YLYLCxkwPNFEg/NzpW6Q== +"@aws-sdk/client-sso@3.662.0": + version "3.662.0" + resolved "https://registry.npmjs.org/@aws-sdk/client-sso/-/client-sso-3.662.0.tgz#43c9238799a2271e3652089bcddf105752fdacea" + integrity sha512-4j3+eNSnNblcIYCJrsRRdyXFjAWGpGa7s7pdIyDMLwtYA7AKNlnlyQV14jtezhMrN2j6qZ7zZmnwEyFGipgfWA== dependencies: "@aws-crypto/sha256-browser" "5.2.0" "@aws-crypto/sha256-js" "5.2.0" - "@aws-sdk/core" "3.649.0" - "@aws-sdk/credential-provider-node" "3.649.0" - "@aws-sdk/middleware-host-header" "3.649.0" - "@aws-sdk/middleware-logger" "3.649.0" - "@aws-sdk/middleware-recursion-detection" "3.649.0" - "@aws-sdk/middleware-user-agent" "3.649.0" - "@aws-sdk/region-config-resolver" "3.649.0" - "@aws-sdk/types" "3.649.0" - "@aws-sdk/util-endpoints" "3.649.0" - "@aws-sdk/util-user-agent-browser" "3.649.0" - "@aws-sdk/util-user-agent-node" "3.649.0" - "@smithy/config-resolver" "^3.0.6" - "@smithy/core" "^2.4.1" - "@smithy/fetch-http-handler" "^3.2.5" - "@smithy/hash-node" "^3.0.4" - "@smithy/invalid-dependency" "^3.0.4" - "@smithy/middleware-content-length" "^3.0.6" - "@smithy/middleware-endpoint" "^3.1.1" - "@smithy/middleware-retry" "^3.0.16" - "@smithy/middleware-serde" "^3.0.4" - "@smithy/middleware-stack" "^3.0.4" - "@smithy/node-config-provider" "^3.1.5" - "@smithy/node-http-handler" "^3.2.0" - "@smithy/protocol-http" "^4.1.1" - "@smithy/smithy-client" "^3.3.0" - "@smithy/types" "^3.4.0" - "@smithy/url-parser" "^3.0.4" + "@aws-sdk/core" "3.662.0" + "@aws-sdk/middleware-host-header" "3.662.0" + "@aws-sdk/middleware-logger" "3.662.0" + "@aws-sdk/middleware-recursion-detection" "3.662.0" + "@aws-sdk/middleware-user-agent" "3.662.0" + "@aws-sdk/region-config-resolver" "3.662.0" + "@aws-sdk/types" "3.662.0" + "@aws-sdk/util-endpoints" "3.662.0" + "@aws-sdk/util-user-agent-browser" "3.662.0" + "@aws-sdk/util-user-agent-node" "3.662.0" + "@smithy/config-resolver" "^3.0.9" + "@smithy/core" "^2.4.7" + "@smithy/fetch-http-handler" "^3.2.9" + "@smithy/hash-node" "^3.0.7" + "@smithy/invalid-dependency" "^3.0.7" + "@smithy/middleware-content-length" "^3.0.9" + "@smithy/middleware-endpoint" "^3.1.4" + "@smithy/middleware-retry" "^3.0.22" + "@smithy/middleware-serde" "^3.0.7" + "@smithy/middleware-stack" "^3.0.7" + "@smithy/node-config-provider" "^3.1.8" + "@smithy/node-http-handler" "^3.2.4" + "@smithy/protocol-http" "^4.1.4" + "@smithy/smithy-client" "^3.3.6" + "@smithy/types" "^3.5.0" + "@smithy/url-parser" "^3.0.7" "@smithy/util-base64" "^3.0.0" "@smithy/util-body-length-browser" "^3.0.0" "@smithy/util-body-length-node" "^3.0.0" - "@smithy/util-defaults-mode-browser" "^3.0.16" - "@smithy/util-defaults-mode-node" "^3.0.16" - "@smithy/util-endpoints" "^2.1.0" - "@smithy/util-middleware" "^3.0.4" - "@smithy/util-retry" "^3.0.4" + "@smithy/util-defaults-mode-browser" "^3.0.22" + "@smithy/util-defaults-mode-node" "^3.0.22" + "@smithy/util-endpoints" "^2.1.3" + "@smithy/util-middleware" "^3.0.7" + "@smithy/util-retry" "^3.0.7" "@smithy/util-utf8" "^3.0.0" tslib "^2.6.2" -"@aws-sdk/client-sso@3.421.0": - version "3.421.0" - resolved "https://registry.npmjs.org/@aws-sdk/client-sso/-/client-sso-3.421.0.tgz#794350d63bd6b327f4919460ae908a1a39585165" - integrity sha512-40CmW7K2/FZEn3CbOjbpRYeVjKu6aJQlpRHcAgEJGNoVEAnRA3YNH4H0BN2iWWITfYg3B7sIjMm5VE9fCIK1Ng== - dependencies: - "@aws-crypto/sha256-browser" "3.0.0" - "@aws-crypto/sha256-js" "3.0.0" - "@aws-sdk/middleware-host-header" "3.418.0" - "@aws-sdk/middleware-logger" "3.418.0" - "@aws-sdk/middleware-recursion-detection" "3.418.0" - "@aws-sdk/middleware-user-agent" "3.418.0" - "@aws-sdk/region-config-resolver" "3.418.0" - "@aws-sdk/types" "3.418.0" - "@aws-sdk/util-endpoints" "3.418.0" - "@aws-sdk/util-user-agent-browser" "3.418.0" - "@aws-sdk/util-user-agent-node" "3.418.0" - "@smithy/config-resolver" "^2.0.10" - "@smithy/fetch-http-handler" "^2.1.5" - "@smithy/hash-node" "^2.0.9" - "@smithy/invalid-dependency" "^2.0.9" - "@smithy/middleware-content-length" "^2.0.11" - "@smithy/middleware-endpoint" "^2.0.9" - "@smithy/middleware-retry" "^2.0.12" - "@smithy/middleware-serde" "^2.0.9" - "@smithy/middleware-stack" "^2.0.2" - "@smithy/node-config-provider" "^2.0.12" - "@smithy/node-http-handler" "^2.1.5" - "@smithy/protocol-http" "^3.0.5" - "@smithy/smithy-client" "^2.1.6" - "@smithy/types" "^2.3.3" - "@smithy/url-parser" "^2.0.9" - "@smithy/util-base64" "^2.0.0" - "@smithy/util-body-length-browser" "^2.0.0" - "@smithy/util-body-length-node" "^2.1.0" - "@smithy/util-defaults-mode-browser" "^2.0.10" - "@smithy/util-defaults-mode-node" "^2.0.12" - "@smithy/util-retry" "^2.0.2" - "@smithy/util-utf8" "^2.0.0" - tslib "^2.5.0" - -"@aws-sdk/client-sso@3.451.0": - version "3.451.0" - resolved "https://registry.npmjs.org/@aws-sdk/client-sso/-/client-sso-3.451.0.tgz#d52b961efa707b6579821942801145a2e1be8121" - integrity sha512-KkYSke3Pdv3MfVH/5fT528+MKjMyPKlcLcd4zQb0x6/7Bl7EHrPh1JZYjzPLHelb+UY5X0qN8+cb8iSu1eiwIQ== - dependencies: - "@aws-crypto/sha256-browser" "3.0.0" - "@aws-crypto/sha256-js" "3.0.0" - "@aws-sdk/core" "3.451.0" - "@aws-sdk/middleware-host-header" "3.451.0" - "@aws-sdk/middleware-logger" "3.451.0" - "@aws-sdk/middleware-recursion-detection" "3.451.0" - "@aws-sdk/middleware-user-agent" "3.451.0" - "@aws-sdk/region-config-resolver" "3.451.0" - "@aws-sdk/types" "3.451.0" - "@aws-sdk/util-endpoints" "3.451.0" - "@aws-sdk/util-user-agent-browser" "3.451.0" - "@aws-sdk/util-user-agent-node" "3.451.0" - "@smithy/config-resolver" "^2.0.18" - "@smithy/fetch-http-handler" "^2.2.6" - "@smithy/hash-node" "^2.0.15" - "@smithy/invalid-dependency" "^2.0.13" - "@smithy/middleware-content-length" "^2.0.15" - "@smithy/middleware-endpoint" "^2.2.0" - "@smithy/middleware-retry" "^2.0.20" - "@smithy/middleware-serde" "^2.0.13" - "@smithy/middleware-stack" "^2.0.7" - "@smithy/node-config-provider" "^2.1.5" - "@smithy/node-http-handler" "^2.1.9" - "@smithy/protocol-http" "^3.0.9" - "@smithy/smithy-client" "^2.1.15" - "@smithy/types" "^2.5.0" - "@smithy/url-parser" "^2.0.13" - "@smithy/util-base64" "^2.0.1" - "@smithy/util-body-length-browser" "^2.0.0" - "@smithy/util-body-length-node" "^2.1.0" - "@smithy/util-defaults-mode-browser" "^2.0.19" - "@smithy/util-defaults-mode-node" "^2.0.25" - "@smithy/util-endpoints" "^1.0.4" - "@smithy/util-retry" "^2.0.6" - "@smithy/util-utf8" "^2.0.2" - tslib "^2.5.0" - -"@aws-sdk/client-sso@3.476.0": - version "3.476.0" - resolved "https://registry.npmjs.org/@aws-sdk/client-sso/-/client-sso-3.476.0.tgz#48e9e0808438b8cfb26ef170b834dc17a7dda0c2" - integrity sha512-vcGGumQplAtzOhg3MbYmktl69v7BXGtzfpiw4w7i0KjBy/QBy0vt6xQpS7H/24s17/kCw+UXlZR6sFQ/Vj73ag== - dependencies: - "@aws-crypto/sha256-browser" "3.0.0" - "@aws-crypto/sha256-js" "3.0.0" - "@aws-sdk/core" "3.476.0" - "@aws-sdk/middleware-host-header" "3.468.0" - "@aws-sdk/middleware-logger" "3.468.0" - "@aws-sdk/middleware-recursion-detection" "3.468.0" - "@aws-sdk/middleware-user-agent" "3.470.0" - "@aws-sdk/region-config-resolver" "3.470.0" - "@aws-sdk/types" "3.468.0" - "@aws-sdk/util-endpoints" "3.470.0" - "@aws-sdk/util-user-agent-browser" "3.468.0" - "@aws-sdk/util-user-agent-node" "3.470.0" - "@smithy/config-resolver" "^2.0.21" - "@smithy/fetch-http-handler" "^2.3.1" - "@smithy/hash-node" "^2.0.17" - "@smithy/invalid-dependency" "^2.0.15" - "@smithy/middleware-content-length" "^2.0.17" - "@smithy/middleware-endpoint" "^2.2.3" - "@smithy/middleware-retry" "^2.0.24" - "@smithy/middleware-serde" "^2.0.15" - "@smithy/middleware-stack" "^2.0.9" - "@smithy/node-config-provider" "^2.1.8" - "@smithy/node-http-handler" "^2.2.1" - "@smithy/protocol-http" "^3.0.11" - "@smithy/smithy-client" "^2.1.18" - "@smithy/types" "^2.7.0" - "@smithy/url-parser" "^2.0.15" - "@smithy/util-base64" "^2.0.1" - "@smithy/util-body-length-browser" "^2.0.1" - "@smithy/util-body-length-node" "^2.1.0" - "@smithy/util-defaults-mode-browser" "^2.0.22" - "@smithy/util-defaults-mode-node" "^2.0.29" - "@smithy/util-endpoints" "^1.0.7" - "@smithy/util-retry" "^2.0.8" - "@smithy/util-utf8" "^2.0.2" - tslib "^2.5.0" - -"@aws-sdk/client-sso@3.637.0": - version "3.637.0" - resolved "https://registry.npmjs.org/@aws-sdk/client-sso/-/client-sso-3.637.0.tgz#ae152759a5e1e576e1df6b8f4edaf59796e1758e" - integrity sha512-+KjLvgX5yJYROWo3TQuwBJlHCY0zz9PsLuEolmXQn0BVK1L/m9GteZHtd+rEdAoDGBpE0Xqjy1oz5+SmtsaRUw== +"@aws-sdk/client-sts@3.632.0": + version "3.632.0" + resolved "https://registry.npmjs.org/@aws-sdk/client-sts/-/client-sts-3.632.0.tgz#dc0e9d9958752f620adbe9783fb8ba2f2f915463" + integrity sha512-Ss5cBH09icpTvT+jtGGuQlRdwtO7RyE9BF4ZV/CEPATdd9whtJt4Qxdya8BUnkWR7h5HHTrQHqai3YVYjku41A== dependencies: "@aws-crypto/sha256-browser" "5.2.0" "@aws-crypto/sha256-js" "5.2.0" - "@aws-sdk/core" "3.635.0" + "@aws-sdk/client-sso-oidc" "3.632.0" + "@aws-sdk/core" "3.629.0" + "@aws-sdk/credential-provider-node" "3.632.0" "@aws-sdk/middleware-host-header" "3.620.0" "@aws-sdk/middleware-logger" "3.609.0" "@aws-sdk/middleware-recursion-detection" "3.620.0" - "@aws-sdk/middleware-user-agent" "3.637.0" + "@aws-sdk/middleware-user-agent" "3.632.0" "@aws-sdk/region-config-resolver" "3.614.0" "@aws-sdk/types" "3.609.0" - "@aws-sdk/util-endpoints" "3.637.0" + "@aws-sdk/util-endpoints" "3.632.0" "@aws-sdk/util-user-agent-browser" "3.609.0" "@aws-sdk/util-user-agent-node" "3.614.0" "@smithy/config-resolver" "^3.0.5" - "@smithy/core" "^2.4.0" + "@smithy/core" "^2.3.2" "@smithy/fetch-http-handler" "^3.2.4" "@smithy/hash-node" "^3.0.3" "@smithy/invalid-dependency" "^3.0.3" "@smithy/middleware-content-length" "^3.0.5" "@smithy/middleware-endpoint" "^3.1.0" - "@smithy/middleware-retry" "^3.0.15" + "@smithy/middleware-retry" "^3.0.14" "@smithy/middleware-serde" "^3.0.3" "@smithy/middleware-stack" "^3.0.3" "@smithy/node-config-provider" "^3.1.4" "@smithy/node-http-handler" "^3.1.4" "@smithy/protocol-http" "^4.1.0" - "@smithy/smithy-client" "^3.2.0" + "@smithy/smithy-client" "^3.1.12" "@smithy/types" "^3.3.0" "@smithy/url-parser" "^3.0.3" "@smithy/util-base64" "^3.0.0" "@smithy/util-body-length-browser" "^3.0.0" "@smithy/util-body-length-node" "^3.0.0" - "@smithy/util-defaults-mode-browser" "^3.0.15" - "@smithy/util-defaults-mode-node" "^3.0.15" + "@smithy/util-defaults-mode-browser" "^3.0.14" + "@smithy/util-defaults-mode-node" "^3.0.14" "@smithy/util-endpoints" "^2.0.5" "@smithy/util-middleware" "^3.0.3" "@smithy/util-retry" "^3.0.3" "@smithy/util-utf8" "^3.0.0" tslib "^2.6.2" -"@aws-sdk/client-sso@3.649.0": - version "3.649.0" - resolved "https://registry.npmjs.org/@aws-sdk/client-sso/-/client-sso-3.649.0.tgz#c8b01f9260dd07d64e4b4ad338132c67757422db" - integrity sha512-G6RZhG+yRdIlR069djAN/v4/Vd7CS8SDnUKkw32n7wJfcpoq0t+Lzcdh73kpIJ+/VslKYwMhbE5lCW+9+jDTdw== +"@aws-sdk/client-sts@3.662.0": + version "3.662.0" + resolved "https://registry.npmjs.org/@aws-sdk/client-sts/-/client-sts-3.662.0.tgz#8d35b7d25c813e3b2ba0d8efd42d9e61823e088f" + integrity sha512-RjiXvfW3a36ybHuzYuZ6ZgddYiENiXLDGC3tlZMsKWuoVQNeoh2grx1wxUA6e4ajAIqJLXs5dAYTSXzGaAqHTA== dependencies: "@aws-crypto/sha256-browser" "5.2.0" "@aws-crypto/sha256-js" "5.2.0" - "@aws-sdk/core" "3.649.0" - "@aws-sdk/middleware-host-header" "3.649.0" - "@aws-sdk/middleware-logger" "3.649.0" - "@aws-sdk/middleware-recursion-detection" "3.649.0" - "@aws-sdk/middleware-user-agent" "3.649.0" - "@aws-sdk/region-config-resolver" "3.649.0" - "@aws-sdk/types" "3.649.0" - "@aws-sdk/util-endpoints" "3.649.0" - "@aws-sdk/util-user-agent-browser" "3.649.0" - "@aws-sdk/util-user-agent-node" "3.649.0" - "@smithy/config-resolver" "^3.0.6" - "@smithy/core" "^2.4.1" - "@smithy/fetch-http-handler" "^3.2.5" - "@smithy/hash-node" "^3.0.4" - "@smithy/invalid-dependency" "^3.0.4" - "@smithy/middleware-content-length" "^3.0.6" - "@smithy/middleware-endpoint" "^3.1.1" - "@smithy/middleware-retry" "^3.0.16" - "@smithy/middleware-serde" "^3.0.4" - "@smithy/middleware-stack" "^3.0.4" - "@smithy/node-config-provider" "^3.1.5" - "@smithy/node-http-handler" "^3.2.0" - "@smithy/protocol-http" "^4.1.1" - "@smithy/smithy-client" "^3.3.0" - "@smithy/types" "^3.4.0" - "@smithy/url-parser" "^3.0.4" + "@aws-sdk/client-sso-oidc" "3.662.0" + "@aws-sdk/core" "3.662.0" + "@aws-sdk/credential-provider-node" "3.662.0" + "@aws-sdk/middleware-host-header" "3.662.0" + "@aws-sdk/middleware-logger" "3.662.0" + "@aws-sdk/middleware-recursion-detection" "3.662.0" + "@aws-sdk/middleware-user-agent" "3.662.0" + "@aws-sdk/region-config-resolver" "3.662.0" + "@aws-sdk/types" "3.662.0" + "@aws-sdk/util-endpoints" "3.662.0" + "@aws-sdk/util-user-agent-browser" "3.662.0" + "@aws-sdk/util-user-agent-node" "3.662.0" + "@smithy/config-resolver" "^3.0.9" + "@smithy/core" "^2.4.7" + "@smithy/fetch-http-handler" "^3.2.9" + "@smithy/hash-node" "^3.0.7" + "@smithy/invalid-dependency" "^3.0.7" + "@smithy/middleware-content-length" "^3.0.9" + "@smithy/middleware-endpoint" "^3.1.4" + "@smithy/middleware-retry" "^3.0.22" + "@smithy/middleware-serde" "^3.0.7" + "@smithy/middleware-stack" "^3.0.7" + "@smithy/node-config-provider" "^3.1.8" + "@smithy/node-http-handler" "^3.2.4" + "@smithy/protocol-http" "^4.1.4" + "@smithy/smithy-client" "^3.3.6" + "@smithy/types" "^3.5.0" + "@smithy/url-parser" "^3.0.7" "@smithy/util-base64" "^3.0.0" "@smithy/util-body-length-browser" "^3.0.0" "@smithy/util-body-length-node" "^3.0.0" - "@smithy/util-defaults-mode-browser" "^3.0.16" - "@smithy/util-defaults-mode-node" "^3.0.16" - "@smithy/util-endpoints" "^2.1.0" - "@smithy/util-middleware" "^3.0.4" - "@smithy/util-retry" "^3.0.4" + "@smithy/util-defaults-mode-browser" "^3.0.22" + "@smithy/util-defaults-mode-node" "^3.0.22" + "@smithy/util-endpoints" "^2.1.3" + "@smithy/util-middleware" "^3.0.7" + "@smithy/util-retry" "^3.0.7" "@smithy/util-utf8" "^3.0.0" tslib "^2.6.2" -"@aws-sdk/client-sts@3.421.0": - version "3.421.0" - resolved "https://registry.npmjs.org/@aws-sdk/client-sts/-/client-sts-3.421.0.tgz#1c7b3265be3acb609159533c24421da4e9466570" - integrity sha512-/92NOZMcdkBcvGrINk5B/l+6DGcVzYE4Ab3ME4vcY9y//u2gd0yNn5YYRSzzjVBLvhDP3u6CbTfLX2Bm4qihPw== - dependencies: - "@aws-crypto/sha256-browser" "3.0.0" - "@aws-crypto/sha256-js" "3.0.0" - "@aws-sdk/credential-provider-node" "3.421.0" - "@aws-sdk/middleware-host-header" "3.418.0" - "@aws-sdk/middleware-logger" "3.418.0" - "@aws-sdk/middleware-recursion-detection" "3.418.0" - "@aws-sdk/middleware-sdk-sts" "3.418.0" - "@aws-sdk/middleware-signing" "3.418.0" - "@aws-sdk/middleware-user-agent" "3.418.0" - "@aws-sdk/region-config-resolver" "3.418.0" - "@aws-sdk/types" "3.418.0" - "@aws-sdk/util-endpoints" "3.418.0" - "@aws-sdk/util-user-agent-browser" "3.418.0" - "@aws-sdk/util-user-agent-node" "3.418.0" - "@smithy/config-resolver" "^2.0.10" - "@smithy/fetch-http-handler" "^2.1.5" - "@smithy/hash-node" "^2.0.9" - "@smithy/invalid-dependency" "^2.0.9" - "@smithy/middleware-content-length" "^2.0.11" - "@smithy/middleware-endpoint" "^2.0.9" - "@smithy/middleware-retry" "^2.0.12" - "@smithy/middleware-serde" "^2.0.9" - "@smithy/middleware-stack" "^2.0.2" - "@smithy/node-config-provider" "^2.0.12" - "@smithy/node-http-handler" "^2.1.5" - "@smithy/protocol-http" "^3.0.5" - "@smithy/smithy-client" "^2.1.6" - "@smithy/types" "^2.3.3" - "@smithy/url-parser" "^2.0.9" - "@smithy/util-base64" "^2.0.0" - "@smithy/util-body-length-browser" "^2.0.0" - "@smithy/util-body-length-node" "^2.1.0" - "@smithy/util-defaults-mode-browser" "^2.0.10" - "@smithy/util-defaults-mode-node" "^2.0.12" - "@smithy/util-retry" "^2.0.2" - "@smithy/util-utf8" "^2.0.0" - fast-xml-parser "4.2.5" - tslib "^2.5.0" - -"@aws-sdk/client-sts@3.451.0": - version "3.451.0" - resolved "https://registry.npmjs.org/@aws-sdk/client-sts/-/client-sts-3.451.0.tgz#66423b09621c344b1d41724117e43c7247e4c593" - integrity sha512-48NcIRxWBdP1fom6RSjwn2R2u7SE7eeV3p+c4s7ukEOfrHhBxJfn3EpqBVQMGzdiU55qFImy+Fe81iA2lXq3Jw== - dependencies: - "@aws-crypto/sha256-browser" "3.0.0" - "@aws-crypto/sha256-js" "3.0.0" - "@aws-sdk/core" "3.451.0" - "@aws-sdk/credential-provider-node" "3.451.0" - "@aws-sdk/middleware-host-header" "3.451.0" - "@aws-sdk/middleware-logger" "3.451.0" - "@aws-sdk/middleware-recursion-detection" "3.451.0" - "@aws-sdk/middleware-sdk-sts" "3.451.0" - "@aws-sdk/middleware-signing" "3.451.0" - "@aws-sdk/middleware-user-agent" "3.451.0" - "@aws-sdk/region-config-resolver" "3.451.0" - "@aws-sdk/types" "3.451.0" - "@aws-sdk/util-endpoints" "3.451.0" - "@aws-sdk/util-user-agent-browser" "3.451.0" - "@aws-sdk/util-user-agent-node" "3.451.0" - "@smithy/config-resolver" "^2.0.18" - "@smithy/fetch-http-handler" "^2.2.6" - "@smithy/hash-node" "^2.0.15" - "@smithy/invalid-dependency" "^2.0.13" - "@smithy/middleware-content-length" "^2.0.15" - "@smithy/middleware-endpoint" "^2.2.0" - "@smithy/middleware-retry" "^2.0.20" - "@smithy/middleware-serde" "^2.0.13" - "@smithy/middleware-stack" "^2.0.7" - "@smithy/node-config-provider" "^2.1.5" - "@smithy/node-http-handler" "^2.1.9" - "@smithy/protocol-http" "^3.0.9" - "@smithy/smithy-client" "^2.1.15" - "@smithy/types" "^2.5.0" - "@smithy/url-parser" "^2.0.13" - "@smithy/util-base64" "^2.0.1" - "@smithy/util-body-length-browser" "^2.0.0" - "@smithy/util-body-length-node" "^2.1.0" - "@smithy/util-defaults-mode-browser" "^2.0.19" - "@smithy/util-defaults-mode-node" "^2.0.25" - "@smithy/util-endpoints" "^1.0.4" - "@smithy/util-retry" "^2.0.6" - "@smithy/util-utf8" "^2.0.2" - fast-xml-parser "4.2.5" - tslib "^2.5.0" - -"@aws-sdk/client-sts@3.476.0": - version "3.476.0" - resolved "https://registry.npmjs.org/@aws-sdk/client-sts/-/client-sts-3.476.0.tgz#731fe4dc412a8da651689953a91086b160cd0451" - integrity sha512-duMs4tTy3hNuSdV2YFzT6QNlE0PX2RzZqAfO4dTITiEf6QZW/N3UojSZwDRTKZzH+CFKL2gjVhkv7d4ZCy5QvQ== - dependencies: - "@aws-crypto/sha256-browser" "3.0.0" - "@aws-crypto/sha256-js" "3.0.0" - "@aws-sdk/core" "3.476.0" - "@aws-sdk/credential-provider-node" "3.476.0" - "@aws-sdk/middleware-host-header" "3.468.0" - "@aws-sdk/middleware-logger" "3.468.0" - "@aws-sdk/middleware-recursion-detection" "3.468.0" - "@aws-sdk/middleware-user-agent" "3.470.0" - "@aws-sdk/region-config-resolver" "3.470.0" - "@aws-sdk/types" "3.468.0" - "@aws-sdk/util-endpoints" "3.470.0" - "@aws-sdk/util-user-agent-browser" "3.468.0" - "@aws-sdk/util-user-agent-node" "3.470.0" - "@smithy/config-resolver" "^2.0.21" - "@smithy/core" "^1.1.0" - "@smithy/fetch-http-handler" "^2.3.1" - "@smithy/hash-node" "^2.0.17" - "@smithy/invalid-dependency" "^2.0.15" - "@smithy/middleware-content-length" "^2.0.17" - "@smithy/middleware-endpoint" "^2.2.3" - "@smithy/middleware-retry" "^2.0.24" - "@smithy/middleware-serde" "^2.0.15" - "@smithy/middleware-stack" "^2.0.9" - "@smithy/node-config-provider" "^2.1.8" - "@smithy/node-http-handler" "^2.2.1" - "@smithy/protocol-http" "^3.0.11" - "@smithy/smithy-client" "^2.1.18" - "@smithy/types" "^2.7.0" - "@smithy/url-parser" "^2.0.15" - "@smithy/util-base64" "^2.0.1" - "@smithy/util-body-length-browser" "^2.0.1" - "@smithy/util-body-length-node" "^2.1.0" - "@smithy/util-defaults-mode-browser" "^2.0.22" - "@smithy/util-defaults-mode-node" "^2.0.29" - "@smithy/util-endpoints" "^1.0.7" - "@smithy/util-middleware" "^2.0.8" - "@smithy/util-retry" "^2.0.8" - "@smithy/util-utf8" "^2.0.2" - fast-xml-parser "4.2.5" - tslib "^2.5.0" - -"@aws-sdk/client-sts@3.637.0": - version "3.637.0" - resolved "https://registry.npmjs.org/@aws-sdk/client-sts/-/client-sts-3.637.0.tgz#6dcde6640d8a5e60dd4a2df8557284a0226d182c" - integrity sha512-xUi7x4qDubtA8QREtlblPuAcn91GS/09YVEY/RwU7xCY0aqGuFwgszAANlha4OUIqva8oVj2WO4gJuG+iaSnhw== +"@aws-sdk/client-synthetics@3.632.0": + version "3.632.0" + resolved "https://registry.npmjs.org/@aws-sdk/client-synthetics/-/client-synthetics-3.632.0.tgz#a3abdd36e431952d6c1a26b2cdbe0c94d38277fd" + integrity sha512-Ce1CXIDuoa8x6EH3tmrSUtzGzyJaNF5mTb9OA1rnaBYBOS3ObIROSB/JIe+wvod7B92s4PTZ2wvCur3DzwQSaw== dependencies: "@aws-crypto/sha256-browser" "5.2.0" "@aws-crypto/sha256-js" "5.2.0" - "@aws-sdk/client-sso-oidc" "3.637.0" - "@aws-sdk/core" "3.635.0" - "@aws-sdk/credential-provider-node" "3.637.0" + "@aws-sdk/client-sso-oidc" "3.632.0" + "@aws-sdk/client-sts" "3.632.0" + "@aws-sdk/core" "3.629.0" + "@aws-sdk/credential-provider-node" "3.632.0" "@aws-sdk/middleware-host-header" "3.620.0" "@aws-sdk/middleware-logger" "3.609.0" "@aws-sdk/middleware-recursion-detection" "3.620.0" - "@aws-sdk/middleware-user-agent" "3.637.0" + "@aws-sdk/middleware-user-agent" "3.632.0" "@aws-sdk/region-config-resolver" "3.614.0" "@aws-sdk/types" "3.609.0" - "@aws-sdk/util-endpoints" "3.637.0" + "@aws-sdk/util-endpoints" "3.632.0" "@aws-sdk/util-user-agent-browser" "3.609.0" "@aws-sdk/util-user-agent-node" "3.614.0" "@smithy/config-resolver" "^3.0.5" - "@smithy/core" "^2.4.0" + "@smithy/core" "^2.3.2" "@smithy/fetch-http-handler" "^3.2.4" "@smithy/hash-node" "^3.0.3" "@smithy/invalid-dependency" "^3.0.3" "@smithy/middleware-content-length" "^3.0.5" "@smithy/middleware-endpoint" "^3.1.0" - "@smithy/middleware-retry" "^3.0.15" + "@smithy/middleware-retry" "^3.0.14" "@smithy/middleware-serde" "^3.0.3" "@smithy/middleware-stack" "^3.0.3" "@smithy/node-config-provider" "^3.1.4" "@smithy/node-http-handler" "^3.1.4" "@smithy/protocol-http" "^4.1.0" - "@smithy/smithy-client" "^3.2.0" + "@smithy/smithy-client" "^3.1.12" "@smithy/types" "^3.3.0" "@smithy/url-parser" "^3.0.3" "@smithy/util-base64" "^3.0.0" "@smithy/util-body-length-browser" "^3.0.0" "@smithy/util-body-length-node" "^3.0.0" - "@smithy/util-defaults-mode-browser" "^3.0.15" - "@smithy/util-defaults-mode-node" "^3.0.15" + "@smithy/util-defaults-mode-browser" "^3.0.14" + "@smithy/util-defaults-mode-node" "^3.0.14" "@smithy/util-endpoints" "^2.0.5" "@smithy/util-middleware" "^3.0.3" "@smithy/util-retry" "^3.0.3" "@smithy/util-utf8" "^3.0.0" tslib "^2.6.2" -"@aws-sdk/client-sts@3.649.0": - version "3.649.0" - resolved "https://registry.npmjs.org/@aws-sdk/client-sts/-/client-sts-3.649.0.tgz#6b12a5070badb8c4e742607fb05901ff49d379ff" - integrity sha512-aKrLTPpA+Ew4JswWBGtoYT+LiA+uewKyCsYXwJtdjj20TY4qX9/fjJyEt39ETjMGE55UmQcVFUZWL2m9f/aiAg== +"@aws-sdk/core@3.629.0": + version "3.629.0" + resolved "https://registry.npmjs.org/@aws-sdk/core/-/core-3.629.0.tgz#1ed02c657edcd22ffdce9b3b5bdbd2a36fe899aa" + integrity sha512-+/ShPU/tyIBM3oY1cnjgNA/tFyHtlWq+wXF9xEKRv19NOpYbWQ+xzNwVjGq8vR07cCRqy/sDQLWPhxjtuV/FiQ== dependencies: - "@aws-crypto/sha256-browser" "5.2.0" - "@aws-crypto/sha256-js" "5.2.0" - "@aws-sdk/client-sso-oidc" "3.649.0" - "@aws-sdk/core" "3.649.0" - "@aws-sdk/credential-provider-node" "3.649.0" - "@aws-sdk/middleware-host-header" "3.649.0" - "@aws-sdk/middleware-logger" "3.649.0" - "@aws-sdk/middleware-recursion-detection" "3.649.0" - "@aws-sdk/middleware-user-agent" "3.649.0" - "@aws-sdk/region-config-resolver" "3.649.0" - "@aws-sdk/types" "3.649.0" - "@aws-sdk/util-endpoints" "3.649.0" - "@aws-sdk/util-user-agent-browser" "3.649.0" - "@aws-sdk/util-user-agent-node" "3.649.0" - "@smithy/config-resolver" "^3.0.6" - "@smithy/core" "^2.4.1" - "@smithy/fetch-http-handler" "^3.2.5" - "@smithy/hash-node" "^3.0.4" - "@smithy/invalid-dependency" "^3.0.4" - "@smithy/middleware-content-length" "^3.0.6" - "@smithy/middleware-endpoint" "^3.1.1" - "@smithy/middleware-retry" "^3.0.16" - "@smithy/middleware-serde" "^3.0.4" - "@smithy/middleware-stack" "^3.0.4" - "@smithy/node-config-provider" "^3.1.5" - "@smithy/node-http-handler" "^3.2.0" - "@smithy/protocol-http" "^4.1.1" - "@smithy/smithy-client" "^3.3.0" - "@smithy/types" "^3.4.0" - "@smithy/url-parser" "^3.0.4" - "@smithy/util-base64" "^3.0.0" - "@smithy/util-body-length-browser" "^3.0.0" - "@smithy/util-body-length-node" "^3.0.0" - "@smithy/util-defaults-mode-browser" "^3.0.16" - "@smithy/util-defaults-mode-node" "^3.0.16" - "@smithy/util-endpoints" "^2.1.0" - "@smithy/util-middleware" "^3.0.4" - "@smithy/util-retry" "^3.0.4" - "@smithy/util-utf8" "^3.0.0" - tslib "^2.6.2" - -"@aws-sdk/client-synthetics@3.421.0": - version "3.421.0" - resolved "https://registry.npmjs.org/@aws-sdk/client-synthetics/-/client-synthetics-3.421.0.tgz#fbc848916f51255d883c1b3b5240f8975842daba" - integrity sha512-HAADUQPSXWDoDdI0XaCwavaistjdQ9wD8TQD+AHyC7fbgu+lv6MF/m97B8CBZJUtd8JCMDPrCjnyzKvT8oOZZg== - dependencies: - "@aws-crypto/sha256-browser" "3.0.0" - "@aws-crypto/sha256-js" "3.0.0" - "@aws-sdk/client-sts" "3.421.0" - "@aws-sdk/credential-provider-node" "3.421.0" - "@aws-sdk/middleware-host-header" "3.418.0" - "@aws-sdk/middleware-logger" "3.418.0" - "@aws-sdk/middleware-recursion-detection" "3.418.0" - "@aws-sdk/middleware-signing" "3.418.0" - "@aws-sdk/middleware-user-agent" "3.418.0" - "@aws-sdk/region-config-resolver" "3.418.0" - "@aws-sdk/types" "3.418.0" - "@aws-sdk/util-endpoints" "3.418.0" - "@aws-sdk/util-user-agent-browser" "3.418.0" - "@aws-sdk/util-user-agent-node" "3.418.0" - "@smithy/config-resolver" "^2.0.10" - "@smithy/fetch-http-handler" "^2.1.5" - "@smithy/hash-node" "^2.0.9" - "@smithy/invalid-dependency" "^2.0.9" - "@smithy/middleware-content-length" "^2.0.11" - "@smithy/middleware-endpoint" "^2.0.9" - "@smithy/middleware-retry" "^2.0.12" - "@smithy/middleware-serde" "^2.0.9" - "@smithy/middleware-stack" "^2.0.2" - "@smithy/node-config-provider" "^2.0.12" - "@smithy/node-http-handler" "^2.1.5" - "@smithy/protocol-http" "^3.0.5" - "@smithy/smithy-client" "^2.1.6" - "@smithy/types" "^2.3.3" - "@smithy/url-parser" "^2.0.9" - "@smithy/util-base64" "^2.0.0" - "@smithy/util-body-length-browser" "^2.0.0" - "@smithy/util-body-length-node" "^2.1.0" - "@smithy/util-defaults-mode-browser" "^2.0.10" - "@smithy/util-defaults-mode-node" "^2.0.12" - "@smithy/util-retry" "^2.0.2" - "@smithy/util-utf8" "^2.0.0" - tslib "^2.5.0" - -"@aws-sdk/core@3.451.0": - version "3.451.0" - resolved "https://registry.npmjs.org/@aws-sdk/core/-/core-3.451.0.tgz#ecd30da40d8e02050a772920485f450ea2a1b804" - integrity sha512-SamWW2zHEf1ZKe3j1w0Piauryl8BQIlej0TBS18A4ACzhjhWXhCs13bO1S88LvPR5mBFXok3XOT6zPOnKDFktw== - dependencies: - "@smithy/smithy-client" "^2.1.15" - tslib "^2.5.0" - -"@aws-sdk/core@3.476.0": - version "3.476.0" - resolved "https://registry.npmjs.org/@aws-sdk/core/-/core-3.476.0.tgz#1f0eead7ef891391c9b92e5a2065a6b5009bedd4" - integrity sha512-G9CLcxxrSR1FWI1o+Hf/XwIERiQFRhuYxydU7C/QnRP9g5FdE0dxWcIg1U/RJnmkiWTrIG3gRWBXvIw5DCecPw== - dependencies: - "@smithy/core" "^1.1.0" - "@smithy/protocol-http" "^3.0.11" - "@smithy/signature-v4" "^2.0.0" - "@smithy/smithy-client" "^2.1.18" - "@smithy/types" "^2.7.0" - tslib "^2.5.0" - -"@aws-sdk/core@3.635.0": - version "3.635.0" - resolved "https://registry.npmjs.org/@aws-sdk/core/-/core-3.635.0.tgz#74b7d0d7fa3aa39f87ea5cf4e6c97d4d84f4ef14" - integrity sha512-i1x/E/sgA+liUE1XJ7rj1dhyXpAKO1UKFUcTTHXok2ARjWTvszHnSXMOsB77aPbmn0fUp1JTx2kHUAZ1LVt5Bg== - dependencies: - "@smithy/core" "^2.4.0" + "@smithy/core" "^2.3.2" "@smithy/node-config-provider" "^3.1.4" "@smithy/property-provider" "^3.1.3" "@smithy/protocol-http" "^4.1.0" "@smithy/signature-v4" "^4.1.0" - "@smithy/smithy-client" "^3.2.0" + "@smithy/smithy-client" "^3.1.12" "@smithy/types" "^3.3.0" "@smithy/util-middleware" "^3.0.3" fast-xml-parser "4.4.1" tslib "^2.6.2" -"@aws-sdk/core@3.649.0": - version "3.649.0" - resolved "https://registry.npmjs.org/@aws-sdk/core/-/core-3.649.0.tgz#8c2a375e3c2e937e2f699f38cbbe031882ce99de" - integrity sha512-dheG/X2y25RHE7K+TlS32kcy7TgDg1OpWV44BQRoE0OBPAWmFR1D1qjjTZ7WWrdqRPKzcnDj1qED8ncyncOX8g== +"@aws-sdk/core@3.662.0": + version "3.662.0" + resolved "https://registry.npmjs.org/@aws-sdk/core/-/core-3.662.0.tgz#93764660c9fabbc10e77ddcde283f088e22bebc3" + integrity sha512-w64Fa4dsgM8vN7Z+QPR3n+aAl5GXThQRH8deT/iF1rLrzfq7V8xxACJ/CLVaxrZMZUPUUgG7DUAo95nXFWmGjA== dependencies: - "@smithy/core" "^2.4.1" - "@smithy/node-config-provider" "^3.1.5" - "@smithy/property-provider" "^3.1.4" - "@smithy/protocol-http" "^4.1.1" - "@smithy/signature-v4" "^4.1.1" - "@smithy/smithy-client" "^3.3.0" - "@smithy/types" "^3.4.0" - "@smithy/util-middleware" "^3.0.4" + "@smithy/core" "^2.4.7" + "@smithy/node-config-provider" "^3.1.8" + "@smithy/property-provider" "^3.1.7" + "@smithy/protocol-http" "^4.1.4" + "@smithy/signature-v4" "^4.2.0" + "@smithy/smithy-client" "^3.3.6" + "@smithy/types" "^3.5.0" + "@smithy/util-middleware" "^3.0.7" fast-xml-parser "4.4.1" tslib "^2.6.2" -"@aws-sdk/credential-provider-cognito-identity@3.421.0": - version "3.421.0" - resolved "https://registry.npmjs.org/@aws-sdk/credential-provider-cognito-identity/-/credential-provider-cognito-identity-3.421.0.tgz#d06bf11df56896feb048e057b02e98b1870bd388" - integrity sha512-x+C7nonKomdBAljTAPtqhU6Xzzaqy08PV1vO5Cp/YYMye+uOGQ2+1x7cfaY5uIHZbbNRUhCmUBKGnwsUyTB1cQ== - dependencies: - "@aws-sdk/client-cognito-identity" "3.421.0" - "@aws-sdk/types" "3.418.0" - "@smithy/property-provider" "^2.0.0" - "@smithy/types" "^2.3.3" - tslib "^2.5.0" - -"@aws-sdk/credential-provider-cognito-identity@3.637.0": - version "3.637.0" - resolved "https://registry.npmjs.org/@aws-sdk/credential-provider-cognito-identity/-/credential-provider-cognito-identity-3.637.0.tgz#d21f068d8fdf94f065502192a92847c2d7d83d96" - integrity sha512-9qK1mF+EThtv3tsL1C/wb9MpWctJSkzjrLTFj+0Rtk8VYm6DlGepo/I6a2x3SeDmdBfHAFSrKFU39GqWDp1mwQ== +"@aws-sdk/credential-provider-cognito-identity@3.632.0": + version "3.632.0" + resolved "https://registry.npmjs.org/@aws-sdk/credential-provider-cognito-identity/-/credential-provider-cognito-identity-3.632.0.tgz#f2db006faf4f81aed366b793845d036ac3054e09" + integrity sha512-fr+xCIqMYsUD67vwE/IpboIqHiEYMQMrpPjnvpbbvyjTKspFh0GS7Qn1LVFCd5oNeu1rzAdJei1On2HBOwIiZQ== dependencies: - "@aws-sdk/client-cognito-identity" "3.637.0" + "@aws-sdk/client-cognito-identity" "3.632.0" "@aws-sdk/types" "3.609.0" "@smithy/property-provider" "^3.1.3" "@smithy/types" "^3.3.0" tslib "^2.6.2" -"@aws-sdk/credential-provider-env@3.418.0": - version "3.418.0" - resolved "https://registry.npmjs.org/@aws-sdk/credential-provider-env/-/credential-provider-env-3.418.0.tgz#7b14169350d9c14c9f656da06edf46f40a224ed2" - integrity sha512-e74sS+x63EZUBO+HaI8zor886YdtmULzwKdctsZp5/37Xho1CVUNtEC+fYa69nigBD9afoiH33I4JggaHgrekQ== - dependencies: - "@aws-sdk/types" "3.418.0" - "@smithy/property-provider" "^2.0.0" - "@smithy/types" "^2.3.3" - tslib "^2.5.0" - -"@aws-sdk/credential-provider-env@3.451.0": - version "3.451.0" - resolved "https://registry.npmjs.org/@aws-sdk/credential-provider-env/-/credential-provider-env-3.451.0.tgz#7b7429bd2e3fdebf914a88269274190781aeeab2" - integrity sha512-9dAav7DcRgaF7xCJEQR5ER9ErXxnu/tdnVJ+UPmb1NPeIZdESv1A3lxFDEq1Fs8c4/lzAj9BpshGyJVIZwZDKg== - dependencies: - "@aws-sdk/types" "3.451.0" - "@smithy/property-provider" "^2.0.0" - "@smithy/types" "^2.5.0" - tslib "^2.5.0" - -"@aws-sdk/credential-provider-env@3.468.0": - version "3.468.0" - resolved "https://registry.npmjs.org/@aws-sdk/credential-provider-env/-/credential-provider-env-3.468.0.tgz#4196d717d3f5485af863bd1fd84374ea3dcd6210" - integrity sha512-k/1WHd3KZn0EQYjadooj53FC0z24/e4dUZhbSKTULgmxyO62pwh9v3Brvw4WRa/8o2wTffU/jo54tf4vGuP/ZA== - dependencies: - "@aws-sdk/types" "3.468.0" - "@smithy/property-provider" "^2.0.0" - "@smithy/types" "^2.7.0" - tslib "^2.5.0" - "@aws-sdk/credential-provider-env@3.620.1": version "3.620.1" resolved "https://registry.npmjs.org/@aws-sdk/credential-provider-env/-/credential-provider-env-3.620.1.tgz#d4692c49a65ebc11dae3f7f8b053fee9268a953c" @@ -2798,103 +1928,55 @@ "@smithy/types" "^3.3.0" tslib "^2.6.2" -"@aws-sdk/credential-provider-env@3.649.0": - version "3.649.0" - resolved "https://registry.npmjs.org/@aws-sdk/credential-provider-env/-/credential-provider-env-3.649.0.tgz#8832e8a3b396c54c3663c2730e41746969fb7e49" - integrity sha512-tViwzM1dauksA3fdRjsg0T8mcHklDa8EfveyiQKK6pUJopkqV6FQx+X5QNda0t/LrdEVlFZvwHNdXqOEfc83TA== +"@aws-sdk/credential-provider-env@3.662.0": + version "3.662.0" + resolved "https://registry.npmjs.org/@aws-sdk/credential-provider-env/-/credential-provider-env-3.662.0.tgz#fe58b29abefd0fa968f79c7e7d15381009945a75" + integrity sha512-Dgwb0c/FH4xT5QZZFdLTFmCkdG3woXIAgLx5HCoH9Ty5G7T8keHOU9Jm4Vpe2ZJXL7JJHlLakGS65+bgXTuLSQ== dependencies: - "@aws-sdk/types" "3.649.0" - "@smithy/property-provider" "^3.1.4" - "@smithy/types" "^3.4.0" + "@aws-sdk/types" "3.662.0" + "@smithy/property-provider" "^3.1.7" + "@smithy/types" "^3.5.0" tslib "^2.6.2" -"@aws-sdk/credential-provider-http@3.635.0": - version "3.635.0" - resolved "https://registry.npmjs.org/@aws-sdk/credential-provider-http/-/credential-provider-http-3.635.0.tgz#083439af1336693049958e4b61695e4712b30fd4" - integrity sha512-iJyRgEjOCQlBMXqtwPLIKYc7Bsc6nqjrZybdMDenPDa+kmLg7xh8LxHsu9088e+2/wtLicE34FsJJIfzu3L82g== +"@aws-sdk/credential-provider-http@3.622.0": + version "3.622.0" + resolved "https://registry.npmjs.org/@aws-sdk/credential-provider-http/-/credential-provider-http-3.622.0.tgz#db481fdef859849d07dd5870894f45df2debab3d" + integrity sha512-VUHbr24Oll1RK3WR8XLUugLpgK9ZuxEm/NVeVqyFts1Ck9gsKpRg1x4eH7L7tW3SJ4TDEQNMbD7/7J+eoL2svg== dependencies: "@aws-sdk/types" "3.609.0" "@smithy/fetch-http-handler" "^3.2.4" "@smithy/node-http-handler" "^3.1.4" "@smithy/property-provider" "^3.1.3" "@smithy/protocol-http" "^4.1.0" - "@smithy/smithy-client" "^3.2.0" + "@smithy/smithy-client" "^3.1.12" "@smithy/types" "^3.3.0" "@smithy/util-stream" "^3.1.3" tslib "^2.6.2" -"@aws-sdk/credential-provider-http@3.649.0": - version "3.649.0" - resolved "https://registry.npmjs.org/@aws-sdk/credential-provider-http/-/credential-provider-http-3.649.0.tgz#5c7f8556ea79f23435b0b637a96acf7367df9469" - integrity sha512-ODAJ+AJJq6ozbns6ejGbicpsQ0dyMOpnGlg0J9J0jITQ05DKQZ581hdB8APDOZ9N8FstShP6dLZflSj8jb5fNA== +"@aws-sdk/credential-provider-http@3.662.0": + version "3.662.0" + resolved "https://registry.npmjs.org/@aws-sdk/credential-provider-http/-/credential-provider-http-3.662.0.tgz#02e3e97e28ec1bb99bdd91ddc9df5d48e1a31b42" + integrity sha512-Wnle/uJI4Ku9ABJHof9sio28VlaSbF3jVQKTSVCJftvbKELlFOlY5aXSjtu0wwcJqDS5r78N5KM7aARUJES+DA== dependencies: - "@aws-sdk/types" "3.649.0" - "@smithy/fetch-http-handler" "^3.2.5" - "@smithy/node-http-handler" "^3.2.0" - "@smithy/property-provider" "^3.1.4" - "@smithy/protocol-http" "^4.1.1" - "@smithy/smithy-client" "^3.3.0" - "@smithy/types" "^3.4.0" - "@smithy/util-stream" "^3.1.4" + "@aws-sdk/types" "3.662.0" + "@smithy/fetch-http-handler" "^3.2.9" + "@smithy/node-http-handler" "^3.2.4" + "@smithy/property-provider" "^3.1.7" + "@smithy/protocol-http" "^4.1.4" + "@smithy/smithy-client" "^3.3.6" + "@smithy/types" "^3.5.0" + "@smithy/util-stream" "^3.1.9" tslib "^2.6.2" -"@aws-sdk/credential-provider-ini@3.421.0": - version "3.421.0" - resolved "https://registry.npmjs.org/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.421.0.tgz#b58f8fd095c4389926d0e53ed2b775b184d03ec2" - integrity sha512-J5yH/gkpAk6FMeH5F9u5Nr6oG+97tj1kkn5q49g3XMbtWw7GiynadxdtoRBCeIg1C7o2LOQx4B1AnhNhIw1z/g== - dependencies: - "@aws-sdk/credential-provider-env" "3.418.0" - "@aws-sdk/credential-provider-process" "3.418.0" - "@aws-sdk/credential-provider-sso" "3.421.0" - "@aws-sdk/credential-provider-web-identity" "3.418.0" - "@aws-sdk/types" "3.418.0" - "@smithy/credential-provider-imds" "^2.0.0" - "@smithy/property-provider" "^2.0.0" - "@smithy/shared-ini-file-loader" "^2.0.6" - "@smithy/types" "^2.3.3" - tslib "^2.5.0" - -"@aws-sdk/credential-provider-ini@3.451.0": - version "3.451.0" - resolved "https://registry.npmjs.org/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.451.0.tgz#e38315611f70700ad9803316d7030e3472c9789c" - integrity sha512-TySt64Ci5/ZbqFw1F9Z0FIGvYx5JSC9e6gqDnizIYd8eMnn8wFRUscRrD7pIHKfrhvVKN5h0GdYovmMO/FMCBw== - dependencies: - "@aws-sdk/credential-provider-env" "3.451.0" - "@aws-sdk/credential-provider-process" "3.451.0" - "@aws-sdk/credential-provider-sso" "3.451.0" - "@aws-sdk/credential-provider-web-identity" "3.451.0" - "@aws-sdk/types" "3.451.0" - "@smithy/credential-provider-imds" "^2.0.0" - "@smithy/property-provider" "^2.0.0" - "@smithy/shared-ini-file-loader" "^2.0.6" - "@smithy/types" "^2.5.0" - tslib "^2.5.0" - -"@aws-sdk/credential-provider-ini@3.476.0": - version "3.476.0" - resolved "https://registry.npmjs.org/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.476.0.tgz#35c13299a849b0addb9e05157da3f3118f20f386" - integrity sha512-wAeXkCDW0qq/1suVTxGIW2RMQTBKwuhL1dwXt+Fmay0hQe4CKzmlTKFY9bN3CnTuwUCN8ozURimpeFFQ7rmKBw== - dependencies: - "@aws-sdk/credential-provider-env" "3.468.0" - "@aws-sdk/credential-provider-process" "3.468.0" - "@aws-sdk/credential-provider-sso" "3.476.0" - "@aws-sdk/credential-provider-web-identity" "3.468.0" - "@aws-sdk/types" "3.468.0" - "@smithy/credential-provider-imds" "^2.0.0" - "@smithy/property-provider" "^2.0.0" - "@smithy/shared-ini-file-loader" "^2.0.6" - "@smithy/types" "^2.7.0" - tslib "^2.5.0" - -"@aws-sdk/credential-provider-ini@3.637.0": - version "3.637.0" - resolved "https://registry.npmjs.org/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.637.0.tgz#dae0d8b05c8b9480da5a92beb4dd244985ecbd70" - integrity sha512-h+PFCWfZ0Q3Dx84SppET/TFpcQHmxFW8/oV9ArEvMilw4EBN+IlxgbL0CnHwjHW64szcmrM0mbebjEfHf4FXmw== +"@aws-sdk/credential-provider-ini@3.632.0": + version "3.632.0" + resolved "https://registry.npmjs.org/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.632.0.tgz#55c2aa6e59fb9f19cf4e9c1e4ebf70235de32930" + integrity sha512-m6epoW41xa1ajU5OiHcmQHoGVtrbXBaRBOUhlCLZmcaqMLYsboM4iD/WZP8aatKEON5tTnVXh/4StV8D/+wemw== dependencies: "@aws-sdk/credential-provider-env" "3.620.1" - "@aws-sdk/credential-provider-http" "3.635.0" + "@aws-sdk/credential-provider-http" "3.622.0" "@aws-sdk/credential-provider-process" "3.620.1" - "@aws-sdk/credential-provider-sso" "3.637.0" + "@aws-sdk/credential-provider-sso" "3.632.0" "@aws-sdk/credential-provider-web-identity" "3.621.0" "@aws-sdk/types" "3.609.0" "@smithy/credential-provider-imds" "^3.2.0" @@ -2903,84 +1985,33 @@ "@smithy/types" "^3.3.0" tslib "^2.6.2" -"@aws-sdk/credential-provider-ini@3.649.0": - version "3.649.0" - resolved "https://registry.npmjs.org/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.649.0.tgz#95a9737f4faea97d54bdfc909d94b805b1db4d59" - integrity sha512-2CcvYEi76gSXsCTb3izRfUpyDWmX+uGhjBckj3Lt6I2Jh+dxF9AEQAoMhvO7LM12Gx8v3w2JEC+GOZOVO4uq/A== - dependencies: - "@aws-sdk/credential-provider-env" "3.649.0" - "@aws-sdk/credential-provider-http" "3.649.0" - "@aws-sdk/credential-provider-process" "3.649.0" - "@aws-sdk/credential-provider-sso" "3.649.0" - "@aws-sdk/credential-provider-web-identity" "3.649.0" - "@aws-sdk/types" "3.649.0" - "@smithy/credential-provider-imds" "^3.2.1" - "@smithy/property-provider" "^3.1.4" - "@smithy/shared-ini-file-loader" "^3.1.5" - "@smithy/types" "^3.4.0" +"@aws-sdk/credential-provider-ini@3.662.0": + version "3.662.0" + resolved "https://registry.npmjs.org/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.662.0.tgz#505e37298cc6e2909020c25d555bf6b6d3f4cbdc" + integrity sha512-jk+A5B0NRYG4KrjJ8ef1+r9bFjhpwUm/A9grJmp3JOwcHKXvI2Gy9BXNqfqqVgrK0Gns+WyhJZy6rsRaC+v1oQ== + dependencies: + "@aws-sdk/credential-provider-env" "3.662.0" + "@aws-sdk/credential-provider-http" "3.662.0" + "@aws-sdk/credential-provider-process" "3.662.0" + "@aws-sdk/credential-provider-sso" "3.662.0" + "@aws-sdk/credential-provider-web-identity" "3.662.0" + "@aws-sdk/types" "3.662.0" + "@smithy/credential-provider-imds" "^3.2.4" + "@smithy/property-provider" "^3.1.7" + "@smithy/shared-ini-file-loader" "^3.1.8" + "@smithy/types" "^3.5.0" tslib "^2.6.2" -"@aws-sdk/credential-provider-node@3.421.0": - version "3.421.0" - resolved "https://registry.npmjs.org/@aws-sdk/credential-provider-node/-/credential-provider-node-3.421.0.tgz#3d1793ee47d0335532eb01a23cbb7d5320dd3056" - integrity sha512-g1dvdvfDj0u8B/gOsHR3o1arP4O4QE/dFm2IJBYr/eUdKISMUgbQULWtg4zdtAf0Oz4xN0723i7fpXAF1gTnRA== - dependencies: - "@aws-sdk/credential-provider-env" "3.418.0" - "@aws-sdk/credential-provider-ini" "3.421.0" - "@aws-sdk/credential-provider-process" "3.418.0" - "@aws-sdk/credential-provider-sso" "3.421.0" - "@aws-sdk/credential-provider-web-identity" "3.418.0" - "@aws-sdk/types" "3.418.0" - "@smithy/credential-provider-imds" "^2.0.0" - "@smithy/property-provider" "^2.0.0" - "@smithy/shared-ini-file-loader" "^2.0.6" - "@smithy/types" "^2.3.3" - tslib "^2.5.0" - -"@aws-sdk/credential-provider-node@3.451.0": - version "3.451.0" - resolved "https://registry.npmjs.org/@aws-sdk/credential-provider-node/-/credential-provider-node-3.451.0.tgz#72ccdef2199104379977dc06ea84c8d2a356d545" - integrity sha512-AEwM1WPyxUdKrKyUsKyFqqRFGU70e4qlDyrtBxJnSU9NRLZI8tfEZ67bN7fHSxBUBODgDXpMSlSvJiBLh5/3pw== - dependencies: - "@aws-sdk/credential-provider-env" "3.451.0" - "@aws-sdk/credential-provider-ini" "3.451.0" - "@aws-sdk/credential-provider-process" "3.451.0" - "@aws-sdk/credential-provider-sso" "3.451.0" - "@aws-sdk/credential-provider-web-identity" "3.451.0" - "@aws-sdk/types" "3.451.0" - "@smithy/credential-provider-imds" "^2.0.0" - "@smithy/property-provider" "^2.0.0" - "@smithy/shared-ini-file-loader" "^2.0.6" - "@smithy/types" "^2.5.0" - tslib "^2.5.0" - -"@aws-sdk/credential-provider-node@3.476.0": - version "3.476.0" - resolved "https://registry.npmjs.org/@aws-sdk/credential-provider-node/-/credential-provider-node-3.476.0.tgz#5c410cb9968b23964dad60b529177e845598fc64" - integrity sha512-BOkFBHYDgH+o6YRkk+QgQz3ro9Ly3RhNGzK5HeH37eyWWWgL1BTgY/cHgX3VNRmuKfIoph3yB2C5+eHKf41XYw== - dependencies: - "@aws-sdk/credential-provider-env" "3.468.0" - "@aws-sdk/credential-provider-ini" "3.476.0" - "@aws-sdk/credential-provider-process" "3.468.0" - "@aws-sdk/credential-provider-sso" "3.476.0" - "@aws-sdk/credential-provider-web-identity" "3.468.0" - "@aws-sdk/types" "3.468.0" - "@smithy/credential-provider-imds" "^2.0.0" - "@smithy/property-provider" "^2.0.0" - "@smithy/shared-ini-file-loader" "^2.0.6" - "@smithy/types" "^2.7.0" - tslib "^2.5.0" - -"@aws-sdk/credential-provider-node@3.637.0": - version "3.637.0" - resolved "https://registry.npmjs.org/@aws-sdk/credential-provider-node/-/credential-provider-node-3.637.0.tgz#0ac6678ab31783adf5b1cf03add5d1da101ea946" - integrity sha512-yoEhoxJJfs7sPVQ6Is939BDQJZpZCoUgKr/ySse4YKOZ24t4VqgHA6+wV7rYh+7IW24Rd91UTvEzSuHYTlxlNA== +"@aws-sdk/credential-provider-node@3.632.0": + version "3.632.0" + resolved "https://registry.npmjs.org/@aws-sdk/credential-provider-node/-/credential-provider-node-3.632.0.tgz#33a21d722b620c6a9cc43c38981cba69345e251f" + integrity sha512-cL8fuJWm/xQBO4XJPkeuZzl3XinIn9EExWgzpG48NRMKR5us1RI/ucv7xFbBBaG+r/sDR2HpYBIA3lVIpm1H3Q== dependencies: "@aws-sdk/credential-provider-env" "3.620.1" - "@aws-sdk/credential-provider-http" "3.635.0" - "@aws-sdk/credential-provider-ini" "3.637.0" + "@aws-sdk/credential-provider-http" "3.622.0" + "@aws-sdk/credential-provider-ini" "3.632.0" "@aws-sdk/credential-provider-process" "3.620.1" - "@aws-sdk/credential-provider-sso" "3.637.0" + "@aws-sdk/credential-provider-sso" "3.632.0" "@aws-sdk/credential-provider-web-identity" "3.621.0" "@aws-sdk/types" "3.609.0" "@smithy/credential-provider-imds" "^3.2.0" @@ -2989,57 +2020,24 @@ "@smithy/types" "^3.3.0" tslib "^2.6.2" -"@aws-sdk/credential-provider-node@3.649.0": - version "3.649.0" - resolved "https://registry.npmjs.org/@aws-sdk/credential-provider-node/-/credential-provider-node-3.649.0.tgz#d415bd8f3f19f6ca8a6be533c62d9aa6713f1759" - integrity sha512-5g0HhP9DQ3SCvU6pm3yLZz5SUYSL5TP0UGluZN2OMEJG9ZL+tSZSgH21PcEQmpltP0UdS7vvuq++bHv7Bdo9qQ== - dependencies: - "@aws-sdk/credential-provider-env" "3.649.0" - "@aws-sdk/credential-provider-http" "3.649.0" - "@aws-sdk/credential-provider-ini" "3.649.0" - "@aws-sdk/credential-provider-process" "3.649.0" - "@aws-sdk/credential-provider-sso" "3.649.0" - "@aws-sdk/credential-provider-web-identity" "3.649.0" - "@aws-sdk/types" "3.649.0" - "@smithy/credential-provider-imds" "^3.2.1" - "@smithy/property-provider" "^3.1.4" - "@smithy/shared-ini-file-loader" "^3.1.5" - "@smithy/types" "^3.4.0" +"@aws-sdk/credential-provider-node@3.662.0": + version "3.662.0" + resolved "https://registry.npmjs.org/@aws-sdk/credential-provider-node/-/credential-provider-node-3.662.0.tgz#086aa57b4fbca4701566f9ac88d59aa67658a5f8" + integrity sha512-2O9wjxdLcU1b+bWVkp3YYbPHo15SU3pW4KfWTca5bB/C01i1eqiHnwsOFz/WKPYYKNj0FhXtJJjeDQLtNFYI8A== + dependencies: + "@aws-sdk/credential-provider-env" "3.662.0" + "@aws-sdk/credential-provider-http" "3.662.0" + "@aws-sdk/credential-provider-ini" "3.662.0" + "@aws-sdk/credential-provider-process" "3.662.0" + "@aws-sdk/credential-provider-sso" "3.662.0" + "@aws-sdk/credential-provider-web-identity" "3.662.0" + "@aws-sdk/types" "3.662.0" + "@smithy/credential-provider-imds" "^3.2.4" + "@smithy/property-provider" "^3.1.7" + "@smithy/shared-ini-file-loader" "^3.1.8" + "@smithy/types" "^3.5.0" tslib "^2.6.2" -"@aws-sdk/credential-provider-process@3.418.0": - version "3.418.0" - resolved "https://registry.npmjs.org/@aws-sdk/credential-provider-process/-/credential-provider-process-3.418.0.tgz#1cb6d816bd471db3f9724715b007035ef18b5b2b" - integrity sha512-xPbdm2WKz1oH6pTkrJoUmr3OLuqvvcPYTQX0IIlc31tmDwDWPQjXGGFD/vwZGIZIkKaFpFxVMgAzfFScxox7dw== - dependencies: - "@aws-sdk/types" "3.418.0" - "@smithy/property-provider" "^2.0.0" - "@smithy/shared-ini-file-loader" "^2.0.6" - "@smithy/types" "^2.3.3" - tslib "^2.5.0" - -"@aws-sdk/credential-provider-process@3.451.0": - version "3.451.0" - resolved "https://registry.npmjs.org/@aws-sdk/credential-provider-process/-/credential-provider-process-3.451.0.tgz#3dd1d7df235f4eeb99d7e0f16b0e8cd61d555a73" - integrity sha512-HQywSdKeD5PErcLLnZfSyCJO+6T+ZyzF+Lm/QgscSC+CbSUSIPi//s15qhBRVely/3KBV6AywxwNH+5eYgt4lQ== - dependencies: - "@aws-sdk/types" "3.451.0" - "@smithy/property-provider" "^2.0.0" - "@smithy/shared-ini-file-loader" "^2.0.6" - "@smithy/types" "^2.5.0" - tslib "^2.5.0" - -"@aws-sdk/credential-provider-process@3.468.0": - version "3.468.0" - resolved "https://registry.npmjs.org/@aws-sdk/credential-provider-process/-/credential-provider-process-3.468.0.tgz#770ed72db036c5d011445e5abf4a4bcc4424c486" - integrity sha512-OYSn1A/UsyPJ7Z8Q2cNhTf55O36shPmSsvOfND04nSfu1nPaR+VUvvsP7v+brhGpwC/GAKTIdGAo4blH31BS6A== - dependencies: - "@aws-sdk/types" "3.468.0" - "@smithy/property-provider" "^2.0.0" - "@smithy/shared-ini-file-loader" "^2.0.6" - "@smithy/types" "^2.7.0" - tslib "^2.5.0" - "@aws-sdk/credential-provider-process@3.620.1": version "3.620.1" resolved "https://registry.npmjs.org/@aws-sdk/credential-provider-process/-/credential-provider-process-3.620.1.tgz#10387cf85400420bb4bbda9cc56937dcc6d6d0ee" @@ -3051,62 +2049,23 @@ "@smithy/types" "^3.3.0" tslib "^2.6.2" -"@aws-sdk/credential-provider-process@3.649.0": - version "3.649.0" - resolved "https://registry.npmjs.org/@aws-sdk/credential-provider-process/-/credential-provider-process-3.649.0.tgz#9924873a68cfec037c83f7bebf113ad86098bc79" - integrity sha512-6VYPQpEVpU+6DDS/gLoI40ppuNM5RPIEprK30qZZxnhTr5wyrGOeJ7J7wbbwPOZ5dKwta290BiJDU2ipV8Y9BQ== +"@aws-sdk/credential-provider-process@3.662.0": + version "3.662.0" + resolved "https://registry.npmjs.org/@aws-sdk/credential-provider-process/-/credential-provider-process-3.662.0.tgz#2c9fef18cffc827c26b599fb2a9dfb812ca1409e" + integrity sha512-1QUdtr/JiuvRjVgA8enpgCwjq7Eud8eVUT0i/vpWuFp5TV2FFq/8BD3GBkesTdy4Ylms6QVGf7J6INdfUWQEmw== dependencies: - "@aws-sdk/types" "3.649.0" - "@smithy/property-provider" "^3.1.4" - "@smithy/shared-ini-file-loader" "^3.1.5" - "@smithy/types" "^3.4.0" + "@aws-sdk/types" "3.662.0" + "@smithy/property-provider" "^3.1.7" + "@smithy/shared-ini-file-loader" "^3.1.8" + "@smithy/types" "^3.5.0" tslib "^2.6.2" -"@aws-sdk/credential-provider-sso@3.421.0": - version "3.421.0" - resolved "https://registry.npmjs.org/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.421.0.tgz#1863eabf232dd6add900e045e36a0e6c1213e31c" - integrity sha512-f8T3L5rhImL6T6RTSvbOxaWw9k2fDOT2DZbNjcPz9ITWmwXj2NNbdHGWuRi3dv2HoY/nW2IJdNxnhdhbn6Fc1A== - dependencies: - "@aws-sdk/client-sso" "3.421.0" - "@aws-sdk/token-providers" "3.418.0" - "@aws-sdk/types" "3.418.0" - "@smithy/property-provider" "^2.0.0" - "@smithy/shared-ini-file-loader" "^2.0.6" - "@smithy/types" "^2.3.3" - tslib "^2.5.0" - -"@aws-sdk/credential-provider-sso@3.451.0": - version "3.451.0" - resolved "https://registry.npmjs.org/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.451.0.tgz#f2482985a80f1da78e6b50ffaebbf2297d0f366f" - integrity sha512-Usm/N51+unOt8ID4HnQzxIjUJDrkAQ1vyTOC0gSEEJ7h64NSSPGD5yhN7il5WcErtRd3EEtT1a8/GTC5TdBctg== - dependencies: - "@aws-sdk/client-sso" "3.451.0" - "@aws-sdk/token-providers" "3.451.0" - "@aws-sdk/types" "3.451.0" - "@smithy/property-provider" "^2.0.0" - "@smithy/shared-ini-file-loader" "^2.0.6" - "@smithy/types" "^2.5.0" - tslib "^2.5.0" - -"@aws-sdk/credential-provider-sso@3.476.0": - version "3.476.0" - resolved "https://registry.npmjs.org/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.476.0.tgz#629358a5145e4185cf6cabfb77c400ebf2e009c4" - integrity sha512-jOTaH/T2xm94ebgw2xqPgPzB2OUirgL2YWSE3xCqeFJK0c9J64jz4LORI7/uXVZB4l+20axneUhoyEygQMBxOw== - dependencies: - "@aws-sdk/client-sso" "3.476.0" - "@aws-sdk/token-providers" "3.470.0" - "@aws-sdk/types" "3.468.0" - "@smithy/property-provider" "^2.0.0" - "@smithy/shared-ini-file-loader" "^2.0.6" - "@smithy/types" "^2.7.0" - tslib "^2.5.0" - -"@aws-sdk/credential-provider-sso@3.637.0": - version "3.637.0" - resolved "https://registry.npmjs.org/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.637.0.tgz#13acf77579df026e89ced33501489defd06a0518" - integrity sha512-Mvz+h+e62/tl+dVikLafhv+qkZJ9RUb8l2YN/LeKMWkxQylPT83CPk9aimVhCV89zth1zpREArl97+3xsfgQvA== - dependencies: - "@aws-sdk/client-sso" "3.637.0" +"@aws-sdk/credential-provider-sso@3.632.0": + version "3.632.0" + resolved "https://registry.npmjs.org/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.632.0.tgz#c217b853fd7d00511f3f14accdd3bf27ec4426a6" + integrity sha512-P/4wB6j7ym5QCPTL2xlMfvf2NcXSh+z0jmsZP4WW/tVwab4hvgabPPbLeEZDSWZ0BpgtxKGvRq0GSHuGeirQbA== + dependencies: + "@aws-sdk/client-sso" "3.632.0" "@aws-sdk/token-providers" "3.614.0" "@aws-sdk/types" "3.609.0" "@smithy/property-provider" "^3.1.3" @@ -3114,49 +2073,19 @@ "@smithy/types" "^3.3.0" tslib "^2.6.2" -"@aws-sdk/credential-provider-sso@3.649.0": - version "3.649.0" - resolved "https://registry.npmjs.org/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.649.0.tgz#0c0221459e325a1d779bab0b30a349b8a4f4eac0" - integrity sha512-1Fh0Ov7LAVlrEpZfHwvslzyWhT+FyFA8RnN56pF3rwypm9s/WbINKEJiEcTYCBAvD4b27iSC0AJzzHdEgkdsxA== +"@aws-sdk/credential-provider-sso@3.662.0": + version "3.662.0" + resolved "https://registry.npmjs.org/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.662.0.tgz#6d0c9f5f819da6b473d39d0cf4cd42cbbca3a524" + integrity sha512-zxze6pDPgwBwl7S3h4JDALCCz93pTAfulbCY8FqMEd7GvnAiofHpL9svyt4+gytXwwUSsQ6KxCMVLbi+8k8YIg== dependencies: - "@aws-sdk/client-sso" "3.649.0" - "@aws-sdk/token-providers" "3.649.0" - "@aws-sdk/types" "3.649.0" - "@smithy/property-provider" "^3.1.4" - "@smithy/shared-ini-file-loader" "^3.1.5" - "@smithy/types" "^3.4.0" + "@aws-sdk/client-sso" "3.662.0" + "@aws-sdk/token-providers" "3.662.0" + "@aws-sdk/types" "3.662.0" + "@smithy/property-provider" "^3.1.7" + "@smithy/shared-ini-file-loader" "^3.1.8" + "@smithy/types" "^3.5.0" tslib "^2.6.2" -"@aws-sdk/credential-provider-web-identity@3.418.0": - version "3.418.0" - resolved "https://registry.npmjs.org/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.418.0.tgz#c2aed2a79bf193c1fef2b98391aaa9de7336aaaf" - integrity sha512-do7ang565n9p3dS1JdsQY01rUfRx8vkxQqz5M8OlcEHBNiCdi2PvSjNwcBdrv/FKkyIxZb0TImOfBSt40hVdxQ== - dependencies: - "@aws-sdk/types" "3.418.0" - "@smithy/property-provider" "^2.0.0" - "@smithy/types" "^2.3.3" - tslib "^2.5.0" - -"@aws-sdk/credential-provider-web-identity@3.451.0": - version "3.451.0" - resolved "https://registry.npmjs.org/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.451.0.tgz#5dc40768869d5887888c6f178c7831dd2c74cfbe" - integrity sha512-Xtg3Qw65EfDjWNG7o2xD6sEmumPfsy3WDGjk2phEzVg8s7hcZGxf5wYwe6UY7RJvlEKrU0rFA+AMn6Hfj5oOzg== - dependencies: - "@aws-sdk/types" "3.451.0" - "@smithy/property-provider" "^2.0.0" - "@smithy/types" "^2.5.0" - tslib "^2.5.0" - -"@aws-sdk/credential-provider-web-identity@3.468.0": - version "3.468.0" - resolved "https://registry.npmjs.org/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.468.0.tgz#5befcb593d99a84e16af9e9f285f0d59ed42771f" - integrity sha512-rexymPmXjtkwCPfhnUq3EjO1rSkf39R4Jz9CqiM7OsqK2qlT5Y/V3gnMKn0ZMXsYaQOMfM3cT5xly5R+OKDHlw== - dependencies: - "@aws-sdk/types" "3.468.0" - "@smithy/property-provider" "^2.0.0" - "@smithy/types" "^2.7.0" - tslib "^2.5.0" - "@aws-sdk/credential-provider-web-identity@3.621.0": version "3.621.0" resolved "https://registry.npmjs.org/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.621.0.tgz#b25878c0a05dad60cd5f91e7e5a31a145c2f14be" @@ -3167,52 +2096,31 @@ "@smithy/types" "^3.3.0" tslib "^2.6.2" -"@aws-sdk/credential-provider-web-identity@3.649.0": - version "3.649.0" - resolved "https://registry.npmjs.org/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.649.0.tgz#9b111964076ba238640c0a6338e5f6740d2d4510" - integrity sha512-XVk3WsDa0g3kQFPmnCH/LaCtGY/0R2NDv7gscYZSXiBZcG/fixasglTprgWSp8zcA0t7tEIGu9suyjz8ZwhymQ== +"@aws-sdk/credential-provider-web-identity@3.662.0": + version "3.662.0" + resolved "https://registry.npmjs.org/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.662.0.tgz#18246e29d5f8b242a0717ff7110680cc5816d163" + integrity sha512-GhPwxmHSFtwCckuT+34JG+U99qKfDWVYPLJOPI6b35+aLhfVqW5CHPmVjtM4WZqbxzsA0a3KAYA/U1ZaluI4SA== dependencies: - "@aws-sdk/types" "3.649.0" - "@smithy/property-provider" "^3.1.4" - "@smithy/types" "^3.4.0" + "@aws-sdk/types" "3.662.0" + "@smithy/property-provider" "^3.1.7" + "@smithy/types" "^3.5.0" tslib "^2.6.2" -"@aws-sdk/credential-providers@3.421.0": - version "3.421.0" - resolved "https://registry.npmjs.org/@aws-sdk/credential-providers/-/credential-providers-3.421.0.tgz#567d4b7ae00809d7d4f8dce088e6ed5b5e622b7b" - integrity sha512-Mhz3r2N0YlOAhb1ZZYrP76VA1aIlJZw3IAwYwlS+hO4sAwp8iY6wCKiumqplXkVgK+ObLxlS9W/aW+2SAKsB7w== - dependencies: - "@aws-sdk/client-cognito-identity" "3.421.0" - "@aws-sdk/client-sso" "3.421.0" - "@aws-sdk/client-sts" "3.421.0" - "@aws-sdk/credential-provider-cognito-identity" "3.421.0" - "@aws-sdk/credential-provider-env" "3.418.0" - "@aws-sdk/credential-provider-ini" "3.421.0" - "@aws-sdk/credential-provider-node" "3.421.0" - "@aws-sdk/credential-provider-process" "3.418.0" - "@aws-sdk/credential-provider-sso" "3.421.0" - "@aws-sdk/credential-provider-web-identity" "3.418.0" - "@aws-sdk/types" "3.418.0" - "@smithy/credential-provider-imds" "^2.0.0" - "@smithy/property-provider" "^2.0.0" - "@smithy/types" "^2.3.3" - tslib "^2.5.0" - -"@aws-sdk/credential-providers@3.637.0": - version "3.637.0" - resolved "https://registry.npmjs.org/@aws-sdk/credential-providers/-/credential-providers-3.637.0.tgz#372598b0a29cf3ce2362081400442825555be43e" - integrity sha512-yW1scL3Z7JsrTrmhjyZsB6tsMJ49UCO42BGlNWZAW+kN1vNJ+qbv6XYQJWR4gjpuD2rdmtGcEawcgllE2Bmigw== - dependencies: - "@aws-sdk/client-cognito-identity" "3.637.0" - "@aws-sdk/client-sso" "3.637.0" - "@aws-sdk/client-sts" "3.637.0" - "@aws-sdk/credential-provider-cognito-identity" "3.637.0" +"@aws-sdk/credential-providers@3.632.0": + version "3.632.0" + resolved "https://registry.npmjs.org/@aws-sdk/credential-providers/-/credential-providers-3.632.0.tgz#5556914f3ffa6d01e312a2fc6410749bf2d50ac0" + integrity sha512-Q4x2ARdgncZKOJE/NXJHY5s8/YDRugVUR4lBEtibE764w5ezAhI1aMChzAzv4j3WMSDZ29KyxaymHHt2vJED9g== + dependencies: + "@aws-sdk/client-cognito-identity" "3.632.0" + "@aws-sdk/client-sso" "3.632.0" + "@aws-sdk/client-sts" "3.632.0" + "@aws-sdk/credential-provider-cognito-identity" "3.632.0" "@aws-sdk/credential-provider-env" "3.620.1" - "@aws-sdk/credential-provider-http" "3.635.0" - "@aws-sdk/credential-provider-ini" "3.637.0" - "@aws-sdk/credential-provider-node" "3.637.0" + "@aws-sdk/credential-provider-http" "3.622.0" + "@aws-sdk/credential-provider-ini" "3.632.0" + "@aws-sdk/credential-provider-node" "3.632.0" "@aws-sdk/credential-provider-process" "3.620.1" - "@aws-sdk/credential-provider-sso" "3.637.0" + "@aws-sdk/credential-provider-sso" "3.632.0" "@aws-sdk/credential-provider-web-identity" "3.621.0" "@aws-sdk/types" "3.609.0" "@smithy/credential-provider-imds" "^3.2.0" @@ -3220,39 +2128,13 @@ "@smithy/types" "^3.3.0" tslib "^2.6.2" -"@aws-sdk/endpoint-cache@3.310.0": - version "3.310.0" - resolved "https://registry.npmjs.org/@aws-sdk/endpoint-cache/-/endpoint-cache-3.310.0.tgz#e6f84bfcd55462966811390ef797145559bab15a" - integrity sha512-y3wipforet41EDTI0vnzxILqwAGll1KfI5qcdX9pXF/WF1f+3frcOtPiWtQEZQpy4czRogKm3BHo70QBYAZxlQ== +"@aws-sdk/endpoint-cache@3.572.0": + version "3.572.0" + resolved "https://registry.npmjs.org/@aws-sdk/endpoint-cache/-/endpoint-cache-3.572.0.tgz#414970b764db207eba4d93228363d61af33ea03b" + integrity sha512-CzuRWMj/xtN9p9eP915nlPmlyniTzke732Ow/M60++gGgB3W+RtZyFftw3TEx+NzNhd1tH54dEcGiWdiNaBz3Q== dependencies: mnemonist "0.38.3" - tslib "^2.5.0" - -"@aws-sdk/middleware-bucket-endpoint@3.418.0": - version "3.418.0" - resolved "https://registry.npmjs.org/@aws-sdk/middleware-bucket-endpoint/-/middleware-bucket-endpoint-3.418.0.tgz#1c330fb4dd583454872db7eba3b6e06c0699d59d" - integrity sha512-gj/mj1UfbKkGbQ1N4YUvjTTp8BVs5fO1QAL2AjFJ+jfJOToLReX72aNEkm7sPGbHML0TqOY4cQbJuWYy+zdD5g== - dependencies: - "@aws-sdk/types" "3.418.0" - "@aws-sdk/util-arn-parser" "3.310.0" - "@smithy/node-config-provider" "^2.0.12" - "@smithy/protocol-http" "^3.0.5" - "@smithy/types" "^2.3.3" - "@smithy/util-config-provider" "^2.0.0" - tslib "^2.5.0" - -"@aws-sdk/middleware-bucket-endpoint@3.451.0": - version "3.451.0" - resolved "https://registry.npmjs.org/@aws-sdk/middleware-bucket-endpoint/-/middleware-bucket-endpoint-3.451.0.tgz#d2853e30605771414fff762cd7680e449e3c811e" - integrity sha512-KWyZ1JGnYz2QbHuJtYTP1BVnMOfVopR8rP8dTinVb/JR5HfAYz4imICJlJUbOYRjN7wpA3PrRI8dNRjrSBjWJg== - dependencies: - "@aws-sdk/types" "3.451.0" - "@aws-sdk/util-arn-parser" "3.310.0" - "@smithy/node-config-provider" "^2.1.5" - "@smithy/protocol-http" "^3.0.9" - "@smithy/types" "^2.5.0" - "@smithy/util-config-provider" "^2.0.0" - tslib "^2.5.0" + tslib "^2.6.2" "@aws-sdk/middleware-bucket-endpoint@3.620.0": version "3.620.0" @@ -3267,37 +2149,17 @@ "@smithy/util-config-provider" "^3.0.0" tslib "^2.6.2" -"@aws-sdk/middleware-endpoint-discovery@3.418.0": - version "3.418.0" - resolved "https://registry.npmjs.org/@aws-sdk/middleware-endpoint-discovery/-/middleware-endpoint-discovery-3.418.0.tgz#a3cb94f433237abc3ad01d80ff4e8bc2cc872748" - integrity sha512-KRhvFQDzTrayXzswx6KhS+oBDH0NoDT+vERCqvFsGvus+/HhVGACVxINuOJ+b6mqdUPfipSD4Bje3XYunqxbSw== - dependencies: - "@aws-sdk/endpoint-cache" "3.310.0" - "@aws-sdk/types" "3.418.0" - "@smithy/node-config-provider" "^2.0.12" - "@smithy/protocol-http" "^3.0.5" - "@smithy/types" "^2.3.3" - tslib "^2.5.0" - -"@aws-sdk/middleware-expect-continue@3.418.0": - version "3.418.0" - resolved "https://registry.npmjs.org/@aws-sdk/middleware-expect-continue/-/middleware-expect-continue-3.418.0.tgz#b621c6a8bc281f23bfd3791eaab25f687946d4a7" - integrity sha512-6x4rcIj685EmqDLQkbWoCur3Dg5DRClHMen6nHXmD3CR5Xyt3z1Gk/+jmZICxyJo9c6M4AeZht8o95BopkmYAQ== - dependencies: - "@aws-sdk/types" "3.418.0" - "@smithy/protocol-http" "^3.0.5" - "@smithy/types" "^2.3.3" - tslib "^2.5.0" - -"@aws-sdk/middleware-expect-continue@3.451.0": - version "3.451.0" - resolved "https://registry.npmjs.org/@aws-sdk/middleware-expect-continue/-/middleware-expect-continue-3.451.0.tgz#6fa15a51d7d894230fa6cdf8989755f476005fff" - integrity sha512-vwG8o2Uk6biLDlOZnqXemsO4dS2HvrprUdxyouwu6hlzLFskg8nL122butn19JqXJKgcVLuSSLzT+xwqBWy2Rg== - dependencies: - "@aws-sdk/types" "3.451.0" - "@smithy/protocol-http" "^3.0.9" - "@smithy/types" "^2.5.0" - tslib "^2.5.0" +"@aws-sdk/middleware-endpoint-discovery@3.620.0": + version "3.620.0" + resolved "https://registry.npmjs.org/@aws-sdk/middleware-endpoint-discovery/-/middleware-endpoint-discovery-3.620.0.tgz#45acd6cf2a77ceaf736f2758274c383838c8584a" + integrity sha512-T6kuydHBF4BPP5CVH53Fze7c2b9rqxWP88XrGtmNMXXdY4sXur1v/itGdS2l3gqRjxKo0LsmjmuQm9zL4vGneQ== + dependencies: + "@aws-sdk/endpoint-cache" "3.572.0" + "@aws-sdk/types" "3.609.0" + "@smithy/node-config-provider" "^3.1.4" + "@smithy/protocol-http" "^4.1.0" + "@smithy/types" "^3.3.0" + tslib "^2.6.2" "@aws-sdk/middleware-expect-continue@3.620.0": version "3.620.0" @@ -3309,34 +2171,6 @@ "@smithy/types" "^3.3.0" tslib "^2.6.2" -"@aws-sdk/middleware-flexible-checksums@3.418.0": - version "3.418.0" - resolved "https://registry.npmjs.org/@aws-sdk/middleware-flexible-checksums/-/middleware-flexible-checksums-3.418.0.tgz#a79f44739ec918d8947294d0acc52eb7eb358773" - integrity sha512-3O203dqS2JU5P1TAAbo7p1qplXQh59pevw9nqzPVb3EG8B+mSucVf2kKmF7kGHqKSk+nK/mB/4XGSsZBzGt6Wg== - dependencies: - "@aws-crypto/crc32" "3.0.0" - "@aws-crypto/crc32c" "3.0.0" - "@aws-sdk/types" "3.418.0" - "@smithy/is-array-buffer" "^2.0.0" - "@smithy/protocol-http" "^3.0.5" - "@smithy/types" "^2.3.3" - "@smithy/util-utf8" "^2.0.0" - tslib "^2.5.0" - -"@aws-sdk/middleware-flexible-checksums@3.451.0": - version "3.451.0" - resolved "https://registry.npmjs.org/@aws-sdk/middleware-flexible-checksums/-/middleware-flexible-checksums-3.451.0.tgz#3617c35bceafcebd77faef5f47a3cfedc20d713c" - integrity sha512-eOkpcC2zgAvqs1w7Yp5nsk9LBIj6qLU5kaZuZEBOiFbNKIrTnPo6dQuhgvDcKHD6Y5W/cUjSBiFMs/ROb5aoug== - dependencies: - "@aws-crypto/crc32" "3.0.0" - "@aws-crypto/crc32c" "3.0.0" - "@aws-sdk/types" "3.451.0" - "@smithy/is-array-buffer" "^2.0.0" - "@smithy/protocol-http" "^3.0.9" - "@smithy/types" "^2.5.0" - "@smithy/util-utf8" "^2.0.2" - tslib "^2.5.0" - "@aws-sdk/middleware-flexible-checksums@3.620.0": version "3.620.0" resolved "https://registry.npmjs.org/@aws-sdk/middleware-flexible-checksums/-/middleware-flexible-checksums-3.620.0.tgz#42cd48cdc0ad9639545be000bf537969210ce8c5" @@ -3351,36 +2185,6 @@ "@smithy/util-utf8" "^3.0.0" tslib "^2.6.2" -"@aws-sdk/middleware-host-header@3.418.0": - version "3.418.0" - resolved "https://registry.npmjs.org/@aws-sdk/middleware-host-header/-/middleware-host-header-3.418.0.tgz#35d682e14f36c9d9d7464c7c1dd582bf6611436d" - integrity sha512-LrMTdzalkPw/1ujLCKPLwCGvPMCmT4P+vOZQRbSEVZPnlZk+Aj++aL/RaHou0jL4kJH3zl8iQepriBt4a7UvXQ== - dependencies: - "@aws-sdk/types" "3.418.0" - "@smithy/protocol-http" "^3.0.5" - "@smithy/types" "^2.3.3" - tslib "^2.5.0" - -"@aws-sdk/middleware-host-header@3.451.0": - version "3.451.0" - resolved "https://registry.npmjs.org/@aws-sdk/middleware-host-header/-/middleware-host-header-3.451.0.tgz#016fcd2b0ec58f26ce62c7ff792174bdf580972b" - integrity sha512-j8a5jAfhWmsK99i2k8oR8zzQgXrsJtgrLxc3js6U+525mcZytoiDndkWTmD5fjJ1byU1U2E5TaPq+QJeDip05Q== - dependencies: - "@aws-sdk/types" "3.451.0" - "@smithy/protocol-http" "^3.0.9" - "@smithy/types" "^2.5.0" - tslib "^2.5.0" - -"@aws-sdk/middleware-host-header@3.468.0": - version "3.468.0" - resolved "https://registry.npmjs.org/@aws-sdk/middleware-host-header/-/middleware-host-header-3.468.0.tgz#6da7b19032e9afccea54fbf8aa10cccd2f817bcf" - integrity sha512-gwQ+/QhX+lhof304r6zbZ/V5l5cjhGRxLL3CjH1uJPMcOAbw9wUlMdl+ibr8UwBZ5elfKFGiB1cdW/0uMchw0w== - dependencies: - "@aws-sdk/types" "3.468.0" - "@smithy/protocol-http" "^3.0.11" - "@smithy/types" "^2.7.0" - tslib "^2.5.0" - "@aws-sdk/middleware-host-header@3.620.0": version "3.620.0" resolved "https://registry.npmjs.org/@aws-sdk/middleware-host-header/-/middleware-host-header-3.620.0.tgz#b561d419a08a984ba364c193376b482ff5224d74" @@ -3391,34 +2195,16 @@ "@smithy/types" "^3.3.0" tslib "^2.6.2" -"@aws-sdk/middleware-host-header@3.649.0": - version "3.649.0" - resolved "https://registry.npmjs.org/@aws-sdk/middleware-host-header/-/middleware-host-header-3.649.0.tgz#ab7929cbf19ef9aeda0a16982a4753d0c5201822" - integrity sha512-PjAe2FocbicHVgNNwdSZ05upxIO7AgTPFtQLpnIAmoyzMcgv/zNB5fBn3uAnQSAeEPPCD+4SYVEUD1hw1ZBvEg== +"@aws-sdk/middleware-host-header@3.662.0": + version "3.662.0" + resolved "https://registry.npmjs.org/@aws-sdk/middleware-host-header/-/middleware-host-header-3.662.0.tgz#f3d647d294b19da17ef5845b87dc5c0788196a1e" + integrity sha512-Gkb0J1LTvD8LOS8uwoRI5weFXvvJwP1jfnYwzQrFgLymRFHJm5JtORQZtmw34dtdou+IBTUsH1mgI8b3QVVH3w== dependencies: - "@aws-sdk/types" "3.649.0" - "@smithy/protocol-http" "^4.1.1" - "@smithy/types" "^3.4.0" + "@aws-sdk/types" "3.662.0" + "@smithy/protocol-http" "^4.1.4" + "@smithy/types" "^3.5.0" tslib "^2.6.2" -"@aws-sdk/middleware-location-constraint@3.418.0": - version "3.418.0" - resolved "https://registry.npmjs.org/@aws-sdk/middleware-location-constraint/-/middleware-location-constraint-3.418.0.tgz#e62e213a72ce583ba6135db51dcc60d07825b8ee" - integrity sha512-cc8M3VEaESHJhDsDV8tTpt2QYUprDWhvAVVSlcL43cTdZ54Quc0W+toDiaVOUlwrAZz2Y7g5NDj22ibJGFbOvw== - dependencies: - "@aws-sdk/types" "3.418.0" - "@smithy/types" "^2.3.3" - tslib "^2.5.0" - -"@aws-sdk/middleware-location-constraint@3.451.0": - version "3.451.0" - resolved "https://registry.npmjs.org/@aws-sdk/middleware-location-constraint/-/middleware-location-constraint-3.451.0.tgz#eb763e777b008e7f9fef3eda8dbfce27ed54cdaa" - integrity sha512-R4U2G7mybP0BMiQBJWTcB47g49F4PSXTiCsvMDp5WOEhpWvGQuO1ZIhTxCl5s5lgTSne063Os8W6KSdK2yG2TQ== - dependencies: - "@aws-sdk/types" "3.451.0" - "@smithy/types" "^2.5.0" - tslib "^2.5.0" - "@aws-sdk/middleware-location-constraint@3.609.0": version "3.609.0" resolved "https://registry.npmjs.org/@aws-sdk/middleware-location-constraint/-/middleware-location-constraint-3.609.0.tgz#7ed82d71e5ddcd50683ef2bbde10d1cc2492057e" @@ -3428,33 +2214,6 @@ "@smithy/types" "^3.3.0" tslib "^2.6.2" -"@aws-sdk/middleware-logger@3.418.0": - version "3.418.0" - resolved "https://registry.npmjs.org/@aws-sdk/middleware-logger/-/middleware-logger-3.418.0.tgz#08d7419f4220c36032a070a7dbb8bbf7e744a9ce" - integrity sha512-StKGmyPVfoO/wdNTtKemYwoJsqIl4l7oqarQY7VSf2Mp3mqaa+njLViHsQbirYpyqpgUEusOnuTlH5utxJ1NsQ== - dependencies: - "@aws-sdk/types" "3.418.0" - "@smithy/types" "^2.3.3" - tslib "^2.5.0" - -"@aws-sdk/middleware-logger@3.451.0": - version "3.451.0" - resolved "https://registry.npmjs.org/@aws-sdk/middleware-logger/-/middleware-logger-3.451.0.tgz#9ef8ac916199f92ea1bb6c153279727ffa2b0b36" - integrity sha512-0kHrYEyVeB2QBfP6TfbI240aRtatLZtcErJbhpiNUb+CQPgEL3crIjgVE8yYiJumZ7f0jyjo8HLPkwD1/2APaw== - dependencies: - "@aws-sdk/types" "3.451.0" - "@smithy/types" "^2.5.0" - tslib "^2.5.0" - -"@aws-sdk/middleware-logger@3.468.0": - version "3.468.0" - resolved "https://registry.npmjs.org/@aws-sdk/middleware-logger/-/middleware-logger-3.468.0.tgz#a1883fb7ad8e156444d30689de4ab897357ef1d8" - integrity sha512-X5XHKV7DHRXI3f29SAhJPe/OxWRFgDWDMMCALfzhmJfCi6Jfh0M14cJKoC+nl+dk9lB+36+jKjhjETZaL2bPlA== - dependencies: - "@aws-sdk/types" "3.468.0" - "@smithy/types" "^2.7.0" - tslib "^2.5.0" - "@aws-sdk/middleware-logger@3.609.0": version "3.609.0" resolved "https://registry.npmjs.org/@aws-sdk/middleware-logger/-/middleware-logger-3.609.0.tgz#ed44d201f091b8bac908cbf14724c7a4d492553f" @@ -3464,138 +2223,84 @@ "@smithy/types" "^3.3.0" tslib "^2.6.2" -"@aws-sdk/middleware-logger@3.649.0": - version "3.649.0" - resolved "https://registry.npmjs.org/@aws-sdk/middleware-logger/-/middleware-logger-3.649.0.tgz#6de0f7015b1039e23c0f008516a8492a334ac33e" - integrity sha512-qdqRx6q7lYC6KL/NT9x3ShTL0TBuxdkCczGzHzY3AnOoYUjnCDH7Vlq867O6MAvb4EnGNECFzIgtkZkQ4FhY5w== +"@aws-sdk/middleware-logger@3.662.0": + version "3.662.0" + resolved "https://registry.npmjs.org/@aws-sdk/middleware-logger/-/middleware-logger-3.662.0.tgz#8c2ff7d543fe691a06020be853eeb9481409614d" + integrity sha512-aSpwVHtfMlqzpmnmmUgRNCaIcxXdRrGqGWG+VWXuYR1F6jJARDDCxGkSuKiPEOLX0h0BroUo4gqbM8ILXQ8rVw== dependencies: - "@aws-sdk/types" "3.649.0" - "@smithy/types" "^3.4.0" + "@aws-sdk/types" "3.662.0" + "@smithy/types" "^3.5.0" tslib "^2.6.2" -"@aws-sdk/middleware-recursion-detection@3.418.0": - version "3.418.0" - resolved "https://registry.npmjs.org/@aws-sdk/middleware-recursion-detection/-/middleware-recursion-detection-3.418.0.tgz#2bb80d084f946846ad4907f3d6e0b451787d62b1" - integrity sha512-kKFrIQglBLUFPbHSDy1+bbe3Na2Kd70JSUC3QLMbUHmqipXN8KeXRfAj7vTv97zXl0WzG0buV++WcNwOm1rFjg== +"@aws-sdk/middleware-recursion-detection@3.620.0": + version "3.620.0" + resolved "https://registry.npmjs.org/@aws-sdk/middleware-recursion-detection/-/middleware-recursion-detection-3.620.0.tgz#f8270dfff843fd756be971e5673f89c6a24c6513" + integrity sha512-nh91S7aGK3e/o1ck64sA/CyoFw+gAYj2BDOnoNa6ouyCrVJED96ZXWbhye/fz9SgmNUZR2g7GdVpiLpMKZoI5w== dependencies: - "@aws-sdk/types" "3.418.0" - "@smithy/protocol-http" "^3.0.5" - "@smithy/types" "^2.3.3" - tslib "^2.5.0" + "@aws-sdk/types" "3.609.0" + "@smithy/protocol-http" "^4.1.0" + "@smithy/types" "^3.3.0" + tslib "^2.6.2" -"@aws-sdk/middleware-recursion-detection@3.451.0": - version "3.451.0" - resolved "https://registry.npmjs.org/@aws-sdk/middleware-recursion-detection/-/middleware-recursion-detection-3.451.0.tgz#333a12d4792788bfcc3cab1028868cf37fb17e76" - integrity sha512-J6jL6gJ7orjHGM70KDRcCP7so/J2SnkN4vZ9YRLTeeZY6zvBuHDjX8GCIgSqPn/nXFXckZO8XSnA7u6+3TAT0w== +"@aws-sdk/middleware-recursion-detection@3.662.0": + version "3.662.0" + resolved "https://registry.npmjs.org/@aws-sdk/middleware-recursion-detection/-/middleware-recursion-detection-3.662.0.tgz#5af684014a604d474e6bd763a5d2a3fbfff84d36" + integrity sha512-V/MYE+LOFIQDLnpWMHLxnKu+ELhD3pLOrWXVhKpVit6YcHxaOz6nvB40CPamSPDXenA11FGXKAGNHZ0loTpDQg== dependencies: - "@aws-sdk/types" "3.451.0" - "@smithy/protocol-http" "^3.0.9" - "@smithy/types" "^2.5.0" - tslib "^2.5.0" + "@aws-sdk/types" "3.662.0" + "@smithy/protocol-http" "^4.1.4" + "@smithy/types" "^3.5.0" + tslib "^2.6.2" -"@aws-sdk/middleware-recursion-detection@3.468.0": - version "3.468.0" - resolved "https://registry.npmjs.org/@aws-sdk/middleware-recursion-detection/-/middleware-recursion-detection-3.468.0.tgz#85b05636a5c2638bf9e15c8b6be17654757e1bf4" - integrity sha512-vch9IQib2Ng9ucSyRW2eKNQXHUPb5jUPCLA5otTW/8nGjcOU37LxQG4WrxO7uaJ9Oe8hjHO+hViE3P0KISUhtA== +"@aws-sdk/middleware-sdk-ec2@3.622.0": + version "3.622.0" + resolved "https://registry.npmjs.org/@aws-sdk/middleware-sdk-ec2/-/middleware-sdk-ec2-3.622.0.tgz#dc25d26d404344ec0d94e6d897baf849ec9f0718" + integrity sha512-rVShV+eB1vovLuvlzUEFuxZB4yxSMFzyP+VNIoFxtSZh0LWh7+7bNLwp1I9Vq3SxHLMVYQevjm7nkiPM0DG+RQ== dependencies: - "@aws-sdk/types" "3.468.0" - "@smithy/protocol-http" "^3.0.11" - "@smithy/types" "^2.7.0" - tslib "^2.5.0" + "@aws-sdk/types" "3.609.0" + "@aws-sdk/util-format-url" "3.609.0" + "@smithy/middleware-endpoint" "^3.1.0" + "@smithy/protocol-http" "^4.1.0" + "@smithy/signature-v4" "^4.1.0" + "@smithy/smithy-client" "^3.1.12" + "@smithy/types" "^3.3.0" + tslib "^2.6.2" -"@aws-sdk/middleware-recursion-detection@3.620.0": +"@aws-sdk/middleware-sdk-rds@3.620.0": version "3.620.0" - resolved "https://registry.npmjs.org/@aws-sdk/middleware-recursion-detection/-/middleware-recursion-detection-3.620.0.tgz#f8270dfff843fd756be971e5673f89c6a24c6513" - integrity sha512-nh91S7aGK3e/o1ck64sA/CyoFw+gAYj2BDOnoNa6ouyCrVJED96ZXWbhye/fz9SgmNUZR2g7GdVpiLpMKZoI5w== + resolved "https://registry.npmjs.org/@aws-sdk/middleware-sdk-rds/-/middleware-sdk-rds-3.620.0.tgz#6157eab60a7f015dac99f7bf8626dc15bb6f4185" + integrity sha512-pokuq3rMJfn8ZNUIhAKn0c1nQtvClPLzh5h1fOXAeRXmNjp+YPXQ4CIsGRcqDNO8lkUyyfV42WnPCdUZmR9zAA== dependencies: "@aws-sdk/types" "3.609.0" + "@aws-sdk/util-format-url" "3.609.0" + "@smithy/middleware-endpoint" "^3.1.0" "@smithy/protocol-http" "^4.1.0" + "@smithy/signature-v4" "^4.1.0" "@smithy/types" "^3.3.0" tslib "^2.6.2" -"@aws-sdk/middleware-recursion-detection@3.649.0": - version "3.649.0" - resolved "https://registry.npmjs.org/@aws-sdk/middleware-recursion-detection/-/middleware-recursion-detection-3.649.0.tgz#1b4ed4d96aadaa18ee7900c5f8c8a7f91a49077e" - integrity sha512-IPnO4wlmaLRf6IYmJW2i8gJ2+UPXX0hDRv1it7Qf8DpBW+lGyF2rnoN7NrFX0WIxdGOlJF1RcOr/HjXb2QeXfQ== +"@aws-sdk/middleware-sdk-route53@3.609.0": + version "3.609.0" + resolved "https://registry.npmjs.org/@aws-sdk/middleware-sdk-route53/-/middleware-sdk-route53-3.609.0.tgz#285fcd97c3d479b4f5d09a66bf3cde04465dfd8b" + integrity sha512-lw0WdzAJS8puQeJNeyOeEfRtG2C91yFBj8IXWmwm7r+QqnZtDork0uiZYFt1Br24dOxZiFefxLCehjSoyr8fVQ== dependencies: - "@aws-sdk/types" "3.649.0" - "@smithy/protocol-http" "^4.1.1" - "@smithy/types" "^3.4.0" + "@aws-sdk/types" "3.609.0" + "@smithy/types" "^3.3.0" tslib "^2.6.2" -"@aws-sdk/middleware-sdk-ec2@3.418.0": - version "3.418.0" - resolved "https://registry.npmjs.org/@aws-sdk/middleware-sdk-ec2/-/middleware-sdk-ec2-3.418.0.tgz#eac7054b128645c5a040c8e95b5cf92c7994d2fd" - integrity sha512-+nxKSQW4Yd4y6SUrI4AbKLj7IrSvzYctTAMPXwx9YUkjZMnIonX+qpsZ9k++2GKlPCjcF4DAC0NrVqZeWtjiiA== - dependencies: - "@aws-sdk/types" "3.418.0" - "@aws-sdk/util-format-url" "3.418.0" - "@smithy/middleware-endpoint" "^2.0.9" - "@smithy/protocol-http" "^3.0.5" - "@smithy/signature-v4" "^2.0.0" - "@smithy/smithy-client" "^2.1.6" - "@smithy/types" "^2.3.3" - tslib "^2.5.0" - -"@aws-sdk/middleware-sdk-rds@3.418.0": - version "3.418.0" - resolved "https://registry.npmjs.org/@aws-sdk/middleware-sdk-rds/-/middleware-sdk-rds-3.418.0.tgz#f0a27c50b86d850a600ebceae66c173a168b94cb" - integrity sha512-1WqQ9hQLY8/Oi9rz7nELpfHDR9Gk8ByLqG5N6fgmqkSgEmzQBXzfqToO6BnJ+9XKJ44ePKdiikIqwnx1DsncEQ== - dependencies: - "@aws-sdk/types" "3.418.0" - "@aws-sdk/util-format-url" "3.418.0" - "@smithy/middleware-endpoint" "^2.0.9" - "@smithy/protocol-http" "^3.0.5" - "@smithy/signature-v4" "^2.0.0" - "@smithy/types" "^2.3.3" - tslib "^2.5.0" - -"@aws-sdk/middleware-sdk-route53@3.418.0": - version "3.418.0" - resolved "https://registry.npmjs.org/@aws-sdk/middleware-sdk-route53/-/middleware-sdk-route53-3.418.0.tgz#65033799ddc68c310c46335afc160dcdfd710256" - integrity sha512-yEIKF7IOPKlIQDjXwe7H01uRQt2jTnVhxmI6xmJVxHGE3aOw2ga2zmV6jAITcWoH83LlcEg1iobjFr1nrcQ3vA== - dependencies: - "@aws-sdk/types" "3.418.0" - "@smithy/types" "^2.3.3" - tslib "^2.5.0" - -"@aws-sdk/middleware-sdk-s3@3.418.0": - version "3.418.0" - resolved "https://registry.npmjs.org/@aws-sdk/middleware-sdk-s3/-/middleware-sdk-s3-3.418.0.tgz#b1de52d54e0cbc8d46ce0bc4c6c54b527f409aaf" - integrity sha512-rei32LF45SyqL3NlWDjEOfMwAca9A5F4QgUyXJqvASc43oWC1tJnLIhiCxNh8qkWAiRyRzFpcanTeqyaRSsZpA== - dependencies: - "@aws-sdk/types" "3.418.0" - "@aws-sdk/util-arn-parser" "3.310.0" - "@smithy/protocol-http" "^3.0.5" - "@smithy/smithy-client" "^2.1.6" - "@smithy/types" "^2.3.3" - tslib "^2.5.0" - -"@aws-sdk/middleware-sdk-s3@3.451.0": - version "3.451.0" - resolved "https://registry.npmjs.org/@aws-sdk/middleware-sdk-s3/-/middleware-sdk-s3-3.451.0.tgz#2c9b47216b46fcb46e6a505463059eff89912cec" - integrity sha512-XF4Cw8HrYUwGLKOqKtWs6ss1WXoxvQUcgGLACGSqn9a0p51446NiS5671x7qJUsfBuygdKlIKcOc8pPr9a+5Ow== - dependencies: - "@aws-sdk/types" "3.451.0" - "@aws-sdk/util-arn-parser" "3.310.0" - "@smithy/protocol-http" "^3.0.9" - "@smithy/smithy-client" "^2.1.15" - "@smithy/types" "^2.5.0" - tslib "^2.5.0" - -"@aws-sdk/middleware-sdk-s3@3.635.0": - version "3.635.0" - resolved "https://registry.npmjs.org/@aws-sdk/middleware-sdk-s3/-/middleware-sdk-s3-3.635.0.tgz#be7f61c6033a803cde59ec5a29db266b42fdbc01" - integrity sha512-RLdYJPEV4JL/7NBoFUs7VlP90X++5FlJdxHz0DzCjmiD3qCviKy+Cym3qg1gBgHwucs5XisuClxDrGokhAdTQw== - dependencies: - "@aws-sdk/core" "3.635.0" +"@aws-sdk/middleware-sdk-s3@3.629.0": + version "3.629.0" + resolved "https://registry.npmjs.org/@aws-sdk/middleware-sdk-s3/-/middleware-sdk-s3-3.629.0.tgz#10ad7b8af945f915d31f00cec0198248be95291c" + integrity sha512-FRXLcnPWXBoq/T9mnGnrpqhrSKNSm22rqJ0L7P14KESmbGuwhF/7ELYYxXIpgnIpb/CIUVmIU5EE8lsW1VTe8A== + dependencies: + "@aws-sdk/core" "3.629.0" "@aws-sdk/types" "3.609.0" "@aws-sdk/util-arn-parser" "3.568.0" - "@smithy/core" "^2.4.0" + "@smithy/core" "^2.3.2" "@smithy/node-config-provider" "^3.1.4" "@smithy/protocol-http" "^4.1.0" "@smithy/signature-v4" "^4.1.0" - "@smithy/smithy-client" "^3.2.0" + "@smithy/smithy-client" "^3.1.12" "@smithy/types" "^3.3.0" "@smithy/util-config-provider" "^3.0.0" "@smithy/util-middleware" "^3.0.3" @@ -3603,83 +2308,6 @@ "@smithy/util-utf8" "^3.0.0" tslib "^2.6.2" -"@aws-sdk/middleware-sdk-sts@3.418.0": - version "3.418.0" - resolved "https://registry.npmjs.org/@aws-sdk/middleware-sdk-sts/-/middleware-sdk-sts-3.418.0.tgz#f167f16050e055282ddd60226a2216c84873d464" - integrity sha512-cW8ijrCTP+mgihvcq4+TbhAcE/we5lFl4ydRqvTdtcSnYQAVQADg47rnTScQiFsPFEB3NKq7BGeyTJF9MKolPA== - dependencies: - "@aws-sdk/middleware-signing" "3.418.0" - "@aws-sdk/types" "3.418.0" - "@smithy/types" "^2.3.3" - tslib "^2.5.0" - -"@aws-sdk/middleware-sdk-sts@3.451.0": - version "3.451.0" - resolved "https://registry.npmjs.org/@aws-sdk/middleware-sdk-sts/-/middleware-sdk-sts-3.451.0.tgz#0c70b57523386fe12357b4471cd20b681a27f9aa" - integrity sha512-UJ6UfVUEgp0KIztxpAeelPXI5MLj9wUtUCqYeIMP7C1ZhoEMNm3G39VLkGN43dNhBf1LqjsV9jkKMZbVfYXuwg== - dependencies: - "@aws-sdk/middleware-signing" "3.451.0" - "@aws-sdk/types" "3.451.0" - "@smithy/types" "^2.5.0" - tslib "^2.5.0" - -"@aws-sdk/middleware-signing@3.418.0": - version "3.418.0" - resolved "https://registry.npmjs.org/@aws-sdk/middleware-signing/-/middleware-signing-3.418.0.tgz#c7242b84069067bb671cb4191d412b59713a375e" - integrity sha512-onvs5KoYQE8OlOE740RxWBGtsUyVIgAo0CzRKOQO63ZEYqpL1Os+MS1CGzdNhvQnJgJruE1WW+Ix8fjN30zKPA== - dependencies: - "@aws-sdk/types" "3.418.0" - "@smithy/property-provider" "^2.0.0" - "@smithy/protocol-http" "^3.0.5" - "@smithy/signature-v4" "^2.0.0" - "@smithy/types" "^2.3.3" - "@smithy/util-middleware" "^2.0.2" - tslib "^2.5.0" - -"@aws-sdk/middleware-signing@3.451.0": - version "3.451.0" - resolved "https://registry.npmjs.org/@aws-sdk/middleware-signing/-/middleware-signing-3.451.0.tgz#ed7f5665dd048228e00f8e7e5925db32901a7886" - integrity sha512-s5ZlcIoLNg1Huj4Qp06iKniE8nJt/Pj1B/fjhWc6cCPCM7XJYUCejCnRh6C5ZJoBEYodjuwZBejPc1Wh3j+znA== - dependencies: - "@aws-sdk/types" "3.451.0" - "@smithy/property-provider" "^2.0.0" - "@smithy/protocol-http" "^3.0.9" - "@smithy/signature-v4" "^2.0.0" - "@smithy/types" "^2.5.0" - "@smithy/util-middleware" "^2.0.6" - tslib "^2.5.0" - -"@aws-sdk/middleware-signing@3.468.0": - version "3.468.0" - resolved "https://registry.npmjs.org/@aws-sdk/middleware-signing/-/middleware-signing-3.468.0.tgz#d1b5a92c395f55063cfa72ee95e4921b16f4c515" - integrity sha512-s+7fSB1gdnnTj5O0aCCarX3z5Vppop8kazbNSZADdkfHIDWCN80IH4ZNjY3OWqaAz0HmR4LNNrovdR304ojb4Q== - dependencies: - "@aws-sdk/types" "3.468.0" - "@smithy/property-provider" "^2.0.0" - "@smithy/protocol-http" "^3.0.11" - "@smithy/signature-v4" "^2.0.0" - "@smithy/types" "^2.7.0" - "@smithy/util-middleware" "^2.0.8" - tslib "^2.5.0" - -"@aws-sdk/middleware-ssec@3.418.0": - version "3.418.0" - resolved "https://registry.npmjs.org/@aws-sdk/middleware-ssec/-/middleware-ssec-3.418.0.tgz#67b554c4acad81c7aa93421c8fcba8a18e138294" - integrity sha512-J7K+5h6aP7IYMlu/NwHEIjb0+WDu1eFvO8TCPo6j1H9xYRi8B/6h+6pa9Rk9IgRUzFnrdlDu9FazG8Tp0KKLyg== - dependencies: - "@aws-sdk/types" "3.418.0" - "@smithy/types" "^2.3.3" - tslib "^2.5.0" - -"@aws-sdk/middleware-ssec@3.451.0": - version "3.451.0" - resolved "https://registry.npmjs.org/@aws-sdk/middleware-ssec/-/middleware-ssec-3.451.0.tgz#056e4c8afc54651481d81d6c54fc0599c70f5c67" - integrity sha512-hDkeBUiRsvuDbvsPha0/uJHE680WDzjAOoE6ZnLBoWsw7ry+Bw1ULMj0sCmpBVrQ7Gpivi/6zbezhClVmt3ITw== - dependencies: - "@aws-sdk/types" "3.451.0" - "@smithy/types" "^2.5.0" - tslib "^2.5.0" - "@aws-sdk/middleware-ssec@3.609.0": version "3.609.0" resolved "https://registry.npmjs.org/@aws-sdk/middleware-ssec/-/middleware-ssec-3.609.0.tgz#b87a8bc6133f3f6bdc6801183d0f9dad3f93cf9f" @@ -3689,102 +2317,28 @@ "@smithy/types" "^3.3.0" tslib "^2.6.2" -"@aws-sdk/middleware-user-agent@3.418.0": - version "3.418.0" - resolved "https://registry.npmjs.org/@aws-sdk/middleware-user-agent/-/middleware-user-agent-3.418.0.tgz#37426cf801332165fb170b1fd62dea8bb967a1ef" - integrity sha512-Jdcztg9Tal9SEAL0dKRrnpKrm6LFlWmAhvuwv0dQ7bNTJxIxyEFbpqdgy7mpQHsLVZgq1Aad/7gT/72c9igyZw== - dependencies: - "@aws-sdk/types" "3.418.0" - "@aws-sdk/util-endpoints" "3.418.0" - "@smithy/protocol-http" "^3.0.5" - "@smithy/types" "^2.3.3" - tslib "^2.5.0" - -"@aws-sdk/middleware-user-agent@3.451.0": - version "3.451.0" - resolved "https://registry.npmjs.org/@aws-sdk/middleware-user-agent/-/middleware-user-agent-3.451.0.tgz#33d168e8411be4561eeef69e16c31e41b6f9a0cf" - integrity sha512-8NM/0JiKLNvT9wtAQVl1DFW0cEO7OvZyLSUBLNLTHqyvOZxKaZ8YFk7d8PL6l76LeUKRxq4NMxfZQlUIRe0eSA== - dependencies: - "@aws-sdk/types" "3.451.0" - "@aws-sdk/util-endpoints" "3.451.0" - "@smithy/protocol-http" "^3.0.9" - "@smithy/types" "^2.5.0" - tslib "^2.5.0" - -"@aws-sdk/middleware-user-agent@3.470.0": - version "3.470.0" - resolved "https://registry.npmjs.org/@aws-sdk/middleware-user-agent/-/middleware-user-agent-3.470.0.tgz#6cbb09fc8359acdb45c41f6fe5d6612c81f5ad92" - integrity sha512-s0YRGgf4fT5KwwTefpoNUQfB5JghzXyvmPfY1QuFEMeVQNxv0OPuydzo3rY2oXPkZjkulKDtpm5jzIHwut75hA== - dependencies: - "@aws-sdk/types" "3.468.0" - "@aws-sdk/util-endpoints" "3.470.0" - "@smithy/protocol-http" "^3.0.11" - "@smithy/types" "^2.7.0" - tslib "^2.5.0" - -"@aws-sdk/middleware-user-agent@3.637.0": - version "3.637.0" - resolved "https://registry.npmjs.org/@aws-sdk/middleware-user-agent/-/middleware-user-agent-3.637.0.tgz#2b00de72b00953a477bcc02a68d8cbb5e9670c44" - integrity sha512-EYo0NE9/da/OY8STDsK2LvM4kNa79DBsf4YVtaG4P5pZ615IeFsD8xOHZeuJmUrSMlVQ8ywPRX7WMucUybsKug== +"@aws-sdk/middleware-user-agent@3.632.0": + version "3.632.0" + resolved "https://registry.npmjs.org/@aws-sdk/middleware-user-agent/-/middleware-user-agent-3.632.0.tgz#274bbf2789268f30c1ff2ef20c395c9dc4f91c96" + integrity sha512-yY/sFsHKwG9yzSf/DTclqWJaGPI2gPBJDCGBujSqTG1zlS7Ot4fqi91DZ6088BFWzbOorDzJFcAhAEFzc6LuQg== dependencies: "@aws-sdk/types" "3.609.0" - "@aws-sdk/util-endpoints" "3.637.0" + "@aws-sdk/util-endpoints" "3.632.0" "@smithy/protocol-http" "^4.1.0" "@smithy/types" "^3.3.0" tslib "^2.6.2" -"@aws-sdk/middleware-user-agent@3.649.0": - version "3.649.0" - resolved "https://registry.npmjs.org/@aws-sdk/middleware-user-agent/-/middleware-user-agent-3.649.0.tgz#16be52850fd754797aeb0633232b41fd1504dd89" - integrity sha512-q6sO10dnCXoxe9thobMJxekhJumzd1j6dxcE1+qJdYKHJr6yYgWbogJqrLCpWd30w0lEvnuAHK8lN2kWLdJxJw== +"@aws-sdk/middleware-user-agent@3.662.0": + version "3.662.0" + resolved "https://registry.npmjs.org/@aws-sdk/middleware-user-agent/-/middleware-user-agent-3.662.0.tgz#a428403ced5d6684f29d45dd0f39c6c4ef10ab7b" + integrity sha512-NT940BLSSys/A8W3zO3g2Kj+zpeydqGbSQgN6qz84jTskQjnrlamoq+Zl9Rrp8Cn8sC10UQ09kGg97lvjVOlmg== dependencies: - "@aws-sdk/types" "3.649.0" - "@aws-sdk/util-endpoints" "3.649.0" - "@smithy/protocol-http" "^4.1.1" - "@smithy/types" "^3.4.0" + "@aws-sdk/types" "3.662.0" + "@aws-sdk/util-endpoints" "3.662.0" + "@smithy/protocol-http" "^4.1.4" + "@smithy/types" "^3.5.0" tslib "^2.6.2" -"@aws-sdk/node-http-handler@^3.370.0": - version "3.374.0" - resolved "https://registry.npmjs.org/@aws-sdk/node-http-handler/-/node-http-handler-3.374.0.tgz#8cd58b4d9814713e26034c12eabc119c113a5bc4" - integrity sha512-v1Z6m0wwkf65/tKuhwrtPRqVoOtNkDTRn2MBMtxCwEw+8V8Q+YRFqVgGN+J1n53ktE0G5OYVBux/NHiAjJHReQ== - dependencies: - "@smithy/node-http-handler" "^1.0.2" - tslib "^2.5.0" - -"@aws-sdk/region-config-resolver@3.418.0": - version "3.418.0" - resolved "https://registry.npmjs.org/@aws-sdk/region-config-resolver/-/region-config-resolver-3.418.0.tgz#53b99e4bd92f3369f51e9a76534b7d884db67526" - integrity sha512-lJRZ/9TjZU6yLz+mAwxJkcJZ6BmyYoIJVo1p5+BN//EFdEmC8/c0c9gXMRzfISV/mqWSttdtccpAyN4/goHTYA== - dependencies: - "@smithy/node-config-provider" "^2.0.12" - "@smithy/types" "^2.3.3" - "@smithy/util-config-provider" "^2.0.0" - "@smithy/util-middleware" "^2.0.2" - tslib "^2.5.0" - -"@aws-sdk/region-config-resolver@3.451.0": - version "3.451.0" - resolved "https://registry.npmjs.org/@aws-sdk/region-config-resolver/-/region-config-resolver-3.451.0.tgz#f4de34ebe435832dd6bcdc0a7b9fae14a42fc6de" - integrity sha512-3iMf4OwzrFb4tAAmoROXaiORUk2FvSejnHIw/XHvf/jjR4EqGGF95NZP/n/MeFZMizJWVssrwS412GmoEyoqhg== - dependencies: - "@smithy/node-config-provider" "^2.1.5" - "@smithy/types" "^2.5.0" - "@smithy/util-config-provider" "^2.0.0" - "@smithy/util-middleware" "^2.0.6" - tslib "^2.5.0" - -"@aws-sdk/region-config-resolver@3.470.0": - version "3.470.0" - resolved "https://registry.npmjs.org/@aws-sdk/region-config-resolver/-/region-config-resolver-3.470.0.tgz#74e5c5f7a5633ad8c482503bf940a9330bd1cd09" - integrity sha512-C1o1J06iIw8cyAAOvHqT4Bbqf+PgQ/RDlSyjt2gFfP2OovDpc2o2S90dE8f8iZdSGpg70N5MikT1DBhW9NbhtQ== - dependencies: - "@smithy/node-config-provider" "^2.1.8" - "@smithy/types" "^2.7.0" - "@smithy/util-config-provider" "^2.0.0" - "@smithy/util-middleware" "^2.0.8" - tslib "^2.5.0" - "@aws-sdk/region-config-resolver@3.614.0": version "3.614.0" resolved "https://registry.npmjs.org/@aws-sdk/region-config-resolver/-/region-config-resolver-3.614.0.tgz#9cebb31a5bcfea2a41891fff7f28d0164cde179a" @@ -3797,192 +2351,43 @@ "@smithy/util-middleware" "^3.0.3" tslib "^2.6.2" -"@aws-sdk/region-config-resolver@3.649.0": - version "3.649.0" - resolved "https://registry.npmjs.org/@aws-sdk/region-config-resolver/-/region-config-resolver-3.649.0.tgz#bb45a3c4c53f80ad0c66d6f6dc62223eb8af5656" - integrity sha512-xURBvdQXvRvca5Du8IlC5FyCj3pkw8Z75+373J3Wb+vyg8GjD14HfKk1Je1HCCQDyIE9VB/scYDcm9ri0ppePw== +"@aws-sdk/region-config-resolver@3.662.0": + version "3.662.0" + resolved "https://registry.npmjs.org/@aws-sdk/region-config-resolver/-/region-config-resolver-3.662.0.tgz#1dcb6850059baa54dcb6e4556ece7ec1a4ee9d1b" + integrity sha512-MDiWl4wZSVnnTELLb+jFSe0nj9HwxJPX2JnghXKkOXmbKEiE2/21DCQwU9mr9VUq2ZOQqaSnMFPr94iRu0AVTQ== dependencies: - "@aws-sdk/types" "3.649.0" - "@smithy/node-config-provider" "^3.1.5" - "@smithy/types" "^3.4.0" + "@aws-sdk/types" "3.662.0" + "@smithy/node-config-provider" "^3.1.8" + "@smithy/types" "^3.5.0" "@smithy/util-config-provider" "^3.0.0" - "@smithy/util-middleware" "^3.0.4" + "@smithy/util-middleware" "^3.0.7" tslib "^2.6.2" -"@aws-sdk/s3-request-presigner@3.451.0": - version "3.451.0" - resolved "https://registry.npmjs.org/@aws-sdk/s3-request-presigner/-/s3-request-presigner-3.451.0.tgz#1728993a547017f739c9c24af2d8e058e8873c4f" - integrity sha512-UVe9E3qun3smKeHK05Qlj4MMWY10lMZjmuHLqOC+AzqqCY/3UuqkgSiZeNRTAX0nIA0tJKlYIZBSyyQmofiFeQ== - dependencies: - "@aws-sdk/signature-v4-multi-region" "3.451.0" - "@aws-sdk/types" "3.451.0" - "@aws-sdk/util-format-url" "3.451.0" - "@smithy/middleware-endpoint" "^2.2.0" - "@smithy/protocol-http" "^3.0.9" - "@smithy/smithy-client" "^2.1.15" - "@smithy/types" "^2.5.0" - tslib "^2.5.0" - -"@aws-sdk/signature-v4-multi-region@3.418.0": - version "3.418.0" - resolved "https://registry.npmjs.org/@aws-sdk/signature-v4-multi-region/-/signature-v4-multi-region-3.418.0.tgz#984c8fc948c61a7ad02f1ccc6c2ddecf43a265b1" - integrity sha512-LeVYMZeUQUURFqDf4yZxTEv016g64hi0LqYBjU0mjwd8aPc0k6hckwvshezc80jCNbuLyjNfQclvlg3iFliItQ== - dependencies: - "@aws-sdk/types" "3.418.0" - "@smithy/protocol-http" "^3.0.5" - "@smithy/signature-v4" "^2.0.0" - "@smithy/types" "^2.3.3" - tslib "^2.5.0" - -"@aws-sdk/signature-v4-multi-region@3.451.0": - version "3.451.0" - resolved "https://registry.npmjs.org/@aws-sdk/signature-v4-multi-region/-/signature-v4-multi-region-3.451.0.tgz#d8ec1b653037e3d979e6bb32df05a709ff32938b" - integrity sha512-qQKY7/txeNUTLyRL3WxUWEwaZ5sf76EIZgu9kLaR96cAYSxwQi/qQB3ijbfD6u7sJIA8aROMxeYK0VmRsQg0CA== - dependencies: - "@aws-sdk/types" "3.451.0" - "@smithy/protocol-http" "^3.0.9" - "@smithy/signature-v4" "^2.0.0" - "@smithy/types" "^2.5.0" - tslib "^2.5.0" - -"@aws-sdk/signature-v4-multi-region@3.635.0": - version "3.635.0" - resolved "https://registry.npmjs.org/@aws-sdk/signature-v4-multi-region/-/signature-v4-multi-region-3.635.0.tgz#76e8eb66bfd9b661b4f9768b18aca2e04dd781a2" - integrity sha512-J6QY4/invOkpogCHjSaDON1hF03viPpOnsrzVuCvJMmclS/iG62R4EY0wq1alYll0YmSdmKlpJwHMWwGtqK63Q== - dependencies: - "@aws-sdk/middleware-sdk-s3" "3.635.0" +"@aws-sdk/s3-request-presigner@3.632.0": + version "3.632.0" + resolved "https://registry.npmjs.org/@aws-sdk/s3-request-presigner/-/s3-request-presigner-3.632.0.tgz#ee05b0844fafc6c5f8afb17e3d543a2c8c0c73ff" + integrity sha512-gvN37+14lOE9bX8hz2ztJa8W37FgkNQiMTH72Mzmkaw8qeILUkB74nzq9JdRKJxB9QIWeWs7PeUP+8zUapuMrQ== + dependencies: + "@aws-sdk/signature-v4-multi-region" "3.629.0" "@aws-sdk/types" "3.609.0" + "@aws-sdk/util-format-url" "3.609.0" + "@smithy/middleware-endpoint" "^3.1.0" "@smithy/protocol-http" "^4.1.0" - "@smithy/signature-v4" "^4.1.0" + "@smithy/smithy-client" "^3.1.12" "@smithy/types" "^3.3.0" tslib "^2.6.2" -"@aws-sdk/token-providers@3.418.0": - version "3.418.0" - resolved "https://registry.npmjs.org/@aws-sdk/token-providers/-/token-providers-3.418.0.tgz#cbfac922df397e72daf6dbdd8c1e9a140df0aa0e" - integrity sha512-9P7Q0VN0hEzTngy3Sz5eya2qEOEf0Q8qf1vB3um0gE6ID6EVAdz/nc/DztfN32MFxk8FeVBrCP5vWdoOzmd72g== - dependencies: - "@aws-crypto/sha256-browser" "3.0.0" - "@aws-crypto/sha256-js" "3.0.0" - "@aws-sdk/middleware-host-header" "3.418.0" - "@aws-sdk/middleware-logger" "3.418.0" - "@aws-sdk/middleware-recursion-detection" "3.418.0" - "@aws-sdk/middleware-user-agent" "3.418.0" - "@aws-sdk/types" "3.418.0" - "@aws-sdk/util-endpoints" "3.418.0" - "@aws-sdk/util-user-agent-browser" "3.418.0" - "@aws-sdk/util-user-agent-node" "3.418.0" - "@smithy/config-resolver" "^2.0.10" - "@smithy/fetch-http-handler" "^2.1.5" - "@smithy/hash-node" "^2.0.9" - "@smithy/invalid-dependency" "^2.0.9" - "@smithy/middleware-content-length" "^2.0.11" - "@smithy/middleware-endpoint" "^2.0.9" - "@smithy/middleware-retry" "^2.0.12" - "@smithy/middleware-serde" "^2.0.9" - "@smithy/middleware-stack" "^2.0.2" - "@smithy/node-config-provider" "^2.0.12" - "@smithy/node-http-handler" "^2.1.5" - "@smithy/property-provider" "^2.0.0" - "@smithy/protocol-http" "^3.0.5" - "@smithy/shared-ini-file-loader" "^2.0.6" - "@smithy/smithy-client" "^2.1.6" - "@smithy/types" "^2.3.3" - "@smithy/url-parser" "^2.0.9" - "@smithy/util-base64" "^2.0.0" - "@smithy/util-body-length-browser" "^2.0.0" - "@smithy/util-body-length-node" "^2.1.0" - "@smithy/util-defaults-mode-browser" "^2.0.10" - "@smithy/util-defaults-mode-node" "^2.0.12" - "@smithy/util-retry" "^2.0.2" - "@smithy/util-utf8" "^2.0.0" - tslib "^2.5.0" - -"@aws-sdk/token-providers@3.451.0": - version "3.451.0" - resolved "https://registry.npmjs.org/@aws-sdk/token-providers/-/token-providers-3.451.0.tgz#fb80e2fa39bb277fb77040a59c88312a115c35bd" - integrity sha512-ij1L5iUbn6CwxVOT1PG4NFjsrsKN9c4N1YEM0lkl6DwmaNOscjLKGSNyj9M118vSWsOs1ZDbTwtj++h0O/BWrQ== - dependencies: - "@aws-crypto/sha256-browser" "3.0.0" - "@aws-crypto/sha256-js" "3.0.0" - "@aws-sdk/middleware-host-header" "3.451.0" - "@aws-sdk/middleware-logger" "3.451.0" - "@aws-sdk/middleware-recursion-detection" "3.451.0" - "@aws-sdk/middleware-user-agent" "3.451.0" - "@aws-sdk/region-config-resolver" "3.451.0" - "@aws-sdk/types" "3.451.0" - "@aws-sdk/util-endpoints" "3.451.0" - "@aws-sdk/util-user-agent-browser" "3.451.0" - "@aws-sdk/util-user-agent-node" "3.451.0" - "@smithy/config-resolver" "^2.0.18" - "@smithy/fetch-http-handler" "^2.2.6" - "@smithy/hash-node" "^2.0.15" - "@smithy/invalid-dependency" "^2.0.13" - "@smithy/middleware-content-length" "^2.0.15" - "@smithy/middleware-endpoint" "^2.2.0" - "@smithy/middleware-retry" "^2.0.20" - "@smithy/middleware-serde" "^2.0.13" - "@smithy/middleware-stack" "^2.0.7" - "@smithy/node-config-provider" "^2.1.5" - "@smithy/node-http-handler" "^2.1.9" - "@smithy/property-provider" "^2.0.0" - "@smithy/protocol-http" "^3.0.9" - "@smithy/shared-ini-file-loader" "^2.0.6" - "@smithy/smithy-client" "^2.1.15" - "@smithy/types" "^2.5.0" - "@smithy/url-parser" "^2.0.13" - "@smithy/util-base64" "^2.0.1" - "@smithy/util-body-length-browser" "^2.0.0" - "@smithy/util-body-length-node" "^2.1.0" - "@smithy/util-defaults-mode-browser" "^2.0.19" - "@smithy/util-defaults-mode-node" "^2.0.25" - "@smithy/util-endpoints" "^1.0.4" - "@smithy/util-retry" "^2.0.6" - "@smithy/util-utf8" "^2.0.2" - tslib "^2.5.0" - -"@aws-sdk/token-providers@3.470.0": - version "3.470.0" - resolved "https://registry.npmjs.org/@aws-sdk/token-providers/-/token-providers-3.470.0.tgz#635fa5db3f10919868a9f94be43241fbce206ede" - integrity sha512-rzxnJxEUJiV69Cxsf0AHXTqJqTACITwcSH/PL4lWP4uvtzdrzSi3KA3u2aWHWpOcdE6+JFvdICscsbBSo3/TOg== - dependencies: - "@aws-crypto/sha256-browser" "3.0.0" - "@aws-crypto/sha256-js" "3.0.0" - "@aws-sdk/middleware-host-header" "3.468.0" - "@aws-sdk/middleware-logger" "3.468.0" - "@aws-sdk/middleware-recursion-detection" "3.468.0" - "@aws-sdk/middleware-user-agent" "3.470.0" - "@aws-sdk/region-config-resolver" "3.470.0" - "@aws-sdk/types" "3.468.0" - "@aws-sdk/util-endpoints" "3.470.0" - "@aws-sdk/util-user-agent-browser" "3.468.0" - "@aws-sdk/util-user-agent-node" "3.470.0" - "@smithy/config-resolver" "^2.0.21" - "@smithy/fetch-http-handler" "^2.3.1" - "@smithy/hash-node" "^2.0.17" - "@smithy/invalid-dependency" "^2.0.15" - "@smithy/middleware-content-length" "^2.0.17" - "@smithy/middleware-endpoint" "^2.2.3" - "@smithy/middleware-retry" "^2.0.24" - "@smithy/middleware-serde" "^2.0.15" - "@smithy/middleware-stack" "^2.0.9" - "@smithy/node-config-provider" "^2.1.8" - "@smithy/node-http-handler" "^2.2.1" - "@smithy/property-provider" "^2.0.0" - "@smithy/protocol-http" "^3.0.11" - "@smithy/shared-ini-file-loader" "^2.0.6" - "@smithy/smithy-client" "^2.1.18" - "@smithy/types" "^2.7.0" - "@smithy/url-parser" "^2.0.15" - "@smithy/util-base64" "^2.0.1" - "@smithy/util-body-length-browser" "^2.0.1" - "@smithy/util-body-length-node" "^2.1.0" - "@smithy/util-defaults-mode-browser" "^2.0.22" - "@smithy/util-defaults-mode-node" "^2.0.29" - "@smithy/util-endpoints" "^1.0.7" - "@smithy/util-retry" "^2.0.8" - "@smithy/util-utf8" "^2.0.2" - tslib "^2.5.0" +"@aws-sdk/signature-v4-multi-region@3.629.0": + version "3.629.0" + resolved "https://registry.npmjs.org/@aws-sdk/signature-v4-multi-region/-/signature-v4-multi-region-3.629.0.tgz#ca75443f3324fd398d228c3cba0f4275e7bb4a3a" + integrity sha512-GPX6dnmuLGDFp7CsGqGCzleEoNyr9ekgOzSBtcL5nKX++NruxO7f1QzJAbcYvz0gdKvz958UO0EKsGM6hnkTSg== + dependencies: + "@aws-sdk/middleware-sdk-s3" "3.629.0" + "@aws-sdk/types" "3.609.0" + "@smithy/protocol-http" "^4.1.0" + "@smithy/signature-v4" "^4.1.0" + "@smithy/types" "^3.3.0" + tslib "^2.6.2" "@aws-sdk/token-providers@3.614.0": version "3.614.0" @@ -3995,41 +2400,17 @@ "@smithy/types" "^3.3.0" tslib "^2.6.2" -"@aws-sdk/token-providers@3.649.0": - version "3.649.0" - resolved "https://registry.npmjs.org/@aws-sdk/token-providers/-/token-providers-3.649.0.tgz#19a9bb26c191e4fe761f73a2f818cda2554a7767" - integrity sha512-ZBqr+JuXI9RiN+4DSZykMx5gxpL8Dr3exIfFhxMiwAP3DQojwl0ub8ONjMuAjq9OvmX6n+jHZL6fBnNgnNFC8w== +"@aws-sdk/token-providers@3.662.0": + version "3.662.0" + resolved "https://registry.npmjs.org/@aws-sdk/token-providers/-/token-providers-3.662.0.tgz#89c60983e13036cebc0e0310ae226e2254f5a741" + integrity sha512-OqtBPutNC9Am10P1W5IwqRvzCVQAHRxWxZnfDBh1FQjNmoboGWYSriKxbrCRYLFffusNuzo8KnOFOmg1sRlhJQ== dependencies: - "@aws-sdk/types" "3.649.0" - "@smithy/property-provider" "^3.1.4" - "@smithy/shared-ini-file-loader" "^3.1.5" - "@smithy/types" "^3.4.0" + "@aws-sdk/types" "3.662.0" + "@smithy/property-provider" "^3.1.7" + "@smithy/shared-ini-file-loader" "^3.1.8" + "@smithy/types" "^3.5.0" tslib "^2.6.2" -"@aws-sdk/types@3.418.0": - version "3.418.0" - resolved "https://registry.npmjs.org/@aws-sdk/types/-/types-3.418.0.tgz#c23213110b0c313d5546c810da032a441682f49a" - integrity sha512-y4PQSH+ulfFLY0+FYkaK4qbIaQI9IJNMO2xsxukW6/aNoApNymN1D2FSi2la8Qbp/iPjNDKsG8suNPm9NtsWXQ== - dependencies: - "@smithy/types" "^2.3.3" - tslib "^2.5.0" - -"@aws-sdk/types@3.451.0": - version "3.451.0" - resolved "https://registry.npmjs.org/@aws-sdk/types/-/types-3.451.0.tgz#37ab4b25074c6a36152eb36abb7399b3768c2e7b" - integrity sha512-rhK+qeYwCIs+laJfWCcrYEjay2FR/9VABZJ2NRM89jV/fKqGVQR52E5DQqrI+oEIL5JHMhhnr4N4fyECMS35lw== - dependencies: - "@smithy/types" "^2.5.0" - tslib "^2.5.0" - -"@aws-sdk/types@3.468.0": - version "3.468.0" - resolved "https://registry.npmjs.org/@aws-sdk/types/-/types-3.468.0.tgz#f97b34fc92a800d1d8b866f47693ae8f3d46517b" - integrity sha512-rx/9uHI4inRbp2tw3Y4Ih4PNZkVj32h7WneSg3MVgVjAoVD5Zti9KhS5hkvsBxfgmQmg0AQbE+b1sy5WGAgntA== - dependencies: - "@smithy/types" "^2.7.0" - tslib "^2.5.0" - "@aws-sdk/types@3.609.0": version "3.609.0" resolved "https://registry.npmjs.org/@aws-sdk/types/-/types-3.609.0.tgz#06b39d799c9f197a7b43670243e8e78a3bf7d6a5" @@ -4038,7 +2419,15 @@ "@smithy/types" "^3.3.0" tslib "^2.6.2" -"@aws-sdk/types@3.649.0", "@aws-sdk/types@^3.222.0", "@aws-sdk/types@^3.433.0": +"@aws-sdk/types@3.662.0": + version "3.662.0" + resolved "https://registry.npmjs.org/@aws-sdk/types/-/types-3.662.0.tgz#323de11059df4fd7169a381c166a8aae03abe757" + integrity sha512-Ff9/KRmIm8iEzodxzISLj4/pB/0hX2nVw1RFeOBC65OuM6nHrAdWHHog/CVx25hS5JPU0uE3h6NlWRaBJ7AV5w== + dependencies: + "@smithy/types" "^3.5.0" + tslib "^2.6.2" + +"@aws-sdk/types@^3.222.0": version "3.649.0" resolved "https://registry.npmjs.org/@aws-sdk/types/-/types-3.649.0.tgz#a6828e6338dc755e0c30b5f77321e63425a88aed" integrity sha512-PuPw8RysbhJNlaD2d/PzOTf8sbf4Dsn2b7hwyGh7YVG3S75yTpxSAZxrnhKsz9fStgqFmnw/jUfV/G+uQAeTVw== @@ -4046,13 +2435,6 @@ "@smithy/types" "^3.4.0" tslib "^2.6.2" -"@aws-sdk/util-arn-parser@3.310.0": - version "3.310.0" - resolved "https://registry.npmjs.org/@aws-sdk/util-arn-parser/-/util-arn-parser-3.310.0.tgz#861ff8810851be52a320ec9e4786f15b5fc74fba" - integrity sha512-jL8509owp/xB9+Or0pvn3Fe+b94qfklc2yPowZZIFAkFcCSIdkIglz18cPDWnYAcy9JGewpMS1COXKIUhZkJsA== - dependencies: - tslib "^2.5.0" - "@aws-sdk/util-arn-parser@3.568.0": version "3.568.0" resolved "https://registry.npmjs.org/@aws-sdk/util-arn-parser/-/util-arn-parser-3.568.0.tgz#6a19a8c6bbaa520b6be1c278b2b8c17875b91527" @@ -4060,71 +2442,35 @@ dependencies: tslib "^2.6.2" -"@aws-sdk/util-endpoints@3.418.0": - version "3.418.0" - resolved "https://registry.npmjs.org/@aws-sdk/util-endpoints/-/util-endpoints-3.418.0.tgz#462c976f054fe260562d4d2844152a04dd883fd7" - integrity sha512-sYSDwRTl7yE7LhHkPzemGzmIXFVHSsi3AQ1KeNEk84eBqxMHHcCc2kqklaBk2roXWe50QDgRMy1ikZUxvtzNHQ== - dependencies: - "@aws-sdk/types" "3.418.0" - tslib "^2.5.0" - -"@aws-sdk/util-endpoints@3.451.0": - version "3.451.0" - resolved "https://registry.npmjs.org/@aws-sdk/util-endpoints/-/util-endpoints-3.451.0.tgz#8719977c3535c6fec719a2854ffe037e02412ddb" - integrity sha512-giqLGBTnRIcKkDqwU7+GQhKbtJ5Ku35cjGQIfMyOga6pwTBUbaK0xW1Sdd8sBQ1GhApscnChzI9o/R9x0368vw== - dependencies: - "@aws-sdk/types" "3.451.0" - "@smithy/util-endpoints" "^1.0.4" - tslib "^2.5.0" - -"@aws-sdk/util-endpoints@3.470.0": - version "3.470.0" - resolved "https://registry.npmjs.org/@aws-sdk/util-endpoints/-/util-endpoints-3.470.0.tgz#94338991804f24e0225636abd4215b3bb4338c15" - integrity sha512-6N6VvPCmu+89p5Ez/+gLf+X620iQ9JpIs8p8ECZiCodirzFOe8NC1O2S7eov7YiG9IHSuodqn/0qNq+v+oLe0A== - dependencies: - "@aws-sdk/types" "3.468.0" - "@smithy/util-endpoints" "^1.0.7" - tslib "^2.5.0" - -"@aws-sdk/util-endpoints@3.637.0": - version "3.637.0" - resolved "https://registry.npmjs.org/@aws-sdk/util-endpoints/-/util-endpoints-3.637.0.tgz#e20bcb69028039fdbc06e98a3028c7f8d8e8adaa" - integrity sha512-pAqOKUHeVWHEXXDIp/qoMk/6jyxIb6GGjnK1/f8dKHtKIEs4tKsnnL563gceEvdad53OPXIt86uoevCcCzmBnw== +"@aws-sdk/util-endpoints@3.632.0": + version "3.632.0" + resolved "https://registry.npmjs.org/@aws-sdk/util-endpoints/-/util-endpoints-3.632.0.tgz#f8716bdc75fc322babc6a3faf943ee1d0e462124" + integrity sha512-LlYMU8pAbcEQphOpE6xaNLJ8kPGhklZZTVzZVpVW477NaaGgoGTMYNXTABYHcxeF5E2lLrxql9OmVpvr8GWN8Q== dependencies: "@aws-sdk/types" "3.609.0" "@smithy/types" "^3.3.0" "@smithy/util-endpoints" "^2.0.5" tslib "^2.6.2" -"@aws-sdk/util-endpoints@3.649.0": - version "3.649.0" - resolved "https://registry.npmjs.org/@aws-sdk/util-endpoints/-/util-endpoints-3.649.0.tgz#0f359a87ddbe8a4dbce11a8f7f9e295a3b9e6612" - integrity sha512-bZI1Wc3R/KibdDVWFxX/N4AoJFG4VJ92Dp4WYmOrVD6VPkb8jPz7ZeiYc7YwPl8NoDjYyPneBV0lEoK/V8OKAA== +"@aws-sdk/util-endpoints@3.662.0": + version "3.662.0" + resolved "https://registry.npmjs.org/@aws-sdk/util-endpoints/-/util-endpoints-3.662.0.tgz#a124838077ae230bba605310a73e43493e58e3d1" + integrity sha512-RQ/78yNUxZZZULFg7VxT7oObGOR/FBc0ojiFoCAKC20ycY8VvVX5Eof4gyxoVpwOP7EoZO3UlWSIqtaEV/X70w== dependencies: - "@aws-sdk/types" "3.649.0" - "@smithy/types" "^3.4.0" - "@smithy/util-endpoints" "^2.1.0" + "@aws-sdk/types" "3.662.0" + "@smithy/types" "^3.5.0" + "@smithy/util-endpoints" "^2.1.3" tslib "^2.6.2" -"@aws-sdk/util-format-url@3.418.0": - version "3.418.0" - resolved "https://registry.npmjs.org/@aws-sdk/util-format-url/-/util-format-url-3.418.0.tgz#85035e704f5996189aeec2a7bd08265bcd87f1e1" - integrity sha512-7/Xy+8J1txuOYOKsez6vpKTIkHYIIX4c7anjp/aQgUQL23FDwkPisj56cIlevJ7useGugnYw1rUR6fMULGzQ/g== - dependencies: - "@aws-sdk/types" "3.418.0" - "@smithy/querystring-builder" "^2.0.9" - "@smithy/types" "^2.3.3" - tslib "^2.5.0" - -"@aws-sdk/util-format-url@3.451.0": - version "3.451.0" - resolved "https://registry.npmjs.org/@aws-sdk/util-format-url/-/util-format-url-3.451.0.tgz#23cc697f02f2160cad327024e512bd78fbfa0dd8" - integrity sha512-gmcqSFTIISU9iN6rSbc8HVqB9ACluPbo4mS0ztkk9DaDz5zK/YxoKBJSfqkZFidMzxYiXeWruDCxD8ZgYRn6ug== +"@aws-sdk/util-format-url@3.609.0": + version "3.609.0" + resolved "https://registry.npmjs.org/@aws-sdk/util-format-url/-/util-format-url-3.609.0.tgz#f53907193bb636b52b61c81bbe6d7bd5ddc76c68" + integrity sha512-fuk29BI/oLQlJ7pfm6iJ4gkEpHdavffAALZwXh9eaY1vQ0ip0aKfRTiNudPoJjyyahnz5yJ1HkmlcDitlzsOrQ== dependencies: - "@aws-sdk/types" "3.451.0" - "@smithy/querystring-builder" "^2.0.13" - "@smithy/types" "^2.5.0" - tslib "^2.5.0" + "@aws-sdk/types" "3.609.0" + "@smithy/querystring-builder" "^3.0.3" + "@smithy/types" "^3.3.0" + tslib "^2.6.2" "@aws-sdk/util-locate-window@^3.0.0": version "3.568.0" @@ -4133,36 +2479,6 @@ dependencies: tslib "^2.6.2" -"@aws-sdk/util-user-agent-browser@3.418.0": - version "3.418.0" - resolved "https://registry.npmjs.org/@aws-sdk/util-user-agent-browser/-/util-user-agent-browser-3.418.0.tgz#dc76b8e7e5cae3f827d68cd4a3ee30c0d475a39c" - integrity sha512-c4p4mc0VV/jIeNH0lsXzhJ1MpWRLuboGtNEpqE4s1Vl9ck2amv9VdUUZUmHbg+bVxlMgRQ4nmiovA4qIrqGuyg== - dependencies: - "@aws-sdk/types" "3.418.0" - "@smithy/types" "^2.3.3" - bowser "^2.11.0" - tslib "^2.5.0" - -"@aws-sdk/util-user-agent-browser@3.451.0": - version "3.451.0" - resolved "https://registry.npmjs.org/@aws-sdk/util-user-agent-browser/-/util-user-agent-browser-3.451.0.tgz#0b511703c3304a5c2fdaa864589246c93ad63dce" - integrity sha512-Ws5mG3J0TQifH7OTcMrCTexo7HeSAc3cBgjfhS/ofzPUzVCtsyg0G7I6T7wl7vJJETix2Kst2cpOsxygPgPD9w== - dependencies: - "@aws-sdk/types" "3.451.0" - "@smithy/types" "^2.5.0" - bowser "^2.11.0" - tslib "^2.5.0" - -"@aws-sdk/util-user-agent-browser@3.468.0": - version "3.468.0" - resolved "https://registry.npmjs.org/@aws-sdk/util-user-agent-browser/-/util-user-agent-browser-3.468.0.tgz#095caecb3fd75104ee38ae81ed78821de0f58e28" - integrity sha512-OJyhWWsDEizR3L+dCgMXSUmaCywkiZ7HSbnQytbeKGwokIhD69HTiJcibF/sgcM5gk4k3Mq3puUhGnEZ46GIig== - dependencies: - "@aws-sdk/types" "3.468.0" - "@smithy/types" "^2.7.0" - bowser "^2.11.0" - tslib "^2.5.0" - "@aws-sdk/util-user-agent-browser@3.609.0": version "3.609.0" resolved "https://registry.npmjs.org/@aws-sdk/util-user-agent-browser/-/util-user-agent-browser-3.609.0.tgz#aa15421b2e32ae8bc589dac2bd6e8969832ce588" @@ -4173,46 +2489,16 @@ bowser "^2.11.0" tslib "^2.6.2" -"@aws-sdk/util-user-agent-browser@3.649.0": - version "3.649.0" - resolved "https://registry.npmjs.org/@aws-sdk/util-user-agent-browser/-/util-user-agent-browser-3.649.0.tgz#fa533fe882757f82b7b9f2927dda8111f3601b33" - integrity sha512-IY43r256LhKAvdEVQO/FPdUyVpcZS5EVxh/WHVdNzuN1bNLoUK2rIzuZqVA0EGguvCxoXVmQv9m50GvG7cGktg== +"@aws-sdk/util-user-agent-browser@3.662.0": + version "3.662.0" + resolved "https://registry.npmjs.org/@aws-sdk/util-user-agent-browser/-/util-user-agent-browser-3.662.0.tgz#b17b847b38ffa88944939534069bf78a277723ed" + integrity sha512-5wQd+HbNTY1r1Gndxf93dAEFtKz1DqcalI4Ym40To+RIonSsYQNRomFoizYNgJ1P+Mkfsr4P1dy/MNTlkqTZuQ== dependencies: - "@aws-sdk/types" "3.649.0" - "@smithy/types" "^3.4.0" + "@aws-sdk/types" "3.662.0" + "@smithy/types" "^3.5.0" bowser "^2.11.0" tslib "^2.6.2" -"@aws-sdk/util-user-agent-node@3.418.0": - version "3.418.0" - resolved "https://registry.npmjs.org/@aws-sdk/util-user-agent-node/-/util-user-agent-node-3.418.0.tgz#7d5a1c82ce3265ff0f70b13d58d08593113ab99a" - integrity sha512-BXMskXFtg+dmzSCgmnWOffokxIbPr1lFqa1D9kvM3l3IFRiFGx2IyDg+8MAhq11aPDLvoa/BDuQ0Yqma5izOhg== - dependencies: - "@aws-sdk/types" "3.418.0" - "@smithy/node-config-provider" "^2.0.12" - "@smithy/types" "^2.3.3" - tslib "^2.5.0" - -"@aws-sdk/util-user-agent-node@3.451.0": - version "3.451.0" - resolved "https://registry.npmjs.org/@aws-sdk/util-user-agent-node/-/util-user-agent-node-3.451.0.tgz#f2af3f0d3f0389a14a7dbbc835dc94c705c0a39a" - integrity sha512-TBzm6P+ql4mkGFAjPlO1CI+w3yUT+NulaiALjl/jNX/nnUp6HsJsVxJf4nVFQTG5KRV0iqMypcs7I3KIhH+LmA== - dependencies: - "@aws-sdk/types" "3.451.0" - "@smithy/node-config-provider" "^2.1.5" - "@smithy/types" "^2.5.0" - tslib "^2.5.0" - -"@aws-sdk/util-user-agent-node@3.470.0": - version "3.470.0" - resolved "https://registry.npmjs.org/@aws-sdk/util-user-agent-node/-/util-user-agent-node-3.470.0.tgz#b78605f336859d6c3b5f573cff931ce41f83a27d" - integrity sha512-QxsZ9iVHcBB/XRdYvwfM5AMvNp58HfqkIrH88mY0cmxuvtlIGDfWjczdDrZMJk9y0vIq+cuoCHsGXHu7PyiEAQ== - dependencies: - "@aws-sdk/types" "3.468.0" - "@smithy/node-config-provider" "^2.1.8" - "@smithy/types" "^2.7.0" - tslib "^2.5.0" - "@aws-sdk/util-user-agent-node@3.614.0": version "3.614.0" resolved "https://registry.npmjs.org/@aws-sdk/util-user-agent-node/-/util-user-agent-node-3.614.0.tgz#1e3f49a80f841a3f21647baed2adce01aac5beb5" @@ -4223,30 +2509,16 @@ "@smithy/types" "^3.3.0" tslib "^2.6.2" -"@aws-sdk/util-user-agent-node@3.649.0": - version "3.649.0" - resolved "https://registry.npmjs.org/@aws-sdk/util-user-agent-node/-/util-user-agent-node-3.649.0.tgz#715e490b190fe7fb7df0d83be7e84a31be99cb11" - integrity sha512-x5DiLpZDG/AJmCIBnE3Xhpwy35QIo3WqNiOpw6ExVs1NydbM/e90zFPSfhME0FM66D/WorigvluBxxwjxDm/GA== +"@aws-sdk/util-user-agent-node@3.662.0": + version "3.662.0" + resolved "https://registry.npmjs.org/@aws-sdk/util-user-agent-node/-/util-user-agent-node-3.662.0.tgz#7199eef53edb1c175e455c94596294541a5aaef4" + integrity sha512-vBRbZ9Hr1OGmdJPWj36X0fR8/VdI2JiwK6+oJRa6qfJ6AnhqCYZbCyeA6JIDeEu3M9iu1OLjenU8NdXhTz8c2w== dependencies: - "@aws-sdk/types" "3.649.0" - "@smithy/node-config-provider" "^3.1.5" - "@smithy/types" "^3.4.0" + "@aws-sdk/types" "3.662.0" + "@smithy/node-config-provider" "^3.1.8" + "@smithy/types" "^3.5.0" tslib "^2.6.2" -"@aws-sdk/util-utf8-browser@^3.0.0": - version "3.259.0" - resolved "https://registry.npmjs.org/@aws-sdk/util-utf8-browser/-/util-utf8-browser-3.259.0.tgz#3275a6f5eb334f96ca76635b961d3c50259fd9ff" - integrity sha512-UvFa/vR+e19XookZF8RzFZBrw2EUkQWxiBW0yYQAhvk3C+QVGl0H3ouca8LDBlBfQKXwmW3huo/59H8rwb1wJw== - dependencies: - tslib "^2.3.1" - -"@aws-sdk/xml-builder@3.310.0": - version "3.310.0" - resolved "https://registry.npmjs.org/@aws-sdk/xml-builder/-/xml-builder-3.310.0.tgz#f0236f2103b438d16117e0939a6305ad69b7ff76" - integrity sha512-TqELu4mOuSIKQCqj63fGVs86Yh+vBx5nHRpWKNUNhB2nPTpfbziTs5c1X358be3peVWA4wPxW7Nt53KIg1tnNw== - dependencies: - tslib "^2.5.0" - "@aws-sdk/xml-builder@3.609.0": version "3.609.0" resolved "https://registry.npmjs.org/@aws-sdk/xml-builder/-/xml-builder-3.609.0.tgz#eeb3d5cde000a23cfeeefe0354b6193440dc7d87" @@ -6273,22 +4545,6 @@ resolved "https://registry.npmjs.org/@sinonjs/text-encoding/-/text-encoding-0.7.3.tgz#282046f03e886e352b2d5f5da5eb755e01457f3f" integrity sha512-DE427ROAphMQzU4ENbliGYrBSYPXF+TtLg9S8vzeA+OF4ZKzoDdzfL8sxuMUGS/lgRhM6j1URSk9ghf7Xo1tyA== -"@smithy/abort-controller@^1.1.0": - version "1.1.0" - resolved "https://registry.npmjs.org/@smithy/abort-controller/-/abort-controller-1.1.0.tgz#2da0d73c504b93ca8bb83bdc8d6b8208d73f418b" - integrity sha512-5imgGUlZL4dW4YWdMYAKLmal9ny/tlenM81QZY7xYyb76z9Z/QOg7oM5Ak9HQl8QfFTlGVWwcMXl+54jroRgEQ== - dependencies: - "@smithy/types" "^1.2.0" - tslib "^2.5.0" - -"@smithy/abort-controller@^2.2.0": - version "2.2.0" - resolved "https://registry.npmjs.org/@smithy/abort-controller/-/abort-controller-2.2.0.tgz#18983401a5e2154b5c94057730024a7d14cbcd35" - integrity sha512-wRlta7GuLWpTqtFfGo+nZyOO1vEvewdNR1R4rTxpC8XU6vG/NDyrFBhwLZsqg1NUoR1noVaXJPC/7ZK47QCySw== - dependencies: - "@smithy/types" "^2.12.0" - tslib "^2.6.2" - "@smithy/abort-controller@^3.1.2": version "3.1.2" resolved "https://registry.npmjs.org/@smithy/abort-controller/-/abort-controller-3.1.2.tgz#95ac6b07480d0d2afbcface3f0f1ddc3ae6373d7" @@ -6297,12 +4553,12 @@ "@smithy/types" "^3.4.0" tslib "^2.6.2" -"@smithy/chunked-blob-reader-native@^2.2.0": - version "2.2.0" - resolved "https://registry.npmjs.org/@smithy/chunked-blob-reader-native/-/chunked-blob-reader-native-2.2.0.tgz#aff8bddf9fdc1052f885e1b15aa81e4d274e541e" - integrity sha512-VNB5+1oCgX3Fzs072yuRsUoC2N4Zg/LJ11DTxX3+Qu+Paa6AmbIF0E9sc2wthz9Psrk/zcOlTCyuposlIhPjZQ== +"@smithy/abort-controller@^3.1.5": + version "3.1.5" + resolved "https://registry.npmjs.org/@smithy/abort-controller/-/abort-controller-3.1.5.tgz#ca7a86a3c6b20fabe59667143f58d9e198616d14" + integrity sha512-DhNPnqTqPoG8aZ5dWkFOgsuY+i0GQ3CI6hMmvCoduNsnU9gUZWZBwGfDQsTTB7NvFPkom1df7jMIJWU90kuXXg== dependencies: - "@smithy/util-base64" "^2.3.0" + "@smithy/types" "^3.5.0" tslib "^2.6.2" "@smithy/chunked-blob-reader-native@^3.0.0": @@ -6313,13 +4569,6 @@ "@smithy/util-base64" "^3.0.0" tslib "^2.6.2" -"@smithy/chunked-blob-reader@^2.2.0": - version "2.2.0" - resolved "https://registry.npmjs.org/@smithy/chunked-blob-reader/-/chunked-blob-reader-2.2.0.tgz#192c1787bf3f4f87e2763803425f418e6e613e09" - integrity sha512-3GJNvRwXBGdkDZZOGiziVYzDpn4j6zfyULHMDKAGIUo72yHALpE9CbhfQp/XcLNVoc1byfMpn6uW5H2BqPjgaQ== - dependencies: - tslib "^2.6.2" - "@smithy/chunked-blob-reader@^3.0.0": version "3.0.0" resolved "https://registry.npmjs.org/@smithy/chunked-blob-reader/-/chunked-blob-reader-3.0.0.tgz#e5d3b04e9b273ba8b7ede47461e2aa96c8aa49e0" @@ -6327,18 +4576,7 @@ dependencies: tslib "^2.6.2" -"@smithy/config-resolver@^2.0.10", "@smithy/config-resolver@^2.0.18", "@smithy/config-resolver@^2.0.21", "@smithy/config-resolver@^2.2.0": - version "2.2.0" - resolved "https://registry.npmjs.org/@smithy/config-resolver/-/config-resolver-2.2.0.tgz#54f40478bb61709b396960a3535866dba5422757" - integrity sha512-fsiMgd8toyUba6n1WRmr+qACzXltpdDkPTAaDqc8QqPBUzO+/JKwL6bUBseHVi8tu9l+3JOK+tSf7cay+4B3LA== - dependencies: - "@smithy/node-config-provider" "^2.3.0" - "@smithy/types" "^2.12.0" - "@smithy/util-config-provider" "^2.3.0" - "@smithy/util-middleware" "^2.2.0" - tslib "^2.6.2" - -"@smithy/config-resolver@^3.0.5", "@smithy/config-resolver@^3.0.6": +"@smithy/config-resolver@^3.0.5": version "3.0.6" resolved "https://registry.npmjs.org/@smithy/config-resolver/-/config-resolver-3.0.6.tgz#5906cb8fcbadb784930c55a578589aaa6650a52f" integrity sha512-j7HuVNoRd8EhcFp0MzcUb4fG40C7BcyshH+fAd3Jhd8bINNFvEQYBrZoS/SK6Pun9WPlfoI8uuU2SMz8DsEGlA== @@ -6349,48 +4587,34 @@ "@smithy/util-middleware" "^3.0.4" tslib "^2.6.2" -"@smithy/core@^1.1.0": - version "1.4.2" - resolved "https://registry.npmjs.org/@smithy/core/-/core-1.4.2.tgz#1c3ed886d403041ce5bd2d816448420c57baa19c" - integrity sha512-2fek3I0KZHWJlRLvRTqxTEri+qV0GRHrJIoLFuBMZB4EMg4WgeBGfF0X6abnrNYpq55KJ6R4D6x4f0vLnhzinA== - dependencies: - "@smithy/middleware-endpoint" "^2.5.1" - "@smithy/middleware-retry" "^2.3.1" - "@smithy/middleware-serde" "^2.3.0" - "@smithy/protocol-http" "^3.3.0" - "@smithy/smithy-client" "^2.5.1" - "@smithy/types" "^2.12.0" - "@smithy/util-middleware" "^2.2.0" +"@smithy/config-resolver@^3.0.9": + version "3.0.9" + resolved "https://registry.npmjs.org/@smithy/config-resolver/-/config-resolver-3.0.9.tgz#dcf4b7747ca481866f9bfac21469ebe2031a599e" + integrity sha512-5d9oBf40qC7n2xUoHmntKLdqsyTMMo/r49+eqSIjJ73eDfEtljAxEhzIQ3bkgXJtR3xiv7YzMT/3FF3ORkjWdg== + dependencies: + "@smithy/node-config-provider" "^3.1.8" + "@smithy/types" "^3.5.0" + "@smithy/util-config-provider" "^3.0.0" + "@smithy/util-middleware" "^3.0.7" tslib "^2.6.2" -"@smithy/core@^2.4.0", "@smithy/core@^2.4.1": - version "2.4.1" - resolved "https://registry.npmjs.org/@smithy/core/-/core-2.4.1.tgz#6694d79ba6e4a185a0baa731ba6584420291521e" - integrity sha512-7cts7/Oni7aCHebHGiBeWoz5z+vmH+Vx2Z/UW3XtXMslcxI3PEwBZxNinepwZjixS3n12fPc247PHWmjU7ndsQ== +"@smithy/core@^2.3.2", "@smithy/core@^2.4.7": + version "2.4.8" + resolved "https://registry.npmjs.org/@smithy/core/-/core-2.4.8.tgz#397ac17dfa8ad658b77f96f19484f0eeaf22d397" + integrity sha512-x4qWk7p/a4dcf7Vxb2MODIf4OIcqNbK182WxRvZ/3oKPrf/6Fdic5sSElhO1UtXpWKBazWfqg0ZEK9xN1DsuHA== dependencies: - "@smithy/middleware-endpoint" "^3.1.1" - "@smithy/middleware-retry" "^3.0.16" - "@smithy/middleware-serde" "^3.0.4" - "@smithy/protocol-http" "^4.1.1" - "@smithy/smithy-client" "^3.3.0" - "@smithy/types" "^3.4.0" + "@smithy/middleware-endpoint" "^3.1.4" + "@smithy/middleware-retry" "^3.0.23" + "@smithy/middleware-serde" "^3.0.7" + "@smithy/protocol-http" "^4.1.4" + "@smithy/smithy-client" "^3.4.0" + "@smithy/types" "^3.5.0" "@smithy/util-body-length-browser" "^3.0.0" - "@smithy/util-middleware" "^3.0.4" + "@smithy/util-middleware" "^3.0.7" "@smithy/util-utf8" "^3.0.0" tslib "^2.6.2" -"@smithy/credential-provider-imds@^2.0.0", "@smithy/credential-provider-imds@^2.3.0": - version "2.3.0" - resolved "https://registry.npmjs.org/@smithy/credential-provider-imds/-/credential-provider-imds-2.3.0.tgz#326ce401b82e53f3c7ee4862a066136959a06166" - integrity sha512-BWB9mIukO1wjEOo1Ojgl6LrG4avcaC7T/ZP6ptmAaW4xluhSIPZhY+/PI5YKzlk+jsm+4sQZB45Bt1OfMeQa3w== - dependencies: - "@smithy/node-config-provider" "^2.3.0" - "@smithy/property-provider" "^2.2.0" - "@smithy/types" "^2.12.0" - "@smithy/url-parser" "^2.2.0" - tslib "^2.6.2" - -"@smithy/credential-provider-imds@^3.2.0", "@smithy/credential-provider-imds@^3.2.1": +"@smithy/credential-provider-imds@^3.2.0": version "3.2.1" resolved "https://registry.npmjs.org/@smithy/credential-provider-imds/-/credential-provider-imds-3.2.1.tgz#f5871549d01db304c3d5c52dd6591652ebfdfa9e" integrity sha512-4z/oTWpRF2TqQI3aCM89/PWu3kim58XU4kOCTtuTJnoaS4KT95cPWMxbQfTN2vzcOe96SOKO8QouQW/+ESB1fQ== @@ -6401,14 +4625,15 @@ "@smithy/url-parser" "^3.0.4" tslib "^2.6.2" -"@smithy/eventstream-codec@^2.2.0": - version "2.2.0" - resolved "https://registry.npmjs.org/@smithy/eventstream-codec/-/eventstream-codec-2.2.0.tgz#63d74fa817188995eb55e792a38060b0ede98dc4" - integrity sha512-8janZoJw85nJmQZc4L8TuePp2pk1nxLgkxIR0TUjKJ5Dkj5oelB9WtiSSGXCQvNsJl0VSTvK/2ueMXxvpa9GVw== +"@smithy/credential-provider-imds@^3.2.4": + version "3.2.4" + resolved "https://registry.npmjs.org/@smithy/credential-provider-imds/-/credential-provider-imds-3.2.4.tgz#e1a2bfc8a0066f673756ad8735247cf284b9735c" + integrity sha512-S9bb0EIokfYEuar4kEbLta+ivlKCWOCFsLZuilkNy9i0uEUEHSi47IFLPaxqqCl+0ftKmcOTHayY5nQhAuq7+w== dependencies: - "@aws-crypto/crc32" "3.0.0" - "@smithy/types" "^2.12.0" - "@smithy/util-hex-encoding" "^2.2.0" + "@smithy/node-config-provider" "^3.1.8" + "@smithy/property-provider" "^3.1.7" + "@smithy/types" "^3.5.0" + "@smithy/url-parser" "^3.0.7" tslib "^2.6.2" "@smithy/eventstream-codec@^3.1.3": @@ -6421,15 +4646,6 @@ "@smithy/util-hex-encoding" "^3.0.0" tslib "^2.6.2" -"@smithy/eventstream-serde-browser@^2.0.13", "@smithy/eventstream-serde-browser@^2.0.9": - version "2.2.0" - resolved "https://registry.npmjs.org/@smithy/eventstream-serde-browser/-/eventstream-serde-browser-2.2.0.tgz#69c93cc0210f04caeb0770856ef88c9a82564e11" - integrity sha512-UaPf8jKbcP71BGiO0CdeLmlg+RhWnlN8ipsMSdwvqBFigl5nil3rHOI/5GE3tfiuX8LvY5Z9N0meuU7Rab7jWw== - dependencies: - "@smithy/eventstream-serde-universal" "^2.2.0" - "@smithy/types" "^2.12.0" - tslib "^2.6.2" - "@smithy/eventstream-serde-browser@^3.0.6": version "3.0.7" resolved "https://registry.npmjs.org/@smithy/eventstream-serde-browser/-/eventstream-serde-browser-3.0.7.tgz#0448ada47cf7e99abdfefe980090ea2b8abbff8d" @@ -6439,14 +4655,6 @@ "@smithy/types" "^3.4.0" tslib "^2.6.2" -"@smithy/eventstream-serde-config-resolver@^2.0.13", "@smithy/eventstream-serde-config-resolver@^2.0.9": - version "2.2.0" - resolved "https://registry.npmjs.org/@smithy/eventstream-serde-config-resolver/-/eventstream-serde-config-resolver-2.2.0.tgz#23c8698ce594a128bcc556153efb7fecf6d04f87" - integrity sha512-RHhbTw/JW3+r8QQH7PrganjNCiuiEZmpi6fYUAetFfPLfZ6EkiA08uN3EFfcyKubXQxOwTeJRZSQmDDCdUshaA== - dependencies: - "@smithy/types" "^2.12.0" - tslib "^2.6.2" - "@smithy/eventstream-serde-config-resolver@^3.0.3": version "3.0.4" resolved "https://registry.npmjs.org/@smithy/eventstream-serde-config-resolver/-/eventstream-serde-config-resolver-3.0.4.tgz#1ef67a2f78da7b30ec728a8863933fa2d088330b" @@ -6455,15 +4663,6 @@ "@smithy/types" "^3.4.0" tslib "^2.6.2" -"@smithy/eventstream-serde-node@^2.0.13", "@smithy/eventstream-serde-node@^2.0.9": - version "2.2.0" - resolved "https://registry.npmjs.org/@smithy/eventstream-serde-node/-/eventstream-serde-node-2.2.0.tgz#b82870a838b1bd32ad6e0cf33a520191a325508e" - integrity sha512-zpQMtJVqCUMn+pCSFcl9K/RPNtQE0NuMh8sKpCdEHafhwRsjP50Oq/4kMmvxSRy6d8Jslqd8BLvDngrUtmN9iA== - dependencies: - "@smithy/eventstream-serde-universal" "^2.2.0" - "@smithy/types" "^2.12.0" - tslib "^2.6.2" - "@smithy/eventstream-serde-node@^3.0.5": version "3.0.6" resolved "https://registry.npmjs.org/@smithy/eventstream-serde-node/-/eventstream-serde-node-3.0.6.tgz#d04c31f8fe4aab29f2edbff8ea6519fe50405e43" @@ -6473,15 +4672,6 @@ "@smithy/types" "^3.4.0" tslib "^2.6.2" -"@smithy/eventstream-serde-universal@^2.2.0": - version "2.2.0" - resolved "https://registry.npmjs.org/@smithy/eventstream-serde-universal/-/eventstream-serde-universal-2.2.0.tgz#a75e330040d5e2ca2ac0d8bccde3e390ac5afd38" - integrity sha512-pvoe/vvJY0mOpuF84BEtyZoYfbehiFj8KKWk1ds2AT0mTLYFVs+7sBJZmioOFdBXKd48lfrx1vumdPdmGlCLxA== - dependencies: - "@smithy/eventstream-codec" "^2.2.0" - "@smithy/types" "^2.12.0" - tslib "^2.6.2" - "@smithy/eventstream-serde-universal@^3.0.6": version "3.0.6" resolved "https://registry.npmjs.org/@smithy/eventstream-serde-universal/-/eventstream-serde-universal-3.0.6.tgz#d233d08bf4b27d9bf4b1e727d866694470966797" @@ -6491,17 +4681,6 @@ "@smithy/types" "^3.4.0" tslib "^2.6.2" -"@smithy/fetch-http-handler@^2.1.5", "@smithy/fetch-http-handler@^2.2.6", "@smithy/fetch-http-handler@^2.3.1", "@smithy/fetch-http-handler@^2.5.0": - version "2.5.0" - resolved "https://registry.npmjs.org/@smithy/fetch-http-handler/-/fetch-http-handler-2.5.0.tgz#0b8e1562807fdf91fe7dd5cde620d7a03ddc10ac" - integrity sha512-BOWEBeppWhLn/no/JxUL/ghTfANTjT7kg3Ww2rPqTUY9R4yHPXxJ9JhMe3Z03LN3aPwiwlpDIUcVw1xDyHqEhw== - dependencies: - "@smithy/protocol-http" "^3.3.0" - "@smithy/querystring-builder" "^2.2.0" - "@smithy/types" "^2.12.0" - "@smithy/util-base64" "^2.3.0" - tslib "^2.6.2" - "@smithy/fetch-http-handler@^3.2.4", "@smithy/fetch-http-handler@^3.2.5": version "3.2.5" resolved "https://registry.npmjs.org/@smithy/fetch-http-handler/-/fetch-http-handler-3.2.5.tgz#c9a6c6c35895ffdfd98b992ecebb1344418d1932" @@ -6513,14 +4692,15 @@ "@smithy/util-base64" "^3.0.0" tslib "^2.6.2" -"@smithy/hash-blob-browser@^2.0.14", "@smithy/hash-blob-browser@^2.0.9": - version "2.2.0" - resolved "https://registry.npmjs.org/@smithy/hash-blob-browser/-/hash-blob-browser-2.2.0.tgz#d26db0e88b8fc4b59ee487bd026363ea9b48cf3a" - integrity sha512-SGPoVH8mdXBqrkVCJ1Hd1X7vh1zDXojNN1yZyZTZsCno99hVue9+IYzWDjq/EQDDXxmITB0gBmuyPh8oAZSTcg== +"@smithy/fetch-http-handler@^3.2.9": + version "3.2.9" + resolved "https://registry.npmjs.org/@smithy/fetch-http-handler/-/fetch-http-handler-3.2.9.tgz#8d5199c162a37caa37a8b6848eefa9ca58221a0b" + integrity sha512-hYNVQOqhFQ6vOpenifFME546f0GfJn2OiQ3M0FDmuUu8V/Uiwy2wej7ZXxFBNqdx0R5DZAqWM1l6VRhGz8oE6A== dependencies: - "@smithy/chunked-blob-reader" "^2.2.0" - "@smithy/chunked-blob-reader-native" "^2.2.0" - "@smithy/types" "^2.12.0" + "@smithy/protocol-http" "^4.1.4" + "@smithy/querystring-builder" "^3.0.7" + "@smithy/types" "^3.5.0" + "@smithy/util-base64" "^3.0.0" tslib "^2.6.2" "@smithy/hash-blob-browser@^3.1.2": @@ -6533,17 +4713,7 @@ "@smithy/types" "^3.4.0" tslib "^2.6.2" -"@smithy/hash-node@^2.0.15", "@smithy/hash-node@^2.0.17", "@smithy/hash-node@^2.0.9": - version "2.2.0" - resolved "https://registry.npmjs.org/@smithy/hash-node/-/hash-node-2.2.0.tgz#df29e1e64811be905cb3577703b0e2d0b07fc5cc" - integrity sha512-zLWaC/5aWpMrHKpoDF6nqpNtBhlAYKF/7+9yMN7GpdR8CzohnWfGtMznPybnwSS8saaXBMxIGwJqR4HmRp6b3g== - dependencies: - "@smithy/types" "^2.12.0" - "@smithy/util-buffer-from" "^2.2.0" - "@smithy/util-utf8" "^2.3.0" - tslib "^2.6.2" - -"@smithy/hash-node@^3.0.3", "@smithy/hash-node@^3.0.4": +"@smithy/hash-node@^3.0.3": version "3.0.4" resolved "https://registry.npmjs.org/@smithy/hash-node/-/hash-node-3.0.4.tgz#4d1770a73698292997b9ff27435ed4d51a39e758" integrity sha512-6FgTVqEfCr9z/7+Em8BwSkJKA2y3krf1em134x3yr2NHWVCo2KYI8tcA53cjeO47y41jwF84ntsEE0Pe6pNKlg== @@ -6553,13 +4723,14 @@ "@smithy/util-utf8" "^3.0.0" tslib "^2.6.2" -"@smithy/hash-stream-node@^2.0.15", "@smithy/hash-stream-node@^2.0.9": - version "2.2.0" - resolved "https://registry.npmjs.org/@smithy/hash-stream-node/-/hash-stream-node-2.2.0.tgz#7b341fdc89851af6b98d8c01e47185caf0a4b2d9" - integrity sha512-aT+HCATOSRMGpPI7bi7NSsTNVZE/La9IaxLXWoVAYMxHT5hGO3ZOGEMZQg8A6nNL+pdFGtZQtND1eoY084HgHQ== +"@smithy/hash-node@^3.0.7": + version "3.0.7" + resolved "https://registry.npmjs.org/@smithy/hash-node/-/hash-node-3.0.7.tgz#03b5a382fb588b8c2bac11b4fe7300aaf1661c88" + integrity sha512-SAGHN+QkrwcHFjfWzs/czX94ZEjPJ0CrWJS3M43WswDXVEuP4AVy9gJ3+AF6JQHZD13bojmuf/Ap/ItDeZ+Qfw== dependencies: - "@smithy/types" "^2.12.0" - "@smithy/util-utf8" "^2.3.0" + "@smithy/types" "^3.5.0" + "@smithy/util-buffer-from" "^3.0.0" + "@smithy/util-utf8" "^3.0.0" tslib "^2.6.2" "@smithy/hash-stream-node@^3.1.2": @@ -6571,15 +4742,7 @@ "@smithy/util-utf8" "^3.0.0" tslib "^2.6.2" -"@smithy/invalid-dependency@^2.0.13", "@smithy/invalid-dependency@^2.0.15", "@smithy/invalid-dependency@^2.0.9": - version "2.2.0" - resolved "https://registry.npmjs.org/@smithy/invalid-dependency/-/invalid-dependency-2.2.0.tgz#ee3d8980022cb5edb514ac187d159b3e773640f0" - integrity sha512-nEDASdbKFKPXN2O6lOlTgrEEOO9NHIeO+HVvZnkqc8h5U9g3BIhWsvzFo+UcUbliMHvKNPD/zVxDrkP1Sbgp8Q== - dependencies: - "@smithy/types" "^2.12.0" - tslib "^2.6.2" - -"@smithy/invalid-dependency@^3.0.3", "@smithy/invalid-dependency@^3.0.4": +"@smithy/invalid-dependency@^3.0.3": version "3.0.4" resolved "https://registry.npmjs.org/@smithy/invalid-dependency/-/invalid-dependency-3.0.4.tgz#aabb949b6aa15e38d8054b2397c143ef32efe14a" integrity sha512-MJBUrojC4SEXi9aJcnNOE3oNAuYNphgCGFXscaCj2TA/59BTcXhzHACP8jnnEU3n4yir/NSLKzxqez0T4x4tjA== @@ -6587,7 +4750,15 @@ "@smithy/types" "^3.4.0" tslib "^2.6.2" -"@smithy/is-array-buffer@^2.0.0", "@smithy/is-array-buffer@^2.2.0": +"@smithy/invalid-dependency@^3.0.7": + version "3.0.7" + resolved "https://registry.npmjs.org/@smithy/invalid-dependency/-/invalid-dependency-3.0.7.tgz#b36f258d94498f3c72ab6020091a66fc7cc16eda" + integrity sha512-Bq00GsAhHeYSuZX8Kpu4sbI9agH2BNYnqUmmbTGWOhki9NVsWn2jFr896vvoTMH8KAjNX/ErC/8t5QHuEXG+IA== + dependencies: + "@smithy/types" "^3.5.0" + tslib "^2.6.2" + +"@smithy/is-array-buffer@^2.2.0": version "2.2.0" resolved "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-2.2.0.tgz#f84f0d9f9a36601a9ca9381688bd1b726fd39111" integrity sha512-GGP3O9QFD24uGeAXYUjwSTXARoqpZykHadOmA8G5vfJPK0/DC67qa//0qvqrJzL1xc8WQWX7/yc7fwudjPHPhA== @@ -6601,15 +4772,6 @@ dependencies: tslib "^2.6.2" -"@smithy/md5-js@^2.0.15", "@smithy/md5-js@^2.0.9": - version "2.2.0" - resolved "https://registry.npmjs.org/@smithy/md5-js/-/md5-js-2.2.0.tgz#033c4c89fe0cbb3f7e99cca3b7b63a2824c98c6d" - integrity sha512-M26XTtt9IIusVMOWEAhIvFIr9jYj4ISPPGJROqw6vXngO3IYJCnVVSMFn4Tx1rUTG5BiKJNg9u2nxmBiZC5IlQ== - dependencies: - "@smithy/types" "^2.12.0" - "@smithy/util-utf8" "^2.3.0" - tslib "^2.6.2" - "@smithy/md5-js@^3.0.3": version "3.0.4" resolved "https://registry.npmjs.org/@smithy/md5-js/-/md5-js-3.0.4.tgz#6a8d40cf9e51c65fc6074aed977acd23ff4f6589" @@ -6619,16 +4781,22 @@ "@smithy/util-utf8" "^3.0.0" tslib "^2.6.2" -"@smithy/middleware-content-length@^2.0.11", "@smithy/middleware-content-length@^2.0.15", "@smithy/middleware-content-length@^2.0.17": - version "2.2.0" - resolved "https://registry.npmjs.org/@smithy/middleware-content-length/-/middleware-content-length-2.2.0.tgz#a82e97bd83d8deab69e07fea4512563bedb9461a" - integrity sha512-5bl2LG1Ah/7E5cMSC+q+h3IpVHMeOkG0yLRyQT1p2aMJkSrZG7RlXHPuAgb7EyaFeidKEnnd/fNaLLaKlHGzDQ== +"@smithy/middleware-compression@^3.0.7": + version "3.0.12" + resolved "https://registry.npmjs.org/@smithy/middleware-compression/-/middleware-compression-3.0.12.tgz#f27ea983721d7524cf8e007bd44f4fe4ba3201e8" + integrity sha512-0VZ4y8XnCVCIzt3+ovbVui6ApbVkkYytSuzk5TqSr8ebIAEGcwCu5ET5eOPsDwy6XveFJRefhTOZdpsdCXTYKQ== dependencies: - "@smithy/protocol-http" "^3.3.0" - "@smithy/types" "^2.12.0" + "@smithy/is-array-buffer" "^3.0.0" + "@smithy/node-config-provider" "^3.1.8" + "@smithy/protocol-http" "^4.1.4" + "@smithy/types" "^3.5.0" + "@smithy/util-config-provider" "^3.0.0" + "@smithy/util-middleware" "^3.0.7" + "@smithy/util-utf8" "^3.0.0" + fflate "0.8.1" tslib "^2.6.2" -"@smithy/middleware-content-length@^3.0.5", "@smithy/middleware-content-length@^3.0.6": +"@smithy/middleware-content-length@^3.0.5": version "3.0.6" resolved "https://registry.npmjs.org/@smithy/middleware-content-length/-/middleware-content-length-3.0.6.tgz#4837dafcfc085f1b9523d0784d05b87b569ad4ce" integrity sha512-AFyHCfe8rumkJkz+hCOVJmBagNBj05KypyDwDElA4TgMSA4eYDZRjVePFZuyABrJZFDc7uVj3dpFIDCEhf59SA== @@ -6637,20 +4805,16 @@ "@smithy/types" "^3.4.0" tslib "^2.6.2" -"@smithy/middleware-endpoint@^2.0.9", "@smithy/middleware-endpoint@^2.2.0", "@smithy/middleware-endpoint@^2.2.3", "@smithy/middleware-endpoint@^2.5.1": - version "2.5.1" - resolved "https://registry.npmjs.org/@smithy/middleware-endpoint/-/middleware-endpoint-2.5.1.tgz#1333c58304aff4d843e8ef4b85c8cb88975dd5ad" - integrity sha512-1/8kFp6Fl4OsSIVTWHnNjLnTL8IqpIb/D3sTSczrKFnrE9VMNWxnrRKNvpUHOJ6zpGD5f62TPm7+17ilTJpiCQ== - dependencies: - "@smithy/middleware-serde" "^2.3.0" - "@smithy/node-config-provider" "^2.3.0" - "@smithy/shared-ini-file-loader" "^2.4.0" - "@smithy/types" "^2.12.0" - "@smithy/url-parser" "^2.2.0" - "@smithy/util-middleware" "^2.2.0" +"@smithy/middleware-content-length@^3.0.9": + version "3.0.9" + resolved "https://registry.npmjs.org/@smithy/middleware-content-length/-/middleware-content-length-3.0.9.tgz#fb613d1a6b8c91e828d11c0d7a0a8576dba89b8b" + integrity sha512-t97PidoGElF9hTtLCrof32wfWMqC5g2SEJNxaVH3NjlatuNGsdxXRYO/t+RPnxA15RpYiS0f+zG7FuE2DeGgjA== + dependencies: + "@smithy/protocol-http" "^4.1.4" + "@smithy/types" "^3.5.0" tslib "^2.6.2" -"@smithy/middleware-endpoint@^3.1.0", "@smithy/middleware-endpoint@^3.1.1": +"@smithy/middleware-endpoint@^3.1.0": version "3.1.1" resolved "https://registry.npmjs.org/@smithy/middleware-endpoint/-/middleware-endpoint-3.1.1.tgz#d718719e45e8f7087cf0d9bbfff5fc6364c5fde0" integrity sha512-Irv+soW8NKluAtFSEsF8O3iGyLxa5oOevJb/e1yNacV9H7JP/yHyJuKST5YY2ORS1+W34VR8EuUrOF+K29Pl4g== @@ -6663,44 +4827,34 @@ "@smithy/util-middleware" "^3.0.4" tslib "^2.6.2" -"@smithy/middleware-retry@^2.0.12", "@smithy/middleware-retry@^2.0.20", "@smithy/middleware-retry@^2.0.24", "@smithy/middleware-retry@^2.3.1": - version "2.3.1" - resolved "https://registry.npmjs.org/@smithy/middleware-retry/-/middleware-retry-2.3.1.tgz#d6fdce94f2f826642c01b4448e97a509c4556ede" - integrity sha512-P2bGufFpFdYcWvqpyqqmalRtwFUNUA8vHjJR5iGqbfR6mp65qKOLcUd6lTr4S9Gn/enynSrSf3p3FVgVAf6bXA== - dependencies: - "@smithy/node-config-provider" "^2.3.0" - "@smithy/protocol-http" "^3.3.0" - "@smithy/service-error-classification" "^2.1.5" - "@smithy/smithy-client" "^2.5.1" - "@smithy/types" "^2.12.0" - "@smithy/util-middleware" "^2.2.0" - "@smithy/util-retry" "^2.2.0" - tslib "^2.6.2" - uuid "^9.0.1" - -"@smithy/middleware-retry@^3.0.15", "@smithy/middleware-retry@^3.0.16": - version "3.0.16" - resolved "https://registry.npmjs.org/@smithy/middleware-retry/-/middleware-retry-3.0.16.tgz#aca6099a2e73c9be0c7a49eccbca5d1d73eaadf3" - integrity sha512-08kI36p1yB4CWO3Qi+UQxjzobt8iQJpnruF0K5BkbZmA/N/sJ51A1JJGJ36GgcbFyPfWw2FU48S5ZoqXt0h0jw== - dependencies: - "@smithy/node-config-provider" "^3.1.5" - "@smithy/protocol-http" "^4.1.1" - "@smithy/service-error-classification" "^3.0.4" - "@smithy/smithy-client" "^3.3.0" - "@smithy/types" "^3.4.0" - "@smithy/util-middleware" "^3.0.4" - "@smithy/util-retry" "^3.0.4" +"@smithy/middleware-endpoint@^3.1.4": + version "3.1.4" + resolved "https://registry.npmjs.org/@smithy/middleware-endpoint/-/middleware-endpoint-3.1.4.tgz#222c9fa49c8af6ebf8bea8ab220d92d9b8c90d3d" + integrity sha512-/ChcVHekAyzUbyPRI8CzPPLj6y8QRAfJngWcLMgsWxKVzw/RzBV69mSOzJYDD3pRwushA1+5tHtPF8fjmzBnrQ== + dependencies: + "@smithy/middleware-serde" "^3.0.7" + "@smithy/node-config-provider" "^3.1.8" + "@smithy/shared-ini-file-loader" "^3.1.8" + "@smithy/types" "^3.5.0" + "@smithy/url-parser" "^3.0.7" + "@smithy/util-middleware" "^3.0.7" + tslib "^2.6.2" + +"@smithy/middleware-retry@^3.0.14", "@smithy/middleware-retry@^3.0.22", "@smithy/middleware-retry@^3.0.23": + version "3.0.23" + resolved "https://registry.npmjs.org/@smithy/middleware-retry/-/middleware-retry-3.0.23.tgz#ce5574e278dd14a7995afd5a4ed2a6c9891da8ed" + integrity sha512-x9PbGXxkcXIpm6L26qRSCC+eaYcHwybRmqU8LO/WM2RRlW0g8lz6FIiKbKgGvHuoK3dLZRiQVSQJveiCzwnA5A== + dependencies: + "@smithy/node-config-provider" "^3.1.8" + "@smithy/protocol-http" "^4.1.4" + "@smithy/service-error-classification" "^3.0.7" + "@smithy/smithy-client" "^3.4.0" + "@smithy/types" "^3.5.0" + "@smithy/util-middleware" "^3.0.7" + "@smithy/util-retry" "^3.0.7" tslib "^2.6.2" uuid "^9.0.1" -"@smithy/middleware-serde@^2.0.13", "@smithy/middleware-serde@^2.0.15", "@smithy/middleware-serde@^2.0.9", "@smithy/middleware-serde@^2.3.0": - version "2.3.0" - resolved "https://registry.npmjs.org/@smithy/middleware-serde/-/middleware-serde-2.3.0.tgz#a7615ba646a88b6f695f2d55de13d8158181dd13" - integrity sha512-sIADe7ojwqTyvEQBe1nc/GXB9wdHhi9UwyX0lTyttmUWDJLP655ZYE1WngnNyXREme8I27KCaUhyhZWRXL0q7Q== - dependencies: - "@smithy/types" "^2.12.0" - tslib "^2.6.2" - "@smithy/middleware-serde@^3.0.3", "@smithy/middleware-serde@^3.0.4": version "3.0.4" resolved "https://registry.npmjs.org/@smithy/middleware-serde/-/middleware-serde-3.0.4.tgz#86f0d3c2bf17334b165be96f504a37357a70f576" @@ -6709,15 +4863,15 @@ "@smithy/types" "^3.4.0" tslib "^2.6.2" -"@smithy/middleware-stack@^2.0.2", "@smithy/middleware-stack@^2.0.7", "@smithy/middleware-stack@^2.0.9", "@smithy/middleware-stack@^2.2.0": - version "2.2.0" - resolved "https://registry.npmjs.org/@smithy/middleware-stack/-/middleware-stack-2.2.0.tgz#3fb49eae6313f16f6f30fdaf28e11a7321f34d9f" - integrity sha512-Qntc3jrtwwrsAC+X8wms8zhrTr0sFXnyEGhZd9sLtsJ/6gGQKFzNB+wWbOcpJd7BR8ThNCoKt76BuQahfMvpeA== +"@smithy/middleware-serde@^3.0.7": + version "3.0.7" + resolved "https://registry.npmjs.org/@smithy/middleware-serde/-/middleware-serde-3.0.7.tgz#03f0dda75edffc4cc90ea422349cbfb82368efa7" + integrity sha512-VytaagsQqtH2OugzVTq4qvjkLNbWehHfGcGr0JLJmlDRrNCeZoWkWsSOw1nhS/4hyUUWF/TLGGml4X/OnEep5g== dependencies: - "@smithy/types" "^2.12.0" + "@smithy/types" "^3.5.0" tslib "^2.6.2" -"@smithy/middleware-stack@^3.0.3", "@smithy/middleware-stack@^3.0.4": +"@smithy/middleware-stack@^3.0.3": version "3.0.4" resolved "https://registry.npmjs.org/@smithy/middleware-stack/-/middleware-stack-3.0.4.tgz#85b98320fff51457e9720b2c17e8f3f97c39a88c" integrity sha512-sLMRjtMCqtVcrOqaOZ10SUnlFE25BSlmLsi4bRSGFD7dgR54eqBjfqkVkPBQyrKBortfGM0+2DJoUPcGECR+nQ== @@ -6725,14 +4879,12 @@ "@smithy/types" "^3.4.0" tslib "^2.6.2" -"@smithy/node-config-provider@^2.0.12", "@smithy/node-config-provider@^2.1.5", "@smithy/node-config-provider@^2.1.8", "@smithy/node-config-provider@^2.3.0": - version "2.3.0" - resolved "https://registry.npmjs.org/@smithy/node-config-provider/-/node-config-provider-2.3.0.tgz#9fac0c94a14c5b5b8b8fa37f20c310a844ab9922" - integrity sha512-0elK5/03a1JPWMDPaS726Iw6LpQg80gFut1tNpPfxFuChEEklo2yL823V94SpTZTxmKlXFtFgsP55uh3dErnIg== +"@smithy/middleware-stack@^3.0.7": + version "3.0.7" + resolved "https://registry.npmjs.org/@smithy/middleware-stack/-/middleware-stack-3.0.7.tgz#813fa7b47895ce0d085eac89c056d21b1e46e771" + integrity sha512-EyTbMCdqS1DoeQsO4gI7z2Gzq1MoRFAeS8GkFYIwbedB7Lp5zlLHJdg+56tllIIG5Hnf9ZWX48YKSHlsKvugGA== dependencies: - "@smithy/property-provider" "^2.2.0" - "@smithy/shared-ini-file-loader" "^2.4.0" - "@smithy/types" "^2.12.0" + "@smithy/types" "^3.5.0" tslib "^2.6.2" "@smithy/node-config-provider@^3.1.4", "@smithy/node-config-provider@^3.1.5": @@ -6745,26 +4897,25 @@ "@smithy/types" "^3.4.0" tslib "^2.6.2" -"@smithy/node-http-handler@^1.0.2": - version "1.1.0" - resolved "https://registry.npmjs.org/@smithy/node-http-handler/-/node-http-handler-1.1.0.tgz#887cee930b520e08043c9f41e463f8d8f5dae127" - integrity sha512-d3kRriEgaIiGXLziAM8bjnaLn1fthCJeTLZIwEIpzQqe6yPX0a+yQoLCTyjb2fvdLwkMoG4p7THIIB5cj5lkbg== +"@smithy/node-config-provider@^3.1.8": + version "3.1.8" + resolved "https://registry.npmjs.org/@smithy/node-config-provider/-/node-config-provider-3.1.8.tgz#2c1092040b4062eae0f7c9e121cc00ac6a77efee" + integrity sha512-E0rU0DglpeJn5ge64mk8wTGEXcQwmpUTY5Zr7IzTpDLmHKiIamINERNZYrPQjg58Ck236sEKSwRSHA4CwshU6Q== dependencies: - "@smithy/abort-controller" "^1.1.0" - "@smithy/protocol-http" "^1.2.0" - "@smithy/querystring-builder" "^1.1.0" - "@smithy/types" "^1.2.0" - tslib "^2.5.0" + "@smithy/property-provider" "^3.1.7" + "@smithy/shared-ini-file-loader" "^3.1.8" + "@smithy/types" "^3.5.0" + tslib "^2.6.2" -"@smithy/node-http-handler@^2.1.5", "@smithy/node-http-handler@^2.1.9", "@smithy/node-http-handler@^2.2.1", "@smithy/node-http-handler@^2.5.0": - version "2.5.0" - resolved "https://registry.npmjs.org/@smithy/node-http-handler/-/node-http-handler-2.5.0.tgz#7b5e0565dd23d340380489bd5fe4316d2bed32de" - integrity sha512-mVGyPBzkkGQsPoxQUbxlEfRjrj6FPyA3u3u2VXGr9hT8wilsoQdZdvKpMBFMB8Crfhv5dNkKHIW0Yyuc7eABqA== +"@smithy/node-http-handler@3.2.4", "@smithy/node-http-handler@^3.2.4": + version "3.2.4" + resolved "https://registry.npmjs.org/@smithy/node-http-handler/-/node-http-handler-3.2.4.tgz#3c57c40d082c3bacac1e49955bd1240e8ccc40b2" + integrity sha512-49reY3+JgLMFNm7uTAKBWiKCA6XSvkNp9FqhVmusm2jpVnHORYFeFZ704LShtqWfjZW/nhX+7Iexyb6zQfXYIQ== dependencies: - "@smithy/abort-controller" "^2.2.0" - "@smithy/protocol-http" "^3.3.0" - "@smithy/querystring-builder" "^2.2.0" - "@smithy/types" "^2.12.0" + "@smithy/abort-controller" "^3.1.5" + "@smithy/protocol-http" "^4.1.4" + "@smithy/querystring-builder" "^3.0.7" + "@smithy/types" "^3.5.0" tslib "^2.6.2" "@smithy/node-http-handler@^3.1.4", "@smithy/node-http-handler@^3.2.0": @@ -6778,14 +4929,6 @@ "@smithy/types" "^3.4.0" tslib "^2.6.2" -"@smithy/property-provider@^2.0.0", "@smithy/property-provider@^2.2.0": - version "2.2.0" - resolved "https://registry.npmjs.org/@smithy/property-provider/-/property-provider-2.2.0.tgz#37e3525a3fa3e11749f86a4f89f0fd7765a6edb0" - integrity sha512-+xiil2lFhtTRzXkx8F053AV46QnIw6e7MV8od5Mi68E1ICOjCeCHw2XfLnDEUHnT9WGUIkwcqavXjfwuJbGlpg== - dependencies: - "@smithy/types" "^2.12.0" - tslib "^2.6.2" - "@smithy/property-provider@^3.1.3", "@smithy/property-provider@^3.1.4": version "3.1.4" resolved "https://registry.npmjs.org/@smithy/property-provider/-/property-provider-3.1.4.tgz#2d4f0db3a517d283c2b879f3a01673324955013b" @@ -6794,20 +4937,12 @@ "@smithy/types" "^3.4.0" tslib "^2.6.2" -"@smithy/protocol-http@^1.2.0": - version "1.2.0" - resolved "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-1.2.0.tgz#a554e4dabb14508f0bc2cdef9c3710e2b294be04" - integrity sha512-GfGfruksi3nXdFok5RhgtOnWe5f6BndzYfmEXISD+5gAGdayFGpjWu5pIqIweTudMtse20bGbc+7MFZXT1Tb8Q== - dependencies: - "@smithy/types" "^1.2.0" - tslib "^2.5.0" - -"@smithy/protocol-http@^3.0.11", "@smithy/protocol-http@^3.0.5", "@smithy/protocol-http@^3.0.9", "@smithy/protocol-http@^3.3.0": - version "3.3.0" - resolved "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-3.3.0.tgz#a37df7b4bb4960cdda560ce49acfd64c455e4090" - integrity sha512-Xy5XK1AFWW2nlY/biWZXu6/krgbaf2dg0q492D8M5qthsnU2H+UgFeZLbM76FnH7s6RO/xhQRkj+T6KBO3JzgQ== +"@smithy/property-provider@^3.1.7": + version "3.1.7" + resolved "https://registry.npmjs.org/@smithy/property-provider/-/property-provider-3.1.7.tgz#8a304a4b9110a067a93c784e4c11e175f82da379" + integrity sha512-QfzLi1GPMisY7bAM5hOUqBdGYnY5S2JAlr201pghksrQv139f8iiiMalXtjczIP5f6owxFn3MINLNUNvUkgtPw== dependencies: - "@smithy/types" "^2.12.0" + "@smithy/types" "^3.5.0" tslib "^2.6.2" "@smithy/protocol-http@^4.1.0", "@smithy/protocol-http@^4.1.1": @@ -6818,22 +4953,21 @@ "@smithy/types" "^3.4.0" tslib "^2.6.2" -"@smithy/querystring-builder@^1.1.0": - version "1.1.0" - resolved "https://registry.npmjs.org/@smithy/querystring-builder/-/querystring-builder-1.1.0.tgz#de6306104640ade34e59be33949db6cc64aa9d7f" - integrity sha512-gDEi4LxIGLbdfjrjiY45QNbuDmpkwh9DX4xzrR2AzjjXpxwGyfSpbJaYhXARw9p17VH0h9UewnNQXNwaQyYMDA== +"@smithy/protocol-http@^4.1.4": + version "4.1.4" + resolved "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-4.1.4.tgz#6940d652b1825bda2422163ec9baab552669a338" + integrity sha512-MlWK8eqj0JlpZBnWmjQLqmFp71Ug00P+m72/1xQB3YByXD4zZ+y9N4hYrR0EDmrUCZIkyATWHOXFgtavwGDTzQ== dependencies: - "@smithy/types" "^1.2.0" - "@smithy/util-uri-escape" "^1.1.0" - tslib "^2.5.0" + "@smithy/types" "^3.5.0" + tslib "^2.6.2" -"@smithy/querystring-builder@^2.0.13", "@smithy/querystring-builder@^2.0.9", "@smithy/querystring-builder@^2.2.0": - version "2.2.0" - resolved "https://registry.npmjs.org/@smithy/querystring-builder/-/querystring-builder-2.2.0.tgz#22937e19fcd0aaa1a3e614ef8cb6f8e86756a4ef" - integrity sha512-L1kSeviUWL+emq3CUVSgdogoM/D9QMFaqxL/dd0X7PCNWmPXqt+ExtrBjqT0V7HLN03Vs9SuiLrG3zy3JGnE5A== +"@smithy/querystring-builder@^3.0.3", "@smithy/querystring-builder@^3.0.7": + version "3.0.7" + resolved "https://registry.npmjs.org/@smithy/querystring-builder/-/querystring-builder-3.0.7.tgz#8c443c65f4249ff1637088db1166d18411d41555" + integrity sha512-65RXGZZ20rzqqxTsChdqSpbhA6tdt5IFNgG6o7e1lnPVLCe6TNWQq4rTl4N87hTDD8mV4IxJJnvyE7brbnRkQw== dependencies: - "@smithy/types" "^2.12.0" - "@smithy/util-uri-escape" "^2.2.0" + "@smithy/types" "^3.5.0" + "@smithy/util-uri-escape" "^3.0.0" tslib "^2.6.2" "@smithy/querystring-builder@^3.0.4": @@ -6845,14 +4979,6 @@ "@smithy/util-uri-escape" "^3.0.0" tslib "^2.6.2" -"@smithy/querystring-parser@^2.2.0": - version "2.2.0" - resolved "https://registry.npmjs.org/@smithy/querystring-parser/-/querystring-parser-2.2.0.tgz#24a5633f4b3806ff2888d4c2f4169e105fdffd79" - integrity sha512-BvHCDrKfbG5Yhbpj4vsbuPV2GgcpHiAkLeIlcA1LtfpMz3jrqizP1+OguSNSj1MwBHEiN+jwNisXLGdajGDQJA== - dependencies: - "@smithy/types" "^2.12.0" - tslib "^2.6.2" - "@smithy/querystring-parser@^3.0.4": version "3.0.4" resolved "https://registry.npmjs.org/@smithy/querystring-parser/-/querystring-parser-3.0.4.tgz#2a1e2d7fb4d2ec726fb4b4dac8b63a8e5294bcf4" @@ -6861,12 +4987,13 @@ "@smithy/types" "^3.4.0" tslib "^2.6.2" -"@smithy/service-error-classification@^2.1.5": - version "2.1.5" - resolved "https://registry.npmjs.org/@smithy/service-error-classification/-/service-error-classification-2.1.5.tgz#0568a977cc0db36299d8703a5d8609c1f600c005" - integrity sha512-uBDTIBBEdAQryvHdc5W8sS5YX7RQzF683XrHePVdFmAgKiMofU15FLSM0/HU03hKTnazdNRFa0YHS7+ArwoUSQ== +"@smithy/querystring-parser@^3.0.7": + version "3.0.7" + resolved "https://registry.npmjs.org/@smithy/querystring-parser/-/querystring-parser-3.0.7.tgz#936206d1e6da9d862384dae730b4bad042d6a948" + integrity sha512-Fouw4KJVWqqUVIu1gZW8BH2HakwLz6dvdrAhXeXfeymOBrZw+hcqaWs+cS1AZPVp4nlbeIujYrKA921ZW2WMPA== dependencies: - "@smithy/types" "^2.12.0" + "@smithy/types" "^3.5.0" + tslib "^2.6.2" "@smithy/service-error-classification@^3.0.4": version "3.0.4" @@ -6875,13 +5002,12 @@ dependencies: "@smithy/types" "^3.4.0" -"@smithy/shared-ini-file-loader@^2.0.6", "@smithy/shared-ini-file-loader@^2.4.0": - version "2.4.0" - resolved "https://registry.npmjs.org/@smithy/shared-ini-file-loader/-/shared-ini-file-loader-2.4.0.tgz#1636d6eb9bff41e36ac9c60364a37fd2ffcb9947" - integrity sha512-WyujUJL8e1B6Z4PBfAqC/aGY1+C7T0w20Gih3yrvJSk97gpiVfB+y7c46T4Nunk+ZngLq0rOIdeVeIklk0R3OA== +"@smithy/service-error-classification@^3.0.7": + version "3.0.7" + resolved "https://registry.npmjs.org/@smithy/service-error-classification/-/service-error-classification-3.0.7.tgz#5bab4ad802d30bd3fa52b8134f6c171582358226" + integrity sha512-91PRkTfiBf9hxkIchhRKJfl1rsplRDyBnmyFca3y0Z3x/q0JJN480S83LBd8R6sBCkm2bBbqw2FHp0Mbh+ecSA== dependencies: - "@smithy/types" "^2.12.0" - tslib "^2.6.2" + "@smithy/types" "^3.5.0" "@smithy/shared-ini-file-loader@^3.1.4", "@smithy/shared-ini-file-loader@^3.1.5": version "3.1.5" @@ -6891,20 +5017,15 @@ "@smithy/types" "^3.4.0" tslib "^2.6.2" -"@smithy/signature-v4@^2.0.0": - version "2.3.0" - resolved "https://registry.npmjs.org/@smithy/signature-v4/-/signature-v4-2.3.0.tgz#c30dd4028ae50c607db99459981cce8cdab7a3fd" - integrity sha512-ui/NlpILU+6HAQBfJX8BBsDXuKSNrjTSuOYArRblcrErwKFutjrCNb/OExfVRyj9+26F9J+ZmfWT+fKWuDrH3Q== +"@smithy/shared-ini-file-loader@^3.1.8": + version "3.1.8" + resolved "https://registry.npmjs.org/@smithy/shared-ini-file-loader/-/shared-ini-file-loader-3.1.8.tgz#7a0bf5f20cfe8e0c4a36d8dcab8194d0d2ee958e" + integrity sha512-0NHdQiSkeGl0ICQKcJQ2lCOKH23Nb0EaAa7RDRId6ZqwXkw4LJyIyZ0t3iusD4bnKYDPLGy2/5e2rfUhrt0Acw== dependencies: - "@smithy/is-array-buffer" "^2.2.0" - "@smithy/types" "^2.12.0" - "@smithy/util-hex-encoding" "^2.2.0" - "@smithy/util-middleware" "^2.2.0" - "@smithy/util-uri-escape" "^2.2.0" - "@smithy/util-utf8" "^2.3.0" + "@smithy/types" "^3.5.0" tslib "^2.6.2" -"@smithy/signature-v4@^4.1.0", "@smithy/signature-v4@^4.1.1": +"@smithy/signature-v4@^4.1.0": version "4.1.1" resolved "https://registry.npmjs.org/@smithy/signature-v4/-/signature-v4-4.1.1.tgz#b47a5cb018ff48d2fcfb846ba6d2d16a08553932" integrity sha512-SH9J9be81TMBNGCmjhrgMWu4YSpQ3uP1L06u/K9SDrE2YibUix1qxedPCxEQu02At0P0SrYDjvz+y91vLG0KRQ== @@ -6918,58 +5039,37 @@ "@smithy/util-utf8" "^3.0.0" tslib "^2.6.2" -"@smithy/smithy-client@^2.1.15", "@smithy/smithy-client@^2.1.18", "@smithy/smithy-client@^2.1.6", "@smithy/smithy-client@^2.5.1": - version "2.5.1" - resolved "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-2.5.1.tgz#0fd2efff09dc65500d260e590f7541f8a387eae3" - integrity sha512-jrbSQrYCho0yDaaf92qWgd+7nAeap5LtHTI51KXqmpIFCceKU3K9+vIVTUH72bOJngBMqa4kyu1VJhRcSrk/CQ== - dependencies: - "@smithy/middleware-endpoint" "^2.5.1" - "@smithy/middleware-stack" "^2.2.0" - "@smithy/protocol-http" "^3.3.0" - "@smithy/types" "^2.12.0" - "@smithy/util-stream" "^2.2.0" - tslib "^2.6.2" - -"@smithy/smithy-client@^3.2.0", "@smithy/smithy-client@^3.3.0": - version "3.3.0" - resolved "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-3.3.0.tgz#ee15e7b5ec150f6048ee2ef0e3751c6ed38900c3" - integrity sha512-H32nVo8tIX82kB0xI2LBrIcj8jx/3/ITotNLbeG1UL0b3b440YPR/hUvqjFJiaB24pQrMjRbU8CugqH5sV0hkw== +"@smithy/signature-v4@^4.2.0": + version "4.2.0" + resolved "https://registry.npmjs.org/@smithy/signature-v4/-/signature-v4-4.2.0.tgz#291f5a0e756cc251377e1e8af2a1f494e6173029" + integrity sha512-LafbclHNKnsorMgUkKm7Tk7oJ7xizsZ1VwqhGKqoCIrXh4fqDDp73fK99HOEEgcsQbtemmeY/BPv0vTVYYUNEQ== dependencies: - "@smithy/middleware-endpoint" "^3.1.1" - "@smithy/middleware-stack" "^3.0.4" - "@smithy/protocol-http" "^4.1.1" - "@smithy/types" "^3.4.0" - "@smithy/util-stream" "^3.1.4" + "@smithy/is-array-buffer" "^3.0.0" + "@smithy/protocol-http" "^4.1.4" + "@smithy/types" "^3.5.0" + "@smithy/util-hex-encoding" "^3.0.0" + "@smithy/util-middleware" "^3.0.7" + "@smithy/util-uri-escape" "^3.0.0" + "@smithy/util-utf8" "^3.0.0" tslib "^2.6.2" -"@smithy/types@3.4.0", "@smithy/types@^3.3.0", "@smithy/types@^3.4.0": +"@smithy/smithy-client@^3.1.12", "@smithy/smithy-client@^3.3.6", "@smithy/smithy-client@^3.4.0": version "3.4.0" - resolved "https://registry.npmjs.org/@smithy/types/-/types-3.4.0.tgz#08b7b3d6af30c66fd0682c73c206a5baf8b40a63" - integrity sha512-0shOWSg/pnFXPcsSU8ZbaJ4JBHZJPPzLCJxafJvbMVFo9l1w81CqpgUqjlKGNHVrVB7fhIs+WS82JDTyzaLyLA== - dependencies: - tslib "^2.6.2" - -"@smithy/types@^1.2.0": - version "1.2.0" - resolved "https://registry.npmjs.org/@smithy/types/-/types-1.2.0.tgz#9dc65767b0ee3d6681704fcc67665d6fc9b6a34e" - integrity sha512-z1r00TvBqF3dh4aHhya7nz1HhvCg4TRmw51fjMrh5do3h+ngSstt/yKlNbHeb9QxJmFbmN8KEVSWgb1bRvfEoA== - dependencies: - tslib "^2.5.0" - -"@smithy/types@^2.12.0", "@smithy/types@^2.3.3", "@smithy/types@^2.5.0", "@smithy/types@^2.7.0": - version "2.12.0" - resolved "https://registry.npmjs.org/@smithy/types/-/types-2.12.0.tgz#c44845f8ba07e5e8c88eda5aed7e6a0c462da041" - integrity sha512-QwYgloJ0sVNBeBuBs65cIkTbfzV/Q6ZNPCJ99EICFEdJYG50nGIY/uYXp+TbsdJReIuPr0a0kXmCvren3MbRRw== + resolved "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-3.4.0.tgz#ceffb92108a4ad60cbede3baf44ed224dc70b333" + integrity sha512-nOfJ1nVQsxiP6srKt43r2My0Gp5PLWCW2ASqUioxIiGmu6d32v4Nekidiv5qOmmtzIrmaD+ADX5SKHUuhReeBQ== dependencies: + "@smithy/middleware-endpoint" "^3.1.4" + "@smithy/middleware-stack" "^3.0.7" + "@smithy/protocol-http" "^4.1.4" + "@smithy/types" "^3.5.0" + "@smithy/util-stream" "^3.1.9" tslib "^2.6.2" -"@smithy/url-parser@^2.0.13", "@smithy/url-parser@^2.0.15", "@smithy/url-parser@^2.0.9", "@smithy/url-parser@^2.2.0": - version "2.2.0" - resolved "https://registry.npmjs.org/@smithy/url-parser/-/url-parser-2.2.0.tgz#6fcda6116391a4f61fef5580eb540e128359b3c0" - integrity sha512-hoA4zm61q1mNTpksiSWp2nEl1dt3j726HdRhiNgVJQMj7mLp7dprtF57mOB6JvEk/x9d2bsuL5hlqZbBuHQylQ== +"@smithy/types@3.5.0", "@smithy/types@^3.3.0", "@smithy/types@^3.4.0", "@smithy/types@^3.5.0": + version "3.5.0" + resolved "https://registry.npmjs.org/@smithy/types/-/types-3.5.0.tgz#9589e154c50d9c5d00feb7d818112ef8fc285d6e" + integrity sha512-QN0twHNfe8mNJdH9unwsCK13GURU7oEAZqkBI+rsvpv1jrmserO+WnLE7jidR9W/1dxwZ0u/CB01mV2Gms/K2Q== dependencies: - "@smithy/querystring-parser" "^2.2.0" - "@smithy/types" "^2.12.0" tslib "^2.6.2" "@smithy/url-parser@^3.0.3", "@smithy/url-parser@^3.0.4": @@ -6981,13 +5081,13 @@ "@smithy/types" "^3.4.0" tslib "^2.6.2" -"@smithy/util-base64@^2.0.0", "@smithy/util-base64@^2.0.1", "@smithy/util-base64@^2.3.0": - version "2.3.0" - resolved "https://registry.npmjs.org/@smithy/util-base64/-/util-base64-2.3.0.tgz#312dbb4d73fb94249c7261aee52de4195c2dd8e2" - integrity sha512-s3+eVwNeJuXUwuMbusncZNViuhv2LjVJ1nMwTqSA0XAC7gjKhqqxRdJPhR8+YrkoZ9IiIbFk/yK6ACe/xlF+hw== +"@smithy/url-parser@^3.0.7": + version "3.0.7" + resolved "https://registry.npmjs.org/@smithy/url-parser/-/url-parser-3.0.7.tgz#9d7d7e4e38514bf75ade6e8a30d2300f3db17d1b" + integrity sha512-70UbSSR8J97c1rHZOWhl+VKiZDqHWxs/iW8ZHrHp5fCCPLSBE7GcUlUvKSle3Ca+J9LLbYCj/A79BxztBvAfpA== dependencies: - "@smithy/util-buffer-from" "^2.2.0" - "@smithy/util-utf8" "^2.3.0" + "@smithy/querystring-parser" "^3.0.7" + "@smithy/types" "^3.5.0" tslib "^2.6.2" "@smithy/util-base64@^3.0.0": @@ -6999,13 +5099,6 @@ "@smithy/util-utf8" "^3.0.0" tslib "^2.6.2" -"@smithy/util-body-length-browser@^2.0.0", "@smithy/util-body-length-browser@^2.0.1": - version "2.2.0" - resolved "https://registry.npmjs.org/@smithy/util-body-length-browser/-/util-body-length-browser-2.2.0.tgz#25620645c6b62b42594ef4a93b66e6ab70e27d2c" - integrity sha512-dtpw9uQP7W+n3vOtx0CfBD5EWd7EPdIdsQnWTDoFf77e3VUf05uA7R7TGipIo8e4WL2kuPdnsr3hMQn9ziYj5w== - dependencies: - tslib "^2.6.2" - "@smithy/util-body-length-browser@^3.0.0": version "3.0.0" resolved "https://registry.npmjs.org/@smithy/util-body-length-browser/-/util-body-length-browser-3.0.0.tgz#86ec2f6256310b4845a2f064e2f571c1ca164ded" @@ -7013,13 +5106,6 @@ dependencies: tslib "^2.6.2" -"@smithy/util-body-length-node@^2.1.0": - version "2.3.0" - resolved "https://registry.npmjs.org/@smithy/util-body-length-node/-/util-body-length-node-2.3.0.tgz#d065a9b5e305ff899536777bbfe075cdc980136f" - integrity sha512-ITWT1Wqjubf2CJthb0BuT9+bpzBfXeMokH/AAa5EJQgbv9aPMVfnM76iFIZVFf50hYXGbtiV71BHAthNWd6+dw== - dependencies: - tslib "^2.6.2" - "@smithy/util-body-length-node@^3.0.0": version "3.0.0" resolved "https://registry.npmjs.org/@smithy/util-body-length-node/-/util-body-length-node-3.0.0.tgz#99a291bae40d8932166907fe981d6a1f54298a6d" @@ -7043,13 +5129,6 @@ "@smithy/is-array-buffer" "^3.0.0" tslib "^2.6.2" -"@smithy/util-config-provider@^2.0.0", "@smithy/util-config-provider@^2.3.0": - version "2.3.0" - resolved "https://registry.npmjs.org/@smithy/util-config-provider/-/util-config-provider-2.3.0.tgz#bc79f99562d12a1f8423100ca662a6fb07cde943" - integrity sha512-HZkzrRcuFN1k70RLqlNK4FnPXKOpkik1+4JaBoHNJn+RnJGYqaa3c5/+XtLOXhlKzlRgNvyaLieHTW2VwGN0VQ== - dependencies: - tslib "^2.6.2" - "@smithy/util-config-provider@^3.0.0": version "3.0.0" resolved "https://registry.npmjs.org/@smithy/util-config-provider/-/util-config-provider-3.0.0.tgz#62c6b73b22a430e84888a8f8da4b6029dd5b8efe" @@ -7057,64 +5136,31 @@ dependencies: tslib "^2.6.2" -"@smithy/util-defaults-mode-browser@^2.0.10", "@smithy/util-defaults-mode-browser@^2.0.19", "@smithy/util-defaults-mode-browser@^2.0.22": - version "2.2.1" - resolved "https://registry.npmjs.org/@smithy/util-defaults-mode-browser/-/util-defaults-mode-browser-2.2.1.tgz#9db31416daf575d2963c502e0528cfe8055f0c4e" - integrity sha512-RtKW+8j8skk17SYowucwRUjeh4mCtnm5odCL0Lm2NtHQBsYKrNW0od9Rhopu9wF1gHMfHeWF7i90NwBz/U22Kw== - dependencies: - "@smithy/property-provider" "^2.2.0" - "@smithy/smithy-client" "^2.5.1" - "@smithy/types" "^2.12.0" - bowser "^2.11.0" - tslib "^2.6.2" - -"@smithy/util-defaults-mode-browser@^3.0.15", "@smithy/util-defaults-mode-browser@^3.0.16": - version "3.0.16" - resolved "https://registry.npmjs.org/@smithy/util-defaults-mode-browser/-/util-defaults-mode-browser-3.0.16.tgz#7d4978a90cee569fdeb6c38c89a09a39371f44d7" - integrity sha512-Os8ddfNBe7hmc5UMWZxygIHCyAqY0aWR8Wnp/aKbti3f8Df/r0J9ttMZIxeMjsFgtVjEryB0q7SGcwBsHk8WEw== +"@smithy/util-defaults-mode-browser@^3.0.14", "@smithy/util-defaults-mode-browser@^3.0.22": + version "3.0.23" + resolved "https://registry.npmjs.org/@smithy/util-defaults-mode-browser/-/util-defaults-mode-browser-3.0.23.tgz#6920b473126ae8857a04dd6941793bbda12adc8b" + integrity sha512-Y07qslyRtXDP/C5aWKqxTPBl4YxplEELG3xRrz2dnAQ6Lq/FgNrcKWmV561nNaZmFH+EzeGOX3ZRMbU8p1T6Nw== dependencies: - "@smithy/property-provider" "^3.1.4" - "@smithy/smithy-client" "^3.3.0" - "@smithy/types" "^3.4.0" + "@smithy/property-provider" "^3.1.7" + "@smithy/smithy-client" "^3.4.0" + "@smithy/types" "^3.5.0" bowser "^2.11.0" tslib "^2.6.2" -"@smithy/util-defaults-mode-node@^2.0.12", "@smithy/util-defaults-mode-node@^2.0.25", "@smithy/util-defaults-mode-node@^2.0.29": - version "2.3.1" - resolved "https://registry.npmjs.org/@smithy/util-defaults-mode-node/-/util-defaults-mode-node-2.3.1.tgz#4613210a3d107aadb3f85bd80cb71c796dd8bf0a" - integrity sha512-vkMXHQ0BcLFysBMWgSBLSk3+leMpFSyyFj8zQtv5ZyUBx8/owVh1/pPEkzmW/DR/Gy/5c8vjLDD9gZjXNKbrpA== - dependencies: - "@smithy/config-resolver" "^2.2.0" - "@smithy/credential-provider-imds" "^2.3.0" - "@smithy/node-config-provider" "^2.3.0" - "@smithy/property-provider" "^2.2.0" - "@smithy/smithy-client" "^2.5.1" - "@smithy/types" "^2.12.0" - tslib "^2.6.2" - -"@smithy/util-defaults-mode-node@^3.0.15", "@smithy/util-defaults-mode-node@^3.0.16": - version "3.0.16" - resolved "https://registry.npmjs.org/@smithy/util-defaults-mode-node/-/util-defaults-mode-node-3.0.16.tgz#5747d886720d4f5acdde8fdf8240a6c1bad42f1f" - integrity sha512-rNhFIYRtrOrrhRlj6RL8jWA6/dcwrbGYAmy8+OAHjjzQ6zdzUBB1P+3IuJAgwWN6Y5GxI+mVXlM/pOjaoIgHow== - dependencies: - "@smithy/config-resolver" "^3.0.6" - "@smithy/credential-provider-imds" "^3.2.1" - "@smithy/node-config-provider" "^3.1.5" - "@smithy/property-provider" "^3.1.4" - "@smithy/smithy-client" "^3.3.0" - "@smithy/types" "^3.4.0" - tslib "^2.6.2" - -"@smithy/util-endpoints@^1.0.4", "@smithy/util-endpoints@^1.0.7": - version "1.2.0" - resolved "https://registry.npmjs.org/@smithy/util-endpoints/-/util-endpoints-1.2.0.tgz#b8b805f47e8044c158372f69b88337703117665d" - integrity sha512-BuDHv8zRjsE5zXd3PxFXFknzBG3owCpjq8G3FcsXW3CykYXuEqM3nTSsmLzw5q+T12ZYuDlVUZKBdpNbhVtlrQ== +"@smithy/util-defaults-mode-node@^3.0.14", "@smithy/util-defaults-mode-node@^3.0.22": + version "3.0.23" + resolved "https://registry.npmjs.org/@smithy/util-defaults-mode-node/-/util-defaults-mode-node-3.0.23.tgz#d03d21816e8b2f586ccf4a87cd0b1cc55b4d75e0" + integrity sha512-9Y4WH7f0vnDGuHUa4lGX9e2p+sMwODibsceSV6rfkZOvMC+BY3StB2LdO1NHafpsyHJLpwAgChxQ38tFyd6vkg== dependencies: - "@smithy/node-config-provider" "^2.3.0" - "@smithy/types" "^2.12.0" + "@smithy/config-resolver" "^3.0.9" + "@smithy/credential-provider-imds" "^3.2.4" + "@smithy/node-config-provider" "^3.1.8" + "@smithy/property-provider" "^3.1.7" + "@smithy/smithy-client" "^3.4.0" + "@smithy/types" "^3.5.0" tslib "^2.6.2" -"@smithy/util-endpoints@^2.0.5", "@smithy/util-endpoints@^2.1.0": +"@smithy/util-endpoints@^2.0.5": version "2.1.0" resolved "https://registry.npmjs.org/@smithy/util-endpoints/-/util-endpoints-2.1.0.tgz#33395d918a43f0df44a453c6bfa0cf3d35ed1367" integrity sha512-ilS7/0jcbS2ELdg0fM/4GVvOiuk8/U3bIFXUW25xE1Vh1Ol4DP6vVHQKqM40rCMizCLmJ9UxK+NeJrKlhI3HVA== @@ -7123,11 +5169,13 @@ "@smithy/types" "^3.4.0" tslib "^2.6.2" -"@smithy/util-hex-encoding@^2.2.0": - version "2.2.0" - resolved "https://registry.npmjs.org/@smithy/util-hex-encoding/-/util-hex-encoding-2.2.0.tgz#87edb7c88c2f422cfca4bb21f1394ae9602c5085" - integrity sha512-7iKXR+/4TpLK194pVjKiasIyqMtTYJsgKgM242Y9uzt5dhHnUDvMNb+3xIhRJ9QhvqGii/5cRUt4fJn3dtXNHQ== +"@smithy/util-endpoints@^2.1.3": + version "2.1.3" + resolved "https://registry.npmjs.org/@smithy/util-endpoints/-/util-endpoints-2.1.3.tgz#7498151e9dc714bdd0c6339314dd2350fa4d250a" + integrity sha512-34eACeKov6jZdHqS5hxBMJ4KyWKztTMulhuQ2UdOoP6vVxMLrOKUqIXAwJe/wiWMhXhydLW664B02CNpQBQ4Aw== dependencies: + "@smithy/node-config-provider" "^3.1.8" + "@smithy/types" "^3.5.0" tslib "^2.6.2" "@smithy/util-hex-encoding@^3.0.0": @@ -7137,14 +5185,6 @@ dependencies: tslib "^2.6.2" -"@smithy/util-middleware@^2.0.2", "@smithy/util-middleware@^2.0.6", "@smithy/util-middleware@^2.0.8", "@smithy/util-middleware@^2.2.0": - version "2.2.0" - resolved "https://registry.npmjs.org/@smithy/util-middleware/-/util-middleware-2.2.0.tgz#80cfad40f6cca9ffe42a5899b5cb6abd53a50006" - integrity sha512-L1qpleXf9QD6LwLCJ5jddGkgWyuSvWBkJwWAZ6kFkdifdso+sk3L3O1HdmPvCdnCK3IS4qWyPxev01QMnfHSBw== - dependencies: - "@smithy/types" "^2.12.0" - tslib "^2.6.2" - "@smithy/util-middleware@^3.0.3", "@smithy/util-middleware@^3.0.4": version "3.0.4" resolved "https://registry.npmjs.org/@smithy/util-middleware/-/util-middleware-3.0.4.tgz#a541edb8d3f2923ab06460ec3f1217c143ae5706" @@ -7153,7 +5193,24 @@ "@smithy/types" "^3.4.0" tslib "^2.6.2" -"@smithy/util-retry@3.0.4", "@smithy/util-retry@^3.0.3", "@smithy/util-retry@^3.0.4": +"@smithy/util-middleware@^3.0.7": + version "3.0.7" + resolved "https://registry.npmjs.org/@smithy/util-middleware/-/util-middleware-3.0.7.tgz#770d09749b6d170a1641384a2e961487447446fa" + integrity sha512-OVA6fv/3o7TMJTpTgOi1H5OTwnuUa8hzRzhSFDtZyNxi6OZ70L/FHattSmhE212I7b6WSOJAAmbYnvcjTHOJCA== + dependencies: + "@smithy/types" "^3.5.0" + tslib "^2.6.2" + +"@smithy/util-retry@3.0.7", "@smithy/util-retry@^3.0.7": + version "3.0.7" + resolved "https://registry.npmjs.org/@smithy/util-retry/-/util-retry-3.0.7.tgz#694e0667574ffe9772f620b35d3c7286aced35e9" + integrity sha512-nh1ZO1vTeo2YX1plFPSe/OXaHkLAHza5jpokNiiKX2M5YpNUv6RxGJZhpfmiR4jSvVHCjIDmILjrxKmP+/Ghug== + dependencies: + "@smithy/service-error-classification" "^3.0.7" + "@smithy/types" "^3.5.0" + tslib "^2.6.2" + +"@smithy/util-retry@^3.0.3": version "3.0.4" resolved "https://registry.npmjs.org/@smithy/util-retry/-/util-retry-3.0.4.tgz#281de3f89458b5e3b86ca92937eb1212bcecf67f" integrity sha512-JJr6g0tO1qO2tCQyK+n3J18r34ZpvatlFN5ULcLranFIBZPxqoivb77EPyNTVwTGMEvvq2qMnyjm4jMIxjdLFg== @@ -7162,30 +5219,21 @@ "@smithy/types" "^3.4.0" tslib "^2.6.2" -"@smithy/util-retry@^2.0.2", "@smithy/util-retry@^2.0.6", "@smithy/util-retry@^2.0.8", "@smithy/util-retry@^2.2.0": - version "2.2.0" - resolved "https://registry.npmjs.org/@smithy/util-retry/-/util-retry-2.2.0.tgz#e8e019537ab47ba6b2e87e723ec51ee223422d85" - integrity sha512-q9+pAFPTfftHXRytmZ7GzLFFrEGavqapFc06XxzZFcSIGERXMerXxCitjOG1prVDR9QdjqotF40SWvbqcCpf8g== - dependencies: - "@smithy/service-error-classification" "^2.1.5" - "@smithy/types" "^2.12.0" - tslib "^2.6.2" - -"@smithy/util-stream@^2.0.12", "@smithy/util-stream@^2.0.20", "@smithy/util-stream@^2.2.0": - version "2.2.0" - resolved "https://registry.npmjs.org/@smithy/util-stream/-/util-stream-2.2.0.tgz#b1279e417992a0f74afa78d7501658f174ed7370" - integrity sha512-17faEXbYWIRst1aU9SvPZyMdWmqIrduZjVOqCPMIsWFNxs5yQQgFrJL6b2SdiCzyW9mJoDjFtgi53xx7EH+BXA== +"@smithy/util-stream@3.1.9", "@smithy/util-stream@^3.1.9": + version "3.1.9" + resolved "https://registry.npmjs.org/@smithy/util-stream/-/util-stream-3.1.9.tgz#d39656eae27696bdc5a3ec7c2f6b89c32dccd1ca" + integrity sha512-7YAR0Ub3MwTMjDfjnup4qa6W8gygZMxikBhFMPESi6ASsl/rZJhwLpF/0k9TuezScCojsM0FryGdz4LZtjKPPQ== dependencies: - "@smithy/fetch-http-handler" "^2.5.0" - "@smithy/node-http-handler" "^2.5.0" - "@smithy/types" "^2.12.0" - "@smithy/util-base64" "^2.3.0" - "@smithy/util-buffer-from" "^2.2.0" - "@smithy/util-hex-encoding" "^2.2.0" - "@smithy/util-utf8" "^2.3.0" + "@smithy/fetch-http-handler" "^3.2.9" + "@smithy/node-http-handler" "^3.2.4" + "@smithy/types" "^3.5.0" + "@smithy/util-base64" "^3.0.0" + "@smithy/util-buffer-from" "^3.0.0" + "@smithy/util-hex-encoding" "^3.0.0" + "@smithy/util-utf8" "^3.0.0" tslib "^2.6.2" -"@smithy/util-stream@^3.1.3", "@smithy/util-stream@^3.1.4": +"@smithy/util-stream@^3.1.3": version "3.1.4" resolved "https://registry.npmjs.org/@smithy/util-stream/-/util-stream-3.1.4.tgz#f4041a979dfafcbccdc64fa7ee8c376e39c8dc41" integrity sha512-txU3EIDLhrBZdGfon6E9V6sZz/irYnKFMblz4TLVjyq8hObNHNS2n9a2t7GIrl7d85zgEPhwLE0gANpZsvpsKg== @@ -7199,20 +5247,6 @@ "@smithy/util-utf8" "^3.0.0" tslib "^2.6.2" -"@smithy/util-uri-escape@^1.1.0": - version "1.1.0" - resolved "https://registry.npmjs.org/@smithy/util-uri-escape/-/util-uri-escape-1.1.0.tgz#a8c5edaf19c0efdb9b51661e840549cf600a1808" - integrity sha512-/jL/V1xdVRt5XppwiaEU8Etp5WHZj609n0xMTuehmCqdoOFbId1M+aEeDWZsQ+8JbEB/BJ6ynY2SlYmOaKtt8w== - dependencies: - tslib "^2.5.0" - -"@smithy/util-uri-escape@^2.2.0": - version "2.2.0" - resolved "https://registry.npmjs.org/@smithy/util-uri-escape/-/util-uri-escape-2.2.0.tgz#56f5764051a33b67bc93fdd2a869f971b0635406" - integrity sha512-jtmJMyt1xMD/d8OtbVJ2gFZOSKc+ueYJZPW20ULW1GOp/q/YIM0wNh+u8ZFao9UaIGz4WoPW8hC64qlWLIfoDA== - dependencies: - tslib "^2.6.2" - "@smithy/util-uri-escape@^3.0.0": version "3.0.0" resolved "https://registry.npmjs.org/@smithy/util-uri-escape/-/util-uri-escape-3.0.0.tgz#e43358a78bf45d50bb736770077f0f09195b6f54" @@ -7220,7 +5254,7 @@ dependencies: tslib "^2.6.2" -"@smithy/util-utf8@^2.0.0", "@smithy/util-utf8@^2.0.2", "@smithy/util-utf8@^2.3.0": +"@smithy/util-utf8@^2.0.0": version "2.3.0" resolved "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-2.3.0.tgz#dd96d7640363259924a214313c3cf16e7dd329c5" integrity sha512-R8Rdn8Hy72KKcebgLiv8jQcQkXoLMOGGv5uI1/k0l+snqkOzQ1R0ChUBCxWMlBsFMekWjq0wRudIweFs7sKT5A== @@ -7236,16 +5270,7 @@ "@smithy/util-buffer-from" "^3.0.0" tslib "^2.6.2" -"@smithy/util-waiter@^2.0.13", "@smithy/util-waiter@^2.0.15", "@smithy/util-waiter@^2.0.9": - version "2.2.0" - resolved "https://registry.npmjs.org/@smithy/util-waiter/-/util-waiter-2.2.0.tgz#d11baf50637bfaadb9641d6ca1619da413dd2612" - integrity sha512-IHk53BVw6MPMi2Gsn+hCng8rFA3ZmR3Rk7GllxDUW9qFJl/hiSvskn7XldkECapQVkIg/1dHpMAxI9xSTaLLSA== - dependencies: - "@smithy/abort-controller" "^2.2.0" - "@smithy/types" "^2.12.0" - tslib "^2.6.2" - -"@smithy/util-waiter@^3.1.2", "@smithy/util-waiter@^3.1.3": +"@smithy/util-waiter@^3.1.2": version "3.1.3" resolved "https://registry.npmjs.org/@smithy/util-waiter/-/util-waiter-3.1.3.tgz#a633257cc65f83cf5714a0f66665070868c3aa91" integrity sha512-OU0YllH51/CxD8iyr3UHSMwYqTGTyuxFdCMH/0F978t+iDmJseC/ttrWPb22zmYkhkrjqtipzC1xaMuax5QKIA== @@ -7254,6 +5279,15 @@ "@smithy/types" "^3.4.0" tslib "^2.6.2" +"@smithy/util-waiter@^3.1.6": + version "3.1.6" + resolved "https://registry.npmjs.org/@smithy/util-waiter/-/util-waiter-3.1.6.tgz#c65870d0c802e33b96112fac5c4471b3bf2eeecb" + integrity sha512-xs/KAwWOeCklq8aMlnpk25LgxEYHKOEodfjfKclDMLcBJEVEKzDLxZxBQyztcuPJ7F54213NJS8PxoiHNMdItQ== + dependencies: + "@smithy/abort-controller" "^3.1.5" + "@smithy/types" "^3.5.0" + tslib "^2.6.2" + "@szmarczak/http-timer@^5.0.1": version "5.0.1" resolved "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-5.0.1.tgz#c7c1bf1141cdd4751b0399c8fc7b8b664cd5be3a" @@ -8265,18 +6299,18 @@ available-typed-arrays@^1.0.7: dependencies: possible-typed-array-names "^1.0.0" -aws-sdk-client-mock-jest@^3.1.0: - version "3.1.0" - resolved "https://registry.npmjs.org/aws-sdk-client-mock-jest/-/aws-sdk-client-mock-jest-3.1.0.tgz#fc0efeb7ac49552135a648f8a7d4b7116686ea4c" - integrity sha512-pUuHS1xwzVvHadHmzZqOAxve4/RqcV0tta1mEqTcxrBOEenfy9BzhTWYcjdqQWyA5nphT2j6NM44DeSz9lD57A== +aws-sdk-client-mock-jest@4.0.1: + version "4.0.1" + resolved "https://registry.npmjs.org/aws-sdk-client-mock-jest/-/aws-sdk-client-mock-jest-4.0.1.tgz#5b04ca83481b348a43e985f4d6ec3333b753dce8" + integrity sha512-PilgESg/u2sJvHg0+4C8/ty7w2+/pMhBYpdfPlCysnsjNfFk6a7eW7fwfIWoL93BCvcEblPdLyVL/vYTRCNFYA== dependencies: expect ">28.1.3" tslib "^2.1.0" -aws-sdk-client-mock@^3.1.0: - version "3.1.0" - resolved "https://registry.npmjs.org/aws-sdk-client-mock/-/aws-sdk-client-mock-3.1.0.tgz#5fa55e654e256c132cd2fce24645621e5486590a" - integrity sha512-3Mx5R8DDka2TB8qtr5jDbSVJsUM6uoX5tZSReBsJS8HunVtL9PHhb+RU7b+I3/53B2fJAyoEp7dJNXndBI+6MA== +aws-sdk-client-mock@4.0.1: + version "4.0.1" + resolved "https://registry.npmjs.org/aws-sdk-client-mock/-/aws-sdk-client-mock-4.0.1.tgz#51e5a877c46ad21a7e51d3b7840006b7255bbd39" + integrity sha512-yD2mmgy73Xce097G5hIpr1k7j50qzvJ49/+6osGZiCyk4m6cwhb+2x7kKFY1gEMwTzaS8+m8fXv9SB29SkRYyQ== dependencies: "@types/sinon" "^10.0.10" sinon "^16.1.3" @@ -10735,13 +8769,6 @@ fast-uri@^3.0.1: resolved "https://registry.npmjs.org/fast-uri/-/fast-uri-3.0.1.tgz#cddd2eecfc83a71c1be2cc2ef2061331be8a7134" integrity sha512-MWipKbbYiYI0UC7cl8m/i/IWTqfC8YXsqjzybjddLsFjStroQzsHXkc73JutMvBiXmOvapk+axIl79ig5t55Bw== -fast-xml-parser@4.2.5: - version "4.2.5" - resolved "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-4.2.5.tgz#a6747a09296a6cb34f2ae634019bf1738f3b421f" - integrity sha512-B9/wizE4WngqQftFPmdaMYlXoJlJOYxGQOanC77fq9k8+Z0v5dDSVh+3glErdIROP//s/jgb7ZuxKfB8nVyo0g== - dependencies: - strnum "^1.0.5" - fast-xml-parser@4.4.1: version "4.4.1" resolved "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-4.4.1.tgz#86dbf3f18edf8739326447bcaac31b4ae7f6514f" @@ -10773,6 +8800,11 @@ fecha@^4.2.0: resolved "https://registry.npmjs.org/fecha/-/fecha-4.2.3.tgz#4d9ccdbc61e8629b259fdca67e65891448d569fd" integrity sha512-OP2IUU6HeYKJi3i0z4A19kHMQoLVs4Hc+DPqqxI2h/DPZHTm/vjsfC6P0b4jCMy14XizLBqvndQ+UilD7707Jw== +fflate@0.8.1: + version "0.8.1" + resolved "https://registry.npmjs.org/fflate/-/fflate-0.8.1.tgz#1ed92270674d2ad3c73f077cd0acf26486dae6c9" + integrity sha512-/exOvEuc+/iaUm105QIiOt4LpBdMTWsXxqR0HDF35vx3fmaKzw7354gTilCh5rkzEt8WYyG//ku3h3nRmd7CHQ== + figures@3.2.0, figures@^3.0.0, figures@^3.1.0: version "3.2.0" resolved "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz#625c18bd293c604dc4a8ddb2febf0c88341746af" @@ -17005,12 +15037,12 @@ tsconfig-paths@^4.1.2: minimist "^1.2.6" strip-bom "^3.0.0" -tslib@^1.11.1, tslib@^1.8.1: +tslib@^1.8.1: version "1.14.1" resolved "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== -tslib@^2.0.1, tslib@^2.0.3, tslib@^2.1.0, tslib@^2.3.0, tslib@^2.3.1, tslib@^2.4.0, tslib@^2.5.0, tslib@^2.6.2: +tslib@^2.0.1, tslib@^2.0.3, tslib@^2.1.0, tslib@^2.3.0, tslib@^2.4.0, tslib@^2.6.2: version "2.7.0" resolved "https://registry.npmjs.org/tslib/-/tslib-2.7.0.tgz#d9b40c5c40ab59e8738f297df3087bf1a2690c01" integrity sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA== From c3863748bf37ed35b94d5db7fcd17e0603fa1fbd Mon Sep 17 00:00:00 2001 From: Rico Hermans Date: Mon, 7 Oct 2024 13:26:10 +0200 Subject: [PATCH 07/11] chore: add integ test for doubly nested stack (#31678) We have cli integ tests for nested stacks, but not for nested stacks-in-nested stacks. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../cli-integ/resources/cdk-apps/app/app.js | 9 +++++---- .../resources/cdk-apps/app/nested-stack.js | 16 ++++++++++++++++ .../tests/cli-integ-tests/cli.integtest.ts | 7 +++++++ 3 files changed, 28 insertions(+), 4 deletions(-) diff --git a/packages/@aws-cdk-testing/cli-integ/resources/cdk-apps/app/app.js b/packages/@aws-cdk-testing/cli-integ/resources/cdk-apps/app/app.js index 6ac252b4ac5aa..1458df41723bc 100755 --- a/packages/@aws-cdk-testing/cli-integ/resources/cdk-apps/app/app.js +++ b/packages/@aws-cdk-testing/cli-integ/resources/cdk-apps/app/app.js @@ -35,7 +35,7 @@ if (process.env.PACKAGE_LAYOUT_VERSION === '1') { } const { Annotations } = cdk; -const { StackWithNestedStack, StackWithNestedStackUsingParameters } = require('./nested-stack'); +const { StackWithNestedStack, StackWithDoublyNestedStack, StackWithNestedStackUsingParameters } = require('./nested-stack'); const stackPrefix = process.env.STACK_NAME_PREFIX; if (!stackPrefix) { @@ -176,7 +176,7 @@ class DependentStack extends Stack { super(scope, id); const innerDependentStack = new InnerDependentStack(this, 'InnerDependentStack'); - + this.addDependency(innerDependentStack); } } @@ -204,7 +204,7 @@ class MigrateStack extends cdk.Stack { new cdk.CfnOutput(this, 'QueueUrl', { value: queue.queueUrl, }); - + new cdk.CfnOutput(this, 'QueueLogicalId', { value: queue.node.defaultChild.logicalId, }); @@ -258,7 +258,7 @@ class ImportableStack extends cdk.Stack { new cdk.CfnOutput(this, 'QueueUrl', { value: queue.queueUrl, }); - + new cdk.CfnOutput(this, 'QueueLogicalId', { value: queue.node.defaultChild.logicalId, }); @@ -844,6 +844,7 @@ switch (stackSet) { new StackWithNestedStack(app, `${stackPrefix}-with-nested-stack`); new StackWithNestedStackUsingParameters(app, `${stackPrefix}-with-nested-stack-using-parameters`); + new StackWithDoublyNestedStack(app, `${stackPrefix}-with-doubly-nested-stack`); new ListStack(app, `${stackPrefix}-list-stacks`) new ListMultipleDependentStack(app, `${stackPrefix}-list-multiple-dependent-stacks`); diff --git a/packages/@aws-cdk-testing/cli-integ/resources/cdk-apps/app/nested-stack.js b/packages/@aws-cdk-testing/cli-integ/resources/cdk-apps/app/nested-stack.js index 87a45bb64b036..ca3bd19bed49d 100644 --- a/packages/@aws-cdk-testing/cli-integ/resources/cdk-apps/app/nested-stack.js +++ b/packages/@aws-cdk-testing/cli-integ/resources/cdk-apps/app/nested-stack.js @@ -25,6 +25,21 @@ class MyNestedStack extends cfn.NestedStack { } } +class DoublyNestedStack extends cfn.NestedStack { + constructor(scope, id) { + super(scope, id); + + new MyNestedStack(this, 'Nestor'); + } +} + +class StackWithDoublyNestedStack extends Stack { + constructor(scope, id) { + super(scope, id); + new DoublyNestedStack(this, 'DoubleDouble'); + } +} + class StackWithNestedStackUsingParameters extends Stack { constructor(scope, id) { super(scope, id); @@ -47,3 +62,4 @@ class MyNestedStackUsingParameters extends cfn.NestedStack { exports.StackWithNestedStack = StackWithNestedStack; exports.StackWithNestedStackUsingParameters = StackWithNestedStackUsingParameters; +exports.StackWithDoublyNestedStack = StackWithDoublyNestedStack; diff --git a/packages/@aws-cdk-testing/cli-integ/tests/cli-integ-tests/cli.integtest.ts b/packages/@aws-cdk-testing/cli-integ/tests/cli-integ-tests/cli.integtest.ts index 6e98a1a7e6654..841548541f3ec 100644 --- a/packages/@aws-cdk-testing/cli-integ/tests/cli-integ-tests/cli.integtest.ts +++ b/packages/@aws-cdk-testing/cli-integ/tests/cli-integ-tests/cli.integtest.ts @@ -351,6 +351,13 @@ integTest( }), ); +integTest('doubly nested stack', + withDefaultFixture(async (fixture) => { + await fixture.cdkDeploy('with-doubly-nested-stack', { + captureStderr: false, + }); + })); + integTest( 'nested stack with parameters', withDefaultFixture(async (fixture) => { From e8dc7bb8dd0243f0140debaa932ee3253543fa06 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 7 Oct 2024 12:01:35 +0000 Subject: [PATCH 08/11] chore(deps): bump tj-actions/changed-files from 45.0.2 to 45.0.3 (#31683) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files) from 45.0.2 to 45.0.3.
Changelog

Sourced from tj-actions/changed-files's changelog.

Changelog

45.0.3 - (2024-10-03)

🐛 Bug Fixes

  • Overwriting yaml filter patterns (#2307) (c3a1bb2) - (Tonye Jack)
  • deps: Update dependency @​actions/core to v1.11.0 (9d4f8fe) - (renovate[bot])
  • Bug with files ignore yaml patterns not filtering the list of files (#2304) (d0cf164) - (Tonye Jack)
  • Test for since last remote commit check on pull_request closed (#2295) (e753fb0) - (Tonye Jack)

➕ Add

  • Added missing changes and modified dist assets. (36d5b9d) - (GitHub Action)
  • Added missing changes and modified dist assets. (4dbe54f) - (GitHub Action)

📚 Documentation

⚙️ Miscellaneous Tasks

  • deps: Update dependency @​types/lodash to v4.17.10 (27843f1) - (renovate[bot])
  • deps: Lock file maintenance (8a4a975) - (renovate[bot])
  • deps: Update dependency @​types/node to v22.7.4 (6bfa9e7) - (renovate[bot])
  • deps: Update dependency @​types/node to v22.7.3 (625dbd6) - (renovate[bot])
  • deps: Update dependency @​types/node to v22.7.2 (c29c1d3) - (renovate[bot])
  • deps: Update dependency @​types/node to v22.7.0 (e21f1a3) - (renovate[bot])
  • deps: Update dependency @​types/node to v22.6.1 (792230f) - (renovate[bot])
  • deps: Update dependency @​vercel/ncc to v0.38.2 (537f1c6) - (renovate[bot])
  • deps: Update dependency @​types/lodash to v4.17.9 (82587d8) - (renovate[bot])
  • deps: Lock file maintenance (eda64a6) - (renovate[bot])
  • deps: Update actions/setup-node action to v4.0.4 (4d5444c) - (renovate[bot])
  • deps: Update peter-evans/create-pull-request action to v7.0.5 (c2e104b) - (renovate[bot])
  • deps: Update dependency eslint to v8.57.1 (eed685a) - (renovate[bot])

⬆️ Upgrades

  • Upgraded to v45.0.2 (#2282)

Co-authored-by: jackton1 17484350+jackton1@users.noreply.github.com (6f538bb) - (tj-actions[bot])

45.0.2 - (2024-09-16)

🐛 Bug Fixes

  • deps: Update dependency yaml to v2.5.1 (c7114f6) - (renovate[bot])

... (truncated)

Commits
  • c3a1bb2 fix: overwriting yaml filter patterns (#2307)
  • 27843f1 chore(deps): update dependency @​types/lodash to v4.17.10
  • 36d5b9d Added missing changes and modified dist assets.
  • 9d4f8fe fix(deps): update dependency @​actions/core to v1.11.0
  • d0cf164 fix: bug with files ignore yaml patterns not filtering the list of files (#2304)
  • 641e22a docs: Update README.md (#2300)
  • 8a4a975 chore(deps): lock file maintenance
  • 6bfa9e7 chore(deps): update dependency @​types/node to v22.7.4
  • 625dbd6 chore(deps): update dependency @​types/node to v22.7.3
  • 1a71128 docs: Update README.md (#2296)
  • Additional commits viewable in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=tj-actions/changed-files&package-manager=github_actions&previous-version=45.0.2&new-version=45.0.3)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- .github/workflows/request-cli-integ-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/request-cli-integ-test.yml b/.github/workflows/request-cli-integ-test.yml index 8822120fbd2e7..09d71137ddffd 100644 --- a/.github/workflows/request-cli-integ-test.yml +++ b/.github/workflows/request-cli-integ-test.yml @@ -19,7 +19,7 @@ jobs: persist-credentials: false - name: Find changed cli files id: changed-cli-files - uses: tj-actions/changed-files@48d8f15b2aaa3d255ca5af3eba4870f807ce6b3c + uses: tj-actions/changed-files@c3a1bb2c992d77180ae65be6ae6c166cf40f857c with: base_sha: ${{ github.event.pull_request.base.sha }} files_yaml: | From 3e40edce14080939baa8b5b3a3a100e991d965fd Mon Sep 17 00:00:00 2001 From: Rico Hermans Date: Mon, 7 Oct 2024 15:23:32 +0200 Subject: [PATCH 09/11] feat(cli): cdk rollback (#31684) This is a re-draft of #31407. All description and motivation of the previous PR still apply. The previous PR caused a regression because some `CREATE_IN_PROGRESS` events for CloudFormation do not have a `PhysicalResourceId`. Fix that issue in this PR. Update the existing unit test that was supposed to catch this issue previously, it did not set a `ResourceStatus` which caused the event to be skipped for the wrong reason. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk-testing/cli-integ/README.md | 2 +- .../cli-integ/lib/with-cdk-app.ts | 19 +- .../cdk-apps/rollback-test-app/app.js | 100 ++++++ .../cdk-apps/rollback-test-app/cdk.json | 7 + .../tests/cli-integ-tests/cli.integtest.ts | 79 +++++ packages/aws-cdk-lib/cx-api/FEATURE_FLAGS.md | 16 +- packages/aws-cdk/README.md | 63 ++-- .../lib/api/bootstrap/bootstrap-template.yaml | 4 +- packages/aws-cdk/lib/api/cxapp/exec.ts | 3 + packages/aws-cdk/lib/api/deployments.ts | 205 ++++++++++- .../cloudformation/stack-activity-monitor.ts | 90 ++--- .../util/cloudformation/stack-event-poller.ts | 182 ++++++++++ .../api/util/cloudformation/stack-status.ts | 36 ++ packages/aws-cdk/lib/cdk-toolkit.ts | 86 +++++ packages/aws-cdk/lib/cli.ts | 31 ++ .../api/cloudformation-deployments.test.ts | 334 ++++++++++++------ .../test/api/fake-cloudformation-stack.ts | 22 +- .../test/api/stack-activity-monitor.test.ts | 12 + packages/aws-cdk/test/cdk-toolkit.test.ts | 33 +- packages/aws-cdk/test/util/mock-sdk.ts | 14 +- .../aws-cdk/test/util/stack-monitor.test.ts | 31 +- 21 files changed, 1142 insertions(+), 227 deletions(-) create mode 100644 packages/@aws-cdk-testing/cli-integ/resources/cdk-apps/rollback-test-app/app.js create mode 100644 packages/@aws-cdk-testing/cli-integ/resources/cdk-apps/rollback-test-app/cdk.json create mode 100644 packages/aws-cdk/lib/api/util/cloudformation/stack-event-poller.ts diff --git a/packages/@aws-cdk-testing/cli-integ/README.md b/packages/@aws-cdk-testing/cli-integ/README.md index 2dc2e9c70d8cc..d1dd485660151 100644 --- a/packages/@aws-cdk-testing/cli-integ/README.md +++ b/packages/@aws-cdk-testing/cli-integ/README.md @@ -37,7 +37,7 @@ Test suites are written as a collection of Jest tests, and they are run using Je ### Setup -Building the @aws-cdk-testing package is not very different from building the rest of the CDK. However, If you are having issues with the tests, you can ensure your enviornment is built properly by following the steps below: +Building the @aws-cdk-testing package is not very different from building the rest of the CDK. However, If you are having issues with the tests, you can ensure your environment is built properly by following the steps below: ```shell yarn install # Install dependencies diff --git a/packages/@aws-cdk-testing/cli-integ/lib/with-cdk-app.ts b/packages/@aws-cdk-testing/cli-integ/lib/with-cdk-app.ts index 3ad02171d750f..eed0a0facb2e8 100644 --- a/packages/@aws-cdk-testing/cli-integ/lib/with-cdk-app.ts +++ b/packages/@aws-cdk-testing/cli-integ/lib/with-cdk-app.ts @@ -24,7 +24,8 @@ export const EXTENDED_TEST_TIMEOUT_S = 30 * 60; * For backwards compatibility with existing tests (so we don't have to change * too much) the inner block is expected to take a `TestFixture` object. */ -export function withCdkApp( +export function withSpecificCdkApp( + appName: string, block: (context: TestFixture) => Promise, ): (context: TestContext & AwsContext & DisableBootstrapContext) => Promise { return async (context: TestContext & AwsContext & DisableBootstrapContext) => { @@ -36,7 +37,7 @@ export function withCdkApp( context.output.write(` Test directory: ${integTestDir}\n`); context.output.write(` Region: ${context.aws.region}\n`); - await cloneDirectory(path.join(RESOURCES_DIR, 'cdk-apps', 'app'), integTestDir, context.output); + await cloneDirectory(path.join(RESOURCES_DIR, 'cdk-apps', appName), integTestDir, context.output); const fixture = new TestFixture( integTestDir, stackNamePrefix, @@ -87,6 +88,16 @@ export function withCdkApp( }; } +/** + * Like `withSpecificCdkApp`, but uses the default integration testing app with a million stacks in it + */ +export function withCdkApp( + block: (context: TestFixture) => Promise, +): (context: TestContext & AwsContext & DisableBootstrapContext) => Promise { + // 'app' is the name of the default integration app in the `cdk-apps` directory + return withSpecificCdkApp('app', block); +} + export function withCdkMigrateApp(language: string, block: (context: TestFixture) => Promise) { return async (context: A) => { const stackName = `cdk-migrate-${language}-integ-${context.randomString}`; @@ -188,6 +199,10 @@ export function withDefaultFixture(block: (context: TestFixture) => Promise Promise) { + return withAws(withTimeout(DEFAULT_TEST_TIMEOUT_S, withSpecificCdkApp(appName, block))); +} + export function withExtendedTimeoutFixture(block: (context: TestFixture) => Promise) { return withAws(withTimeout(EXTENDED_TEST_TIMEOUT_S, withCdkApp(block))); } diff --git a/packages/@aws-cdk-testing/cli-integ/resources/cdk-apps/rollback-test-app/app.js b/packages/@aws-cdk-testing/cli-integ/resources/cdk-apps/rollback-test-app/app.js new file mode 100644 index 0000000000000..419e30898c9bf --- /dev/null +++ b/packages/@aws-cdk-testing/cli-integ/resources/cdk-apps/rollback-test-app/app.js @@ -0,0 +1,100 @@ +const cdk = require('aws-cdk-lib'); +const lambda = require('aws-cdk-lib/aws-lambda'); +const cr = require('aws-cdk-lib/custom-resources'); + +/** + * This stack will be deployed in multiple phases, to achieve a very specific effect + * + * It contains resources r1 and r2, where r1 gets deployed first. + * + * - PHASE = 1: both resources deploy regularly. + * - PHASE = 2a: r1 gets updated, r2 will fail to update + * - PHASE = 2b: r1 gets updated, r2 will fail to update, and r1 will fail its rollback. + * + * To exercise this app: + * + * ``` + * env PHASE=1 npx cdk deploy + * env PHASE=2b npx cdk deploy --no-rollback + * # This will leave the stack in UPDATE_FAILED + * + * env PHASE=2b npx cdk rollback + * # This will start a rollback that will fail because r1 fails its rollabck + * + * env PHASE=2b npx cdk rollback --force + * # This will retry the rollabck and skip r1 + * ``` + */ +class RollbacktestStack extends cdk.Stack { + constructor(scope, id, props) { + super(scope, id, props); + + let r1props = {}; + let r2props = {}; + + const phase = process.env.PHASE; + switch (phase) { + case '1': + // Normal deployment + break; + case '2a': + // r1 updates normally, r2 fails updating + r2props.FailUpdate = true; + break; + case '2b': + // r1 updates normally, r2 fails updating, r1 fails rollback + r1props.FailRollback = true; + r2props.FailUpdate = true; + break; + } + + const fn = new lambda.Function(this, 'Fun', { + runtime: lambda.Runtime.NODEJS_LATEST, + code: lambda.Code.fromInline(`exports.handler = async function(event, ctx) { + const key = \`Fail\${event.RequestType}\`; + if (event.ResourceProperties[key]) { + throw new Error(\`\${event.RequestType} fails!\`); + } + if (event.OldResourceProperties?.FailRollback) { + throw new Error('Failing rollback!'); + } + return {}; + }`), + handler: 'index.handler', + timeout: cdk.Duration.minutes(1), + }); + const provider = new cr.Provider(this, "MyProvider", { + onEventHandler: fn, + }); + + const r1 = new cdk.CustomResource(this, 'r1', { + serviceToken: provider.serviceToken, + properties: r1props, + }); + const r2 = new cdk.CustomResource(this, 'r2', { + serviceToken: provider.serviceToken, + properties: r2props, + }); + r2.node.addDependency(r1); + } +} + +const app = new cdk.App({ + context: { + '@aws-cdk/core:assetHashSalt': process.env.CODEBUILD_BUILD_ID, // Force all assets to be unique, but consistent in one build + }, +}); + +const defaultEnv = { + account: process.env.CDK_DEFAULT_ACCOUNT, + region: process.env.CDK_DEFAULT_REGION +}; + +const stackPrefix = process.env.STACK_NAME_PREFIX; +if (!stackPrefix) { + throw new Error(`the STACK_NAME_PREFIX environment variable is required`); +} + +// Sometimes we don't want to synthesize all stacks because it will impact the results +new RollbacktestStack(app, `${stackPrefix}-test-rollback`, { env: defaultEnv }); +app.synth(); \ No newline at end of file diff --git a/packages/@aws-cdk-testing/cli-integ/resources/cdk-apps/rollback-test-app/cdk.json b/packages/@aws-cdk-testing/cli-integ/resources/cdk-apps/rollback-test-app/cdk.json new file mode 100644 index 0000000000000..44809158dbdac --- /dev/null +++ b/packages/@aws-cdk-testing/cli-integ/resources/cdk-apps/rollback-test-app/cdk.json @@ -0,0 +1,7 @@ +{ + "app": "node app.js", + "versionReporting": false, + "context": { + "aws-cdk:enableDiffNoFail": "true" + } +} diff --git a/packages/@aws-cdk-testing/cli-integ/tests/cli-integ-tests/cli.integtest.ts b/packages/@aws-cdk-testing/cli-integ/tests/cli-integ-tests/cli.integtest.ts index 841548541f3ec..a7365c8a1b993 100644 --- a/packages/@aws-cdk-testing/cli-integ/tests/cli-integ-tests/cli.integtest.ts +++ b/packages/@aws-cdk-testing/cli-integ/tests/cli-integ-tests/cli.integtest.ts @@ -32,6 +32,7 @@ import { withCDKMigrateFixture, withExtendedTimeoutFixture, randomString, + withSpecificFixture, withoutBootstrap, } from '../../lib'; @@ -2325,6 +2326,84 @@ integTest( }), ); +integTest( + 'test cdk rollback', + withSpecificFixture('rollback-test-app', async (fixture) => { + let phase = '1'; + + // Should succeed + await fixture.cdkDeploy('test-rollback', { + options: ['--no-rollback'], + modEnv: { PHASE: phase }, + verbose: false, + }); + try { + phase = '2a'; + + // Should fail + const deployOutput = await fixture.cdkDeploy('test-rollback', { + options: ['--no-rollback'], + modEnv: { PHASE: phase }, + verbose: false, + allowErrExit: true, + }); + expect(deployOutput).toContain('UPDATE_FAILED'); + + // Rollback + await fixture.cdk(['rollback'], { + modEnv: { PHASE: phase }, + verbose: false, + }); + } finally { + await fixture.cdkDestroy('test-rollback'); + } + }), +); + +integTest( + 'test cdk rollback --force', + withSpecificFixture('rollback-test-app', async (fixture) => { + let phase = '1'; + + // Should succeed + await fixture.cdkDeploy('test-rollback', { + options: ['--no-rollback'], + modEnv: { PHASE: phase }, + verbose: false, + }); + try { + phase = '2b'; // Fail update and also fail rollback + + // Should fail + const deployOutput = await fixture.cdkDeploy('test-rollback', { + options: ['--no-rollback'], + modEnv: { PHASE: phase }, + verbose: false, + allowErrExit: true, + }); + + expect(deployOutput).toContain('UPDATE_FAILED'); + + // Should still fail + const rollbackOutput = await fixture.cdk(['rollback'], { + modEnv: { PHASE: phase }, + verbose: false, + allowErrExit: true, + }); + + expect(rollbackOutput).toContain('Failing rollback'); + + // Rollback and force cleanup + await fixture.cdk(['rollback', '--force'], { + modEnv: { PHASE: phase }, + verbose: false, + }); + } finally { + await fixture.cdkDestroy('test-rollback'); + } + }), +); + integTest('cdk notices are displayed correctly', withDefaultFixture(async (fixture) => { const cache = { diff --git a/packages/aws-cdk-lib/cx-api/FEATURE_FLAGS.md b/packages/aws-cdk-lib/cx-api/FEATURE_FLAGS.md index 94b70a6d79d89..c070f4add53e6 100644 --- a/packages/aws-cdk-lib/cx-api/FEATURE_FLAGS.md +++ b/packages/aws-cdk-lib/cx-api/FEATURE_FLAGS.md @@ -1143,7 +1143,7 @@ shipped as part of the runtime environment. *When enabled, will always use the arn for identifiers for CfnSourceApiAssociation in the GraphqlApi construct rather than id.* (fix) -When this feature flag is enabled, we use the IGraphqlApi ARN rather than ID when creating or updating CfnSourceApiAssociation in +When this feature flag is enabled, we use the IGraphqlApi ARN rather than ID when creating or updating CfnSourceApiAssociation in the GraphqlApi construct. Using the ARN allows the association to support an association with a source api or merged api in another account. Note that for existing source api associations created with this flag disabled, enabling the flag will lead to a resource replacement. @@ -1200,7 +1200,7 @@ database cluster from a snapshot. *When enabled, the CodeCommit source action is using the default branch name 'main'.* (fix) -When setting up a CodeCommit source action for the source stage of a pipeline, please note that the +When setting up a CodeCommit source action for the source stage of a pipeline, please note that the default branch is 'master'. However, with the activation of this feature flag, the default branch is updated to 'main'. @@ -1378,7 +1378,7 @@ Other notifications that are not managed by this stack will be kept. Currently, 'inputPath' and 'outputPath' from the TaskStateBase Props is being used under BedrockInvokeModelProps to define S3URI under 'input' and 'output' fields of State Machine Task definition. -When this feature flag is enabled, specify newly introduced props 's3InputUri' and +When this feature flag is enabled, specify newly introduced props 's3InputUri' and 's3OutputUri' to populate S3 uri under input and output fields in state machine task definition for Bedrock invoke model. @@ -1413,7 +1413,7 @@ When this feature flag is enabled, we will only grant the necessary permissions *When enabled, initOptions.timeout and resourceSignalTimeout values will be summed together.* (fix) Currently is both initOptions.timeout and resourceSignalTimeout are both specified in the options for creating an EC2 Instance, -only the value from 'resourceSignalTimeout' will be used. +only the value from 'resourceSignalTimeout' will be used. When this feature flag is enabled, if both initOptions.timeout and resourceSignalTimeout are specified, the values will to be summed together. @@ -1428,11 +1428,11 @@ When this feature flag is enabled, if both initOptions.timeout and resourceSigna *When enabled, a Lambda authorizer Permission created when using GraphqlApi will be properly scoped with a SourceArn.* (fix) -Currently, when using a Lambda authorizer with an AppSync GraphQL API, the AWS CDK automatically generates the necessary AWS::Lambda::Permission -to allow the AppSync API to invoke the Lambda authorizer. This permission is overly permissive because it lacks a SourceArn, meaning +Currently, when using a Lambda authorizer with an AppSync GraphQL API, the AWS CDK automatically generates the necessary AWS::Lambda::Permission +to allow the AppSync API to invoke the Lambda authorizer. This permission is overly permissive because it lacks a SourceArn, meaning it allows invocations from any source. -When this feature flag is enabled, the AWS::Lambda::Permission will be properly scoped with the SourceArn corresponding to the +When this feature flag is enabled, the AWS::Lambda::Permission will be properly scoped with the SourceArn corresponding to the specific AppSync GraphQL API. @@ -1446,7 +1446,7 @@ specific AppSync GraphQL API. *When enabled, both `@aws-sdk` and `@smithy` packages will be excluded from the Lambda Node.js 18.x runtime to prevent version mismatches in bundled applications.* (fix) -Currently, when bundling Lambda functions with the non-latest runtime that supports AWS SDK JavaScript (v3), only the '@aws-sdk/*' packages are excluded by default. +Currently, when bundling Lambda functions with the non-latest runtime that supports AWS SDK JavaScript (v3), only the '@aws-sdk/*' packages are excluded by default. However, this can cause version mismatches between the '@aws-sdk/*' and '@smithy/*' packages, as they are tightly coupled dependencies in AWS SDK v3. When this feature flag is enabled, both '@aws-sdk/*' and '@smithy/*' packages will be excluded during the bundling process. This ensures that no mismatches diff --git a/packages/aws-cdk/README.md b/packages/aws-cdk/README.md index 57081731a7c4c..a5359727e06ad 100644 --- a/packages/aws-cdk/README.md +++ b/packages/aws-cdk/README.md @@ -19,6 +19,7 @@ The AWS CDK Toolkit provides the `cdk` command-line interface that can be used t | [`cdk synth`](#cdk-synthesize) | Synthesize a CDK app to CloudFormation template(s) | | [`cdk diff`](#cdk-diff) | Diff stacks against current state | | [`cdk deploy`](#cdk-deploy) | Deploy a stack into an AWS account | +| [`cdk rollback`](#cdk-rollback) | Roll back a failed deployment | | [`cdk import`](#cdk-import) | Import existing AWS resources into a CDK stack | | [`cdk migrate`](#cdk-migrate) | Migrate AWS resources, CloudFormation stacks, and CloudFormation templates to CDK | | [`cdk watch`](#cdk-watch) | Watches a CDK app for deployable and hotswappable changes | @@ -202,6 +203,10 @@ $ cdk deploy --no-rollback $ cdk deploy -R ``` +If a deployment fails you can update your code and immediately retry the +deployment from the point of failure. If you would like to explicitly roll back a failed, paused deployment, +use `cdk rollback`. + NOTE: you cannot use `--no-rollback` for any updates that would cause a resource replacement, only for updates and creations of new resources. @@ -395,7 +400,7 @@ development, your prod app may not have any resources or the resources are comme out. In this scenario, you will receive an error message stating that the app has no stacks. -To bypass this error messages, you can pass the `--ignore-no-stacks` flag to the +To bypass this error messages, you can pass the `--ignore-no-stacks` flag to the `deploy` command: ```console @@ -466,6 +471,24 @@ and might have breaking changes in the future. > *: `Fn::GetAtt` is only partially supported. Refer to [this implementation](https://github.com/aws/aws-cdk/blob/main/packages/aws-cdk/lib/api/evaluate-cloudformation-template.ts#L477-L492) for supported resources and attributes. +### `cdk rollback` + +If a deployment performed using `cdk deploy --no-rollback` fails, your +deployment will be left in a failed, paused state. From this state you can +update your code and try the deployment again, or roll the deployment back to +the last stable state. + +To roll the deployment back, use `cdk rollback`. This will initiate a rollback +to the last stable state of your stack. + +Some resources may fail to roll back. If they do, you can try again by calling +`cdk rollback --orphan ` (can be specified multiple times). Or, run +`cdk rollback --force` to have the CDK CLI automatically orphan all failing +resources. + +(`cdk rollback` requires version 23 of the bootstrap stack, since it depends on +new permissions necessary to call the appropriate CloudFormation APIs) + ### `cdk watch` The `watch` command is similar to `deploy`, @@ -596,9 +619,9 @@ This feature currently has the following limitations: ### `cdk migrate` -⚠️**CAUTION**⚠️: CDK Migrate is currently experimental and may have breaking changes in the future. +⚠️**CAUTION**⚠️: CDK Migrate is currently experimental and may have breaking changes in the future. -CDK Migrate generates a CDK app from deployed AWS resources using `--from-scan`, deployed AWS CloudFormation stacks using `--from-stack`, and local AWS CloudFormation templates using `--from-path`. +CDK Migrate generates a CDK app from deployed AWS resources using `--from-scan`, deployed AWS CloudFormation stacks using `--from-stack`, and local AWS CloudFormation templates using `--from-path`. To learn more about the CDK Migrate feature, see [Migrate to AWS CDK](https://docs.aws.amazon.com/cdk/v2/guide/migrate.html). For more information on `cdk migrate` command options, see [cdk migrate command reference](https://docs.aws.amazon.com/cdk/v2/guide/ref-cli-cdk-migrate.html). @@ -630,7 +653,7 @@ Account and Region information are retrieved from default CDK CLI sources. Use ` $ cdk migrate --language typescript --from-scan --stack-name "myCloudFormationStack" ``` -Since CDK Migrate relies on the IaC generator service, any limitations of IaC generator will apply to CDK Migrate. For general limitations, see [Considerations](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/generate-IaC.html#generate-template-considerations). +Since CDK Migrate relies on the IaC generator service, any limitations of IaC generator will apply to CDK Migrate. For general limitations, see [Considerations](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/generate-IaC.html#generate-template-considerations). IaC generator limitations with discovering resource and property values will also apply here. As a result, CDK Migrate will only migrate resources supported by IaC generator. Some of your resources may not be supported and some property values may not be accessible. For more information, see [Iac generator and write-only properties](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/generate-IaC-write-only-properties.html) and [Supported resource types](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/generate-IaC-supported-resources.html). @@ -647,8 +670,8 @@ $ # template.json is a valid cloudformation template in the local directory $ cdk migrate --stack-name MyAwesomeApplication --language typescript --from-path MyTemplate.json ``` -This command generates a new directory named `MyAwesomeApplication` within your current working directory, and -then initializes a new CDK application within that directory. The CDK app contains a `MyAwesomeApplication` stack with resources configured to match those in your local CloudFormation template. +This command generates a new directory named `MyAwesomeApplication` within your current working directory, and +then initializes a new CDK application within that directory. The CDK app contains a `MyAwesomeApplication` stack with resources configured to match those in your local CloudFormation template. This results in a CDK application with the following structure, where the lib directory contains a stack definition with the same resource configuration as the provided template.json. @@ -678,13 +701,13 @@ This will generate a Python CDK app which will synthesize the same configuration ##### Generate a TypeScript CDK app from deployed AWS resources that are not associated with a stack -If you have resources in your account that were provisioned outside AWS IaC tools and would like to manage them with the CDK, you can use the `--from-scan` option to generate the application. +If you have resources in your account that were provisioned outside AWS IaC tools and would like to manage them with the CDK, you can use the `--from-scan` option to generate the application. In this example, we use the `--filter` option to specify which resources to migrate. You can filter resources to limit the number of resources migrated to only those specified by the `--filter` option, including any resources they depend on, or resources that depend on them (for example A filter which specifies a single Lambda Function, will find that specific table and any alarms that may monitor it). The `--filter` argument offers both AND as well as OR filtering. OR filtering can be specified by passing multiple `--filter` options, and AND filtering can be specified by passing a single `--filter` option with multiple comma separated key/value pairs as seen below (see below for examples). It is recommended to use the `--filter` option to limit the number of resources returned as some resource types provide sample resources by default in all accounts which can add to the resource limits. -`--from-scan` takes 3 potential arguments: `--new`, `most-recent`, and undefined. If `--new` is passed, CDK Migrate will initiate a new scan of the account and use that new scan to discover resources. If `--most-recent` is passed, CDK Migrate will use the most recent scan of the account to discover resources. If neither `--new` nor `--most-recent` are passed, CDK Migrate will take the most recent scan of the account to discover resources, unless there is no recent scan, in which case it will initiate a new scan. +`--from-scan` takes 3 potential arguments: `--new`, `most-recent`, and undefined. If `--new` is passed, CDK Migrate will initiate a new scan of the account and use that new scan to discover resources. If `--most-recent` is passed, CDK Migrate will use the most recent scan of the account to discover resources. If neither `--new` nor `--most-recent` are passed, CDK Migrate will take the most recent scan of the account to discover resources, unless there is no recent scan, in which case it will initiate a new scan. ```console # Filtering options @@ -717,14 +740,14 @@ $ cdk migrate --stack-name MyAwesomeApplication --language typescript --from-sca - CDK Migrate will only generate L1 constructs and does not currently support any higher level abstractions. - CDK Migrate successfully generating an application does *not* guarantee the application is immediately deployable. -It simply generates a CDK application which will synthesize a template that has identical resource configurations -to the provided template. +It simply generates a CDK application which will synthesize a template that has identical resource configurations +to the provided template. - - CDK Migrate does not interact with the CloudFormation service to verify the template -provided can deploy on its own. Although by default any CDK app generated using the `--from-scan` option exclude -CloudFormation managed resources, CDK Migrate will not verify prior to deployment that any resources scanned, or in the provided + - CDK Migrate does not interact with the CloudFormation service to verify the template +provided can deploy on its own. Although by default any CDK app generated using the `--from-scan` option exclude +CloudFormation managed resources, CDK Migrate will not verify prior to deployment that any resources scanned, or in the provided template are already managed in other CloudFormation templates, nor will it verify that the resources in the provided -template are available in the desired regions, which may impact ADC or Opt-In regions. +template are available in the desired regions, which may impact ADC or Opt-In regions. - If the provided template has parameters without default values, those will need to be provided before deploying the generated application. @@ -741,13 +764,13 @@ In practice this is how CDK Migrate generated applications will operate in the f ##### **The provided template is already deployed to CloudFormation in the account/region** -If the provided template came directly from a deployed CloudFormation stack, and that stack has not experienced any drift, +If the provided template came directly from a deployed CloudFormation stack, and that stack has not experienced any drift, then the generated application will be immediately deployable, and will not cause any changes to the deployed resources. Drift might occur if a resource in your template was modified outside of CloudFormation, namely via the AWS Console or AWS CLI. ##### **The provided template is not deployed to CloudFormation in the account/region, and there *is not* overlap with existing resources in the account/region** -If the provided template represents a set of resources that have no overlap with resources already deployed in the account/region, +If the provided template represents a set of resources that have no overlap with resources already deployed in the account/region, then the generated application will be immediately deployable. This could be because the stack has never been deployed, or the application was generated from a stack deployed in another account/region. @@ -764,16 +787,16 @@ In practice this means for any resource in the provided template, for example, } ``` -There must not exist a resource of that type with the same identifier in the desired region. In this example that identfier +There must not exist a resource of that type with the same identifier in the desired region. In this example that identfier would be "MyBucket" ##### **The provided template is not deployed to CloudFormation in the account/region, and there *is* overlap with existing resources in the account/region** -If the provided template represents a set of resources that overlap with resources already deployed in the account/region, -then the generated application will not be immediately deployable. If those overlapped resources are already managed by +If the provided template represents a set of resources that overlap with resources already deployed in the account/region, +then the generated application will not be immediately deployable. If those overlapped resources are already managed by another CloudFormation stack in that account/region, then those resources will need to be manually removed from the provided template. Otherwise, if the overlapped resources are not managed by another CloudFormation stack, then first remove those -resources from your CDK Application Stack, deploy the cdk application successfully, then re-add them and run `cdk import` +resources from your CDK Application Stack, deploy the cdk application successfully, then re-add them and run `cdk import` to import them into your deployed stack. ### `cdk destroy` diff --git a/packages/aws-cdk/lib/api/bootstrap/bootstrap-template.yaml b/packages/aws-cdk/lib/api/bootstrap/bootstrap-template.yaml index 8ed4bb8595446..ad71c39535426 100644 --- a/packages/aws-cdk/lib/api/bootstrap/bootstrap-template.yaml +++ b/packages/aws-cdk/lib/api/bootstrap/bootstrap-template.yaml @@ -485,6 +485,8 @@ Resources: - cloudformation:ExecuteChangeSet - cloudformation:CreateStack - cloudformation:UpdateStack + - cloudformation:RollbackStack + - cloudformation:ContinueUpdateRollback Resource: "*" - Sid: PipelineCrossAccountArtifactsBucket # Read/write buckets in different accounts. Permissions to buckets in @@ -651,7 +653,7 @@ Resources: Type: String Name: Fn::Sub: '/cdk-bootstrap/${Qualifier}/version' - Value: '22' + Value: '23' Outputs: BucketName: Description: The name of the S3 bucket owned by the CDK toolkit stack diff --git a/packages/aws-cdk/lib/api/cxapp/exec.ts b/packages/aws-cdk/lib/api/cxapp/exec.ts index 31f2fca029dd9..6b62d7ae2527f 100644 --- a/packages/aws-cdk/lib/api/cxapp/exec.ts +++ b/packages/aws-cdk/lib/api/cxapp/exec.ts @@ -49,6 +49,9 @@ export async function execProgram(aws: SdkProvider, config: Configuration): Prom if (!outdir) { throw new Error('unexpected: --output is required'); } + if (typeof outdir !== 'string') { + throw new Error(`--output takes a string, got ${JSON.stringify(outdir)}`); + } try { await fs.mkdirp(outdir); } catch (error: any) { diff --git a/packages/aws-cdk/lib/api/deployments.ts b/packages/aws-cdk/lib/api/deployments.ts index 285dba5d29114..d5b6f8a63e987 100644 --- a/packages/aws-cdk/lib/api/deployments.ts +++ b/packages/aws-cdk/lib/api/deployments.ts @@ -1,3 +1,4 @@ +import { randomUUID } from 'crypto'; import * as cxapi from '@aws-cdk/cx-api'; import * as cdk_assets from 'cdk-assets'; import { AssetManifest, IManifestEntry } from 'cdk-assets'; @@ -11,13 +12,17 @@ import { deployStack, DeployStackResult, destroyStack, DeploymentMethod } from ' import { EnvironmentResources, EnvironmentResourcesRegistry } from './environment-resources'; import { HotswapMode } from './hotswap/common'; import { loadCurrentTemplateWithNestedStacks, loadCurrentTemplate, RootTemplateWithNestedStacks } from './nested-stack-helpers'; -import { CloudFormationStack, Template, ResourcesToImport, ResourceIdentifierSummaries } from './util/cloudformation'; -import { StackActivityProgress } from './util/cloudformation/stack-activity-monitor'; +import { CloudFormationStack, Template, ResourcesToImport, ResourceIdentifierSummaries, stabilizeStack } from './util/cloudformation'; +import { StackActivityMonitor, StackActivityProgress } from './util/cloudformation/stack-activity-monitor'; +import { StackEventPoller } from './util/cloudformation/stack-event-poller'; +import { RollbackChoice } from './util/cloudformation/stack-status'; import { replaceEnvPlaceholders } from './util/placeholders'; import { makeBodyParameter } from './util/template-body-parameter'; import { AssetManifestBuilder } from '../util/asset-manifest-builder'; import { buildAssets, publishAssets, BuildAssetsOptions, PublishAssetsOptions, PublishingAws, EVENT_TO_LOGGER } from '../util/asset-publishing'; +const BOOTSTRAP_STACK_VERSION_FOR_ROLLBACK = 23; + /** * SDK obtained by assuming the lookup role * for a given environment @@ -210,6 +215,77 @@ export interface DeployStackOptions { ignoreNoStacks?: boolean; } +export interface RollbackStackOptions { + /** + * Stack to roll back + */ + readonly stack: cxapi.CloudFormationStackArtifact; + + /** + * Execution role for the deployment (pass through to CloudFormation) + * + * @default - Current role + */ + readonly roleArn?: string; + + /** + * Don't show stack deployment events, just wait + * + * @default false + */ + readonly quiet?: boolean; + + /** + * Whether we are on a CI system + * + * @default false + */ + readonly ci?: boolean; + + /** + * Name of the toolkit stack, if not the default name + * + * @default 'CDKToolkit' + */ + readonly toolkitStackName?: string; + + /** + * Whether to force a rollback or not + * + * Forcing a rollback will orphan all undeletable resources. + * + * @default false + */ + readonly force?: boolean; + + /** + * Orphan the resources with the given logical IDs + * + * @default - No orphaning + */ + readonly orphanLogicalIds?: string[]; + + /** + * Display mode for stack deployment progress. + * + * @default - StackActivityProgress.Bar - stack events will be displayed for + * the resource currently being deployed. + */ + readonly progress?: StackActivityProgress; + + /** + * Whether to validate the version of the bootstrap stack permissions + * + * @default true + */ + readonly validateBootstrapStackVersion?: boolean; +} + +export interface RollbackStackResult { + readonly notInRollbackableState?: boolean; + readonly success?: boolean; +} + interface AssetOptions { /** * Stack with assets to build. @@ -419,6 +495,125 @@ export class Deployments { }); } + public async rollbackStack(options: RollbackStackOptions): Promise { + let resourcesToSkip: string[] = options.orphanLogicalIds ?? []; + if (options.force && resourcesToSkip.length > 0) { + throw new Error('Cannot combine --force with --orphan'); + } + + const { + stackSdk, + resolvedEnvironment: _, + cloudFormationRoleArn, + envResources, + } = await this.prepareSdkFor(options.stack, options.roleArn, Mode.ForWriting); + + if (options.validateBootstrapStackVersion ?? true) { + // Do a verification of the bootstrap stack version + await this.validateBootstrapStackVersion( + options.stack.stackName, + BOOTSTRAP_STACK_VERSION_FOR_ROLLBACK, + options.stack.bootstrapStackVersionSsmParameter, + envResources); + } + + const cfn = stackSdk.cloudFormation(); + const deployName = options.stack.stackName; + + // We loop in case of `--force` and the stack ends up in `CONTINUE_UPDATE_ROLLBACK`. + let maxLoops = 10; + while (maxLoops--) { + let cloudFormationStack = await CloudFormationStack.lookup(cfn, deployName); + + switch (cloudFormationStack.stackStatus.rollbackChoice) { + case RollbackChoice.NONE: + warning(`Stack ${deployName} does not need a rollback: ${cloudFormationStack.stackStatus}`); + return { notInRollbackableState: true }; + + case RollbackChoice.START_ROLLBACK: + debug(`Initiating rollback of stack ${deployName}`); + await cfn.rollbackStack({ + StackName: deployName, + RoleARN: cloudFormationRoleArn, + ClientRequestToken: randomUUID(), + // Enabling this is just the better overall default, the only reason it isn't the upstream default is backwards compatibility + RetainExceptOnCreate: true, + }).promise(); + break; + + case RollbackChoice.CONTINUE_UPDATE_ROLLBACK: + if (options.force) { + // Find the failed resources from the deployment and automatically skip them + // (Using deployment log because we definitely have `DescribeStackEvents` permissions, and we might not have + // `DescribeStackResources` permissions). + const poller = new StackEventPoller(cfn, { + stackName: deployName, + stackStatuses: ['ROLLBACK_IN_PROGRESS', 'UPDATE_ROLLBACK_IN_PROGRESS'], + }); + await poller.poll(); + resourcesToSkip = poller.resourceErrors + .filter(r => !r.isStackEvent && r.parentStackLogicalIds.length === 0) + .map(r => r.event.LogicalResourceId ?? ''); + } + + const skipDescription = resourcesToSkip.length > 0 + ? ` (orphaning: ${resourcesToSkip.join(', ')})` + : ''; + warning(`Continuing rollback of stack ${deployName}${skipDescription}`); + await cfn.continueUpdateRollback({ + StackName: deployName, + ClientRequestToken: randomUUID(), + RoleARN: cloudFormationRoleArn, + ResourcesToSkip: resourcesToSkip, + }).promise(); + break; + + case RollbackChoice.ROLLBACK_FAILED: + warning(`Stack ${deployName} failed creation and rollback. This state cannot be rolled back. You can recreate this stack by running 'cdk deploy'.`); + return { notInRollbackableState: true }; + + default: + throw new Error(`Unexpected rollback choice: ${cloudFormationStack.stackStatus.rollbackChoice}`); + } + + const monitor = options.quiet ? undefined : StackActivityMonitor.withDefaultPrinter(cfn, deployName, options.stack, { + ci: options.ci, + }).start(); + + let stackErrorMessage: string | undefined = undefined; + let finalStackState = cloudFormationStack; + try { + const successStack = await stabilizeStack(cfn, deployName); + + // This shouldn't really happen, but catch it anyway. You never know. + if (!successStack) { throw new Error('Stack deploy failed (the stack disappeared while we were rolling it back)'); } + finalStackState = successStack; + + const errors = monitor?.errors?.join(', '); + if (errors) { + stackErrorMessage = errors; + } + } catch (e: any) { + stackErrorMessage = suffixWithErrors(e.message, monitor?.errors); + } finally { + await monitor?.stop(); + } + + if (finalStackState.stackStatus.isRollbackSuccess || !stackErrorMessage) { + return { success: true }; + } + + // Either we need to ignore some resources to continue the rollback, or something went wrong + if (finalStackState.stackStatus.rollbackChoice === RollbackChoice.CONTINUE_UPDATE_ROLLBACK && options.force) { + // Do another loop-de-loop + continue; + } + + throw new Error(`${stackErrorMessage} (fix problem and retry, or orphan these resources using --orphan or --force)`);; + } + throw new Error('Rollback did not finish after a large number of iterations; stopping because it looks like we\'re not making progress anymore. You can retry if rollback was progressing as expected.'); + } + public async destroyStack(options: DestroyStackOptions): Promise { const { stackSdk, cloudFormationRoleArn: roleArn } = await this.prepareSdkFor(options.stack, options.roleArn, Mode.ForWriting); @@ -730,3 +925,9 @@ class ParallelSafeAssetProgress implements cdk_assets.IPublishProgressListener { */ export class CloudFormationDeployments extends Deployments { } + +function suffixWithErrors(msg: string, errors?: string[]) { + return errors && errors.length > 0 + ? `${msg}: ${errors.join(', ')}` + : msg; +} \ No newline at end of file diff --git a/packages/aws-cdk/lib/api/util/cloudformation/stack-activity-monitor.ts b/packages/aws-cdk/lib/api/util/cloudformation/stack-activity-monitor.ts index 1b2422a219168..6db3b7f67941c 100644 --- a/packages/aws-cdk/lib/api/util/cloudformation/stack-activity-monitor.ts +++ b/packages/aws-cdk/lib/api/util/cloudformation/stack-activity-monitor.ts @@ -3,11 +3,11 @@ import * as cxschema from '@aws-cdk/cloud-assembly-schema'; import * as cxapi from '@aws-cdk/cx-api'; import * as aws from 'aws-sdk'; import * as chalk from 'chalk'; +import { ResourceEvent, StackEventPoller } from './stack-event-poller'; import { error, logLevel, LogLevel, setLogLevel } from '../../../logging'; import { RewritableBlock } from '../display'; -export interface StackActivity { - readonly event: aws.CloudFormation.StackEvent; +export interface StackActivity extends ResourceEvent { readonly metadata?: ResourceMetadata; } @@ -116,17 +116,13 @@ export class StackActivityMonitor { } /** - * Resource errors found while monitoring the deployment + * The poller used to read stack events */ - public readonly errors = new Array(); + public readonly poller: StackEventPoller; - private active = false; - private activity: { [eventId: string]: StackActivity } = { }; + public readonly errors: string[] = []; - /** - * Determines which events not to display - */ - private readonly startTime: number; + private active = false; /** * Current tick timer @@ -139,13 +135,16 @@ export class StackActivityMonitor { private readPromise?: Promise; constructor( - private readonly cfn: aws.CloudFormation, + cfn: aws.CloudFormation, private readonly stackName: string, private readonly printer: IActivityPrinter, private readonly stack?: cxapi.CloudFormationStackArtifact, changeSetCreationTime?: Date, ) { - this.startTime = changeSetCreationTime?.getTime() ?? Date.now(); + this.poller = new StackEventPoller(cfn, { + stackName, + startTime: changeSetCreationTime?.getTime() ?? Date.now(), + }); } public start() { @@ -221,61 +220,17 @@ export class StackActivityMonitor { * see a next page and the last event in the page is new to us (and within the time window). * haven't seen the final event */ - private async readNewEvents(stackName?: string): Promise { - const stackToPollForEvents = stackName ?? this.stackName; - const events: StackActivity[] = []; - const CFN_SUCCESS_STATUS = ['UPDATE_COMPLETE', 'CREATE_COMPLETE', 'DELETE_COMPLETE', 'DELETE_SKIPPED']; - try { - let nextToken: string | undefined; - let finished = false; - while (!finished) { - const response = await this.cfn.describeStackEvents({ StackName: stackToPollForEvents, NextToken: nextToken }).promise(); - const eventPage = response?.StackEvents ?? []; - - for (const event of eventPage) { - // Event from before we were interested in 'em - if (event.Timestamp.valueOf() < this.startTime) { - finished = true; - break; - } - - // Already seen this one - if (event.EventId in this.activity) { - finished = true; - break; - } - - // Fresh event - events.push(this.activity[event.EventId] = { - event: event, - metadata: this.findMetadataFor(event.LogicalResourceId), - }); - - if (event.ResourceType === 'AWS::CloudFormation::Stack' && !CFN_SUCCESS_STATUS.includes(event.ResourceStatus ?? '')) { - // If the event is not for `this` stack and has a physical resource Id, recursively call for events in the nested stack - if (event.PhysicalResourceId && event.PhysicalResourceId !== stackToPollForEvents) { - await this.readNewEvents(event.PhysicalResourceId); - } - } - } + private async readNewEvents(): Promise { + const pollEvents = await this.poller.poll(); - // We're also done if there's nothing left to read - nextToken = response?.NextToken; - if (nextToken === undefined) { - finished = true; - } - } - } catch (e: any) { - if (e.code === 'ValidationError' && e.message === `Stack [${stackToPollForEvents}] does not exist`) { - return; - } - throw e; - } + const activities: StackActivity[] = pollEvents.map(event => ({ + ...event, + metadata: this.findMetadataFor(event.event.LogicalResourceId), + })); - events.reverse(); - for (const event of events) { - this.checkForErrors(event); - this.printer.addActivity(event); + for (const activity of activities) { + this.checkForErrors(activity); + this.printer.addActivity(activity ); } } @@ -298,6 +253,7 @@ export class StackActivityMonitor { } private checkForErrors(activity: StackActivity) { + if (hasErrorMessage(activity.event.ResourceStatus ?? '')) { const isCancelled = (activity.event.ResourceStatusReason ?? '').indexOf('cancelled') > -1; @@ -550,7 +506,7 @@ export class HistoryActivityPrinter extends ActivityPrinterBase { this.stream.write('\nFailed resources:\n'); for (const failure of this.failures) { // Root stack failures are not interesting - if (failure.event.StackName === failure.event.LogicalResourceId) { + if (failure.isStackEvent) { continue; } @@ -707,7 +663,7 @@ export class CurrentActivityPrinter extends ActivityPrinterBase { const lines = new Array(); for (const failure of this.failures) { // Root stack failures are not interesting - if (failure.event.StackName === failure.event.LogicalResourceId) { + if (failure.isStackEvent) { continue; } diff --git a/packages/aws-cdk/lib/api/util/cloudformation/stack-event-poller.ts b/packages/aws-cdk/lib/api/util/cloudformation/stack-event-poller.ts new file mode 100644 index 0000000000000..e32b168d4a64d --- /dev/null +++ b/packages/aws-cdk/lib/api/util/cloudformation/stack-event-poller.ts @@ -0,0 +1,182 @@ +import * as aws from 'aws-sdk'; + +export interface StackEventPollerProps { + /** + * The stack to poll + */ + readonly stackName: string; + + /** + * IDs of parent stacks of this resource, in case of resources in nested stacks + */ + readonly parentStackLogicalIds?: string[]; + + /** + * Timestamp for the oldest event we're interested in + * + * @default - Read all events + */ + readonly startTime?: number; + + /** + * Stop reading when we see the stack entering this status + * + * Should be something like `CREATE_IN_PROGRESS`, `UPDATE_IN_PROGRESS`, + * `DELETE_IN_PROGRESS, `ROLLBACK_IN_PROGRESS`. + * + * @default - Read all events + */ + readonly stackStatuses?: string[]; +} + +export interface ResourceEvent { + readonly event: aws.CloudFormation.StackEvent; + readonly parentStackLogicalIds: string[]; + + /** + * Whether this event regards the root stack + * + * @default false + */ + readonly isStackEvent?: boolean; +} + +export class StackEventPoller { + public readonly events: ResourceEvent[] = []; + public complete: boolean = false; + + private readonly eventIds = new Set(); + private readonly nestedStackPollers: Record = {}; + + constructor(private readonly cfn: aws.CloudFormation, private readonly props: StackEventPollerProps) { + } + + /** + * From all accumulated events, return only the errors + */ + public get resourceErrors(): ResourceEvent[] { + return this.events.filter(e => e.event.ResourceStatus?.endsWith('_FAILED') && !e.isStackEvent); + } + + /** + * Poll for new stack events + * + * Will not return events older than events indicated by the constructor filters. + * + * Recurses into nested stacks, and returns events old-to-new. + */ + public async poll(): Promise { + const events: ResourceEvent[] = []; + try { + let nextToken: string | undefined; + let finished = false; + while (!finished) { + const response = await this.cfn.describeStackEvents({ StackName: this.props.stackName, NextToken: nextToken }).promise(); + const eventPage = response?.StackEvents ?? []; + + for (const event of eventPage) { + // Event from before we were interested in 'em + if (this.props.startTime !== undefined && event.Timestamp.valueOf() < this.props.startTime) { + finished = true; + break; + } + + // Already seen this one + if (this.eventIds.has(event.EventId)) { + finished = true; + break; + } + this.eventIds.add(event.EventId); + + // The events for the stack itself are also included next to events about resources; we can test for them in this way. + const isParentStackEvent = event.PhysicalResourceId === event.StackId; + + if (isParentStackEvent && this.props.stackStatuses?.includes(event.ResourceStatus ?? '')) { + finished = true; + break; + } + + // Fresh event + const resEvent: ResourceEvent = { + event: event, + parentStackLogicalIds: this.props.parentStackLogicalIds ?? [], + isStackEvent: isParentStackEvent, + }; + events.push(resEvent); + + if (!isParentStackEvent && event.ResourceType === 'AWS::CloudFormation::Stack' && isStackBeginOperationState(event.ResourceStatus)) { + // If the event is not for `this` stack and has a physical resource Id, recursively call for events in the nested stack + this.trackNestedStack(event, [...this.props.parentStackLogicalIds ?? [], event.LogicalResourceId ?? '']); + } + + if (isParentStackEvent && isStackTerminalState(event.ResourceStatus)) { + this.complete = true; + } + } + + // We're also done if there's nothing left to read + nextToken = response?.NextToken; + if (nextToken === undefined) { + finished = true; + } + } + } catch (e: any) { + if (e.code === 'ValidationError' && e.message === `Stack [${this.props.stackName}] does not exist`) { + // Ignore + } else { + throw e; + } + } + + // Also poll all nested stacks we're currently tracking + for (const [logicalId, poller] of Object.entries(this.nestedStackPollers)) { + events.push(...await poller.poll()); + if (poller.complete) { + delete this.nestedStackPollers[logicalId]; + } + } + + // Return what we have so far + events.sort((a, b) => a.event.Timestamp.valueOf() - b.event.Timestamp.valueOf()); + this.events.push(...events); + return events; + } + + /** + * On the CREATE_IN_PROGRESS, UPDATE_IN_PROGRESS, DELETE_IN_PROGRESS event of a nested stack, poll the nested stack updates + */ + private trackNestedStack(event: aws.CloudFormation.StackEvent, parentStackLogicalIds: string[]) { + const logicalId = event.LogicalResourceId; + const physicalResourceId = event.PhysicalResourceId; + + // The CREATE_IN_PROGRESS event for a Nested Stack is emitted twice; first without a PhysicalResourceId + // and then with. Ignore this event if we don't have that property yet. + // + // (At this point, I also don't trust that logicalId is always going to be there so validate that as well) + if (!logicalId || !physicalResourceId) { + return; + } + + if (!this.nestedStackPollers[logicalId]) { + this.nestedStackPollers[logicalId] = new StackEventPoller(this.cfn, { + stackName: physicalResourceId, + parentStackLogicalIds: parentStackLogicalIds, + startTime: event.Timestamp.valueOf(), + }); + } + } +} + +function isStackBeginOperationState(state: string | undefined) { + return [ + 'CREATE_IN_PROGRESS', + 'UPDATE_IN_PROGRESS', + 'DELETE_IN_PROGRESS', + 'UPDATE_ROLLBACK_IN_PROGRESS', + 'ROLLBACK_IN_PROGRESS', + ].includes(state ?? ''); +} + +function isStackTerminalState(state: string | undefined) { + return !(state ?? '').endsWith('_IN_PROGRESS'); +} \ No newline at end of file diff --git a/packages/aws-cdk/lib/api/util/cloudformation/stack-status.ts b/packages/aws-cdk/lib/api/util/cloudformation/stack-status.ts index 473858b4bac18..4dd113aaa30db 100644 --- a/packages/aws-cdk/lib/api/util/cloudformation/stack-status.ts +++ b/packages/aws-cdk/lib/api/util/cloudformation/stack-status.ts @@ -46,7 +46,43 @@ export class StackStatus { || this.name === 'UPDATE_ROLLBACK_COMPLETE'; } + /** + * Whether the stack is in a paused state due to `--no-rollback`. + * + * The possible actions here are retrying a new `--no-rollback` deployment, or initiating a rollback. + */ + get rollbackChoice(): RollbackChoice { + switch (this.name) { + case 'CREATE_FAILED': + case 'UPDATE_FAILED': + return RollbackChoice.START_ROLLBACK; + case 'UPDATE_ROLLBACK_FAILED': + return RollbackChoice.CONTINUE_UPDATE_ROLLBACK; + case 'ROLLBACK_FAILED': + // Unfortunately there is no option to continue a failed rollback without + // a stable target state. + return RollbackChoice.ROLLBACK_FAILED; + default: + return RollbackChoice.NONE; + } + } + public toString(): string { return this.name + (this.reason ? ` (${this.reason})` : ''); } } + +/** + * Describe the current rollback options for this state + */ +export enum RollbackChoice { + START_ROLLBACK, + CONTINUE_UPDATE_ROLLBACK, + /** + * A sign that stack creation AND its rollback have failed. + * + * There is no way to recover from this, other than recreating the stack. + */ + ROLLBACK_FAILED, + NONE, +} \ No newline at end of file diff --git a/packages/aws-cdk/lib/cdk-toolkit.ts b/packages/aws-cdk/lib/cdk-toolkit.ts index 4f07c3ed7a4ff..5dc5bdaabd61c 100644 --- a/packages/aws-cdk/lib/cdk-toolkit.ts +++ b/packages/aws-cdk/lib/cdk-toolkit.ts @@ -435,6 +435,50 @@ export class CdkToolkit { }); } + /** + * Roll back the given stack or stacks. + */ + public async rollback(options: RollbackOptions) { + const startSynthTime = new Date().getTime(); + const stackCollection = await this.selectStacksForDeploy(options.selector, true); + const elapsedSynthTime = new Date().getTime() - startSynthTime; + print('\n✨ Synthesis time: %ss\n', formatTime(elapsedSynthTime)); + + if (stackCollection.stackCount === 0) { + // eslint-disable-next-line no-console + console.error('No stacks selected'); + return; + } + + let anyRollbackable = false; + + for (const stack of stackCollection.stackArtifacts) { + print('Rolling back %s', chalk.bold(stack.displayName)); + const startRollbackTime = new Date().getTime(); + try { + const result = await this.props.deployments.rollbackStack({ + stack, + roleArn: options.roleArn, + toolkitStackName: options.toolkitStackName, + force: options.force, + validateBootstrapStackVersion: options.validateBootstrapStackVersion, + orphanLogicalIds: options.orphanLogicalIds, + }); + if (!result.notInRollbackableState) { + anyRollbackable = true; + } + const elapsedRollbackTime = new Date().getTime() - startRollbackTime; + print('\n✨ Rollback time: %ss\n', formatTime(elapsedRollbackTime)); + } catch (e: any) { + error('\n ❌ %s failed: %s', chalk.bold(stack.displayName), e.message); + throw new Error('Rollback failed (use --force to orphan failing resources)'); + } + } + if (!anyRollbackable) { + throw new Error('No stacks were in a state that could be rolled back'); + } + } + public async watch(options: WatchOptions) { const rootDir = path.dirname(path.resolve(PROJECT_CONFIG)); debug("root directory used for 'watch' is: %s", rootDir); @@ -1360,6 +1404,48 @@ export interface DeployOptions extends CfnDeployOptions, WatchOptions { readonly ignoreNoStacks?: boolean; } +export interface RollbackOptions { + /** + * Criteria for selecting stacks to deploy + */ + readonly selector: StackSelector; + + /** + * Name of the toolkit stack to use/deploy + * + * @default CDKToolkit + */ + readonly toolkitStackName?: string; + + /** + * Role to pass to CloudFormation for deployment + * + * @default - Default stack role + */ + readonly roleArn?: string; + + /** + * Whether to force the rollback or not + * + * @default false + */ + readonly force?: boolean; + + /** + * Logical IDs of resources to orphan + * + * @default - No orphaning + */ + readonly orphanLogicalIds?: string[]; + + /** + * Whether to validate the version of the bootstrap stack permissions + * + * @default true + */ + readonly validateBootstrapStackVersion?: boolean; +} + export interface ImportOptions extends CfnDeployOptions { /** * Build a physical resource mapping and write it to the given file, without performing the actual import operation diff --git a/packages/aws-cdk/lib/cli.ts b/packages/aws-cdk/lib/cli.ts index ea2ae08c013cb..0e28a41a4c106 100644 --- a/packages/aws-cdk/lib/cli.ts +++ b/packages/aws-cdk/lib/cli.ts @@ -176,6 +176,27 @@ async function parseCommandLineArguments(args: string[]) { .option('asset-prebuild', { type: 'boolean', desc: 'Whether to build all assets before deploying the first stack (useful for failing Docker builds)', default: true }) .option('ignore-no-stacks', { type: 'boolean', desc: 'Whether to deploy if the app contains no stacks', default: false }), ) + .command('rollback [STACKS..]', 'Rolls back the stack(s) named STACKS to their last stable state', (yargs: Argv) => yargs + .option('all', { type: 'boolean', default: false, desc: 'Roll back all available stacks' }) + .option('toolkit-stack-name', { type: 'string', desc: 'The name of the CDK toolkit stack the environment is bootstrapped with', requiresArg: true }) + .option('force', { + alias: 'f', + type: 'boolean', + desc: 'Orphan all resources for which the rollback operation fails.', + }) + .option('validate-bootstrap-version', { + type: 'boolean', + desc: 'Whether to validate the bootstrap stack version. Defaults to \'true\', disable with --no-validate-bootstrap-version.', + }) + .option('orphan', { + // alias: 'o' conflicts with --output + type: 'array', + nargs: 1, + requiresArg: true, + desc: 'Orphan the given resources, identified by their logical ID (can be specified multiple times)', + default: [], + }), + ) .command('import [STACK]', 'Import existing resource(s) into the given STACK', (yargs: Argv) => yargs .option('execute', { type: 'boolean', desc: 'Whether to execute ChangeSet (--no-execute will NOT execute the ChangeSet)', default: true }) .option('change-set-name', { type: 'string', desc: 'Name of the CloudFormation change set to create' }) @@ -597,6 +618,16 @@ export async function exec(args: string[], synthesizer?: Synthesizer): Promise = jest.fn(); +let mockContinueUpdateRollback: MockedHandlerType = jest.fn(); +let mockDescribeStackEvents: MockedHandlerType = jest.fn(); beforeEach(() => { jest.resetAllMocks(); sdkProvider = new MockSdkProvider(); @@ -35,6 +38,9 @@ beforeEach(() => { StackResourceSummaries: stackResources, }; }, + rollbackStack: mockRollbackStack, + continueUpdateRollback: mockContinueUpdateRollback, + describeStackEvents: mockDescribeStackEvents, }); ToolkitInfo.lookup = mockToolkitInfoLookup = jest.fn().mockResolvedValue(ToolkitInfo.bootstrapStackNotFoundInfo('TestBootstrapStack')); @@ -331,90 +337,76 @@ test('readCurrentTemplateWithNestedStacks() can handle non-Resources in the temp }); test('readCurrentTemplateWithNestedStacks() with a 3-level nested + sibling structure works', async () => { - const cfnStack = new FakeCloudformationStack({ - stackName: 'MultiLevelRoot', - stackId: 'StackId', - }); - CloudFormationStack.lookup = (async (_, stackName: string) => { - switch (stackName) { - case 'MultiLevelRoot': - cfnStack.template = async () => ({ - Resources: { - NestedStack: { - Type: 'AWS::CloudFormation::Stack', - Properties: { - TemplateURL: 'https://www.magic-url.com', - }, - Metadata: { - 'aws:asset:path': 'one-resource-two-stacks-stack.nested.template.json', - }, + givenStacks({ + MultiLevelRoot: { + template: { + Resources: { + NestedStack: { + Type: 'AWS::CloudFormation::Stack', + Properties: { + TemplateURL: 'https://www.magic-url.com', + }, + Metadata: { + 'aws:asset:path': 'one-resource-two-stacks-stack.nested.template.json', }, }, - }); - break; - - case 'NestedStack': - cfnStack.template = async () => ({ - Resources: { - SomeResource: { - Type: 'AWS::Something', - Properties: { - Property: 'old-value', - }, + }, + }, + }, + NestedStack: { + template: { + Resources: { + SomeResource: { + Type: 'AWS::Something', + Properties: { + Property: 'old-value', }, - GrandChildStackA: { - Type: 'AWS::CloudFormation::Stack', - Properties: { - TemplateURL: 'https://www.magic-url.com', - }, - Metadata: { - 'aws:asset:path': 'one-resource-stack.nested.template.json', - }, + }, + GrandChildStackA: { + Type: 'AWS::CloudFormation::Stack', + Properties: { + TemplateURL: 'https://www.magic-url.com', }, - GrandChildStackB: { - Type: 'AWS::CloudFormation::Stack', - Properties: { - TemplateURL: 'https://www.magic-url.com', - }, - Metadata: { - 'aws:asset:path': 'one-resource-stack.nested.template.json', - }, + Metadata: { + 'aws:asset:path': 'one-resource-stack.nested.template.json', }, }, - }); - break; - - case 'GrandChildStackA': - cfnStack.template = async () => ({ - Resources: { - SomeResource: { - Type: 'AWS::Something', - Properties: { - Property: 'old-value', - }, + GrandChildStackB: { + Type: 'AWS::CloudFormation::Stack', + Properties: { + TemplateURL: 'https://www.magic-url.com', + }, + Metadata: { + 'aws:asset:path': 'one-resource-stack.nested.template.json', }, }, - }); - break; - - case 'GrandChildStackB': - cfnStack.template = async () => ({ - Resources: { - SomeResource: { - Type: 'AWS::Something', - Properties: { - Property: 'old-value', - }, + }, + }, + }, + GrandChildStackA: { + template: { + Resources: { + SomeResource: { + Type: 'AWS::Something', + Properties: { + Property: 'old-value', }, }, - }); - break; - - default: - throw new Error('unknown stack name ' + stackName + ' found in deployments.test.ts'); - } - - return cfnStack; + }, + }, + }, + GrandChildStackB: { + template: { + Resources: { + SomeResource: { + Type: 'AWS::Something', + Properties: { + Property: 'old-value', + }, + }, + }, + }, + }, }); const rootStack = testStack({ @@ -682,36 +674,31 @@ test('readCurrentTemplateWithNestedStacks() on an undeployed parent stack with a test('readCurrentTemplateWithNestedStacks() caches calls to listStackResources()', async () => { // GIVEN - const cfnStack = new FakeCloudformationStack({ - stackName: 'CachingRoot', - stackId: 'StackId', - }); - CloudFormationStack.lookup = (async (_cfn, _stackName: string) => { - cfnStack.template = async () => ({ - Resources: - { - NestedStackA: { - Type: 'AWS::CloudFormation::Stack', - Properties: { - TemplateURL: 'https://www.magic-url.com', - }, - Metadata: { - 'aws:asset:path': 'one-resource-stack.nested.template.json', - }, - }, - NestedStackB: { - Type: 'AWS::CloudFormation::Stack', - Properties: { - TemplateURL: 'https://www.magic-url.com', + givenStacks({ + '*': { + template: { + Resources: { + NestedStackA: { + Type: 'AWS::CloudFormation::Stack', + Properties: { + TemplateURL: 'https://www.magic-url.com', + }, + Metadata: { + 'aws:asset:path': 'one-resource-stack.nested.template.json', + }, }, - Metadata: { - 'aws:asset:path': 'one-resource-stack.nested.template.json', + NestedStackB: { + Type: 'AWS::CloudFormation::Stack', + Properties: { + TemplateURL: 'https://www.magic-url.com', + }, + Metadata: { + 'aws:asset:path': 'one-resource-stack.nested.template.json', + }, }, }, }, - }); - - return cfnStack; + }, }); const rootStack = testStack({ @@ -756,15 +743,112 @@ test('readCurrentTemplateWithNestedStacks() caches calls to listStackResources() expect(numberOfTimesListStackResourcesWasCalled).toEqual(1); }); -test('readCurrentTemplateWithNestedStacks() succesfully ignores stacks without metadata', async () => { +test('rollback stack assumes role if necessary', async() => { + const mockForEnvironment = jest.fn().mockImplementation(() => { return { sdk: sdkProvider.sdk }; }); + sdkProvider.forEnvironment = mockForEnvironment; + givenStacks({ + '*': { template: {} }, + }); + + await deployments.rollbackStack({ + stack: testStack({ + stackName: 'boop', + properties: { + assumeRoleArn: 'bloop:${AWS::Region}:${AWS::AccountId}', + }, + }), + validateBootstrapStackVersion: false, + }); + + expect(mockForEnvironment).toHaveBeenCalledWith(expect.anything(), expect.anything(), expect.objectContaining({ + assumeRoleArn: 'bloop:here:123456789012', + })); +}); + +test('rollback stack allows rolling back from UPDATE_FAILED', async() => { // GIVEN - const cfnStack = new FakeCloudformationStack({ - stackName: 'MetadataRoot', - stackId: 'StackId', + givenStacks({ + '*': { template: {}, stackStatus: 'UPDATE_FAILED' }, }); - CloudFormationStack.lookup = (async (_, stackName: string) => { - if (stackName === 'MetadataRoot') { - cfnStack.template = async () => ({ + + // WHEN + await deployments.rollbackStack({ + stack: testStack({ stackName: 'boop' }), + validateBootstrapStackVersion: false, + }); + + // THEN + expect(mockRollbackStack).toHaveBeenCalled(); +}); + +test('rollback stack allows continue rollback from UPDATE_ROLLBACK_FAILED', async() => { + // GIVEN + givenStacks({ + '*': { template: {}, stackStatus: 'UPDATE_ROLLBACK_FAILED' }, + }); + + // WHEN + await deployments.rollbackStack({ + stack: testStack({ stackName: 'boop' }), + validateBootstrapStackVersion: false, + }); + + // THEN + expect(mockContinueUpdateRollback).toHaveBeenCalled(); +}); + +test('rollback stack fails in UPDATE_COMPLETE state', async() => { + // GIVEN + givenStacks({ + '*': { template: {}, stackStatus: 'UPDATE_COMPLETE' }, + }); + + // WHEN + const response = await deployments.rollbackStack({ + stack: testStack({ stackName: 'boop' }), + validateBootstrapStackVersion: false, + }); + + // THEN + expect(response.notInRollbackableState).toBe(true); +}); + +test('continue rollback stack with force ignores any failed resources', async() => { + // GIVEN + givenStacks({ + '*': { template: {}, stackStatus: 'UPDATE_ROLLBACK_FAILED' }, + }); + mockDescribeStackEvents.mockReturnValue({ + StackEvents: [ + { + EventId: 'asdf', + StackId: 'stack/MyStack', + StackName: 'MyStack', + Timestamp: new Date(), + LogicalResourceId: 'Xyz', + ResourceStatus: 'UPDATE_FAILED', + }, + ], + }); + + // WHEN + await deployments.rollbackStack({ + stack: testStack({ stackName: 'boop' }), + validateBootstrapStackVersion: false, + force: true, + }); + + // THEN + expect(mockContinueUpdateRollback).toHaveBeenCalledWith(expect.objectContaining({ + ResourcesToSkip: ['Xyz'], + })); +}); + +test('readCurrentTemplateWithNestedStacks() succesfully ignores stacks without metadata', async () => { + // GIVEN + givenStacks({ + 'MetadataRoot': { + template: { Resources: { WithMetadata: { Type: 'AWS::CloudFormation::Stack', @@ -776,10 +860,10 @@ test('readCurrentTemplateWithNestedStacks() succesfully ignores stacks without m }, }, }, - }); - - } else { - cfnStack.template = async () => ({ + }, + }, + '*': { + template: { Resources: { SomeResource: { Type: 'AWS::Something', @@ -788,10 +872,8 @@ test('readCurrentTemplateWithNestedStacks() succesfully ignores stacks without m }, }, }, - }); - } - - return cfnStack; + }, + }, }); const rootStack = testStack({ @@ -918,3 +1000,23 @@ function stackSummaryOf(logicalId: string, resourceType: string, physicalResourc LastUpdatedTimestamp: new Date(), }; } + +function givenStacks(stacks: Record) { + jest.spyOn(CloudFormationStack, 'lookup').mockImplementation(async (_, stackName) => { + let stack = stacks[stackName]; + if (!stack) { + stack = stacks['*']; + } + if (stack) { + const cfnStack = new FakeCloudformationStack({ + stackName, + stackId: `stack/${stackName}`, + stackStatus: stack.stackStatus, + }); + cfnStack.setTemplate(stack.template); + return cfnStack; + } else { + return new FakeCloudformationStack({ stackName }); + } + }); +} \ No newline at end of file diff --git a/packages/aws-cdk/test/api/fake-cloudformation-stack.ts b/packages/aws-cdk/test/api/fake-cloudformation-stack.ts index 1668ea0b55d33..918d6c4d5bb37 100644 --- a/packages/aws-cdk/test/api/fake-cloudformation-stack.ts +++ b/packages/aws-cdk/test/api/fake-cloudformation-stack.ts @@ -2,10 +2,12 @@ import { CloudFormation } from 'aws-sdk'; import { CloudFormationStack, Template } from '../../lib/api/util/cloudformation'; import { instanceMockFrom } from '../util'; +import { StackStatus } from '../../lib/api/util/cloudformation/stack-status'; export interface FakeCloudFormationStackProps { readonly stackName: string; - readonly stackId: string; + readonly stackId?: string; + readonly stackStatus?: string; } export class FakeCloudformationStack extends CloudFormationStack { @@ -29,7 +31,23 @@ export class FakeCloudformationStack extends CloudFormationStack { return Promise.resolve(this.__template); } - public get stackId(): string { + public get exists() { + return this.props.stackId !== undefined; + } + + public get stackStatus() { + const status = this.props.stackStatus ?? 'UPDATE_COMPLETE'; + return new StackStatus(status, 'The test said so'); + } + + public get stackId() { + if (!this.props.stackId) { + throw new Error('Cannot retrieve stackId from a non-existent stack'); + } return this.props.stackId; } + + public get outputs(): Record { + return {}; + } } diff --git a/packages/aws-cdk/test/api/stack-activity-monitor.test.ts b/packages/aws-cdk/test/api/stack-activity-monitor.test.ts index 6c5eddc7dd75e..a07ec99e40b38 100644 --- a/packages/aws-cdk/test/api/stack-activity-monitor.test.ts +++ b/packages/aws-cdk/test/api/stack-activity-monitor.test.ts @@ -29,6 +29,7 @@ test('prints 0/4 progress report, when addActivity is called with an "IN_PROGRES EventId: '', StackName: 'stack-name', }, + parentStackLogicalIds: [], }); }); @@ -53,6 +54,7 @@ test('prints 1/4 progress report, when addActivity is called with an "UPDATE_COM EventId: '', StackName: 'stack-name', }, + parentStackLogicalIds: [], }); }); @@ -77,6 +79,7 @@ test('prints 1/4 progress report, when addActivity is called with an "UPDATE_COM EventId: '', StackName: 'stack-name', }, + parentStackLogicalIds: [], }); }); @@ -101,6 +104,7 @@ test('prints 1/4 progress report, when addActivity is called with an "ROLLBACK_C EventId: '', StackName: 'stack-name', }, + parentStackLogicalIds: [], }); }); @@ -125,6 +129,7 @@ test('prints 0/4 progress report, when addActivity is called with an "UPDATE_FAI EventId: '', StackName: 'stack-name', }, + parentStackLogicalIds: [], }); }); @@ -149,6 +154,7 @@ test('does not print "Failed Resources:" list, when all deployments are successf EventId: '', StackName: 'stack-name', }, + parentStackLogicalIds: [], }); historyActivityPrinter.addActivity({ event: { @@ -160,6 +166,7 @@ test('does not print "Failed Resources:" list, when all deployments are successf EventId: '', StackName: 'stack-name', }, + parentStackLogicalIds: [], }); historyActivityPrinter.addActivity({ event: { @@ -171,6 +178,7 @@ test('does not print "Failed Resources:" list, when all deployments are successf EventId: '', StackName: 'stack-name', }, + parentStackLogicalIds: [], }); historyActivityPrinter.stop(); }); @@ -199,6 +207,7 @@ test('prints "Failed Resources:" list, when at least one deployment fails', () = EventId: '', StackName: 'stack-name', }, + parentStackLogicalIds: [], }); historyActivityPrinter.addActivity({ event: { @@ -210,6 +219,7 @@ test('prints "Failed Resources:" list, when at least one deployment fails', () = EventId: '', StackName: 'stack-name', }, + parentStackLogicalIds: [], }); historyActivityPrinter.stop(); }); @@ -242,6 +252,7 @@ test('print failed resources because of hook failures', () => { HookType: 'hook1', HookStatusReason: 'stack1 must obey certain rules', }, + parentStackLogicalIds: [], }); historyActivityPrinter.addActivity({ event: { @@ -254,6 +265,7 @@ test('print failed resources because of hook failures', () => { StackName: 'stack-name', ResourceStatusReason: 'The following hook(s) failed: hook1', }, + parentStackLogicalIds: [], }); historyActivityPrinter.stop(); }); diff --git a/packages/aws-cdk/test/cdk-toolkit.test.ts b/packages/aws-cdk/test/cdk-toolkit.test.ts index 4d1fee89b2362..248f6d615dfe7 100644 --- a/packages/aws-cdk/test/cdk-toolkit.test.ts +++ b/packages/aws-cdk/test/cdk-toolkit.test.ts @@ -64,7 +64,7 @@ import { instanceMockFrom, MockCloudExecutable, TestStackArtifact } from './util import { MockSdkProvider } from './util/mock-sdk'; import { Bootstrapper } from '../lib/api/bootstrap'; import { DeployStackResult } from '../lib/api/deploy-stack'; -import { Deployments, DeployStackOptions, DestroyStackOptions } from '../lib/api/deployments'; +import { Deployments, DeployStackOptions, DestroyStackOptions, RollbackStackOptions, RollbackStackResult } from '../lib/api/deployments'; import { HotswapMode } from '../lib/api/hotswap/common'; import { Template } from '../lib/api/util/cloudformation'; import { CdkToolkit, Tag } from '../lib/cdk-toolkit'; @@ -1226,6 +1226,31 @@ describe('synth', () => { expect(mockData.mock.calls.length).toEqual(1); expect(mockData.mock.calls[0][0]).toBeDefined(); }); + + test('rollback uses deployment role', async () => { + cloudExecutable = new MockCloudExecutable({ + stacks: [ + MockStack.MOCK_STACK_C, + ], + }); + + const mockedRollback = jest.spyOn(Deployments.prototype, 'rollbackStack').mockResolvedValue({ + success: true, + }); + + const toolkit = new CdkToolkit({ + cloudExecutable, + configuration: cloudExecutable.configuration, + sdkProvider: cloudExecutable.sdkProvider, + deployments: new Deployments({ sdkProvider: new MockSdkProvider() }), + }); + + await toolkit.rollback({ + selector: { patterns: [] }, + }); + + expect(mockedRollback).toHaveBeenCalled(); + }); }); class MockStack { @@ -1402,6 +1427,12 @@ class FakeCloudFormation extends Deployments { }); } + public rollbackStack(_options: RollbackStackOptions): Promise { + return Promise.resolve({ + success: true, + }); + } + public destroyStack(options: DestroyStackOptions): Promise { expect(options.stack).toBeDefined(); return Promise.resolve(); diff --git a/packages/aws-cdk/test/util/mock-sdk.ts b/packages/aws-cdk/test/util/mock-sdk.ts index 0d943fadb3dea..d280ef9f02942 100644 --- a/packages/aws-cdk/test/util/mock-sdk.ts +++ b/packages/aws-cdk/test/util/mock-sdk.ts @@ -269,11 +269,21 @@ type AwsCallInputOutput = // Determine the type of the mock handler from the type of the Input/Output type pair. // Don't need to worry about the 'never', TypeScript will propagate it upwards making it // impossible to specify the field that has 'never' anywhere in its type. -type MockHandlerType = +type HandlerType = AI extends [any, any] ? (input: AI[0]) => AI[1] : AI; // Any subset of the full type that synchronously returns the output structure is okay -export type SyncHandlerSubsetOf = {[K in keyof S]?: MockHandlerType>}; +export type SyncHandlerSubsetOf = {[K in keyof S]?: HandlerType>}; + +/** + * A jest Mock function we can pass into SdkProvider.stubXXX + * + * Use as follows: + * + * ```ts + * const mockDescribeStackEvents: MockedHandlerType = jest.fn(); + */ +export type MockedHandlerType = AwsCallInputOutput extends [infer IN, infer OUT] ? jest.Mock : never; /** * Fake AWS response. diff --git a/packages/aws-cdk/test/util/stack-monitor.test.ts b/packages/aws-cdk/test/util/stack-monitor.test.ts index e32098a03a9ee..49e513c88109a 100644 --- a/packages/aws-cdk/test/util/stack-monitor.test.ts +++ b/packages/aws-cdk/test/util/stack-monitor.test.ts @@ -124,11 +124,20 @@ describe('stack monitor, collecting errors from events', () => { return { StackEvents: [ addErrorToStackEvent( - event(100), { + event(102), { logicalResourceId: 'nestedStackLogicalResourceId', physicalResourceId: 'nestedStackPhysicalResourceId', resourceType: 'AWS::CloudFormation::Stack', resourceStatusReason: 'nested stack failed', + resourceStatus: 'UPDATE_FAILED', + }, + ), + addErrorToStackEvent( + event(100), { + logicalResourceId: 'nestedStackLogicalResourceId', + physicalResourceId: 'nestedStackPhysicalResourceId', + resourceType: 'AWS::CloudFormation::Stack', + resourceStatus: 'UPDATE_IN_PROGRESS', }, ), ], @@ -165,6 +174,7 @@ describe('stack monitor, collecting errors from events', () => { physicalResourceId: '', resourceType: 'AWS::CloudFormation::Stack', resourceStatusReason: 'nested stack failed', + resourceStatus: 'CREATE_IN_PROGRESS', }, ), ], @@ -187,7 +197,8 @@ describe('stack monitor, collecting errors from events', () => { }, ]); - expect(monitor.errors).toStrictEqual(['nested stack failed', 'some failure']); + expect(monitor.errors).not.toContain('nested stack failed'); + expect(monitor.errors).toContain('some failure'); }); test('does not check for nested stacks that have already completed successfully', async () => { @@ -253,18 +264,28 @@ async function testMonitorWithEventCalls( let describeStackEvents = (jest.fn() as jest.Mock); let finished = false; + let error: Error | undefined = undefined; for (const invocation of beforeStopInvocations) { const invocation_ = invocation; // Capture loop variable in local because of closure semantics const isLast = invocation === beforeStopInvocations[beforeStopInvocations.length - 1]; describeStackEvents = describeStackEvents.mockImplementationOnce(request => { - const ret = invocation_(request); - if (isLast) { + try { + const ret = invocation_(request); + if (isLast) { + finished = true; + } + return ret; + } catch (e: any) { finished = true; + error = e; + throw e; } - return ret; }); } + if (error) { + throw error; + } for (const invocation of afterStopInvocations) { describeStackEvents = describeStackEvents.mockImplementationOnce(invocation); } From b2111890d55f33f43c42f27d2da6ede7de702f25 Mon Sep 17 00:00:00 2001 From: AWS CDK Automation <43080478+aws-cdk-automation@users.noreply.github.com> Date: Mon, 7 Oct 2024 17:17:46 +0300 Subject: [PATCH 10/11] feat: update L1 CloudFormation resource definitions (#31688) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Updates the L1 CloudFormation resource definitions with the latest changes from `@aws-cdk/aws-service-spec` **L1 CloudFormation resource definition changes:** ``` ├[~] service aws-b2bi │ └ resources │ ├[~] resource AWS::B2BI::Capability │ │ └ types │ │ ├[~] type EdiType │ │ │ ├ - documentation: Specifies the details for the EDI standard that is being used for the transformer. Currently, only X12 is supported. X12 is a set of standards and corresponding messages that define specific business documents. │ │ │ │ + documentation: undefined │ │ │ └ properties │ │ │ └ X12Details: (documentation changed) │ │ └[~] type S3Location │ │ └ - documentation: Specifies the details for the Amazon S3 file location that is being used with AWS B2BI Data Interchange. File locations in Amazon S3 are identified using a combination of the bucket and key. │ │ + documentation: Specifies the details for the Amazon S3 file location that is being used with AWS B2B Data Interchange. File locations in Amazon S3 are identified using a combination of the bucket and key. │ └[~] resource AWS::B2BI::Transformer │ ├ - documentation: Creates a transformer. A transformer describes how to process the incoming EDI documents and extract the necessary information to the output file. │ │ + documentation: Creates a transformer. AWS B2B Data Interchange currently supports two scenarios: │ │ - *Inbound EDI* : the AWS customer receives an EDI file from their trading partner. AWS B2B Data Interchange converts this EDI file into a JSON or XML file with a service-defined structure. A mapping template provided by the customer, in JSONata or XSLT format, is optionally applied to this file to produce a JSON or XML file with the structure the customer requires. │ │ - *Outbound EDI* : the AWS customer has a JSON or XML file containing data that they wish to use in an EDI file. A mapping template, provided by the customer (in either JSONata or XSLT format) is applied to this file to generate a JSON or XML file in the service-defined structure. This file is then converted to an EDI file. │ │ > The following fields are provided for backwards compatibility only: `fileFormat` , `mappingTemplate` , `ediType` , and `sampleDocument` . │ │ > │ │ > - Use the `mapping` data type in place of `mappingTemplate` and `fileFormat` │ │ > - Use the `sampleDocuments` data type in place of `sampleDocument` │ │ > - Use either the `inputConversion` or `outputConversion` in place of `ediType` │ └ types │ └[~] type EdiType │ ├ - documentation: Specifies the details for the EDI standard that is being used for the transformer. Currently, only X12 is supported. X12 is a set of standards and corresponding messages that define specific business documents. │ │ + documentation: undefined │ └ properties │ └ X12Details: (documentation changed) ├[~] service aws-cloudformation │ └ resources │ └[~] resource AWS::CloudFormation::CustomResource │ └ properties │ └[+] ServiceTimeout: integer ├[~] service aws-emr │ └ resources │ ├[~] resource AWS::EMR::Cluster │ │ └ types │ │ ├[~] type InstanceFleetConfig │ │ │ └ properties │ │ │ └[+] ResizeSpecifications: InstanceFleetResizingSpecifications │ │ ├[+] type InstanceFleetResizingSpecifications │ │ │ ├ name: InstanceFleetResizingSpecifications │ │ │ └ properties │ │ │ ├OnDemandResizeSpecification: OnDemandResizingSpecification │ │ │ └SpotResizeSpecification: SpotResizingSpecification │ │ ├[~] type InstanceTypeConfig │ │ │ └ properties │ │ │ └[+] Priority: number │ │ ├[+] type OnDemandCapacityReservationOptions │ │ │ ├ name: OnDemandCapacityReservationOptions │ │ │ └ properties │ │ │ ├UsageStrategy: string │ │ │ ├CapacityReservationResourceGroupArn: string │ │ │ └CapacityReservationPreference: string │ │ ├[~] type OnDemandProvisioningSpecification │ │ │ └ properties │ │ │ └[+] CapacityReservationOptions: OnDemandCapacityReservationOptions │ │ ├[+] type OnDemandResizingSpecification │ │ │ ├ name: OnDemandResizingSpecification │ │ │ └ properties │ │ │ ├CapacityReservationOptions: OnDemandCapacityReservationOptions │ │ │ ├AllocationStrategy: string │ │ │ └TimeoutDurationMinutes: integer │ │ └[+] type SpotResizingSpecification │ │ ├ name: SpotResizingSpecification │ │ └ properties │ │ ├AllocationStrategy: string │ │ └TimeoutDurationMinutes: integer │ └[~] resource AWS::EMR::InstanceFleetConfig │ ├ properties │ │ └[+] ResizeSpecifications: InstanceFleetResizingSpecifications │ └ types │ ├[+] type InstanceFleetResizingSpecifications │ │ ├ name: InstanceFleetResizingSpecifications │ │ └ properties │ │ ├OnDemandResizeSpecification: OnDemandResizingSpecification │ │ └SpotResizeSpecification: SpotResizingSpecification │ ├[~] type InstanceTypeConfig │ │ └ properties │ │ └[+] Priority: number │ ├[+] type OnDemandCapacityReservationOptions │ │ ├ name: OnDemandCapacityReservationOptions │ │ └ properties │ │ ├UsageStrategy: string │ │ ├CapacityReservationResourceGroupArn: string │ │ └CapacityReservationPreference: string │ ├[~] type OnDemandProvisioningSpecification │ │ └ properties │ │ └[+] CapacityReservationOptions: OnDemandCapacityReservationOptions │ ├[+] type OnDemandResizingSpecification │ │ ├ name: OnDemandResizingSpecification │ │ └ properties │ │ ├CapacityReservationOptions: OnDemandCapacityReservationOptions │ │ ├AllocationStrategy: string │ │ └TimeoutDurationMinutes: integer │ └[+] type SpotResizingSpecification │ ├ name: SpotResizingSpecification │ └ properties │ ├AllocationStrategy: string │ └TimeoutDurationMinutes: integer ├[~] service aws-glue │ └ resources │ └[~] resource AWS::Glue::Job │ ├ properties │ │ └ JobRunQueuingEnabled: (documentation changed) │ └ attributes │ └ Id: (documentation changed) ├[~] service aws-iot │ └ resources │ └[~] resource AWS::IoT::DomainConfiguration │ ├ properties │ │ ├[+] ApplicationProtocol: string │ │ ├[+] AuthenticationType: string │ │ └[+] ClientCertificateConfig: ClientCertificateConfig │ └ types │ └[+] type ClientCertificateConfig │ ├ name: ClientCertificateConfig │ └ properties │ └ClientCertificateCallbackArn: string ├[~] service aws-iotsitewise │ └ resources │ └[~] resource AWS::IoTSiteWise::AssetModel │ └ types │ └[~] type AssetModelProperty │ └ properties │ └ DataType: (documentation changed) ├[~] service aws-quicksight │ └ resources │ └[~] resource AWS::QuickSight::Folder │ ├ - documentation: Definition of the AWS::QuickSight::Folder Resource Type. │ │ + documentation: Creates an empty shared folder. │ ├ properties │ │ ├ FolderId: (documentation changed) │ │ ├ FolderType: (documentation changed) │ │ ├ Name: (documentation changed) │ │ ├ ParentFolderArn: (documentation changed) │ │ └ SharingModel: (documentation changed) │ └ attributes │ ├ Arn: (documentation changed) │ ├ CreatedTime: (documentation changed) │ └ LastUpdatedTime: (documentation changed) ├[~] service aws-rds │ └ resources │ ├[~] resource AWS::RDS::DBInstance │ │ └ properties │ │ └ DBSnapshotIdentifier: (documentation changed) │ └[~] resource AWS::RDS::GlobalCluster │ └ properties │ └ Tags: (documentation changed) ├[~] service aws-route53resolver │ └ resources │ └[~] resource AWS::Route53Resolver::ResolverRule │ └ types │ └[~] type TargetAddress │ └ properties │ └ Protocol: (documentation changed) └[~] service aws-s3 └ resources └[~] resource AWS::S3::Bucket └ types └[~] type LifecycleConfiguration └ properties ├ Rules: (documentation changed) └[+] TransitionDefaultMinimumObjectSize: string ``` --- .../@aws-cdk/cloudformation-diff/package.json | 4 +- packages/@aws-cdk/integ-runner/package.json | 2 +- packages/aws-cdk-lib/package.json | 2 +- tools/@aws-cdk/spec2cdk/package.json | 4 +- yarn.lock | 48 +++++++++++++++---- 5 files changed, 46 insertions(+), 14 deletions(-) diff --git a/packages/@aws-cdk/cloudformation-diff/package.json b/packages/@aws-cdk/cloudformation-diff/package.json index 71a1c66ecd1b6..87501d4bbbcdd 100644 --- a/packages/@aws-cdk/cloudformation-diff/package.json +++ b/packages/@aws-cdk/cloudformation-diff/package.json @@ -23,8 +23,8 @@ }, "license": "Apache-2.0", "dependencies": { - "@aws-cdk/aws-service-spec": "^0.1.25", - "@aws-cdk/service-spec-types": "^0.0.92", + "@aws-cdk/aws-service-spec": "^0.1.26", + "@aws-cdk/service-spec-types": "^0.0.93", "chalk": "^4", "diff": "^5.2.0", "fast-deep-equal": "^3.1.3", diff --git a/packages/@aws-cdk/integ-runner/package.json b/packages/@aws-cdk/integ-runner/package.json index 9851c3f9fc1ea..34be598eb2d90 100644 --- a/packages/@aws-cdk/integ-runner/package.json +++ b/packages/@aws-cdk/integ-runner/package.json @@ -75,7 +75,7 @@ "@aws-cdk/cloudformation-diff": "0.0.0", "@aws-cdk/cx-api": "0.0.0", "cdk-assets": "^2.154.0", - "@aws-cdk/aws-service-spec": "^0.1.25", + "@aws-cdk/aws-service-spec": "^0.1.26", "@aws-cdk/cdk-cli-wrapper": "0.0.0", "aws-cdk": "0.0.0", diff --git a/packages/aws-cdk-lib/package.json b/packages/aws-cdk-lib/package.json index bd881886ad093..05b6eab532f46 100644 --- a/packages/aws-cdk-lib/package.json +++ b/packages/aws-cdk-lib/package.json @@ -136,7 +136,7 @@ "mime-types": "^2.1.35" }, "devDependencies": { - "@aws-cdk/aws-service-spec": "^0.1.25", + "@aws-cdk/aws-service-spec": "^0.1.26", "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/custom-resource-handlers": "0.0.0", "@aws-cdk/pkglint": "0.0.0", diff --git a/tools/@aws-cdk/spec2cdk/package.json b/tools/@aws-cdk/spec2cdk/package.json index 1ab321feccc28..c54690eeb49a2 100644 --- a/tools/@aws-cdk/spec2cdk/package.json +++ b/tools/@aws-cdk/spec2cdk/package.json @@ -32,9 +32,9 @@ }, "license": "Apache-2.0", "dependencies": { - "@aws-cdk/aws-service-spec": "^0.1.25", + "@aws-cdk/aws-service-spec": "^0.1.26", "@aws-cdk/service-spec-importers": "^0.0.49", - "@aws-cdk/service-spec-types": "^0.0.92", + "@aws-cdk/service-spec-types": "^0.0.93", "@cdklabs/tskb": "^0.0.3", "@cdklabs/typewriter": "^0.0.3", "camelcase": "^6", diff --git a/yarn.lock b/yarn.lock index 10ff2bbe956ca..24dbb889e10a3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -51,12 +51,12 @@ resolved "https://registry.npmjs.org/@aws-cdk/asset-node-proxy-agent-v6/-/asset-node-proxy-agent-v6-2.1.0.tgz#6d3c7860354d4856a7e75375f2f0ecab313b4989" integrity sha512-7bY3J8GCVxLupn/kNmpPc5VJz8grx+4RKfnnJiO1LG+uxkZfANZG3RMHhE+qQxxwkyQ9/MfPtTpf748UhR425A== -"@aws-cdk/aws-service-spec@^0.1.25": - version "0.1.25" - resolved "https://registry.npmjs.org/@aws-cdk/aws-service-spec/-/aws-service-spec-0.1.25.tgz#cb6b91a51e5c81d75c20f84fa79d68b381fc9d03" - integrity sha512-5Zzqa1NDm9HrcV2BPOFoavrqXmNm+g6dF59fOkPkjuW9OwiR93fFK9AMc8KYJ7U7jRUejs6pn2bDnqGZ5IXTRg== +"@aws-cdk/aws-service-spec@^0.1.26": + version "0.1.26" + resolved "https://registry.npmjs.org/@aws-cdk/aws-service-spec/-/aws-service-spec-0.1.26.tgz#9b08f2bff08650230d948596b171c7e8f8ce4979" + integrity sha512-VXkCdPB2cIKiDXpKK94EYd91Rh1V8SljA5B+GIOQOV5KtHkssqh1hTr5lL6TXYSE79kols/A5GX9pFVdw4fhVw== dependencies: - "@aws-cdk/service-spec-types" "^0.0.92" + "@aws-cdk/service-spec-types" "^0.0.93" "@cdklabs/tskb" "^0.0.3" "@aws-cdk/cloud-assembly-schema@^38.0.0": @@ -112,6 +112,13 @@ dependencies: "@cdklabs/tskb" "^0.0.3" +"@aws-cdk/service-spec-types@^0.0.93": + version "0.0.93" + resolved "https://registry.npmjs.org/@aws-cdk/service-spec-types/-/service-spec-types-0.0.93.tgz#322dc14942af734be00c8a2bba0604239e9d5901" + integrity sha512-nLT07w8q/of+8X5QGgNtS1tu68CQSGJHL0xQcLsRKgaxoIddZnUUf2d6WS+Yp0aZCXu2UZaacUxPYwU+qmNhpw== + dependencies: + "@cdklabs/tskb" "^0.0.3" + "@aws-crypto/crc32@5.2.0": version "5.2.0" resolved "https://registry.npmjs.org/@aws-crypto/crc32/-/crc32-5.2.0.tgz#cfcc22570949c98c6689cfcbd2d693d36cdae2e1" @@ -14588,7 +14595,16 @@ string-length@^4.0.1: char-regex "^1.0.2" strip-ansi "^6.0.0" -"string-width-cjs@npm:string-width@^4.2.0", string-width@*, string-width@^1.0.1, "string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3, string-width@^5.0.1, string-width@^5.1.2: +"string-width-cjs@npm:string-width@^4.2.0": + version "4.2.3" + resolved "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" + +string-width@*, string-width@^1.0.1, "string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3, string-width@^5.0.1, string-width@^5.1.2: version "4.2.3" resolved "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== @@ -14653,7 +14669,7 @@ stringify-package@^1.0.1: resolved "https://registry.npmjs.org/stringify-package/-/stringify-package-1.0.1.tgz#e5aa3643e7f74d0f28628b72f3dad5cecfc3ba85" integrity sha512-sa4DUQsYciMP1xhKWGuFM04fB0LG/9DlluZoSVywUMRNvzid6XucHK0/90xGxRoHrAaROrcHK1aPKaijCtSrhg== -"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1: +"strip-ansi-cjs@npm:strip-ansi@^6.0.1": version "6.0.1" resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== @@ -14667,6 +14683,13 @@ strip-ansi@^3.0.1: dependencies: ansi-regex "^2.0.0" +strip-ansi@^6.0.0, strip-ansi@^6.0.1: + version "6.0.1" + resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + strip-ansi@^7.0.1, strip-ansi@^7.1.0: version "7.1.0" resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz#d5b6568ca689d8561370b0707685d22434faff45" @@ -15664,7 +15687,7 @@ workerpool@^6.5.1: resolved "https://registry.npmjs.org/workerpool/-/workerpool-6.5.1.tgz#060f73b39d0caf97c6db64da004cd01b4c099544" integrity sha512-Fs4dNYcsdpYSAfVxhnl1L5zTksjvOJxtC5hzMNl+1t9B8hTJTdKDyZ5ju7ztgPy+ft9tBFXoOlDNiOT9WUXZlA== -"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0: +"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0": version "7.0.0" resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== @@ -15682,6 +15705,15 @@ wrap-ansi@^6.0.1, wrap-ansi@^6.2.0: string-width "^4.1.0" strip-ansi "^6.0.0" +wrap-ansi@^7.0.0: + version "7.0.0" + resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + wrap-ansi@^8.1.0: version "8.1.0" resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214" From a8b2f0120d90ac5ed9ed8e222a673d996ea057fa Mon Sep 17 00:00:00 2001 From: yasuaki640 Date: Mon, 7 Oct 2024 23:56:48 +0900 Subject: [PATCH 11/11] feat(appsync): add `ownerContact` property to the `GraphqlApi` (#31585) ### Issue # (if applicable) Closes #. ### Reason for this change Because there is no `ownerContact` prop on the aws-appsync graphqlapi.ts L2 layer. ### Description of changes Added `ownerContact` prop on the aws-appsync graphqlapi.ts L2 layer. ### Description of how you validated changes Added both of unit test and integration test. ### Checklist - [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- ...efaultTestDeployAssert018781F2.assets.json | 19 ++ ...aultTestDeployAssert018781F2.template.json | 36 +++ .../cdk.out | 1 + .../integ.json | 12 + .../manifest.json | 133 ++++++++++++ .../stack.assets.json | 19 ++ .../stack.template.json | 85 ++++++++ .../tree.json | 205 ++++++++++++++++++ .../test/integ.appsync-owner-contact.ts | 21 ++ packages/aws-cdk-lib/aws-appsync/README.md | 13 ++ .../aws-cdk-lib/aws-appsync/lib/graphqlapi.ts | 13 ++ .../aws-appsync/test/appsync.test.ts | 26 +++ 12 files changed, 583 insertions(+) create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-owner-contact.js.snapshot/apiDefaultTestDeployAssert018781F2.assets.json create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-owner-contact.js.snapshot/apiDefaultTestDeployAssert018781F2.template.json create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-owner-contact.js.snapshot/cdk.out create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-owner-contact.js.snapshot/integ.json create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-owner-contact.js.snapshot/manifest.json create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-owner-contact.js.snapshot/stack.assets.json create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-owner-contact.js.snapshot/stack.template.json create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-owner-contact.js.snapshot/tree.json create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-owner-contact.ts diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-owner-contact.js.snapshot/apiDefaultTestDeployAssert018781F2.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-owner-contact.js.snapshot/apiDefaultTestDeployAssert018781F2.assets.json new file mode 100644 index 0000000000000..184b507d439eb --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-owner-contact.js.snapshot/apiDefaultTestDeployAssert018781F2.assets.json @@ -0,0 +1,19 @@ +{ + "version": "38.0.1", + "files": { + "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { + "source": { + "path": "apiDefaultTestDeployAssert018781F2.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + } + }, + "dockerImages": {} +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-owner-contact.js.snapshot/apiDefaultTestDeployAssert018781F2.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-owner-contact.js.snapshot/apiDefaultTestDeployAssert018781F2.template.json new file mode 100644 index 0000000000000..ad9d0fb73d1dd --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-owner-contact.js.snapshot/apiDefaultTestDeployAssert018781F2.template.json @@ -0,0 +1,36 @@ +{ + "Parameters": { + "BootstrapVersion": { + "Type": "AWS::SSM::Parameter::Value", + "Default": "/cdk-bootstrap/hnb659fds/version", + "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]" + } + }, + "Rules": { + "CheckBootstrapVersion": { + "Assertions": [ + { + "Assert": { + "Fn::Not": [ + { + "Fn::Contains": [ + [ + "1", + "2", + "3", + "4", + "5" + ], + { + "Ref": "BootstrapVersion" + } + ] + } + ] + }, + "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI." + } + ] + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-owner-contact.js.snapshot/cdk.out b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-owner-contact.js.snapshot/cdk.out new file mode 100644 index 0000000000000..c6e612584e352 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-owner-contact.js.snapshot/cdk.out @@ -0,0 +1 @@ +{"version":"38.0.1"} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-owner-contact.js.snapshot/integ.json b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-owner-contact.js.snapshot/integ.json new file mode 100644 index 0000000000000..d57db15bfe5ff --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-owner-contact.js.snapshot/integ.json @@ -0,0 +1,12 @@ +{ + "version": "38.0.1", + "testCases": { + "api/DefaultTest": { + "stacks": [ + "stack" + ], + "assertionStack": "api/DefaultTest/DeployAssert", + "assertionStackName": "apiDefaultTestDeployAssert018781F2" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-owner-contact.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-owner-contact.js.snapshot/manifest.json new file mode 100644 index 0000000000000..81f3c66b0663f --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-owner-contact.js.snapshot/manifest.json @@ -0,0 +1,133 @@ +{ + "version": "38.0.1", + "artifacts": { + "stack.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "stack.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "stack": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "stack.template.json", + "terminationProtection": false, + "validateOnSynth": false, + "notificationArns": [], + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", + "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/cd77d1891b0a8f735849dd17fc60557c01348da18e6cc1de251bd652c7f8a2cf.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "stack.assets" + ], + "lookupRole": { + "arn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-lookup-role-${AWS::AccountId}-${AWS::Region}", + "requiresBootstrapStackVersion": 8, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "dependencies": [ + "stack.assets" + ], + "metadata": { + "/stack/OwnerContact/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "OwnerContactCA72337C" + } + ], + "/stack/OwnerContact/Schema": [ + { + "type": "aws:cdk:logicalId", + "data": "OwnerContactSchemaD692A0DE" + } + ], + "/stack/OwnerContact/DefaultApiKey": [ + { + "type": "aws:cdk:logicalId", + "data": "OwnerContactDefaultApiKeyF4AD6E80" + } + ], + "/stack/OwnerContact/NoneDS/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "OwnerContactNoneDS6E9204C8" + } + ], + "/stack/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/stack/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "stack" + }, + "apiDefaultTestDeployAssert018781F2.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "apiDefaultTestDeployAssert018781F2.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "apiDefaultTestDeployAssert018781F2": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "apiDefaultTestDeployAssert018781F2.template.json", + "terminationProtection": false, + "validateOnSynth": false, + "notificationArns": [], + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", + "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "apiDefaultTestDeployAssert018781F2.assets" + ], + "lookupRole": { + "arn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-lookup-role-${AWS::AccountId}-${AWS::Region}", + "requiresBootstrapStackVersion": 8, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "dependencies": [ + "apiDefaultTestDeployAssert018781F2.assets" + ], + "metadata": { + "/api/DefaultTest/DeployAssert/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/api/DefaultTest/DeployAssert/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "api/DefaultTest/DeployAssert" + }, + "Tree": { + "type": "cdk:tree", + "properties": { + "file": "tree.json" + } + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-owner-contact.js.snapshot/stack.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-owner-contact.js.snapshot/stack.assets.json new file mode 100644 index 0000000000000..d8ac151f7b1f9 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-owner-contact.js.snapshot/stack.assets.json @@ -0,0 +1,19 @@ +{ + "version": "38.0.1", + "files": { + "cd77d1891b0a8f735849dd17fc60557c01348da18e6cc1de251bd652c7f8a2cf": { + "source": { + "path": "stack.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "cd77d1891b0a8f735849dd17fc60557c01348da18e6cc1de251bd652c7f8a2cf.json", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + } + }, + "dockerImages": {} +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-owner-contact.js.snapshot/stack.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-owner-contact.js.snapshot/stack.template.json new file mode 100644 index 0000000000000..6c58617cf0e20 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-owner-contact.js.snapshot/stack.template.json @@ -0,0 +1,85 @@ +{ + "Resources": { + "OwnerContactCA72337C": { + "Type": "AWS::AppSync::GraphQLApi", + "Properties": { + "AuthenticationType": "API_KEY", + "Name": "OwnerContact", + "OwnerContact": "test-owner-contact" + } + }, + "OwnerContactSchemaD692A0DE": { + "Type": "AWS::AppSync::GraphQLSchema", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "OwnerContactCA72337C", + "ApiId" + ] + }, + "Definition": "type test {\n version: String!\n}\ntype Query {\n getTests: [test]!\n}\ntype Mutation {\n addTest(version: String!): test\n}\n" + } + }, + "OwnerContactDefaultApiKeyF4AD6E80": { + "Type": "AWS::AppSync::ApiKey", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "OwnerContactCA72337C", + "ApiId" + ] + } + }, + "DependsOn": [ + "OwnerContactSchemaD692A0DE" + ] + }, + "OwnerContactNoneDS6E9204C8": { + "Type": "AWS::AppSync::DataSource", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "OwnerContactCA72337C", + "ApiId" + ] + }, + "Name": "NoneDS", + "Type": "NONE" + } + } + }, + "Parameters": { + "BootstrapVersion": { + "Type": "AWS::SSM::Parameter::Value", + "Default": "/cdk-bootstrap/hnb659fds/version", + "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]" + } + }, + "Rules": { + "CheckBootstrapVersion": { + "Assertions": [ + { + "Assert": { + "Fn::Not": [ + { + "Fn::Contains": [ + [ + "1", + "2", + "3", + "4", + "5" + ], + { + "Ref": "BootstrapVersion" + } + ] + } + ] + }, + "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI." + } + ] + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-owner-contact.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-owner-contact.js.snapshot/tree.json new file mode 100644 index 0000000000000..314df83d740e5 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-owner-contact.js.snapshot/tree.json @@ -0,0 +1,205 @@ +{ + "version": "tree-0.1", + "tree": { + "id": "App", + "path": "", + "children": { + "stack": { + "id": "stack", + "path": "stack", + "children": { + "OwnerContact": { + "id": "OwnerContact", + "path": "stack/OwnerContact", + "children": { + "Resource": { + "id": "Resource", + "path": "stack/OwnerContact/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppSync::GraphQLApi", + "aws:cdk:cloudformation:props": { + "authenticationType": "API_KEY", + "name": "OwnerContact", + "ownerContact": "test-owner-contact" + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_appsync.CfnGraphQLApi", + "version": "0.0.0" + } + }, + "Schema": { + "id": "Schema", + "path": "stack/OwnerContact/Schema", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppSync::GraphQLSchema", + "aws:cdk:cloudformation:props": { + "apiId": { + "Fn::GetAtt": [ + "OwnerContactCA72337C", + "ApiId" + ] + }, + "definition": "type test {\n version: String!\n}\ntype Query {\n getTests: [test]!\n}\ntype Mutation {\n addTest(version: String!): test\n}\n" + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_appsync.CfnGraphQLSchema", + "version": "0.0.0" + } + }, + "DefaultApiKey": { + "id": "DefaultApiKey", + "path": "stack/OwnerContact/DefaultApiKey", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppSync::ApiKey", + "aws:cdk:cloudformation:props": { + "apiId": { + "Fn::GetAtt": [ + "OwnerContactCA72337C", + "ApiId" + ] + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_appsync.CfnApiKey", + "version": "0.0.0" + } + }, + "LogGroup": { + "id": "LogGroup", + "path": "stack/OwnerContact/LogGroup", + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "NoneDS": { + "id": "NoneDS", + "path": "stack/OwnerContact/NoneDS", + "children": { + "Resource": { + "id": "Resource", + "path": "stack/OwnerContact/NoneDS/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppSync::DataSource", + "aws:cdk:cloudformation:props": { + "apiId": { + "Fn::GetAtt": [ + "OwnerContactCA72337C", + "ApiId" + ] + }, + "name": "NoneDS", + "type": "NONE" + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_appsync.CfnDataSource", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_appsync.NoneDataSource", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_appsync.GraphqlApi", + "version": "0.0.0" + } + }, + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "stack/BootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "stack/CheckBootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnRule", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.Stack", + "version": "0.0.0" + } + }, + "api": { + "id": "api", + "path": "api", + "children": { + "DefaultTest": { + "id": "DefaultTest", + "path": "api/DefaultTest", + "children": { + "Default": { + "id": "Default", + "path": "api/DefaultTest/Default", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "DeployAssert": { + "id": "DeployAssert", + "path": "api/DefaultTest/DeployAssert", + "children": { + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "api/DefaultTest/DeployAssert/BootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "api/DefaultTest/DeployAssert/CheckBootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnRule", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.Stack", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", + "version": "0.0.0" + } + }, + "Tree": { + "id": "Tree", + "path": "Tree", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.App", + "version": "0.0.0" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-owner-contact.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-owner-contact.ts new file mode 100644 index 0000000000000..730c488e33caa --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-owner-contact.ts @@ -0,0 +1,21 @@ +import * as path from 'path'; +import * as cdk from 'aws-cdk-lib'; +import * as appsync from 'aws-cdk-lib/aws-appsync'; +import { IntegTest } from '@aws-cdk/integ-tests-alpha'; + +const app = new cdk.App(); +const stack = new cdk.Stack(app, 'stack'); + +const api = new appsync.GraphqlApi(stack, 'OwnerContact', { + name: 'OwnerContact', + definition: appsync.Definition.fromSchema(appsync.SchemaFile.fromAsset(path.join(__dirname, 'appsync.test.graphql'))), + ownerContact: 'test-owner-contact', +}); + +api.addNoneDataSource('NoneDS', { + name: cdk.Lazy.string({ produce(): string { return 'NoneDS'; } }), +}); + +new IntegTest(app, 'api', { + testCases: [stack], +}); diff --git a/packages/aws-cdk-lib/aws-appsync/README.md b/packages/aws-cdk-lib/aws-appsync/README.md index 40ba93f974350..f0ab40d93b3c8 100644 --- a/packages/aws-cdk-lib/aws-appsync/README.md +++ b/packages/aws-cdk-lib/aws-appsync/README.md @@ -912,3 +912,16 @@ rule.addTarget(new targets.AppSync(api, { }), })); ``` + +## Owner Contact + +You can set the owner contact information for an API resource. +This field accepts any string input with a length of 0 - 256 characters. + +```ts +const api = new appsync.GraphqlApi(this, 'OwnerContact', { + name: 'OwnerContact', + definition: appsync.Definition.fromSchema(appsync.SchemaFile.fromAsset(path.join(__dirname, 'appsync.test.graphql'))), + ownerContact: 'test-owner-contact', +}); +``` \ No newline at end of file diff --git a/packages/aws-cdk-lib/aws-appsync/lib/graphqlapi.ts b/packages/aws-cdk-lib/aws-appsync/lib/graphqlapi.ts index 0215dc0fcc6ff..54785e32e739e 100644 --- a/packages/aws-cdk-lib/aws-appsync/lib/graphqlapi.ts +++ b/packages/aws-cdk-lib/aws-appsync/lib/graphqlapi.ts @@ -439,6 +439,15 @@ export interface GraphqlApiProps { * @default - No environment variables. */ readonly environmentVariables?: { [key: string]: string }; + + /** + * The owner contact information for an API resource. + * + * This field accepts any string input with a length of 0 - 256 characters. + * + * @default - No owner contact. + */ + readonly ownerContact?: string; } /** @@ -621,6 +630,9 @@ export class GraphqlApi extends GraphqlApiBase { if (props.resolverCountLimit !== undefined && (props.resolverCountLimit < 0 || props.resolverCountLimit > 10000)) { throw new Error('You must specify a resolver count limit between 0 and 10000.'); } + if (!Token.isUnresolved(props.ownerContact) && props.ownerContact !== undefined && (props.ownerContact.length > 256)) { + throw new Error('You must specify `ownerContact` as a string of 256 characters or less.'); + } this.definition = props.schema ? Definition.fromSchema(props.schema) : props.definition!; @@ -653,6 +665,7 @@ export class GraphqlApi extends GraphqlApiBase { queryDepthLimit: props.queryDepthLimit, resolverCountLimit: props.resolverCountLimit, environmentVariables: Lazy.any({ produce: () => this.renderEnvironmentVariables() }), + ownerContact: props.ownerContact, }); this.apiId = this.api.attrApiId; diff --git a/packages/aws-cdk-lib/aws-appsync/test/appsync.test.ts b/packages/aws-cdk-lib/aws-appsync/test/appsync.test.ts index 87950c2d6c827..a597d96a9c7eb 100644 --- a/packages/aws-cdk-lib/aws-appsync/test/appsync.test.ts +++ b/packages/aws-cdk-lib/aws-appsync/test/appsync.test.ts @@ -395,3 +395,29 @@ test.each([ }, }); }); + +test('when owner contact is set, they should be used on API', () => { + // WHEN + new appsync.GraphqlApi(stack, 'owner-contact', { + name: 'owner-contact', + definition: appsync.Definition.fromSchema(appsync.SchemaFile.fromAsset(path.join(__dirname, 'appsync.test.graphql'))), + ownerContact: 'test', + }); + + // THEN + Template.fromStack(stack).hasResourceProperties('AWS::AppSync::GraphQLApi', { + OwnerContact: 'test', + }); +}); + +test('when owner contact exceeds 256 characters, it throws an error', () => { + const buildWithOwnerContact = () => { + new appsync.GraphqlApi(stack, 'owner-contact-length-exceeded', { + name: 'owner-contact', + definition: appsync.Definition.fromSchema(appsync.SchemaFile.fromAsset(path.join(__dirname, 'appsync.test.graphql'))), + ownerContact: 'a'.repeat(256 + 1), + }); + }; + + expect(() => buildWithOwnerContact()).toThrow('You must specify `ownerContact` as a string of 256 characters or less.'); +}); \ No newline at end of file
Release notes

Sourced from tj-actions/changed-files's releases.

v45.0.3

What's Changed

Full Changelog: https://github.com/tj-actions/changed-files/compare/v45...v45.0.3