@cdklabs/cdk-ecs-codedeploy 0.0.338 → 0.0.339

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (129) hide show
  1. package/.jsii +2 -2
  2. package/lib/api-canary/index.js +1 -1
  3. package/lib/ecs-appspec/index.js +1 -1
  4. package/lib/ecs-deployment/index.js +1 -1
  5. package/lib/ecs-patterns/application-load-balanced-codedeployed-fargate-service.js +1 -1
  6. package/node_modules/@smithy/abort-controller/package.json +2 -2
  7. package/node_modules/@smithy/config-resolver/package.json +4 -4
  8. package/node_modules/@smithy/core/dist-cjs/index.js +79 -158
  9. package/node_modules/@smithy/core/dist-cjs/setFeature.js +1 -0
  10. package/node_modules/@smithy/core/dist-cjs/submodules/cbor/index.js +2 -2
  11. package/node_modules/@smithy/core/dist-cjs/submodules/protocols/index.js +163 -0
  12. package/node_modules/@smithy/core/dist-es/index.js +4 -3
  13. package/node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/getHttpAuthSchemeEndpointRuleSetPlugin.js +1 -2
  14. package/node_modules/@smithy/core/dist-es/middleware-http-signing/getHttpSigningMiddleware.js +1 -2
  15. package/node_modules/@smithy/core/dist-es/protocols/requestBuilder.js +1 -67
  16. package/node_modules/@smithy/core/dist-es/setFeature.js +11 -0
  17. package/node_modules/@smithy/core/dist-es/submodules/cbor/parseCborBody.js +1 -1
  18. package/node_modules/@smithy/core/dist-es/submodules/protocols/collect-stream-body.js +11 -0
  19. package/node_modules/@smithy/core/dist-es/submodules/protocols/extended-encode-uri-component.js +5 -0
  20. package/node_modules/@smithy/core/dist-es/submodules/protocols/index.js +4 -0
  21. package/node_modules/@smithy/core/dist-es/submodules/protocols/requestBuilder.js +67 -0
  22. package/node_modules/@smithy/core/dist-es/submodules/protocols/resolve-path.js +19 -0
  23. package/node_modules/@smithy/core/dist-types/index.d.ts +4 -3
  24. package/node_modules/@smithy/core/dist-types/protocols/requestBuilder.d.ts +2 -48
  25. package/node_modules/@smithy/core/dist-types/setFeature.d.ts +12 -0
  26. package/node_modules/@smithy/core/dist-types/submodules/protocols/collect-stream-body.d.ts +10 -0
  27. package/node_modules/@smithy/core/dist-types/submodules/protocols/extended-encode-uri-component.d.ts +7 -0
  28. package/node_modules/@smithy/core/dist-types/submodules/protocols/index.d.ts +4 -0
  29. package/node_modules/@smithy/core/dist-types/submodules/protocols/requestBuilder.d.ts +51 -0
  30. package/node_modules/@smithy/core/dist-types/submodules/protocols/resolve-path.d.ts +4 -0
  31. package/node_modules/@smithy/core/dist-types/ts3.4/index.d.ts +4 -3
  32. package/node_modules/@smithy/core/dist-types/ts3.4/protocols/requestBuilder.d.ts +2 -48
  33. package/node_modules/@smithy/core/dist-types/ts3.4/setFeature.d.ts +12 -0
  34. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/collect-stream-body.d.ts +10 -0
  35. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/extended-encode-uri-component.d.ts +7 -0
  36. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/index.d.ts +4 -0
  37. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/requestBuilder.d.ts +51 -0
  38. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/resolve-path.d.ts +4 -0
  39. package/node_modules/@smithy/core/package.json +15 -8
  40. package/node_modules/@smithy/core/protocols.d.ts +7 -0
  41. package/node_modules/@smithy/core/protocols.js +6 -0
  42. package/node_modules/@smithy/credential-provider-imds/package.json +5 -5
  43. package/node_modules/@smithy/hash-node/package.json +2 -2
  44. package/node_modules/@smithy/invalid-dependency/package.json +2 -2
  45. package/node_modules/@smithy/middleware-content-length/package.json +3 -3
  46. package/node_modules/@smithy/middleware-endpoint/dist-cjs/index.js +4 -0
  47. package/node_modules/@smithy/middleware-endpoint/dist-es/endpointMiddleware.js +4 -0
  48. package/node_modules/@smithy/middleware-endpoint/package.json +8 -7
  49. package/node_modules/@smithy/middleware-retry/package.json +8 -8
  50. package/node_modules/@smithy/middleware-serde/package.json +2 -2
  51. package/node_modules/@smithy/middleware-stack/package.json +2 -2
  52. package/node_modules/@smithy/node-config-provider/package.json +4 -4
  53. package/node_modules/@smithy/node-http-handler/package.json +5 -5
  54. package/node_modules/@smithy/property-provider/package.json +2 -2
  55. package/node_modules/@smithy/protocol-http/package.json +2 -2
  56. package/node_modules/@smithy/querystring-builder/package.json +2 -2
  57. package/node_modules/@smithy/querystring-parser/package.json +2 -2
  58. package/node_modules/@smithy/service-error-classification/package.json +2 -2
  59. package/node_modules/@smithy/shared-ini-file-loader/package.json +2 -2
  60. package/node_modules/@smithy/signature-v4/package.json +4 -4
  61. package/node_modules/@smithy/smithy-client/dist-cjs/index.js +6 -35
  62. package/node_modules/@smithy/smithy-client/dist-es/collect-stream-body.js +1 -11
  63. package/node_modules/@smithy/smithy-client/dist-es/extended-encode-uri-component.js +1 -5
  64. package/node_modules/@smithy/smithy-client/dist-es/resolve-path.js +1 -19
  65. package/node_modules/@smithy/smithy-client/dist-types/collect-stream-body.d.ts +2 -7
  66. package/node_modules/@smithy/smithy-client/dist-types/extended-encode-uri-component.d.ts +2 -4
  67. package/node_modules/@smithy/smithy-client/dist-types/resolve-path.d.ts +2 -1
  68. package/node_modules/@smithy/smithy-client/dist-types/ts3.4/collect-stream-body.d.ts +2 -7
  69. package/node_modules/@smithy/smithy-client/dist-types/ts3.4/extended-encode-uri-component.d.ts +2 -4
  70. package/node_modules/@smithy/smithy-client/dist-types/ts3.4/resolve-path.d.ts +2 -1
  71. package/node_modules/@smithy/smithy-client/package.json +7 -6
  72. package/node_modules/@smithy/types/dist-cjs/feature-ids.js +1 -0
  73. package/node_modules/@smithy/types/dist-es/feature-ids.js +1 -0
  74. package/node_modules/@smithy/types/dist-es/index.js +1 -0
  75. package/node_modules/@smithy/types/dist-types/feature-ids.d.ts +16 -0
  76. package/node_modules/@smithy/types/dist-types/index.d.ts +1 -0
  77. package/node_modules/@smithy/types/dist-types/middleware.d.ts +30 -6
  78. package/node_modules/@smithy/types/dist-types/ts3.4/feature-ids.d.ts +16 -0
  79. package/node_modules/@smithy/types/dist-types/ts3.4/index.d.ts +1 -0
  80. package/node_modules/@smithy/types/dist-types/ts3.4/middleware.d.ts +26 -2
  81. package/node_modules/@smithy/types/package.json +1 -1
  82. package/node_modules/@smithy/url-parser/package.json +3 -3
  83. package/node_modules/@smithy/util-defaults-mode-browser/package.json +4 -4
  84. package/node_modules/@smithy/util-defaults-mode-node/package.json +7 -7
  85. package/node_modules/@smithy/util-endpoints/package.json +3 -3
  86. package/node_modules/@smithy/util-middleware/package.json +2 -2
  87. package/node_modules/@smithy/util-retry/package.json +3 -3
  88. package/node_modules/@smithy/util-stream/dist-cjs/checksum/ChecksumStream.browser.js +7 -0
  89. package/node_modules/@smithy/util-stream/dist-cjs/checksum/ChecksumStream.js +49 -0
  90. package/node_modules/@smithy/util-stream/dist-cjs/checksum/createChecksumStream.browser.js +40 -0
  91. package/node_modules/@smithy/util-stream/dist-cjs/checksum/createChecksumStream.js +13 -0
  92. package/node_modules/@smithy/util-stream/dist-cjs/index.js +5 -1
  93. package/node_modules/@smithy/util-stream/dist-es/checksum/ChecksumStream.browser.js +3 -0
  94. package/node_modules/@smithy/util-stream/dist-es/checksum/ChecksumStream.js +44 -0
  95. package/node_modules/@smithy/util-stream/dist-es/checksum/createChecksumStream.browser.js +35 -0
  96. package/node_modules/@smithy/util-stream/dist-es/checksum/createChecksumStream.js +9 -0
  97. package/node_modules/@smithy/util-stream/dist-es/index.js +2 -0
  98. package/node_modules/@smithy/util-stream/dist-types/checksum/ChecksumStream.browser.d.ts +37 -0
  99. package/node_modules/@smithy/util-stream/dist-types/checksum/ChecksumStream.d.ts +61 -0
  100. package/node_modules/@smithy/util-stream/dist-types/checksum/createChecksumStream.browser.d.ts +15 -0
  101. package/node_modules/@smithy/util-stream/dist-types/checksum/createChecksumStream.d.ts +12 -0
  102. package/node_modules/@smithy/util-stream/dist-types/index.d.ts +2 -0
  103. package/node_modules/@smithy/util-stream/dist-types/ts3.4/checksum/ChecksumStream.browser.d.ts +37 -0
  104. package/node_modules/@smithy/util-stream/dist-types/ts3.4/checksum/ChecksumStream.d.ts +60 -0
  105. package/node_modules/@smithy/util-stream/dist-types/ts3.4/checksum/createChecksumStream.browser.d.ts +15 -0
  106. package/node_modules/@smithy/util-stream/dist-types/ts3.4/checksum/createChecksumStream.d.ts +12 -0
  107. package/node_modules/@smithy/util-stream/dist-types/ts3.4/index.d.ts +2 -0
  108. package/node_modules/@smithy/util-stream/node_modules/@smithy/fetch-http-handler/LICENSE +201 -0
  109. package/node_modules/@smithy/util-stream/node_modules/@smithy/fetch-http-handler/README.md +11 -0
  110. package/node_modules/@smithy/util-stream/node_modules/@smithy/fetch-http-handler/dist-cjs/fetch-http-handler.js +1 -0
  111. package/node_modules/@smithy/util-stream/node_modules/@smithy/fetch-http-handler/dist-cjs/index.js +230 -0
  112. package/node_modules/@smithy/util-stream/node_modules/@smithy/fetch-http-handler/dist-cjs/request-timeout.js +1 -0
  113. package/node_modules/@smithy/util-stream/node_modules/@smithy/fetch-http-handler/dist-cjs/stream-collector.js +1 -0
  114. package/node_modules/@smithy/util-stream/node_modules/@smithy/fetch-http-handler/dist-es/fetch-http-handler.js +138 -0
  115. package/node_modules/@smithy/util-stream/node_modules/@smithy/fetch-http-handler/dist-es/index.js +2 -0
  116. package/node_modules/@smithy/util-stream/node_modules/@smithy/fetch-http-handler/dist-es/request-timeout.js +11 -0
  117. package/node_modules/@smithy/util-stream/node_modules/@smithy/fetch-http-handler/dist-es/stream-collector.js +27 -0
  118. package/node_modules/@smithy/util-stream/node_modules/@smithy/fetch-http-handler/dist-types/fetch-http-handler.d.ts +33 -0
  119. package/node_modules/@smithy/util-stream/node_modules/@smithy/fetch-http-handler/dist-types/index.d.ts +2 -0
  120. package/node_modules/@smithy/util-stream/node_modules/@smithy/fetch-http-handler/dist-types/request-timeout.d.ts +1 -0
  121. package/node_modules/@smithy/util-stream/node_modules/@smithy/fetch-http-handler/dist-types/stream-collector.d.ts +2 -0
  122. package/node_modules/@smithy/util-stream/node_modules/@smithy/fetch-http-handler/dist-types/ts3.4/fetch-http-handler.d.ts +33 -0
  123. package/node_modules/@smithy/util-stream/node_modules/@smithy/fetch-http-handler/dist-types/ts3.4/index.d.ts +2 -0
  124. package/node_modules/@smithy/util-stream/node_modules/@smithy/fetch-http-handler/dist-types/ts3.4/request-timeout.d.ts +1 -0
  125. package/node_modules/@smithy/util-stream/node_modules/@smithy/fetch-http-handler/dist-types/ts3.4/stream-collector.d.ts +2 -0
  126. package/node_modules/@smithy/util-stream/node_modules/@smithy/fetch-http-handler/package.json +62 -0
  127. package/node_modules/@smithy/util-stream/package.json +10 -4
  128. package/node_modules/@smithy/util-waiter/package.json +3 -3
  129. package/package.json +2 -2
@@ -1,7 +1,5 @@
1
1
  /**
2
2
  * @internal
3
- *
4
- * Function that wraps encodeURIComponent to encode additional characters
5
- * to fully adhere to RFC 3986.
3
+ * Backwards compatibility re-export.
6
4
  */
7
- export declare function extendedEncodeURIComponent(str: string): string;
5
+ export { extendedEncodeURIComponent } from "@smithy/core/protocols";
@@ -1,4 +1,5 @@
1
1
  /**
2
2
  * @internal
3
+ * Backwards compatibility re-export.
3
4
  */
4
- export declare const resolvedPath: (resolvedPath: string, input: unknown, memberName: string, labelValueProvider: () => string | undefined, uriLabel: string, isGreedyLabel: boolean) => string;
5
+ export { resolvedPath } from "@smithy/core/protocols";
@@ -1,10 +1,5 @@
1
- import { SerdeContext } from "@smithy/types";
2
- import { Uint8ArrayBlobAdapter } from "@smithy/util-stream";
3
1
  /**
4
2
  * @internal
5
- *
6
- * Collect low-level response body stream to Uint8Array.
3
+ * Backwards compatibility re-export.
7
4
  */
8
- export declare const collectBody: (streamBody: any, context: {
9
- streamCollector: SerdeContext["streamCollector"];
10
- }) => Promise<Uint8ArrayBlobAdapter>;
5
+ export { collectBody } from "@smithy/core/protocols";
@@ -1,7 +1,5 @@
1
1
  /**
2
2
  * @internal
3
- *
4
- * Function that wraps encodeURIComponent to encode additional characters
5
- * to fully adhere to RFC 3986.
3
+ * Backwards compatibility re-export.
6
4
  */
7
- export declare function extendedEncodeURIComponent(str: string): string;
5
+ export { extendedEncodeURIComponent } from "@smithy/core/protocols";
@@ -1,4 +1,5 @@
1
1
  /**
2
2
  * @internal
3
+ * Backwards compatibility re-export.
3
4
  */
4
- export declare const resolvedPath: (resolvedPath: string, input: unknown, memberName: string, labelValueProvider: () => string | undefined, uriLabel: string, isGreedyLabel: boolean) => string;
5
+ export { resolvedPath } from "@smithy/core/protocols";
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/smithy-client",
3
- "version": "3.4.0",
3
+ "version": "3.4.2",
4
4
  "scripts": {
5
5
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'",
6
6
  "build:cjs": "node ../../scripts/inline smithy-client",
@@ -23,11 +23,12 @@
23
23
  },
24
24
  "license": "Apache-2.0",
25
25
  "dependencies": {
26
- "@smithy/middleware-endpoint": "^3.1.4",
27
- "@smithy/middleware-stack": "^3.0.7",
28
- "@smithy/protocol-http": "^4.1.4",
29
- "@smithy/types": "^3.5.0",
30
- "@smithy/util-stream": "^3.1.9",
26
+ "@smithy/core": "^2.5.1",
27
+ "@smithy/middleware-endpoint": "^3.2.1",
28
+ "@smithy/middleware-stack": "^3.0.8",
29
+ "@smithy/protocol-http": "^4.1.5",
30
+ "@smithy/types": "^3.6.0",
31
+ "@smithy/util-stream": "^3.2.1",
31
32
  "tslib": "^2.6.2"
32
33
  },
33
34
  "engines": {
@@ -0,0 +1 @@
1
+ module.exports = require("./index.js");
@@ -0,0 +1 @@
1
+ export {};
@@ -11,6 +11,7 @@ export * from "./endpoint";
11
11
  export * from "./endpoints";
12
12
  export * from "./eventStream";
13
13
  export * from "./extensions";
14
+ export * from "./feature-ids";
14
15
  export * from "./http";
15
16
  export * from "./http/httpHandlerInitialization";
16
17
  export * from "./identity";
@@ -0,0 +1,16 @@
1
+ /**
2
+ * @internal
3
+ */
4
+ export type SmithyFeatures = Partial<{
5
+ RESOURCE_MODEL: "A";
6
+ WAITER: "B";
7
+ PAGINATOR: "C";
8
+ RETRY_MODE_LEGACY: "D";
9
+ RETRY_MODE_STANDARD: "E";
10
+ RETRY_MODE_ADAPTIVE: "F";
11
+ GZIP_REQUEST_COMPRESSION: "L";
12
+ PROTOCOL_RPC_V2_CBOR: "M";
13
+ ENDPOINT_OVERRIDE: "N";
14
+ SIGV4A_SIGNING: "S";
15
+ CREDENTIALS_CODE: "e";
16
+ }>;
@@ -11,6 +11,7 @@ export * from "./endpoint";
11
11
  export * from "./endpoints";
12
12
  export * from "./eventStream";
13
13
  export * from "./extensions";
14
+ export * from "./feature-ids";
14
15
  export * from "./http";
15
16
  export * from "./http/httpHandlerInitialization";
16
17
  export * from "./identity";
@@ -1,7 +1,10 @@
1
- import { AuthScheme, HttpAuthDefinition } from "./auth/auth";
2
- import { EndpointV2 } from "./endpoint";
3
- import { Logger } from "./logger";
4
- import { UserAgent } from "./util";
1
+ import type { AuthScheme, HttpAuthDefinition } from "./auth/auth";
2
+ import type { SelectedHttpAuthScheme } from "./auth/HttpAuthScheme";
3
+ import type { Command } from "./command";
4
+ import type { EndpointV2 } from "./endpoint";
5
+ import type { SmithyFeatures } from "./feature-ids";
6
+ import type { Logger } from "./logger";
7
+ import type { UserAgent } from "./util";
5
8
  /**
6
9
  * @public
7
10
  */
@@ -484,6 +487,7 @@ export interface HandlerExecutionContext {
484
487
  */
485
488
  currentAuthConfig?: HttpAuthDefinition;
486
489
  /**
490
+ * @deprecated do not extend this field, it is a carryover from AWS SDKs.
487
491
  * Used by DynamoDbDocumentClient.
488
492
  */
489
493
  dynamoDbDocumentClientOptions?: Partial<{
@@ -492,9 +496,29 @@ export interface HandlerExecutionContext {
492
496
  }>;
493
497
  /**
494
498
  * @internal
495
- * Context for Smithy properties
499
+ * Context for Smithy properties.
500
+ */
501
+ [SMITHY_CONTEXT_KEY]?: {
502
+ service?: string;
503
+ operation?: string;
504
+ commandInstance?: Command<any, any, any, any, any>;
505
+ selectedHttpAuthScheme?: SelectedHttpAuthScheme;
506
+ features?: SmithyFeatures;
507
+ /**
508
+ * @deprecated
509
+ * Do not assign arbitrary members to the Smithy Context,
510
+ * fields should be explicitly declared here to avoid collisions.
511
+ */
512
+ [key: string]: unknown;
513
+ };
514
+ /**
515
+ * @deprecated
516
+ * Do not assign arbitrary members to the context, since
517
+ * they can interfere with existing functionality.
518
+ *
519
+ * Additional members should instead be declared on the SMITHY_CONTEXT_KEY
520
+ * or other reserved keys.
496
521
  */
497
- [SMITHY_CONTEXT_KEY]?: Record<string, unknown>;
498
522
  [key: string]: any;
499
523
  }
500
524
  /**
@@ -0,0 +1,16 @@
1
+ /**
2
+ * @internal
3
+ */
4
+ export type SmithyFeatures = Partial<{
5
+ RESOURCE_MODEL: "A";
6
+ WAITER: "B";
7
+ PAGINATOR: "C";
8
+ RETRY_MODE_LEGACY: "D";
9
+ RETRY_MODE_STANDARD: "E";
10
+ RETRY_MODE_ADAPTIVE: "F";
11
+ GZIP_REQUEST_COMPRESSION: "L";
12
+ PROTOCOL_RPC_V2_CBOR: "M";
13
+ ENDPOINT_OVERRIDE: "N";
14
+ SIGV4A_SIGNING: "S";
15
+ CREDENTIALS_CODE: "e";
16
+ }>;
@@ -11,6 +11,7 @@ export * from "./endpoint";
11
11
  export * from "./endpoints";
12
12
  export * from "./eventStream";
13
13
  export * from "./extensions";
14
+ export * from "./feature-ids";
14
15
  export * from "./http";
15
16
  export * from "./http/httpHandlerInitialization";
16
17
  export * from "./identity";
@@ -1,5 +1,8 @@
1
1
  import { AuthScheme, HttpAuthDefinition } from "./auth/auth";
2
+ import { SelectedHttpAuthScheme } from "./auth/HttpAuthScheme";
3
+ import { Command } from "./command";
2
4
  import { EndpointV2 } from "./endpoint";
5
+ import { SmithyFeatures } from "./feature-ids";
3
6
  import { Logger } from "./logger";
4
7
  import { UserAgent } from "./util";
5
8
  /**
@@ -484,6 +487,7 @@ export interface HandlerExecutionContext {
484
487
  */
485
488
  currentAuthConfig?: HttpAuthDefinition;
486
489
  /**
490
+ * @deprecated do not extend this field, it is a carryover from AWS SDKs.
487
491
  * Used by DynamoDbDocumentClient.
488
492
  */
489
493
  dynamoDbDocumentClientOptions?: Partial<{
@@ -492,9 +496,29 @@ export interface HandlerExecutionContext {
492
496
  }>;
493
497
  /**
494
498
  * @internal
495
- * Context for Smithy properties
499
+ * Context for Smithy properties.
500
+ */
501
+ [SMITHY_CONTEXT_KEY]?: {
502
+ service?: string;
503
+ operation?: string;
504
+ commandInstance?: Command<any, any, any, any, any>;
505
+ selectedHttpAuthScheme?: SelectedHttpAuthScheme;
506
+ features?: SmithyFeatures;
507
+ /**
508
+ * @deprecated
509
+ * Do not assign arbitrary members to the Smithy Context,
510
+ * fields should be explicitly declared here to avoid collisions.
511
+ */
512
+ [key: string]: unknown;
513
+ };
514
+ /**
515
+ * @deprecated
516
+ * Do not assign arbitrary members to the context, since
517
+ * they can interfere with existing functionality.
518
+ *
519
+ * Additional members should instead be declared on the SMITHY_CONTEXT_KEY
520
+ * or other reserved keys.
496
521
  */
497
- [SMITHY_CONTEXT_KEY]?: Record<string, unknown>;
498
522
  [key: string]: any;
499
523
  }
500
524
  /**
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/types",
3
- "version": "3.5.0",
3
+ "version": "3.6.0",
4
4
  "scripts": {
5
5
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'",
6
6
  "build:cjs": "node ../../scripts/inline types",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/url-parser",
3
- "version": "3.0.7",
3
+ "version": "3.0.8",
4
4
  "scripts": {
5
5
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'",
6
6
  "build:cjs": "node ../../scripts/inline url-parser",
@@ -22,8 +22,8 @@
22
22
  },
23
23
  "license": "Apache-2.0",
24
24
  "dependencies": {
25
- "@smithy/querystring-parser": "^3.0.7",
26
- "@smithy/types": "^3.5.0",
25
+ "@smithy/querystring-parser": "^3.0.8",
26
+ "@smithy/types": "^3.6.0",
27
27
  "tslib": "^2.6.2"
28
28
  },
29
29
  "typesVersions": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/util-defaults-mode-browser",
3
- "version": "3.0.23",
3
+ "version": "3.0.25",
4
4
  "scripts": {
5
5
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'",
6
6
  "build:cjs": "node ../../scripts/inline util-defaults-mode-browser",
@@ -22,9 +22,9 @@
22
22
  },
23
23
  "license": "Apache-2.0",
24
24
  "dependencies": {
25
- "@smithy/property-provider": "^3.1.7",
26
- "@smithy/smithy-client": "^3.4.0",
27
- "@smithy/types": "^3.5.0",
25
+ "@smithy/property-provider": "^3.1.8",
26
+ "@smithy/smithy-client": "^3.4.2",
27
+ "@smithy/types": "^3.6.0",
28
28
  "bowser": "^2.11.0",
29
29
  "tslib": "^2.6.2"
30
30
  },
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/util-defaults-mode-node",
3
- "version": "3.0.23",
3
+ "version": "3.0.25",
4
4
  "scripts": {
5
5
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'",
6
6
  "build:cjs": "node ../../scripts/inline util-defaults-mode-node",
@@ -22,12 +22,12 @@
22
22
  },
23
23
  "license": "Apache-2.0",
24
24
  "dependencies": {
25
- "@smithy/config-resolver": "^3.0.9",
26
- "@smithy/credential-provider-imds": "^3.2.4",
27
- "@smithy/node-config-provider": "^3.1.8",
28
- "@smithy/property-provider": "^3.1.7",
29
- "@smithy/smithy-client": "^3.4.0",
30
- "@smithy/types": "^3.5.0",
25
+ "@smithy/config-resolver": "^3.0.10",
26
+ "@smithy/credential-provider-imds": "^3.2.5",
27
+ "@smithy/node-config-provider": "^3.1.9",
28
+ "@smithy/property-provider": "^3.1.8",
29
+ "@smithy/smithy-client": "^3.4.2",
30
+ "@smithy/types": "^3.6.0",
31
31
  "tslib": "^2.6.2"
32
32
  },
33
33
  "devDependencies": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/util-endpoints",
3
- "version": "2.1.3",
3
+ "version": "2.1.4",
4
4
  "description": "Utilities to help with endpoint resolution.",
5
5
  "main": "./dist-cjs/index.js",
6
6
  "module": "./dist-es/index.js",
@@ -26,8 +26,8 @@
26
26
  },
27
27
  "license": "Apache-2.0",
28
28
  "dependencies": {
29
- "@smithy/node-config-provider": "^3.1.8",
30
- "@smithy/types": "^3.5.0",
29
+ "@smithy/node-config-provider": "^3.1.9",
30
+ "@smithy/types": "^3.6.0",
31
31
  "tslib": "^2.6.2"
32
32
  },
33
33
  "devDependencies": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/util-middleware",
3
- "version": "3.0.7",
3
+ "version": "3.0.8",
4
4
  "description": "Shared utilities for to be used in middleware packages.",
5
5
  "main": "./dist-cjs/index.js",
6
6
  "module": "./dist-es/index.js",
@@ -26,7 +26,7 @@
26
26
  },
27
27
  "license": "Apache-2.0",
28
28
  "dependencies": {
29
- "@smithy/types": "^3.5.0",
29
+ "@smithy/types": "^3.6.0",
30
30
  "tslib": "^2.6.2"
31
31
  },
32
32
  "devDependencies": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/util-retry",
3
- "version": "3.0.7",
3
+ "version": "3.0.8",
4
4
  "description": "Shared retry utilities to be used in middleware packages.",
5
5
  "main": "./dist-cjs/index.js",
6
6
  "module": "./dist-es/index.js",
@@ -27,8 +27,8 @@
27
27
  },
28
28
  "license": "Apache-2.0",
29
29
  "dependencies": {
30
- "@smithy/service-error-classification": "^3.0.7",
31
- "@smithy/types": "^3.5.0",
30
+ "@smithy/service-error-classification": "^3.0.8",
31
+ "@smithy/types": "^3.6.0",
32
32
  "tslib": "^2.6.2"
33
33
  },
34
34
  "devDependencies": {
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ChecksumStream = void 0;
4
+ const ReadableStreamRef = typeof ReadableStream === "function" ? ReadableStream : function () { };
5
+ class ChecksumStream extends ReadableStreamRef {
6
+ }
7
+ exports.ChecksumStream = ChecksumStream;
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ChecksumStream = void 0;
4
+ const util_base64_1 = require("@smithy/util-base64");
5
+ const stream_1 = require("stream");
6
+ class ChecksumStream extends stream_1.Duplex {
7
+ constructor({ expectedChecksum, checksum, source, checksumSourceLocation, base64Encoder, }) {
8
+ var _a, _b;
9
+ super();
10
+ if (typeof source.pipe === "function") {
11
+ this.source = source;
12
+ }
13
+ else {
14
+ throw new Error(`@smithy/util-stream: unsupported source type ${(_b = (_a = source === null || source === void 0 ? void 0 : source.constructor) === null || _a === void 0 ? void 0 : _a.name) !== null && _b !== void 0 ? _b : source} in ChecksumStream.`);
15
+ }
16
+ this.base64Encoder = base64Encoder !== null && base64Encoder !== void 0 ? base64Encoder : util_base64_1.toBase64;
17
+ this.expectedChecksum = expectedChecksum;
18
+ this.checksum = checksum;
19
+ this.checksumSourceLocation = checksumSourceLocation;
20
+ this.source.pipe(this);
21
+ }
22
+ _read(size) { }
23
+ _write(chunk, encoding, callback) {
24
+ try {
25
+ this.checksum.update(chunk);
26
+ this.push(chunk);
27
+ }
28
+ catch (e) {
29
+ return callback(e);
30
+ }
31
+ return callback();
32
+ }
33
+ async _final(callback) {
34
+ try {
35
+ const digest = await this.checksum.digest();
36
+ const received = this.base64Encoder(digest);
37
+ if (this.expectedChecksum !== received) {
38
+ return callback(new Error(`Checksum mismatch: expected "${this.expectedChecksum}" but received "${received}"` +
39
+ ` in response header "${this.checksumSourceLocation}".`));
40
+ }
41
+ }
42
+ catch (e) {
43
+ return callback(e);
44
+ }
45
+ this.push(null);
46
+ return callback();
47
+ }
48
+ }
49
+ exports.ChecksumStream = ChecksumStream;
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createChecksumStream = void 0;
4
+ const util_base64_1 = require("@smithy/util-base64");
5
+ const stream_type_check_1 = require("../stream-type-check");
6
+ const ChecksumStream_browser_1 = require("./ChecksumStream.browser");
7
+ const createChecksumStream = ({ expectedChecksum, checksum, source, checksumSourceLocation, base64Encoder, }) => {
8
+ var _a, _b;
9
+ if (!(0, stream_type_check_1.isReadableStream)(source)) {
10
+ throw new Error(`@smithy/util-stream: unsupported source type ${(_b = (_a = source === null || source === void 0 ? void 0 : source.constructor) === null || _a === void 0 ? void 0 : _a.name) !== null && _b !== void 0 ? _b : source} in ChecksumStream.`);
11
+ }
12
+ const encoder = base64Encoder !== null && base64Encoder !== void 0 ? base64Encoder : util_base64_1.toBase64;
13
+ if (typeof TransformStream !== "function") {
14
+ throw new Error("@smithy/util-stream: unable to instantiate ChecksumStream because API unavailable: ReadableStream/TransformStream.");
15
+ }
16
+ const transform = new TransformStream({
17
+ start() { },
18
+ async transform(chunk, controller) {
19
+ checksum.update(chunk);
20
+ controller.enqueue(chunk);
21
+ },
22
+ async flush(controller) {
23
+ const digest = await checksum.digest();
24
+ const received = encoder(digest);
25
+ if (expectedChecksum !== received) {
26
+ const error = new Error(`Checksum mismatch: expected "${expectedChecksum}" but received "${received}"` +
27
+ ` in response header "${checksumSourceLocation}".`);
28
+ controller.error(error);
29
+ }
30
+ else {
31
+ controller.terminate();
32
+ }
33
+ },
34
+ });
35
+ source.pipeThrough(transform);
36
+ const readable = transform.readable;
37
+ Object.setPrototypeOf(readable, ChecksumStream_browser_1.ChecksumStream.prototype);
38
+ return readable;
39
+ };
40
+ exports.createChecksumStream = createChecksumStream;
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createChecksumStream = void 0;
4
+ const stream_type_check_1 = require("../stream-type-check");
5
+ const ChecksumStream_1 = require("./ChecksumStream");
6
+ const createChecksumStream_browser_1 = require("./createChecksumStream.browser");
7
+ function createChecksumStream(init) {
8
+ if (typeof ReadableStream === "function" && (0, stream_type_check_1.isReadableStream)(init.source)) {
9
+ return (0, createChecksumStream_browser_1.createChecksumStream)(init);
10
+ }
11
+ return new ChecksumStream_1.ChecksumStream(init);
12
+ }
13
+ exports.createChecksumStream = createChecksumStream;
@@ -82,6 +82,8 @@ __reExport(src_exports, require("././sdk-stream-mixin"), module.exports);
82
82
  __reExport(src_exports, require("././splitStream"), module.exports);
83
83
  __reExport(src_exports, require("././headStream"), module.exports);
84
84
  __reExport(src_exports, require("././stream-type-check"), module.exports);
85
+ __reExport(src_exports, require("./checksum/createChecksumStream"), module.exports);
86
+ __reExport(src_exports, require("./checksum/ChecksumStream"), module.exports);
85
87
  // Annotate the CommonJS export names for ESM import in node:
86
88
 
87
89
  0 && (module.exports = {
@@ -90,6 +92,8 @@ __reExport(src_exports, require("././stream-type-check"), module.exports);
90
92
  sdkStreamMixin,
91
93
  splitStream,
92
94
  headStream,
93
- isReadableStream
95
+ isReadableStream,
96
+ createChecksumStream,
97
+ ChecksumStream
94
98
  });
95
99
 
@@ -0,0 +1,3 @@
1
+ const ReadableStreamRef = typeof ReadableStream === "function" ? ReadableStream : function () { };
2
+ export class ChecksumStream extends ReadableStreamRef {
3
+ }
@@ -0,0 +1,44 @@
1
+ import { toBase64 } from "@smithy/util-base64";
2
+ import { Duplex } from "stream";
3
+ export class ChecksumStream extends Duplex {
4
+ constructor({ expectedChecksum, checksum, source, checksumSourceLocation, base64Encoder, }) {
5
+ super();
6
+ if (typeof source.pipe === "function") {
7
+ this.source = source;
8
+ }
9
+ else {
10
+ throw new Error(`@smithy/util-stream: unsupported source type ${source?.constructor?.name ?? source} in ChecksumStream.`);
11
+ }
12
+ this.base64Encoder = base64Encoder ?? toBase64;
13
+ this.expectedChecksum = expectedChecksum;
14
+ this.checksum = checksum;
15
+ this.checksumSourceLocation = checksumSourceLocation;
16
+ this.source.pipe(this);
17
+ }
18
+ _read(size) { }
19
+ _write(chunk, encoding, callback) {
20
+ try {
21
+ this.checksum.update(chunk);
22
+ this.push(chunk);
23
+ }
24
+ catch (e) {
25
+ return callback(e);
26
+ }
27
+ return callback();
28
+ }
29
+ async _final(callback) {
30
+ try {
31
+ const digest = await this.checksum.digest();
32
+ const received = this.base64Encoder(digest);
33
+ if (this.expectedChecksum !== received) {
34
+ return callback(new Error(`Checksum mismatch: expected "${this.expectedChecksum}" but received "${received}"` +
35
+ ` in response header "${this.checksumSourceLocation}".`));
36
+ }
37
+ }
38
+ catch (e) {
39
+ return callback(e);
40
+ }
41
+ this.push(null);
42
+ return callback();
43
+ }
44
+ }
@@ -0,0 +1,35 @@
1
+ import { toBase64 } from "@smithy/util-base64";
2
+ import { isReadableStream } from "../stream-type-check";
3
+ import { ChecksumStream } from "./ChecksumStream.browser";
4
+ export const createChecksumStream = ({ expectedChecksum, checksum, source, checksumSourceLocation, base64Encoder, }) => {
5
+ if (!isReadableStream(source)) {
6
+ throw new Error(`@smithy/util-stream: unsupported source type ${source?.constructor?.name ?? source} in ChecksumStream.`);
7
+ }
8
+ const encoder = base64Encoder ?? toBase64;
9
+ if (typeof TransformStream !== "function") {
10
+ throw new Error("@smithy/util-stream: unable to instantiate ChecksumStream because API unavailable: ReadableStream/TransformStream.");
11
+ }
12
+ const transform = new TransformStream({
13
+ start() { },
14
+ async transform(chunk, controller) {
15
+ checksum.update(chunk);
16
+ controller.enqueue(chunk);
17
+ },
18
+ async flush(controller) {
19
+ const digest = await checksum.digest();
20
+ const received = encoder(digest);
21
+ if (expectedChecksum !== received) {
22
+ const error = new Error(`Checksum mismatch: expected "${expectedChecksum}" but received "${received}"` +
23
+ ` in response header "${checksumSourceLocation}".`);
24
+ controller.error(error);
25
+ }
26
+ else {
27
+ controller.terminate();
28
+ }
29
+ },
30
+ });
31
+ source.pipeThrough(transform);
32
+ const readable = transform.readable;
33
+ Object.setPrototypeOf(readable, ChecksumStream.prototype);
34
+ return readable;
35
+ };
@@ -0,0 +1,9 @@
1
+ import { isReadableStream } from "../stream-type-check";
2
+ import { ChecksumStream } from "./ChecksumStream";
3
+ import { createChecksumStream as createChecksumStreamWeb } from "./createChecksumStream.browser";
4
+ export function createChecksumStream(init) {
5
+ if (typeof ReadableStream === "function" && isReadableStream(init.source)) {
6
+ return createChecksumStreamWeb(init);
7
+ }
8
+ return new ChecksumStream(init);
9
+ }
@@ -4,3 +4,5 @@ export * from "./sdk-stream-mixin";
4
4
  export * from "./splitStream";
5
5
  export * from "./headStream";
6
6
  export * from "./stream-type-check";
7
+ export * from "./checksum/createChecksumStream";
8
+ export * from "./checksum/ChecksumStream";