lambda-live-debugger
Version:
Debug Lambda functions locally like it is running in the cloud
91 lines (90 loc) • 3.47 kB
JavaScript
import { BinaryDecisionDiagram } from "@smithy/core/endpoints";
const p = "ref";
const a = -1, b = true, c = "isSet", d = "booleanEquals", e = "PartitionResult", f = "stringEquals", g = "getAttr", h = "https://signin.{Region}.{PartitionResult#dualStackDnsSuffix}", i = { [p]: "Endpoint" }, j = { "fn": g, "argv": [{ [p]: e }, "name"] }, k = { [p]: e }, l = { [p]: "Region" }, m = { "authSchemes": [{ "name": "sigv4", "signingName": "signin", "signingRegion": "{Region}" }] }, n = {}, o = [l];
const _data = {
conditions: [
[],
[]: "IsControlPlane" }, false] }, b]],
[]],
["aws.partition", o, e],
[]: "UseFIPS" }, b]],
[]: "UseDualStack" }, b]],
[]],
[]],
[] }, b]],
[]],
[]],
[] }, b]],
[]],
[]],
[]],
[]],
[]]
],
results: [
[],
["https://signin.{Region}.api.aws", m],
["https://signin.{Region}.api.amazonwebservices.com.cn", m],
[],
["https://{Region}.signin.aws.amazon.com", n],
["https://{Region}.signin.amazonaws.cn", n],
["https://{Region}.signin.amazonaws-us-gov.com", n],
["https://{Region}.signin.c2shome.ic.gov", n],
["https://{Region}.signin.sc2shome.sgov.gov", n],
["https://{Region}.signin.csphome.hci.ic.gov", n],
["https://{Region}.signin.csphome.adc-e.uk", n],
["https://{Region}.signin.amazonaws-eusc.eu", n],
["https://signin-fips.amazonaws-us-gov.com", n],
["https://{Region}.signin-fips.amazonaws-us-gov.com", n],
["https://{Region}.signin.{PartitionResult#dnsSuffix}", n],
[],
[],
[],
["https://signin-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", n],
[],
["https://signin-fips.{Region}.{PartitionResult#dnsSuffix}", n],
[],
[],
[],
["https://signin.{Region}.{PartitionResult#dnsSuffix}", n],
[]
]
};
const root = 2;
const r = 100_000_000;
const nodes = new Int32Array([
-1, 1, -1,
0, 4, 3,
2, 30, r + 25,
1, 24, 5,
2, 30, 6,
3, 7, 26,
4, 18, 8,
5, 17, 9,
6, r + 4, 10,
7, r + 5, 11,
10, r + 6, 12,
12, r + 7, 13,
13, r + 8, 14,
14, r + 9, 15,
15, r + 10, 16,
16, r + 11, r + 14,
8, r + 22, r + 23,
5, 22, 19,
9, r + 12, 20,
10, r + 13, 21,
11, r + 20, r + 21,
8, 23, r + 19,
11, r + 18, r + 19,
2, 29, 25,
3, 32, 26,
4, 27, r + 25,
5, r + 25, 28,
9, r + 12, r + 25,
3, 32, 30,
4, r + 15, 31,
5, r + 16, r + 17,
6, r + 1, 33,
7, r + 2, r + 3,
]);
export const bdd = BinaryDecisionDiagram.from(nodes, root, _data.conditions, _data.results);