@cdk8s/awscdk-resolver 0.0.211 → 0.0.213

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 (75) hide show
  1. package/.jsii +3 -3
  2. package/lib/resolve.js +1 -1
  3. package/node_modules/@aws-sdk/client-cloudformation/package.json +36 -36
  4. package/node_modules/@aws-sdk/client-sso/package.json +32 -32
  5. package/node_modules/@aws-sdk/client-sso-oidc/package.json +34 -34
  6. package/node_modules/@aws-sdk/client-sts/package.json +34 -34
  7. package/node_modules/@aws-sdk/core/package.json +10 -10
  8. package/node_modules/@aws-sdk/credential-provider-env/package.json +5 -5
  9. package/node_modules/@aws-sdk/credential-provider-http/package.json +10 -10
  10. package/node_modules/@aws-sdk/credential-provider-ini/package.json +13 -13
  11. package/node_modules/@aws-sdk/credential-provider-node/package.json +12 -12
  12. package/node_modules/@aws-sdk/credential-provider-process/package.json +6 -6
  13. package/node_modules/@aws-sdk/credential-provider-sso/package.json +8 -8
  14. package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +6 -6
  15. package/node_modules/@aws-sdk/middleware-host-header/package.json +4 -4
  16. package/node_modules/@aws-sdk/middleware-logger/package.json +3 -3
  17. package/node_modules/@aws-sdk/middleware-recursion-detection/package.json +4 -4
  18. package/node_modules/@aws-sdk/middleware-user-agent/package.json +7 -7
  19. package/node_modules/@aws-sdk/region-config-resolver/package.json +5 -5
  20. package/node_modules/@aws-sdk/token-providers/package.json +6 -6
  21. package/node_modules/@aws-sdk/types/package.json +2 -2
  22. package/node_modules/@aws-sdk/util-endpoints/package.json +4 -4
  23. package/node_modules/@aws-sdk/util-user-agent-browser/package.json +3 -3
  24. package/node_modules/@aws-sdk/util-user-agent-node/package.json +5 -5
  25. package/node_modules/@smithy/abort-controller/package.json +2 -2
  26. package/node_modules/@smithy/config-resolver/package.json +4 -4
  27. package/node_modules/@smithy/core/package.json +6 -6
  28. package/node_modules/@smithy/credential-provider-imds/package.json +5 -5
  29. package/node_modules/@smithy/fetch-http-handler/package.json +5 -5
  30. package/node_modules/@smithy/hash-node/package.json +2 -2
  31. package/node_modules/@smithy/invalid-dependency/package.json +2 -2
  32. package/node_modules/@smithy/middleware-content-length/package.json +3 -3
  33. package/node_modules/@smithy/middleware-endpoint/package.json +8 -8
  34. package/node_modules/@smithy/middleware-retry/package.json +8 -8
  35. package/node_modules/@smithy/middleware-serde/package.json +2 -2
  36. package/node_modules/@smithy/middleware-stack/package.json +2 -2
  37. package/node_modules/@smithy/node-config-provider/package.json +4 -4
  38. package/node_modules/@smithy/node-http-handler/dist-cjs/index.js +11 -8
  39. package/node_modules/@smithy/node-http-handler/dist-es/timing.js +2 -2
  40. package/node_modules/@smithy/node-http-handler/dist-es/write-request-body.js +9 -6
  41. package/node_modules/@smithy/node-http-handler/dist-types/timing.d.ts +2 -2
  42. package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/timing.d.ts +2 -2
  43. package/node_modules/@smithy/node-http-handler/package.json +5 -5
  44. package/node_modules/@smithy/property-provider/package.json +2 -2
  45. package/node_modules/@smithy/protocol-http/package.json +2 -2
  46. package/node_modules/@smithy/querystring-builder/package.json +2 -2
  47. package/node_modules/@smithy/querystring-parser/package.json +2 -2
  48. package/node_modules/@smithy/service-error-classification/dist-cjs/index.js +2 -2
  49. package/node_modules/@smithy/service-error-classification/dist-es/index.js +3 -2
  50. package/node_modules/@smithy/service-error-classification/dist-types/index.d.ts +1 -1
  51. package/node_modules/@smithy/service-error-classification/dist-types/ts3.4/index.d.ts +1 -1
  52. package/node_modules/@smithy/service-error-classification/package.json +2 -2
  53. package/node_modules/@smithy/shared-ini-file-loader/package.json +2 -2
  54. package/node_modules/@smithy/signature-v4/package.json +4 -4
  55. package/node_modules/@smithy/smithy-client/dist-cjs/index.js +22 -34
  56. package/node_modules/@smithy/smithy-client/dist-es/lazy-json.js +22 -31
  57. package/node_modules/@smithy/smithy-client/dist-types/lazy-json.d.ts +34 -15
  58. package/node_modules/@smithy/smithy-client/dist-types/ts3.4/lazy-json.d.ts +34 -15
  59. package/node_modules/@smithy/smithy-client/package.json +7 -7
  60. package/node_modules/@smithy/types/dist-types/shapes.d.ts +1 -0
  61. package/node_modules/@smithy/types/dist-types/ts3.4/shapes.d.ts +1 -0
  62. package/node_modules/@smithy/types/package.json +1 -1
  63. package/node_modules/@smithy/url-parser/package.json +3 -3
  64. package/node_modules/@smithy/util-defaults-mode-browser/package.json +4 -4
  65. package/node_modules/@smithy/util-defaults-mode-node/package.json +7 -7
  66. package/node_modules/@smithy/util-endpoints/package.json +3 -3
  67. package/node_modules/@smithy/util-middleware/package.json +2 -2
  68. package/node_modules/@smithy/util-retry/package.json +3 -3
  69. package/node_modules/@smithy/util-stream/package.json +4 -4
  70. package/node_modules/@smithy/util-waiter/dist-cjs/index.js +31 -4
  71. package/node_modules/@smithy/util-waiter/dist-es/poller.js +30 -4
  72. package/node_modules/@smithy/util-waiter/dist-types/ts3.4/waiter.d.ts +5 -0
  73. package/node_modules/@smithy/util-waiter/dist-types/waiter.d.ts +5 -0
  74. package/node_modules/@smithy/util-waiter/package.json +3 -3
  75. package/package.json +7 -7
@@ -3,6 +3,6 @@
3
3
  * For test spies.
4
4
  */
5
5
  export declare const timing: {
6
- setTimeout: typeof setTimeout;
7
- clearTimeout: typeof clearTimeout;
6
+ setTimeout: (cb: (...ignored: any[]) => void | unknown, ms?: number) => number;
7
+ clearTimeout: (timeoutId: string | number | undefined | unknown) => void;
8
8
  };
@@ -3,6 +3,6 @@
3
3
  * For test spies.
4
4
  */
5
5
  export declare const timing: {
6
- setTimeout: typeof setTimeout;
7
- clearTimeout: typeof clearTimeout;
6
+ setTimeout: (cb: (...ignored: any[]) => void | unknown, ms?: number) => number;
7
+ clearTimeout: (timeoutId: string | number | undefined | unknown) => void;
8
8
  };
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/node-http-handler",
3
- "version": "3.3.1",
3
+ "version": "3.3.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'",
@@ -26,10 +26,10 @@
26
26
  "module": "./dist-es/index.js",
27
27
  "types": "./dist-types/index.d.ts",
28
28
  "dependencies": {
29
- "@smithy/abort-controller": "^3.1.8",
30
- "@smithy/protocol-http": "^4.1.7",
31
- "@smithy/querystring-builder": "^3.0.10",
32
- "@smithy/types": "^3.7.1",
29
+ "@smithy/abort-controller": "^3.1.9",
30
+ "@smithy/protocol-http": "^4.1.8",
31
+ "@smithy/querystring-builder": "^3.0.11",
32
+ "@smithy/types": "^3.7.2",
33
33
  "tslib": "^2.6.2"
34
34
  },
35
35
  "devDependencies": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/property-provider",
3
- "version": "3.1.10",
3
+ "version": "3.1.11",
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",
@@ -23,7 +23,7 @@
23
23
  },
24
24
  "license": "Apache-2.0",
25
25
  "dependencies": {
26
- "@smithy/types": "^3.7.1",
26
+ "@smithy/types": "^3.7.2",
27
27
  "tslib": "^2.6.2"
28
28
  },
29
29
  "engines": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/protocol-http",
3
- "version": "4.1.7",
3
+ "version": "4.1.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 protocol-http",
@@ -24,7 +24,7 @@
24
24
  },
25
25
  "license": "Apache-2.0",
26
26
  "dependencies": {
27
- "@smithy/types": "^3.7.1",
27
+ "@smithy/types": "^3.7.2",
28
28
  "tslib": "^2.6.2"
29
29
  },
30
30
  "engines": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/querystring-builder",
3
- "version": "3.0.10",
3
+ "version": "3.0.11",
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": "^3.7.1",
25
+ "@smithy/types": "^3.7.2",
26
26
  "@smithy/util-uri-escape": "^3.0.0",
27
27
  "tslib": "^2.6.2"
28
28
  },
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/querystring-parser",
3
- "version": "3.0.10",
3
+ "version": "3.0.11",
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",
@@ -23,7 +23,7 @@
23
23
  },
24
24
  "license": "Apache-2.0",
25
25
  "dependencies": {
26
- "@smithy/types": "^3.7.1",
26
+ "@smithy/types": "^3.7.2",
27
27
  "tslib": "^2.6.2"
28
28
  },
29
29
  "engines": {
@@ -70,9 +70,9 @@ var isThrottlingError = /* @__PURE__ */ __name((error) => {
70
70
  var _a, _b;
71
71
  return ((_a = error.$metadata) == null ? void 0 : _a.httpStatusCode) === 429 || THROTTLING_ERROR_CODES.includes(error.name) || ((_b = error.$retryable) == null ? void 0 : _b.throttling) == true;
72
72
  }, "isThrottlingError");
73
- var isTransientError = /* @__PURE__ */ __name((error) => {
73
+ var isTransientError = /* @__PURE__ */ __name((error, depth = 0) => {
74
74
  var _a;
75
- return isClockSkewCorrectedError(error) || TRANSIENT_ERROR_CODES.includes(error.name) || NODEJS_TIMEOUT_ERROR_CODES.includes((error == null ? void 0 : error.code) || "") || TRANSIENT_ERROR_STATUS_CODES.includes(((_a = error.$metadata) == null ? void 0 : _a.httpStatusCode) || 0);
75
+ return isClockSkewCorrectedError(error) || TRANSIENT_ERROR_CODES.includes(error.name) || NODEJS_TIMEOUT_ERROR_CODES.includes((error == null ? void 0 : error.code) || "") || TRANSIENT_ERROR_STATUS_CODES.includes(((_a = error.$metadata) == null ? void 0 : _a.httpStatusCode) || 0) || error.cause !== void 0 && depth <= 10 && isTransientError(error.cause, depth + 1);
76
76
  }, "isTransientError");
77
77
  var isServerError = /* @__PURE__ */ __name((error) => {
78
78
  var _a;
@@ -5,10 +5,11 @@ export const isClockSkewCorrectedError = (error) => error.$metadata?.clockSkewCo
5
5
  export const isThrottlingError = (error) => error.$metadata?.httpStatusCode === 429 ||
6
6
  THROTTLING_ERROR_CODES.includes(error.name) ||
7
7
  error.$retryable?.throttling == true;
8
- export const isTransientError = (error) => isClockSkewCorrectedError(error) ||
8
+ export const isTransientError = (error, depth = 0) => isClockSkewCorrectedError(error) ||
9
9
  TRANSIENT_ERROR_CODES.includes(error.name) ||
10
10
  NODEJS_TIMEOUT_ERROR_CODES.includes(error?.code || "") ||
11
- TRANSIENT_ERROR_STATUS_CODES.includes(error.$metadata?.httpStatusCode || 0);
11
+ TRANSIENT_ERROR_STATUS_CODES.includes(error.$metadata?.httpStatusCode || 0) ||
12
+ (error.cause !== undefined && depth <= 10 && isTransientError(error.cause, depth + 1));
12
13
  export const isServerError = (error) => {
13
14
  if (error.$metadata?.httpStatusCode !== undefined) {
14
15
  const statusCode = error.$metadata.httpStatusCode;
@@ -15,5 +15,5 @@ export declare const isThrottlingError: (error: SdkError) => boolean;
15
15
  * cause where the NodeHttpHandler does not decorate the Error with
16
16
  * the name "TimeoutError" to be checked by the TRANSIENT_ERROR_CODES condition.
17
17
  */
18
- export declare const isTransientError: (error: SdkError) => boolean;
18
+ export declare const isTransientError: (error: SdkError, depth?: number) => boolean;
19
19
  export declare const isServerError: (error: SdkError) => boolean;
@@ -15,5 +15,5 @@ export declare const isThrottlingError: (error: SdkError) => boolean;
15
15
  * cause where the NodeHttpHandler does not decorate the Error with
16
16
  * the name "TimeoutError" to be checked by the TRANSIENT_ERROR_CODES condition.
17
17
  */
18
- export declare const isTransientError: (error: SdkError) => boolean;
18
+ export declare const isTransientError: (error: SdkError, depth?: number) => boolean;
19
19
  export declare const isServerError: (error: SdkError) => boolean;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/service-error-classification",
3
- "version": "3.0.10",
3
+ "version": "3.0.11",
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": "^3.7.1"
57
+ "@smithy/types": "^3.7.2"
58
58
  }
59
59
  }
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@smithy/shared-ini-file-loader",
3
- "version": "3.1.11",
3
+ "version": "3.1.12",
4
4
  "dependencies": {
5
- "@smithy/types": "^3.7.1",
5
+ "@smithy/types": "^3.7.2",
6
6
  "tslib": "^2.6.2"
7
7
  },
8
8
  "devDependencies": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/signature-v4",
3
- "version": "4.2.3",
3
+ "version": "4.2.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",
@@ -26,10 +26,10 @@
26
26
  "license": "Apache-2.0",
27
27
  "dependencies": {
28
28
  "@smithy/is-array-buffer": "^3.0.0",
29
- "@smithy/protocol-http": "^4.1.7",
30
- "@smithy/types": "^3.7.1",
29
+ "@smithy/protocol-http": "^4.1.8",
30
+ "@smithy/types": "^3.7.2",
31
31
  "@smithy/util-hex-encoding": "^3.0.0",
32
- "@smithy/util-middleware": "^3.0.10",
32
+ "@smithy/util-middleware": "^3.0.11",
33
33
  "@smithy/util-uri-escape": "^3.0.0",
34
34
  "@smithy/util-utf8": "^3.0.0",
35
35
  "tslib": "^2.6.2"
@@ -26,7 +26,6 @@ __export(src_exports, {
26
26
  NoOpLogger: () => NoOpLogger,
27
27
  SENSITIVE_STRING: () => SENSITIVE_STRING,
28
28
  ServiceException: () => ServiceException,
29
- StringWrapper: () => StringWrapper,
30
29
  _json: () => _json,
31
30
  collectBody: () => import_protocols.collectBody,
32
31
  convertMap: () => convertMap,
@@ -978,40 +977,30 @@ var isSerializableHeaderValue = /* @__PURE__ */ __name((value) => {
978
977
  }, "isSerializableHeaderValue");
979
978
 
980
979
  // src/lazy-json.ts
981
- var StringWrapper = /* @__PURE__ */ __name(function() {
982
- const Class = Object.getPrototypeOf(this).constructor;
983
- const Constructor = Function.bind.apply(String, [null, ...arguments]);
984
- const instance = new Constructor();
985
- Object.setPrototypeOf(instance, Class.prototype);
986
- return instance;
987
- }, "StringWrapper");
988
- StringWrapper.prototype = Object.create(String.prototype, {
989
- constructor: {
990
- value: StringWrapper,
991
- enumerable: false,
992
- writable: true,
993
- configurable: true
994
- }
995
- });
996
- Object.setPrototypeOf(StringWrapper, String);
997
- var _LazyJsonString = class _LazyJsonString extends StringWrapper {
998
- deserializeJSON() {
999
- return JSON.parse(super.toString());
1000
- }
1001
- toJSON() {
1002
- return super.toString();
1003
- }
1004
- static fromObject(object) {
1005
- if (object instanceof _LazyJsonString) {
1006
- return object;
1007
- } else if (object instanceof String || typeof object === "string") {
1008
- return new _LazyJsonString(object);
980
+ function LazyJsonString(val) {
981
+ const str = Object.assign(new String(val), {
982
+ deserializeJSON() {
983
+ return JSON.parse(String(val));
984
+ },
985
+ toString() {
986
+ return String(val);
987
+ },
988
+ toJSON() {
989
+ return String(val);
1009
990
  }
1010
- return new _LazyJsonString(JSON.stringify(object));
1011
- }
991
+ });
992
+ return str;
993
+ }
994
+ __name(LazyJsonString, "LazyJsonString");
995
+ LazyJsonString.from = (object) => {
996
+ if (object && typeof object === "object" && (object instanceof LazyJsonString || "deserializeJSON" in object)) {
997
+ return object;
998
+ } else if (typeof object === "string" || Object.getPrototypeOf(object) === String.prototype) {
999
+ return LazyJsonString(String(object));
1000
+ }
1001
+ return LazyJsonString(JSON.stringify(object));
1012
1002
  };
1013
- __name(_LazyJsonString, "LazyJsonString");
1014
- var LazyJsonString = _LazyJsonString;
1003
+ LazyJsonString.fromObject = LazyJsonString.from;
1015
1004
 
1016
1005
  // src/NoOpLogger.ts
1017
1006
  var _NoOpLogger = class _NoOpLogger {
@@ -1266,7 +1255,6 @@ var splitHeader = /* @__PURE__ */ __name((value) => {
1266
1255
  getArrayIfSingleItem,
1267
1256
  getValueFromTextNode,
1268
1257
  isSerializableHeaderValue,
1269
- StringWrapper,
1270
1258
  LazyJsonString,
1271
1259
  NoOpLogger,
1272
1260
  map,
@@ -1,33 +1,24 @@
1
- export const StringWrapper = function () {
2
- const Class = Object.getPrototypeOf(this).constructor;
3
- const Constructor = Function.bind.apply(String, [null, ...arguments]);
4
- const instance = new Constructor();
5
- Object.setPrototypeOf(instance, Class.prototype);
6
- return instance;
7
- };
8
- StringWrapper.prototype = Object.create(String.prototype, {
9
- constructor: {
10
- value: StringWrapper,
11
- enumerable: false,
12
- writable: true,
13
- configurable: true,
14
- },
15
- });
16
- Object.setPrototypeOf(StringWrapper, String);
17
- export class LazyJsonString extends StringWrapper {
18
- deserializeJSON() {
19
- return JSON.parse(super.toString());
20
- }
21
- toJSON() {
22
- return super.toString();
1
+ export function LazyJsonString(val) {
2
+ const str = Object.assign(new String(val), {
3
+ deserializeJSON() {
4
+ return JSON.parse(String(val));
5
+ },
6
+ toString() {
7
+ return String(val);
8
+ },
9
+ toJSON() {
10
+ return String(val);
11
+ },
12
+ });
13
+ return str;
14
+ }
15
+ LazyJsonString.from = (object) => {
16
+ if (object && typeof object === "object" && (object instanceof LazyJsonString || "deserializeJSON" in object)) {
17
+ return object;
23
18
  }
24
- static fromObject(object) {
25
- if (object instanceof LazyJsonString) {
26
- return object;
27
- }
28
- else if (object instanceof String || typeof object === "string") {
29
- return new LazyJsonString(object);
30
- }
31
- return new LazyJsonString(JSON.stringify(object));
19
+ else if (typeof object === "string" || Object.getPrototypeOf(object) === String.prototype) {
20
+ return LazyJsonString(String(object));
32
21
  }
33
- }
22
+ return LazyJsonString(JSON.stringify(object));
23
+ };
24
+ LazyJsonString.fromObject = LazyJsonString.from;
@@ -1,24 +1,43 @@
1
1
  /**
2
- * Lazy String holder for JSON typed contents.
3
- */
4
- interface StringWrapper {
5
- new (arg: any): String;
6
- }
7
- /**
8
- * Because of https://github.com/microsoft/tslib/issues/95,
9
- * TS 'extends' shim doesn't support extending native types like String.
10
- * So here we create StringWrapper that duplicate everything from String
11
- * class including its prototype chain. So we can extend from here.
2
+ * @public
12
3
  *
13
- * @internal
4
+ * A model field with this type means that you may provide a JavaScript
5
+ * object in lieu of a JSON string, and it will be serialized to JSON
6
+ * automatically before being sent in a request.
7
+ *
8
+ * For responses, you will receive a "LazyJsonString", which is a boxed String object
9
+ * with additional mixin methods.
10
+ * To get the string value, call `.toString()`, or to get the JSON object value,
11
+ * call `.deserializeJSON()` or parse it yourself.
14
12
  */
15
- export declare const StringWrapper: StringWrapper;
13
+ export type AutomaticJsonStringConversion = Parameters<typeof JSON.stringify>[0] | LazyJsonString;
16
14
  /**
17
15
  * @internal
16
+ *
18
17
  */
19
- export declare class LazyJsonString extends StringWrapper {
18
+ export interface LazyJsonString extends String {
19
+ new (s: string): typeof LazyJsonString;
20
+ /**
21
+ * @returns the JSON parsing of the string value.
22
+ */
20
23
  deserializeJSON(): any;
24
+ /**
25
+ * @returns the original string value rather than a JSON.stringified value.
26
+ */
21
27
  toJSON(): string;
22
- static fromObject(object: any): LazyJsonString;
23
28
  }
24
- export {};
29
+ /**
30
+ * @internal
31
+ *
32
+ * Extension of the native String class in the previous implementation
33
+ * has negative global performance impact on method dispatch for strings,
34
+ * and is generally discouraged.
35
+ *
36
+ * This current implementation may look strange, but is necessary to preserve the interface and
37
+ * behavior of extending the String class.
38
+ */
39
+ export declare function LazyJsonString(val: string): void;
40
+ export declare namespace LazyJsonString {
41
+ var from: (object: any) => LazyJsonString;
42
+ var fromObject: (object: any) => LazyJsonString;
43
+ }
@@ -1,24 +1,43 @@
1
1
  /**
2
- * Lazy String holder for JSON typed contents.
3
- */
4
- interface StringWrapper {
5
- new (arg: any): String;
6
- }
7
- /**
8
- * Because of https://github.com/microsoft/tslib/issues/95,
9
- * TS 'extends' shim doesn't support extending native types like String.
10
- * So here we create StringWrapper that duplicate everything from String
11
- * class including its prototype chain. So we can extend from here.
2
+ * @public
12
3
  *
13
- * @internal
4
+ * A model field with this type means that you may provide a JavaScript
5
+ * object in lieu of a JSON string, and it will be serialized to JSON
6
+ * automatically before being sent in a request.
7
+ *
8
+ * For responses, you will receive a "LazyJsonString", which is a boxed String object
9
+ * with additional mixin methods.
10
+ * To get the string value, call `.toString()`, or to get the JSON object value,
11
+ * call `.deserializeJSON()` or parse it yourself.
14
12
  */
15
- export declare const StringWrapper: StringWrapper;
13
+ export type AutomaticJsonStringConversion = Parameters<typeof JSON.stringify>[0] | LazyJsonString;
16
14
  /**
17
15
  * @internal
16
+ *
18
17
  */
19
- export declare class LazyJsonString extends StringWrapper {
18
+ export interface LazyJsonString extends String {
19
+ new (s: string): typeof LazyJsonString;
20
+ /**
21
+ * @returns the JSON parsing of the string value.
22
+ */
20
23
  deserializeJSON(): any;
24
+ /**
25
+ * @returns the original string value rather than a JSON.stringified value.
26
+ */
21
27
  toJSON(): string;
22
- static fromObject(object: any): LazyJsonString;
23
28
  }
24
- export {};
29
+ /**
30
+ * @internal
31
+ *
32
+ * Extension of the native String class in the previous implementation
33
+ * has negative global performance impact on method dispatch for strings,
34
+ * and is generally discouraged.
35
+ *
36
+ * This current implementation may look strange, but is necessary to preserve the interface and
37
+ * behavior of extending the String class.
38
+ */
39
+ export declare function LazyJsonString(val: string): void;
40
+ export declare namespace LazyJsonString {
41
+ var from: (object: any) => LazyJsonString;
42
+ var fromObject: (object: any) => LazyJsonString;
43
+ }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/smithy-client",
3
- "version": "3.4.5",
3
+ "version": "3.5.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 smithy-client",
@@ -24,12 +24,12 @@
24
24
  },
25
25
  "license": "Apache-2.0",
26
26
  "dependencies": {
27
- "@smithy/core": "^2.5.4",
28
- "@smithy/middleware-endpoint": "^3.2.4",
29
- "@smithy/middleware-stack": "^3.0.10",
30
- "@smithy/protocol-http": "^4.1.7",
31
- "@smithy/types": "^3.7.1",
32
- "@smithy/util-stream": "^3.3.1",
27
+ "@smithy/core": "^2.5.5",
28
+ "@smithy/middleware-endpoint": "^3.2.5",
29
+ "@smithy/middleware-stack": "^3.0.11",
30
+ "@smithy/protocol-http": "^4.1.8",
31
+ "@smithy/types": "^3.7.2",
32
+ "@smithy/util-stream": "^3.3.2",
33
33
  "tslib": "^2.6.2"
34
34
  },
35
35
  "engines": {
@@ -78,4 +78,5 @@ export type SdkError = Error & Partial<SmithyException> & Partial<MetadataBearer
78
78
  */
79
79
  readonly clockSkewCorrected?: true;
80
80
  };
81
+ cause?: Error;
81
82
  };
@@ -78,4 +78,5 @@ export type SdkError = Error & Partial<SmithyException> & Partial<MetadataBearer
78
78
  */
79
79
  readonly clockSkewCorrected?: true;
80
80
  };
81
+ cause?: Error;
81
82
  };
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/types",
3
- "version": "3.7.1",
3
+ "version": "3.7.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 types",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/url-parser",
3
- "version": "3.0.10",
3
+ "version": "3.0.11",
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",
@@ -23,8 +23,8 @@
23
23
  },
24
24
  "license": "Apache-2.0",
25
25
  "dependencies": {
26
- "@smithy/querystring-parser": "^3.0.10",
27
- "@smithy/types": "^3.7.1",
26
+ "@smithy/querystring-parser": "^3.0.11",
27
+ "@smithy/types": "^3.7.2",
28
28
  "tslib": "^2.6.2"
29
29
  },
30
30
  "typesVersions": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/util-defaults-mode-browser",
3
- "version": "3.0.28",
3
+ "version": "3.0.30",
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",
@@ -23,9 +23,9 @@
23
23
  },
24
24
  "license": "Apache-2.0",
25
25
  "dependencies": {
26
- "@smithy/property-provider": "^3.1.10",
27
- "@smithy/smithy-client": "^3.4.5",
28
- "@smithy/types": "^3.7.1",
26
+ "@smithy/property-provider": "^3.1.11",
27
+ "@smithy/smithy-client": "^3.5.0",
28
+ "@smithy/types": "^3.7.2",
29
29
  "bowser": "^2.11.0",
30
30
  "tslib": "^2.6.2"
31
31
  },
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/util-defaults-mode-node",
3
- "version": "3.0.28",
3
+ "version": "3.0.30",
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",
@@ -23,12 +23,12 @@
23
23
  },
24
24
  "license": "Apache-2.0",
25
25
  "dependencies": {
26
- "@smithy/config-resolver": "^3.0.12",
27
- "@smithy/credential-provider-imds": "^3.2.7",
28
- "@smithy/node-config-provider": "^3.1.11",
29
- "@smithy/property-provider": "^3.1.10",
30
- "@smithy/smithy-client": "^3.4.5",
31
- "@smithy/types": "^3.7.1",
26
+ "@smithy/config-resolver": "^3.0.13",
27
+ "@smithy/credential-provider-imds": "^3.2.8",
28
+ "@smithy/node-config-provider": "^3.1.12",
29
+ "@smithy/property-provider": "^3.1.11",
30
+ "@smithy/smithy-client": "^3.5.0",
31
+ "@smithy/types": "^3.7.2",
32
32
  "tslib": "^2.6.2"
33
33
  },
34
34
  "devDependencies": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/util-endpoints",
3
- "version": "2.1.6",
3
+ "version": "2.1.7",
4
4
  "description": "Utilities to help with endpoint resolution.",
5
5
  "main": "./dist-cjs/index.js",
6
6
  "module": "./dist-es/index.js",
@@ -28,8 +28,8 @@
28
28
  },
29
29
  "license": "Apache-2.0",
30
30
  "dependencies": {
31
- "@smithy/node-config-provider": "^3.1.11",
32
- "@smithy/types": "^3.7.1",
31
+ "@smithy/node-config-provider": "^3.1.12",
32
+ "@smithy/types": "^3.7.2",
33
33
  "tslib": "^2.6.2"
34
34
  },
35
35
  "devDependencies": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/util-middleware",
3
- "version": "3.0.10",
3
+ "version": "3.0.11",
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
  },
28
28
  "license": "Apache-2.0",
29
29
  "dependencies": {
30
- "@smithy/types": "^3.7.1",
30
+ "@smithy/types": "^3.7.2",
31
31
  "tslib": "^2.6.2"
32
32
  },
33
33
  "devDependencies": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/util-retry",
3
- "version": "3.0.10",
3
+ "version": "3.0.11",
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",
@@ -28,8 +28,8 @@
28
28
  },
29
29
  "license": "Apache-2.0",
30
30
  "dependencies": {
31
- "@smithy/service-error-classification": "^3.0.10",
32
- "@smithy/types": "^3.7.1",
31
+ "@smithy/service-error-classification": "^3.0.11",
32
+ "@smithy/types": "^3.7.2",
33
33
  "tslib": "^2.6.2"
34
34
  },
35
35
  "devDependencies": {