UNPKG

awv3

Version:
1,100 lines (1,099 loc) 180 kB
{ "type": "File", "start": 0, "end": 840, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 20, "column": 0 } }, "program": { "type": "Program", "start": 0, "end": 840, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 20, "column": 0 } }, "sourceType": "module", "body": [ { "type": "ExportDefaultDeclaration", "start": 107, "end": 839, "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 19, "column": 1 } }, "declaration": { "type": "FunctionDeclaration", "start": 122, "end": 839, "loc": { "start": { "line": 2, "column": 15 }, "end": { "line": 19, "column": 1 } }, "id": { "type": "Identifier", "start": 131, "end": 144, "loc": { "start": { "line": 2, "column": 24 }, "end": { "line": 2, "column": 37 }, "identifierName": "commandRunner" }, "name": "commandRunner", "leadingComments": null }, "generator": false, "expression": false, "async": false, "params": [ { "type": "Identifier", "start": 145, "end": 152, "loc": { "start": { "line": 2, "column": 38 }, "end": { "line": 2, "column": 45 }, "identifierName": "session" }, "name": "session" }, { "type": "Identifier", "start": 154, "end": 162, "loc": { "start": { "line": 2, "column": 47 }, "end": { "line": 2, "column": 55 }, "identifierName": "commands" }, "name": "commands" } ], "body": { "type": "BlockStatement", "start": 164, "end": 839, "loc": { "start": { "line": 2, "column": 57 }, "end": { "line": 19, "column": 1 } }, "body": [ { "type": "VariableDeclaration", "start": 170, "end": 555, "loc": { "start": { "line": 3, "column": 4 }, "end": { "line": 11, "column": 7 } }, "declarations": [ { "type": "VariableDeclarator", "start": 176, "end": 554, "loc": { "start": { "line": 3, "column": 10 }, "end": { "line": 11, "column": 6 } }, "id": { "type": "Identifier", "start": 176, "end": 183, "loc": { "start": { "line": 3, "column": 10 }, "end": { "line": 3, "column": 17 }, "identifierName": "promise" }, "name": "promise" }, "init": { "type": "CallExpression", "start": 186, "end": 554, "loc": { "start": { "line": 3, "column": 20 }, "end": { "line": 11, "column": 6 } }, "callee": { "type": "MemberExpression", "start": 186, "end": 216, "loc": { "start": { "line": 3, "column": 20 }, "end": { "line": 3, "column": 50 } }, "object": { "type": "CallExpression", "start": 186, "end": 211, "loc": { "start": { "line": 3, "column": 20 }, "end": { "line": 3, "column": 45 } }, "callee": { "type": "MemberExpression", "start": 186, "end": 201, "loc": { "start": { "line": 3, "column": 20 }, "end": { "line": 3, "column": 35 } }, "object": { "type": "Identifier", "start": 186, "end": 193, "loc": { "start": { "line": 3, "column": 20 }, "end": { "line": 3, "column": 27 }, "identifierName": "session" }, "name": "session" }, "property": { "type": "Identifier", "start": 194, "end": 201, "loc": { "start": { "line": 3, "column": 28 }, "end": { "line": 3, "column": 35 }, "identifierName": "request" }, "name": "request" }, "computed": false }, "arguments": [ { "type": "Identifier", "start": 202, "end": 210, "loc": { "start": { "line": 3, "column": 36 }, "end": { "line": 3, "column": 44 }, "identifierName": "commands" }, "name": "commands" } ] }, "property": { "type": "Identifier", "start": 212, "end": 216, "loc": { "start": { "line": 3, "column": 46 }, "end": { "line": 3, "column": 50 }, "identifierName": "then" }, "name": "then" }, "computed": false }, "arguments": [ { "type": "ArrowFunctionExpression", "start": 217, "end": 553, "loc": { "start": { "line": 3, "column": 51 }, "end": { "line": 11, "column": 5 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [ { "type": "Identifier", "start": 217, "end": 225, "loc": { "start": { "line": 3, "column": 51 }, "end": { "line": 3, "column": 59 }, "identifierName": "response" }, "name": "response" } ], "body": { "type": "BlockStatement", "start": 229, "end": 553, "loc": { "start": { "line": 3, "column": 63 }, "end": { "line": 11, "column": 5 } }, "body": [ { "type": "IfStatement", "start": 239, "end": 292, "loc": { "start": { "line": 4, "column": 8 }, "end": { "line": 4, "column": 61 } }, "test": { "type": "MemberExpression", "start": 243, "end": 265, "loc": { "start": { "line": 4, "column": 12 }, "end": { "line": 4, "column": 34 } }, "object": { "type": "MemberExpression", "start": 243, "end": 258, "loc": { "start": { "line": 4, "column": 12 }, "end": { "line": 4, "column": 27 } }, "object": { "type": "Identifier", "start": 243, "end": 251, "loc": { "start": { "line": 4, "column": 12 }, "end": { "line": 4, "column": 20 }, "identifierName": "response" }, "name": "response" }, "property": { "type": "Identifier", "start": 252, "end": 258, "loc": { "start": { "line": 4, "column": 21 }, "end": { "line": 4, "column": 27 }, "identifierName": "errors" }, "name": "errors" }, "computed": false }, "property": { "type": "Identifier", "start": 259, "end": 265, "loc": { "start": { "line": 4, "column": 28 }, "end": { "line": 4, "column": 34 }, "identifierName": "length" }, "name": "length" }, "computed": false }, "consequent": { "type": "ThrowStatement", "start": 267, "end": 292, "loc": { "start": { "line": 4, "column": 36 }, "end": { "line": 4, "column": 61 } }, "argument": { "type": "MemberExpression", "start": 273, "end": 291, "loc": { "start": { "line": 4, "column": 42 }, "end": { "line": 4, "column": 60 } }, "object": { "type": "MemberExpression", "start": 273, "end": 288, "loc": { "start": { "line": 4, "column": 42 }, "end": { "line": 4, "column": 57 } }, "object": { "type": "Identifier", "start": 273, "end": 281, "loc": { "start": { "line": 4, "column": 42 }, "end": { "line": 4, "column": 50 }, "identifierName": "response" }, "name": "response" }, "property": { "type": "Identifier", "start": 282, "end": 288, "loc": { "start": { "line": 4, "column": 51 }, "end": { "line": 4, "column": 57 }, "identifierName": "errors" }, "name": "errors" }, "computed": false }, "property": { "type": "NumericLiteral", "start": 289, "end": 290, "loc": { "start": { "line": 4, "column": 58 }, "end": { "line": 4, "column": 59 } }, "extra": { "rawValue": 0, "raw": "0" }, "value": 0 }, "computed": true } }, "alternate": null }, { "type": "VariableDeclaration", "start": 301, "end": 327, "loc": { "start": { "line": 5, "column": 8 }, "end": { "line": 5, "column": 34 } }, "declarations": [ { "type": "VariableDeclarator", "start": 305, "end": 326, "loc": { "start": { "line": 5, "column": 12 }, "end": { "line": 5, "column": 33 } }, "id": { "type": "Identifier", "start": 305, "end": 314, "loc": { "start": { "line": 5, "column": 12 }, "end": { "line": 5, "column": 21 }, "identifierName": "resultMap" }, "name": "resultMap" }, "init": { "type": "NewExpression", "start": 317, "end": 326, "loc": { "start": { "line": 5, "column": 24 }, "end": { "line": 5, "column": 33 } }, "callee": { "type": "Identifier", "start": 321, "end": 324, "loc": { "start": { "line": 5, "column": 28 }, "end": { "line": 5, "column": 31 }, "identifierName": "Map" }, "name": "Map" }, "arguments": [] } } ], "kind": "let" }, { "type": "ForOfStatement", "start": 336, "end": 521, "loc": { "start": { "line": 6, "column": 8 }, "end": { "line": 9, "column": 9 } }, "left": { "type": "VariableDeclaration", "start": 341, "end": 351, "loc": { "start": { "line": 6, "column": 13 }, "end": { "line": 6, "column": 23 } }, "declarations": [ { "type": "VariableDeclarator", "start": 345, "end": 351, "loc": { "start": { "line": 6, "column": 17 }, "end": { "line": 6, "column": 23 } }, "id": { "type": "Identifier", "start": 345, "end": 351, "loc": { "start": { "line": 6, "column": 17 }, "end": { "line": 6, "column": 23 }, "identifierName": "result" }, "name": "result" }, "init": null } ], "kind": "let" }, "right": { "type": "MemberExpression", "start": 355, "end": 371, "loc": { "start": { "line": 6, "column": 27 }, "end": { "line": 6, "column": 43 } }, "object": { "type": "Identifier", "start": 355, "end": 363, "loc": { "start": { "line": 6, "column": 27 }, "end": { "line": 6, "column": 35 }, "identifierName": "response" }, "name": "response" }, "property": { "type": "Identifier", "start": 364, "end": 371, "loc": { "start": { "line": 6, "column": 36 }, "end": { "line": 6, "column": 43 }, "identifierName": "results" }, "name": "results" }, "computed": false }, "body": { "type": "BlockStatement", "start": 373, "end": 521, "loc": { "start": { "line": 6, "column": 45 }, "end": { "line": 9, "column": 9 } }, "body": [ { "type": "IfStatement", "start": 387, "end": 451, "loc": { "start": { "line": 7, "column": 12 }, "end": { "line": 7, "column": 76 } }, "test": { "type": "UnaryExpression", "start": 391, "end": 418, "loc": { "start": { "line": 7, "column": 16 }, "end": { "line": 7, "column": 43 } }, "operator": "!", "prefix": true, "argument": { "type": "CallExpression", "start": 392, "end": 418, "loc": { "start": { "line": 7, "column": 17 }, "end": { "line": 7, "column": 43 } }, "callee": { "type": "MemberExpression", "start": 392, "end": 405, "loc": { "start": { "line": 7, "column": 17 }, "end": { "line": 7, "column": 30 } }, "object": { "type": "Identifier", "start": 392, "end": 401, "loc": { "start": { "line": 7, "column": 17 }, "end": { "line": 7, "column": 26 }, "identifierName": "resultMap" }, "name": "resultMap" }, "property": { "type": "Identifier", "start": 402, "end": 405, "loc": { "start": { "line": 7, "column": 27 }, "end": { "line": 7, "column": 30 }, "identifierName": "has" }, "name": "has" }, "computed": false }, "arguments": [ { "type": "MemberExpression", "start": 406, "end": 417, "loc": { "start": { "line": 7, "column": 31 }, "end": { "line": 7, "column": 42 } }, "object": { "type": "Identifier", "start": 406, "end": 412, "loc": { "start": { "line": 7, "column": 31 }, "end": { "line": 7, "column": 37 }, "identifierName": "result" }, "name": "result" }, "property": { "type": "Identifier", "start": 413, "end": 417, "loc": { "start": { "line": 7, "column": 38 }, "end": { "line": 7, "column": 42 }, "identifierName": "hint" }, "name": "hint" }, "computed": false } ] }, "extra": { "parenthesizedArgument": false } }, "consequent": { "type": "ExpressionStatement", "start": 420, "end": 451, "loc": { "start": { "line": 7, "column": 45 }, "end": { "line": 7, "column": 76 } }, "expression": { "type": "CallExpression", "start": 420, "end": 450, "loc": { "start": { "line": 7, "column": 45 }, "end": { "line": 7, "column": 75 } }, "callee": { "type": "MemberExpression", "start": 420, "end": 433, "loc": { "start": { "line": 7, "column": 45 }, "end": { "line": 7, "column": 58 } }, "object": { "type": "Identifier", "start": 420, "end": 429, "loc": { "start": { "line": 7, "column": 45 }, "end": { "line": 7, "column": 54 }, "identifierName": "resultMap" }, "name": "resultMap" }, "property": { "type": "Identifier", "start": 430, "end": 433, "loc": { "start": { "line": 7, "column": 55 }, "end": { "line": 7, "column": 58 }, "identifierName": "set" }, "name": "set" }, "computed": false }, "arguments": [ { "type": "MemberExpression", "start": 434, "end": 445, "loc": { "start": { "line": 7, "column": 59 }, "end": { "line": 7, "column": 70 } }, "object": { "type": "Identifier", "start": 434, "end": 440, "loc": { "start": { "line": 7, "column": 59 }, "end": { "line": 7, "column": 65 }, "identifierName": "result" }, "name": "result" }, "property": { "type": "Identifier", "start": 441, "end": 445, "loc": { "start": { "line": 7, "column": 66 }, "end": { "line": 7, "column": 70 }, "identifierName": "hint" }, "name": "hint" }, "computed": false }, { "type": "ArrayExpression", "start": 447, "end": 449, "loc": { "start": { "line": 7, "column": 72 }, "end": { "line": 7, "column": 74 } }, "elements": [] } ] } }, "alternate": null }, { "type": "ExpressionStatement", "start": 464, "end": 511, "loc": { "start": { "line": 8, "column": 12 }, "end": { "line": 8, "column": 59 } }, "expression": { "type": "CallExpression", "start": 464, "end": 510, "loc": { "start": { "line": 8, "column": 12 }, "end": { "line": 8,