@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,969 @@
1
+ import { createRequire } from 'module';
2
+ import { setCredentialFeature } from './chunk-KW25ZB6Z.js';
3
+ import { customEndpointFunctions, isValidHostLabel, isIpAddress, normalizeProvider2, memoizeIdentityProvider, isIdentityExpired, doesIdentityRequireRefresh, SignatureV4 } from './chunk-AKHG66MJ.js';
4
+ import { HttpRequest, collectBody, HttpResponse } from './chunk-U43L2J36.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/client-dynamodb/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/client-dynamodb/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/client-dynamodb/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/client-dynamodb/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/client-dynamodb/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/client-dynamodb/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/client-dynamodb/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-east-2": {
217
+ description: "Asia Pacific (Taipei)"
218
+ },
219
+ "ap-northeast-1": {
220
+ description: "Asia Pacific (Tokyo)"
221
+ },
222
+ "ap-northeast-2": {
223
+ description: "Asia Pacific (Seoul)"
224
+ },
225
+ "ap-northeast-3": {
226
+ description: "Asia Pacific (Osaka)"
227
+ },
228
+ "ap-south-1": {
229
+ description: "Asia Pacific (Mumbai)"
230
+ },
231
+ "ap-south-2": {
232
+ description: "Asia Pacific (Hyderabad)"
233
+ },
234
+ "ap-southeast-1": {
235
+ description: "Asia Pacific (Singapore)"
236
+ },
237
+ "ap-southeast-2": {
238
+ description: "Asia Pacific (Sydney)"
239
+ },
240
+ "ap-southeast-3": {
241
+ description: "Asia Pacific (Jakarta)"
242
+ },
243
+ "ap-southeast-4": {
244
+ description: "Asia Pacific (Melbourne)"
245
+ },
246
+ "ap-southeast-5": {
247
+ description: "Asia Pacific (Malaysia)"
248
+ },
249
+ "ap-southeast-7": {
250
+ description: "Asia Pacific (Thailand)"
251
+ },
252
+ "aws-global": {
253
+ description: "AWS Standard global region"
254
+ },
255
+ "ca-central-1": {
256
+ description: "Canada (Central)"
257
+ },
258
+ "ca-west-1": {
259
+ description: "Canada West (Calgary)"
260
+ },
261
+ "eu-central-1": {
262
+ description: "Europe (Frankfurt)"
263
+ },
264
+ "eu-central-2": {
265
+ description: "Europe (Zurich)"
266
+ },
267
+ "eu-north-1": {
268
+ description: "Europe (Stockholm)"
269
+ },
270
+ "eu-south-1": {
271
+ description: "Europe (Milan)"
272
+ },
273
+ "eu-south-2": {
274
+ description: "Europe (Spain)"
275
+ },
276
+ "eu-west-1": {
277
+ description: "Europe (Ireland)"
278
+ },
279
+ "eu-west-2": {
280
+ description: "Europe (London)"
281
+ },
282
+ "eu-west-3": {
283
+ description: "Europe (Paris)"
284
+ },
285
+ "il-central-1": {
286
+ description: "Israel (Tel Aviv)"
287
+ },
288
+ "me-central-1": {
289
+ description: "Middle East (UAE)"
290
+ },
291
+ "me-south-1": {
292
+ description: "Middle East (Bahrain)"
293
+ },
294
+ "mx-central-1": {
295
+ description: "Mexico (Central)"
296
+ },
297
+ "sa-east-1": {
298
+ description: "South America (Sao Paulo)"
299
+ },
300
+ "us-east-1": {
301
+ description: "US East (N. Virginia)"
302
+ },
303
+ "us-east-2": {
304
+ description: "US East (Ohio)"
305
+ },
306
+ "us-west-1": {
307
+ description: "US West (N. California)"
308
+ },
309
+ "us-west-2": {
310
+ description: "US West (Oregon)"
311
+ }
312
+ }
313
+ }, {
314
+ id: "aws-cn",
315
+ outputs: {
316
+ dnsSuffix: "amazonaws.com.cn",
317
+ dualStackDnsSuffix: "api.amazonwebservices.com.cn",
318
+ implicitGlobalRegion: "cn-northwest-1",
319
+ name: "aws-cn",
320
+ supportsDualStack: true,
321
+ supportsFIPS: true
322
+ },
323
+ regionRegex: "^cn\\-\\w+\\-\\d+$",
324
+ regions: {
325
+ "aws-cn-global": {
326
+ description: "AWS China global region"
327
+ },
328
+ "cn-north-1": {
329
+ description: "China (Beijing)"
330
+ },
331
+ "cn-northwest-1": {
332
+ description: "China (Ningxia)"
333
+ }
334
+ }
335
+ }, {
336
+ id: "aws-us-gov",
337
+ outputs: {
338
+ dnsSuffix: "amazonaws.com",
339
+ dualStackDnsSuffix: "api.aws",
340
+ implicitGlobalRegion: "us-gov-west-1",
341
+ name: "aws-us-gov",
342
+ supportsDualStack: true,
343
+ supportsFIPS: true
344
+ },
345
+ regionRegex: "^us\\-gov\\-\\w+\\-\\d+$",
346
+ regions: {
347
+ "aws-us-gov-global": {
348
+ description: "AWS GovCloud (US) global region"
349
+ },
350
+ "us-gov-east-1": {
351
+ description: "AWS GovCloud (US-East)"
352
+ },
353
+ "us-gov-west-1": {
354
+ description: "AWS GovCloud (US-West)"
355
+ }
356
+ }
357
+ }, {
358
+ id: "aws-iso",
359
+ outputs: {
360
+ dnsSuffix: "c2s.ic.gov",
361
+ dualStackDnsSuffix: "c2s.ic.gov",
362
+ implicitGlobalRegion: "us-iso-east-1",
363
+ name: "aws-iso",
364
+ supportsDualStack: false,
365
+ supportsFIPS: true
366
+ },
367
+ regionRegex: "^us\\-iso\\-\\w+\\-\\d+$",
368
+ regions: {
369
+ "aws-iso-global": {
370
+ description: "AWS ISO (US) global region"
371
+ },
372
+ "us-iso-east-1": {
373
+ description: "US ISO East"
374
+ },
375
+ "us-iso-west-1": {
376
+ description: "US ISO WEST"
377
+ }
378
+ }
379
+ }, {
380
+ id: "aws-iso-b",
381
+ outputs: {
382
+ dnsSuffix: "sc2s.sgov.gov",
383
+ dualStackDnsSuffix: "sc2s.sgov.gov",
384
+ implicitGlobalRegion: "us-isob-east-1",
385
+ name: "aws-iso-b",
386
+ supportsDualStack: false,
387
+ supportsFIPS: true
388
+ },
389
+ regionRegex: "^us\\-isob\\-\\w+\\-\\d+$",
390
+ regions: {
391
+ "aws-iso-b-global": {
392
+ description: "AWS ISOB (US) global region"
393
+ },
394
+ "us-isob-east-1": {
395
+ description: "US ISOB East (Ohio)"
396
+ }
397
+ }
398
+ }, {
399
+ id: "aws-iso-e",
400
+ outputs: {
401
+ dnsSuffix: "cloud.adc-e.uk",
402
+ dualStackDnsSuffix: "cloud.adc-e.uk",
403
+ implicitGlobalRegion: "eu-isoe-west-1",
404
+ name: "aws-iso-e",
405
+ supportsDualStack: false,
406
+ supportsFIPS: true
407
+ },
408
+ regionRegex: "^eu\\-isoe\\-\\w+\\-\\d+$",
409
+ regions: {
410
+ "aws-iso-e-global": {
411
+ description: "AWS ISOE (Europe) global region"
412
+ },
413
+ "eu-isoe-west-1": {
414
+ description: "EU ISOE West"
415
+ }
416
+ }
417
+ }, {
418
+ id: "aws-iso-f",
419
+ outputs: {
420
+ dnsSuffix: "csp.hci.ic.gov",
421
+ dualStackDnsSuffix: "csp.hci.ic.gov",
422
+ implicitGlobalRegion: "us-isof-south-1",
423
+ name: "aws-iso-f",
424
+ supportsDualStack: false,
425
+ supportsFIPS: true
426
+ },
427
+ regionRegex: "^us\\-isof\\-\\w+\\-\\d+$",
428
+ regions: {
429
+ "aws-iso-f-global": {
430
+ description: "AWS ISOF global region"
431
+ },
432
+ "us-isof-east-1": {
433
+ description: "US ISOF EAST"
434
+ },
435
+ "us-isof-south-1": {
436
+ description: "US ISOF SOUTH"
437
+ }
438
+ }
439
+ }, {
440
+ id: "aws-eusc",
441
+ outputs: {
442
+ dnsSuffix: "amazonaws.eu",
443
+ dualStackDnsSuffix: "amazonaws.eu",
444
+ implicitGlobalRegion: "eusc-de-east-1",
445
+ name: "aws-eusc",
446
+ supportsDualStack: false,
447
+ supportsFIPS: true
448
+ },
449
+ regionRegex: "^eusc\\-(de)\\-\\w+\\-\\d+$",
450
+ regions: {
451
+ "eusc-de-east-1": {
452
+ description: "EU (Germany)"
453
+ }
454
+ }
455
+ }]};
456
+
457
+ // ../../node_modules/@aws-sdk/client-dynamodb/node_modules/@aws-sdk/util-endpoints/dist-es/lib/aws/partition.js
458
+ var selectedPartitionsInfo = partitions_default;
459
+ var partition = (value) => {
460
+ const { partitions } = selectedPartitionsInfo;
461
+ for (const partition2 of partitions) {
462
+ const { regions, outputs } = partition2;
463
+ for (const [region, regionData] of Object.entries(regions)) {
464
+ if (region === value) {
465
+ return {
466
+ ...outputs,
467
+ ...regionData
468
+ };
469
+ }
470
+ }
471
+ }
472
+ for (const partition2 of partitions) {
473
+ const { regionRegex, outputs } = partition2;
474
+ if (new RegExp(regionRegex).test(value)) {
475
+ return {
476
+ ...outputs
477
+ };
478
+ }
479
+ }
480
+ const DEFAULT_PARTITION = partitions.find((partition2) => partition2.id === "aws");
481
+ if (!DEFAULT_PARTITION) {
482
+ throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");
483
+ }
484
+ return {
485
+ ...DEFAULT_PARTITION.outputs
486
+ };
487
+ };
488
+
489
+ // ../../node_modules/@aws-sdk/client-dynamodb/node_modules/@aws-sdk/util-endpoints/dist-es/aws.js
490
+ var awsEndpointFunctions = {
491
+ isVirtualHostableS3Bucket,
492
+ parseArn,
493
+ partition
494
+ };
495
+ customEndpointFunctions.aws = awsEndpointFunctions;
496
+
497
+ // ../../node_modules/@aws-sdk/client-dynamodb/node_modules/@aws-sdk/core/dist-es/submodules/client/emitWarningIfUnsupportedVersion.js
498
+ var state = {
499
+ warningEmitted: false
500
+ };
501
+ var emitWarningIfUnsupportedVersion = (version) => {
502
+ if (version && !state.warningEmitted && parseInt(version.substring(1, version.indexOf("."))) < 18) {
503
+ state.warningEmitted = true;
504
+ process.emitWarning(`NodeDeprecationWarning: The AWS SDK for JavaScript (v3) will
505
+ no longer support Node.js 16.x on January 6, 2025.
506
+
507
+ To continue receiving updates to AWS services, bug fixes, and security
508
+ updates please upgrade to a supported Node.js LTS version.
509
+
510
+ More information can be found at: https://a.co/74kJMmI`);
511
+ }
512
+ };
513
+
514
+ // ../../node_modules/@aws-sdk/client-dynamodb/node_modules/@aws-sdk/core/dist-es/submodules/client/setFeature.js
515
+ function setFeature(context, feature, value) {
516
+ if (!context.__aws_sdk_context) {
517
+ context.__aws_sdk_context = {
518
+ features: {}
519
+ };
520
+ } else if (!context.__aws_sdk_context.features) {
521
+ context.__aws_sdk_context.features = {};
522
+ }
523
+ context.__aws_sdk_context.features[feature] = value;
524
+ }
525
+
526
+ // ../../node_modules/@aws-sdk/client-dynamodb/node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getDateHeader.js
527
+ var getDateHeader = (response) => HttpResponse.isInstance(response) ? response.headers?.date ?? response.headers?.Date : void 0;
528
+
529
+ // ../../node_modules/@aws-sdk/client-dynamodb/node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getSkewCorrectedDate.js
530
+ var getSkewCorrectedDate = (systemClockOffset) => new Date(Date.now() + systemClockOffset);
531
+
532
+ // ../../node_modules/@aws-sdk/client-dynamodb/node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/isClockSkewed.js
533
+ var isClockSkewed = (clockTime, systemClockOffset) => Math.abs(getSkewCorrectedDate(systemClockOffset).getTime() - clockTime) >= 3e5;
534
+
535
+ // ../../node_modules/@aws-sdk/client-dynamodb/node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getUpdatedSystemClockOffset.js
536
+ var getUpdatedSystemClockOffset = (clockTime, currentSystemClockOffset) => {
537
+ const clockTimeInMs = Date.parse(clockTime);
538
+ if (isClockSkewed(clockTimeInMs, currentSystemClockOffset)) {
539
+ return clockTimeInMs - Date.now();
540
+ }
541
+ return currentSystemClockOffset;
542
+ };
543
+
544
+ // ../../node_modules/@aws-sdk/client-dynamodb/node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4Signer.js
545
+ var throwSigningPropertyError = (name, property) => {
546
+ if (!property) {
547
+ throw new Error(`Property \`${name}\` is not resolved for AWS SDK SigV4Auth`);
548
+ }
549
+ return property;
550
+ };
551
+ var validateSigningProperties = async (signingProperties) => {
552
+ const context = throwSigningPropertyError("context", signingProperties.context);
553
+ const config = throwSigningPropertyError("config", signingProperties.config);
554
+ const authScheme = context.endpointV2?.properties?.authSchemes?.[0];
555
+ const signerFunction = throwSigningPropertyError("signer", config.signer);
556
+ const signer = await signerFunction(authScheme);
557
+ const signingRegion = signingProperties?.signingRegion;
558
+ const signingRegionSet = signingProperties?.signingRegionSet;
559
+ const signingName = signingProperties?.signingName;
560
+ return {
561
+ config,
562
+ signer,
563
+ signingRegion,
564
+ signingRegionSet,
565
+ signingName
566
+ };
567
+ };
568
+ var AwsSdkSigV4Signer = class {
569
+ async sign(httpRequest, identity, signingProperties) {
570
+ if (!HttpRequest.isInstance(httpRequest)) {
571
+ throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");
572
+ }
573
+ const validatedProps = await validateSigningProperties(signingProperties);
574
+ const { config, signer } = validatedProps;
575
+ let { signingRegion, signingName } = validatedProps;
576
+ const handlerExecutionContext = signingProperties.context;
577
+ if (handlerExecutionContext?.authSchemes?.length ?? 0 > 1) {
578
+ const [first, second] = handlerExecutionContext.authSchemes;
579
+ if (first?.name === "sigv4a" && second?.name === "sigv4") {
580
+ signingRegion = second?.signingRegion ?? signingRegion;
581
+ signingName = second?.signingName ?? signingName;
582
+ }
583
+ }
584
+ const signedRequest = await signer.sign(httpRequest, {
585
+ signingDate: getSkewCorrectedDate(config.systemClockOffset),
586
+ signingRegion,
587
+ signingService: signingName
588
+ });
589
+ return signedRequest;
590
+ }
591
+ errorHandler(signingProperties) {
592
+ return (error) => {
593
+ const serverTime = error.ServerTime ?? getDateHeader(error.$response);
594
+ if (serverTime) {
595
+ const config = throwSigningPropertyError("config", signingProperties.config);
596
+ const initialSystemClockOffset = config.systemClockOffset;
597
+ config.systemClockOffset = getUpdatedSystemClockOffset(serverTime, config.systemClockOffset);
598
+ const clockSkewCorrected = config.systemClockOffset !== initialSystemClockOffset;
599
+ if (clockSkewCorrected && error.$metadata) {
600
+ error.$metadata.clockSkewCorrected = true;
601
+ }
602
+ }
603
+ throw error;
604
+ };
605
+ }
606
+ successHandler(httpResponse, signingProperties) {
607
+ const dateHeader = getDateHeader(httpResponse);
608
+ if (dateHeader) {
609
+ const config = throwSigningPropertyError("config", signingProperties.config);
610
+ config.systemClockOffset = getUpdatedSystemClockOffset(dateHeader, config.systemClockOffset);
611
+ }
612
+ }
613
+ };
614
+
615
+ // ../../node_modules/@aws-sdk/client-dynamodb/node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getArrayForCommaSeparatedString.js
616
+ var getArrayForCommaSeparatedString = (str) => typeof str === "string" && str.length > 0 ? str.split(",").map((item) => item.trim()) : [];
617
+
618
+ // ../../node_modules/@aws-sdk/client-dynamodb/node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getBearerTokenEnvKey.js
619
+ var getBearerTokenEnvKey = (signingName) => `AWS_BEARER_TOKEN_${signingName.replace(/[\s-]/g, "_").toUpperCase()}`;
620
+
621
+ // ../../node_modules/@aws-sdk/client-dynamodb/node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/NODE_AUTH_SCHEME_PREFERENCE_OPTIONS.js
622
+ var NODE_AUTH_SCHEME_PREFERENCE_ENV_KEY = "AWS_AUTH_SCHEME_PREFERENCE";
623
+ var NODE_AUTH_SCHEME_PREFERENCE_CONFIG_KEY = "auth_scheme_preference";
624
+ var NODE_AUTH_SCHEME_PREFERENCE_OPTIONS = {
625
+ environmentVariableSelector: (env2, options) => {
626
+ if (options?.signingName) {
627
+ const bearerTokenKey = getBearerTokenEnvKey(options.signingName);
628
+ if (bearerTokenKey in env2)
629
+ return ["httpBearerAuth"];
630
+ }
631
+ if (!(NODE_AUTH_SCHEME_PREFERENCE_ENV_KEY in env2))
632
+ return void 0;
633
+ return getArrayForCommaSeparatedString(env2[NODE_AUTH_SCHEME_PREFERENCE_ENV_KEY]);
634
+ },
635
+ configFileSelector: (profile) => {
636
+ if (!(NODE_AUTH_SCHEME_PREFERENCE_CONFIG_KEY in profile))
637
+ return void 0;
638
+ return getArrayForCommaSeparatedString(profile[NODE_AUTH_SCHEME_PREFERENCE_CONFIG_KEY]);
639
+ },
640
+ default: []
641
+ };
642
+
643
+ // ../../node_modules/@aws-sdk/client-dynamodb/node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4Config.js
644
+ var resolveAwsSdkSigV4Config = (config) => {
645
+ let inputCredentials = config.credentials;
646
+ let isUserSupplied = !!config.credentials;
647
+ let resolvedCredentials = void 0;
648
+ Object.defineProperty(config, "credentials", {
649
+ set(credentials) {
650
+ if (credentials && credentials !== inputCredentials && credentials !== resolvedCredentials) {
651
+ isUserSupplied = true;
652
+ }
653
+ inputCredentials = credentials;
654
+ const memoizedProvider = normalizeCredentialProvider(config, {
655
+ credentials: inputCredentials,
656
+ credentialDefaultProvider: config.credentialDefaultProvider
657
+ });
658
+ const boundProvider = bindCallerConfig(config, memoizedProvider);
659
+ if (isUserSupplied && !boundProvider.attributed) {
660
+ resolvedCredentials = async (options) => boundProvider(options).then((creds) => setCredentialFeature(creds, "CREDENTIALS_CODE", "e"));
661
+ resolvedCredentials.memoized = boundProvider.memoized;
662
+ resolvedCredentials.configBound = boundProvider.configBound;
663
+ resolvedCredentials.attributed = true;
664
+ } else {
665
+ resolvedCredentials = boundProvider;
666
+ }
667
+ },
668
+ get() {
669
+ return resolvedCredentials;
670
+ },
671
+ enumerable: true,
672
+ configurable: true
673
+ });
674
+ config.credentials = inputCredentials;
675
+ const { signingEscapePath = true, systemClockOffset = config.systemClockOffset || 0, sha256 } = config;
676
+ let signer;
677
+ if (config.signer) {
678
+ signer = normalizeProvider2(config.signer);
679
+ } else if (config.regionInfoProvider) {
680
+ signer = () => normalizeProvider2(config.region)().then(async (region) => [
681
+ await config.regionInfoProvider(region, {
682
+ useFipsEndpoint: await config.useFipsEndpoint(),
683
+ useDualstackEndpoint: await config.useDualstackEndpoint()
684
+ }) || {},
685
+ region
686
+ ]).then(([regionInfo, region]) => {
687
+ const { signingRegion, signingService } = regionInfo;
688
+ config.signingRegion = config.signingRegion || signingRegion || region;
689
+ config.signingName = config.signingName || signingService || config.serviceId;
690
+ const params = {
691
+ ...config,
692
+ credentials: config.credentials,
693
+ region: config.signingRegion,
694
+ service: config.signingName,
695
+ sha256,
696
+ uriEscapePath: signingEscapePath
697
+ };
698
+ const SignerCtor = config.signerConstructor || SignatureV4;
699
+ return new SignerCtor(params);
700
+ });
701
+ } else {
702
+ signer = async (authScheme) => {
703
+ authScheme = Object.assign({}, {
704
+ name: "sigv4",
705
+ signingName: config.signingName || config.defaultSigningName,
706
+ signingRegion: await normalizeProvider2(config.region)(),
707
+ properties: {}
708
+ }, authScheme);
709
+ const signingRegion = authScheme.signingRegion;
710
+ const signingService = authScheme.signingName;
711
+ config.signingRegion = config.signingRegion || signingRegion;
712
+ config.signingName = config.signingName || signingService || config.serviceId;
713
+ const params = {
714
+ ...config,
715
+ credentials: config.credentials,
716
+ region: config.signingRegion,
717
+ service: config.signingName,
718
+ sha256,
719
+ uriEscapePath: signingEscapePath
720
+ };
721
+ const SignerCtor = config.signerConstructor || SignatureV4;
722
+ return new SignerCtor(params);
723
+ };
724
+ }
725
+ const resolvedConfig = Object.assign(config, {
726
+ systemClockOffset,
727
+ signingEscapePath,
728
+ signer
729
+ });
730
+ return resolvedConfig;
731
+ };
732
+ function normalizeCredentialProvider(config, { credentials, credentialDefaultProvider }) {
733
+ let credentialsProvider;
734
+ if (credentials) {
735
+ if (!credentials?.memoized) {
736
+ credentialsProvider = memoizeIdentityProvider(credentials, isIdentityExpired, doesIdentityRequireRefresh);
737
+ } else {
738
+ credentialsProvider = credentials;
739
+ }
740
+ } else {
741
+ if (credentialDefaultProvider) {
742
+ credentialsProvider = normalizeProvider2(credentialDefaultProvider(Object.assign({}, config, {
743
+ parentClientConfig: config
744
+ })));
745
+ } else {
746
+ credentialsProvider = async () => {
747
+ throw new Error("@aws-sdk/core::resolveAwsSdkSigV4Config - `credentials` not provided and no credentialDefaultProvider was configured.");
748
+ };
749
+ }
750
+ }
751
+ credentialsProvider.memoized = true;
752
+ return credentialsProvider;
753
+ }
754
+ function bindCallerConfig(config, credentialsProvider) {
755
+ if (credentialsProvider.configBound) {
756
+ return credentialsProvider;
757
+ }
758
+ const fn = async (options) => credentialsProvider({ ...options, callerClientConfig: config });
759
+ fn.memoized = credentialsProvider.memoized;
760
+ fn.configBound = true;
761
+ return fn;
762
+ }
763
+
764
+ // ../../node_modules/@aws-sdk/client-dynamodb/node_modules/@aws-sdk/core/dist-es/submodules/protocols/common.js
765
+ var collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
766
+
767
+ // ../../node_modules/@aws-sdk/client-dynamodb/node_modules/@aws-sdk/middleware-user-agent/dist-es/check-features.js
768
+ var ACCOUNT_ID_ENDPOINT_REGEX = /\d{12}\.ddb/;
769
+ async function checkFeatures(context, config, args) {
770
+ const request = args.request;
771
+ if (request?.headers?.["smithy-protocol"] === "rpc-v2-cbor") {
772
+ setFeature(context, "PROTOCOL_RPC_V2_CBOR", "M");
773
+ }
774
+ if (typeof config.retryStrategy === "function") {
775
+ const retryStrategy = await config.retryStrategy();
776
+ if (typeof retryStrategy.acquireInitialRetryToken === "function") {
777
+ if (retryStrategy.constructor?.name?.includes("Adaptive")) {
778
+ setFeature(context, "RETRY_MODE_ADAPTIVE", "F");
779
+ } else {
780
+ setFeature(context, "RETRY_MODE_STANDARD", "E");
781
+ }
782
+ } else {
783
+ setFeature(context, "RETRY_MODE_LEGACY", "D");
784
+ }
785
+ }
786
+ if (typeof config.accountIdEndpointMode === "function") {
787
+ const endpointV2 = context.endpointV2;
788
+ if (String(endpointV2?.url?.hostname).match(ACCOUNT_ID_ENDPOINT_REGEX)) {
789
+ setFeature(context, "ACCOUNT_ID_ENDPOINT", "O");
790
+ }
791
+ switch (await config.accountIdEndpointMode?.()) {
792
+ case "disabled":
793
+ setFeature(context, "ACCOUNT_ID_MODE_DISABLED", "Q");
794
+ break;
795
+ case "preferred":
796
+ setFeature(context, "ACCOUNT_ID_MODE_PREFERRED", "P");
797
+ break;
798
+ case "required":
799
+ setFeature(context, "ACCOUNT_ID_MODE_REQUIRED", "R");
800
+ break;
801
+ }
802
+ }
803
+ const identity = context.__smithy_context?.selectedHttpAuthScheme?.identity;
804
+ if (identity?.$source) {
805
+ const credentials = identity;
806
+ if (credentials.accountId) {
807
+ setFeature(context, "RESOLVED_ACCOUNT_ID", "T");
808
+ }
809
+ for (const [key, value] of Object.entries(credentials.$source ?? {})) {
810
+ setFeature(context, key, value);
811
+ }
812
+ }
813
+ }
814
+
815
+ // ../../node_modules/@aws-sdk/client-dynamodb/node_modules/@aws-sdk/middleware-user-agent/dist-es/constants.js
816
+ var USER_AGENT = "user-agent";
817
+ var X_AMZ_USER_AGENT = "x-amz-user-agent";
818
+ var SPACE = " ";
819
+ var UA_NAME_SEPARATOR = "/";
820
+ var UA_NAME_ESCAPE_REGEX = /[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g;
821
+ var UA_VALUE_ESCAPE_REGEX = /[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g;
822
+ var UA_ESCAPE_CHAR = "-";
823
+
824
+ // ../../node_modules/@aws-sdk/client-dynamodb/node_modules/@aws-sdk/middleware-user-agent/dist-es/encode-features.js
825
+ var BYTE_LIMIT = 1024;
826
+ function encodeFeatures(features) {
827
+ let buffer = "";
828
+ for (const key in features) {
829
+ const val = features[key];
830
+ if (buffer.length + val.length + 1 <= BYTE_LIMIT) {
831
+ if (buffer.length) {
832
+ buffer += "," + val;
833
+ } else {
834
+ buffer += val;
835
+ }
836
+ continue;
837
+ }
838
+ break;
839
+ }
840
+ return buffer;
841
+ }
842
+
843
+ // ../../node_modules/@aws-sdk/client-dynamodb/node_modules/@aws-sdk/middleware-user-agent/dist-es/user-agent-middleware.js
844
+ var userAgentMiddleware = (options) => (next, context) => async (args) => {
845
+ const { request } = args;
846
+ if (!HttpRequest.isInstance(request)) {
847
+ return next(args);
848
+ }
849
+ const { headers } = request;
850
+ const userAgent = context?.userAgent?.map(escapeUserAgent) || [];
851
+ const defaultUserAgent = (await options.defaultUserAgentProvider()).map(escapeUserAgent);
852
+ await checkFeatures(context, options, args);
853
+ const awsContext = context;
854
+ defaultUserAgent.push(`m/${encodeFeatures(Object.assign({}, context.__smithy_context?.features, awsContext.__aws_sdk_context?.features))}`);
855
+ const customUserAgent = options?.customUserAgent?.map(escapeUserAgent) || [];
856
+ const appId = await options.userAgentAppId();
857
+ if (appId) {
858
+ defaultUserAgent.push(escapeUserAgent([`app/${appId}`]));
859
+ }
860
+ const sdkUserAgentValue = ([]).concat([...defaultUserAgent, ...userAgent, ...customUserAgent]).join(SPACE);
861
+ const normalUAValue = [
862
+ ...defaultUserAgent.filter((section) => section.startsWith("aws-sdk-")),
863
+ ...customUserAgent
864
+ ].join(SPACE);
865
+ if (options.runtime !== "browser") {
866
+ if (normalUAValue) {
867
+ headers[X_AMZ_USER_AGENT] = headers[X_AMZ_USER_AGENT] ? `${headers[USER_AGENT]} ${normalUAValue}` : normalUAValue;
868
+ }
869
+ headers[USER_AGENT] = sdkUserAgentValue;
870
+ } else {
871
+ headers[X_AMZ_USER_AGENT] = sdkUserAgentValue;
872
+ }
873
+ return next({
874
+ ...args,
875
+ request
876
+ });
877
+ };
878
+ var escapeUserAgent = (userAgentPair) => {
879
+ const name = userAgentPair[0].split(UA_NAME_SEPARATOR).map((part) => part.replace(UA_NAME_ESCAPE_REGEX, UA_ESCAPE_CHAR)).join(UA_NAME_SEPARATOR);
880
+ const version = userAgentPair[1]?.replace(UA_VALUE_ESCAPE_REGEX, UA_ESCAPE_CHAR);
881
+ const prefixSeparatorIndex = name.indexOf(UA_NAME_SEPARATOR);
882
+ const prefix = name.substring(0, prefixSeparatorIndex);
883
+ let uaName = name.substring(prefixSeparatorIndex + 1);
884
+ if (prefix === "api") {
885
+ uaName = uaName.toLowerCase();
886
+ }
887
+ return [prefix, uaName, version].filter((item) => item && item.length > 0).reduce((acc, item, index) => {
888
+ switch (index) {
889
+ case 0:
890
+ return item;
891
+ case 1:
892
+ return `${acc}/${item}`;
893
+ default:
894
+ return `${acc}#${item}`;
895
+ }
896
+ }, "");
897
+ };
898
+ var getUserAgentMiddlewareOptions = {
899
+ name: "getUserAgentMiddleware",
900
+ step: "build",
901
+ priority: "low",
902
+ tags: ["SET_USER_AGENT", "USER_AGENT"],
903
+ override: true
904
+ };
905
+ var getUserAgentPlugin = (config) => ({
906
+ applyToStack: (clientStack) => {
907
+ clientStack.add(userAgentMiddleware(config), getUserAgentMiddlewareOptions);
908
+ }
909
+ });
910
+
911
+ // ../../node_modules/@aws-sdk/client-dynamodb/node_modules/@aws-sdk/util-user-agent-node/dist-es/is-crt-available.js
912
+ var isCrtAvailable = () => {
913
+ return null;
914
+ };
915
+
916
+ // ../../node_modules/@aws-sdk/client-dynamodb/node_modules/@aws-sdk/util-user-agent-node/dist-es/defaultUserAgent.js
917
+ var createDefaultUserAgentProvider = ({ serviceId, clientVersion }) => {
918
+ return async (config) => {
919
+ const sections = [
920
+ ["aws-sdk-js", clientVersion],
921
+ ["ua", "2.1"],
922
+ [`os/${platform()}`, release()],
923
+ ["lang/js"],
924
+ ["md/nodejs", `${versions.node}`]
925
+ ];
926
+ const crtAvailable = isCrtAvailable();
927
+ if (crtAvailable) {
928
+ sections.push(crtAvailable);
929
+ }
930
+ if (serviceId) {
931
+ sections.push([`api/${serviceId}`, clientVersion]);
932
+ }
933
+ if (env.AWS_EXECUTION_ENV) {
934
+ sections.push([`exec-env/${env.AWS_EXECUTION_ENV}`]);
935
+ }
936
+ const appId = await config?.userAgentAppId?.();
937
+ const resolvedUserAgent = appId ? [...sections, [`app/${appId}`]] : [...sections];
938
+ return resolvedUserAgent;
939
+ };
940
+ };
941
+
942
+ // ../../node_modules/@aws-sdk/client-dynamodb/node_modules/@aws-sdk/util-user-agent-node/dist-es/nodeAppIdConfigOptions.js
943
+ var UA_APP_ID_ENV_NAME = "AWS_SDK_UA_APP_ID";
944
+ var UA_APP_ID_INI_NAME = "sdk_ua_app_id";
945
+ var UA_APP_ID_INI_NAME_DEPRECATED = "sdk-ua-app-id";
946
+ var NODE_APP_ID_CONFIG_OPTIONS = {
947
+ environmentVariableSelector: (env2) => env2[UA_APP_ID_ENV_NAME],
948
+ configFileSelector: (profile) => profile[UA_APP_ID_INI_NAME] ?? profile[UA_APP_ID_INI_NAME_DEPRECATED],
949
+ default: DEFAULT_UA_APP_ID
950
+ };
951
+
952
+ // ../../node_modules/@aws-sdk/client-dynamodb/node_modules/@aws-sdk/region-config-resolver/dist-es/extensions/index.js
953
+ var getAwsRegionExtensionConfiguration = (runtimeConfig) => {
954
+ return {
955
+ setRegion(region) {
956
+ runtimeConfig.region = region;
957
+ },
958
+ region() {
959
+ return runtimeConfig.region;
960
+ }
961
+ };
962
+ };
963
+ var resolveAwsRegionExtensionConfiguration = (awsRegionExtensionConfiguration) => {
964
+ return {
965
+ region: awsRegionExtensionConfiguration.region()
966
+ };
967
+ };
968
+
969
+ export { AwsSdkSigV4Signer, NODE_APP_ID_CONFIG_OPTIONS, NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, awsEndpointFunctions, collectBodyString, createDefaultUserAgentProvider, emitWarningIfUnsupportedVersion, getAwsRegionExtensionConfiguration, getHostHeaderPlugin, getLoggerPlugin, getRecursionDetectionPlugin, getUserAgentPlugin, resolveAwsRegionExtensionConfiguration, resolveAwsSdkSigV4Config, resolveHostHeaderConfig, resolveUserAgentConfig };