@cloudsnorkel/cdk-github-runners 0.14.24 → 0.15.1
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/.jsii +5953 -602
- package/API.md +1349 -115
- package/README.md +53 -1
- package/assets/delete-failed-runner.lambda/index.js +122 -9
- package/assets/idle-runner-repear.lambda/index.js +153 -14
- package/assets/image-builders/aws-image-builder/delete-resources.lambda/index.js +1 -1
- package/assets/image-builders/build-image.lambda/index.js +1 -1
- package/assets/providers/ami-root-device.lambda/index.js +1 -1
- package/assets/setup.lambda/index.html +7 -7
- package/assets/setup.lambda/index.js +118 -8
- package/assets/status.lambda/index.js +121 -8
- package/assets/token-retriever.lambda/index.js +121 -8
- package/assets/warm-runner-manager.lambda/index.js +5909 -0
- package/assets/webhook-handler.lambda/index.js +126 -11
- package/assets/webhook-redelivery.lambda/index.js +139 -24
- package/lib/access.js +1 -1
- package/lib/delete-failed-runner.lambda.js +2 -2
- package/lib/idle-runner-repear.lambda.js +33 -7
- package/lib/image-builders/api.js +1 -1
- package/lib/image-builders/aws-image-builder/base-image.d.ts +13 -0
- package/lib/image-builders/aws-image-builder/base-image.js +36 -3
- package/lib/image-builders/aws-image-builder/builder.js +4 -4
- package/lib/image-builders/aws-image-builder/delete-resources.lambda.js +2 -2
- package/lib/image-builders/aws-image-builder/deprecated/ami.js +1 -1
- package/lib/image-builders/aws-image-builder/deprecated/container.js +1 -1
- package/lib/image-builders/aws-image-builder/deprecated/linux-components.js +1 -1
- package/lib/image-builders/aws-image-builder/deprecated/windows-components.js +1 -1
- package/lib/image-builders/build-image.lambda.js +2 -2
- package/lib/image-builders/codebuild-deprecated.js +1 -1
- package/lib/image-builders/components.js +3 -3
- package/lib/image-builders/static.js +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.js +2 -1
- package/lib/lambda-github.d.ts +1 -1
- package/lib/lambda-github.js +3 -2
- package/lib/lambda-helpers.js +4 -4
- package/lib/providers/ami-root-device.lambda.js +2 -2
- package/lib/providers/codebuild.d.ts +18 -2
- package/lib/providers/codebuild.js +15 -4
- package/lib/providers/common.d.ts +47 -3
- package/lib/providers/common.js +29 -5
- package/lib/providers/composite.js +14 -19
- package/lib/providers/ec2.d.ts +9 -2
- package/lib/providers/ec2.js +84 -42
- package/lib/providers/ecs.d.ts +19 -2
- package/lib/providers/ecs.js +49 -44
- package/lib/providers/fargate.d.ts +2 -2
- package/lib/providers/fargate.js +19 -36
- package/lib/providers/lambda.d.ts +2 -2
- package/lib/providers/lambda.js +3 -3
- package/lib/runner.d.ts +31 -3
- package/lib/runner.js +171 -46
- package/lib/secrets.js +1 -1
- package/lib/setup.lambda.js +2 -2
- package/lib/utils.d.ts +10 -1
- package/lib/utils.js +15 -1
- package/lib/warm-runner-manager-function.d.ts +18 -0
- package/lib/warm-runner-manager-function.js +24 -0
- package/lib/warm-runner-manager.lambda.d.ts +41 -0
- package/lib/warm-runner-manager.lambda.js +487 -0
- package/lib/warm-runner.d.ts +155 -0
- package/lib/warm-runner.js +217 -0
- package/lib/webhook-handler.lambda.js +5 -3
- package/lib/webhook-redelivery.lambda.js +17 -16
- package/lib/webhook.d.ts +4 -0
- package/lib/webhook.js +2 -1
- package/node_modules/cron-parser/LICENSE +21 -0
- package/node_modules/cron-parser/README.md +408 -0
- package/node_modules/cron-parser/dist/CronDate.js +518 -0
- package/node_modules/cron-parser/dist/CronExpression.js +520 -0
- package/node_modules/cron-parser/dist/CronExpressionParser.js +382 -0
- package/node_modules/cron-parser/dist/CronFieldCollection.js +371 -0
- package/node_modules/cron-parser/dist/CronFileParser.js +109 -0
- package/node_modules/cron-parser/dist/fields/CronDayOfMonth.js +44 -0
- package/node_modules/cron-parser/dist/fields/CronDayOfWeek.js +51 -0
- package/node_modules/cron-parser/dist/fields/CronField.js +214 -0
- package/node_modules/cron-parser/dist/fields/CronHour.js +40 -0
- package/node_modules/cron-parser/dist/fields/CronMinute.js +40 -0
- package/node_modules/cron-parser/dist/fields/CronMonth.js +44 -0
- package/node_modules/cron-parser/dist/fields/CronSecond.js +40 -0
- package/node_modules/cron-parser/dist/fields/index.js +24 -0
- package/node_modules/cron-parser/dist/fields/types.js +2 -0
- package/node_modules/cron-parser/dist/index.js +31 -0
- package/node_modules/cron-parser/dist/types/CronDate.d.ts +288 -0
- package/node_modules/cron-parser/dist/types/CronExpression.d.ts +118 -0
- package/node_modules/cron-parser/dist/types/CronExpressionParser.d.ts +70 -0
- package/node_modules/cron-parser/dist/types/CronFieldCollection.d.ts +153 -0
- package/node_modules/cron-parser/dist/types/CronFileParser.d.ts +30 -0
- package/node_modules/cron-parser/dist/types/fields/CronDayOfMonth.d.ts +25 -0
- package/node_modules/cron-parser/dist/types/fields/CronDayOfWeek.d.ts +30 -0
- package/node_modules/cron-parser/dist/types/fields/CronField.d.ts +130 -0
- package/node_modules/cron-parser/dist/types/fields/CronHour.d.ts +23 -0
- package/node_modules/cron-parser/dist/types/fields/CronMinute.d.ts +23 -0
- package/node_modules/cron-parser/dist/types/fields/CronMonth.d.ts +24 -0
- package/node_modules/cron-parser/dist/types/fields/CronSecond.d.ts +23 -0
- package/node_modules/cron-parser/dist/types/fields/index.d.ts +8 -0
- package/node_modules/cron-parser/dist/types/fields/types.d.ts +18 -0
- package/node_modules/cron-parser/dist/types/index.d.ts +8 -0
- package/node_modules/cron-parser/dist/types/utils/random.d.ts +10 -0
- package/node_modules/cron-parser/dist/utils/random.js +38 -0
- package/node_modules/cron-parser/package.json +117 -0
- package/node_modules/luxon/LICENSE.md +7 -0
- package/node_modules/luxon/README.md +55 -0
- package/node_modules/luxon/build/amd/luxon.js +8741 -0
- package/node_modules/luxon/build/amd/luxon.js.map +1 -0
- package/node_modules/luxon/build/cjs-browser/luxon.js +8739 -0
- package/node_modules/luxon/build/cjs-browser/luxon.js.map +1 -0
- package/node_modules/luxon/build/es6/luxon.mjs +8133 -0
- package/node_modules/luxon/build/es6/luxon.mjs.map +1 -0
- package/node_modules/luxon/build/global/luxon.js +8744 -0
- package/node_modules/luxon/build/global/luxon.js.map +1 -0
- package/node_modules/luxon/build/global/luxon.min.js +1 -0
- package/node_modules/luxon/build/global/luxon.min.js.map +1 -0
- package/node_modules/luxon/build/node/luxon.js +7792 -0
- package/node_modules/luxon/build/node/luxon.js.map +1 -0
- package/node_modules/luxon/package.json +87 -0
- package/node_modules/luxon/src/datetime.js +2603 -0
- package/node_modules/luxon/src/duration.js +1009 -0
- package/node_modules/luxon/src/errors.js +61 -0
- package/node_modules/luxon/src/impl/conversions.js +206 -0
- package/node_modules/luxon/src/impl/diff.js +95 -0
- package/node_modules/luxon/src/impl/digits.js +94 -0
- package/node_modules/luxon/src/impl/english.js +233 -0
- package/node_modules/luxon/src/impl/formats.js +176 -0
- package/node_modules/luxon/src/impl/formatter.js +434 -0
- package/node_modules/luxon/src/impl/invalid.js +14 -0
- package/node_modules/luxon/src/impl/locale.js +569 -0
- package/node_modules/luxon/src/impl/regexParser.js +335 -0
- package/node_modules/luxon/src/impl/tokenParser.js +505 -0
- package/node_modules/luxon/src/impl/util.js +330 -0
- package/node_modules/luxon/src/impl/zoneUtil.js +34 -0
- package/node_modules/luxon/src/info.js +205 -0
- package/node_modules/luxon/src/interval.js +669 -0
- package/node_modules/luxon/src/luxon.js +26 -0
- package/node_modules/luxon/src/package.json +4 -0
- package/node_modules/luxon/src/settings.js +180 -0
- package/node_modules/luxon/src/zone.js +97 -0
- package/node_modules/luxon/src/zones/IANAZone.js +235 -0
- package/node_modules/luxon/src/zones/fixedOffsetZone.js +150 -0
- package/node_modules/luxon/src/zones/invalidZone.js +53 -0
- package/node_modules/luxon/src/zones/systemZone.js +61 -0
- package/package.json +33 -24
|
@@ -300,7 +300,7 @@ function isKeyOperator(operator) {
|
|
|
300
300
|
function getValues(context, operator, key, modifier) {
|
|
301
301
|
var value = context[key], result = [];
|
|
302
302
|
if (isDefined(value) && value !== "") {
|
|
303
|
-
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
|
|
303
|
+
if (typeof value === "string" || typeof value === "number" || typeof value === "bigint" || typeof value === "boolean") {
|
|
304
304
|
value = value.toString();
|
|
305
305
|
if (modifier && modifier !== "*") {
|
|
306
306
|
value = value.substring(0, parseInt(modifier, 10));
|
|
@@ -595,6 +595,115 @@ var require_fast_content_type_parse = __commonJS({
|
|
|
595
595
|
}
|
|
596
596
|
});
|
|
597
597
|
|
|
598
|
+
// node_modules/json-with-bigint/json-with-bigint.js
|
|
599
|
+
var intRegex, noiseValue, originalStringify, originalParse, customFormat, bigIntsStringify, noiseStringify, JSONStringify, featureCache, isContextSourceSupported, convertMarkedBigIntsReviver, JSONParseV2, MAX_INT, MAX_DIGITS, stringsOrLargeNumbers, noiseValueWithQuotes, JSONParse;
|
|
600
|
+
var init_json_with_bigint = __esm({
|
|
601
|
+
"node_modules/json-with-bigint/json-with-bigint.js"() {
|
|
602
|
+
"use strict";
|
|
603
|
+
intRegex = /^-?\d+$/;
|
|
604
|
+
noiseValue = /^-?\d+n+$/;
|
|
605
|
+
originalStringify = JSON.stringify;
|
|
606
|
+
originalParse = JSON.parse;
|
|
607
|
+
customFormat = /^-?\d+n$/;
|
|
608
|
+
bigIntsStringify = /([\[:])?"(-?\d+)n"($|([\\n]|\s)*(\s|[\\n])*[,\}\]])/g;
|
|
609
|
+
noiseStringify = /([\[:])?("-?\d+n+)n("$|"([\\n]|\s)*(\s|[\\n])*[,\}\]])/g;
|
|
610
|
+
JSONStringify = (value, replacer, space) => {
|
|
611
|
+
if ("rawJSON" in JSON) {
|
|
612
|
+
return originalStringify(
|
|
613
|
+
value,
|
|
614
|
+
(key, value2) => {
|
|
615
|
+
if (typeof value2 === "bigint") return JSON.rawJSON(value2.toString());
|
|
616
|
+
if (typeof replacer === "function") return replacer(key, value2);
|
|
617
|
+
if (Array.isArray(replacer) && replacer.includes(key)) return value2;
|
|
618
|
+
return value2;
|
|
619
|
+
},
|
|
620
|
+
space
|
|
621
|
+
);
|
|
622
|
+
}
|
|
623
|
+
if (!value) return originalStringify(value, replacer, space);
|
|
624
|
+
const convertedToCustomJSON = originalStringify(
|
|
625
|
+
value,
|
|
626
|
+
(key, value2) => {
|
|
627
|
+
const isNoise = typeof value2 === "string" && noiseValue.test(value2);
|
|
628
|
+
if (isNoise) return value2.toString() + "n";
|
|
629
|
+
if (typeof value2 === "bigint") return value2.toString() + "n";
|
|
630
|
+
if (typeof replacer === "function") return replacer(key, value2);
|
|
631
|
+
if (Array.isArray(replacer) && replacer.includes(key)) return value2;
|
|
632
|
+
return value2;
|
|
633
|
+
},
|
|
634
|
+
space
|
|
635
|
+
);
|
|
636
|
+
const processedJSON = convertedToCustomJSON.replace(
|
|
637
|
+
bigIntsStringify,
|
|
638
|
+
"$1$2$3"
|
|
639
|
+
);
|
|
640
|
+
const denoisedJSON = processedJSON.replace(noiseStringify, "$1$2$3");
|
|
641
|
+
return denoisedJSON;
|
|
642
|
+
};
|
|
643
|
+
featureCache = /* @__PURE__ */ new Map();
|
|
644
|
+
isContextSourceSupported = () => {
|
|
645
|
+
const parseFingerprint = JSON.parse.toString();
|
|
646
|
+
if (featureCache.has(parseFingerprint)) {
|
|
647
|
+
return featureCache.get(parseFingerprint);
|
|
648
|
+
}
|
|
649
|
+
try {
|
|
650
|
+
const result = JSON.parse(
|
|
651
|
+
"1",
|
|
652
|
+
(_, __, context) => !!context?.source && context.source === "1"
|
|
653
|
+
);
|
|
654
|
+
featureCache.set(parseFingerprint, result);
|
|
655
|
+
return result;
|
|
656
|
+
} catch {
|
|
657
|
+
featureCache.set(parseFingerprint, false);
|
|
658
|
+
return false;
|
|
659
|
+
}
|
|
660
|
+
};
|
|
661
|
+
convertMarkedBigIntsReviver = (key, value, context, userReviver) => {
|
|
662
|
+
const isCustomFormatBigInt = typeof value === "string" && customFormat.test(value);
|
|
663
|
+
if (isCustomFormatBigInt) return BigInt(value.slice(0, -1));
|
|
664
|
+
const isNoiseValue = typeof value === "string" && noiseValue.test(value);
|
|
665
|
+
if (isNoiseValue) return value.slice(0, -1);
|
|
666
|
+
if (typeof userReviver !== "function") return value;
|
|
667
|
+
return userReviver(key, value, context);
|
|
668
|
+
};
|
|
669
|
+
JSONParseV2 = (text, reviver) => {
|
|
670
|
+
return JSON.parse(text, (key, value, context) => {
|
|
671
|
+
const isBigNumber = typeof value === "number" && (value > Number.MAX_SAFE_INTEGER || value < Number.MIN_SAFE_INTEGER);
|
|
672
|
+
const isInt = context && intRegex.test(context.source);
|
|
673
|
+
const isBigInt = isBigNumber && isInt;
|
|
674
|
+
if (isBigInt) return BigInt(context.source);
|
|
675
|
+
if (typeof reviver !== "function") return value;
|
|
676
|
+
return reviver(key, value, context);
|
|
677
|
+
});
|
|
678
|
+
};
|
|
679
|
+
MAX_INT = Number.MAX_SAFE_INTEGER.toString();
|
|
680
|
+
MAX_DIGITS = MAX_INT.length;
|
|
681
|
+
stringsOrLargeNumbers = /"(?:\\.|[^"])*"|-?(0|[1-9][0-9]*)(\.[0-9]+)?([eE][+-]?[0-9]+)?/g;
|
|
682
|
+
noiseValueWithQuotes = /^"-?\d+n+"$/;
|
|
683
|
+
JSONParse = (text, reviver) => {
|
|
684
|
+
if (!text) return originalParse(text, reviver);
|
|
685
|
+
if (isContextSourceSupported()) return JSONParseV2(text, reviver);
|
|
686
|
+
const serializedData = text.replace(
|
|
687
|
+
stringsOrLargeNumbers,
|
|
688
|
+
(text2, digits, fractional, exponential) => {
|
|
689
|
+
const isString = text2[0] === '"';
|
|
690
|
+
const isNoise = isString && noiseValueWithQuotes.test(text2);
|
|
691
|
+
if (isNoise) return text2.substring(0, text2.length - 1) + 'n"';
|
|
692
|
+
const isFractionalOrExponential = fractional || exponential;
|
|
693
|
+
const isLessThanMaxSafeInt = digits && (digits.length < MAX_DIGITS || digits.length === MAX_DIGITS && digits <= MAX_INT);
|
|
694
|
+
if (isString || isFractionalOrExponential || isLessThanMaxSafeInt)
|
|
695
|
+
return text2;
|
|
696
|
+
return '"' + text2 + 'n"';
|
|
697
|
+
}
|
|
698
|
+
);
|
|
699
|
+
return originalParse(
|
|
700
|
+
serializedData,
|
|
701
|
+
(key, value, context) => convertMarkedBigIntsReviver(key, value, context, reviver)
|
|
702
|
+
);
|
|
703
|
+
};
|
|
704
|
+
}
|
|
705
|
+
});
|
|
706
|
+
|
|
598
707
|
// node_modules/@octokit/request-error/dist-src/index.js
|
|
599
708
|
var RequestError;
|
|
600
709
|
var init_dist_src = __esm({
|
|
@@ -658,7 +767,7 @@ async function fetchWrapper(requestOptions) {
|
|
|
658
767
|
}
|
|
659
768
|
const log = requestOptions.request?.log || console;
|
|
660
769
|
const parseSuccessResponseBody = requestOptions.request?.parseSuccessResponseBody !== false;
|
|
661
|
-
const body = isPlainObject2(requestOptions.body) || Array.isArray(requestOptions.body) ?
|
|
770
|
+
const body = isPlainObject2(requestOptions.body) || Array.isArray(requestOptions.body) ? JSONStringify(requestOptions.body) : requestOptions.body;
|
|
662
771
|
const requestHeaders = Object.fromEntries(
|
|
663
772
|
Object.entries(requestOptions.headers).map(([name, value]) => [
|
|
664
773
|
name,
|
|
@@ -757,7 +866,7 @@ async function getResponseData(response2) {
|
|
|
757
866
|
let text = "";
|
|
758
867
|
try {
|
|
759
868
|
text = await response2.text();
|
|
760
|
-
return
|
|
869
|
+
return JSONParse(text);
|
|
761
870
|
} catch (err) {
|
|
762
871
|
return text;
|
|
763
872
|
}
|
|
@@ -816,8 +925,9 @@ var init_dist_bundle2 = __esm({
|
|
|
816
925
|
init_dist_bundle();
|
|
817
926
|
init_universal_user_agent();
|
|
818
927
|
import_fast_content_type_parse = __toESM(require_fast_content_type_parse(), 1);
|
|
928
|
+
init_json_with_bigint();
|
|
819
929
|
init_dist_src();
|
|
820
|
-
VERSION2 = "10.0.
|
|
930
|
+
VERSION2 = "10.0.8";
|
|
821
931
|
defaults_default = {
|
|
822
932
|
headers: {
|
|
823
933
|
"user-agent": `octokit-request.js/${VERSION2} ${getUserAgent()}`
|
|
@@ -3816,11 +3926,11 @@ var import_client_secrets_manager = require("@aws-sdk/client-secrets-manager");
|
|
|
3816
3926
|
var sm = new import_client_secrets_manager.SecretsManagerClient();
|
|
3817
3927
|
async function getSecretValue(arn) {
|
|
3818
3928
|
if (!arn) {
|
|
3819
|
-
throw new Error("Missing secret ARN");
|
|
3929
|
+
throw new Error("Missing secret ARN. Check the Lambda configuration and required environment variables.");
|
|
3820
3930
|
}
|
|
3821
3931
|
const secret = await sm.send(new import_client_secrets_manager.GetSecretValueCommand({ SecretId: arn }));
|
|
3822
3932
|
if (!secret.SecretString) {
|
|
3823
|
-
throw new Error(
|
|
3933
|
+
throw new Error("Secrets Manager getSecretValue returned no SecretString. This often indicates that the secret was stored as binary data (SecretBinary) instead of a string. Ensure the secret is stored in SecretString or update the code to handle SecretBinary.");
|
|
3824
3934
|
}
|
|
3825
3935
|
return secret.SecretString;
|
|
3826
3936
|
}
|
|
@@ -3829,7 +3939,7 @@ async function getSecretJsonValue(arn) {
|
|
|
3829
3939
|
}
|
|
3830
3940
|
async function updateSecretValue(arn, value) {
|
|
3831
3941
|
if (!arn) {
|
|
3832
|
-
throw new Error("Missing secret ARN");
|
|
3942
|
+
throw new Error("Missing secret ARN. Check the Lambda configuration and required environment variables.");
|
|
3833
3943
|
}
|
|
3834
3944
|
await sm.send(new import_client_secrets_manager.UpdateSecretCommand({ SecretId: arn, SecretString: value }));
|
|
3835
3945
|
}
|
|
@@ -3977,7 +4087,7 @@ async function handler2(event) {
|
|
|
3977
4087
|
} catch (e) {
|
|
3978
4088
|
console.error({
|
|
3979
4089
|
notice: "Setup handler failed",
|
|
3980
|
-
error:
|
|
4090
|
+
error: e
|
|
3981
4091
|
});
|
|
3982
4092
|
return response(500, `<b>Error:</b> ${e}`);
|
|
3983
4093
|
}
|
|
@@ -300,7 +300,7 @@ function isKeyOperator(operator) {
|
|
|
300
300
|
function getValues(context, operator, key, modifier) {
|
|
301
301
|
var value = context[key], result = [];
|
|
302
302
|
if (isDefined(value) && value !== "") {
|
|
303
|
-
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
|
|
303
|
+
if (typeof value === "string" || typeof value === "number" || typeof value === "bigint" || typeof value === "boolean") {
|
|
304
304
|
value = value.toString();
|
|
305
305
|
if (modifier && modifier !== "*") {
|
|
306
306
|
value = value.substring(0, parseInt(modifier, 10));
|
|
@@ -595,6 +595,115 @@ var require_fast_content_type_parse = __commonJS({
|
|
|
595
595
|
}
|
|
596
596
|
});
|
|
597
597
|
|
|
598
|
+
// node_modules/json-with-bigint/json-with-bigint.js
|
|
599
|
+
var intRegex, noiseValue, originalStringify, originalParse, customFormat, bigIntsStringify, noiseStringify, JSONStringify, featureCache, isContextSourceSupported, convertMarkedBigIntsReviver, JSONParseV2, MAX_INT, MAX_DIGITS, stringsOrLargeNumbers, noiseValueWithQuotes, JSONParse;
|
|
600
|
+
var init_json_with_bigint = __esm({
|
|
601
|
+
"node_modules/json-with-bigint/json-with-bigint.js"() {
|
|
602
|
+
"use strict";
|
|
603
|
+
intRegex = /^-?\d+$/;
|
|
604
|
+
noiseValue = /^-?\d+n+$/;
|
|
605
|
+
originalStringify = JSON.stringify;
|
|
606
|
+
originalParse = JSON.parse;
|
|
607
|
+
customFormat = /^-?\d+n$/;
|
|
608
|
+
bigIntsStringify = /([\[:])?"(-?\d+)n"($|([\\n]|\s)*(\s|[\\n])*[,\}\]])/g;
|
|
609
|
+
noiseStringify = /([\[:])?("-?\d+n+)n("$|"([\\n]|\s)*(\s|[\\n])*[,\}\]])/g;
|
|
610
|
+
JSONStringify = (value, replacer, space) => {
|
|
611
|
+
if ("rawJSON" in JSON) {
|
|
612
|
+
return originalStringify(
|
|
613
|
+
value,
|
|
614
|
+
(key, value2) => {
|
|
615
|
+
if (typeof value2 === "bigint") return JSON.rawJSON(value2.toString());
|
|
616
|
+
if (typeof replacer === "function") return replacer(key, value2);
|
|
617
|
+
if (Array.isArray(replacer) && replacer.includes(key)) return value2;
|
|
618
|
+
return value2;
|
|
619
|
+
},
|
|
620
|
+
space
|
|
621
|
+
);
|
|
622
|
+
}
|
|
623
|
+
if (!value) return originalStringify(value, replacer, space);
|
|
624
|
+
const convertedToCustomJSON = originalStringify(
|
|
625
|
+
value,
|
|
626
|
+
(key, value2) => {
|
|
627
|
+
const isNoise = typeof value2 === "string" && noiseValue.test(value2);
|
|
628
|
+
if (isNoise) return value2.toString() + "n";
|
|
629
|
+
if (typeof value2 === "bigint") return value2.toString() + "n";
|
|
630
|
+
if (typeof replacer === "function") return replacer(key, value2);
|
|
631
|
+
if (Array.isArray(replacer) && replacer.includes(key)) return value2;
|
|
632
|
+
return value2;
|
|
633
|
+
},
|
|
634
|
+
space
|
|
635
|
+
);
|
|
636
|
+
const processedJSON = convertedToCustomJSON.replace(
|
|
637
|
+
bigIntsStringify,
|
|
638
|
+
"$1$2$3"
|
|
639
|
+
);
|
|
640
|
+
const denoisedJSON = processedJSON.replace(noiseStringify, "$1$2$3");
|
|
641
|
+
return denoisedJSON;
|
|
642
|
+
};
|
|
643
|
+
featureCache = /* @__PURE__ */ new Map();
|
|
644
|
+
isContextSourceSupported = () => {
|
|
645
|
+
const parseFingerprint = JSON.parse.toString();
|
|
646
|
+
if (featureCache.has(parseFingerprint)) {
|
|
647
|
+
return featureCache.get(parseFingerprint);
|
|
648
|
+
}
|
|
649
|
+
try {
|
|
650
|
+
const result = JSON.parse(
|
|
651
|
+
"1",
|
|
652
|
+
(_, __, context) => !!context?.source && context.source === "1"
|
|
653
|
+
);
|
|
654
|
+
featureCache.set(parseFingerprint, result);
|
|
655
|
+
return result;
|
|
656
|
+
} catch {
|
|
657
|
+
featureCache.set(parseFingerprint, false);
|
|
658
|
+
return false;
|
|
659
|
+
}
|
|
660
|
+
};
|
|
661
|
+
convertMarkedBigIntsReviver = (key, value, context, userReviver) => {
|
|
662
|
+
const isCustomFormatBigInt = typeof value === "string" && customFormat.test(value);
|
|
663
|
+
if (isCustomFormatBigInt) return BigInt(value.slice(0, -1));
|
|
664
|
+
const isNoiseValue = typeof value === "string" && noiseValue.test(value);
|
|
665
|
+
if (isNoiseValue) return value.slice(0, -1);
|
|
666
|
+
if (typeof userReviver !== "function") return value;
|
|
667
|
+
return userReviver(key, value, context);
|
|
668
|
+
};
|
|
669
|
+
JSONParseV2 = (text, reviver) => {
|
|
670
|
+
return JSON.parse(text, (key, value, context) => {
|
|
671
|
+
const isBigNumber = typeof value === "number" && (value > Number.MAX_SAFE_INTEGER || value < Number.MIN_SAFE_INTEGER);
|
|
672
|
+
const isInt = context && intRegex.test(context.source);
|
|
673
|
+
const isBigInt = isBigNumber && isInt;
|
|
674
|
+
if (isBigInt) return BigInt(context.source);
|
|
675
|
+
if (typeof reviver !== "function") return value;
|
|
676
|
+
return reviver(key, value, context);
|
|
677
|
+
});
|
|
678
|
+
};
|
|
679
|
+
MAX_INT = Number.MAX_SAFE_INTEGER.toString();
|
|
680
|
+
MAX_DIGITS = MAX_INT.length;
|
|
681
|
+
stringsOrLargeNumbers = /"(?:\\.|[^"])*"|-?(0|[1-9][0-9]*)(\.[0-9]+)?([eE][+-]?[0-9]+)?/g;
|
|
682
|
+
noiseValueWithQuotes = /^"-?\d+n+"$/;
|
|
683
|
+
JSONParse = (text, reviver) => {
|
|
684
|
+
if (!text) return originalParse(text, reviver);
|
|
685
|
+
if (isContextSourceSupported()) return JSONParseV2(text, reviver);
|
|
686
|
+
const serializedData = text.replace(
|
|
687
|
+
stringsOrLargeNumbers,
|
|
688
|
+
(text2, digits, fractional, exponential) => {
|
|
689
|
+
const isString = text2[0] === '"';
|
|
690
|
+
const isNoise = isString && noiseValueWithQuotes.test(text2);
|
|
691
|
+
if (isNoise) return text2.substring(0, text2.length - 1) + 'n"';
|
|
692
|
+
const isFractionalOrExponential = fractional || exponential;
|
|
693
|
+
const isLessThanMaxSafeInt = digits && (digits.length < MAX_DIGITS || digits.length === MAX_DIGITS && digits <= MAX_INT);
|
|
694
|
+
if (isString || isFractionalOrExponential || isLessThanMaxSafeInt)
|
|
695
|
+
return text2;
|
|
696
|
+
return '"' + text2 + 'n"';
|
|
697
|
+
}
|
|
698
|
+
);
|
|
699
|
+
return originalParse(
|
|
700
|
+
serializedData,
|
|
701
|
+
(key, value, context) => convertMarkedBigIntsReviver(key, value, context, reviver)
|
|
702
|
+
);
|
|
703
|
+
};
|
|
704
|
+
}
|
|
705
|
+
});
|
|
706
|
+
|
|
598
707
|
// node_modules/@octokit/request-error/dist-src/index.js
|
|
599
708
|
var RequestError;
|
|
600
709
|
var init_dist_src = __esm({
|
|
@@ -658,7 +767,7 @@ async function fetchWrapper(requestOptions) {
|
|
|
658
767
|
}
|
|
659
768
|
const log = requestOptions.request?.log || console;
|
|
660
769
|
const parseSuccessResponseBody = requestOptions.request?.parseSuccessResponseBody !== false;
|
|
661
|
-
const body = isPlainObject2(requestOptions.body) || Array.isArray(requestOptions.body) ?
|
|
770
|
+
const body = isPlainObject2(requestOptions.body) || Array.isArray(requestOptions.body) ? JSONStringify(requestOptions.body) : requestOptions.body;
|
|
662
771
|
const requestHeaders = Object.fromEntries(
|
|
663
772
|
Object.entries(requestOptions.headers).map(([name, value]) => [
|
|
664
773
|
name,
|
|
@@ -757,7 +866,7 @@ async function getResponseData(response) {
|
|
|
757
866
|
let text = "";
|
|
758
867
|
try {
|
|
759
868
|
text = await response.text();
|
|
760
|
-
return
|
|
869
|
+
return JSONParse(text);
|
|
761
870
|
} catch (err) {
|
|
762
871
|
return text;
|
|
763
872
|
}
|
|
@@ -816,8 +925,9 @@ var init_dist_bundle2 = __esm({
|
|
|
816
925
|
init_dist_bundle();
|
|
817
926
|
init_universal_user_agent();
|
|
818
927
|
import_fast_content_type_parse = __toESM(require_fast_content_type_parse(), 1);
|
|
928
|
+
init_json_with_bigint();
|
|
819
929
|
init_dist_src();
|
|
820
|
-
VERSION2 = "10.0.
|
|
930
|
+
VERSION2 = "10.0.8";
|
|
821
931
|
defaults_default = {
|
|
822
932
|
headers: {
|
|
823
933
|
"user-agent": `octokit-request.js/${VERSION2} ${getUserAgent()}`
|
|
@@ -2391,6 +2501,8 @@ function requiresAppAuth(url) {
|
|
|
2391
2501
|
}
|
|
2392
2502
|
function isNotTimeSkewError(error) {
|
|
2393
2503
|
return !(error.message.match(
|
|
2504
|
+
/'Expiration time' claim \('exp'\) is too far in the future/
|
|
2505
|
+
) || error.message.match(
|
|
2394
2506
|
/'Expiration time' claim \('exp'\) must be a numeric value representing the future time at which the assertion expires/
|
|
2395
2507
|
) || error.message.match(
|
|
2396
2508
|
/'Issued at' claim \('iat'\) must be an Integer representing the time that the assertion was issued/
|
|
@@ -2552,11 +2664,12 @@ var init_dist_node = __esm({
|
|
|
2552
2664
|
"/marketplace_listing/stubbed/plans/{plan_id}/accounts",
|
|
2553
2665
|
"/orgs/{org}/installation",
|
|
2554
2666
|
"/repos/{owner}/{repo}/installation",
|
|
2555
|
-
"/users/{username}/installation"
|
|
2667
|
+
"/users/{username}/installation",
|
|
2668
|
+
"/enterprises/{enterprise}/installation"
|
|
2556
2669
|
];
|
|
2557
2670
|
REGEX = routeMatcher(PATHS);
|
|
2558
2671
|
FIVE_SECONDS_IN_MS = 5 * 1e3;
|
|
2559
|
-
VERSION8 = "8.
|
|
2672
|
+
VERSION8 = "8.2.0";
|
|
2560
2673
|
}
|
|
2561
2674
|
});
|
|
2562
2675
|
|
|
@@ -2576,11 +2689,11 @@ var import_client_secrets_manager = require("@aws-sdk/client-secrets-manager");
|
|
|
2576
2689
|
var sm = new import_client_secrets_manager.SecretsManagerClient();
|
|
2577
2690
|
async function getSecretValue(arn) {
|
|
2578
2691
|
if (!arn) {
|
|
2579
|
-
throw new Error("Missing secret ARN");
|
|
2692
|
+
throw new Error("Missing secret ARN. Check the Lambda configuration and required environment variables.");
|
|
2580
2693
|
}
|
|
2581
2694
|
const secret = await sm.send(new import_client_secrets_manager.GetSecretValueCommand({ SecretId: arn }));
|
|
2582
2695
|
if (!secret.SecretString) {
|
|
2583
|
-
throw new Error(
|
|
2696
|
+
throw new Error("Secrets Manager getSecretValue returned no SecretString. This often indicates that the secret was stored as binary data (SecretBinary) instead of a string. Ensure the secret is stored in SecretString or update the code to handle SecretBinary.");
|
|
2584
2697
|
}
|
|
2585
2698
|
return secret.SecretString;
|
|
2586
2699
|
}
|
|
@@ -300,7 +300,7 @@ function isKeyOperator(operator) {
|
|
|
300
300
|
function getValues(context, operator, key, modifier) {
|
|
301
301
|
var value = context[key], result = [];
|
|
302
302
|
if (isDefined(value) && value !== "") {
|
|
303
|
-
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
|
|
303
|
+
if (typeof value === "string" || typeof value === "number" || typeof value === "bigint" || typeof value === "boolean") {
|
|
304
304
|
value = value.toString();
|
|
305
305
|
if (modifier && modifier !== "*") {
|
|
306
306
|
value = value.substring(0, parseInt(modifier, 10));
|
|
@@ -595,6 +595,115 @@ var require_fast_content_type_parse = __commonJS({
|
|
|
595
595
|
}
|
|
596
596
|
});
|
|
597
597
|
|
|
598
|
+
// node_modules/json-with-bigint/json-with-bigint.js
|
|
599
|
+
var intRegex, noiseValue, originalStringify, originalParse, customFormat, bigIntsStringify, noiseStringify, JSONStringify, featureCache, isContextSourceSupported, convertMarkedBigIntsReviver, JSONParseV2, MAX_INT, MAX_DIGITS, stringsOrLargeNumbers, noiseValueWithQuotes, JSONParse;
|
|
600
|
+
var init_json_with_bigint = __esm({
|
|
601
|
+
"node_modules/json-with-bigint/json-with-bigint.js"() {
|
|
602
|
+
"use strict";
|
|
603
|
+
intRegex = /^-?\d+$/;
|
|
604
|
+
noiseValue = /^-?\d+n+$/;
|
|
605
|
+
originalStringify = JSON.stringify;
|
|
606
|
+
originalParse = JSON.parse;
|
|
607
|
+
customFormat = /^-?\d+n$/;
|
|
608
|
+
bigIntsStringify = /([\[:])?"(-?\d+)n"($|([\\n]|\s)*(\s|[\\n])*[,\}\]])/g;
|
|
609
|
+
noiseStringify = /([\[:])?("-?\d+n+)n("$|"([\\n]|\s)*(\s|[\\n])*[,\}\]])/g;
|
|
610
|
+
JSONStringify = (value, replacer, space) => {
|
|
611
|
+
if ("rawJSON" in JSON) {
|
|
612
|
+
return originalStringify(
|
|
613
|
+
value,
|
|
614
|
+
(key, value2) => {
|
|
615
|
+
if (typeof value2 === "bigint") return JSON.rawJSON(value2.toString());
|
|
616
|
+
if (typeof replacer === "function") return replacer(key, value2);
|
|
617
|
+
if (Array.isArray(replacer) && replacer.includes(key)) return value2;
|
|
618
|
+
return value2;
|
|
619
|
+
},
|
|
620
|
+
space
|
|
621
|
+
);
|
|
622
|
+
}
|
|
623
|
+
if (!value) return originalStringify(value, replacer, space);
|
|
624
|
+
const convertedToCustomJSON = originalStringify(
|
|
625
|
+
value,
|
|
626
|
+
(key, value2) => {
|
|
627
|
+
const isNoise = typeof value2 === "string" && noiseValue.test(value2);
|
|
628
|
+
if (isNoise) return value2.toString() + "n";
|
|
629
|
+
if (typeof value2 === "bigint") return value2.toString() + "n";
|
|
630
|
+
if (typeof replacer === "function") return replacer(key, value2);
|
|
631
|
+
if (Array.isArray(replacer) && replacer.includes(key)) return value2;
|
|
632
|
+
return value2;
|
|
633
|
+
},
|
|
634
|
+
space
|
|
635
|
+
);
|
|
636
|
+
const processedJSON = convertedToCustomJSON.replace(
|
|
637
|
+
bigIntsStringify,
|
|
638
|
+
"$1$2$3"
|
|
639
|
+
);
|
|
640
|
+
const denoisedJSON = processedJSON.replace(noiseStringify, "$1$2$3");
|
|
641
|
+
return denoisedJSON;
|
|
642
|
+
};
|
|
643
|
+
featureCache = /* @__PURE__ */ new Map();
|
|
644
|
+
isContextSourceSupported = () => {
|
|
645
|
+
const parseFingerprint = JSON.parse.toString();
|
|
646
|
+
if (featureCache.has(parseFingerprint)) {
|
|
647
|
+
return featureCache.get(parseFingerprint);
|
|
648
|
+
}
|
|
649
|
+
try {
|
|
650
|
+
const result = JSON.parse(
|
|
651
|
+
"1",
|
|
652
|
+
(_, __, context) => !!context?.source && context.source === "1"
|
|
653
|
+
);
|
|
654
|
+
featureCache.set(parseFingerprint, result);
|
|
655
|
+
return result;
|
|
656
|
+
} catch {
|
|
657
|
+
featureCache.set(parseFingerprint, false);
|
|
658
|
+
return false;
|
|
659
|
+
}
|
|
660
|
+
};
|
|
661
|
+
convertMarkedBigIntsReviver = (key, value, context, userReviver) => {
|
|
662
|
+
const isCustomFormatBigInt = typeof value === "string" && customFormat.test(value);
|
|
663
|
+
if (isCustomFormatBigInt) return BigInt(value.slice(0, -1));
|
|
664
|
+
const isNoiseValue = typeof value === "string" && noiseValue.test(value);
|
|
665
|
+
if (isNoiseValue) return value.slice(0, -1);
|
|
666
|
+
if (typeof userReviver !== "function") return value;
|
|
667
|
+
return userReviver(key, value, context);
|
|
668
|
+
};
|
|
669
|
+
JSONParseV2 = (text, reviver) => {
|
|
670
|
+
return JSON.parse(text, (key, value, context) => {
|
|
671
|
+
const isBigNumber = typeof value === "number" && (value > Number.MAX_SAFE_INTEGER || value < Number.MIN_SAFE_INTEGER);
|
|
672
|
+
const isInt = context && intRegex.test(context.source);
|
|
673
|
+
const isBigInt = isBigNumber && isInt;
|
|
674
|
+
if (isBigInt) return BigInt(context.source);
|
|
675
|
+
if (typeof reviver !== "function") return value;
|
|
676
|
+
return reviver(key, value, context);
|
|
677
|
+
});
|
|
678
|
+
};
|
|
679
|
+
MAX_INT = Number.MAX_SAFE_INTEGER.toString();
|
|
680
|
+
MAX_DIGITS = MAX_INT.length;
|
|
681
|
+
stringsOrLargeNumbers = /"(?:\\.|[^"])*"|-?(0|[1-9][0-9]*)(\.[0-9]+)?([eE][+-]?[0-9]+)?/g;
|
|
682
|
+
noiseValueWithQuotes = /^"-?\d+n+"$/;
|
|
683
|
+
JSONParse = (text, reviver) => {
|
|
684
|
+
if (!text) return originalParse(text, reviver);
|
|
685
|
+
if (isContextSourceSupported()) return JSONParseV2(text, reviver);
|
|
686
|
+
const serializedData = text.replace(
|
|
687
|
+
stringsOrLargeNumbers,
|
|
688
|
+
(text2, digits, fractional, exponential) => {
|
|
689
|
+
const isString = text2[0] === '"';
|
|
690
|
+
const isNoise = isString && noiseValueWithQuotes.test(text2);
|
|
691
|
+
if (isNoise) return text2.substring(0, text2.length - 1) + 'n"';
|
|
692
|
+
const isFractionalOrExponential = fractional || exponential;
|
|
693
|
+
const isLessThanMaxSafeInt = digits && (digits.length < MAX_DIGITS || digits.length === MAX_DIGITS && digits <= MAX_INT);
|
|
694
|
+
if (isString || isFractionalOrExponential || isLessThanMaxSafeInt)
|
|
695
|
+
return text2;
|
|
696
|
+
return '"' + text2 + 'n"';
|
|
697
|
+
}
|
|
698
|
+
);
|
|
699
|
+
return originalParse(
|
|
700
|
+
serializedData,
|
|
701
|
+
(key, value, context) => convertMarkedBigIntsReviver(key, value, context, reviver)
|
|
702
|
+
);
|
|
703
|
+
};
|
|
704
|
+
}
|
|
705
|
+
});
|
|
706
|
+
|
|
598
707
|
// node_modules/@octokit/request-error/dist-src/index.js
|
|
599
708
|
var RequestError;
|
|
600
709
|
var init_dist_src = __esm({
|
|
@@ -658,7 +767,7 @@ async function fetchWrapper(requestOptions) {
|
|
|
658
767
|
}
|
|
659
768
|
const log = requestOptions.request?.log || console;
|
|
660
769
|
const parseSuccessResponseBody = requestOptions.request?.parseSuccessResponseBody !== false;
|
|
661
|
-
const body = isPlainObject2(requestOptions.body) || Array.isArray(requestOptions.body) ?
|
|
770
|
+
const body = isPlainObject2(requestOptions.body) || Array.isArray(requestOptions.body) ? JSONStringify(requestOptions.body) : requestOptions.body;
|
|
662
771
|
const requestHeaders = Object.fromEntries(
|
|
663
772
|
Object.entries(requestOptions.headers).map(([name, value]) => [
|
|
664
773
|
name,
|
|
@@ -757,7 +866,7 @@ async function getResponseData(response) {
|
|
|
757
866
|
let text = "";
|
|
758
867
|
try {
|
|
759
868
|
text = await response.text();
|
|
760
|
-
return
|
|
869
|
+
return JSONParse(text);
|
|
761
870
|
} catch (err) {
|
|
762
871
|
return text;
|
|
763
872
|
}
|
|
@@ -816,8 +925,9 @@ var init_dist_bundle2 = __esm({
|
|
|
816
925
|
init_dist_bundle();
|
|
817
926
|
init_universal_user_agent();
|
|
818
927
|
import_fast_content_type_parse = __toESM(require_fast_content_type_parse(), 1);
|
|
928
|
+
init_json_with_bigint();
|
|
819
929
|
init_dist_src();
|
|
820
|
-
VERSION2 = "10.0.
|
|
930
|
+
VERSION2 = "10.0.8";
|
|
821
931
|
defaults_default = {
|
|
822
932
|
headers: {
|
|
823
933
|
"user-agent": `octokit-request.js/${VERSION2} ${getUserAgent()}`
|
|
@@ -5040,6 +5150,8 @@ function requiresAppAuth(url) {
|
|
|
5040
5150
|
}
|
|
5041
5151
|
function isNotTimeSkewError(error) {
|
|
5042
5152
|
return !(error.message.match(
|
|
5153
|
+
/'Expiration time' claim \('exp'\) is too far in the future/
|
|
5154
|
+
) || error.message.match(
|
|
5043
5155
|
/'Expiration time' claim \('exp'\) must be a numeric value representing the future time at which the assertion expires/
|
|
5044
5156
|
) || error.message.match(
|
|
5045
5157
|
/'Issued at' claim \('iat'\) must be an Integer representing the time that the assertion was issued/
|
|
@@ -5201,11 +5313,12 @@ var init_dist_node = __esm({
|
|
|
5201
5313
|
"/marketplace_listing/stubbed/plans/{plan_id}/accounts",
|
|
5202
5314
|
"/orgs/{org}/installation",
|
|
5203
5315
|
"/repos/{owner}/{repo}/installation",
|
|
5204
|
-
"/users/{username}/installation"
|
|
5316
|
+
"/users/{username}/installation",
|
|
5317
|
+
"/enterprises/{enterprise}/installation"
|
|
5205
5318
|
];
|
|
5206
5319
|
REGEX = routeMatcher(PATHS);
|
|
5207
5320
|
FIVE_SECONDS_IN_MS = 5 * 1e3;
|
|
5208
|
-
VERSION12 = "8.
|
|
5321
|
+
VERSION12 = "8.2.0";
|
|
5209
5322
|
}
|
|
5210
5323
|
});
|
|
5211
5324
|
|
|
@@ -5224,11 +5337,11 @@ var import_client_secrets_manager = require("@aws-sdk/client-secrets-manager");
|
|
|
5224
5337
|
var sm = new import_client_secrets_manager.SecretsManagerClient();
|
|
5225
5338
|
async function getSecretValue(arn) {
|
|
5226
5339
|
if (!arn) {
|
|
5227
|
-
throw new Error("Missing secret ARN");
|
|
5340
|
+
throw new Error("Missing secret ARN. Check the Lambda configuration and required environment variables.");
|
|
5228
5341
|
}
|
|
5229
5342
|
const secret = await sm.send(new import_client_secrets_manager.GetSecretValueCommand({ SecretId: arn }));
|
|
5230
5343
|
if (!secret.SecretString) {
|
|
5231
|
-
throw new Error(
|
|
5344
|
+
throw new Error("Secrets Manager getSecretValue returned no SecretString. This often indicates that the secret was stored as binary data (SecretBinary) instead of a string. Ensure the secret is stored in SecretString or update the code to handle SecretBinary.");
|
|
5232
5345
|
}
|
|
5233
5346
|
return secret.SecretString;
|
|
5234
5347
|
}
|