@aws-sdk/client-cloudwatch 3.1068.0 → 3.1070.0

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.
@@ -1,12 +1,8 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CloudWatchServiceException = exports.__ServiceException = void 0;
4
- const client_1 = require("@smithy/core/client");
5
- Object.defineProperty(exports, "__ServiceException", { enumerable: true, get: function () { return client_1.ServiceException; } });
6
- class CloudWatchServiceException extends client_1.ServiceException {
1
+ const { ServiceException: __ServiceException } = require("@smithy/core/client");
2
+ exports.__ServiceException = __ServiceException;
3
+ exports.CloudWatchServiceException = class CloudWatchServiceException extends __ServiceException {
7
4
  constructor(options) {
8
5
  super(options);
9
6
  Object.setPrototypeOf(this, CloudWatchServiceException.prototype);
10
7
  }
11
- }
12
- exports.CloudWatchServiceException = CloudWatchServiceException;
8
+ };
@@ -1,8 +1,5 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.InvalidFormatFault = exports.LimitExceededFault = exports.LimitExceededException = exports.InvalidNextToken = exports.MissingRequiredParameterException = exports.InvalidParameterValueException = exports.InvalidParameterCombinationException = exports.InternalServiceFault = exports.ResourceNotFound = exports.DashboardNotFoundError = exports.DashboardInvalidInputError = exports.ConcurrentModificationException = exports.ResourceNotFoundException = exports.KmsKeyNotFoundException = exports.KmsKeyDisabledException = exports.KmsAccessDeniedException = exports.ConflictException = void 0;
4
- const CloudWatchServiceException_1 = require("./CloudWatchServiceException");
5
- class ConflictException extends CloudWatchServiceException_1.CloudWatchServiceException {
1
+ const { CloudWatchServiceException: __BaseException } = require("./CloudWatchServiceException");
2
+ exports.ConflictException = class ConflictException extends __BaseException {
6
3
  name = "ConflictException";
7
4
  $fault = "client";
8
5
  Message;
@@ -15,9 +12,8 @@ class ConflictException extends CloudWatchServiceException_1.CloudWatchServiceEx
15
12
  Object.setPrototypeOf(this, ConflictException.prototype);
16
13
  this.Message = opts.Message;
17
14
  }
18
- }
19
- exports.ConflictException = ConflictException;
20
- class KmsAccessDeniedException extends CloudWatchServiceException_1.CloudWatchServiceException {
15
+ };
16
+ exports.KmsAccessDeniedException = class KmsAccessDeniedException extends __BaseException {
21
17
  name = "KmsAccessDeniedException";
22
18
  $fault = "client";
23
19
  Message;
@@ -30,9 +26,8 @@ class KmsAccessDeniedException extends CloudWatchServiceException_1.CloudWatchSe
30
26
  Object.setPrototypeOf(this, KmsAccessDeniedException.prototype);
31
27
  this.Message = opts.Message;
32
28
  }
33
- }
34
- exports.KmsAccessDeniedException = KmsAccessDeniedException;
35
- class KmsKeyDisabledException extends CloudWatchServiceException_1.CloudWatchServiceException {
29
+ };
30
+ exports.KmsKeyDisabledException = class KmsKeyDisabledException extends __BaseException {
36
31
  name = "KmsKeyDisabledException";
37
32
  $fault = "client";
38
33
  Message;
@@ -45,9 +40,8 @@ class KmsKeyDisabledException extends CloudWatchServiceException_1.CloudWatchSer
45
40
  Object.setPrototypeOf(this, KmsKeyDisabledException.prototype);
46
41
  this.Message = opts.Message;
47
42
  }
48
- }
49
- exports.KmsKeyDisabledException = KmsKeyDisabledException;
50
- class KmsKeyNotFoundException extends CloudWatchServiceException_1.CloudWatchServiceException {
43
+ };
44
+ exports.KmsKeyNotFoundException = class KmsKeyNotFoundException extends __BaseException {
51
45
  name = "KmsKeyNotFoundException";
52
46
  $fault = "client";
53
47
  Message;
@@ -60,9 +54,8 @@ class KmsKeyNotFoundException extends CloudWatchServiceException_1.CloudWatchSer
60
54
  Object.setPrototypeOf(this, KmsKeyNotFoundException.prototype);
61
55
  this.Message = opts.Message;
62
56
  }
63
- }
64
- exports.KmsKeyNotFoundException = KmsKeyNotFoundException;
65
- class ResourceNotFoundException extends CloudWatchServiceException_1.CloudWatchServiceException {
57
+ };
58
+ exports.ResourceNotFoundException = class ResourceNotFoundException extends __BaseException {
66
59
  name = "ResourceNotFoundException";
67
60
  $fault = "client";
68
61
  ResourceType;
@@ -79,9 +72,8 @@ class ResourceNotFoundException extends CloudWatchServiceException_1.CloudWatchS
79
72
  this.ResourceId = opts.ResourceId;
80
73
  this.Message = opts.Message;
81
74
  }
82
- }
83
- exports.ResourceNotFoundException = ResourceNotFoundException;
84
- class ConcurrentModificationException extends CloudWatchServiceException_1.CloudWatchServiceException {
75
+ };
76
+ exports.ConcurrentModificationException = class ConcurrentModificationException extends __BaseException {
85
77
  name = "ConcurrentModificationException";
86
78
  $fault = "client";
87
79
  Message;
@@ -94,9 +86,8 @@ class ConcurrentModificationException extends CloudWatchServiceException_1.Cloud
94
86
  Object.setPrototypeOf(this, ConcurrentModificationException.prototype);
95
87
  this.Message = opts.Message;
96
88
  }
97
- }
98
- exports.ConcurrentModificationException = ConcurrentModificationException;
99
- class DashboardInvalidInputError extends CloudWatchServiceException_1.CloudWatchServiceException {
89
+ };
90
+ exports.DashboardInvalidInputError = class DashboardInvalidInputError extends __BaseException {
100
91
  name = "DashboardInvalidInputError";
101
92
  $fault = "client";
102
93
  dashboardValidationMessages;
@@ -109,9 +100,8 @@ class DashboardInvalidInputError extends CloudWatchServiceException_1.CloudWatch
109
100
  Object.setPrototypeOf(this, DashboardInvalidInputError.prototype);
110
101
  this.dashboardValidationMessages = opts.dashboardValidationMessages;
111
102
  }
112
- }
113
- exports.DashboardInvalidInputError = DashboardInvalidInputError;
114
- class DashboardNotFoundError extends CloudWatchServiceException_1.CloudWatchServiceException {
103
+ };
104
+ exports.DashboardNotFoundError = class DashboardNotFoundError extends __BaseException {
115
105
  name = "DashboardNotFoundError";
116
106
  $fault = "client";
117
107
  constructor(opts) {
@@ -122,9 +112,8 @@ class DashboardNotFoundError extends CloudWatchServiceException_1.CloudWatchServ
122
112
  });
123
113
  Object.setPrototypeOf(this, DashboardNotFoundError.prototype);
124
114
  }
125
- }
126
- exports.DashboardNotFoundError = DashboardNotFoundError;
127
- class ResourceNotFound extends CloudWatchServiceException_1.CloudWatchServiceException {
115
+ };
116
+ exports.ResourceNotFound = class ResourceNotFound extends __BaseException {
128
117
  name = "ResourceNotFound";
129
118
  $fault = "client";
130
119
  constructor(opts) {
@@ -135,9 +124,8 @@ class ResourceNotFound extends CloudWatchServiceException_1.CloudWatchServiceExc
135
124
  });
136
125
  Object.setPrototypeOf(this, ResourceNotFound.prototype);
137
126
  }
138
- }
139
- exports.ResourceNotFound = ResourceNotFound;
140
- class InternalServiceFault extends CloudWatchServiceException_1.CloudWatchServiceException {
127
+ };
128
+ exports.InternalServiceFault = class InternalServiceFault extends __BaseException {
141
129
  name = "InternalServiceFault";
142
130
  $fault = "server";
143
131
  Message;
@@ -150,9 +138,8 @@ class InternalServiceFault extends CloudWatchServiceException_1.CloudWatchServic
150
138
  Object.setPrototypeOf(this, InternalServiceFault.prototype);
151
139
  this.Message = opts.Message;
152
140
  }
153
- }
154
- exports.InternalServiceFault = InternalServiceFault;
155
- class InvalidParameterCombinationException extends CloudWatchServiceException_1.CloudWatchServiceException {
141
+ };
142
+ exports.InvalidParameterCombinationException = class InvalidParameterCombinationException extends __BaseException {
156
143
  name = "InvalidParameterCombinationException";
157
144
  $fault = "client";
158
145
  constructor(opts) {
@@ -163,9 +150,8 @@ class InvalidParameterCombinationException extends CloudWatchServiceException_1.
163
150
  });
164
151
  Object.setPrototypeOf(this, InvalidParameterCombinationException.prototype);
165
152
  }
166
- }
167
- exports.InvalidParameterCombinationException = InvalidParameterCombinationException;
168
- class InvalidParameterValueException extends CloudWatchServiceException_1.CloudWatchServiceException {
153
+ };
154
+ exports.InvalidParameterValueException = class InvalidParameterValueException extends __BaseException {
169
155
  name = "InvalidParameterValueException";
170
156
  $fault = "client";
171
157
  constructor(opts) {
@@ -176,9 +162,8 @@ class InvalidParameterValueException extends CloudWatchServiceException_1.CloudW
176
162
  });
177
163
  Object.setPrototypeOf(this, InvalidParameterValueException.prototype);
178
164
  }
179
- }
180
- exports.InvalidParameterValueException = InvalidParameterValueException;
181
- class MissingRequiredParameterException extends CloudWatchServiceException_1.CloudWatchServiceException {
165
+ };
166
+ exports.MissingRequiredParameterException = class MissingRequiredParameterException extends __BaseException {
182
167
  name = "MissingRequiredParameterException";
183
168
  $fault = "client";
184
169
  constructor(opts) {
@@ -189,9 +174,8 @@ class MissingRequiredParameterException extends CloudWatchServiceException_1.Clo
189
174
  });
190
175
  Object.setPrototypeOf(this, MissingRequiredParameterException.prototype);
191
176
  }
192
- }
193
- exports.MissingRequiredParameterException = MissingRequiredParameterException;
194
- class InvalidNextToken extends CloudWatchServiceException_1.CloudWatchServiceException {
177
+ };
178
+ exports.InvalidNextToken = class InvalidNextToken extends __BaseException {
195
179
  name = "InvalidNextToken";
196
180
  $fault = "client";
197
181
  constructor(opts) {
@@ -202,9 +186,8 @@ class InvalidNextToken extends CloudWatchServiceException_1.CloudWatchServiceExc
202
186
  });
203
187
  Object.setPrototypeOf(this, InvalidNextToken.prototype);
204
188
  }
205
- }
206
- exports.InvalidNextToken = InvalidNextToken;
207
- class LimitExceededException extends CloudWatchServiceException_1.CloudWatchServiceException {
189
+ };
190
+ exports.LimitExceededException = class LimitExceededException extends __BaseException {
208
191
  name = "LimitExceededException";
209
192
  $fault = "client";
210
193
  Message;
@@ -217,9 +200,8 @@ class LimitExceededException extends CloudWatchServiceException_1.CloudWatchServ
217
200
  Object.setPrototypeOf(this, LimitExceededException.prototype);
218
201
  this.Message = opts.Message;
219
202
  }
220
- }
221
- exports.LimitExceededException = LimitExceededException;
222
- class LimitExceededFault extends CloudWatchServiceException_1.CloudWatchServiceException {
203
+ };
204
+ exports.LimitExceededFault = class LimitExceededFault extends __BaseException {
223
205
  name = "LimitExceededFault";
224
206
  $fault = "client";
225
207
  constructor(opts) {
@@ -230,9 +212,8 @@ class LimitExceededFault extends CloudWatchServiceException_1.CloudWatchServiceE
230
212
  });
231
213
  Object.setPrototypeOf(this, LimitExceededFault.prototype);
232
214
  }
233
- }
234
- exports.LimitExceededFault = LimitExceededFault;
235
- class InvalidFormatFault extends CloudWatchServiceException_1.CloudWatchServiceException {
215
+ };
216
+ exports.InvalidFormatFault = class InvalidFormatFault extends __BaseException {
236
217
  name = "InvalidFormatFault";
237
218
  $fault = "client";
238
219
  constructor(opts) {
@@ -243,5 +224,4 @@ class InvalidFormatFault extends CloudWatchServiceException_1.CloudWatchServiceE
243
224
  });
244
225
  Object.setPrototypeOf(this, InvalidFormatFault.prototype);
245
226
  }
246
- }
247
- exports.InvalidFormatFault = InvalidFormatFault;
227
+ };
@@ -1,39 +1,35 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getRuntimeConfig = void 0;
4
- const tslib_1 = require("tslib");
5
- const package_json_1 = tslib_1.__importDefault(require("../package.json"));
6
- const sha256_browser_1 = require("@aws-crypto/sha256-browser");
7
- const client_1 = require("@aws-sdk/core/client");
8
- const client_2 = require("@smithy/core/client");
9
- const config_1 = require("@smithy/core/config");
10
- const retry_1 = require("@smithy/core/retry");
11
- const serde_1 = require("@smithy/core/serde");
12
- const fetch_http_handler_1 = require("@smithy/fetch-http-handler");
13
- const middleware_compression_1 = require("@smithy/middleware-compression");
14
- const runtimeConfig_shared_1 = require("./runtimeConfig.shared");
1
+ const packageInfo = require("../package.json");
2
+ const { Sha256 } = require("@aws-crypto/sha256-browser");
3
+ const { createDefaultUserAgentProvider } = require("@aws-sdk/core/client");
4
+ const { invalidProvider, loadConfigsForDefaultMode } = require("@smithy/core/client");
5
+ const { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT, resolveDefaultsModeConfig } = require("@smithy/core/config");
6
+ const { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } = require("@smithy/core/retry");
7
+ const { calculateBodyLength } = require("@smithy/core/serde");
8
+ const { FetchHttpHandler: RequestHandler, streamCollector } = require("@smithy/fetch-http-handler");
9
+ const { DEFAULT_DISABLE_REQUEST_COMPRESSION, DEFAULT_NODE_REQUEST_MIN_COMPRESSION_SIZE_BYTES } = require("@smithy/middleware-compression");
10
+ const { getRuntimeConfig: getSharedRuntimeConfig } = require("./runtimeConfig.shared");
15
11
  const getRuntimeConfig = (config) => {
16
- const defaultsMode = (0, config_1.resolveDefaultsModeConfig)(config);
17
- const defaultConfigProvider = () => defaultsMode().then(client_2.loadConfigsForDefaultMode);
18
- const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);
12
+ const defaultsMode = resolveDefaultsModeConfig(config);
13
+ const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
14
+ const clientSharedValues = getSharedRuntimeConfig(config);
19
15
  return {
20
16
  ...clientSharedValues,
21
17
  ...config,
22
18
  runtime: "browser",
23
19
  defaultsMode,
24
- bodyLengthChecker: config?.bodyLengthChecker ?? serde_1.calculateBodyLength,
20
+ bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
25
21
  credentialDefaultProvider: config?.credentialDefaultProvider ?? ((_) => () => Promise.reject(new Error("Credential is missing"))),
26
- defaultUserAgentProvider: config?.defaultUserAgentProvider ?? (0, client_1.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
27
- disableRequestCompression: config?.disableRequestCompression ?? middleware_compression_1.DEFAULT_DISABLE_REQUEST_COMPRESSION,
28
- maxAttempts: config?.maxAttempts ?? retry_1.DEFAULT_MAX_ATTEMPTS,
29
- region: config?.region ?? (0, client_2.invalidProvider)("Region is missing"),
30
- requestHandler: fetch_http_handler_1.FetchHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
31
- requestMinCompressionSizeBytes: config?.requestMinCompressionSizeBytes ?? middleware_compression_1.DEFAULT_NODE_REQUEST_MIN_COMPRESSION_SIZE_BYTES,
32
- retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || retry_1.DEFAULT_RETRY_MODE),
33
- sha256: config?.sha256 ?? sha256_browser_1.Sha256,
34
- streamCollector: config?.streamCollector ?? fetch_http_handler_1.streamCollector,
35
- useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(config_1.DEFAULT_USE_DUALSTACK_ENDPOINT)),
36
- useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(config_1.DEFAULT_USE_FIPS_ENDPOINT)),
22
+ defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
23
+ disableRequestCompression: config?.disableRequestCompression ?? DEFAULT_DISABLE_REQUEST_COMPRESSION,
24
+ maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS,
25
+ region: config?.region ?? invalidProvider("Region is missing"),
26
+ requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
27
+ requestMinCompressionSizeBytes: config?.requestMinCompressionSizeBytes ?? DEFAULT_NODE_REQUEST_MIN_COMPRESSION_SIZE_BYTES,
28
+ retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE),
29
+ sha256: config?.sha256 ?? Sha256,
30
+ streamCollector: config?.streamCollector ?? streamCollector,
31
+ useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)),
32
+ useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)),
37
33
  };
38
34
  };
39
35
  exports.getRuntimeConfig = getRuntimeConfig;
@@ -1,24 +1,20 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getRuntimeConfig = void 0;
4
- const tslib_1 = require("tslib");
5
- const package_json_1 = tslib_1.__importDefault(require("../package.json"));
6
- const client_1 = require("@aws-sdk/core/client");
7
- const httpAuthSchemes_1 = require("@aws-sdk/core/httpAuthSchemes");
8
- const credential_provider_node_1 = require("@aws-sdk/credential-provider-node");
9
- const client_2 = require("@smithy/core/client");
10
- const config_1 = require("@smithy/core/config");
11
- const retry_1 = require("@smithy/core/retry");
12
- const serde_1 = require("@smithy/core/serde");
13
- const middleware_compression_1 = require("@smithy/middleware-compression");
14
- const node_http_handler_1 = require("@smithy/node-http-handler");
15
- const runtimeConfig_shared_1 = require("./runtimeConfig.shared");
1
+ const packageInfo = require("../package.json");
2
+ const { createDefaultUserAgentProvider, emitWarningIfUnsupportedVersion: awsCheckVersion, NODE_APP_ID_CONFIG_OPTIONS } = require("@aws-sdk/core/client");
3
+ const { NODE_AUTH_SCHEME_PREFERENCE_OPTIONS } = require("@aws-sdk/core/httpAuthSchemes");
4
+ const { defaultProvider: credentialDefaultProvider } = require("@aws-sdk/credential-provider-node");
5
+ const { emitWarningIfUnsupportedVersion, loadConfigsForDefaultMode } = require("@smithy/core/client");
6
+ const { loadConfig: loadNodeConfig, NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, resolveDefaultsModeConfig } = require("@smithy/core/config");
7
+ const { DEFAULT_RETRY_MODE, NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } = require("@smithy/core/retry");
8
+ const { calculateBodyLength, Hash } = require("@smithy/core/serde");
9
+ const { NODE_DISABLE_REQUEST_COMPRESSION_CONFIG_OPTIONS, NODE_REQUEST_MIN_COMPRESSION_SIZE_BYTES_CONFIG_OPTIONS } = require("@smithy/middleware-compression");
10
+ const { NodeHttpHandler: RequestHandler, streamCollector } = require("@smithy/node-http-handler");
11
+ const { getRuntimeConfig: getSharedRuntimeConfig } = require("./runtimeConfig.shared");
16
12
  const getRuntimeConfig = (config) => {
17
- (0, client_2.emitWarningIfUnsupportedVersion)(process.version);
18
- const defaultsMode = (0, config_1.resolveDefaultsModeConfig)(config);
19
- const defaultConfigProvider = () => defaultsMode().then(client_2.loadConfigsForDefaultMode);
20
- const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);
21
- (0, client_1.emitWarningIfUnsupportedVersion)(process.version);
13
+ emitWarningIfUnsupportedVersion(process.version);
14
+ const defaultsMode = resolveDefaultsModeConfig(config);
15
+ const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
16
+ const clientSharedValues = getSharedRuntimeConfig(config);
17
+ awsCheckVersion(process.version);
22
18
  const loaderConfig = {
23
19
  profile: config?.profile,
24
20
  logger: clientSharedValues.logger,
@@ -28,25 +24,25 @@ const getRuntimeConfig = (config) => {
28
24
  ...config,
29
25
  runtime: "node",
30
26
  defaultsMode,
31
- authSchemePreference: config?.authSchemePreference ?? (0, config_1.loadConfig)(httpAuthSchemes_1.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
32
- bodyLengthChecker: config?.bodyLengthChecker ?? serde_1.calculateBodyLength,
33
- credentialDefaultProvider: config?.credentialDefaultProvider ?? credential_provider_node_1.defaultProvider,
34
- defaultUserAgentProvider: config?.defaultUserAgentProvider ?? (0, client_1.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
35
- disableRequestCompression: config?.disableRequestCompression ?? (0, config_1.loadConfig)(middleware_compression_1.NODE_DISABLE_REQUEST_COMPRESSION_CONFIG_OPTIONS, config),
36
- maxAttempts: config?.maxAttempts ?? (0, config_1.loadConfig)(retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
37
- region: config?.region ?? (0, config_1.loadConfig)(config_1.NODE_REGION_CONFIG_OPTIONS, { ...config_1.NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
38
- requestHandler: node_http_handler_1.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
39
- requestMinCompressionSizeBytes: config?.requestMinCompressionSizeBytes ?? (0, config_1.loadConfig)(middleware_compression_1.NODE_REQUEST_MIN_COMPRESSION_SIZE_BYTES_CONFIG_OPTIONS, config),
27
+ authSchemePreference: config?.authSchemePreference ?? loadNodeConfig(NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
28
+ bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
29
+ credentialDefaultProvider: config?.credentialDefaultProvider ?? credentialDefaultProvider,
30
+ defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
31
+ disableRequestCompression: config?.disableRequestCompression ?? loadNodeConfig(NODE_DISABLE_REQUEST_COMPRESSION_CONFIG_OPTIONS, config),
32
+ maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
33
+ region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, { ...NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
34
+ requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
35
+ requestMinCompressionSizeBytes: config?.requestMinCompressionSizeBytes ?? loadNodeConfig(NODE_REQUEST_MIN_COMPRESSION_SIZE_BYTES_CONFIG_OPTIONS, config),
40
36
  retryMode: config?.retryMode ??
41
- (0, config_1.loadConfig)({
42
- ...retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS,
43
- default: async () => (await defaultConfigProvider()).retryMode || retry_1.DEFAULT_RETRY_MODE,
37
+ loadNodeConfig({
38
+ ...NODE_RETRY_MODE_CONFIG_OPTIONS,
39
+ default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE,
44
40
  }, config),
45
- sha256: config?.sha256 ?? serde_1.Hash.bind(null, "sha256"),
46
- streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector,
47
- useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, config_1.loadConfig)(config_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
48
- useFipsEndpoint: config?.useFipsEndpoint ?? (0, config_1.loadConfig)(config_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
49
- userAgentAppId: config?.userAgentAppId ?? (0, config_1.loadConfig)(client_1.NODE_APP_ID_CONFIG_OPTIONS, loaderConfig),
41
+ sha256: config?.sha256 ?? Hash.bind(null, "sha256"),
42
+ streamCollector: config?.streamCollector ?? streamCollector,
43
+ useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
44
+ useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
45
+ userAgentAppId: config?.userAgentAppId ?? loadNodeConfig(NODE_APP_ID_CONFIG_OPTIONS, loaderConfig),
50
46
  };
51
47
  };
52
48
  exports.getRuntimeConfig = getRuntimeConfig;
@@ -1,15 +1,12 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getRuntimeConfig = void 0;
4
- const sha256_js_1 = require("@aws-crypto/sha256-js");
5
- const runtimeConfig_browser_1 = require("./runtimeConfig.browser");
1
+ const { Sha256 } = require("@aws-crypto/sha256-js");
2
+ const { getRuntimeConfig: getBrowserRuntimeConfig } = require("./runtimeConfig.browser");
6
3
  const getRuntimeConfig = (config) => {
7
- const browserDefaults = (0, runtimeConfig_browser_1.getRuntimeConfig)(config);
4
+ const browserDefaults = getBrowserRuntimeConfig(config);
8
5
  return {
9
6
  ...browserDefaults,
10
7
  ...config,
11
8
  runtime: "react-native",
12
- sha256: config?.sha256 ?? sha256_js_1.Sha256,
9
+ sha256: config?.sha256 ?? Sha256,
13
10
  };
14
11
  };
15
12
  exports.getRuntimeConfig = getRuntimeConfig;
@@ -1,44 +1,40 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getRuntimeConfig = void 0;
4
- const httpAuthSchemes_1 = require("@aws-sdk/core/httpAuthSchemes");
5
- const protocols_1 = require("@aws-sdk/core/protocols");
6
- const client_1 = require("@smithy/core/client");
7
- const protocols_2 = require("@smithy/core/protocols");
8
- const serde_1 = require("@smithy/core/serde");
9
- const httpAuthSchemeProvider_1 = require("./auth/httpAuthSchemeProvider");
10
- const endpointResolver_1 = require("./endpoint/endpointResolver");
11
- const schemas_0_1 = require("./schemas/schemas_0");
12
- const getRuntimeConfig = (config) => {
1
+ const { AwsSdkSigV4Signer } = require("@aws-sdk/core/httpAuthSchemes");
2
+ const { AwsJson1_0Protocol } = require("@aws-sdk/core/protocols");
3
+ const { NoOpLogger } = require("@smithy/core/client");
4
+ const { parseUrl } = require("@smithy/core/protocols");
5
+ const { fromBase64, fromUtf8, toBase64, toUtf8 } = require("@smithy/core/serde");
6
+ const { defaultCloudWatchHttpAuthSchemeProvider } = require("./auth/httpAuthSchemeProvider");
7
+ const { defaultEndpointResolver } = require("./endpoint/endpointResolver");
8
+ const { errorTypeRegistries } = require("./schemas/schemas_0");
9
+ exports.getRuntimeConfig = (config) => {
13
10
  return {
14
11
  apiVersion: "2010-08-01",
15
- base64Decoder: config?.base64Decoder ?? serde_1.fromBase64,
16
- base64Encoder: config?.base64Encoder ?? serde_1.toBase64,
12
+ base64Decoder: config?.base64Decoder ?? fromBase64,
13
+ base64Encoder: config?.base64Encoder ?? toBase64,
17
14
  disableHostPrefix: config?.disableHostPrefix ?? false,
18
- endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver,
15
+ endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,
19
16
  extensions: config?.extensions ?? [],
20
- httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? httpAuthSchemeProvider_1.defaultCloudWatchHttpAuthSchemeProvider,
17
+ httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultCloudWatchHttpAuthSchemeProvider,
21
18
  httpAuthSchemes: config?.httpAuthSchemes ?? [
22
19
  {
23
20
  schemeId: "aws.auth#sigv4",
24
21
  identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
25
- signer: new httpAuthSchemes_1.AwsSdkSigV4Signer(),
22
+ signer: new AwsSdkSigV4Signer(),
26
23
  },
27
24
  ],
28
- logger: config?.logger ?? new client_1.NoOpLogger(),
29
- protocol: config?.protocol ?? protocols_1.AwsJson1_0Protocol,
25
+ logger: config?.logger ?? new NoOpLogger(),
26
+ protocol: config?.protocol ?? AwsJson1_0Protocol,
30
27
  protocolSettings: config?.protocolSettings ?? {
31
28
  defaultNamespace: "com.amazonaws.cloudwatch",
32
- errorTypeRegistries: schemas_0_1.errorTypeRegistries,
29
+ errorTypeRegistries,
33
30
  xmlNamespace: "http://monitoring.amazonaws.com/doc/2010-08-01/",
34
31
  version: "2010-08-01",
35
32
  serviceTarget: "GraniteServiceVersion20100801",
36
33
  awsQueryCompatible: true,
37
34
  },
38
35
  serviceId: config?.serviceId ?? "CloudWatch",
39
- urlParser: config?.urlParser ?? protocols_2.parseUrl,
40
- utf8Decoder: config?.utf8Decoder ?? serde_1.fromUtf8,
41
- utf8Encoder: config?.utf8Encoder ?? serde_1.toUtf8,
36
+ urlParser: config?.urlParser ?? parseUrl,
37
+ utf8Decoder: config?.utf8Decoder ?? fromUtf8,
38
+ utf8Encoder: config?.utf8Encoder ?? toUtf8,
42
39
  };
43
40
  };
44
- exports.getRuntimeConfig = getRuntimeConfig;