UNPKG

awv3

Version:
1,664 lines 291 kB
{ "type": "Program", "start": 0, "end": 3241, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 92, "column": 0 } }, "sourceType": "module", "body": [ { "type": "ImportDeclaration", "start": 0, "end": 42, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 42 } }, "specifiers": [ { "type": "ImportSpecifier", "start": 8, "end": 17, "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 17 } }, "imported": { "type": "Identifier", "start": 8, "end": 17, "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 17 } }, "name": "Timestamp" }, "local": { "type": "Identifier", "start": 8, "end": 17, "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 17 } }, "name": "Timestamp" } } ], "importKind": "value", "source": { "type": "Literal", "start": 24, "end": 41, "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 41 } }, "value": "../core/helpers", "rawValue": "../core/helpers", "raw": "'../core/helpers'" } }, { "type": "ImportDeclaration", "start": 44, "end": 91, "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 2, "column": 47 } }, "specifiers": [ { "type": "ImportSpecifier", "start": 52, "end": 60, "loc": { "start": { "line": 2, "column": 8 }, "end": { "line": 2, "column": 16 } }, "imported": { "type": "Identifier", "start": 52, "end": 60, "loc": { "start": { "line": 2, "column": 8 }, "end": { "line": 2, "column": 16 } }, "name": "logLevel" }, "local": { "type": "Identifier", "start": 52, "end": 60, "loc": { "start": { "line": 2, "column": 8 }, "end": { "line": 2, "column": 16 } }, "name": "logLevel" } } ], "importKind": "value", "source": { "type": "Literal", "start": 67, "end": 90, "loc": { "start": { "line": 2, "column": 23 }, "end": { "line": 2, "column": 46 } }, "value": "../sketcher/cchelpers", "rawValue": "../sketcher/cchelpers", "raw": "'../sketcher/cchelpers'" }, "trailingComments": [ { "type": "CommentLine", "value": " Unique symbol to guarantee that external code can't resolve Statements", "start": 95, "end": 168, "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 4, "column": 73 } }, "range": [ 95, 168 ] } ] }, { "type": "VariableDeclaration", "start": 170, "end": 204, "loc": { "start": { "line": 5, "column": 0 }, "end": { "line": 5, "column": 34 } }, "declarations": [ { "type": "VariableDeclarator", "start": 176, "end": 203, "loc": { "start": { "line": 5, "column": 6 }, "end": { "line": 5, "column": 33 } }, "id": { "type": "Identifier", "start": 176, "end": 183, "loc": { "start": { "line": 5, "column": 6 }, "end": { "line": 5, "column": 13 } }, "name": "resolve", "leadingComments": null }, "init": { "type": "CallExpression", "start": 186, "end": 203, "loc": { "start": { "line": 5, "column": 16 }, "end": { "line": 5, "column": 33 } }, "callee": { "type": "Identifier", "start": 186, "end": 192, "loc": { "start": { "line": 5, "column": 16 }, "end": { "line": 5, "column": 22 } }, "name": "Symbol" }, "arguments": [ { "type": "Literal", "start": 193, "end": 202, "loc": { "start": { "line": 5, "column": 23 }, "end": { "line": 5, "column": 32 } }, "value": "resolve", "rawValue": "resolve", "raw": "'resolve'" } ] }, "leadingComments": null } ], "kind": "const", "leadingComments": [ { "type": "CommentLine", "value": " Unique symbol to guarantee that external code can't resolve Statements", "start": 95, "end": 168, "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 4, "column": 73 } }, "range": [ 95, 168 ] } ] }, { "type": "ClassDeclaration", "start": 208, "end": 809, "loc": { "start": { "line": 7, "column": 0 }, "end": { "line": 30, "column": 1 } }, "id": { "type": "Identifier", "start": 214, "end": 228, "loc": { "start": { "line": 7, "column": 6 }, "end": { "line": 7, "column": 20 } }, "name": "StatementsBase" }, "superClass": null, "body": { "type": "ClassBody", "start": 229, "end": 809, "loc": { "start": { "line": 7, "column": 21 }, "end": { "line": 30, "column": 1 } }, "body": [ { "type": "MethodDefinition", "start": 236, "end": 378, "loc": { "start": { "line": 8, "column": 4 }, "end": { "line": 12, "column": 5 } }, "computed": false, "key": { "type": "Identifier", "start": 236, "end": 247, "loc": { "start": { "line": 8, "column": 4 }, "end": { "line": 8, "column": 15 } }, "name": "constructor" }, "static": false, "kind": "constructor", "value": { "type": "FunctionExpression", "start": 247, "end": 378, "loc": { "start": { "line": 8, "column": 15 }, "end": { "line": 12, "column": 5 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [ { "type": "Identifier", "start": 248, "end": 256, "loc": { "start": { "line": 8, "column": 16 }, "end": { "line": 8, "column": 24 } }, "name": "commands" }, { "type": "Identifier", "start": 258, "end": 265, "loc": { "start": { "line": 8, "column": 26 }, "end": { "line": 8, "column": 33 } }, "name": "promise" }, { "type": "Identifier", "start": 267, "end": 270, "loc": { "start": { "line": 8, "column": 35 }, "end": { "line": 8, "column": 38 } }, "name": "res" } ], "body": { "type": "BlockStatement", "start": 272, "end": 378, "loc": { "start": { "line": 8, "column": 40 }, "end": { "line": 12, "column": 5 } }, "body": [ { "type": "ExpressionStatement", "start": 283, "end": 308, "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 33 } }, "expression": { "type": "AssignmentExpression", "start": 283, "end": 307, "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 32 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 283, "end": 296, "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 21 } }, "object": { "type": "ThisExpression", "start": 283, "end": 287, "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 12 } } }, "property": { "type": "Identifier", "start": 288, "end": 296, "loc": { "start": { "line": 9, "column": 13 }, "end": { "line": 9, "column": 21 } }, "name": "commands" }, "computed": false }, "right": { "type": "Identifier", "start": 299, "end": 307, "loc": { "start": { "line": 9, "column": 24 }, "end": { "line": 9, "column": 32 } }, "name": "commands" } } }, { "type": "ExpressionStatement", "start": 318, "end": 341, "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 31 } }, "expression": { "type": "AssignmentExpression", "start": 318, "end": 340, "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 30 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 318, "end": 330, "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 20 } }, "object": { "type": "ThisExpression", "start": 318, "end": 322, "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 12 } } }, "property": { "type": "Identifier", "start": 323, "end": 330, "loc": { "start": { "line": 10, "column": 13 }, "end": { "line": 10, "column": 20 } }, "name": "promise" }, "computed": false }, "right": { "type": "Identifier", "start": 333, "end": 340, "loc": { "start": { "line": 10, "column": 23 }, "end": { "line": 10, "column": 30 } }, "name": "promise" } } }, { "type": "ExpressionStatement", "start": 351, "end": 371, "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 28 } }, "expression": { "type": "AssignmentExpression", "start": 351, "end": 370, "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 27 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 351, "end": 364, "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 21 } }, "object": { "type": "ThisExpression", "start": 351, "end": 355, "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 12 } } }, "property": { "type": "Identifier", "start": 356, "end": 363, "loc": { "start": { "line": 11, "column": 13 }, "end": { "line": 11, "column": 20 } }, "name": "resolve" }, "computed": true }, "right": { "type": "Identifier", "start": 367, "end": 370, "loc": { "start": { "line": 11, "column": 24 }, "end": { "line": 11, "column": 27 } }, "name": "res" } } } ] } } }, { "type": "MethodDefinition", "start": 386, "end": 491, "loc": { "start": { "line": 14, "column": 4 }, "end": { "line": 16, "column": 5 } }, "computed": false, "key": { "type": "Identifier", "start": 386, "end": 390, "loc": { "start": { "line": 14, "column": 4 }, "end": { "line": 14, "column": 8 } }, "name": "then" }, "static": false, "kind": "method", "value": { "type": "FunctionExpression", "start": 390, "end": 491, "loc": { "start": { "line": 14, "column": 8 }, "end": { "line": 16, "column": 5 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [ { "type": "Identifier", "start": 391, "end": 402, "loc": { "start": { "line": 14, "column": 9 }, "end": { "line": 14, "column": 20 } }, "name": "onFulfilled" }, { "type": "Identifier", "start": 404, "end": 414, "loc": { "start": { "line": 14, "column": 22 }, "end": { "line": 14, "column": 32 } }, "name": "onRejected" } ], "body": { "type": "BlockStatement", "start": 416, "end": 491, "loc": { "start": { "line": 14, "column": 34 }, "end": { "line": 16, "column": 5 } }, "body": [ { "type": "ReturnStatement", "start": 427, "end": 484, "loc": { "start": { "line": 15, "column": 8 }, "end": { "line": 15, "column": 65 } }, "argument": { "type": "NewExpression", "start": 434, "end": 483, "loc": { "start": { "line": 15, "column": 15 }, "end": { "line": 15, "column": 64 } }, "callee": { "type": "Identifier", "start": 438, "end": 452, "loc": { "start": { "line": 15, "column": 19 }, "end": { "line": 15, "column": 33 } }, "name": "StatementsThen" }, "arguments": [ { "type": "ThisExpression", "start": 453, "end": 457, "loc": { "start": { "line": 15, "column": 34 }, "end": { "line": 15, "column": 38 } } }, { "type": "Identifier", "start": 459, "end": 470, "loc": { "start": { "line": 15, "column": 40 }, "end": { "line": 15, "column": 51 } }, "name": "onFulfilled" }, { "type": "Identifier", "start": 472, "end": 482, "loc": { "start": { "line": 15, "column": 53 }, "end": { "line": 15, "column": 63 } }, "name": "onRejected" } ] } } ] } } }, { "type": "MethodDefinition", "start": 499, "end": 584, "loc": { "start": { "line": 18, "column": 4 }, "end": { "line": 20, "column": 5 } }, "computed": false, "key": { "type": "Identifier", "start": 499, "end": 502, "loc": { "start": { "line": 18, "column": 4 }, "end": { "line": 18, "column": 7 } }, "name": "and" }, "static": false, "kind": "method", "value": { "type": "FunctionExpression", "start": 502, "end": 584, "loc": { "start": { "line": 18, "column": 7 }, "end": { "line": 20, "column": 5 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [ { "type": "RestElement", "start": 503, "end": 516, "loc": { "start": { "line": 18, "column": 8 }, "end": { "line": 18, "column": 21 } }, "argument": { "type": "Identifier", "start": 506, "end": 516, "loc": { "start": { "line": 18, "column": 11 }, "end": { "line": 18, "column": 21 } }, "name": "statements" } } ], "body": { "type": "BlockStatement", "start": 518, "end": 584, "loc": { "start": { "line": 18, "column": 23 }, "end": { "line": 20, "column": 5 } }, "body": [ { "type": "ReturnStatement", "start": 529, "end": 577, "loc": { "start": { "line": 19, "column": 8 }, "end": { "line": 19, "column": 56 } }, "argument": { "type": "NewExpression", "start": 536, "end": 576, "loc": { "start": { "line": 19, "column": 15 }, "end": { "line": 19, "column": 55 } }, "callee": { "type": "Identifier", "start": 540, "end": 553, "loc": { "start": { "line": 19, "column": 19 }, "end": { "line": 19, "column": 32 } }, "name": "StatementsAll" }, "arguments": [ { "type": "ArrayExpression", "start": 554, "end": 575, "loc": { "start": { "line": 19, "column": 33 }, "end": { "line": 19, "column": 54 } }, "elements": [ { "type": "ThisExpression", "start": 555, "end": 559, "loc": { "start": { "line": 19, "column": 34 }, "end": { "line": 19, "column": 38 } } }, { "type": "SpreadElement", "start": 561, "end": 574, "loc": { "start": { "line": 19, "column": 40 }, "end": { "line": 19, "column": 53 } }, "argument": { "type": "Identifier", "start": 564, "end": 574, "loc": { "start": { "line": 19, "column": 43 }, "end": { "line": 19, "column": 53 } }, "name": "statements" } } ] } ] } } ] } } }, { "type": "MethodDefinition", "start": 592, "end": 670, "loc": { "start": { "line": 22, "column": 4 }, "end": { "line": 24, "column": 5 } }, "computed": false, "key": { "type": "Identifier", "start": 599, "end": 602, "loc": { "start": { "line": 22, "column": 11 }, "end": { "line": 22, "column": 14 } }, "name": "all" }, "static": true, "kind": "method", "value": { "type": "FunctionExpression", "start": 602, "end": 670, "loc": { "start": { "line": 22, "column": 14 }, "end": { "line": 24, "column": 5 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [ { "type": "Identifier", "start": 603, "end": 613, "loc": { "start": { "line": 22, "column": 15 }, "end": { "line": 22, "column": 25 } }, "name": "statements" } ], "body": { "type": "BlockStatement", "start": 615, "end": 670, "loc": { "start": { "line": 22, "column": 27 }, "end": { "line": 24, "column": 5 } }, "body": [ { "type": "ReturnStatement", "start": 626, "end": 663, "loc": { "start": { "line": 23, "column": 8 }, "end": { "line": 23, "column": 45 } }, "argument": { "type": "NewExpression", "start": 633, "end": 662, "loc": { "start": { "line": 23, "column": 15 }, "end": { "line": 23, "column": 44 } }, "callee": { "type": "Identifier", "start": 637, "end": 650, "loc": { "start": { "line": 23, "column": 19 }, "end": { "line": 23, "column": 32 } }, "name": "StatementsAll" }, "arguments": [ { "type": "Identifier", "start": 651, "end": 661, "loc": { "start": { "line": 23, "column": 33 }, "end": { "line": 23, "column": 43 } }, "name": "statements" } ] } } ] } } }, { "type": "MethodDefinition", "start": 678, "end": 806, "loc": { "start": { "line": 26, "column": 4 }, "end": { "line": 29, "column": 5 } }, "computed": false, "key": { "type": "Identifier", "start": 678, "end": 685, "loc": { "start": { "line": 26, "column": 4 }, "end": { "line": 26, "column": 11 } }, "name": "execute" }, "static": false, "kind": "method", "value": { "type": "FunctionExpression", "start": 685, "end": 806, "loc": { "start": { "line": 26, "column": 11 }, "end": { "line": 29, "column": 5 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [ { "type": "Identifier", "start": 686, "end": 692, "loc": { "start": { "line": 26, "column": 12 }, "end": { "line": 26, "column": 18 } }, "name": "socket" }, { "type": "Identifier", "start": 694, "end": 701, "loc": { "start": { "line": 26, "column": 20 }, "end": { "line": 26, "column": 27 } }, "name": "factory" } ], "body": { "type": "BlockStatement", "start": 703, "end": 806, "loc": { "start": { "line": 26, "column": 29 }, "end": { "line": 29, "column": 5 } }, "body": [ { "type": "ExpressionStatement", "start": 714, "end": 769, "loc": { "start": { "line": 27, "column": 8 }, "end": { "line": 27, "column": 63 } }, "expression": { "type": "CallExpression", "start": 714, "end": 768, "loc": { "start": { "line": 27, "column": 8 }, "end": { "line": 27, "column": 62 } }, "callee": { "type": "MemberExpression", "start": 714, "end": 727, "loc": { "start": { "line": 27, "column": 8 }, "end": { "line": 27, "column": 21 } }, "object": { "type": "ThisExpression", "start": 714, "end": 718, "loc": { "start": { "line": 27, "column": 8 }, "end": { "line": 27, "column": 12 } } }, "property": { "type": "Identifier", "start": 719, "end": 726, "loc": { "start": { "line": 27, "column": 13 }, "end": { "line": 27, "column": 20 } }, "name": "resolve" }, "computed": true }, "arguments": [ { "type": "CallExpression", "start": 728, "end": 767, "loc": { "start": { "line": 27, "column": 22 }, "end": { "line": 27, "column": 61 } }, "callee": { "type": "Identifier", "start": 728, "end": 735, "loc": { "start": { "line": 27, "column": 22 }, "end": { "line": 27, "column": 29 } }, "name": "execute" }, "arguments": [ { "type": "Identifier", "start": 736, "end": 742, "loc": { "start": { "line": 27, "column": 30 }, "end": { "line": 27, "column": 36 } }, "name": "socket" }, { "type": "MemberExpression", "start": 744, "end": 757, "loc": { "start": { "line": 27, "column": 38 }, "end": { "line": 27, "column": 51 } }, "object": { "type": "ThisExpression", "start": 744, "end": 748, "loc": { "start": { "line": 27, "column": 38 }, "end": { "line": 27, "column": 42 } } }, "property": { "type": "Identifier", "start": 749, "end": 757, "loc": { "start": { "line": 27, "column": 43 }, "end": { "line": 27, "column": 51 } }, "name": "commands" }, "computed": false }, { "type": "Identifier", "start": 759, "end": 766, "loc": { "start": { "line": 27, "column": 53 }, "end": { "line": 27, "column": 60 } }, "name": "factory" } ] } ] } }, { "type": "ReturnStatement", "start": 779, "end": 799, "loc": { "start": { "line": 28, "column": 8 }, "end": { "line": 28, "column": 28 } }, "argument": { "type": "MemberExpression", "start": 786, "end": 798, "loc": { "start": { "line": 28, "column": 15 }, "end": { "line": 28, "column": 27 } }, "object": { "type": "ThisExpression", "start": 786, "en