lambda-live-debugger
Version:
Debug Lambda functions locally like it is running in the cloud
79 lines (78 loc) • 3.06 kB
JavaScript
import { BinaryDecisionDiagram } from "@smithy/core/endpoints";
const n = "ref";
const a = -1, b = true, c = "isSet", d = "PartitionResult", e = "booleanEquals", f = "getAttr", g = "stringEquals", h = { [n]: "Endpoint" }, i = { [n]: d }, j = { [n]: "Region" }, k = { "fn": f, "argv": [i, "name"] }, l = {}, m = [j];
const _data = {
conditions: [
[]],
[],
["aws.partition", m, d],
[]: "UseFIPS" }, b]],
[]: "UseDualStack" }, b]],
[] }, b]],
[] }, b]],
[]],
[]],
[]],
[]],
[]],
[]],
[]],
[]],
[]],
[]],
[]]
],
results: [
[],
[],
[],
[],
["https://data-ats.iot-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", l],
[],
["https://data.iot-fips.ca-central-1.amazonaws.com", l],
["https://data.iot-fips.us-east-1.amazonaws.com", l],
["https://data.iot-fips.us-east-2.amazonaws.com", l],
["https://data.iot-fips.us-west-1.amazonaws.com", l],
["https://data.iot-fips.us-west-2.amazonaws.com", l],
["https://data.iot-fips.us-gov-east-1.amazonaws.com", l],
["https://data.iot-fips.us-gov-west-1.amazonaws.com", l],
["https://data-ats.iot-fips.{Region}.{PartitionResult#dnsSuffix}", l],
[],
["https://data-ats.iot.{Region}.{PartitionResult#dualStackDnsSuffix}", l],
[],
["https://data.ats.iot.cn-north-1.amazonaws.com.cn", l],
["https://data-ats.iot.{Region}.amazonaws.com", l],
["https://data-ats.iot.{Region}.amazonaws.com.cn", l],
["https://data-ats.iot.{Region}.{PartitionResult#dnsSuffix}", l],
[]
]
};
const root = 2;
const r = 100_000_000;
const nodes = new Int32Array([
-1, 1, -1,
0, 23, 3,
1, 4, r + 21,
2, 5, r + 21,
3, 12, 6,
4, 11, 7,
8, r + 17, 8,
10, r + 18, 9,
11, r + 19, 10,
12, r + 18, r + 20,
5, r + 15, r + 16,
4, 21, 13,
6, 14, r + 14,
7, r + 6, 15,
9, r + 7, 16,
13, r + 8, 17,
14, r + 9, 18,
15, r + 10, 19,
16, r + 11, 20,
17, r + 12, r + 13,
5, 22, r + 5,
6, r + 4, r + 5,
3, r + 1, 24,
4, r + 2, r + 3,
]);
export const bdd = BinaryDecisionDiagram.from(nodes, root, _data.conditions, _data.results);