UNPKG

awv3

Version:
1,100 lines (1,099 loc) 180 kB
{ "type": "File", "start": 0, "end": 796, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 18, "column": 0 } }, "program": { "type": "Program", "start": 0, "end": 796, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 18, "column": 0 } }, "sourceType": "module", "body": [ { "type": "ExportDefaultDeclaration", "start": 107, "end": 795, "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 17, "column": 1 } }, "declaration": { "type": "FunctionDeclaration", "start": 122, "end": 795, "loc": { "start": { "line": 2, "column": 15 }, "end": { "line": 17, "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": 795, "loc": { "start": { "line": 2, "column": 57 }, "end": { "line": 17, "column": 1 } }, "body": [ { "type": "VariableDeclaration", "start": 170, "end": 583, "loc": { "start": { "line": 3, "column": 4 }, "end": { "line": 13, "column": 7 } }, "declarations": [ { "type": "VariableDeclarator", "start": 176, "end": 582, "loc": { "start": { "line": 3, "column": 10 }, "end": { "line": 13, "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": 582, "loc": { "start": { "line": 3, "column": 20 }, "end": { "line": 13, "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": 581, "loc": { "start": { "line": 3, "column": 51 }, "end": { "line": 13, "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": 581, "loc": { "start": { "line": 3, "column": 63 }, "end": { "line": 13, "column": 5 } }, "body": [ { "type": "IfStatement", "start": 239, "end": 304, "loc": { "start": { "line": 4, "column": 8 }, "end": { "line": 5, "column": 37 } }, "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": 279, "end": 304, "loc": { "start": { "line": 5, "column": 12 }, "end": { "line": 5, "column": 37 } }, "argument": { "type": "MemberExpression", "start": 285, "end": 303, "loc": { "start": { "line": 5, "column": 18 }, "end": { "line": 5, "column": 36 } }, "object": { "type": "MemberExpression", "start": 285, "end": 300, "loc": { "start": { "line": 5, "column": 18 }, "end": { "line": 5, "column": 33 } }, "object": { "type": "Identifier", "start": 285, "end": 293, "loc": { "start": { "line": 5, "column": 18 }, "end": { "line": 5, "column": 26 }, "identifierName": "response" }, "name": "response" }, "property": { "type": "Identifier", "start": 294, "end": 300, "loc": { "start": { "line": 5, "column": 27 }, "end": { "line": 5, "column": 33 }, "identifierName": "errors" }, "name": "errors" }, "computed": false }, "property": { "type": "NumericLiteral", "start": 301, "end": 302, "loc": { "start": { "line": 5, "column": 34 }, "end": { "line": 5, "column": 35 } }, "extra": { "rawValue": 0, "raw": "0" }, "value": 0 }, "computed": true } }, "alternate": null }, { "type": "VariableDeclaration", "start": 313, "end": 339, "loc": { "start": { "line": 6, "column": 8 }, "end": { "line": 6, "column": 34 } }, "declarations": [ { "type": "VariableDeclarator", "start": 317, "end": 338, "loc": { "start": { "line": 6, "column": 12 }, "end": { "line": 6, "column": 33 } }, "id": { "type": "Identifier", "start": 317, "end": 326, "loc": { "start": { "line": 6, "column": 12 }, "end": { "line": 6, "column": 21 }, "identifierName": "resultMap" }, "name": "resultMap" }, "init": { "type": "NewExpression", "start": 329, "end": 338, "loc": { "start": { "line": 6, "column": 24 }, "end": { "line": 6, "column": 33 } }, "callee": { "type": "Identifier", "start": 333, "end": 336, "loc": { "start": { "line": 6, "column": 28 }, "end": { "line": 6, "column": 31 }, "identifierName": "Map" }, "name": "Map" }, "arguments": [] } } ], "kind": "let" }, { "type": "ForOfStatement", "start": 348, "end": 549, "loc": { "start": { "line": 7, "column": 8 }, "end": { "line": 11, "column": 9 } }, "left": { "type": "VariableDeclaration", "start": 353, "end": 363, "loc": { "start": { "line": 7, "column": 13 }, "end": { "line": 7, "column": 23 } }, "declarations": [ { "type": "VariableDeclarator", "start": 357, "end": 363, "loc": { "start": { "line": 7, "column": 17 }, "end": { "line": 7, "column": 23 } }, "id": { "type": "Identifier", "start": 357, "end": 363, "loc": { "start": { "line": 7, "column": 17 }, "end": { "line": 7, "column": 23 }, "identifierName": "result" }, "name": "result" }, "init": null } ], "kind": "let" }, "right": { "type": "MemberExpression", "start": 367, "end": 383, "loc": { "start": { "line": 7, "column": 27 }, "end": { "line": 7, "column": 43 } }, "object": { "type": "Identifier", "start": 367, "end": 375, "loc": { "start": { "line": 7, "column": 27 }, "end": { "line": 7, "column": 35 }, "identifierName": "response" }, "name": "response" }, "property": { "type": "Identifier", "start": 376, "end": 383, "loc": { "start": { "line": 7, "column": 36 }, "end": { "line": 7, "column": 43 }, "identifierName": "results" }, "name": "results" }, "computed": false }, "body": { "type": "BlockStatement", "start": 385, "end": 549, "loc": { "start": { "line": 7, "column": 45 }, "end": { "line": 11, "column": 9 } }, "body": [ { "type": "IfStatement", "start": 399, "end": 479, "loc": { "start": { "line": 8, "column": 12 }, "end": { "line": 9, "column": 47 } }, "test": { "type": "UnaryExpression", "start": 403, "end": 430, "loc": { "start": { "line": 8, "column": 16 }, "end": { "line": 8, "column": 43 } }, "operator": "!", "prefix": true, "argument": { "type": "CallExpression", "start": 404, "end": 430, "loc": { "start": { "line": 8, "column": 17 }, "end": { "line": 8, "column": 43 } }, "callee": { "type": "MemberExpression", "start": 404, "end": 417, "loc": { "start": { "line": 8, "column": 17 }, "end": { "line": 8, "column": 30 } }, "object": { "type": "Identifier", "start": 404, "end": 413, "loc": { "start": { "line": 8, "column": 17 }, "end": { "line": 8, "column": 26 }, "identifierName": "resultMap" }, "name": "resultMap" }, "property": { "type": "Identifier", "start": 414, "end": 417, "loc": { "start": { "line": 8, "column": 27 }, "end": { "line": 8, "column": 30 }, "identifierName": "has" }, "name": "has" }, "computed": false }, "arguments": [ { "type": "MemberExpression", "start": 418, "end": 429, "loc": { "start": { "line": 8, "column": 31 }, "end": { "line": 8, "column": 42 } }, "object": { "type": "Identifier", "start": 418, "end": 424, "loc": { "start": { "line": 8, "column": 31 }, "end": { "line": 8, "column": 37 }, "identifierName": "result" }, "name": "result" }, "property": { "type": "Identifier", "start": 425, "end": 429, "loc": { "start": { "line": 8, "column": 38 }, "end": { "line": 8, "column": 42 }, "identifierName": "hint" }, "name": "hint" }, "computed": false } ] }, "extra": { "parenthesizedArgument": false } }, "consequent": { "type": "ExpressionStatement", "start": 448, "end": 479, "loc": { "start": { "line": 9, "column": 16 }, "end": { "line": 9, "column": 47 } }, "expression": { "type": "CallExpression", "start": 448, "end": 478, "loc": { "start": { "line": 9, "column": 16 }, "end": { "line": 9, "column": 46 } }, "callee": { "type": "MemberExpression", "start": 448, "end": 461, "loc": { "start": { "line": 9, "column": 16 }, "end": { "line": 9, "column": 29 } }, "object": { "type": "Identifier", "start": 448, "end": 457, "loc": { "start": { "line": 9, "column": 16 }, "end": { "line": 9, "column": 25 }, "identifierName": "resultMap" }, "name": "resultMap" }, "property": { "type": "Identifier", "start": 458, "end": 461, "loc": { "start": { "line": 9, "column": 26 }, "end": { "line": 9, "column": 29 }, "identifierName": "set" }, "name": "set" }, "computed": false }, "arguments": [ { "type": "MemberExpression", "start": 462, "end": 473, "loc": { "start": { "line": 9, "column": 30 }, "end": { "line": 9, "column": 41 } }, "object": { "type": "Identifier", "start": 462, "end": 468, "loc": { "start": { "line": 9, "column": 30 }, "end": { "line": 9, "column": 36 }, "identifierName": "result" }, "name": "result" }, "property": { "type": "Identifier", "start": 469, "end": 473, "loc": { "start": { "line": 9, "column": 37 }, "end": { "line": 9, "column": 41 }, "identifierName": "hint" }, "name": "hint" }, "computed": false }, { "type": "ArrayExpression", "start": 475, "end": 477, "loc": { "start": { "line": 9, "column": 43 }, "end": { "line": 9, "column": 45 } }, "elements": [] } ] } }, "alternate": null }, { "type": "ExpressionStatement", "start": 492, "end": 539, "loc": { "start": { "line": 10, "column": 12 }, "end": { "line": 10, "column": 59 } }, "expression": { "type": "CallExpression", "start": 492, "end": 538, "loc": { "start": { "line": 10, "column": 12 }, "end": { "line": 10,