@monolayer/sdk 1.2.5 → 1.3.0-canary.2

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 (47) hide show
  1. package/dist/bin/chunk-2DM36AIF.js +60 -0
  2. package/dist/bin/chunk-3TV5KLB7.js +105 -0
  3. package/dist/bin/chunk-54HDPH52.js +116 -0
  4. package/dist/bin/chunk-AKHG66MJ.js +2359 -0
  5. package/dist/bin/chunk-ASIK3ESJ.js +37 -0
  6. package/dist/bin/chunk-AV7FB56K.js +14 -0
  7. package/dist/bin/chunk-D6MRFOU6.js +62 -0
  8. package/dist/bin/chunk-DQ2PXUF5.js +44 -0
  9. package/dist/bin/chunk-GE4ESXBP.js +57 -0
  10. package/dist/bin/chunk-K4XCYO2X.js +1637 -0
  11. package/dist/bin/chunk-KHQQRHZY.js +969 -0
  12. package/dist/bin/chunk-KSHJCBUY.js +938 -0
  13. package/dist/bin/chunk-KW25ZB6Z.js +14 -0
  14. package/dist/bin/chunk-SYAMBCRY.js +54 -0
  15. package/dist/bin/chunk-T4MZMT2A.js +122 -0
  16. package/dist/bin/chunk-U43L2J36.js +1875 -0
  17. package/dist/bin/chunk-UKX3KEC2.js +37 -0
  18. package/dist/bin/chunk-X7GJVU6X.js +182 -0
  19. package/dist/bin/cli.js +23 -61
  20. package/dist/bin/dist-es-4LCK4BMD.js +81 -0
  21. package/dist/bin/dist-es-4ULGGWP4.js +361 -0
  22. package/dist/bin/dist-es-7BYCFULM.js +7 -0
  23. package/dist/bin/dist-es-A2JHLMIV.js +154 -0
  24. package/dist/bin/dist-es-AWY666YH.js +292 -0
  25. package/dist/bin/dist-es-KUMQWKJB.js +194 -0
  26. package/dist/bin/dist-es-TNZXIBKF.js +292 -0
  27. package/dist/bin/dist-es-TV7F3ZAE.js +7 -0
  28. package/dist/bin/dist-es-XD3WAN5D.js +154 -0
  29. package/dist/bin/dist-es-YGJKPYIO.js +81 -0
  30. package/dist/bin/dist-es-YYROUSP5.js +62 -0
  31. package/dist/bin/dist-es-ZOY57CKU.js +62 -0
  32. package/dist/bin/dist-es-ZVXNFAFI.js +194 -0
  33. package/dist/bin/esm-ID5USS7G.js +4773 -0
  34. package/dist/bin/loadSso-55OGDGPY.js +484 -0
  35. package/dist/bin/loadSso-UYOIOSOA.js +480 -0
  36. package/dist/bin/sso-oidc-BHBT6MBW.js +732 -0
  37. package/dist/bin/sso-oidc-WOAY6JEM.js +733 -0
  38. package/dist/bin/sts-22SIO74C.js +1109 -0
  39. package/dist/bin/sts-SCV3QXFF.js +1064 -0
  40. package/dist/bin/sts-YWYJ3LVJ.js +1064 -0
  41. package/dist/cjs/workloads/stateless/broadcast/client/provider.d.ts +3 -1
  42. package/dist/cjs/workloads/stateless/broadcast/client/provider.js +16 -5
  43. package/dist/cjs/workloads/stateless/task/dispatcher.js +31 -0
  44. package/dist/esm/workloads/stateless/broadcast/client/provider.d.ts +3 -1
  45. package/dist/esm/workloads/stateless/broadcast/client/provider.js +16 -5
  46. package/dist/esm/workloads/stateless/task/dispatcher.js +8 -0
  47. package/package.json +1 -1
@@ -0,0 +1,938 @@
1
+ import { createRequire } from 'module';
2
+ import { customEndpointFunctions, isValidHostLabel, isIpAddress, normalizeProvider2, memoizeIdentityProvider, isIdentityExpired, doesIdentityRequireRefresh, SignatureV4 } from './chunk-AKHG66MJ.js';
3
+ import { HttpRequest, collectBody, HttpResponse } from './chunk-U43L2J36.js';
4
+ import { setCredentialFeature } from './chunk-AV7FB56K.js';
5
+ import { platform, release } from 'os';
6
+ import { versions, env } from 'process';
7
+
8
+ createRequire(import.meta.url);
9
+
10
+ // ../../node_modules/@aws-sdk/middleware-host-header/dist-es/index.js
11
+ function resolveHostHeaderConfig(input) {
12
+ return input;
13
+ }
14
+ var hostHeaderMiddleware = (options) => (next) => async (args) => {
15
+ if (!HttpRequest.isInstance(args.request))
16
+ return next(args);
17
+ const { request } = args;
18
+ const { handlerProtocol = "" } = options.requestHandler.metadata || {};
19
+ if (handlerProtocol.indexOf("h2") >= 0 && !request.headers[":authority"]) {
20
+ delete request.headers["host"];
21
+ request.headers[":authority"] = request.hostname + (request.port ? ":" + request.port : "");
22
+ } else if (!request.headers["host"]) {
23
+ let host = request.hostname;
24
+ if (request.port != null)
25
+ host += `:${request.port}`;
26
+ request.headers["host"] = host;
27
+ }
28
+ return next(args);
29
+ };
30
+ var hostHeaderMiddlewareOptions = {
31
+ name: "hostHeaderMiddleware",
32
+ step: "build",
33
+ priority: "low",
34
+ tags: ["HOST"],
35
+ override: true
36
+ };
37
+ var getHostHeaderPlugin = (options) => ({
38
+ applyToStack: (clientStack) => {
39
+ clientStack.add(hostHeaderMiddleware(options), hostHeaderMiddlewareOptions);
40
+ }
41
+ });
42
+
43
+ // ../../node_modules/@aws-sdk/middleware-logger/dist-es/loggerMiddleware.js
44
+ var loggerMiddleware = () => (next, context) => async (args) => {
45
+ try {
46
+ const response = await next(args);
47
+ const { clientName, commandName, logger, dynamoDbDocumentClientOptions = {} } = context;
48
+ const { overrideInputFilterSensitiveLog, overrideOutputFilterSensitiveLog } = dynamoDbDocumentClientOptions;
49
+ const inputFilterSensitiveLog = overrideInputFilterSensitiveLog ?? context.inputFilterSensitiveLog;
50
+ const outputFilterSensitiveLog = overrideOutputFilterSensitiveLog ?? context.outputFilterSensitiveLog;
51
+ const { $metadata, ...outputWithoutMetadata } = response.output;
52
+ logger?.info?.({
53
+ clientName,
54
+ commandName,
55
+ input: inputFilterSensitiveLog(args.input),
56
+ output: outputFilterSensitiveLog(outputWithoutMetadata),
57
+ metadata: $metadata
58
+ });
59
+ return response;
60
+ } catch (error) {
61
+ const { clientName, commandName, logger, dynamoDbDocumentClientOptions = {} } = context;
62
+ const { overrideInputFilterSensitiveLog } = dynamoDbDocumentClientOptions;
63
+ const inputFilterSensitiveLog = overrideInputFilterSensitiveLog ?? context.inputFilterSensitiveLog;
64
+ logger?.error?.({
65
+ clientName,
66
+ commandName,
67
+ input: inputFilterSensitiveLog(args.input),
68
+ error,
69
+ metadata: error.$metadata
70
+ });
71
+ throw error;
72
+ }
73
+ };
74
+ var loggerMiddlewareOptions = {
75
+ name: "loggerMiddleware",
76
+ tags: ["LOGGER"],
77
+ step: "initialize",
78
+ override: true
79
+ };
80
+ var getLoggerPlugin = (options) => ({
81
+ applyToStack: (clientStack) => {
82
+ clientStack.add(loggerMiddleware(), loggerMiddlewareOptions);
83
+ }
84
+ });
85
+
86
+ // ../../node_modules/@aws-sdk/middleware-recursion-detection/dist-es/index.js
87
+ var TRACE_ID_HEADER_NAME = "X-Amzn-Trace-Id";
88
+ var ENV_LAMBDA_FUNCTION_NAME = "AWS_LAMBDA_FUNCTION_NAME";
89
+ var ENV_TRACE_ID = "_X_AMZN_TRACE_ID";
90
+ var recursionDetectionMiddleware = (options) => (next) => async (args) => {
91
+ const { request } = args;
92
+ if (!HttpRequest.isInstance(request) || options.runtime !== "node") {
93
+ return next(args);
94
+ }
95
+ const traceIdHeader = Object.keys(request.headers ?? {}).find((h) => h.toLowerCase() === TRACE_ID_HEADER_NAME.toLowerCase()) ?? TRACE_ID_HEADER_NAME;
96
+ if (request.headers.hasOwnProperty(traceIdHeader)) {
97
+ return next(args);
98
+ }
99
+ const functionName = process.env[ENV_LAMBDA_FUNCTION_NAME];
100
+ const traceId = process.env[ENV_TRACE_ID];
101
+ const nonEmptyString = (str) => typeof str === "string" && str.length > 0;
102
+ if (nonEmptyString(functionName) && nonEmptyString(traceId)) {
103
+ request.headers[TRACE_ID_HEADER_NAME] = traceId;
104
+ }
105
+ return next({
106
+ ...args,
107
+ request
108
+ });
109
+ };
110
+ var addRecursionDetectionMiddlewareOptions = {
111
+ step: "build",
112
+ tags: ["RECURSION_DETECTION"],
113
+ name: "recursionDetectionMiddleware",
114
+ override: true,
115
+ priority: "low"
116
+ };
117
+ var getRecursionDetectionPlugin = (options) => ({
118
+ applyToStack: (clientStack) => {
119
+ clientStack.add(recursionDetectionMiddleware(options), addRecursionDetectionMiddlewareOptions);
120
+ }
121
+ });
122
+
123
+ // ../../node_modules/@aws-sdk/middleware-user-agent/dist-es/configurations.js
124
+ var DEFAULT_UA_APP_ID = void 0;
125
+ function isValidUserAgentAppId(appId) {
126
+ if (appId === void 0) {
127
+ return true;
128
+ }
129
+ return typeof appId === "string" && appId.length <= 50;
130
+ }
131
+ function resolveUserAgentConfig(input) {
132
+ const normalizedAppIdProvider = normalizeProvider2(input.userAgentAppId ?? DEFAULT_UA_APP_ID);
133
+ const { customUserAgent } = input;
134
+ return Object.assign(input, {
135
+ customUserAgent: typeof customUserAgent === "string" ? [[customUserAgent]] : customUserAgent,
136
+ userAgentAppId: async () => {
137
+ const appId = await normalizedAppIdProvider();
138
+ if (!isValidUserAgentAppId(appId)) {
139
+ const logger = input.logger?.constructor?.name === "NoOpLogger" || !input.logger ? console : input.logger;
140
+ if (typeof appId !== "string") {
141
+ logger?.warn("userAgentAppId must be a string or undefined.");
142
+ } else if (appId.length > 50) {
143
+ logger?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters.");
144
+ }
145
+ }
146
+ return appId;
147
+ }
148
+ });
149
+ }
150
+
151
+ // ../../node_modules/@aws-sdk/util-endpoints/dist-es/lib/aws/isVirtualHostableS3Bucket.js
152
+ var isVirtualHostableS3Bucket = (value, allowSubDomains = false) => {
153
+ if (allowSubDomains) {
154
+ for (const label of value.split(".")) {
155
+ if (!isVirtualHostableS3Bucket(label)) {
156
+ return false;
157
+ }
158
+ }
159
+ return true;
160
+ }
161
+ if (!isValidHostLabel(value)) {
162
+ return false;
163
+ }
164
+ if (value.length < 3 || value.length > 63) {
165
+ return false;
166
+ }
167
+ if (value !== value.toLowerCase()) {
168
+ return false;
169
+ }
170
+ if (isIpAddress(value)) {
171
+ return false;
172
+ }
173
+ return true;
174
+ };
175
+
176
+ // ../../node_modules/@aws-sdk/util-endpoints/dist-es/lib/aws/parseArn.js
177
+ var ARN_DELIMITER = ":";
178
+ var RESOURCE_DELIMITER = "/";
179
+ var parseArn = (value) => {
180
+ const segments = value.split(ARN_DELIMITER);
181
+ if (segments.length < 6)
182
+ return null;
183
+ const [arn, partition2, service, region, accountId, ...resourcePath] = segments;
184
+ if (arn !== "arn" || partition2 === "" || service === "" || resourcePath.join(ARN_DELIMITER) === "")
185
+ return null;
186
+ const resourceId = resourcePath.map((resource) => resource.split(RESOURCE_DELIMITER)).flat();
187
+ return {
188
+ partition: partition2,
189
+ service,
190
+ region,
191
+ accountId,
192
+ resourceId
193
+ };
194
+ };
195
+
196
+ // ../../node_modules/@aws-sdk/util-endpoints/dist-es/lib/aws/partitions.json
197
+ var partitions_default = {
198
+ partitions: [{
199
+ id: "aws",
200
+ outputs: {
201
+ dnsSuffix: "amazonaws.com",
202
+ dualStackDnsSuffix: "api.aws",
203
+ implicitGlobalRegion: "us-east-1",
204
+ name: "aws",
205
+ supportsDualStack: true,
206
+ supportsFIPS: true
207
+ },
208
+ regionRegex: "^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$",
209
+ regions: {
210
+ "af-south-1": {
211
+ description: "Africa (Cape Town)"
212
+ },
213
+ "ap-east-1": {
214
+ description: "Asia Pacific (Hong Kong)"
215
+ },
216
+ "ap-northeast-1": {
217
+ description: "Asia Pacific (Tokyo)"
218
+ },
219
+ "ap-northeast-2": {
220
+ description: "Asia Pacific (Seoul)"
221
+ },
222
+ "ap-northeast-3": {
223
+ description: "Asia Pacific (Osaka)"
224
+ },
225
+ "ap-south-1": {
226
+ description: "Asia Pacific (Mumbai)"
227
+ },
228
+ "ap-south-2": {
229
+ description: "Asia Pacific (Hyderabad)"
230
+ },
231
+ "ap-southeast-1": {
232
+ description: "Asia Pacific (Singapore)"
233
+ },
234
+ "ap-southeast-2": {
235
+ description: "Asia Pacific (Sydney)"
236
+ },
237
+ "ap-southeast-3": {
238
+ description: "Asia Pacific (Jakarta)"
239
+ },
240
+ "ap-southeast-4": {
241
+ description: "Asia Pacific (Melbourne)"
242
+ },
243
+ "ap-southeast-5": {
244
+ description: "Asia Pacific (Malaysia)"
245
+ },
246
+ "ap-southeast-7": {
247
+ description: "Asia Pacific (Thailand)"
248
+ },
249
+ "aws-global": {
250
+ description: "AWS Standard global region"
251
+ },
252
+ "ca-central-1": {
253
+ description: "Canada (Central)"
254
+ },
255
+ "ca-west-1": {
256
+ description: "Canada West (Calgary)"
257
+ },
258
+ "eu-central-1": {
259
+ description: "Europe (Frankfurt)"
260
+ },
261
+ "eu-central-2": {
262
+ description: "Europe (Zurich)"
263
+ },
264
+ "eu-north-1": {
265
+ description: "Europe (Stockholm)"
266
+ },
267
+ "eu-south-1": {
268
+ description: "Europe (Milan)"
269
+ },
270
+ "eu-south-2": {
271
+ description: "Europe (Spain)"
272
+ },
273
+ "eu-west-1": {
274
+ description: "Europe (Ireland)"
275
+ },
276
+ "eu-west-2": {
277
+ description: "Europe (London)"
278
+ },
279
+ "eu-west-3": {
280
+ description: "Europe (Paris)"
281
+ },
282
+ "il-central-1": {
283
+ description: "Israel (Tel Aviv)"
284
+ },
285
+ "me-central-1": {
286
+ description: "Middle East (UAE)"
287
+ },
288
+ "me-south-1": {
289
+ description: "Middle East (Bahrain)"
290
+ },
291
+ "mx-central-1": {
292
+ description: "Mexico (Central)"
293
+ },
294
+ "sa-east-1": {
295
+ description: "South America (Sao Paulo)"
296
+ },
297
+ "us-east-1": {
298
+ description: "US East (N. Virginia)"
299
+ },
300
+ "us-east-2": {
301
+ description: "US East (Ohio)"
302
+ },
303
+ "us-west-1": {
304
+ description: "US West (N. California)"
305
+ },
306
+ "us-west-2": {
307
+ description: "US West (Oregon)"
308
+ }
309
+ }
310
+ }, {
311
+ id: "aws-cn",
312
+ outputs: {
313
+ dnsSuffix: "amazonaws.com.cn",
314
+ dualStackDnsSuffix: "api.amazonwebservices.com.cn",
315
+ implicitGlobalRegion: "cn-northwest-1",
316
+ name: "aws-cn",
317
+ supportsDualStack: true,
318
+ supportsFIPS: true
319
+ },
320
+ regionRegex: "^cn\\-\\w+\\-\\d+$",
321
+ regions: {
322
+ "aws-cn-global": {
323
+ description: "AWS China global region"
324
+ },
325
+ "cn-north-1": {
326
+ description: "China (Beijing)"
327
+ },
328
+ "cn-northwest-1": {
329
+ description: "China (Ningxia)"
330
+ }
331
+ }
332
+ }, {
333
+ id: "aws-us-gov",
334
+ outputs: {
335
+ dnsSuffix: "amazonaws.com",
336
+ dualStackDnsSuffix: "api.aws",
337
+ implicitGlobalRegion: "us-gov-west-1",
338
+ name: "aws-us-gov",
339
+ supportsDualStack: true,
340
+ supportsFIPS: true
341
+ },
342
+ regionRegex: "^us\\-gov\\-\\w+\\-\\d+$",
343
+ regions: {
344
+ "aws-us-gov-global": {
345
+ description: "AWS GovCloud (US) global region"
346
+ },
347
+ "us-gov-east-1": {
348
+ description: "AWS GovCloud (US-East)"
349
+ },
350
+ "us-gov-west-1": {
351
+ description: "AWS GovCloud (US-West)"
352
+ }
353
+ }
354
+ }, {
355
+ id: "aws-iso",
356
+ outputs: {
357
+ dnsSuffix: "c2s.ic.gov",
358
+ dualStackDnsSuffix: "c2s.ic.gov",
359
+ implicitGlobalRegion: "us-iso-east-1",
360
+ name: "aws-iso",
361
+ supportsDualStack: false,
362
+ supportsFIPS: true
363
+ },
364
+ regionRegex: "^us\\-iso\\-\\w+\\-\\d+$",
365
+ regions: {
366
+ "aws-iso-global": {
367
+ description: "AWS ISO (US) global region"
368
+ },
369
+ "us-iso-east-1": {
370
+ description: "US ISO East"
371
+ },
372
+ "us-iso-west-1": {
373
+ description: "US ISO WEST"
374
+ }
375
+ }
376
+ }, {
377
+ id: "aws-iso-b",
378
+ outputs: {
379
+ dnsSuffix: "sc2s.sgov.gov",
380
+ dualStackDnsSuffix: "sc2s.sgov.gov",
381
+ implicitGlobalRegion: "us-isob-east-1",
382
+ name: "aws-iso-b",
383
+ supportsDualStack: false,
384
+ supportsFIPS: true
385
+ },
386
+ regionRegex: "^us\\-isob\\-\\w+\\-\\d+$",
387
+ regions: {
388
+ "aws-iso-b-global": {
389
+ description: "AWS ISOB (US) global region"
390
+ },
391
+ "us-isob-east-1": {
392
+ description: "US ISOB East (Ohio)"
393
+ }
394
+ }
395
+ }, {
396
+ id: "aws-iso-e",
397
+ outputs: {
398
+ dnsSuffix: "cloud.adc-e.uk",
399
+ dualStackDnsSuffix: "cloud.adc-e.uk",
400
+ implicitGlobalRegion: "eu-isoe-west-1",
401
+ name: "aws-iso-e",
402
+ supportsDualStack: false,
403
+ supportsFIPS: true
404
+ },
405
+ regionRegex: "^eu\\-isoe\\-\\w+\\-\\d+$",
406
+ regions: {
407
+ "aws-iso-e-global": {
408
+ description: "AWS ISOE (Europe) global region"
409
+ },
410
+ "eu-isoe-west-1": {
411
+ description: "EU ISOE West"
412
+ }
413
+ }
414
+ }, {
415
+ id: "aws-iso-f",
416
+ outputs: {
417
+ dnsSuffix: "csp.hci.ic.gov",
418
+ dualStackDnsSuffix: "csp.hci.ic.gov",
419
+ implicitGlobalRegion: "us-isof-south-1",
420
+ name: "aws-iso-f",
421
+ supportsDualStack: false,
422
+ supportsFIPS: true
423
+ },
424
+ regionRegex: "^us\\-isof\\-\\w+\\-\\d+$",
425
+ regions: {
426
+ "aws-iso-f-global": {
427
+ description: "AWS ISOF global region"
428
+ },
429
+ "us-isof-east-1": {
430
+ description: "US ISOF EAST"
431
+ },
432
+ "us-isof-south-1": {
433
+ description: "US ISOF SOUTH"
434
+ }
435
+ }
436
+ }, {
437
+ id: "aws-eusc",
438
+ outputs: {
439
+ dnsSuffix: "amazonaws.eu",
440
+ dualStackDnsSuffix: "amazonaws.eu",
441
+ implicitGlobalRegion: "eusc-de-east-1",
442
+ name: "aws-eusc",
443
+ supportsDualStack: false,
444
+ supportsFIPS: true
445
+ },
446
+ regionRegex: "^eusc\\-(de)\\-\\w+\\-\\d+$",
447
+ regions: {
448
+ "eusc-de-east-1": {
449
+ description: "EU (Germany)"
450
+ }
451
+ }
452
+ }]};
453
+
454
+ // ../../node_modules/@aws-sdk/util-endpoints/dist-es/lib/aws/partition.js
455
+ var selectedPartitionsInfo = partitions_default;
456
+ var partition = (value) => {
457
+ const { partitions } = selectedPartitionsInfo;
458
+ for (const partition2 of partitions) {
459
+ const { regions, outputs } = partition2;
460
+ for (const [region, regionData] of Object.entries(regions)) {
461
+ if (region === value) {
462
+ return {
463
+ ...outputs,
464
+ ...regionData
465
+ };
466
+ }
467
+ }
468
+ }
469
+ for (const partition2 of partitions) {
470
+ const { regionRegex, outputs } = partition2;
471
+ if (new RegExp(regionRegex).test(value)) {
472
+ return {
473
+ ...outputs
474
+ };
475
+ }
476
+ }
477
+ const DEFAULT_PARTITION = partitions.find((partition2) => partition2.id === "aws");
478
+ if (!DEFAULT_PARTITION) {
479
+ throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");
480
+ }
481
+ return {
482
+ ...DEFAULT_PARTITION.outputs
483
+ };
484
+ };
485
+
486
+ // ../../node_modules/@aws-sdk/util-endpoints/dist-es/aws.js
487
+ var awsEndpointFunctions = {
488
+ isVirtualHostableS3Bucket,
489
+ parseArn,
490
+ partition
491
+ };
492
+ customEndpointFunctions.aws = awsEndpointFunctions;
493
+
494
+ // ../../node_modules/@aws-sdk/core/dist-es/submodules/client/emitWarningIfUnsupportedVersion.js
495
+ var state = {
496
+ warningEmitted: false
497
+ };
498
+ var emitWarningIfUnsupportedVersion = (version) => {
499
+ if (version && !state.warningEmitted && parseInt(version.substring(1, version.indexOf("."))) < 18) {
500
+ state.warningEmitted = true;
501
+ process.emitWarning(`NodeDeprecationWarning: The AWS SDK for JavaScript (v3) will
502
+ no longer support Node.js 16.x on January 6, 2025.
503
+
504
+ To continue receiving updates to AWS services, bug fixes, and security
505
+ updates please upgrade to a supported Node.js LTS version.
506
+
507
+ More information can be found at: https://a.co/74kJMmI`);
508
+ }
509
+ };
510
+
511
+ // ../../node_modules/@aws-sdk/core/dist-es/submodules/client/setFeature.js
512
+ function setFeature(context, feature, value) {
513
+ if (!context.__aws_sdk_context) {
514
+ context.__aws_sdk_context = {
515
+ features: {}
516
+ };
517
+ } else if (!context.__aws_sdk_context.features) {
518
+ context.__aws_sdk_context.features = {};
519
+ }
520
+ context.__aws_sdk_context.features[feature] = value;
521
+ }
522
+
523
+ // ../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getDateHeader.js
524
+ var getDateHeader = (response) => HttpResponse.isInstance(response) ? response.headers?.date ?? response.headers?.Date : void 0;
525
+
526
+ // ../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getSkewCorrectedDate.js
527
+ var getSkewCorrectedDate = (systemClockOffset) => new Date(Date.now() + systemClockOffset);
528
+
529
+ // ../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/isClockSkewed.js
530
+ var isClockSkewed = (clockTime, systemClockOffset) => Math.abs(getSkewCorrectedDate(systemClockOffset).getTime() - clockTime) >= 3e5;
531
+
532
+ // ../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getUpdatedSystemClockOffset.js
533
+ var getUpdatedSystemClockOffset = (clockTime, currentSystemClockOffset) => {
534
+ const clockTimeInMs = Date.parse(clockTime);
535
+ if (isClockSkewed(clockTimeInMs, currentSystemClockOffset)) {
536
+ return clockTimeInMs - Date.now();
537
+ }
538
+ return currentSystemClockOffset;
539
+ };
540
+
541
+ // ../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4Signer.js
542
+ var throwSigningPropertyError = (name, property) => {
543
+ if (!property) {
544
+ throw new Error(`Property \`${name}\` is not resolved for AWS SDK SigV4Auth`);
545
+ }
546
+ return property;
547
+ };
548
+ var validateSigningProperties = async (signingProperties) => {
549
+ const context = throwSigningPropertyError("context", signingProperties.context);
550
+ const config = throwSigningPropertyError("config", signingProperties.config);
551
+ const authScheme = context.endpointV2?.properties?.authSchemes?.[0];
552
+ const signerFunction = throwSigningPropertyError("signer", config.signer);
553
+ const signer = await signerFunction(authScheme);
554
+ const signingRegion = signingProperties?.signingRegion;
555
+ const signingRegionSet = signingProperties?.signingRegionSet;
556
+ const signingName = signingProperties?.signingName;
557
+ return {
558
+ config,
559
+ signer,
560
+ signingRegion,
561
+ signingRegionSet,
562
+ signingName
563
+ };
564
+ };
565
+ var AwsSdkSigV4Signer = class {
566
+ async sign(httpRequest, identity, signingProperties) {
567
+ if (!HttpRequest.isInstance(httpRequest)) {
568
+ throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");
569
+ }
570
+ const validatedProps = await validateSigningProperties(signingProperties);
571
+ const { config, signer } = validatedProps;
572
+ let { signingRegion, signingName } = validatedProps;
573
+ const handlerExecutionContext = signingProperties.context;
574
+ if (handlerExecutionContext?.authSchemes?.length ?? 0 > 1) {
575
+ const [first, second] = handlerExecutionContext.authSchemes;
576
+ if (first?.name === "sigv4a" && second?.name === "sigv4") {
577
+ signingRegion = second?.signingRegion ?? signingRegion;
578
+ signingName = second?.signingName ?? signingName;
579
+ }
580
+ }
581
+ const signedRequest = await signer.sign(httpRequest, {
582
+ signingDate: getSkewCorrectedDate(config.systemClockOffset),
583
+ signingRegion,
584
+ signingService: signingName
585
+ });
586
+ return signedRequest;
587
+ }
588
+ errorHandler(signingProperties) {
589
+ return (error) => {
590
+ const serverTime = error.ServerTime ?? getDateHeader(error.$response);
591
+ if (serverTime) {
592
+ const config = throwSigningPropertyError("config", signingProperties.config);
593
+ const initialSystemClockOffset = config.systemClockOffset;
594
+ config.systemClockOffset = getUpdatedSystemClockOffset(serverTime, config.systemClockOffset);
595
+ const clockSkewCorrected = config.systemClockOffset !== initialSystemClockOffset;
596
+ if (clockSkewCorrected && error.$metadata) {
597
+ error.$metadata.clockSkewCorrected = true;
598
+ }
599
+ }
600
+ throw error;
601
+ };
602
+ }
603
+ successHandler(httpResponse, signingProperties) {
604
+ const dateHeader = getDateHeader(httpResponse);
605
+ if (dateHeader) {
606
+ const config = throwSigningPropertyError("config", signingProperties.config);
607
+ config.systemClockOffset = getUpdatedSystemClockOffset(dateHeader, config.systemClockOffset);
608
+ }
609
+ }
610
+ };
611
+
612
+ // ../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4Config.js
613
+ var resolveAwsSdkSigV4Config = (config) => {
614
+ let inputCredentials = config.credentials;
615
+ let isUserSupplied = !!config.credentials;
616
+ let resolvedCredentials = void 0;
617
+ Object.defineProperty(config, "credentials", {
618
+ set(credentials) {
619
+ if (credentials && credentials !== inputCredentials && credentials !== resolvedCredentials) {
620
+ isUserSupplied = true;
621
+ }
622
+ inputCredentials = credentials;
623
+ const memoizedProvider = normalizeCredentialProvider(config, {
624
+ credentials: inputCredentials,
625
+ credentialDefaultProvider: config.credentialDefaultProvider
626
+ });
627
+ const boundProvider = bindCallerConfig(config, memoizedProvider);
628
+ if (isUserSupplied && !boundProvider.attributed) {
629
+ resolvedCredentials = async (options) => boundProvider(options).then((creds) => setCredentialFeature(creds, "CREDENTIALS_CODE", "e"));
630
+ resolvedCredentials.memoized = boundProvider.memoized;
631
+ resolvedCredentials.configBound = boundProvider.configBound;
632
+ resolvedCredentials.attributed = true;
633
+ } else {
634
+ resolvedCredentials = boundProvider;
635
+ }
636
+ },
637
+ get() {
638
+ return resolvedCredentials;
639
+ },
640
+ enumerable: true,
641
+ configurable: true
642
+ });
643
+ config.credentials = inputCredentials;
644
+ const { signingEscapePath = true, systemClockOffset = config.systemClockOffset || 0, sha256 } = config;
645
+ let signer;
646
+ if (config.signer) {
647
+ signer = normalizeProvider2(config.signer);
648
+ } else if (config.regionInfoProvider) {
649
+ signer = () => normalizeProvider2(config.region)().then(async (region) => [
650
+ await config.regionInfoProvider(region, {
651
+ useFipsEndpoint: await config.useFipsEndpoint(),
652
+ useDualstackEndpoint: await config.useDualstackEndpoint()
653
+ }) || {},
654
+ region
655
+ ]).then(([regionInfo, region]) => {
656
+ const { signingRegion, signingService } = regionInfo;
657
+ config.signingRegion = config.signingRegion || signingRegion || region;
658
+ config.signingName = config.signingName || signingService || config.serviceId;
659
+ const params = {
660
+ ...config,
661
+ credentials: config.credentials,
662
+ region: config.signingRegion,
663
+ service: config.signingName,
664
+ sha256,
665
+ uriEscapePath: signingEscapePath
666
+ };
667
+ const SignerCtor = config.signerConstructor || SignatureV4;
668
+ return new SignerCtor(params);
669
+ });
670
+ } else {
671
+ signer = async (authScheme) => {
672
+ authScheme = Object.assign({}, {
673
+ name: "sigv4",
674
+ signingName: config.signingName || config.defaultSigningName,
675
+ signingRegion: await normalizeProvider2(config.region)(),
676
+ properties: {}
677
+ }, authScheme);
678
+ const signingRegion = authScheme.signingRegion;
679
+ const signingService = authScheme.signingName;
680
+ config.signingRegion = config.signingRegion || signingRegion;
681
+ config.signingName = config.signingName || signingService || config.serviceId;
682
+ const params = {
683
+ ...config,
684
+ credentials: config.credentials,
685
+ region: config.signingRegion,
686
+ service: config.signingName,
687
+ sha256,
688
+ uriEscapePath: signingEscapePath
689
+ };
690
+ const SignerCtor = config.signerConstructor || SignatureV4;
691
+ return new SignerCtor(params);
692
+ };
693
+ }
694
+ const resolvedConfig = Object.assign(config, {
695
+ systemClockOffset,
696
+ signingEscapePath,
697
+ signer
698
+ });
699
+ return resolvedConfig;
700
+ };
701
+ function normalizeCredentialProvider(config, { credentials, credentialDefaultProvider }) {
702
+ let credentialsProvider;
703
+ if (credentials) {
704
+ if (!credentials?.memoized) {
705
+ credentialsProvider = memoizeIdentityProvider(credentials, isIdentityExpired, doesIdentityRequireRefresh);
706
+ } else {
707
+ credentialsProvider = credentials;
708
+ }
709
+ } else {
710
+ if (credentialDefaultProvider) {
711
+ credentialsProvider = normalizeProvider2(credentialDefaultProvider(Object.assign({}, config, {
712
+ parentClientConfig: config
713
+ })));
714
+ } else {
715
+ credentialsProvider = async () => {
716
+ throw new Error("@aws-sdk/core::resolveAwsSdkSigV4Config - `credentials` not provided and no credentialDefaultProvider was configured.");
717
+ };
718
+ }
719
+ }
720
+ credentialsProvider.memoized = true;
721
+ return credentialsProvider;
722
+ }
723
+ function bindCallerConfig(config, credentialsProvider) {
724
+ if (credentialsProvider.configBound) {
725
+ return credentialsProvider;
726
+ }
727
+ const fn = async (options) => credentialsProvider({ ...options, callerClientConfig: config });
728
+ fn.memoized = credentialsProvider.memoized;
729
+ fn.configBound = true;
730
+ return fn;
731
+ }
732
+
733
+ // ../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/common.js
734
+ var collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
735
+
736
+ // ../../node_modules/@aws-sdk/middleware-user-agent/dist-es/check-features.js
737
+ var ACCOUNT_ID_ENDPOINT_REGEX = /\d{12}\.ddb/;
738
+ async function checkFeatures(context, config, args) {
739
+ const request = args.request;
740
+ if (request?.headers?.["smithy-protocol"] === "rpc-v2-cbor") {
741
+ setFeature(context, "PROTOCOL_RPC_V2_CBOR", "M");
742
+ }
743
+ if (typeof config.retryStrategy === "function") {
744
+ const retryStrategy = await config.retryStrategy();
745
+ if (typeof retryStrategy.acquireInitialRetryToken === "function") {
746
+ if (retryStrategy.constructor?.name?.includes("Adaptive")) {
747
+ setFeature(context, "RETRY_MODE_ADAPTIVE", "F");
748
+ } else {
749
+ setFeature(context, "RETRY_MODE_STANDARD", "E");
750
+ }
751
+ } else {
752
+ setFeature(context, "RETRY_MODE_LEGACY", "D");
753
+ }
754
+ }
755
+ if (typeof config.accountIdEndpointMode === "function") {
756
+ const endpointV2 = context.endpointV2;
757
+ if (String(endpointV2?.url?.hostname).match(ACCOUNT_ID_ENDPOINT_REGEX)) {
758
+ setFeature(context, "ACCOUNT_ID_ENDPOINT", "O");
759
+ }
760
+ switch (await config.accountIdEndpointMode?.()) {
761
+ case "disabled":
762
+ setFeature(context, "ACCOUNT_ID_MODE_DISABLED", "Q");
763
+ break;
764
+ case "preferred":
765
+ setFeature(context, "ACCOUNT_ID_MODE_PREFERRED", "P");
766
+ break;
767
+ case "required":
768
+ setFeature(context, "ACCOUNT_ID_MODE_REQUIRED", "R");
769
+ break;
770
+ }
771
+ }
772
+ const identity = context.__smithy_context?.selectedHttpAuthScheme?.identity;
773
+ if (identity?.$source) {
774
+ const credentials = identity;
775
+ if (credentials.accountId) {
776
+ setFeature(context, "RESOLVED_ACCOUNT_ID", "T");
777
+ }
778
+ for (const [key, value] of Object.entries(credentials.$source ?? {})) {
779
+ setFeature(context, key, value);
780
+ }
781
+ }
782
+ }
783
+
784
+ // ../../node_modules/@aws-sdk/middleware-user-agent/dist-es/constants.js
785
+ var USER_AGENT = "user-agent";
786
+ var X_AMZ_USER_AGENT = "x-amz-user-agent";
787
+ var SPACE = " ";
788
+ var UA_NAME_SEPARATOR = "/";
789
+ var UA_NAME_ESCAPE_REGEX = /[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g;
790
+ var UA_VALUE_ESCAPE_REGEX = /[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g;
791
+ var UA_ESCAPE_CHAR = "-";
792
+
793
+ // ../../node_modules/@aws-sdk/middleware-user-agent/dist-es/encode-features.js
794
+ var BYTE_LIMIT = 1024;
795
+ function encodeFeatures(features) {
796
+ let buffer = "";
797
+ for (const key in features) {
798
+ const val = features[key];
799
+ if (buffer.length + val.length + 1 <= BYTE_LIMIT) {
800
+ if (buffer.length) {
801
+ buffer += "," + val;
802
+ } else {
803
+ buffer += val;
804
+ }
805
+ continue;
806
+ }
807
+ break;
808
+ }
809
+ return buffer;
810
+ }
811
+
812
+ // ../../node_modules/@aws-sdk/middleware-user-agent/dist-es/user-agent-middleware.js
813
+ var userAgentMiddleware = (options) => (next, context) => async (args) => {
814
+ const { request } = args;
815
+ if (!HttpRequest.isInstance(request)) {
816
+ return next(args);
817
+ }
818
+ const { headers } = request;
819
+ const userAgent = context?.userAgent?.map(escapeUserAgent) || [];
820
+ const defaultUserAgent = (await options.defaultUserAgentProvider()).map(escapeUserAgent);
821
+ await checkFeatures(context, options, args);
822
+ const awsContext = context;
823
+ defaultUserAgent.push(`m/${encodeFeatures(Object.assign({}, context.__smithy_context?.features, awsContext.__aws_sdk_context?.features))}`);
824
+ const customUserAgent = options?.customUserAgent?.map(escapeUserAgent) || [];
825
+ const appId = await options.userAgentAppId();
826
+ if (appId) {
827
+ defaultUserAgent.push(escapeUserAgent([`app/${appId}`]));
828
+ }
829
+ const sdkUserAgentValue = ([]).concat([...defaultUserAgent, ...userAgent, ...customUserAgent]).join(SPACE);
830
+ const normalUAValue = [
831
+ ...defaultUserAgent.filter((section) => section.startsWith("aws-sdk-")),
832
+ ...customUserAgent
833
+ ].join(SPACE);
834
+ if (options.runtime !== "browser") {
835
+ if (normalUAValue) {
836
+ headers[X_AMZ_USER_AGENT] = headers[X_AMZ_USER_AGENT] ? `${headers[USER_AGENT]} ${normalUAValue}` : normalUAValue;
837
+ }
838
+ headers[USER_AGENT] = sdkUserAgentValue;
839
+ } else {
840
+ headers[X_AMZ_USER_AGENT] = sdkUserAgentValue;
841
+ }
842
+ return next({
843
+ ...args,
844
+ request
845
+ });
846
+ };
847
+ var escapeUserAgent = (userAgentPair) => {
848
+ const name = userAgentPair[0].split(UA_NAME_SEPARATOR).map((part) => part.replace(UA_NAME_ESCAPE_REGEX, UA_ESCAPE_CHAR)).join(UA_NAME_SEPARATOR);
849
+ const version = userAgentPair[1]?.replace(UA_VALUE_ESCAPE_REGEX, UA_ESCAPE_CHAR);
850
+ const prefixSeparatorIndex = name.indexOf(UA_NAME_SEPARATOR);
851
+ const prefix = name.substring(0, prefixSeparatorIndex);
852
+ let uaName = name.substring(prefixSeparatorIndex + 1);
853
+ if (prefix === "api") {
854
+ uaName = uaName.toLowerCase();
855
+ }
856
+ return [prefix, uaName, version].filter((item) => item && item.length > 0).reduce((acc, item, index) => {
857
+ switch (index) {
858
+ case 0:
859
+ return item;
860
+ case 1:
861
+ return `${acc}/${item}`;
862
+ default:
863
+ return `${acc}#${item}`;
864
+ }
865
+ }, "");
866
+ };
867
+ var getUserAgentMiddlewareOptions = {
868
+ name: "getUserAgentMiddleware",
869
+ step: "build",
870
+ priority: "low",
871
+ tags: ["SET_USER_AGENT", "USER_AGENT"],
872
+ override: true
873
+ };
874
+ var getUserAgentPlugin = (config) => ({
875
+ applyToStack: (clientStack) => {
876
+ clientStack.add(userAgentMiddleware(config), getUserAgentMiddlewareOptions);
877
+ }
878
+ });
879
+
880
+ // ../../node_modules/@aws-sdk/util-user-agent-node/dist-es/is-crt-available.js
881
+ var isCrtAvailable = () => {
882
+ return null;
883
+ };
884
+
885
+ // ../../node_modules/@aws-sdk/util-user-agent-node/dist-es/defaultUserAgent.js
886
+ var createDefaultUserAgentProvider = ({ serviceId, clientVersion }) => {
887
+ return async (config) => {
888
+ const sections = [
889
+ ["aws-sdk-js", clientVersion],
890
+ ["ua", "2.1"],
891
+ [`os/${platform()}`, release()],
892
+ ["lang/js"],
893
+ ["md/nodejs", `${versions.node}`]
894
+ ];
895
+ const crtAvailable = isCrtAvailable();
896
+ if (crtAvailable) {
897
+ sections.push(crtAvailable);
898
+ }
899
+ if (serviceId) {
900
+ sections.push([`api/${serviceId}`, clientVersion]);
901
+ }
902
+ if (env.AWS_EXECUTION_ENV) {
903
+ sections.push([`exec-env/${env.AWS_EXECUTION_ENV}`]);
904
+ }
905
+ const appId = await config?.userAgentAppId?.();
906
+ const resolvedUserAgent = appId ? [...sections, [`app/${appId}`]] : [...sections];
907
+ return resolvedUserAgent;
908
+ };
909
+ };
910
+
911
+ // ../../node_modules/@aws-sdk/util-user-agent-node/dist-es/nodeAppIdConfigOptions.js
912
+ var UA_APP_ID_ENV_NAME = "AWS_SDK_UA_APP_ID";
913
+ var UA_APP_ID_INI_NAME = "sdk_ua_app_id";
914
+ var UA_APP_ID_INI_NAME_DEPRECATED = "sdk-ua-app-id";
915
+ var NODE_APP_ID_CONFIG_OPTIONS = {
916
+ environmentVariableSelector: (env2) => env2[UA_APP_ID_ENV_NAME],
917
+ configFileSelector: (profile) => profile[UA_APP_ID_INI_NAME] ?? profile[UA_APP_ID_INI_NAME_DEPRECATED],
918
+ default: DEFAULT_UA_APP_ID
919
+ };
920
+
921
+ // ../../node_modules/@aws-sdk/region-config-resolver/dist-es/extensions/index.js
922
+ var getAwsRegionExtensionConfiguration = (runtimeConfig) => {
923
+ return {
924
+ setRegion(region) {
925
+ runtimeConfig.region = region;
926
+ },
927
+ region() {
928
+ return runtimeConfig.region;
929
+ }
930
+ };
931
+ };
932
+ var resolveAwsRegionExtensionConfiguration = (awsRegionExtensionConfiguration) => {
933
+ return {
934
+ region: awsRegionExtensionConfiguration.region()
935
+ };
936
+ };
937
+
938
+ export { AwsSdkSigV4Signer, NODE_APP_ID_CONFIG_OPTIONS, awsEndpointFunctions, collectBodyString, createDefaultUserAgentProvider, emitWarningIfUnsupportedVersion, getAwsRegionExtensionConfiguration, getHostHeaderPlugin, getLoggerPlugin, getRecursionDetectionPlugin, getUserAgentPlugin, resolveAwsRegionExtensionConfiguration, resolveAwsSdkSigV4Config, resolveHostHeaderConfig, resolveUserAgentConfig };