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