@cdklabs/cdk-ecs-codedeploy 0.0.39 → 0.0.40

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 (179) hide show
  1. package/.jsii +3 -3
  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/@aws-crypto/ie11-detection/CHANGELOG.md +9 -33
  7. package/node_modules/@aws-crypto/ie11-detection/build/MsSubtleCrypto.d.ts +5 -5
  8. package/node_modules/@aws-crypto/ie11-detection/package.json +2 -2
  9. package/node_modules/@aws-crypto/sha256-browser/CHANGELOG.md +28 -52
  10. package/node_modules/@aws-crypto/sha256-browser/README.md +11 -0
  11. package/node_modules/@aws-crypto/sha256-browser/build/constants.js +1 -1
  12. package/node_modules/@aws-crypto/sha256-browser/build/constants.js.map +1 -0
  13. package/node_modules/@aws-crypto/sha256-browser/build/crossPlatformSha256.d.ts +4 -3
  14. package/node_modules/@aws-crypto/sha256-browser/build/crossPlatformSha256.js +6 -2
  15. package/node_modules/@aws-crypto/sha256-browser/build/crossPlatformSha256.js.map +1 -0
  16. package/node_modules/@aws-crypto/sha256-browser/build/ie11Sha256.d.ts +4 -2
  17. package/node_modules/@aws-crypto/sha256-browser/build/ie11Sha256.js +14 -10
  18. package/node_modules/@aws-crypto/sha256-browser/build/ie11Sha256.js.map +1 -0
  19. package/node_modules/@aws-crypto/sha256-browser/build/index.js +2 -2
  20. package/node_modules/@aws-crypto/sha256-browser/build/index.js.map +1 -0
  21. package/node_modules/@aws-crypto/sha256-browser/build/isEmptyData.js +1 -1
  22. package/node_modules/@aws-crypto/sha256-browser/build/isEmptyData.js.map +1 -0
  23. package/node_modules/@aws-crypto/sha256-browser/build/webCryptoSha256.d.ts +5 -3
  24. package/node_modules/@aws-crypto/sha256-browser/build/webCryptoSha256.js +15 -9
  25. package/node_modules/@aws-crypto/sha256-browser/build/webCryptoSha256.js.map +1 -0
  26. package/node_modules/@aws-crypto/sha256-browser/package.json +8 -7
  27. package/node_modules/@aws-crypto/sha256-browser/src/crossPlatformSha256.ts +9 -4
  28. package/node_modules/@aws-crypto/sha256-browser/src/ie11Sha256.ts +22 -16
  29. package/node_modules/@aws-crypto/sha256-browser/src/webCryptoSha256.ts +24 -17
  30. package/node_modules/@aws-crypto/sha256-js/CHANGELOG.md +28 -48
  31. package/node_modules/@aws-crypto/sha256-js/README.md +11 -0
  32. package/node_modules/@aws-crypto/sha256-js/build/RawSha256.js +1 -1
  33. package/node_modules/@aws-crypto/{sha256-browser/node_modules/@aws-crypto/sha256-js → sha256-js}/build/RawSha256.js.map +0 -0
  34. package/node_modules/@aws-crypto/sha256-js/build/constants.js +1 -1
  35. package/node_modules/@aws-crypto/{sha256-browser/node_modules/@aws-crypto/sha256-js → sha256-js}/build/constants.js.map +0 -0
  36. package/node_modules/@aws-crypto/sha256-js/build/index.js +2 -2
  37. package/node_modules/@aws-crypto/{sha256-browser/node_modules/@aws-crypto/sha256-js → sha256-js}/build/index.js.map +0 -0
  38. package/node_modules/@aws-crypto/sha256-js/build/jsSha256.d.ts +6 -4
  39. package/node_modules/@aws-crypto/sha256-js/build/jsSha256.js +24 -19
  40. package/node_modules/@aws-crypto/sha256-js/build/jsSha256.js.map +1 -0
  41. package/node_modules/@aws-crypto/sha256-js/build/knownHashes.fixture.js +1 -1
  42. package/node_modules/@aws-crypto/{sha256-browser/node_modules/@aws-crypto/sha256-js → sha256-js}/build/knownHashes.fixture.js.map +0 -0
  43. package/node_modules/@aws-crypto/sha256-js/package.json +5 -4
  44. package/node_modules/@aws-crypto/sha256-js/src/jsSha256.ts +31 -23
  45. package/node_modules/@aws-crypto/supports-web-crypto/CHANGELOG.md +9 -33
  46. package/node_modules/@aws-crypto/supports-web-crypto/package.json +2 -2
  47. package/node_modules/@aws-crypto/util/CHANGELOG.md +12 -29
  48. package/node_modules/@aws-crypto/util/package.json +3 -3
  49. package/node_modules/@aws-sdk/abort-controller/package.json +2 -2
  50. package/node_modules/@aws-sdk/client-codedeploy/dist-cjs/protocols/Aws_json1_1.js +2 -2
  51. package/node_modules/@aws-sdk/client-codedeploy/dist-es/protocols/Aws_json1_1.js +2 -2
  52. package/node_modules/@aws-sdk/client-codedeploy/dist-types/CodeDeployClient.d.ts +3 -3
  53. package/node_modules/@aws-sdk/client-codedeploy/dist-types/ts3.4/CodeDeployClient.d.ts +2 -1
  54. package/node_modules/@aws-sdk/client-codedeploy/package.json +32 -32
  55. package/node_modules/@aws-sdk/client-sso/dist-types/SSOClient.d.ts +3 -3
  56. package/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/SSOClient.d.ts +2 -1
  57. package/node_modules/@aws-sdk/client-sso/package.json +28 -28
  58. package/node_modules/@aws-sdk/client-sso-oidc/dist-types/SSOOIDCClient.d.ts +3 -3
  59. package/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/SSOOIDCClient.d.ts +2 -1
  60. package/node_modules/@aws-sdk/client-sso-oidc/package.json +28 -28
  61. package/node_modules/@aws-sdk/client-sts/dist-types/STSClient.d.ts +3 -3
  62. package/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/STSClient.d.ts +2 -1
  63. package/node_modules/@aws-sdk/client-sts/package.json +31 -31
  64. package/node_modules/@aws-sdk/config-resolver/package.json +5 -5
  65. package/node_modules/@aws-sdk/credential-provider-env/package.json +3 -3
  66. package/node_modules/@aws-sdk/credential-provider-imds/package.json +5 -5
  67. package/node_modules/@aws-sdk/credential-provider-ini/package.json +9 -9
  68. package/node_modules/@aws-sdk/credential-provider-node/package.json +10 -10
  69. package/node_modules/@aws-sdk/credential-provider-process/package.json +4 -4
  70. package/node_modules/@aws-sdk/credential-provider-sso/package.json +6 -6
  71. package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +3 -3
  72. package/node_modules/@aws-sdk/fetch-http-handler/package.json +5 -5
  73. package/node_modules/@aws-sdk/hash-node/dist-cjs/index.js +10 -2
  74. package/node_modules/@aws-sdk/hash-node/dist-es/index.js +10 -2
  75. package/node_modules/@aws-sdk/hash-node/dist-types/index.d.ts +6 -3
  76. package/node_modules/@aws-sdk/hash-node/dist-types/ts3.4/index.d.ts +6 -3
  77. package/node_modules/@aws-sdk/hash-node/package.json +3 -2
  78. package/node_modules/@aws-sdk/invalid-dependency/package.json +2 -2
  79. package/node_modules/@aws-sdk/middleware-content-length/package.json +3 -3
  80. package/node_modules/@aws-sdk/middleware-endpoint/package.json +7 -7
  81. package/node_modules/@aws-sdk/middleware-host-header/package.json +3 -3
  82. package/node_modules/@aws-sdk/middleware-logger/package.json +2 -2
  83. package/node_modules/@aws-sdk/middleware-recursion-detection/package.json +3 -3
  84. package/node_modules/@aws-sdk/middleware-retry/package.json +7 -7
  85. package/node_modules/@aws-sdk/middleware-sdk-sts/dist-types/index.d.ts +2 -2
  86. package/node_modules/@aws-sdk/middleware-sdk-sts/dist-types/ts3.4/index.d.ts +2 -1
  87. package/node_modules/@aws-sdk/middleware-sdk-sts/package.json +6 -6
  88. package/node_modules/@aws-sdk/middleware-serde/package.json +2 -2
  89. package/node_modules/@aws-sdk/middleware-signing/dist-types/configurations.d.ts +3 -3
  90. package/node_modules/@aws-sdk/middleware-signing/dist-types/ts3.4/configurations.d.ts +3 -2
  91. package/node_modules/@aws-sdk/middleware-signing/package.json +6 -6
  92. package/node_modules/@aws-sdk/middleware-stack/package.json +2 -2
  93. package/node_modules/@aws-sdk/middleware-user-agent/package.json +4 -4
  94. package/node_modules/@aws-sdk/node-config-provider/package.json +4 -4
  95. package/node_modules/@aws-sdk/node-http-handler/package.json +5 -5
  96. package/node_modules/@aws-sdk/property-provider/package.json +2 -2
  97. package/node_modules/@aws-sdk/protocol-http/package.json +2 -2
  98. package/node_modules/@aws-sdk/querystring-builder/package.json +2 -2
  99. package/node_modules/@aws-sdk/querystring-parser/package.json +2 -2
  100. package/node_modules/@aws-sdk/service-error-classification/package.json +2 -2
  101. package/node_modules/@aws-sdk/shared-ini-file-loader/package.json +2 -2
  102. package/node_modules/@aws-sdk/signature-v4/dist-cjs/SignatureV4.js +4 -3
  103. package/node_modules/@aws-sdk/signature-v4/dist-cjs/credentialDerivation.js +2 -1
  104. package/node_modules/@aws-sdk/signature-v4/dist-cjs/getPayloadHash.js +2 -1
  105. package/node_modules/@aws-sdk/signature-v4/dist-es/SignatureV4.js +4 -3
  106. package/node_modules/@aws-sdk/signature-v4/dist-es/credentialDerivation.js +2 -1
  107. package/node_modules/@aws-sdk/signature-v4/dist-es/getPayloadHash.js +2 -1
  108. package/node_modules/@aws-sdk/signature-v4/dist-types/SignatureV4.d.ts +3 -3
  109. package/node_modules/@aws-sdk/signature-v4/dist-types/credentialDerivation.d.ts +2 -2
  110. package/node_modules/@aws-sdk/signature-v4/dist-types/getPayloadHash.d.ts +2 -2
  111. package/node_modules/@aws-sdk/signature-v4/dist-types/ts3.4/SignatureV4.d.ts +3 -2
  112. package/node_modules/@aws-sdk/signature-v4/dist-types/ts3.4/credentialDerivation.d.ts +6 -2
  113. package/node_modules/@aws-sdk/signature-v4/dist-types/ts3.4/getPayloadHash.d.ts +6 -2
  114. package/node_modules/@aws-sdk/signature-v4/package.json +6 -5
  115. package/node_modules/@aws-sdk/smithy-client/package.json +3 -3
  116. package/node_modules/@aws-sdk/token-providers/package.json +5 -5
  117. package/node_modules/@aws-sdk/types/dist-types/checksum.d.ts +9 -0
  118. package/node_modules/@aws-sdk/types/dist-types/crypto.d.ts +2 -0
  119. package/node_modules/@aws-sdk/types/dist-types/stream.d.ts +2 -1
  120. package/node_modules/@aws-sdk/types/dist-types/ts3.4/checksum.d.ts +4 -0
  121. package/node_modules/@aws-sdk/types/dist-types/ts3.4/stream.d.ts +2 -1
  122. package/node_modules/@aws-sdk/types/package.json +1 -1
  123. package/node_modules/@aws-sdk/url-parser/package.json +3 -3
  124. package/node_modules/@aws-sdk/util-defaults-mode-browser/package.json +4 -4
  125. package/node_modules/@aws-sdk/util-defaults-mode-node/package.json +7 -7
  126. package/node_modules/@aws-sdk/util-endpoints/package.json +2 -2
  127. package/node_modules/@aws-sdk/util-middleware/package.json +2 -2
  128. package/node_modules/@aws-sdk/util-retry/package.json +3 -3
  129. package/node_modules/@aws-sdk/util-user-agent-browser/package.json +3 -3
  130. package/node_modules/@aws-sdk/util-user-agent-node/package.json +4 -4
  131. package/node_modules/{@aws-crypto/sha256-browser/node_modules/@aws-crypto/sha256-js → @aws-sdk/util-utf8}/LICENSE +1 -1
  132. package/node_modules/@aws-sdk/util-utf8/README.md +4 -0
  133. package/node_modules/@aws-sdk/util-utf8/dist-cjs/fromUtf8.browser.js +5 -0
  134. package/node_modules/@aws-sdk/util-utf8/dist-cjs/fromUtf8.js +9 -0
  135. package/node_modules/@aws-sdk/util-utf8/dist-cjs/index.js +6 -0
  136. package/node_modules/@aws-sdk/util-utf8/dist-cjs/toUint8Array.js +14 -0
  137. package/node_modules/@aws-sdk/util-utf8/dist-cjs/toUtf8.browser.js +5 -0
  138. package/node_modules/@aws-sdk/util-utf8/dist-cjs/toUtf8.js +6 -0
  139. package/node_modules/@aws-sdk/util-utf8/dist-es/fromUtf8.browser.js +1 -0
  140. package/node_modules/@aws-sdk/util-utf8/dist-es/fromUtf8.js +5 -0
  141. package/node_modules/@aws-sdk/util-utf8/dist-es/index.js +3 -0
  142. package/node_modules/@aws-sdk/util-utf8/dist-es/toUint8Array.js +10 -0
  143. package/node_modules/@aws-sdk/util-utf8/dist-es/toUtf8.browser.js +1 -0
  144. package/node_modules/@aws-sdk/util-utf8/dist-es/toUtf8.js +2 -0
  145. package/node_modules/@aws-sdk/util-utf8/dist-types/fromUtf8.browser.d.ts +1 -0
  146. package/node_modules/@aws-sdk/util-utf8/dist-types/fromUtf8.d.ts +1 -0
  147. package/node_modules/@aws-sdk/util-utf8/dist-types/index.d.ts +3 -0
  148. package/node_modules/@aws-sdk/util-utf8/dist-types/toUint8Array.d.ts +1 -0
  149. package/node_modules/@aws-sdk/util-utf8/dist-types/toUtf8.browser.d.ts +1 -0
  150. package/node_modules/@aws-sdk/util-utf8/dist-types/toUtf8.d.ts +1 -0
  151. package/node_modules/@aws-sdk/util-utf8/dist-types/ts3.4/fromUtf8.browser.d.ts +1 -0
  152. package/node_modules/@aws-sdk/util-utf8/dist-types/ts3.4/fromUtf8.d.ts +1 -0
  153. package/node_modules/@aws-sdk/util-utf8/dist-types/ts3.4/index.d.ts +3 -0
  154. package/node_modules/@aws-sdk/util-utf8/dist-types/ts3.4/toUint8Array.d.ts +3 -0
  155. package/node_modules/@aws-sdk/util-utf8/dist-types/ts3.4/toUtf8.browser.d.ts +1 -0
  156. package/node_modules/@aws-sdk/util-utf8/dist-types/ts3.4/toUtf8.d.ts +1 -0
  157. package/node_modules/@aws-sdk/util-utf8/package.json +62 -0
  158. package/node_modules/@aws-sdk/util-waiter/package.json +3 -3
  159. package/package.json +6 -6
  160. package/node_modules/@aws-crypto/sha256-browser/node_modules/@aws-crypto/sha256-js/CHANGELOG.md +0 -125
  161. package/node_modules/@aws-crypto/sha256-browser/node_modules/@aws-crypto/sha256-js/README.md +0 -18
  162. package/node_modules/@aws-crypto/sha256-browser/node_modules/@aws-crypto/sha256-js/build/RawSha256.d.ts +0 -17
  163. package/node_modules/@aws-crypto/sha256-browser/node_modules/@aws-crypto/sha256-js/build/RawSha256.js +0 -124
  164. package/node_modules/@aws-crypto/sha256-browser/node_modules/@aws-crypto/sha256-js/build/constants.d.ts +0 -20
  165. package/node_modules/@aws-crypto/sha256-browser/node_modules/@aws-crypto/sha256-js/build/constants.js +0 -98
  166. package/node_modules/@aws-crypto/sha256-browser/node_modules/@aws-crypto/sha256-js/build/index.d.ts +0 -1
  167. package/node_modules/@aws-crypto/sha256-browser/node_modules/@aws-crypto/sha256-js/build/index.js +0 -5
  168. package/node_modules/@aws-crypto/sha256-browser/node_modules/@aws-crypto/sha256-js/build/jsSha256.d.ts +0 -10
  169. package/node_modules/@aws-crypto/sha256-browser/node_modules/@aws-crypto/sha256-js/build/jsSha256.js +0 -80
  170. package/node_modules/@aws-crypto/sha256-browser/node_modules/@aws-crypto/sha256-js/build/jsSha256.js.map +0 -1
  171. package/node_modules/@aws-crypto/sha256-browser/node_modules/@aws-crypto/sha256-js/build/knownHashes.fixture.d.ts +0 -5
  172. package/node_modules/@aws-crypto/sha256-browser/node_modules/@aws-crypto/sha256-js/build/knownHashes.fixture.js +0 -322
  173. package/node_modules/@aws-crypto/sha256-browser/node_modules/@aws-crypto/sha256-js/package.json +0 -28
  174. package/node_modules/@aws-crypto/sha256-browser/node_modules/@aws-crypto/sha256-js/src/RawSha256.ts +0 -164
  175. package/node_modules/@aws-crypto/sha256-browser/node_modules/@aws-crypto/sha256-js/src/constants.ts +0 -98
  176. package/node_modules/@aws-crypto/sha256-browser/node_modules/@aws-crypto/sha256-js/src/index.ts +0 -1
  177. package/node_modules/@aws-crypto/sha256-browser/node_modules/@aws-crypto/sha256-js/src/jsSha256.ts +0 -86
  178. package/node_modules/@aws-crypto/sha256-browser/node_modules/@aws-crypto/sha256-js/src/knownHashes.fixture.ts +0 -401
  179. package/node_modules/@aws-crypto/sha256-browser/node_modules/@aws-crypto/sha256-js/tsconfig.json +0 -17
@@ -1,4 +1,5 @@
1
1
  import { toHex } from "@aws-sdk/util-hex-encoding";
2
+ import { toUint8Array } from "@aws-sdk/util-utf8";
2
3
  import { KEY_TYPE_IDENTIFIER, MAX_CACHE_SIZE } from "./constants";
3
4
  const signingKeyCache = {};
4
5
  const cacheQueue = [];
@@ -27,6 +28,6 @@ export const clearCredentialCache = () => {
27
28
  };
28
29
  const hmac = (ctor, secret, data) => {
29
30
  const hash = new ctor(secret);
30
- hash.update(data);
31
+ hash.update(toUint8Array(data));
31
32
  return hash.digest();
32
33
  };
@@ -1,5 +1,6 @@
1
1
  import { isArrayBuffer } from "@aws-sdk/is-array-buffer";
2
2
  import { toHex } from "@aws-sdk/util-hex-encoding";
3
+ import { toUint8Array } from "@aws-sdk/util-utf8";
3
4
  import { SHA256_HEADER, UNSIGNED_PAYLOAD } from "./constants";
4
5
  export const getPayloadHash = async ({ headers, body }, hashConstructor) => {
5
6
  for (const headerName of Object.keys(headers)) {
@@ -12,7 +13,7 @@ export const getPayloadHash = async ({ headers, body }, hashConstructor) => {
12
13
  }
13
14
  else if (typeof body === "string" || ArrayBuffer.isView(body) || isArrayBuffer(body)) {
14
15
  const hashCtor = new hashConstructor();
15
- hashCtor.update(body);
16
+ hashCtor.update(toUint8Array(body));
16
17
  return toHex(await hashCtor.digest());
17
18
  }
18
19
  return UNSIGNED_PAYLOAD;
@@ -1,4 +1,4 @@
1
- import { AwsCredentialIdentity, EventSigner, EventSigningArguments, FormattedEvent, HashConstructor, HttpRequest, Provider, RequestPresigner, RequestPresigningArguments, RequestSigner, RequestSigningArguments, SigningArguments, StringSigner } from "@aws-sdk/types";
1
+ import { AwsCredentialIdentity, ChecksumConstructor, EventSigner, EventSigningArguments, FormattedEvent, HashConstructor, HttpRequest, Provider, RequestPresigner, RequestPresigningArguments, RequestSigner, RequestSigningArguments, SigningArguments, StringSigner } from "@aws-sdk/types";
2
2
  export interface SignatureV4Init {
3
3
  /**
4
4
  * The service signing name.
@@ -18,7 +18,7 @@ export interface SignatureV4Init {
18
18
  * A constructor function for a hash object that will calculate SHA-256 HMAC
19
19
  * checksums.
20
20
  */
21
- sha256?: HashConstructor;
21
+ sha256?: ChecksumConstructor | HashConstructor;
22
22
  /**
23
23
  * Whether to uri-escape the request URI path as part of computing the
24
24
  * canonical request string. This is required for every AWS service, except
@@ -38,7 +38,7 @@ export interface SignatureV4Init {
38
38
  applyChecksum?: boolean;
39
39
  }
40
40
  export interface SignatureV4CryptoInit {
41
- sha256: HashConstructor;
41
+ sha256: ChecksumConstructor | HashConstructor;
42
42
  }
43
43
  export declare class SignatureV4 implements RequestPresigner, RequestSigner, StringSigner, EventSigner {
44
44
  private readonly service;
@@ -1,4 +1,4 @@
1
- import { AwsCredentialIdentity, HashConstructor } from "@aws-sdk/types";
1
+ import { AwsCredentialIdentity, ChecksumConstructor, HashConstructor } from "@aws-sdk/types";
2
2
  /**
3
3
  * Create a string describing the scope of credentials used to sign a request.
4
4
  *
@@ -19,7 +19,7 @@ export declare const createScope: (shortDate: string, region: string, service: s
19
19
  * @param service The service to which the signed request is being
20
20
  * sent.
21
21
  */
22
- export declare const getSigningKey: (sha256Constructor: HashConstructor, credentials: AwsCredentialIdentity, shortDate: string, region: string, service: string) => Promise<Uint8Array>;
22
+ export declare const getSigningKey: (sha256Constructor: ChecksumConstructor | HashConstructor, credentials: AwsCredentialIdentity, shortDate: string, region: string, service: string) => Promise<Uint8Array>;
23
23
  /**
24
24
  * @internal
25
25
  */
@@ -1,5 +1,5 @@
1
- import { HashConstructor, HttpRequest } from "@aws-sdk/types";
1
+ import { ChecksumConstructor, HashConstructor, HttpRequest } from "@aws-sdk/types";
2
2
  /**
3
3
  * @private
4
4
  */
5
- export declare const getPayloadHash: ({ headers, body }: HttpRequest, hashConstructor: HashConstructor) => Promise<string>;
5
+ export declare const getPayloadHash: ({ headers, body }: HttpRequest, hashConstructor: ChecksumConstructor | HashConstructor) => Promise<string>;
@@ -1,5 +1,6 @@
1
1
  import {
2
2
  AwsCredentialIdentity,
3
+ ChecksumConstructor,
3
4
  EventSigner,
4
5
  EventSigningArguments,
5
6
  FormattedEvent,
@@ -17,12 +18,12 @@ export interface SignatureV4Init {
17
18
  service: string;
18
19
  region: string | Provider<string>;
19
20
  credentials: AwsCredentialIdentity | Provider<AwsCredentialIdentity>;
20
- sha256?: HashConstructor;
21
+ sha256?: ChecksumConstructor | HashConstructor;
21
22
  uriEscapePath?: boolean;
22
23
  applyChecksum?: boolean;
23
24
  }
24
25
  export interface SignatureV4CryptoInit {
25
- sha256: HashConstructor;
26
+ sha256: ChecksumConstructor | HashConstructor;
26
27
  }
27
28
  export declare class SignatureV4
28
29
  implements RequestPresigner, RequestSigner, StringSigner, EventSigner
@@ -1,11 +1,15 @@
1
- import { AwsCredentialIdentity, HashConstructor } from "@aws-sdk/types";
1
+ import {
2
+ AwsCredentialIdentity,
3
+ ChecksumConstructor,
4
+ HashConstructor,
5
+ } from "@aws-sdk/types";
2
6
  export declare const createScope: (
3
7
  shortDate: string,
4
8
  region: string,
5
9
  service: string
6
10
  ) => string;
7
11
  export declare const getSigningKey: (
8
- sha256Constructor: HashConstructor,
12
+ sha256Constructor: ChecksumConstructor | HashConstructor,
9
13
  credentials: AwsCredentialIdentity,
10
14
  shortDate: string,
11
15
  region: string,
@@ -1,5 +1,9 @@
1
- import { HashConstructor, HttpRequest } from "@aws-sdk/types";
1
+ import {
2
+ ChecksumConstructor,
3
+ HashConstructor,
4
+ HttpRequest,
5
+ } from "@aws-sdk/types";
2
6
  export declare const getPayloadHash: (
3
7
  { headers, body }: HttpRequest,
4
- hashConstructor: HashConstructor
8
+ hashConstructor: ChecksumConstructor | HashConstructor
5
9
  ) => Promise<string>;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/signature-v4",
3
- "version": "3.226.0",
3
+ "version": "3.254.0",
4
4
  "description": "A standalone implementation of the AWS Signature V4 request signing algorithm",
5
5
  "main": "./dist-cjs/index.js",
6
6
  "module": "./dist-es/index.js",
@@ -22,15 +22,16 @@
22
22
  "license": "Apache-2.0",
23
23
  "dependencies": {
24
24
  "@aws-sdk/is-array-buffer": "3.201.0",
25
- "@aws-sdk/types": "3.226.0",
25
+ "@aws-sdk/types": "3.254.0",
26
26
  "@aws-sdk/util-hex-encoding": "3.201.0",
27
- "@aws-sdk/util-middleware": "3.226.0",
27
+ "@aws-sdk/util-middleware": "3.254.0",
28
28
  "@aws-sdk/util-uri-escape": "3.201.0",
29
+ "@aws-sdk/util-utf8": "3.254.0",
29
30
  "tslib": "^2.3.1"
30
31
  },
31
32
  "devDependencies": {
32
- "@aws-crypto/sha256-js": "2.0.0",
33
- "@aws-sdk/protocol-http": "3.226.0",
33
+ "@aws-crypto/sha256-js": "3.0.0",
34
+ "@aws-sdk/protocol-http": "3.254.0",
34
35
  "@aws-sdk/util-buffer-from": "3.208.0",
35
36
  "@tsconfig/recommended": "1.0.1",
36
37
  "concurrently": "7.0.0",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/smithy-client",
3
- "version": "3.234.0",
3
+ "version": "3.254.0",
4
4
  "scripts": {
5
5
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
6
6
  "build:cjs": "tsc -p tsconfig.cjs.json",
@@ -20,8 +20,8 @@
20
20
  },
21
21
  "license": "Apache-2.0",
22
22
  "dependencies": {
23
- "@aws-sdk/middleware-stack": "3.226.0",
24
- "@aws-sdk/types": "3.226.0",
23
+ "@aws-sdk/middleware-stack": "3.254.0",
24
+ "@aws-sdk/types": "3.254.0",
25
25
  "tslib": "^2.3.1"
26
26
  },
27
27
  "engines": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/token-providers",
3
- "version": "3.252.0",
3
+ "version": "3.254.0",
4
4
  "description": "A collection of token providers",
5
5
  "main": "./dist-cjs/index.js",
6
6
  "module": "./dist-es/index.js",
@@ -25,10 +25,10 @@
25
25
  },
26
26
  "license": "Apache-2.0",
27
27
  "dependencies": {
28
- "@aws-sdk/client-sso-oidc": "3.252.0",
29
- "@aws-sdk/property-provider": "3.226.0",
30
- "@aws-sdk/shared-ini-file-loader": "3.226.0",
31
- "@aws-sdk/types": "3.226.0",
28
+ "@aws-sdk/client-sso-oidc": "3.254.0",
29
+ "@aws-sdk/property-provider": "3.254.0",
30
+ "@aws-sdk/shared-ini-file-loader": "3.254.0",
31
+ "@aws-sdk/types": "3.254.0",
32
32
  "tslib": "^2.3.1"
33
33
  },
34
34
  "devDependencies": {
@@ -1,3 +1,4 @@
1
+ import { SourceData } from "./crypto";
1
2
  /**
2
3
  * An object that provides a checksum of data provided in chunks to `update`.
3
4
  * The checksum may be performed incrementally as chunks are received or all
@@ -48,3 +49,11 @@ export interface Checksum {
48
49
  */
49
50
  update(chunk: Uint8Array): void;
50
51
  }
52
+ /**
53
+ * A constructor for a Checksum that may be used to calculate an HMAC. Implementing
54
+ * classes should not directly hold the provided key in memory beyond the
55
+ * lexical scope of the constructor.
56
+ */
57
+ export interface ChecksumConstructor {
58
+ new (secret?: SourceData): Checksum;
59
+ }
@@ -26,6 +26,8 @@ export interface Hash {
26
26
  * A constructor for a hash that may be used to calculate an HMAC. Implementing
27
27
  * classes should not directly hold the provided key in memory beyond the
28
28
  * lexical scope of the constructor.
29
+ *
30
+ * @deprecated use {@link ChecksumConstructor}
29
31
  */
30
32
  export interface HashConstructor {
31
33
  new (secret?: SourceData): Hash;
@@ -1,9 +1,10 @@
1
+ import { ChecksumConstructor } from "./checksum";
1
2
  import { HashConstructor, StreamHasher } from "./crypto";
2
3
  import { BodyLengthCalculator, Encoder } from "./util";
3
4
  export interface GetAwsChunkedEncodingStreamOptions {
4
5
  base64Encoder?: Encoder;
5
6
  bodyLengthChecker: BodyLengthCalculator;
6
- checksumAlgorithmFn?: HashConstructor;
7
+ checksumAlgorithmFn?: ChecksumConstructor | HashConstructor;
7
8
  checksumLocationName?: string;
8
9
  streamHasher?: StreamHasher;
9
10
  }
@@ -1,3 +1,4 @@
1
+ import { SourceData } from "./crypto";
1
2
  export interface Checksum {
2
3
  digestLength?: number;
3
4
  copy?(): Checksum;
@@ -6,3 +7,6 @@ export interface Checksum {
6
7
  reset(): void;
7
8
  update(chunk: Uint8Array): void;
8
9
  }
10
+ export interface ChecksumConstructor {
11
+ new (secret?: SourceData): Checksum;
12
+ }
@@ -1,9 +1,10 @@
1
+ import { ChecksumConstructor } from "./checksum";
1
2
  import { HashConstructor, StreamHasher } from "./crypto";
2
3
  import { BodyLengthCalculator, Encoder } from "./util";
3
4
  export interface GetAwsChunkedEncodingStreamOptions {
4
5
  base64Encoder?: Encoder;
5
6
  bodyLengthChecker: BodyLengthCalculator;
6
- checksumAlgorithmFn?: HashConstructor;
7
+ checksumAlgorithmFn?: ChecksumConstructor | HashConstructor;
7
8
  checksumLocationName?: string;
8
9
  streamHasher?: StreamHasher;
9
10
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/types",
3
- "version": "3.226.0",
3
+ "version": "3.254.0",
4
4
  "main": "./dist-cjs/index.js",
5
5
  "module": "./dist-es/index.js",
6
6
  "types": "./dist-types/index.d.ts",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/url-parser",
3
- "version": "3.226.0",
3
+ "version": "3.254.0",
4
4
  "scripts": {
5
5
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
6
6
  "build:cjs": "tsc -p tsconfig.cjs.json",
@@ -20,8 +20,8 @@
20
20
  },
21
21
  "license": "Apache-2.0",
22
22
  "dependencies": {
23
- "@aws-sdk/querystring-parser": "3.226.0",
24
- "@aws-sdk/types": "3.226.0",
23
+ "@aws-sdk/querystring-parser": "3.254.0",
24
+ "@aws-sdk/types": "3.254.0",
25
25
  "tslib": "^2.3.1"
26
26
  },
27
27
  "typesVersions": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/util-defaults-mode-browser",
3
- "version": "3.234.0",
3
+ "version": "3.254.0",
4
4
  "scripts": {
5
5
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
6
6
  "build:cjs": "tsc -p tsconfig.cjs.json",
@@ -19,13 +19,13 @@
19
19
  },
20
20
  "license": "Apache-2.0",
21
21
  "dependencies": {
22
- "@aws-sdk/property-provider": "3.226.0",
23
- "@aws-sdk/types": "3.226.0",
22
+ "@aws-sdk/property-provider": "3.254.0",
23
+ "@aws-sdk/types": "3.254.0",
24
24
  "bowser": "^2.11.0",
25
25
  "tslib": "^2.3.1"
26
26
  },
27
27
  "devDependencies": {
28
- "@aws-sdk/smithy-client": "3.234.0",
28
+ "@aws-sdk/smithy-client": "3.254.0",
29
29
  "@tsconfig/recommended": "1.0.1",
30
30
  "@types/node": "^14.14.31",
31
31
  "concurrently": "7.0.0",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/util-defaults-mode-node",
3
- "version": "3.234.0",
3
+ "version": "3.254.0",
4
4
  "scripts": {
5
5
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
6
6
  "build:cjs": "tsc -p tsconfig.cjs.json",
@@ -19,15 +19,15 @@
19
19
  },
20
20
  "license": "Apache-2.0",
21
21
  "dependencies": {
22
- "@aws-sdk/config-resolver": "3.234.0",
23
- "@aws-sdk/credential-provider-imds": "3.226.0",
24
- "@aws-sdk/node-config-provider": "3.226.0",
25
- "@aws-sdk/property-provider": "3.226.0",
26
- "@aws-sdk/types": "3.226.0",
22
+ "@aws-sdk/config-resolver": "3.254.0",
23
+ "@aws-sdk/credential-provider-imds": "3.254.0",
24
+ "@aws-sdk/node-config-provider": "3.254.0",
25
+ "@aws-sdk/property-provider": "3.254.0",
26
+ "@aws-sdk/types": "3.254.0",
27
27
  "tslib": "^2.3.1"
28
28
  },
29
29
  "devDependencies": {
30
- "@aws-sdk/smithy-client": "3.234.0",
30
+ "@aws-sdk/smithy-client": "3.254.0",
31
31
  "@tsconfig/recommended": "1.0.1",
32
32
  "@types/node": "^14.14.31",
33
33
  "concurrently": "7.0.0",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/util-endpoints",
3
- "version": "3.245.0",
3
+ "version": "3.254.0",
4
4
  "description": "Utilities to help with endpoint resolution",
5
5
  "main": "./dist-cjs/index.js",
6
6
  "module": "./dist-es/index.js",
@@ -21,7 +21,7 @@
21
21
  },
22
22
  "license": "Apache-2.0",
23
23
  "dependencies": {
24
- "@aws-sdk/types": "3.226.0",
24
+ "@aws-sdk/types": "3.254.0",
25
25
  "tslib": "^2.3.1"
26
26
  },
27
27
  "engines": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/util-middleware",
3
- "version": "3.226.0",
3
+ "version": "3.254.0",
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",
@@ -27,7 +27,7 @@
27
27
  "tslib": "^2.3.1"
28
28
  },
29
29
  "devDependencies": {
30
- "@aws-sdk/types": "3.226.0",
30
+ "@aws-sdk/types": "3.254.0",
31
31
  "@tsconfig/recommended": "1.0.1",
32
32
  "@types/node": "^14.14.31",
33
33
  "concurrently": "7.0.0",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/util-retry",
3
- "version": "3.229.0",
3
+ "version": "3.254.0",
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",
@@ -24,11 +24,11 @@
24
24
  },
25
25
  "license": "Apache-2.0",
26
26
  "dependencies": {
27
- "@aws-sdk/service-error-classification": "3.229.0",
27
+ "@aws-sdk/service-error-classification": "3.254.0",
28
28
  "tslib": "^2.3.1"
29
29
  },
30
30
  "devDependencies": {
31
- "@aws-sdk/types": "3.226.0",
31
+ "@aws-sdk/types": "3.254.0",
32
32
  "@tsconfig/recommended": "1.0.1",
33
33
  "@types/node": "^14.14.31",
34
34
  "concurrently": "7.0.0",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/util-user-agent-browser",
3
- "version": "3.226.0",
3
+ "version": "3.254.0",
4
4
  "scripts": {
5
5
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
6
6
  "build:cjs": "tsc -p tsconfig.cjs.json",
@@ -21,12 +21,12 @@
21
21
  "license": "Apache-2.0",
22
22
  "react-native": "dist-es/index.native.js",
23
23
  "dependencies": {
24
- "@aws-sdk/types": "3.226.0",
24
+ "@aws-sdk/types": "3.254.0",
25
25
  "bowser": "^2.11.0",
26
26
  "tslib": "^2.3.1"
27
27
  },
28
28
  "devDependencies": {
29
- "@aws-sdk/protocol-http": "3.226.0",
29
+ "@aws-sdk/protocol-http": "3.254.0",
30
30
  "@tsconfig/recommended": "1.0.1",
31
31
  "concurrently": "7.0.0",
32
32
  "downlevel-dts": "0.10.1",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/util-user-agent-node",
3
- "version": "3.226.0",
3
+ "version": "3.254.0",
4
4
  "scripts": {
5
5
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
6
6
  "build:cjs": "tsc -p tsconfig.cjs.json",
@@ -20,12 +20,12 @@
20
20
  },
21
21
  "license": "Apache-2.0",
22
22
  "dependencies": {
23
- "@aws-sdk/node-config-provider": "3.226.0",
24
- "@aws-sdk/types": "3.226.0",
23
+ "@aws-sdk/node-config-provider": "3.254.0",
24
+ "@aws-sdk/types": "3.254.0",
25
25
  "tslib": "^2.3.1"
26
26
  },
27
27
  "devDependencies": {
28
- "@aws-sdk/protocol-http": "3.226.0",
28
+ "@aws-sdk/protocol-http": "3.254.0",
29
29
  "@tsconfig/recommended": "1.0.1",
30
30
  "@types/node": "^14.14.31",
31
31
  "concurrently": "7.0.0",
@@ -186,7 +186,7 @@ Apache License
186
186
  same "printed page" as the copyright notice for easier
187
187
  identification within third-party archives.
188
188
 
189
- Copyright {yyyy} {name of copyright owner}
189
+ Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
190
190
 
191
191
  Licensed under the Apache License, Version 2.0 (the "License");
192
192
  you may not use this file except in compliance with the License.
@@ -0,0 +1,4 @@
1
+ # @aws-sdk/util-utf8
2
+
3
+ [![NPM version](https://img.shields.io/npm/v/@aws-sdk/util-utf8/latest.svg)](https://www.npmjs.com/package/@aws-sdk/util-utf8)
4
+ [![NPM downloads](https://img.shields.io/npm/dm/@aws-sdk/util-utf8.svg)](https://www.npmjs.com/package/@aws-sdk/util-utf8)
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.fromUtf8 = void 0;
4
+ const fromUtf8 = (input) => new TextEncoder().encode(input);
5
+ exports.fromUtf8 = fromUtf8;
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.fromUtf8 = void 0;
4
+ const util_buffer_from_1 = require("@aws-sdk/util-buffer-from");
5
+ const fromUtf8 = (input) => {
6
+ const buf = (0, util_buffer_from_1.fromString)(input, "utf8");
7
+ return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength / Uint8Array.BYTES_PER_ELEMENT);
8
+ };
9
+ exports.fromUtf8 = fromUtf8;
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./fromUtf8"), exports);
5
+ tslib_1.__exportStar(require("./toUint8Array"), exports);
6
+ tslib_1.__exportStar(require("./toUtf8"), exports);
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.toUint8Array = void 0;
4
+ const fromUtf8_1 = require("./fromUtf8");
5
+ const toUint8Array = (data) => {
6
+ if (typeof data === "string") {
7
+ return (0, fromUtf8_1.fromUtf8)(data);
8
+ }
9
+ if (ArrayBuffer.isView(data)) {
10
+ return new Uint8Array(data.buffer, data.byteOffset, data.byteLength / Uint8Array.BYTES_PER_ELEMENT);
11
+ }
12
+ return new Uint8Array(data);
13
+ };
14
+ exports.toUint8Array = toUint8Array;
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.toUtf8 = void 0;
4
+ const toUtf8 = (input) => new TextDecoder("utf-8").decode(input);
5
+ exports.toUtf8 = toUtf8;
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.toUtf8 = void 0;
4
+ const util_buffer_from_1 = require("@aws-sdk/util-buffer-from");
5
+ const toUtf8 = (input) => (0, util_buffer_from_1.fromArrayBuffer)(input.buffer, input.byteOffset, input.byteLength).toString("utf8");
6
+ exports.toUtf8 = toUtf8;
@@ -0,0 +1 @@
1
+ export const fromUtf8 = (input) => new TextEncoder().encode(input);
@@ -0,0 +1,5 @@
1
+ import { fromString } from "@aws-sdk/util-buffer-from";
2
+ export const fromUtf8 = (input) => {
3
+ const buf = fromString(input, "utf8");
4
+ return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength / Uint8Array.BYTES_PER_ELEMENT);
5
+ };
@@ -0,0 +1,3 @@
1
+ export * from "./fromUtf8";
2
+ export * from "./toUint8Array";
3
+ export * from "./toUtf8";
@@ -0,0 +1,10 @@
1
+ import { fromUtf8 } from "./fromUtf8";
2
+ export const toUint8Array = (data) => {
3
+ if (typeof data === "string") {
4
+ return fromUtf8(data);
5
+ }
6
+ if (ArrayBuffer.isView(data)) {
7
+ return new Uint8Array(data.buffer, data.byteOffset, data.byteLength / Uint8Array.BYTES_PER_ELEMENT);
8
+ }
9
+ return new Uint8Array(data);
10
+ };
@@ -0,0 +1 @@
1
+ export const toUtf8 = (input) => new TextDecoder("utf-8").decode(input);
@@ -0,0 +1,2 @@
1
+ import { fromArrayBuffer } from "@aws-sdk/util-buffer-from";
2
+ export const toUtf8 = (input) => fromArrayBuffer(input.buffer, input.byteOffset, input.byteLength).toString("utf8");
@@ -0,0 +1 @@
1
+ export declare const fromUtf8: (input: string) => Uint8Array;
@@ -0,0 +1 @@
1
+ export declare const fromUtf8: (input: string) => Uint8Array;
@@ -0,0 +1,3 @@
1
+ export * from "./fromUtf8";
2
+ export * from "./toUint8Array";
3
+ export * from "./toUtf8";
@@ -0,0 +1 @@
1
+ export declare const toUint8Array: (data: string | ArrayBuffer | ArrayBufferView) => Uint8Array;
@@ -0,0 +1 @@
1
+ export declare const toUtf8: (input: Uint8Array) => string;
@@ -0,0 +1 @@
1
+ export declare const toUtf8: (input: Uint8Array) => string;
@@ -0,0 +1 @@
1
+ export declare const fromUtf8: (input: string) => Uint8Array;
@@ -0,0 +1 @@
1
+ export declare const fromUtf8: (input: string) => Uint8Array;
@@ -0,0 +1,3 @@
1
+ export * from "./fromUtf8";
2
+ export * from "./toUint8Array";
3
+ export * from "./toUtf8";
@@ -0,0 +1,3 @@
1
+ export declare const toUint8Array: (
2
+ data: string | ArrayBuffer | ArrayBufferView
3
+ ) => Uint8Array;
@@ -0,0 +1 @@
1
+ export declare const toUtf8: (input: Uint8Array) => string;
@@ -0,0 +1 @@
1
+ export declare const toUtf8: (input: Uint8Array) => string;