@cdklabs/cdk-ecs-codedeploy 0.0.256 → 0.0.257

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 (72) 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/package.json +8 -8
  9. package/node_modules/@smithy/credential-provider-imds/dist-cjs/index.js +11 -1
  10. package/node_modules/@smithy/credential-provider-imds/dist-es/index.js +1 -0
  11. package/node_modules/@smithy/credential-provider-imds/dist-es/utils/getExtendedInstanceMetadataCredentials.js +1 -1
  12. package/node_modules/@smithy/credential-provider-imds/dist-types/index.d.ts +4 -0
  13. package/node_modules/@smithy/credential-provider-imds/dist-types/ts3.4/index.d.ts +4 -0
  14. package/node_modules/@smithy/credential-provider-imds/package.json +5 -5
  15. package/node_modules/@smithy/eventstream-codec/package.json +3 -3
  16. package/node_modules/@smithy/fetch-http-handler/package.json +6 -6
  17. package/node_modules/@smithy/hash-node/package.json +3 -3
  18. package/node_modules/@smithy/invalid-dependency/package.json +2 -2
  19. package/node_modules/@smithy/middleware-content-length/package.json +4 -4
  20. package/node_modules/@smithy/middleware-endpoint/package.json +7 -7
  21. package/node_modules/@smithy/middleware-retry/package.json +9 -9
  22. package/node_modules/@smithy/middleware-serde/dist-cjs/index.js +5 -0
  23. package/node_modules/@smithy/middleware-serde/dist-es/deserializerMiddleware.js +5 -0
  24. package/node_modules/@smithy/middleware-serde/dist-types/deserializerMiddleware.d.ts +7 -2
  25. package/node_modules/@smithy/middleware-serde/dist-types/serdePlugin.d.ts +7 -2
  26. package/node_modules/@smithy/middleware-serde/dist-types/serializerMiddleware.d.ts +7 -2
  27. package/node_modules/@smithy/middleware-serde/dist-types/ts3.4/deserializerMiddleware.d.ts +7 -2
  28. package/node_modules/@smithy/middleware-serde/dist-types/ts3.4/serdePlugin.d.ts +7 -2
  29. package/node_modules/@smithy/middleware-serde/dist-types/ts3.4/serializerMiddleware.d.ts +7 -2
  30. package/node_modules/@smithy/middleware-serde/package.json +3 -3
  31. package/node_modules/@smithy/middleware-stack/package.json +2 -2
  32. package/node_modules/@smithy/node-config-provider/package.json +4 -4
  33. package/node_modules/@smithy/node-http-handler/package.json +5 -5
  34. package/node_modules/@smithy/property-provider/package.json +2 -2
  35. package/node_modules/@smithy/protocol-http/package.json +2 -2
  36. package/node_modules/@smithy/querystring-builder/package.json +2 -2
  37. package/node_modules/@smithy/querystring-parser/package.json +2 -2
  38. package/node_modules/@smithy/service-error-classification/package.json +2 -2
  39. package/node_modules/@smithy/shared-ini-file-loader/package.json +2 -2
  40. package/node_modules/@smithy/signature-v4/package.json +6 -6
  41. package/node_modules/@smithy/smithy-client/package.json +6 -6
  42. package/node_modules/@smithy/types/dist-types/serde.d.ts +10 -3
  43. package/node_modules/@smithy/types/dist-types/ts3.4/serde.d.ts +10 -3
  44. package/node_modules/@smithy/types/dist-types/ts3.4/util.d.ts +15 -7
  45. package/node_modules/@smithy/types/dist-types/util.d.ts +15 -7
  46. package/node_modules/@smithy/types/package.json +1 -1
  47. package/node_modules/@smithy/url-parser/package.json +3 -3
  48. package/node_modules/@smithy/util-base64/dist-cjs/toBase64.browser.js +12 -1
  49. package/node_modules/@smithy/util-base64/dist-cjs/toBase64.js +14 -1
  50. package/node_modules/@smithy/util-base64/dist-es/toBase64.browser.js +12 -1
  51. package/node_modules/@smithy/util-base64/dist-es/toBase64.js +14 -1
  52. package/node_modules/@smithy/util-base64/dist-types/toBase64.browser.d.ts +4 -3
  53. package/node_modules/@smithy/util-base64/dist-types/toBase64.d.ts +4 -3
  54. package/node_modules/@smithy/util-base64/dist-types/ts3.4/toBase64.browser.d.ts +4 -3
  55. package/node_modules/@smithy/util-base64/dist-types/ts3.4/toBase64.d.ts +4 -3
  56. package/node_modules/@smithy/util-base64/package.json +2 -1
  57. package/node_modules/@smithy/util-defaults-mode-browser/package.json +4 -4
  58. package/node_modules/@smithy/util-defaults-mode-node/package.json +7 -7
  59. package/node_modules/@smithy/util-endpoints/package.json +3 -3
  60. package/node_modules/@smithy/util-middleware/package.json +2 -2
  61. package/node_modules/@smithy/util-retry/package.json +3 -3
  62. package/node_modules/@smithy/util-stream/package.json +7 -7
  63. package/node_modules/@smithy/util-utf8/dist-cjs/index.js +9 -1
  64. package/node_modules/@smithy/util-utf8/dist-es/toUtf8.browser.js +9 -1
  65. package/node_modules/@smithy/util-utf8/dist-es/toUtf8.js +9 -1
  66. package/node_modules/@smithy/util-utf8/dist-types/toUtf8.browser.d.ts +7 -1
  67. package/node_modules/@smithy/util-utf8/dist-types/toUtf8.d.ts +7 -1
  68. package/node_modules/@smithy/util-utf8/dist-types/ts3.4/toUtf8.browser.d.ts +7 -1
  69. package/node_modules/@smithy/util-utf8/dist-types/ts3.4/toUtf8.d.ts +7 -1
  70. package/node_modules/@smithy/util-utf8/package.json +1 -1
  71. package/node_modules/@smithy/util-waiter/package.json +3 -3
  72. package/package.json +1 -1
@@ -1,3 +1,8 @@
1
- import { EndpointBearer, RequestSerializer, SerializeMiddleware } from "@smithy/types";
1
+ import { EndpointBearer, RequestSerializer, SerdeFunctions, SerializeMiddleware } from "@smithy/types";
2
2
  import { V1OrV2Endpoint } from "./serdePlugin";
3
- export declare const serializerMiddleware: <Input extends object, Output extends object, RuntimeUtils extends EndpointBearer>(options: V1OrV2Endpoint, serializer: RequestSerializer<any, RuntimeUtils>) => SerializeMiddleware<Input, Output>;
3
+ /**
4
+ * @internal
5
+ *
6
+ * Note: 3rd type parameter is deprecated and unused.
7
+ */
8
+ export declare const serializerMiddleware: <Input extends object, Output extends object, _>(options: V1OrV2Endpoint & SerdeFunctions, serializer: RequestSerializer<any, SerdeFunctions & EndpointBearer>) => SerializeMiddleware<Input, Output>;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/middleware-serde",
3
- "version": "2.1.3",
3
+ "version": "2.2.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 middleware-serde",
@@ -23,7 +23,7 @@
23
23
  },
24
24
  "license": "Apache-2.0",
25
25
  "dependencies": {
26
- "@smithy/types": "^2.10.1",
26
+ "@smithy/types": "^2.11.0",
27
27
  "tslib": "^2.5.0"
28
28
  },
29
29
  "engines": {
@@ -46,7 +46,7 @@
46
46
  "directory": "packages/middleware-serde"
47
47
  },
48
48
  "devDependencies": {
49
- "@smithy/util-test": "^0.1.16",
49
+ "@smithy/util-test": "^0.1.17",
50
50
  "@tsconfig/recommended": "1.0.1",
51
51
  "concurrently": "7.0.0",
52
52
  "downlevel-dts": "0.10.1",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/middleware-stack",
3
- "version": "2.1.3",
3
+ "version": "2.1.4",
4
4
  "description": "Provides a means for composing multiple middleware functions into a single handler",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'",
@@ -25,7 +25,7 @@
25
25
  "module": "./dist-es/index.js",
26
26
  "types": "./dist-types/index.d.ts",
27
27
  "dependencies": {
28
- "@smithy/types": "^2.10.1",
28
+ "@smithy/types": "^2.11.0",
29
29
  "tslib": "^2.5.0"
30
30
  },
31
31
  "devDependencies": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/node-config-provider",
3
- "version": "2.2.4",
3
+ "version": "2.2.5",
4
4
  "description": "Load config default values from ini config files and environmental variable",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'",
@@ -24,9 +24,9 @@
24
24
  "module": "./dist-es/index.js",
25
25
  "types": "./dist-types/index.d.ts",
26
26
  "dependencies": {
27
- "@smithy/property-provider": "^2.1.3",
28
- "@smithy/shared-ini-file-loader": "^2.3.4",
29
- "@smithy/types": "^2.10.1",
27
+ "@smithy/property-provider": "^2.1.4",
28
+ "@smithy/shared-ini-file-loader": "^2.3.5",
29
+ "@smithy/types": "^2.11.0",
30
30
  "tslib": "^2.5.0"
31
31
  },
32
32
  "devDependencies": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/node-http-handler",
3
- "version": "2.4.1",
3
+ "version": "2.4.2",
4
4
  "description": "Provides a way to make requests",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'",
@@ -25,10 +25,10 @@
25
25
  "module": "./dist-es/index.js",
26
26
  "types": "./dist-types/index.d.ts",
27
27
  "dependencies": {
28
- "@smithy/abort-controller": "^2.1.3",
29
- "@smithy/protocol-http": "^3.2.1",
30
- "@smithy/querystring-builder": "^2.1.3",
31
- "@smithy/types": "^2.10.1",
28
+ "@smithy/abort-controller": "^2.1.4",
29
+ "@smithy/protocol-http": "^3.2.2",
30
+ "@smithy/querystring-builder": "^2.1.4",
31
+ "@smithy/types": "^2.11.0",
32
32
  "tslib": "^2.5.0"
33
33
  },
34
34
  "devDependencies": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/property-provider",
3
- "version": "2.1.3",
3
+ "version": "2.1.4",
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 property-provider",
@@ -22,7 +22,7 @@
22
22
  },
23
23
  "license": "Apache-2.0",
24
24
  "dependencies": {
25
- "@smithy/types": "^2.10.1",
25
+ "@smithy/types": "^2.11.0",
26
26
  "tslib": "^2.5.0"
27
27
  },
28
28
  "engines": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/protocol-http",
3
- "version": "3.2.1",
3
+ "version": "3.2.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 protocol-http",
@@ -23,7 +23,7 @@
23
23
  },
24
24
  "license": "Apache-2.0",
25
25
  "dependencies": {
26
- "@smithy/types": "^2.10.1",
26
+ "@smithy/types": "^2.11.0",
27
27
  "tslib": "^2.5.0"
28
28
  },
29
29
  "engines": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/querystring-builder",
3
- "version": "2.1.3",
3
+ "version": "2.1.4",
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 querystring-builder",
@@ -22,7 +22,7 @@
22
22
  },
23
23
  "license": "Apache-2.0",
24
24
  "dependencies": {
25
- "@smithy/types": "^2.10.1",
25
+ "@smithy/types": "^2.11.0",
26
26
  "@smithy/util-uri-escape": "^2.1.1",
27
27
  "tslib": "^2.5.0"
28
28
  },
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/querystring-parser",
3
- "version": "2.1.3",
3
+ "version": "2.1.4",
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 querystring-parser",
@@ -22,7 +22,7 @@
22
22
  },
23
23
  "license": "Apache-2.0",
24
24
  "dependencies": {
25
- "@smithy/types": "^2.10.1",
25
+ "@smithy/types": "^2.11.0",
26
26
  "tslib": "^2.5.0"
27
27
  },
28
28
  "engines": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/service-error-classification",
3
- "version": "2.1.3",
3
+ "version": "2.1.4",
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 service-error-classification",
@@ -54,6 +54,6 @@
54
54
  "directory": ".release/package"
55
55
  },
56
56
  "dependencies": {
57
- "@smithy/types": "^2.10.1"
57
+ "@smithy/types": "^2.11.0"
58
58
  }
59
59
  }
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@smithy/shared-ini-file-loader",
3
- "version": "2.3.4",
3
+ "version": "2.3.5",
4
4
  "dependencies": {
5
- "@smithy/types": "^2.10.1",
5
+ "@smithy/types": "^2.11.0",
6
6
  "tslib": "^2.5.0"
7
7
  },
8
8
  "devDependencies": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/signature-v4",
3
- "version": "2.1.3",
3
+ "version": "2.1.4",
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",
@@ -24,18 +24,18 @@
24
24
  },
25
25
  "license": "Apache-2.0",
26
26
  "dependencies": {
27
- "@smithy/eventstream-codec": "^2.1.3",
27
+ "@smithy/eventstream-codec": "^2.1.4",
28
28
  "@smithy/is-array-buffer": "^2.1.1",
29
- "@smithy/types": "^2.10.1",
29
+ "@smithy/types": "^2.11.0",
30
30
  "@smithy/util-hex-encoding": "^2.1.1",
31
- "@smithy/util-middleware": "^2.1.3",
31
+ "@smithy/util-middleware": "^2.1.4",
32
32
  "@smithy/util-uri-escape": "^2.1.1",
33
- "@smithy/util-utf8": "^2.1.1",
33
+ "@smithy/util-utf8": "^2.2.0",
34
34
  "tslib": "^2.5.0"
35
35
  },
36
36
  "devDependencies": {
37
37
  "@aws-crypto/sha256-js": "3.0.0",
38
- "@smithy/protocol-http": "^3.2.1",
38
+ "@smithy/protocol-http": "^3.2.2",
39
39
  "@tsconfig/recommended": "1.0.1",
40
40
  "concurrently": "7.0.0",
41
41
  "downlevel-dts": "0.10.1",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/smithy-client",
3
- "version": "2.4.2",
3
+ "version": "2.4.3",
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,11 @@
23
23
  },
24
24
  "license": "Apache-2.0",
25
25
  "dependencies": {
26
- "@smithy/middleware-endpoint": "^2.4.4",
27
- "@smithy/middleware-stack": "^2.1.3",
28
- "@smithy/protocol-http": "^3.2.1",
29
- "@smithy/types": "^2.10.1",
30
- "@smithy/util-stream": "^2.1.3",
26
+ "@smithy/middleware-endpoint": "^2.4.5",
27
+ "@smithy/middleware-stack": "^2.1.4",
28
+ "@smithy/protocol-http": "^3.2.2",
29
+ "@smithy/types": "^2.11.0",
30
+ "@smithy/util-stream": "^2.1.4",
31
31
  "tslib": "^2.5.0"
32
32
  },
33
33
  "engines": {
@@ -25,14 +25,21 @@ export interface StreamCollector {
25
25
  *
26
26
  * Request and Response serde util functions and settings for AWS services
27
27
  */
28
- export interface SerdeContext extends EndpointBearer {
28
+ export interface SerdeContext extends SerdeFunctions, EndpointBearer {
29
+ requestHandler: RequestHandler<any, any>;
30
+ disableHostPrefix: boolean;
31
+ }
32
+ /**
33
+ * @public
34
+ *
35
+ * Serde functions from the client config.
36
+ */
37
+ export interface SerdeFunctions {
29
38
  base64Encoder: Encoder;
30
39
  base64Decoder: Decoder;
31
40
  utf8Encoder: Encoder;
32
41
  utf8Decoder: Decoder;
33
42
  streamCollector: StreamCollector;
34
- requestHandler: RequestHandler<any, any>;
35
- disableHostPrefix: boolean;
36
43
  }
37
44
  /**
38
45
  * @public
@@ -25,14 +25,21 @@ export interface StreamCollector {
25
25
  *
26
26
  * Request and Response serde util functions and settings for AWS services
27
27
  */
28
- export interface SerdeContext extends EndpointBearer {
28
+ export interface SerdeContext extends SerdeFunctions, EndpointBearer {
29
+ requestHandler: RequestHandler<any, any>;
30
+ disableHostPrefix: boolean;
31
+ }
32
+ /**
33
+ * @public
34
+ *
35
+ * Serde functions from the client config.
36
+ */
37
+ export interface SerdeFunctions {
29
38
  base64Encoder: Encoder;
30
39
  base64Decoder: Decoder;
31
40
  utf8Encoder: Encoder;
32
41
  utf8Decoder: Decoder;
33
42
  streamCollector: StreamCollector;
34
- requestHandler: RequestHandler<any, any>;
35
- disableHostPrefix: boolean;
36
43
  }
37
44
  /**
38
45
  * @public
@@ -18,15 +18,23 @@ export type Exact<Type1, Type2> = [
18
18
  /**
19
19
  * @public
20
20
  *
21
- * A function that, given a TypedArray of bytes, can produce a string
22
- * representation thereof.
21
+ * A function that, given a Uint8Array of bytes, can produce a string
22
+ * representation thereof. The function may optionally attempt to
23
+ * convert other input types to Uint8Array before encoding.
23
24
  *
24
25
  * @example An encoder function that converts bytes to hexadecimal
25
- * representation would return `'deadbeef'` when given
26
- * `new Uint8Array([0xde, 0xad, 0xbe, 0xef])`.
26
+ * representation would return `'hello'` when given
27
+ * `new Uint8Array([104, 101, 108, 108, 111])`.
27
28
  */
28
29
  export interface Encoder {
29
- (input: Uint8Array): string;
30
+ /**
31
+ * Caution: the `any` type on the input is for backwards compatibility.
32
+ * Runtime support is limited to Uint8Array and string by default.
33
+ *
34
+ * You may choose to support more encoder input types if overriding the default
35
+ * implementations.
36
+ */
37
+ (input: Uint8Array | string | any): string;
30
38
  }
31
39
  /**
32
40
  * @public
@@ -35,8 +43,8 @@ export interface Encoder {
35
43
  * string.
36
44
  *
37
45
  * @example A decoder function that converts bytes to hexadecimal
38
- * representation would return `new Uint8Array([0xde, 0xad, 0xbe, 0xef])` when
39
- * given the string `'deadbeef'`.
46
+ * representation would return `new Uint8Array([104, 101, 108, 108, 111])` when
47
+ * given the string `'hello'`.
40
48
  */
41
49
  export interface Decoder {
42
50
  (input: string): Uint8Array;
@@ -10,15 +10,23 @@ export type Exact<Type1, Type2> = [Type1] extends [Type2] ? ([Type2] extends [Ty
10
10
  /**
11
11
  * @public
12
12
  *
13
- * A function that, given a TypedArray of bytes, can produce a string
14
- * representation thereof.
13
+ * A function that, given a Uint8Array of bytes, can produce a string
14
+ * representation thereof. The function may optionally attempt to
15
+ * convert other input types to Uint8Array before encoding.
15
16
  *
16
17
  * @example An encoder function that converts bytes to hexadecimal
17
- * representation would return `'deadbeef'` when given
18
- * `new Uint8Array([0xde, 0xad, 0xbe, 0xef])`.
18
+ * representation would return `'hello'` when given
19
+ * `new Uint8Array([104, 101, 108, 108, 111])`.
19
20
  */
20
21
  export interface Encoder {
21
- (input: Uint8Array): string;
22
+ /**
23
+ * Caution: the `any` type on the input is for backwards compatibility.
24
+ * Runtime support is limited to Uint8Array and string by default.
25
+ *
26
+ * You may choose to support more encoder input types if overriding the default
27
+ * implementations.
28
+ */
29
+ (input: Uint8Array | string | any): string;
22
30
  }
23
31
  /**
24
32
  * @public
@@ -27,8 +35,8 @@ export interface Encoder {
27
35
  * string.
28
36
  *
29
37
  * @example A decoder function that converts bytes to hexadecimal
30
- * representation would return `new Uint8Array([0xde, 0xad, 0xbe, 0xef])` when
31
- * given the string `'deadbeef'`.
38
+ * representation would return `new Uint8Array([104, 101, 108, 108, 111])` when
39
+ * given the string `'hello'`.
32
40
  */
33
41
  export interface Decoder {
34
42
  (input: string): Uint8Array;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/types",
3
- "version": "2.10.1",
3
+ "version": "2.11.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": "2.1.3",
3
+ "version": "2.1.4",
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": "^2.1.3",
26
- "@smithy/types": "^2.10.1",
25
+ "@smithy/querystring-parser": "^2.1.4",
26
+ "@smithy/types": "^2.11.0",
27
27
  "tslib": "^2.5.0"
28
28
  },
29
29
  "typesVersions": {
@@ -1,8 +1,19 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.toBase64 = void 0;
4
+ const util_utf8_1 = require("@smithy/util-utf8");
4
5
  const constants_browser_1 = require("./constants.browser");
5
- function toBase64(input) {
6
+ function toBase64(_input) {
7
+ let input;
8
+ if (typeof _input === "string") {
9
+ input = (0, util_utf8_1.fromUtf8)(_input);
10
+ }
11
+ else {
12
+ input = _input;
13
+ }
14
+ if (typeof input !== "object" || typeof input.byteOffset !== "number" || typeof input.byteLength !== "number") {
15
+ throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");
16
+ }
6
17
  let str = "";
7
18
  for (let i = 0; i < input.length; i += 3) {
8
19
  let bits = 0;
@@ -2,5 +2,18 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.toBase64 = void 0;
4
4
  const util_buffer_from_1 = require("@smithy/util-buffer-from");
5
- const toBase64 = (input) => (0, util_buffer_from_1.fromArrayBuffer)(input.buffer, input.byteOffset, input.byteLength).toString("base64");
5
+ const util_utf8_1 = require("@smithy/util-utf8");
6
+ const toBase64 = (_input) => {
7
+ let input;
8
+ if (typeof _input === "string") {
9
+ input = (0, util_utf8_1.fromUtf8)(_input);
10
+ }
11
+ else {
12
+ input = _input;
13
+ }
14
+ if (typeof input !== "object" || typeof input.byteOffset !== "number" || typeof input.byteLength !== "number") {
15
+ throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");
16
+ }
17
+ return (0, util_buffer_from_1.fromArrayBuffer)(input.buffer, input.byteOffset, input.byteLength).toString("base64");
18
+ };
6
19
  exports.toBase64 = toBase64;
@@ -1,5 +1,16 @@
1
+ import { fromUtf8 } from "@smithy/util-utf8";
1
2
  import { alphabetByValue, bitsPerByte, bitsPerLetter, maxLetterValue } from "./constants.browser";
2
- export function toBase64(input) {
3
+ export function toBase64(_input) {
4
+ let input;
5
+ if (typeof _input === "string") {
6
+ input = fromUtf8(_input);
7
+ }
8
+ else {
9
+ input = _input;
10
+ }
11
+ if (typeof input !== "object" || typeof input.byteOffset !== "number" || typeof input.byteLength !== "number") {
12
+ throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");
13
+ }
3
14
  let str = "";
4
15
  for (let i = 0; i < input.length; i += 3) {
5
16
  let bits = 0;
@@ -1,2 +1,15 @@
1
1
  import { fromArrayBuffer } from "@smithy/util-buffer-from";
2
- export const toBase64 = (input) => fromArrayBuffer(input.buffer, input.byteOffset, input.byteLength).toString("base64");
2
+ import { fromUtf8 } from "@smithy/util-utf8";
3
+ export const toBase64 = (_input) => {
4
+ let input;
5
+ if (typeof _input === "string") {
6
+ input = fromUtf8(_input);
7
+ }
8
+ else {
9
+ input = _input;
10
+ }
11
+ if (typeof input !== "object" || typeof input.byteOffset !== "number" || typeof input.byteLength !== "number") {
12
+ throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");
13
+ }
14
+ return fromArrayBuffer(input.buffer, input.byteOffset, input.byteLength).toString("base64");
15
+ };
@@ -1,8 +1,9 @@
1
1
  /**
2
- * Converts a Uint8Array of binary data to a base-64 encoded string.
2
+ * Converts a Uint8Array of binary data or a utf-8 string to a base-64 encoded string.
3
3
  *
4
- * @param input The binary data to encode
4
+ * @param _input - the binary data or string to encode.
5
+ * @returns base64 string.
5
6
  *
6
7
  * @see https://tools.ietf.org/html/rfc4648#section-4
7
8
  */
8
- export declare function toBase64(input: Uint8Array): string;
9
+ export declare function toBase64(_input: Uint8Array | string): string;
@@ -1,7 +1,8 @@
1
1
  /**
2
- * Converts a Uint8Array of binary data to a base-64 encoded string using
2
+ * Converts a Uint8Array of binary data or a utf-8 string to a base-64 encoded string using
3
3
  * Node.JS's `buffer` module.
4
4
  *
5
- * @param input The binary data to encode
5
+ * @param _input - the binary data or string to encode.
6
+ * @returns base64 string.
6
7
  */
7
- export declare const toBase64: (input: Uint8Array) => string;
8
+ export declare const toBase64: (_input: Uint8Array | string) => string;
@@ -1,8 +1,9 @@
1
1
  /**
2
- * Converts a Uint8Array of binary data to a base-64 encoded string.
2
+ * Converts a Uint8Array of binary data or a utf-8 string to a base-64 encoded string.
3
3
  *
4
- * @param input The binary data to encode
4
+ * @param _input - the binary data or string to encode.
5
+ * @returns base64 string.
5
6
  *
6
7
  * @see https://tools.ietf.org/html/rfc4648#section-4
7
8
  */
8
- export declare function toBase64(input: Uint8Array): string;
9
+ export declare function toBase64(_input: Uint8Array | string): string;
@@ -1,7 +1,8 @@
1
1
  /**
2
- * Converts a Uint8Array of binary data to a base-64 encoded string using
2
+ * Converts a Uint8Array of binary data or a utf-8 string to a base-64 encoded string using
3
3
  * Node.JS's `buffer` module.
4
4
  *
5
- * @param input The binary data to encode
5
+ * @param _input - the binary data or string to encode.
6
+ * @returns base64 string.
6
7
  */
7
- export declare const toBase64: (input: Uint8Array) => string;
8
+ export declare const toBase64: (_input: Uint8Array | string) => string;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/util-base64",
3
- "version": "2.1.1",
3
+ "version": "2.2.0",
4
4
  "description": "A Base64 <-> UInt8Array converter",
5
5
  "main": "./dist-cjs/index.js",
6
6
  "module": "./dist-es/index.js",
@@ -23,6 +23,7 @@
23
23
  "license": "Apache-2.0",
24
24
  "dependencies": {
25
25
  "@smithy/util-buffer-from": "^2.1.1",
26
+ "@smithy/util-utf8": "^2.2.0",
26
27
  "tslib": "^2.5.0"
27
28
  },
28
29
  "devDependencies": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/util-defaults-mode-browser",
3
- "version": "2.1.4",
3
+ "version": "2.1.5",
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": "^2.1.3",
26
- "@smithy/smithy-client": "^2.4.2",
27
- "@smithy/types": "^2.10.1",
25
+ "@smithy/property-provider": "^2.1.4",
26
+ "@smithy/smithy-client": "^2.4.3",
27
+ "@smithy/types": "^2.11.0",
28
28
  "bowser": "^2.11.0",
29
29
  "tslib": "^2.5.0"
30
30
  },
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/util-defaults-mode-node",
3
- "version": "2.2.3",
3
+ "version": "2.2.5",
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": "^2.1.4",
26
- "@smithy/credential-provider-imds": "^2.2.4",
27
- "@smithy/node-config-provider": "^2.2.4",
28
- "@smithy/property-provider": "^2.1.3",
29
- "@smithy/smithy-client": "^2.4.2",
30
- "@smithy/types": "^2.10.1",
25
+ "@smithy/config-resolver": "^2.1.5",
26
+ "@smithy/credential-provider-imds": "^2.2.6",
27
+ "@smithy/node-config-provider": "^2.2.5",
28
+ "@smithy/property-provider": "^2.1.4",
29
+ "@smithy/smithy-client": "^2.4.3",
30
+ "@smithy/types": "^2.11.0",
31
31
  "tslib": "^2.5.0"
32
32
  },
33
33
  "devDependencies": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/util-endpoints",
3
- "version": "1.1.4",
3
+ "version": "1.1.5",
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": "^2.2.4",
30
- "@smithy/types": "^2.10.1",
29
+ "@smithy/node-config-provider": "^2.2.5",
30
+ "@smithy/types": "^2.11.0",
31
31
  "tslib": "^2.5.0"
32
32
  },
33
33
  "devDependencies": {