UNPKG

awv3

Version:
1,769 lines 1.54 MB
{ "type": "Program", "start": 0, "end": 13693, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 356, "column": 0 } }, "sourceType": "module", "body": [ { "type": "ImportDeclaration", "start": 0, "end": 62, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 62 } }, "specifiers": [ { "type": "ImportSpecifier", "start": 8, "end": 22, "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 22 } }, "imported": { "type": "Identifier", "start": 8, "end": 22, "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 22 } }, "name": "ClassCadObject" }, "local": { "type": "Identifier", "start": 8, "end": 22, "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 22 } }, "name": "ClassCadObject" } }, { "type": "ImportSpecifier", "start": 24, "end": 34, "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 34 } }, "imported": { "type": "Identifier", "start": 24, "end": 34, "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 34 } }, "name": "RootObject" }, "local": { "type": "Identifier", "start": 24, "end": 34, "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 34 } }, "name": "RootObject" } } ], "importKind": "value", "source": { "type": "Literal", "start": 41, "end": 61, "loc": { "start": { "line": 1, "column": 41 }, "end": { "line": 1, "column": 61 } }, "value": "sketcher/ccobjects", "rawValue": "sketcher/ccobjects", "raw": "'sketcher/ccobjects'" } }, { "type": "ImportDeclaration", "start": 63, "end": 89, "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 2, "column": 26 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 70, "end": 75, "loc": { "start": { "line": 2, "column": 7 }, "end": { "line": 2, "column": 12 } }, "local": { "type": "Identifier", "start": 70, "end": 75, "loc": { "start": { "line": 2, "column": 7 }, "end": { "line": 2, "column": 12 } }, "name": "THREE" } } ], "importKind": "value", "source": { "type": "Literal", "start": 81, "end": 88, "loc": { "start": { "line": 2, "column": 18 }, "end": { "line": 2, "column": 25 } }, "value": "three", "rawValue": "three", "raw": "'three'" } }, { "type": "ImportDeclaration", "start": 90, "end": 126, "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 3, "column": 36 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 97, "end": 104, "loc": { "start": { "line": 3, "column": 7 }, "end": { "line": 3, "column": 14 } }, "local": { "type": "Identifier", "start": 97, "end": 104, "loc": { "start": { "line": 3, "column": 7 }, "end": { "line": 3, "column": 14 } }, "name": "Object3" } } ], "importKind": "value", "source": { "type": "Literal", "start": 110, "end": 125, "loc": { "start": { "line": 3, "column": 20 }, "end": { "line": 3, "column": 35 } }, "value": "three/object3", "rawValue": "three/object3", "raw": "'three/object3'" } }, { "type": "ImportDeclaration", "start": 127, "end": 160, "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 4, "column": 33 } }, "specifiers": [ { "type": "ImportSpecifier", "start": 135, "end": 138, "loc": { "start": { "line": 4, "column": 8 }, "end": { "line": 4, "column": 11 } }, "imported": { "type": "Identifier", "start": 135, "end": 138, "loc": { "start": { "line": 4, "column": 8 }, "end": { "line": 4, "column": 11 } }, "name": "url" }, "local": { "type": "Identifier", "start": 135, "end": 138, "loc": { "start": { "line": 4, "column": 8 }, "end": { "line": 4, "column": 11 } }, "name": "url" } } ], "importKind": "value", "source": { "type": "Literal", "start": 145, "end": 159, "loc": { "start": { "line": 4, "column": 18 }, "end": { "line": 4, "column": 32 } }, "value": "core/helpers", "rawValue": "core/helpers", "raw": "'core/helpers'" }, "trailingComments": [ { "type": "CommentLine", "value": " helper functions to interact with ClassCad", "start": 161, "end": 206, "loc": { "start": { "line": 5, "column": 0 }, "end": { "line": 5, "column": 45 } }, "range": [ 161, 206 ] } ] }, { "type": "Identifier", "start": 208, "end": 249, "loc": { "start": { "line": 7, "column": 0 }, "end": { "line": 7, "column": 41 } }, "declarations": [ { "type": "VariableDeclarator", "start": 214, "end": 248, "loc": { "start": { "line": 7, "column": 6 }, "end": { "line": 7, "column": 40 } }, "id": { "type": "Identifier", "start": 214, "end": 222, "loc": { "start": { "line": 7, "column": 6 }, "end": { "line": 7, "column": 14 } }, "name": "logLevel", "leadingComments": null }, "init": { "type": "CallExpression", "start": 225, "end": 248, "loc": { "start": { "line": 7, "column": 17 }, "end": { "line": 7, "column": 40 } }, "callee": { "type": "Identifier", "start": 225, "end": 231, "loc": { "start": { "line": 7, "column": 17 }, "end": { "line": 7, "column": 23 } }, "name": "Number" }, "arguments": [ { "type": "CallExpression", "start": 232, "end": 247, "loc": { "start": { "line": 7, "column": 24 }, "end": { "line": 7, "column": 39 } }, "callee": { "type": "Identifier", "start": 232, "end": 235, "loc": { "start": { "line": 7, "column": 24 }, "end": { "line": 7, "column": 27 } }, "name": "url" }, "arguments": [ { "type": "Literal", "start": 236, "end": 246, "loc": { "start": { "line": 7, "column": 28 }, "end": { "line": 7, "column": 38 } }, "value": "logLevel", "rawValue": "logLevel", "raw": "'logLevel'" } ] } ] }, "leadingComments": null } ], "kind": "const", "leadingComments": [], "trailingComments": [], "name": "_" }, { "type": "Identifier", "start": 318, "end": 644, "loc": { "start": { "line": 10, "column": 0 }, "end": { "line": 16, "column": 1 } }, "id": { "type": "Identifier", "start": 327, "end": 334, "loc": { "start": { "line": 10, "column": 9 }, "end": { "line": 10, "column": 16 } }, "name": "execute", "leadingComments": null }, "generator": false, "expression": false, "async": false, "params": [ { "type": "Identifier", "start": 335, "end": 341, "loc": { "start": { "line": 10, "column": 17 }, "end": { "line": 10, "column": 23 } }, "name": "server" }, { "type": "Identifier", "start": 343, "end": 346, "loc": { "start": { "line": 10, "column": 25 }, "end": { "line": 10, "column": 28 } }, "name": "cmd" }, { "type": "Identifier", "start": 348, "end": 355, "loc": { "start": { "line": 10, "column": 30 }, "end": { "line": 10, "column": 37 } }, "name": "factory" }, { "type": "Identifier", "start": 357, "end": 367, "loc": { "start": { "line": 10, "column": 39 }, "end": { "line": 10, "column": 49 } }, "name": "attributes" } ], "body": { "type": "BlockStatement", "start": 369, "end": 644, "loc": { "start": { "line": 10, "column": 51 }, "end": { "line": 16, "column": 1 } }, "body": [ { "type": "IfStatement", "start": 375, "end": 429, "loc": { "start": { "line": 11, "column": 4 }, "end": { "line": 12, "column": 24 } }, "test": { "type": "BinaryExpression", "start": 379, "end": 403, "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 32 } }, "left": { "type": "Identifier", "start": 379, "end": 389, "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 18 } }, "name": "attributes" }, "operator": "===", "right": { "type": "Identifier", "start": 394, "end": 403, "loc": { "start": { "line": 11, "column": 23 }, "end": { "line": 11, "column": 32 } }, "name": "undefined" } }, "consequent": { "type": "ExpressionStatement", "start": 413, "end": 429, "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 24 } }, "expression": { "type": "AssignmentExpression", "start": 413, "end": 428, "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 23 } }, "operator": "=", "left": { "type": "Identifier", "start": 413, "end": 423, "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 18 } }, "name": "attributes" }, "right": { "type": "ObjectExpression", "start": 426, "end": 428, "loc": { "start": { "line": 12, "column": 21 }, "end": { "line": 12, "column": 23 } }, "properties": [] } } }, "alternate": null }, { "type": "IfStatement", "start": 434, "end": 534, "loc": { "start": { "line": 13, "column": 4 }, "end": { "line": 14, "column": 48 } }, "test": { "type": "BinaryExpression", "start": 438, "end": 484, "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 54 } }, "left": { "type": "MemberExpression", "start": 438, "end": 470, "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 40 } }, "object": { "type": "Identifier", "start": 438, "end": 448, "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 18 } }, "name": "attributes" }, "property": { "type": "Identifier", "start": 449, "end": 470, "loc": { "start": { "line": 13, "column": 19 }, "end": { "line": 13, "column": 40 } }, "name": "ignoreNumberOfResults" }, "computed": false }, "operator": "===", "right": { "type": "Identifier", "start": 475, "end": 484, "loc": { "start": { "line": 13, "column": 45 }, "end": { "line": 13, "column": 54 } }, "name": "undefined" } }, "consequent": { "type": "ExpressionStatement", "start": 494, "end": 534, "loc": { "start": { "line": 14, "column": 8 }, "end": { "line": 14, "column": 48 } }, "expression": { "type": "AssignmentExpression", "start": 494, "end": 533, "loc": { "start": { "line": 14, "column": 8 }, "end": { "line": 14, "column": 47 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 494, "end": 526, "loc": { "start": { "line": 14, "column": 8 }, "end": { "line": 14, "column": 40 } }, "object": { "type": "Identifier", "start": 494, "end": 504, "loc": { "start": { "line": 14, "column": 8 }, "end": { "line": 14, "column": 18 } }, "name": "attributes" }, "property": { "type": "Identifier", "start": 505, "end": 526, "loc": { "start": { "line": 14, "column": 19 }, "end": { "line": 14, "column": 40 } }, "name": "ignoreNumberOfResults" }, "computed": false }, "right": { "type": "Literal", "start": 529, "end": 533, "loc": { "start": { "line": 14, "column": 43 }, "end": { "line": 14, "column": 47 } }, "value": true, "rawValue": true, "raw": "true" } } }, "alternate": null }, { "type": "ReturnStatement", "start": 539, "end": 642, "loc": { "start": { "line": 15, "column": 4 }, "end": { "line": 15, "column": 107 } }, "argument": { "type": "CallExpression", "start": 546, "end": 641, "loc": { "start": { "line": 15, "column": 11 }, "end": { "line": 15, "column": 106 } }, "callee": { "type": "MemberExpression", "start": 546, "end": 630, "loc": { "start": { "line": 15, "column": 11 }, "end": { "line": 15, "column": 95 } }, "object": { "type": "CallExpression", "start": 546, "end": 625, "loc": { "start": { "line": 15, "column": 11 }, "end": { "line": 15, "column": 90 } }, "callee": { "type": "Identifier", "start": 546, "end": 561, "loc": { "start": { "line": 15, "column": 11 }, "end": { "line": 15, "column": 26 } }, "name": "executePrepared" }, "arguments": [ { "type": "Identifier", "start": 562, "end": 568, "loc": { "start": { "line": 15, "column": 27 }, "end": { "line": 15, "column": 33 } }, "name": "server" }, { "type": "ArrayExpression", "start": 570, "end": 603, "loc": { "start": { "line": 15, "column": 35 }, "end": { "line": 15, "column": 68 } }, "elements": [ { "type": "ObjectExpression", "start": 571, "end": 602, "loc": { "start": { "line": 15, "column": 36 }, "end": { "line": 15, "column": 67 } }, "properties": [ { "type": "Property", "start": 572, "end": 590, "loc": { "start": { "line": 15, "column": 37 }, "end": { "line": 15, "column": 55 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 572, "end": 579, "loc": { "start": { "line": 15, "column": 37 }, "end": { "line": 15, "column": 44 } }, "name": "command" }, "value": { "type": "Literal", "start": 581, "end": 590, "loc": { "start": { "line": 15, "column": 46 }, "end": { "line": 15, "column": 55 } }, "value": "Execute", "rawValue": "Execute", "raw": "'Execute'" }, "kind": "init" }, { "type": "Property", "start": 592, "end": 601, "loc": { "start": { "line": 15, "column": 57 }, "end": { "line": 15, "column": 66 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 592, "end": 596, "loc": { "start": { "line": 15, "column": 57 }, "end": { "line": 15, "column": 61 } }, "name": "task" }, "value": { "type": "Identifier", "start": 598, "end": 601, "loc": { "start": { "line": 15, "column": 63 }, "end": { "line": 15, "column": 66 } }, "name": "cmd" }, "kind": "init" } ] } ] }, { "type": "Identifier", "start": 605, "end": 612, "loc": { "start": { "line": 15, "column": 70 }, "end": { "line": 15, "column": 77 } }, "name": "factory" }, { "type": "Identifier", "start": 614, "end": 624, "loc": { "start": { "line": 15, "column": 79 }, "end": { "line": 15, "column": 89 } }, "name": "attributes" } ] }, "property": { "type": "Identifier", "start": 626, "end": 630, "loc": { "start": { "line": 15, "column": 91 }, "end": { "line": 15, "column": 95 } }, "name": "then" }, "computed": false }, "arguments": [ { "type": "ArrowFunctionExpression", "start": 631, "end": 640, "loc": { "start": { "line": 15, "column": 96 }, "end": { "line": 15, "column": 105 } }, "id": null, "generator": false, "expression": true, "async": false, "params": [ { "type": "Identifier", "start": 631, "end": 632, "loc": { "start": { "line": 15, "column": 96 }, "end": { "line": 15, "column": 97 } }, "name": "x" } ], "body": { "type": "MemberExpression", "start": 636, "end": 640, "loc": { "start": { "line": 15, "column": 101 }, "end": { "line": 15, "column": 105 } }, "object": { "type": "Identifier", "start": 636, "end": 637, "loc": { "start": { "line": 15, "column": 101 }, "end": { "line": 15, "column": 102 } }, "name": "x" }, "property": { "type": "Literal", "start": 638, "end": 639, "loc": { "start": { "line": 15, "column": 103 }, "end": { "line": 15, "column": 104 } }, "value": 0, "rawValue": 0, "raw": "0" }, "computed": true } } ] } } ] }, "leadingComments": [], "name": "_", "trailingComments": [] }, { "type": "Identifier", "start": 646, "end": 818, "loc": { "start": { "line": 18, "column": 0 }, "end": { "line": 20, "column": 1 } }, "id": { "type": "Identifier", "start": 655, "end": 668, "loc": { "start": { "line": 18, "column": 9 }, "end": { "line": 18, "column": 22 } }, "name": "executeModels" }, "generator": false, "expression": false, "async": false, "params": [ { "type": "Identifier", "start": 669, "end": 675, "loc": { "start": { "line": 18, "column": 23 }, "end": { "line": 18, "column": 29 } }, "name": "server" }, { "type": "Identifier", "start": 677, "end": 680, "loc": { "start": { "line": 18, "column": 31 }, "end": { "line": 18, "column": 34 } }, "name": "cmd" } ], "body": { "type": "BlockStatement", "start": 682, "end": 818, "loc": { "start": { "line": 18, "column": 36 }, "end": { "line": 20, "column": 1 } }, "body": [ { "type": "ReturnStatement", "start": 688, "end": 816, "loc": { "start": { "line": 19, "column": 4 }, "end": { "line": 19, "column": 132 } }, "argument": { "type": "CallExpression", "start": 695, "end": 815, "loc": { "start": { "line": 19, "column": 11 }, "end": { "line": 19, "column": 131 } }, "callee": { "type": "MemberExpression", "start": 695, "end": 800, "loc": { "start": { "line": 19, "column": 11 }, "end": { "line": 19, "column": 116 } }, "object": { "type": "CallExpression", "start": 695, "end": 795, "loc": { "start": { "line": 19, "column": 11 }, "end": { "line": 19, "column": 111 } }, "callee": { "type": "Identifier", "start": 695, "end": 710, "loc": { "start": { "line": 19, "column": 11 }, "end": { "line": 19, "column": 26 } }, "name": "executePrepared" }, "arguments": [ { "type": "Identifier", "start": 711, "end": 717, "loc": { "start": { "line": 19, "column": 27 }, "end": { "line": 19, "column": 33 } }, "name": "server" }, { "type": "ArrayExpression", "start": 719, "end": 752, "loc": { "start": { "line": 19, "column": 35 }, "end": { "line": 19, "column": 68 } }, "elements": [ { "type": "ObjectExpression", "start": 720, "end": 751, "loc": { "start": { "line": 19, "column": 36 }, "end": { "line": 19, "column": 67 } }, "properties": [ { "type": "Property", "start": 721, "end": 739, "loc": { "start": { "line": 19, "column": 37 }, "end": { "line": 19, "column": 55 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 721, "end": 728, "loc": { "start": { "line": 19, "column": 37 }, "end": { "line": 19, "column": 44 } }, "name": "command" }, "value": { "type": "Literal", "start": 730, "end": 739, "loc": { "start": { "line": 19, "column": 46 }, "end": { "line": 19, "column": 55 } }, "value": "Execute", "rawValue": "Execute", "raw": "'Execute'" }, "kind": "init" }, { "type": "Property", "start": 741, "end": 750, "loc": { "start": { "line": 19, "column": 57 }, "end": { "line": 19, "column": 66 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 741, "end": 745, "loc": { "start": { "line": 19, "column": 57 }, "end": { "line": 19, "column": 61 } }, "name": "task" }, "value": { "type": "Identifier", "start": 747, "end": 750, "loc": { "start": { "line": 19, "column": 63 }, "end": { "line": 19, "column": 66 } }, "name": "cmd" }, "kind": "init" } ] } ] }, { "type": "Identifier", "start": 754, "end": 763, "loc": { "start": { "line": 19, "column": 70 }, "end": { "line": 19, "column": 79 } }, "name": "undefined" }, { "type": "ObjectExpression", "start": 765, "end": 794, "loc": { "start": { "line": 19, "column": 81 }, "end": { "line": 19, "column": 110 } }, "properties": [ { "type": "Property", "start": 766, "end": 793, "loc": { "start": { "line": 19, "column": 82 }, "end": { "line": 19, "column": 109 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 766, "end": 787, "loc": { "start": { "line": 19, "column": 82 }, "end": { "line": 19, "column": 103 } }, "name": "ignoreNumberOfResults" }, "value": { "type": "Literal", "start": 789, "end": 793, "loc": { "start": { "line": 19, "column": 105 }, "end": { "line": 19, "column": 109 } }, "value": true, "rawValue": true, "raw": "true" }, "kind": "init" } ] } ] }, "property": { "type": "Identifier", "start": 796, "end": 800, "loc": { "start": { "line": 19, "column": 112 }, "end": { "line": 19, "column": 116 } }, "name": "then" }, "computed": false }, "arguments": [ { "type": "ArrowFunctionExpression", "start": 801, "end": 814, "loc": { "start": { "line": 19, "column": 117 }, "end": { "line": 19, "column": 130 } }, "id": null, "generator": false, "expression": true, "async": false, "p