ec2-instance-running-scheduler 0.4.6 → 0.5.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.
- package/.editorconfig +12 -0
- package/.jsii +561 -117
- package/API.md +613 -54
- package/README.md +46 -64
- package/assets/funcs/running-scheduler.lambda/index.js +668 -335
- package/assets/funcs/running-scheduler.lambda/index.js.map +4 -4
- package/lib/constructs/ec2-instance-running-scheduler.d.ts +5 -4
- package/lib/constructs/ec2-instance-running-scheduler.js +8 -4
- package/lib/constructs/lambda-failure-detector/lambda-failure-detection.d.ts +26 -0
- package/lib/constructs/lambda-failure-detector/lambda-failure-detection.js +9 -0
- package/lib/constructs/lambda-failure-detector/lambda-failure-detector.d.ts +99 -0
- package/lib/constructs/lambda-failure-detector/lambda-failure-detector.js +172 -0
- package/lib/constructs/lambda-failure-detector/log-failure-filter.d.ts +22 -0
- package/lib/constructs/lambda-failure-detector/log-failure-filter.js +3 -0
- package/lib/constructs/running-scheduler-failure-detection.d.ts +21 -36
- package/lib/constructs/running-scheduler-failure-detection.js +54 -132
- package/lib/funcs/running-scheduler-wait-env.js +5 -5
- package/lib/funcs/running-scheduler.lambda.js +4 -3
- package/lib/index.d.ts +2 -1
- package/lib/index.js +3 -2
- package/lib/stacks/ec2-instance-running-schedule-stack.d.ts +3 -3
- package/lib/stacks/ec2-instance-running-schedule-stack.js +3 -3
- package/package.json +5 -4
|
@@ -20300,13 +20300,88 @@ var require_dist5 = __commonJS({
|
|
|
20300
20300
|
}
|
|
20301
20301
|
});
|
|
20302
20302
|
|
|
20303
|
-
// node_modules/
|
|
20304
|
-
var
|
|
20305
|
-
"node_modules/
|
|
20303
|
+
// node_modules/aws-lambda-secret-fetcher/lib/core/errors.js
|
|
20304
|
+
var require_errors2 = __commonJS({
|
|
20305
|
+
"node_modules/aws-lambda-secret-fetcher/lib/core/errors.js"(exports2) {
|
|
20306
|
+
"use strict";
|
|
20307
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
20308
|
+
exports2.SecretFetcherBinaryError = exports2.SecretFetcherResponseError = exports2.SecretFetcherPortError = exports2.SecretFetcherSessionTokenError = exports2.SecretFetcherError = void 0;
|
|
20309
|
+
var SecretFetcherError = class _SecretFetcherError extends Error {
|
|
20310
|
+
/**
|
|
20311
|
+
* @param message - Error message shown to the caller
|
|
20312
|
+
*/
|
|
20313
|
+
constructor(message) {
|
|
20314
|
+
super(message);
|
|
20315
|
+
this.name = "SecretFetcherError";
|
|
20316
|
+
Object.setPrototypeOf(this, _SecretFetcherError.prototype);
|
|
20317
|
+
}
|
|
20318
|
+
};
|
|
20319
|
+
exports2.SecretFetcherError = SecretFetcherError;
|
|
20320
|
+
var SecretFetcherSessionTokenError = class _SecretFetcherSessionTokenError extends SecretFetcherError {
|
|
20321
|
+
/**
|
|
20322
|
+
* @param message - Error message shown to the caller
|
|
20323
|
+
*/
|
|
20324
|
+
constructor(message) {
|
|
20325
|
+
super(message);
|
|
20326
|
+
this.name = "SecretFetcherSessionTokenError";
|
|
20327
|
+
Object.setPrototypeOf(this, _SecretFetcherSessionTokenError.prototype);
|
|
20328
|
+
}
|
|
20329
|
+
};
|
|
20330
|
+
exports2.SecretFetcherSessionTokenError = SecretFetcherSessionTokenError;
|
|
20331
|
+
var SecretFetcherPortError = class _SecretFetcherPortError extends SecretFetcherError {
|
|
20332
|
+
/**
|
|
20333
|
+
* @param message - Error message shown to the caller
|
|
20334
|
+
*/
|
|
20335
|
+
constructor(message) {
|
|
20336
|
+
super(message);
|
|
20337
|
+
this.name = "SecretFetcherPortError";
|
|
20338
|
+
Object.setPrototypeOf(this, _SecretFetcherPortError.prototype);
|
|
20339
|
+
}
|
|
20340
|
+
};
|
|
20341
|
+
exports2.SecretFetcherPortError = SecretFetcherPortError;
|
|
20342
|
+
var SecretFetcherResponseError = class _SecretFetcherResponseError extends SecretFetcherError {
|
|
20343
|
+
/**
|
|
20344
|
+
* @param message - Error message shown to the caller
|
|
20345
|
+
*/
|
|
20346
|
+
constructor(message) {
|
|
20347
|
+
super(message);
|
|
20348
|
+
this.name = "SecretFetcherResponseError";
|
|
20349
|
+
Object.setPrototypeOf(this, _SecretFetcherResponseError.prototype);
|
|
20350
|
+
}
|
|
20351
|
+
};
|
|
20352
|
+
exports2.SecretFetcherResponseError = SecretFetcherResponseError;
|
|
20353
|
+
var SecretFetcherBinaryError = class _SecretFetcherBinaryError extends SecretFetcherError {
|
|
20354
|
+
/**
|
|
20355
|
+
* @param message - Error message shown to the caller
|
|
20356
|
+
*/
|
|
20357
|
+
constructor(message) {
|
|
20358
|
+
super(message);
|
|
20359
|
+
this.name = "SecretFetcherBinaryError";
|
|
20360
|
+
Object.setPrototypeOf(this, _SecretFetcherBinaryError.prototype);
|
|
20361
|
+
}
|
|
20362
|
+
};
|
|
20363
|
+
exports2.SecretFetcherBinaryError = SecretFetcherBinaryError;
|
|
20364
|
+
}
|
|
20365
|
+
});
|
|
20366
|
+
|
|
20367
|
+
// node_modules/fetch-retrier/lib/core/errors.js
|
|
20368
|
+
var require_errors3 = __commonJS({
|
|
20369
|
+
"node_modules/fetch-retrier/lib/core/errors.js"(exports2) {
|
|
20306
20370
|
"use strict";
|
|
20307
20371
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
20308
|
-
exports2.
|
|
20309
|
-
var
|
|
20372
|
+
exports2.FetchRetrierUnreachableError = exports2.FetchRetrierInvalidOptionsError = exports2.FetchRetrierNetworkError = exports2.FetchRetrierHttpError = exports2.FetchRetrierAlreadyAbortedError = exports2.FetchRetrierAbortError = exports2.FetchRetrierError = void 0;
|
|
20373
|
+
var FetchRetrierError = class _FetchRetrierError extends Error {
|
|
20374
|
+
/**
|
|
20375
|
+
* @param message - Human-readable reason
|
|
20376
|
+
*/
|
|
20377
|
+
constructor(message) {
|
|
20378
|
+
super(message);
|
|
20379
|
+
this.name = "FetchRetrierError";
|
|
20380
|
+
Object.setPrototypeOf(this, _FetchRetrierError.prototype);
|
|
20381
|
+
}
|
|
20382
|
+
};
|
|
20383
|
+
exports2.FetchRetrierError = FetchRetrierError;
|
|
20384
|
+
var FetchRetrierAbortError = class _FetchRetrierAbortError extends FetchRetrierError {
|
|
20310
20385
|
/**
|
|
20311
20386
|
* @param message - Human-readable reason (default: `'Aborted'`)
|
|
20312
20387
|
*/
|
|
@@ -20328,7 +20403,7 @@ var require_lib = __commonJS({
|
|
|
20328
20403
|
}
|
|
20329
20404
|
};
|
|
20330
20405
|
exports2.FetchRetrierAlreadyAbortedError = FetchRetrierAlreadyAbortedError;
|
|
20331
|
-
var FetchRetrierHttpError = class _FetchRetrierHttpError extends
|
|
20406
|
+
var FetchRetrierHttpError = class _FetchRetrierHttpError extends FetchRetrierError {
|
|
20332
20407
|
/**
|
|
20333
20408
|
* @param message - Error description
|
|
20334
20409
|
* @param status - HTTP status code from the last non-OK response
|
|
@@ -20343,7 +20418,7 @@ var require_lib = __commonJS({
|
|
|
20343
20418
|
}
|
|
20344
20419
|
};
|
|
20345
20420
|
exports2.FetchRetrierHttpError = FetchRetrierHttpError;
|
|
20346
|
-
var FetchRetrierNetworkError = class _FetchRetrierNetworkError extends
|
|
20421
|
+
var FetchRetrierNetworkError = class _FetchRetrierNetworkError extends FetchRetrierError {
|
|
20347
20422
|
/**
|
|
20348
20423
|
* @param message - Human-readable reason (default: `'Network error'`)
|
|
20349
20424
|
* @param cause - Original error from the underlying `fetch`, when available
|
|
@@ -20356,7 +20431,7 @@ var require_lib = __commonJS({
|
|
|
20356
20431
|
}
|
|
20357
20432
|
};
|
|
20358
20433
|
exports2.FetchRetrierNetworkError = FetchRetrierNetworkError;
|
|
20359
|
-
var FetchRetrierInvalidOptionsError = class _FetchRetrierInvalidOptionsError extends
|
|
20434
|
+
var FetchRetrierInvalidOptionsError = class _FetchRetrierInvalidOptionsError extends FetchRetrierError {
|
|
20360
20435
|
/**
|
|
20361
20436
|
* @param message - Human-readable reason describing the invalid option
|
|
20362
20437
|
*/
|
|
@@ -20367,7 +20442,7 @@ var require_lib = __commonJS({
|
|
|
20367
20442
|
}
|
|
20368
20443
|
};
|
|
20369
20444
|
exports2.FetchRetrierInvalidOptionsError = FetchRetrierInvalidOptionsError;
|
|
20370
|
-
var FetchRetrierUnreachableError = class _FetchRetrierUnreachableError extends
|
|
20445
|
+
var FetchRetrierUnreachableError = class _FetchRetrierUnreachableError extends FetchRetrierError {
|
|
20371
20446
|
/**
|
|
20372
20447
|
* @param message - Human-readable reason (default: `'Unreachable'`)
|
|
20373
20448
|
*/
|
|
@@ -20378,150 +20453,278 @@ var require_lib = __commonJS({
|
|
|
20378
20453
|
}
|
|
20379
20454
|
};
|
|
20380
20455
|
exports2.FetchRetrierUnreachableError = FetchRetrierUnreachableError;
|
|
20456
|
+
}
|
|
20457
|
+
});
|
|
20458
|
+
|
|
20459
|
+
// node_modules/fetch-retrier/lib/core/backoff/jitter.js
|
|
20460
|
+
var require_jitter = __commonJS({
|
|
20461
|
+
"node_modules/fetch-retrier/lib/core/backoff/jitter.js"(exports2) {
|
|
20462
|
+
"use strict";
|
|
20463
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
20464
|
+
exports2.fullJitter = void 0;
|
|
20465
|
+
var fullJitter = (base, attempt, maxBackoffMs) => {
|
|
20466
|
+
const cap = base * Math.pow(2, attempt);
|
|
20467
|
+
const delay = Math.floor(Math.random() * cap);
|
|
20468
|
+
if (maxBackoffMs === void 0) {
|
|
20469
|
+
return delay;
|
|
20470
|
+
}
|
|
20471
|
+
return Math.min(delay, maxBackoffMs);
|
|
20472
|
+
};
|
|
20473
|
+
exports2.fullJitter = fullJitter;
|
|
20474
|
+
}
|
|
20475
|
+
});
|
|
20476
|
+
|
|
20477
|
+
// node_modules/fetch-retrier/lib/core/backoff/retry-after.js
|
|
20478
|
+
var require_retry_after = __commonJS({
|
|
20479
|
+
"node_modules/fetch-retrier/lib/core/backoff/retry-after.js"(exports2) {
|
|
20480
|
+
"use strict";
|
|
20481
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
20482
|
+
exports2.resolveRetryDelayMs = exports2.parseRetryAfterMs = void 0;
|
|
20483
|
+
var jitter_1 = require_jitter();
|
|
20484
|
+
var parseRetryAfterMs = (value, nowMs = Date.now()) => {
|
|
20485
|
+
const trimmed = value.trim();
|
|
20486
|
+
if (trimmed === "") {
|
|
20487
|
+
return void 0;
|
|
20488
|
+
}
|
|
20489
|
+
if (/^\d+$/.test(trimmed)) {
|
|
20490
|
+
return Number.parseInt(trimmed, 10) * 1e3;
|
|
20491
|
+
}
|
|
20492
|
+
if (/^-?\d+(\.\d+)?$/.test(trimmed)) {
|
|
20493
|
+
return void 0;
|
|
20494
|
+
}
|
|
20495
|
+
const dateMs = Date.parse(trimmed);
|
|
20496
|
+
if (Number.isNaN(dateMs)) {
|
|
20497
|
+
return void 0;
|
|
20498
|
+
}
|
|
20499
|
+
return Math.max(0, dateMs - nowMs);
|
|
20500
|
+
};
|
|
20501
|
+
exports2.parseRetryAfterMs = parseRetryAfterMs;
|
|
20502
|
+
var resolveRetryDelayMs = (response, baseBackoffMs, attempt, maxBackoffMs, nowMs = Date.now()) => {
|
|
20503
|
+
const header = response.headers?.get("Retry-After");
|
|
20504
|
+
if (header == null) {
|
|
20505
|
+
return (0, jitter_1.fullJitter)(baseBackoffMs, attempt, maxBackoffMs);
|
|
20506
|
+
}
|
|
20507
|
+
const fromHeader = (0, exports2.parseRetryAfterMs)(header, nowMs);
|
|
20508
|
+
if (fromHeader === void 0) {
|
|
20509
|
+
return (0, jitter_1.fullJitter)(baseBackoffMs, attempt, maxBackoffMs);
|
|
20510
|
+
}
|
|
20511
|
+
return fromHeader;
|
|
20512
|
+
};
|
|
20513
|
+
exports2.resolveRetryDelayMs = resolveRetryDelayMs;
|
|
20514
|
+
}
|
|
20515
|
+
});
|
|
20516
|
+
|
|
20517
|
+
// node_modules/fetch-retrier/lib/core/http/timed-fetch.js
|
|
20518
|
+
var require_timed_fetch = __commonJS({
|
|
20519
|
+
"node_modules/fetch-retrier/lib/core/http/timed-fetch.js"(exports2) {
|
|
20520
|
+
"use strict";
|
|
20521
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
20522
|
+
exports2.timedFetch = void 0;
|
|
20523
|
+
var timedFetch = async (url, options) => {
|
|
20524
|
+
const { timeoutMs, init, headers, signal: externalSignal } = options;
|
|
20525
|
+
const controller = new AbortController();
|
|
20526
|
+
const timer = setTimeout(() => controller.abort(), timeoutMs);
|
|
20527
|
+
const onExternalAbort = () => {
|
|
20528
|
+
clearTimeout(timer);
|
|
20529
|
+
controller.abort();
|
|
20530
|
+
};
|
|
20531
|
+
if (externalSignal) {
|
|
20532
|
+
externalSignal.addEventListener("abort", onExternalAbort);
|
|
20533
|
+
}
|
|
20534
|
+
try {
|
|
20535
|
+
return await fetch(url, {
|
|
20536
|
+
...init,
|
|
20537
|
+
...headers !== void 0 ? { headers } : {},
|
|
20538
|
+
signal: controller.signal
|
|
20539
|
+
});
|
|
20540
|
+
} finally {
|
|
20541
|
+
clearTimeout(timer);
|
|
20542
|
+
externalSignal?.removeEventListener("abort", onExternalAbort);
|
|
20543
|
+
}
|
|
20544
|
+
};
|
|
20545
|
+
exports2.timedFetch = timedFetch;
|
|
20546
|
+
}
|
|
20547
|
+
});
|
|
20548
|
+
|
|
20549
|
+
// node_modules/fetch-retrier/lib/core/policy/default-should-retry.js
|
|
20550
|
+
var require_default_should_retry = __commonJS({
|
|
20551
|
+
"node_modules/fetch-retrier/lib/core/policy/default-should-retry.js"(exports2) {
|
|
20552
|
+
"use strict";
|
|
20553
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
20554
|
+
exports2.defaultShouldRetry = exports2.DEFAULT_RETRYABLE_HTTP_STATUSES = void 0;
|
|
20381
20555
|
exports2.DEFAULT_RETRYABLE_HTTP_STATUSES = [408, 425, 429, 500, 502, 503, 504];
|
|
20382
20556
|
var defaultShouldRetry = (response, _body) => {
|
|
20383
20557
|
return exports2.DEFAULT_RETRYABLE_HTTP_STATUSES.includes(response.status);
|
|
20384
20558
|
};
|
|
20385
20559
|
exports2.defaultShouldRetry = defaultShouldRetry;
|
|
20560
|
+
}
|
|
20561
|
+
});
|
|
20562
|
+
|
|
20563
|
+
// node_modules/fetch-retrier/lib/core/policy/validate-options.js
|
|
20564
|
+
var require_validate_options = __commonJS({
|
|
20565
|
+
"node_modules/fetch-retrier/lib/core/policy/validate-options.js"(exports2) {
|
|
20566
|
+
"use strict";
|
|
20567
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
20568
|
+
exports2.validateRequestOptions = void 0;
|
|
20569
|
+
var errors_1 = require_errors3();
|
|
20386
20570
|
var validateRequestOptions = (options) => {
|
|
20387
|
-
const { retries, timeoutMs, baseBackoffMs } = options;
|
|
20571
|
+
const { retries, timeoutMs, baseBackoffMs, maxBackoffMs } = options;
|
|
20388
20572
|
if (retries < 1) {
|
|
20389
|
-
throw new FetchRetrierInvalidOptionsError("retries must be >= 1");
|
|
20573
|
+
throw new errors_1.FetchRetrierInvalidOptionsError("retries must be >= 1");
|
|
20390
20574
|
}
|
|
20391
20575
|
if (timeoutMs <= 0) {
|
|
20392
|
-
throw new FetchRetrierInvalidOptionsError("timeoutMs must be > 0");
|
|
20576
|
+
throw new errors_1.FetchRetrierInvalidOptionsError("timeoutMs must be > 0");
|
|
20393
20577
|
}
|
|
20394
20578
|
if (baseBackoffMs < 0) {
|
|
20395
|
-
throw new FetchRetrierInvalidOptionsError("baseBackoffMs must be >= 0");
|
|
20579
|
+
throw new errors_1.FetchRetrierInvalidOptionsError("baseBackoffMs must be >= 0");
|
|
20396
20580
|
}
|
|
20581
|
+
if (maxBackoffMs !== void 0 && maxBackoffMs < 0) {
|
|
20582
|
+
throw new errors_1.FetchRetrierInvalidOptionsError("maxBackoffMs must be >= 0");
|
|
20583
|
+
}
|
|
20584
|
+
};
|
|
20585
|
+
exports2.validateRequestOptions = validateRequestOptions;
|
|
20586
|
+
}
|
|
20587
|
+
});
|
|
20588
|
+
|
|
20589
|
+
// node_modules/fetch-retrier/lib/core/retry-predicates.js
|
|
20590
|
+
var require_retry_predicates = __commonJS({
|
|
20591
|
+
"node_modules/fetch-retrier/lib/core/retry-predicates.js"(exports2) {
|
|
20592
|
+
"use strict";
|
|
20593
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
20594
|
+
exports2.isLastAttempt = void 0;
|
|
20595
|
+
var isLastAttempt = (attempt, retries) => {
|
|
20596
|
+
return attempt === retries;
|
|
20597
|
+
};
|
|
20598
|
+
exports2.isLastAttempt = isLastAttempt;
|
|
20599
|
+
}
|
|
20600
|
+
});
|
|
20601
|
+
|
|
20602
|
+
// node_modules/fetch-retrier/lib/core/time/wait.js
|
|
20603
|
+
var require_wait = __commonJS({
|
|
20604
|
+
"node_modules/fetch-retrier/lib/core/time/wait.js"(exports2) {
|
|
20605
|
+
"use strict";
|
|
20606
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
20607
|
+
exports2.wait = void 0;
|
|
20608
|
+
var wait = (ms) => {
|
|
20609
|
+
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
20397
20610
|
};
|
|
20611
|
+
exports2.wait = wait;
|
|
20612
|
+
}
|
|
20613
|
+
});
|
|
20614
|
+
|
|
20615
|
+
// node_modules/fetch-retrier/lib/core/fetch-retrier.js
|
|
20616
|
+
var require_fetch_retrier = __commonJS({
|
|
20617
|
+
"node_modules/fetch-retrier/lib/core/fetch-retrier.js"(exports2) {
|
|
20618
|
+
"use strict";
|
|
20619
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
20620
|
+
exports2.fetchRetrier = void 0;
|
|
20621
|
+
var jitter_1 = require_jitter();
|
|
20622
|
+
var retry_after_1 = require_retry_after();
|
|
20623
|
+
var errors_1 = require_errors3();
|
|
20624
|
+
var timed_fetch_1 = require_timed_fetch();
|
|
20625
|
+
var default_should_retry_1 = require_default_should_retry();
|
|
20626
|
+
var validate_options_1 = require_validate_options();
|
|
20627
|
+
var retry_predicates_1 = require_retry_predicates();
|
|
20628
|
+
var wait_1 = require_wait();
|
|
20398
20629
|
var fetchRetrier = async (url, options) => {
|
|
20399
|
-
const { headers, init, retries, timeoutMs, baseBackoffMs, signal: externalSignal, shouldRetry =
|
|
20400
|
-
validateRequestOptions({ retries, timeoutMs, baseBackoffMs });
|
|
20630
|
+
const { headers, init, retries, timeoutMs, baseBackoffMs, maxBackoffMs, signal: externalSignal, shouldRetry = default_should_retry_1.defaultShouldRetry } = options;
|
|
20631
|
+
(0, validate_options_1.validateRequestOptions)({ retries, timeoutMs, baseBackoffMs, maxBackoffMs });
|
|
20401
20632
|
for (let attempt = 1; attempt <= retries; attempt++) {
|
|
20402
20633
|
if (externalSignal?.aborted) {
|
|
20403
|
-
throw new FetchRetrierAlreadyAbortedError();
|
|
20404
|
-
}
|
|
20405
|
-
const controller = new AbortController();
|
|
20406
|
-
const timer = setTimeout(() => controller.abort(), timeoutMs);
|
|
20407
|
-
const onExternalAbort = () => {
|
|
20408
|
-
clearTimeout(timer);
|
|
20409
|
-
controller.abort();
|
|
20410
|
-
};
|
|
20411
|
-
if (externalSignal) {
|
|
20412
|
-
externalSignal.addEventListener("abort", onExternalAbort);
|
|
20634
|
+
throw new errors_1.FetchRetrierAlreadyAbortedError();
|
|
20413
20635
|
}
|
|
20414
20636
|
try {
|
|
20415
|
-
const res = await
|
|
20416
|
-
|
|
20417
|
-
|
|
20418
|
-
|
|
20637
|
+
const res = await (0, timed_fetch_1.timedFetch)(url, {
|
|
20638
|
+
timeoutMs,
|
|
20639
|
+
init,
|
|
20640
|
+
headers,
|
|
20641
|
+
signal: externalSignal
|
|
20419
20642
|
});
|
|
20420
|
-
clearTimeout(timer);
|
|
20421
|
-
externalSignal?.removeEventListener("abort", onExternalAbort);
|
|
20422
20643
|
if (res.ok) {
|
|
20423
20644
|
return res;
|
|
20424
20645
|
}
|
|
20425
20646
|
const text = await res.text();
|
|
20426
20647
|
const isContinue = shouldRetry(res, text);
|
|
20427
|
-
if (isContinue) {
|
|
20428
|
-
|
|
20429
|
-
|
|
20430
|
-
|
|
20431
|
-
|
|
20432
|
-
} else {
|
|
20433
|
-
throw new FetchRetrierHttpError(`Non-retriable HTTP error: ${res.status}`, res.status, text);
|
|
20648
|
+
if (!isContinue) {
|
|
20649
|
+
throw new errors_1.FetchRetrierHttpError(`Non-retriable HTTP error: ${res.status}`, res.status, text);
|
|
20650
|
+
}
|
|
20651
|
+
if ((0, retry_predicates_1.isLastAttempt)(attempt, retries)) {
|
|
20652
|
+
throw new errors_1.FetchRetrierHttpError(`HTTP ${res.status}`, res.status, text);
|
|
20434
20653
|
}
|
|
20654
|
+
await (0, wait_1.wait)((0, retry_after_1.resolveRetryDelayMs)(res, baseBackoffMs, attempt, maxBackoffMs));
|
|
20435
20655
|
} catch (err) {
|
|
20436
|
-
clearTimeout(timer);
|
|
20437
|
-
externalSignal?.removeEventListener("abort", onExternalAbort);
|
|
20438
20656
|
if (err instanceof Error && err.name === "AbortError") {
|
|
20439
|
-
if (attempt
|
|
20440
|
-
throw err instanceof FetchRetrierAbortError ? err : new FetchRetrierAbortError();
|
|
20441
|
-
|
|
20657
|
+
if ((0, retry_predicates_1.isLastAttempt)(attempt, retries)) {
|
|
20658
|
+
throw err instanceof errors_1.FetchRetrierAbortError ? err : new errors_1.FetchRetrierAbortError();
|
|
20659
|
+
}
|
|
20660
|
+
await (0, wait_1.wait)((0, jitter_1.fullJitter)(baseBackoffMs, attempt, maxBackoffMs));
|
|
20442
20661
|
continue;
|
|
20443
20662
|
}
|
|
20444
20663
|
if (err instanceof TypeError) {
|
|
20445
|
-
if (attempt
|
|
20446
|
-
throw new FetchRetrierNetworkError("Network error", err);
|
|
20447
|
-
|
|
20664
|
+
if ((0, retry_predicates_1.isLastAttempt)(attempt, retries)) {
|
|
20665
|
+
throw new errors_1.FetchRetrierNetworkError("Network error", err);
|
|
20666
|
+
}
|
|
20667
|
+
await (0, wait_1.wait)((0, jitter_1.fullJitter)(baseBackoffMs, attempt, maxBackoffMs));
|
|
20448
20668
|
continue;
|
|
20449
20669
|
}
|
|
20450
20670
|
throw err;
|
|
20451
20671
|
}
|
|
20452
20672
|
}
|
|
20453
|
-
throw new FetchRetrierUnreachableError();
|
|
20673
|
+
throw new errors_1.FetchRetrierUnreachableError();
|
|
20454
20674
|
};
|
|
20455
20675
|
exports2.fetchRetrier = fetchRetrier;
|
|
20456
|
-
var wait = (ms) => {
|
|
20457
|
-
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
20458
|
-
};
|
|
20459
|
-
var fullJitter = (base, attempt) => {
|
|
20460
|
-
const cap = base * Math.pow(2, attempt);
|
|
20461
|
-
return Math.floor(Math.random() * cap);
|
|
20462
|
-
};
|
|
20463
|
-
var parseRetryAfterMs = (value, nowMs = Date.now()) => {
|
|
20464
|
-
const trimmed = value.trim();
|
|
20465
|
-
if (trimmed === "") {
|
|
20466
|
-
return void 0;
|
|
20467
|
-
}
|
|
20468
|
-
if (/^\d+$/.test(trimmed)) {
|
|
20469
|
-
return Number.parseInt(trimmed, 10) * 1e3;
|
|
20470
|
-
}
|
|
20471
|
-
if (/^-?\d+(\.\d+)?$/.test(trimmed)) {
|
|
20472
|
-
return void 0;
|
|
20473
|
-
}
|
|
20474
|
-
const dateMs = Date.parse(trimmed);
|
|
20475
|
-
if (Number.isNaN(dateMs)) {
|
|
20476
|
-
return void 0;
|
|
20477
|
-
}
|
|
20478
|
-
return Math.max(0, dateMs - nowMs);
|
|
20479
|
-
};
|
|
20480
|
-
exports2.parseRetryAfterMs = parseRetryAfterMs;
|
|
20481
|
-
var resolveRetryDelayMs = (response, baseBackoffMs, attempt, nowMs = Date.now()) => {
|
|
20482
|
-
const header = response.headers?.get("Retry-After");
|
|
20483
|
-
if (header == null) {
|
|
20484
|
-
return fullJitter(baseBackoffMs, attempt);
|
|
20485
|
-
}
|
|
20486
|
-
const fromHeader = (0, exports2.parseRetryAfterMs)(header, nowMs);
|
|
20487
|
-
if (fromHeader === void 0) {
|
|
20488
|
-
return fullJitter(baseBackoffMs, attempt);
|
|
20489
|
-
}
|
|
20490
|
-
return fromHeader;
|
|
20491
|
-
};
|
|
20492
20676
|
}
|
|
20493
20677
|
});
|
|
20494
20678
|
|
|
20495
|
-
// node_modules/
|
|
20496
|
-
var
|
|
20497
|
-
"node_modules/
|
|
20679
|
+
// node_modules/fetch-retrier/lib/index.js
|
|
20680
|
+
var require_lib = __commonJS({
|
|
20681
|
+
"node_modules/fetch-retrier/lib/index.js"(exports2) {
|
|
20498
20682
|
"use strict";
|
|
20499
20683
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
20500
|
-
exports2.
|
|
20501
|
-
var
|
|
20502
|
-
|
|
20503
|
-
|
|
20504
|
-
|
|
20505
|
-
|
|
20506
|
-
|
|
20507
|
-
|
|
20508
|
-
|
|
20509
|
-
|
|
20510
|
-
|
|
20511
|
-
|
|
20512
|
-
|
|
20513
|
-
|
|
20514
|
-
|
|
20515
|
-
|
|
20516
|
-
|
|
20517
|
-
|
|
20518
|
-
|
|
20684
|
+
exports2.defaultShouldRetry = exports2.DEFAULT_RETRYABLE_HTTP_STATUSES = exports2.fetchRetrier = exports2.parseRetryAfterMs = exports2.FetchRetrierUnreachableError = exports2.FetchRetrierNetworkError = exports2.FetchRetrierInvalidOptionsError = exports2.FetchRetrierHttpError = exports2.FetchRetrierError = exports2.FetchRetrierAlreadyAbortedError = exports2.FetchRetrierAbortError = void 0;
|
|
20685
|
+
var errors_1 = require_errors3();
|
|
20686
|
+
Object.defineProperty(exports2, "FetchRetrierAbortError", { enumerable: true, get: function() {
|
|
20687
|
+
return errors_1.FetchRetrierAbortError;
|
|
20688
|
+
} });
|
|
20689
|
+
Object.defineProperty(exports2, "FetchRetrierAlreadyAbortedError", { enumerable: true, get: function() {
|
|
20690
|
+
return errors_1.FetchRetrierAlreadyAbortedError;
|
|
20691
|
+
} });
|
|
20692
|
+
Object.defineProperty(exports2, "FetchRetrierError", { enumerable: true, get: function() {
|
|
20693
|
+
return errors_1.FetchRetrierError;
|
|
20694
|
+
} });
|
|
20695
|
+
Object.defineProperty(exports2, "FetchRetrierHttpError", { enumerable: true, get: function() {
|
|
20696
|
+
return errors_1.FetchRetrierHttpError;
|
|
20697
|
+
} });
|
|
20698
|
+
Object.defineProperty(exports2, "FetchRetrierInvalidOptionsError", { enumerable: true, get: function() {
|
|
20699
|
+
return errors_1.FetchRetrierInvalidOptionsError;
|
|
20700
|
+
} });
|
|
20701
|
+
Object.defineProperty(exports2, "FetchRetrierNetworkError", { enumerable: true, get: function() {
|
|
20702
|
+
return errors_1.FetchRetrierNetworkError;
|
|
20703
|
+
} });
|
|
20704
|
+
Object.defineProperty(exports2, "FetchRetrierUnreachableError", { enumerable: true, get: function() {
|
|
20705
|
+
return errors_1.FetchRetrierUnreachableError;
|
|
20706
|
+
} });
|
|
20707
|
+
var retry_after_1 = require_retry_after();
|
|
20708
|
+
Object.defineProperty(exports2, "parseRetryAfterMs", { enumerable: true, get: function() {
|
|
20709
|
+
return retry_after_1.parseRetryAfterMs;
|
|
20710
|
+
} });
|
|
20711
|
+
var fetch_retrier_1 = require_fetch_retrier();
|
|
20712
|
+
Object.defineProperty(exports2, "fetchRetrier", { enumerable: true, get: function() {
|
|
20713
|
+
return fetch_retrier_1.fetchRetrier;
|
|
20714
|
+
} });
|
|
20715
|
+
var default_should_retry_1 = require_default_should_retry();
|
|
20716
|
+
Object.defineProperty(exports2, "DEFAULT_RETRYABLE_HTTP_STATUSES", { enumerable: true, get: function() {
|
|
20717
|
+
return default_should_retry_1.DEFAULT_RETRYABLE_HTTP_STATUSES;
|
|
20718
|
+
} });
|
|
20719
|
+
Object.defineProperty(exports2, "defaultShouldRetry", { enumerable: true, get: function() {
|
|
20720
|
+
return default_should_retry_1.defaultShouldRetry;
|
|
20721
|
+
} });
|
|
20519
20722
|
}
|
|
20520
20723
|
});
|
|
20521
20724
|
|
|
20522
|
-
// node_modules/
|
|
20523
|
-
var
|
|
20524
|
-
"node_modules/
|
|
20725
|
+
// node_modules/strict-env-resolver/lib/index.js
|
|
20726
|
+
var require_lib2 = __commonJS({
|
|
20727
|
+
"node_modules/strict-env-resolver/lib/index.js"(exports2) {
|
|
20525
20728
|
"use strict";
|
|
20526
20729
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
20527
20730
|
exports2.StrictEnvResolver = exports2.StrictEnvType = exports2.StrictEnvValidationError = exports2.StrictEnvError = void 0;
|
|
@@ -20571,13 +20774,38 @@ ${lines.join("\n")}`;
|
|
|
20571
20774
|
}
|
|
20572
20775
|
};
|
|
20573
20776
|
exports2.StrictEnvValidationError = StrictEnvValidationError;
|
|
20777
|
+
var MIN_POSITIVE_INTEGER = 1;
|
|
20778
|
+
var MAX_NEGATIVE_INTEGER = -1;
|
|
20779
|
+
var ZERO = 0;
|
|
20780
|
+
var MIN_PORT = MIN_POSITIVE_INTEGER;
|
|
20781
|
+
var MAX_PORT = 65535;
|
|
20782
|
+
var createNumberSpec = (constraints) => ({
|
|
20783
|
+
type: "number",
|
|
20784
|
+
...constraints?.min !== void 0 ? { min: constraints.min } : {},
|
|
20785
|
+
...constraints?.max !== void 0 ? { max: constraints.max } : {},
|
|
20786
|
+
...constraints?.exclusiveMin !== void 0 ? { exclusiveMin: constraints.exclusiveMin } : {},
|
|
20787
|
+
...constraints?.exclusiveMax !== void 0 ? { exclusiveMax: constraints.exclusiveMax } : {},
|
|
20788
|
+
...constraints?.integer !== void 0 ? { integer: constraints.integer } : {}
|
|
20789
|
+
});
|
|
20790
|
+
var NumberSpec = Object.assign((constraints) => createNumberSpec(constraints), { type: "number" }, {
|
|
20791
|
+
Integer: createNumberSpec({ integer: true }),
|
|
20792
|
+
PositiveInteger: createNumberSpec({ min: MIN_POSITIVE_INTEGER, integer: true }),
|
|
20793
|
+
NegativeInteger: createNumberSpec({ max: MAX_NEGATIVE_INTEGER, integer: true }),
|
|
20794
|
+
NonNegativeInteger: createNumberSpec({ min: ZERO, integer: true }),
|
|
20795
|
+
Positive: createNumberSpec({ exclusiveMin: ZERO }),
|
|
20796
|
+
Negative: createNumberSpec({ exclusiveMax: ZERO }),
|
|
20797
|
+
NonNegative: createNumberSpec({ min: ZERO }),
|
|
20798
|
+
Port: createNumberSpec({ min: MIN_PORT, max: MAX_PORT, integer: true })
|
|
20799
|
+
});
|
|
20574
20800
|
exports2.StrictEnvType = {
|
|
20575
20801
|
/** Spec for a string value (returned as-is unless `trim: true` is set in options). */
|
|
20576
20802
|
String: { type: "string" },
|
|
20577
20803
|
/**
|
|
20578
20804
|
* Spec for a finite numeric value (`Number()` parsing; rejects `NaN` and `Infinity`).
|
|
20805
|
+
* Use as `StrictEnvType.Number`, call as `StrictEnvType.Number({ min, max, exclusiveMin, exclusiveMax, integer })`,
|
|
20806
|
+
* or use a nested preset such as `StrictEnvType.Number.Port`.
|
|
20579
20807
|
*/
|
|
20580
|
-
Number:
|
|
20808
|
+
Number: NumberSpec,
|
|
20581
20809
|
/** Spec for a boolean value (`1`/`true`/`yes`/`on` → `true`; other non-empty values → `false`). */
|
|
20582
20810
|
Boolean: { type: "boolean" },
|
|
20583
20811
|
/**
|
|
@@ -20598,6 +20826,44 @@ ${lines.join("\n")}`;
|
|
|
20598
20826
|
}
|
|
20599
20827
|
return raw.trim();
|
|
20600
20828
|
};
|
|
20829
|
+
var validateNumberConstraints = (key, raw, n, constraints) => {
|
|
20830
|
+
if (constraints.integer === true && !Number.isInteger(n)) {
|
|
20831
|
+
return { key, message: `Env ${key}: expected integer, got "${raw}"`, raw, kind: "invalid_number" };
|
|
20832
|
+
}
|
|
20833
|
+
if (constraints.min !== void 0 && n < constraints.min) {
|
|
20834
|
+
return {
|
|
20835
|
+
key,
|
|
20836
|
+
message: `Env ${key}: must be >= ${constraints.min}, got ${n}`,
|
|
20837
|
+
raw,
|
|
20838
|
+
kind: "invalid_number"
|
|
20839
|
+
};
|
|
20840
|
+
}
|
|
20841
|
+
if (constraints.exclusiveMin !== void 0 && n <= constraints.exclusiveMin) {
|
|
20842
|
+
return {
|
|
20843
|
+
key,
|
|
20844
|
+
message: `Env ${key}: must be > ${constraints.exclusiveMin}, got ${n}`,
|
|
20845
|
+
raw,
|
|
20846
|
+
kind: "invalid_number"
|
|
20847
|
+
};
|
|
20848
|
+
}
|
|
20849
|
+
if (constraints.max !== void 0 && n > constraints.max) {
|
|
20850
|
+
return {
|
|
20851
|
+
key,
|
|
20852
|
+
message: `Env ${key}: must be <= ${constraints.max}, got ${n}`,
|
|
20853
|
+
raw,
|
|
20854
|
+
kind: "invalid_number"
|
|
20855
|
+
};
|
|
20856
|
+
}
|
|
20857
|
+
if (constraints.exclusiveMax !== void 0 && n >= constraints.exclusiveMax) {
|
|
20858
|
+
return {
|
|
20859
|
+
key,
|
|
20860
|
+
message: `Env ${key}: must be < ${constraints.exclusiveMax}, got ${n}`,
|
|
20861
|
+
raw,
|
|
20862
|
+
kind: "invalid_number"
|
|
20863
|
+
};
|
|
20864
|
+
}
|
|
20865
|
+
return void 0;
|
|
20866
|
+
};
|
|
20601
20867
|
var resolveSchemaEntry = (entry) => ({
|
|
20602
20868
|
spec: Array.isArray(entry) ? entry[0] : entry,
|
|
20603
20869
|
options: Array.isArray(entry) ? entry[1] : void 0
|
|
@@ -20624,6 +20890,10 @@ ${lines.join("\n")}`;
|
|
|
20624
20890
|
error: { key, message: `Env ${key}: expected number, got "${raw}"`, raw, kind: "invalid_number" }
|
|
20625
20891
|
};
|
|
20626
20892
|
}
|
|
20893
|
+
const constraintError = validateNumberConstraints(key, raw, n, spec);
|
|
20894
|
+
if (constraintError !== void 0) {
|
|
20895
|
+
return { ok: false, error: constraintError };
|
|
20896
|
+
}
|
|
20627
20897
|
return { ok: true, value: n };
|
|
20628
20898
|
}
|
|
20629
20899
|
case "boolean":
|
|
@@ -20677,46 +20947,16 @@ ${lines.join("\n")}`;
|
|
|
20677
20947
|
}
|
|
20678
20948
|
});
|
|
20679
20949
|
|
|
20680
|
-
// node_modules/aws-lambda-secret-fetcher/lib/
|
|
20681
|
-
var
|
|
20682
|
-
"node_modules/aws-lambda-secret-fetcher/lib/
|
|
20950
|
+
// node_modules/aws-lambda-secret-fetcher/lib/core/extension-http.js
|
|
20951
|
+
var require_extension_http = __commonJS({
|
|
20952
|
+
"node_modules/aws-lambda-secret-fetcher/lib/core/extension-http.js"(exports2) {
|
|
20683
20953
|
"use strict";
|
|
20684
20954
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
20685
|
-
exports2.
|
|
20686
|
-
var
|
|
20687
|
-
var
|
|
20688
|
-
var strict_env_resolver_1 = require_lib3();
|
|
20689
|
-
var getSecretValue = async (name, options = {}) => {
|
|
20690
|
-
const { extensionHttpPort, timeoutMs = 2e3, retries = 3, baseBackoffMs = 300 } = options;
|
|
20691
|
-
const port = resolveExtensionHttpPort(extensionHttpPort);
|
|
20692
|
-
const sessionToken = resolveAwsSessionToken();
|
|
20693
|
-
const url = `http://localhost:${port}/secretsmanager/get?secretId=${encodeURIComponent(name)}`;
|
|
20694
|
-
const requestOptions = {
|
|
20695
|
-
headers: {
|
|
20696
|
-
"X-Aws-Parameters-Secrets-Token": sessionToken
|
|
20697
|
-
},
|
|
20698
|
-
retries,
|
|
20699
|
-
timeoutMs,
|
|
20700
|
-
baseBackoffMs,
|
|
20701
|
-
shouldRetry: (res, body) => {
|
|
20702
|
-
if ((0, fetch_retrier_1.defaultShouldRetry)(res, body)) {
|
|
20703
|
-
return true;
|
|
20704
|
-
}
|
|
20705
|
-
if (res.status === 400 && /not\s+ready.*traffic/i.test(body)) {
|
|
20706
|
-
return true;
|
|
20707
|
-
}
|
|
20708
|
-
return false;
|
|
20709
|
-
}
|
|
20710
|
-
};
|
|
20711
|
-
const response = await (0, fetch_retrier_1.fetchRetrier)(url, requestOptions);
|
|
20712
|
-
const raw = await response.json();
|
|
20713
|
-
if (!isSecretResponse(raw)) {
|
|
20714
|
-
throw new Error("Invalid secret response format");
|
|
20715
|
-
}
|
|
20716
|
-
const data = raw;
|
|
20717
|
-
return (0, quiet_json_parser_1.quietParse)(data.SecretString, data.SecretString);
|
|
20718
|
-
};
|
|
20955
|
+
exports2.resolveExtensionHttpPort = exports2.resolveAwsSessionToken = void 0;
|
|
20956
|
+
var strict_env_resolver_1 = require_lib2();
|
|
20957
|
+
var errors_1 = require_errors2();
|
|
20719
20958
|
var AWS_SESSION_TOKEN_GUIDANCE = "AWS_SESSION_TOKEN is not set. This library only works inside an AWS Lambda execution environment where the runtime provides AWS_SESSION_TOKEN for the Parameters and Secrets Extension. Attach the extension layer and run your code as a Lambda function handler.";
|
|
20959
|
+
var DEFAULT_EXTENSION_HTTP_PORT = 2773;
|
|
20720
20960
|
var MIN_TCP_PORT = 1;
|
|
20721
20961
|
var MAX_TCP_PORT = 65535;
|
|
20722
20962
|
var resolveAwsSessionToken = () => {
|
|
@@ -20724,240 +20964,333 @@ var require_lib4 = __commonJS({
|
|
|
20724
20964
|
return strict_env_resolver_1.StrictEnvResolver.resolve("AWS_SESSION_TOKEN", strict_env_resolver_1.StrictEnvType.String, { trim: true });
|
|
20725
20965
|
} catch (e) {
|
|
20726
20966
|
if (e instanceof strict_env_resolver_1.StrictEnvValidationError && e.errors.length === 1 && e.errors[0]?.key === "AWS_SESSION_TOKEN" && e.errors[0]?.kind === "missing") {
|
|
20727
|
-
throw new
|
|
20967
|
+
throw new errors_1.SecretFetcherSessionTokenError(AWS_SESSION_TOKEN_GUIDANCE);
|
|
20728
20968
|
}
|
|
20729
20969
|
throw e;
|
|
20730
20970
|
}
|
|
20731
20971
|
};
|
|
20972
|
+
exports2.resolveAwsSessionToken = resolveAwsSessionToken;
|
|
20732
20973
|
var resolveExtensionHttpPort = (overridePort) => {
|
|
20733
|
-
const port = overridePort === void 0 ? strict_env_resolver_1.StrictEnvResolver.resolve("PARAMETERS_SECRETS_EXTENSION_HTTP_PORT", strict_env_resolver_1.StrictEnvType.Number, { default:
|
|
20974
|
+
const port = overridePort === void 0 ? strict_env_resolver_1.StrictEnvResolver.resolve("PARAMETERS_SECRETS_EXTENSION_HTTP_PORT", strict_env_resolver_1.StrictEnvType.Number, { default: DEFAULT_EXTENSION_HTTP_PORT }) : parseExtensionHttpPortOverride(overridePort);
|
|
20734
20975
|
return assertValidTcpPort(port);
|
|
20735
20976
|
};
|
|
20977
|
+
exports2.resolveExtensionHttpPort = resolveExtensionHttpPort;
|
|
20736
20978
|
var parseExtensionHttpPortOverride = (overridePort) => {
|
|
20737
20979
|
const candidate = String(overridePort).trim();
|
|
20738
20980
|
if (!/^\d+$/.test(candidate)) {
|
|
20739
|
-
throw new
|
|
20981
|
+
throw new errors_1.SecretFetcherPortError("Invalid extension HTTP port: must be a number");
|
|
20740
20982
|
}
|
|
20741
20983
|
return Number.parseInt(candidate, 10);
|
|
20742
20984
|
};
|
|
20743
20985
|
var assertValidTcpPort = (port) => {
|
|
20744
20986
|
if (port < MIN_TCP_PORT || port > MAX_TCP_PORT) {
|
|
20745
|
-
throw new
|
|
20987
|
+
throw new errors_1.SecretFetcherPortError("Invalid extension HTTP port: must be between 1 and 65535");
|
|
20746
20988
|
}
|
|
20747
20989
|
return String(port);
|
|
20748
20990
|
};
|
|
20749
|
-
var isSecretResponse = (value) => {
|
|
20750
|
-
if (typeof value !== "object" || value === null)
|
|
20751
|
-
return false;
|
|
20752
|
-
const v = value;
|
|
20753
|
-
return typeof v.SecretString === "string" && typeof v.Name === "string" && typeof v.ARN === "string" && (v.VersionId === void 0 || typeof v.VersionId === "string");
|
|
20754
|
-
};
|
|
20755
|
-
exports2.secretFetcher = {
|
|
20756
|
-
getSecretValue
|
|
20757
|
-
};
|
|
20758
20991
|
}
|
|
20759
20992
|
});
|
|
20760
20993
|
|
|
20761
|
-
// node_modules/
|
|
20762
|
-
var
|
|
20763
|
-
"node_modules/
|
|
20994
|
+
// node_modules/quiet-json-parser/lib/core/errors.js
|
|
20995
|
+
var require_errors4 = __commonJS({
|
|
20996
|
+
"node_modules/quiet-json-parser/lib/core/errors.js"(exports2) {
|
|
20764
20997
|
"use strict";
|
|
20765
20998
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
20766
|
-
exports2.
|
|
20767
|
-
var
|
|
20768
|
-
var parseNumber = (raw) => {
|
|
20769
|
-
const n = Number(raw);
|
|
20770
|
-
if (!Number.isFinite(n)) {
|
|
20771
|
-
return void 0;
|
|
20772
|
-
}
|
|
20773
|
-
return n;
|
|
20774
|
-
};
|
|
20775
|
-
var parseBooleanEnvValue = (normalizedRaw) => TRUE_BOOLEAN_PATTERN.test(normalizedRaw);
|
|
20776
|
-
var StrictEnvError = class extends Error {
|
|
20777
|
-
/**
|
|
20778
|
-
* @param message - Error message.
|
|
20779
|
-
*/
|
|
20999
|
+
exports2.QuietJsonParserValidateError = exports2.QuietJsonParserError = void 0;
|
|
21000
|
+
var QuietJsonParserError = class _QuietJsonParserError extends Error {
|
|
20780
21001
|
constructor(message) {
|
|
20781
21002
|
super(message);
|
|
20782
|
-
this.name = "
|
|
21003
|
+
this.name = "QuietJsonParserError";
|
|
21004
|
+
Object.setPrototypeOf(this, _QuietJsonParserError.prototype);
|
|
20783
21005
|
}
|
|
20784
21006
|
};
|
|
20785
|
-
exports2.
|
|
20786
|
-
var
|
|
20787
|
-
|
|
20788
|
-
|
|
20789
|
-
|
|
20790
|
-
|
|
20791
|
-
|
|
20792
|
-
* @returns Multi-line summary listing each key and message.
|
|
20793
|
-
*/
|
|
20794
|
-
static format(errors) {
|
|
20795
|
-
const lines = errors.map((e) => `- ${e.key}: ${e.message}${e.raw == null ? "" : ` (raw="${e.raw}")`}`);
|
|
20796
|
-
return `Invalid environment variables (${errors.length}):
|
|
20797
|
-
${lines.join("\n")}`;
|
|
21007
|
+
exports2.QuietJsonParserError = QuietJsonParserError;
|
|
21008
|
+
var VALIDATE_MISMATCH_MESSAGE = "Parsed JSON did not match the expected shape";
|
|
21009
|
+
var QuietJsonParserValidateError = class _QuietJsonParserValidateError extends QuietJsonParserError {
|
|
21010
|
+
constructor(message = VALIDATE_MISMATCH_MESSAGE) {
|
|
21011
|
+
super(message);
|
|
21012
|
+
this.name = "QuietJsonParserValidateError";
|
|
21013
|
+
Object.setPrototypeOf(this, _QuietJsonParserValidateError.prototype);
|
|
20798
21014
|
}
|
|
20799
|
-
|
|
20800
|
-
|
|
20801
|
-
|
|
20802
|
-
|
|
20803
|
-
|
|
20804
|
-
|
|
20805
|
-
|
|
20806
|
-
|
|
20807
|
-
|
|
20808
|
-
|
|
20809
|
-
|
|
21015
|
+
};
|
|
21016
|
+
exports2.QuietJsonParserValidateError = QuietJsonParserValidateError;
|
|
21017
|
+
}
|
|
21018
|
+
});
|
|
21019
|
+
|
|
21020
|
+
// node_modules/quiet-json-parser/lib/core/omit-unsafe.js
|
|
21021
|
+
var require_omit_unsafe = __commonJS({
|
|
21022
|
+
"node_modules/quiet-json-parser/lib/core/omit-unsafe.js"(exports2) {
|
|
21023
|
+
"use strict";
|
|
21024
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
21025
|
+
exports2.omitUnsafeDeep = exports2.omitUnsafeKey = void 0;
|
|
21026
|
+
var PROTO_KEY = "__proto__";
|
|
21027
|
+
var PROTOTYPE_KEY = "prototype";
|
|
21028
|
+
var CONSTRUCTOR_KEY = "constructor";
|
|
21029
|
+
var isPlainObject = (value) => {
|
|
21030
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
21031
|
+
};
|
|
21032
|
+
var isUnsafeConstructorValue = (value) => {
|
|
21033
|
+
if (!isPlainObject(value)) {
|
|
21034
|
+
return false;
|
|
20810
21035
|
}
|
|
21036
|
+
return Object.prototype.hasOwnProperty.call(value, PROTOTYPE_KEY);
|
|
20811
21037
|
};
|
|
20812
|
-
|
|
20813
|
-
|
|
20814
|
-
|
|
20815
|
-
|
|
20816
|
-
|
|
20817
|
-
|
|
20818
|
-
|
|
20819
|
-
|
|
20820
|
-
exports2.StrictEnvType = {
|
|
20821
|
-
/** Spec for a string value (returned as-is unless `trim: true` is set in options). */
|
|
20822
|
-
String: { type: "string" },
|
|
20823
|
-
/**
|
|
20824
|
-
* Spec for a finite numeric value (`Number()` parsing; rejects `NaN` and `Infinity`).
|
|
20825
|
-
* Use as `StrictEnvType.Number`, or call as `StrictEnvType.Number({ min, max, integer })`.
|
|
20826
|
-
*/
|
|
20827
|
-
Number: NumberSpec,
|
|
20828
|
-
/**
|
|
20829
|
-
* Spec for a positive integer (`>= 1`). Sugar for `Number({ min: 1, integer: true })`.
|
|
20830
|
-
*/
|
|
20831
|
-
PositiveInt: createNumberSpec({ min: 1, integer: true }),
|
|
20832
|
-
/**
|
|
20833
|
-
* Spec for a negative integer (`<= -1`). Sugar for `Number({ max: -1, integer: true })`.
|
|
20834
|
-
*/
|
|
20835
|
-
NegativeInt: createNumberSpec({ max: -1, integer: true }),
|
|
20836
|
-
/** Spec for a boolean value (`1`/`true`/`yes`/`on` → `true`; other non-empty values → `false`). */
|
|
20837
|
-
Boolean: { type: "boolean" },
|
|
20838
|
-
/**
|
|
20839
|
-
* Returns a spec that restricts the value to one of the given choices.
|
|
20840
|
-
*
|
|
20841
|
-
* @param choices - Allowed string literals.
|
|
20842
|
-
* @returns Enum spec for use with `resolve` or `resolveAll`.
|
|
20843
|
-
*/
|
|
20844
|
-
Enum: (choices) => ({ type: "enum", choices })
|
|
21038
|
+
var shouldOmitKey = (key, value) => {
|
|
21039
|
+
if (key === PROTO_KEY || key === PROTOTYPE_KEY) {
|
|
21040
|
+
return true;
|
|
21041
|
+
}
|
|
21042
|
+
if (key !== CONSTRUCTOR_KEY) {
|
|
21043
|
+
return false;
|
|
21044
|
+
}
|
|
21045
|
+
return isUnsafeConstructorValue(value);
|
|
20845
21046
|
};
|
|
20846
|
-
var
|
|
20847
|
-
|
|
20848
|
-
if (raw == null) {
|
|
21047
|
+
var omitUnsafeKey = (key, value) => {
|
|
21048
|
+
if (shouldOmitKey(key, value)) {
|
|
20849
21049
|
return void 0;
|
|
20850
21050
|
}
|
|
20851
|
-
|
|
20852
|
-
return raw;
|
|
20853
|
-
}
|
|
20854
|
-
return raw.trim();
|
|
21051
|
+
return value;
|
|
20855
21052
|
};
|
|
20856
|
-
|
|
20857
|
-
|
|
20858
|
-
|
|
21053
|
+
exports2.omitUnsafeKey = omitUnsafeKey;
|
|
21054
|
+
var omitUnsafeDeep = (value) => {
|
|
21055
|
+
if (Array.isArray(value)) {
|
|
21056
|
+
return value.map(exports2.omitUnsafeDeep);
|
|
20859
21057
|
}
|
|
20860
|
-
if (
|
|
20861
|
-
return
|
|
20862
|
-
key,
|
|
20863
|
-
message: `Env ${key}: must be >= ${constraints.min}, got ${n}`,
|
|
20864
|
-
raw,
|
|
20865
|
-
kind: "invalid_number"
|
|
20866
|
-
};
|
|
21058
|
+
if (!isPlainObject(value)) {
|
|
21059
|
+
return value;
|
|
20867
21060
|
}
|
|
20868
|
-
|
|
20869
|
-
|
|
20870
|
-
|
|
20871
|
-
|
|
20872
|
-
|
|
20873
|
-
|
|
20874
|
-
|
|
21061
|
+
const result = {};
|
|
21062
|
+
for (const key of Object.keys(value)) {
|
|
21063
|
+
const nested = value[key];
|
|
21064
|
+
if (shouldOmitKey(key, nested)) {
|
|
21065
|
+
continue;
|
|
21066
|
+
}
|
|
21067
|
+
result[key] = (0, exports2.omitUnsafeDeep)(nested);
|
|
20875
21068
|
}
|
|
20876
|
-
return
|
|
21069
|
+
return result;
|
|
20877
21070
|
};
|
|
20878
|
-
|
|
20879
|
-
|
|
20880
|
-
|
|
20881
|
-
|
|
20882
|
-
|
|
20883
|
-
|
|
20884
|
-
|
|
20885
|
-
|
|
20886
|
-
|
|
20887
|
-
|
|
20888
|
-
|
|
21071
|
+
exports2.omitUnsafeDeep = omitUnsafeDeep;
|
|
21072
|
+
}
|
|
21073
|
+
});
|
|
21074
|
+
|
|
21075
|
+
// node_modules/quiet-json-parser/lib/parse.js
|
|
21076
|
+
var require_parse = __commonJS({
|
|
21077
|
+
"node_modules/quiet-json-parser/lib/parse.js"(exports2) {
|
|
21078
|
+
"use strict";
|
|
21079
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
21080
|
+
exports2.quietParse = void 0;
|
|
21081
|
+
var errors_1 = require_errors4();
|
|
21082
|
+
var omit_unsafe_1 = require_omit_unsafe();
|
|
21083
|
+
var toParseOptions = (onErrorOrOptions) => {
|
|
21084
|
+
if (typeof onErrorOrOptions === "function") {
|
|
21085
|
+
return { onError: onErrorOrOptions };
|
|
21086
|
+
}
|
|
21087
|
+
return onErrorOrOptions ?? {};
|
|
21088
|
+
};
|
|
21089
|
+
var quietParse = (jsonString, fallback, onErrorOrOptions) => {
|
|
21090
|
+
const { validate, onError } = toParseOptions(onErrorOrOptions);
|
|
21091
|
+
if (!jsonString) {
|
|
21092
|
+
return fallback;
|
|
21093
|
+
}
|
|
21094
|
+
let sanitized;
|
|
21095
|
+
try {
|
|
21096
|
+
const parsed = JSON.parse(jsonString);
|
|
21097
|
+
sanitized = (0, omit_unsafe_1.omitUnsafeDeep)(parsed);
|
|
21098
|
+
} catch (error) {
|
|
21099
|
+
onError?.(error);
|
|
21100
|
+
return fallback;
|
|
21101
|
+
}
|
|
21102
|
+
if (!validate) {
|
|
21103
|
+
return sanitized;
|
|
21104
|
+
}
|
|
21105
|
+
try {
|
|
21106
|
+
if (validate(sanitized)) {
|
|
21107
|
+
return sanitized;
|
|
20889
21108
|
}
|
|
20890
|
-
|
|
20891
|
-
|
|
20892
|
-
|
|
20893
|
-
};
|
|
21109
|
+
} catch (error) {
|
|
21110
|
+
onError?.(error);
|
|
21111
|
+
return fallback;
|
|
20894
21112
|
}
|
|
20895
|
-
|
|
20896
|
-
|
|
20897
|
-
|
|
20898
|
-
|
|
20899
|
-
|
|
20900
|
-
|
|
20901
|
-
|
|
20902
|
-
|
|
20903
|
-
|
|
20904
|
-
|
|
20905
|
-
|
|
20906
|
-
|
|
20907
|
-
|
|
20908
|
-
|
|
21113
|
+
onError?.(new errors_1.QuietJsonParserValidateError());
|
|
21114
|
+
return fallback;
|
|
21115
|
+
};
|
|
21116
|
+
exports2.quietParse = quietParse;
|
|
21117
|
+
}
|
|
21118
|
+
});
|
|
21119
|
+
|
|
21120
|
+
// node_modules/quiet-json-parser/lib/stringify.js
|
|
21121
|
+
var require_stringify = __commonJS({
|
|
21122
|
+
"node_modules/quiet-json-parser/lib/stringify.js"(exports2) {
|
|
21123
|
+
"use strict";
|
|
21124
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
21125
|
+
exports2.quietStringify = void 0;
|
|
21126
|
+
var omit_unsafe_1 = require_omit_unsafe();
|
|
21127
|
+
var quietStringify = (value, fallback, onError) => {
|
|
21128
|
+
try {
|
|
21129
|
+
const json = JSON.stringify(value, omit_unsafe_1.omitUnsafeKey);
|
|
21130
|
+
if (typeof json !== "string") {
|
|
21131
|
+
return fallback;
|
|
20909
21132
|
}
|
|
20910
|
-
|
|
20911
|
-
|
|
20912
|
-
|
|
20913
|
-
|
|
20914
|
-
return {
|
|
20915
|
-
ok: false,
|
|
20916
|
-
error: {
|
|
20917
|
-
key,
|
|
20918
|
-
message: `Env ${key}: must be one of [${spec.choices.join(", ")}]`,
|
|
20919
|
-
raw,
|
|
20920
|
-
kind: "invalid_enum"
|
|
20921
|
-
}
|
|
20922
|
-
};
|
|
20923
|
-
}
|
|
20924
|
-
return { ok: true, value: normalizedRaw };
|
|
20925
|
-
default:
|
|
20926
|
-
return { ok: true, value: normalizedRaw };
|
|
21133
|
+
return json;
|
|
21134
|
+
} catch (error) {
|
|
21135
|
+
onError?.(error);
|
|
21136
|
+
return fallback;
|
|
20927
21137
|
}
|
|
20928
21138
|
};
|
|
20929
|
-
|
|
20930
|
-
|
|
20931
|
-
|
|
20932
|
-
|
|
21139
|
+
exports2.quietStringify = quietStringify;
|
|
21140
|
+
}
|
|
21141
|
+
});
|
|
21142
|
+
|
|
21143
|
+
// node_modules/quiet-json-parser/lib/index.js
|
|
21144
|
+
var require_lib3 = __commonJS({
|
|
21145
|
+
"node_modules/quiet-json-parser/lib/index.js"(exports2) {
|
|
21146
|
+
"use strict";
|
|
21147
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
21148
|
+
exports2.quietStringify = exports2.quietParse = exports2.QuietJsonParserValidateError = exports2.QuietJsonParserError = void 0;
|
|
21149
|
+
var errors_1 = require_errors4();
|
|
21150
|
+
Object.defineProperty(exports2, "QuietJsonParserError", { enumerable: true, get: function() {
|
|
21151
|
+
return errors_1.QuietJsonParserError;
|
|
21152
|
+
} });
|
|
21153
|
+
Object.defineProperty(exports2, "QuietJsonParserValidateError", { enumerable: true, get: function() {
|
|
21154
|
+
return errors_1.QuietJsonParserValidateError;
|
|
21155
|
+
} });
|
|
21156
|
+
var parse_1 = require_parse();
|
|
21157
|
+
Object.defineProperty(exports2, "quietParse", { enumerable: true, get: function() {
|
|
21158
|
+
return parse_1.quietParse;
|
|
21159
|
+
} });
|
|
21160
|
+
var stringify_1 = require_stringify();
|
|
21161
|
+
Object.defineProperty(exports2, "quietStringify", { enumerable: true, get: function() {
|
|
21162
|
+
return stringify_1.quietStringify;
|
|
21163
|
+
} });
|
|
21164
|
+
}
|
|
21165
|
+
});
|
|
21166
|
+
|
|
21167
|
+
// node_modules/aws-lambda-secret-fetcher/lib/core/secret-response.js
|
|
21168
|
+
var require_secret_response = __commonJS({
|
|
21169
|
+
"node_modules/aws-lambda-secret-fetcher/lib/core/secret-response.js"(exports2) {
|
|
21170
|
+
"use strict";
|
|
21171
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
21172
|
+
exports2.readSecretValue = void 0;
|
|
21173
|
+
var quiet_json_parser_1 = require_lib3();
|
|
21174
|
+
var errors_1 = require_errors2();
|
|
21175
|
+
var STANDARD_BASE64 = /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/;
|
|
21176
|
+
var INVALID_SECRET_RESPONSE = "Invalid secret response format";
|
|
21177
|
+
var readSecretValue = (raw) => {
|
|
21178
|
+
if (!isSecretResponse(raw)) {
|
|
21179
|
+
throw new errors_1.SecretFetcherResponseError(INVALID_SECRET_RESPONSE);
|
|
20933
21180
|
}
|
|
20934
|
-
|
|
21181
|
+
if ("SecretString" in raw) {
|
|
21182
|
+
return (0, quiet_json_parser_1.quietParse)(raw.SecretString, raw.SecretString);
|
|
21183
|
+
}
|
|
21184
|
+
return decodeSecretBinary(raw.SecretBinary);
|
|
20935
21185
|
};
|
|
20936
|
-
|
|
20937
|
-
|
|
20938
|
-
|
|
20939
|
-
|
|
20940
|
-
const { spec, options } = resolveSchemaEntry(schema[key]);
|
|
20941
|
-
const result = parseEnvValue(key, spec, process.env[key], options?.default, options);
|
|
20942
|
-
if (!result.ok) {
|
|
20943
|
-
errors.push(result.error);
|
|
20944
|
-
continue;
|
|
20945
|
-
}
|
|
20946
|
-
envs[key] = result.value;
|
|
21186
|
+
exports2.readSecretValue = readSecretValue;
|
|
21187
|
+
var secretFieldKind = (record, key) => {
|
|
21188
|
+
if (!Object.prototype.hasOwnProperty.call(record, key)) {
|
|
21189
|
+
return "absent";
|
|
20947
21190
|
}
|
|
20948
|
-
|
|
20949
|
-
|
|
20950
|
-
|
|
21191
|
+
const field = record[key];
|
|
21192
|
+
if (typeof field !== "string" || field.length === 0) {
|
|
21193
|
+
return "invalid";
|
|
21194
|
+
}
|
|
21195
|
+
return "string";
|
|
20951
21196
|
};
|
|
20952
|
-
|
|
20953
|
-
|
|
20954
|
-
|
|
20955
|
-
|
|
20956
|
-
|
|
21197
|
+
var isSecretResponse = (value) => {
|
|
21198
|
+
if (typeof value !== "object" || value === null)
|
|
21199
|
+
return false;
|
|
21200
|
+
const record = value;
|
|
21201
|
+
if (typeof record.Name !== "string" || typeof record.ARN !== "string") {
|
|
21202
|
+
return false;
|
|
21203
|
+
}
|
|
21204
|
+
if (record.VersionId !== void 0 && typeof record.VersionId !== "string") {
|
|
21205
|
+
return false;
|
|
21206
|
+
}
|
|
21207
|
+
const secretString = secretFieldKind(record, "SecretString");
|
|
21208
|
+
const secretBinary = secretFieldKind(record, "SecretBinary");
|
|
21209
|
+
const hasString = secretString === "string" && secretBinary === "absent";
|
|
21210
|
+
const hasBinary = secretBinary === "string" && secretString === "absent";
|
|
21211
|
+
return hasString || hasBinary;
|
|
21212
|
+
};
|
|
21213
|
+
var isStandardBase64 = (encoded) => STANDARD_BASE64.test(encoded);
|
|
21214
|
+
var decodeSecretBinary = (encoded) => {
|
|
21215
|
+
if (!isStandardBase64(encoded)) {
|
|
21216
|
+
throw new errors_1.SecretFetcherBinaryError("Invalid secret binary encoding");
|
|
21217
|
+
}
|
|
21218
|
+
return Uint8Array.from(Buffer.from(encoded, "base64"));
|
|
20957
21219
|
};
|
|
20958
21220
|
}
|
|
20959
21221
|
});
|
|
20960
21222
|
|
|
21223
|
+
// node_modules/aws-lambda-secret-fetcher/lib/get-secret-value.js
|
|
21224
|
+
var require_get_secret_value = __commonJS({
|
|
21225
|
+
"node_modules/aws-lambda-secret-fetcher/lib/get-secret-value.js"(exports2) {
|
|
21226
|
+
"use strict";
|
|
21227
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
21228
|
+
exports2.secretFetcher = void 0;
|
|
21229
|
+
var fetch_retrier_1 = require_lib();
|
|
21230
|
+
var extension_http_1 = require_extension_http();
|
|
21231
|
+
var secret_response_1 = require_secret_response();
|
|
21232
|
+
var EXTENSION_NOT_READY_STATUS = 400;
|
|
21233
|
+
var getSecretValue = async (name, options = {}) => {
|
|
21234
|
+
const { extensionHttpPort, timeoutMs = 2e3, retries = 3, baseBackoffMs = 300 } = options;
|
|
21235
|
+
const port = (0, extension_http_1.resolveExtensionHttpPort)(extensionHttpPort);
|
|
21236
|
+
const sessionToken = (0, extension_http_1.resolveAwsSessionToken)();
|
|
21237
|
+
const url = `http://localhost:${port}/secretsmanager/get?secretId=${encodeURIComponent(name)}`;
|
|
21238
|
+
const requestOptions = {
|
|
21239
|
+
headers: {
|
|
21240
|
+
"X-Aws-Parameters-Secrets-Token": sessionToken
|
|
21241
|
+
},
|
|
21242
|
+
retries,
|
|
21243
|
+
timeoutMs,
|
|
21244
|
+
baseBackoffMs,
|
|
21245
|
+
shouldRetry: (res, body) => {
|
|
21246
|
+
if ((0, fetch_retrier_1.defaultShouldRetry)(res, body)) {
|
|
21247
|
+
return true;
|
|
21248
|
+
}
|
|
21249
|
+
if (res.status === EXTENSION_NOT_READY_STATUS && /not\s+ready.*traffic/i.test(body)) {
|
|
21250
|
+
return true;
|
|
21251
|
+
}
|
|
21252
|
+
return false;
|
|
21253
|
+
}
|
|
21254
|
+
};
|
|
21255
|
+
const response = await (0, fetch_retrier_1.fetchRetrier)(url, requestOptions);
|
|
21256
|
+
const raw = await response.json();
|
|
21257
|
+
return (0, secret_response_1.readSecretValue)(raw);
|
|
21258
|
+
};
|
|
21259
|
+
exports2.secretFetcher = {
|
|
21260
|
+
getSecretValue
|
|
21261
|
+
};
|
|
21262
|
+
}
|
|
21263
|
+
});
|
|
21264
|
+
|
|
21265
|
+
// node_modules/aws-lambda-secret-fetcher/lib/index.js
|
|
21266
|
+
var require_lib4 = __commonJS({
|
|
21267
|
+
"node_modules/aws-lambda-secret-fetcher/lib/index.js"(exports2) {
|
|
21268
|
+
"use strict";
|
|
21269
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
21270
|
+
exports2.secretFetcher = exports2.SecretFetcherSessionTokenError = exports2.SecretFetcherResponseError = exports2.SecretFetcherPortError = exports2.SecretFetcherError = exports2.SecretFetcherBinaryError = void 0;
|
|
21271
|
+
var errors_1 = require_errors2();
|
|
21272
|
+
Object.defineProperty(exports2, "SecretFetcherBinaryError", { enumerable: true, get: function() {
|
|
21273
|
+
return errors_1.SecretFetcherBinaryError;
|
|
21274
|
+
} });
|
|
21275
|
+
Object.defineProperty(exports2, "SecretFetcherError", { enumerable: true, get: function() {
|
|
21276
|
+
return errors_1.SecretFetcherError;
|
|
21277
|
+
} });
|
|
21278
|
+
Object.defineProperty(exports2, "SecretFetcherPortError", { enumerable: true, get: function() {
|
|
21279
|
+
return errors_1.SecretFetcherPortError;
|
|
21280
|
+
} });
|
|
21281
|
+
Object.defineProperty(exports2, "SecretFetcherResponseError", { enumerable: true, get: function() {
|
|
21282
|
+
return errors_1.SecretFetcherResponseError;
|
|
21283
|
+
} });
|
|
21284
|
+
Object.defineProperty(exports2, "SecretFetcherSessionTokenError", { enumerable: true, get: function() {
|
|
21285
|
+
return errors_1.SecretFetcherSessionTokenError;
|
|
21286
|
+
} });
|
|
21287
|
+
var get_secret_value_1 = require_get_secret_value();
|
|
21288
|
+
Object.defineProperty(exports2, "secretFetcher", { enumerable: true, get: function() {
|
|
21289
|
+
return get_secret_value_1.secretFetcher;
|
|
21290
|
+
} });
|
|
21291
|
+
}
|
|
21292
|
+
});
|
|
21293
|
+
|
|
20961
21294
|
// src/funcs/running-scheduler.lambda.ts
|
|
20962
21295
|
var running_scheduler_lambda_exports = {};
|
|
20963
21296
|
__export(running_scheduler_lambda_exports, {
|
|
@@ -24484,7 +24817,7 @@ var import_client_ec2 = require("@aws-sdk/client-ec2");
|
|
|
24484
24817
|
var import_client_resource_groups_tagging_api = require("@aws-sdk/client-resource-groups-tagging-api");
|
|
24485
24818
|
var import_web_api = __toESM(require_dist5());
|
|
24486
24819
|
var import_aws_lambda_secret_fetcher = __toESM(require_lib4());
|
|
24487
|
-
var import_strict_env_resolver2 = __toESM(
|
|
24820
|
+
var import_strict_env_resolver2 = __toESM(require_lib2());
|
|
24488
24821
|
|
|
24489
24822
|
// src/funcs/running-scheduler-predicates.ts
|
|
24490
24823
|
var DEFAULT_RESOURCE_WAIT_LIMITS = {
|
|
@@ -24517,7 +24850,7 @@ var formatResourceWaitFailure = (reason, context) => {
|
|
|
24517
24850
|
};
|
|
24518
24851
|
|
|
24519
24852
|
// src/funcs/running-scheduler-wait-env.ts
|
|
24520
|
-
var import_strict_env_resolver = __toESM(
|
|
24853
|
+
var import_strict_env_resolver = __toESM(require_lib2());
|
|
24521
24854
|
|
|
24522
24855
|
// src/funcs/running-scheduler-wait-config.ts
|
|
24523
24856
|
var PROCESS_RESOURCE_MAX_LOOP_COUNT_ENV = "PROCESS_RESOURCE_MAX_LOOP_COUNT";
|
|
@@ -24529,15 +24862,15 @@ var PROCESS_RESOURCES_MAX_CONCURRENCY_ENV = "PROCESS_RESOURCES_MAX_CONCURRENCY";
|
|
|
24529
24862
|
var parseResourceWaitLimitsFromEnv = () => {
|
|
24530
24863
|
const parsed = import_strict_env_resolver.StrictEnvResolver.resolveAll({
|
|
24531
24864
|
[PROCESS_RESOURCE_MAX_LOOP_COUNT_ENV]: [
|
|
24532
|
-
import_strict_env_resolver.StrictEnvType.
|
|
24865
|
+
import_strict_env_resolver.StrictEnvType.Number.PositiveInteger,
|
|
24533
24866
|
{ default: DEFAULT_RESOURCE_WAIT_LIMITS.maxLoopCount }
|
|
24534
24867
|
],
|
|
24535
24868
|
[PROCESS_RESOURCE_MAX_ELAPSED_SECONDS_ENV]: [
|
|
24536
|
-
import_strict_env_resolver.StrictEnvType.
|
|
24869
|
+
import_strict_env_resolver.StrictEnvType.Number.PositiveInteger,
|
|
24537
24870
|
{ default: DEFAULT_RESOURCE_WAIT_LIMITS.maxElapsedSeconds }
|
|
24538
24871
|
],
|
|
24539
24872
|
[PROCESS_RESOURCE_STATUS_CHANGE_WAIT_SECONDS_ENV]: [
|
|
24540
|
-
import_strict_env_resolver.StrictEnvType.
|
|
24873
|
+
import_strict_env_resolver.StrictEnvType.Number.PositiveInteger,
|
|
24541
24874
|
{ default: DEFAULT_RESOURCE_WAIT_LIMITS.statusChangeWaitSeconds }
|
|
24542
24875
|
]
|
|
24543
24876
|
});
|
|
@@ -24550,7 +24883,7 @@ var parseResourceWaitLimitsFromEnv = () => {
|
|
|
24550
24883
|
var parseMaxConcurrencyFromEnv = () => {
|
|
24551
24884
|
const parsed = import_strict_env_resolver.StrictEnvResolver.resolveAll({
|
|
24552
24885
|
[PROCESS_RESOURCES_MAX_CONCURRENCY_ENV]: [
|
|
24553
|
-
import_strict_env_resolver.StrictEnvType.
|
|
24886
|
+
import_strict_env_resolver.StrictEnvType.Number.PositiveInteger,
|
|
24554
24887
|
{ default: DEFAULT_MAX_CONCURRENCY }
|
|
24555
24888
|
]
|
|
24556
24889
|
});
|