UNPKG

backed-cli

Version:

The official command line interface for Backed

1,351 lines 183 kB
{ "type": "File", "start": 0, "end": 728, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 30, "column": 0 } }, "program": { "type": "Program", "start": 0, "end": 728, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 30, "column": 0 } }, "sourceType": "module", "body": [ { "type": "VariableDeclaration", "start": 14, "end": 45, "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 2, "column": 31 } }, "declarations": [ { "type": "VariableDeclarator", "start": 20, "end": 44, "loc": { "start": { "line": 2, "column": 6 }, "end": { "line": 2, "column": 30 } }, "id": { "type": "Identifier", "start": 20, "end": 25, "loc": { "start": { "line": 2, "column": 6 }, "end": { "line": 2, "column": 11 }, "identifierName": "webup" }, "name": "webup" }, "init": { "type": "CallExpression", "start": 28, "end": 44, "loc": { "start": { "line": 2, "column": 14 }, "end": { "line": 2, "column": 30 } }, "callee": { "type": "Identifier", "start": 28, "end": 35, "loc": { "start": { "line": 2, "column": 14 }, "end": { "line": 2, "column": 21 }, "identifierName": "require" }, "name": "require" }, "arguments": [ { "type": "StringLiteral", "start": 36, "end": 43, "loc": { "start": { "line": 2, "column": 22 }, "end": { "line": 2, "column": 29 } }, "extra": { "rawValue": "webup", "raw": "'webup'" }, "value": "webup" } ] } } ], "kind": "const" }, { "type": "VariableDeclaration", "start": 46, "end": 88, "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 3, "column": 42 } }, "declarations": [ { "type": "VariableDeclarator", "start": 52, "end": 87, "loc": { "start": { "line": 3, "column": 6 }, "end": { "line": 3, "column": 41 } }, "id": { "type": "Identifier", "start": 52, "end": 59, "loc": { "start": { "line": 3, "column": 6 }, "end": { "line": 3, "column": 13 }, "identifierName": "builder" }, "name": "builder" }, "init": { "type": "CallExpression", "start": 62, "end": 87, "loc": { "start": { "line": 3, "column": 16 }, "end": { "line": 3, "column": 41 } }, "callee": { "type": "Identifier", "start": 62, "end": 69, "loc": { "start": { "line": 3, "column": 16 }, "end": { "line": 3, "column": 23 }, "identifierName": "require" }, "name": "require" }, "arguments": [ { "type": "StringLiteral", "start": 70, "end": 86, "loc": { "start": { "line": 3, "column": 24 }, "end": { "line": 3, "column": 40 } }, "extra": { "rawValue": "backed-builder", "raw": "'backed-builder'" }, "value": "backed-builder" } ] } } ], "kind": "const" }, { "type": "VariableDeclaration", "start": 89, "end": 121, "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 4, "column": 32 } }, "declarations": [ { "type": "VariableDeclarator", "start": 95, "end": 120, "loc": { "start": { "line": 4, "column": 6 }, "end": { "line": 4, "column": 31 } }, "id": { "type": "Identifier", "start": 95, "end": 97, "loc": { "start": { "line": 4, "column": 6 }, "end": { "line": 4, "column": 8 }, "identifierName": "fs" }, "name": "fs" }, "init": { "type": "CallExpression", "start": 100, "end": 120, "loc": { "start": { "line": 4, "column": 11 }, "end": { "line": 4, "column": 31 } }, "callee": { "type": "Identifier", "start": 100, "end": 107, "loc": { "start": { "line": 4, "column": 11 }, "end": { "line": 4, "column": 18 }, "identifierName": "require" }, "name": "require" }, "arguments": [ { "type": "StringLiteral", "start": 108, "end": 119, "loc": { "start": { "line": 4, "column": 19 }, "end": { "line": 4, "column": 30 } }, "extra": { "rawValue": "backed-fs", "raw": "'backed-fs'" }, "value": "backed-fs" } ] } } ], "kind": "const" }, { "type": "VariableDeclaration", "start": 122, "end": 162, "loc": { "start": { "line": 5, "column": 0 }, "end": { "line": 5, "column": 40 } }, "declarations": [ { "type": "VariableDeclarator", "start": 128, "end": 161, "loc": { "start": { "line": 5, "column": 6 }, "end": { "line": 5, "column": 39 } }, "id": { "type": "Identifier", "start": 128, "end": 134, "loc": { "start": { "line": 5, "column": 6 }, "end": { "line": 5, "column": 12 }, "identifierName": "logger" }, "name": "logger" }, "init": { "type": "CallExpression", "start": 137, "end": 161, "loc": { "start": { "line": 5, "column": 15 }, "end": { "line": 5, "column": 39 } }, "callee": { "type": "Identifier", "start": 137, "end": 144, "loc": { "start": { "line": 5, "column": 15 }, "end": { "line": 5, "column": 22 }, "identifierName": "require" }, "name": "require" }, "arguments": [ { "type": "StringLiteral", "start": 145, "end": 160, "loc": { "start": { "line": 5, "column": 23 }, "end": { "line": 5, "column": 38 } }, "extra": { "rawValue": "backed-logger", "raw": "'backed-logger'" }, "value": "backed-logger" } ] } } ], "kind": "const" }, { "type": "ExpressionStatement", "start": 164, "end": 727, "loc": { "start": { "line": 7, "column": 0 }, "end": { "line": 29, "column": 3 } }, "expression": { "type": "CallExpression", "start": 164, "end": 726, "loc": { "start": { "line": 7, "column": 0 }, "end": { "line": 29, "column": 2 } }, "callee": { "type": "MemberExpression", "start": 164, "end": 174, "loc": { "start": { "line": 7, "column": 0 }, "end": { "line": 7, "column": 10 } }, "object": { "type": "Identifier", "start": 164, "end": 171, "loc": { "start": { "line": 7, "column": 0 }, "end": { "line": 7, "column": 7 }, "identifierName": "process" }, "name": "process" }, "property": { "type": "Identifier", "start": 172, "end": 174, "loc": { "start": { "line": 7, "column": 8 }, "end": { "line": 7, "column": 10 }, "identifierName": "on" }, "name": "on" }, "computed": false }, "arguments": [ { "type": "StringLiteral", "start": 175, "end": 184, "loc": { "start": { "line": 7, "column": 11 }, "end": { "line": 7, "column": 20 } }, "extra": { "rawValue": "message", "raw": "'message'" }, "value": "message" }, { "type": "ArrowFunctionExpression", "start": 186, "end": 725, "loc": { "start": { "line": 7, "column": 22 }, "end": { "line": 29, "column": 1 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [ { "type": "Identifier", "start": 186, "end": 193, "loc": { "start": { "line": 7, "column": 22 }, "end": { "line": 7, "column": 29 }, "identifierName": "message" }, "name": "message" } ], "body": { "type": "BlockStatement", "start": 197, "end": 725, "loc": { "start": { "line": 7, "column": 33 }, "end": { "line": 29, "column": 1 } }, "body": [ { "type": "VariableDeclaration", "start": 201, "end": 231, "loc": { "start": { "line": 8, "column": 2 }, "end": { "line": 8, "column": 32 } }, "declarations": [ { "type": "VariableDeclarator", "start": 207, "end": 230, "loc": { "start": { "line": 8, "column": 8 }, "end": { "line": 8, "column": 31 } }, "id": { "type": "Identifier", "start": 207, "end": 213, "loc": { "start": { "line": 8, "column": 8 }, "end": { "line": 8, "column": 14 }, "identifierName": "config" }, "name": "config" }, "init": { "type": "MemberExpression", "start": 216, "end": 230, "loc": { "start": { "line": 8, "column": 17 }, "end": { "line": 8, "column": 31 } }, "object": { "type": "Identifier", "start": 216, "end": 223, "loc": { "start": { "line": 8, "column": 17 }, "end": { "line": 8, "column": 24 }, "identifierName": "message" }, "name": "message" }, "property": { "type": "Identifier", "start": 224, "end": 230, "loc": { "start": { "line": 8, "column": 25 }, "end": { "line": 8, "column": 31 }, "identifierName": "config" }, "name": "config" }, "computed": false } } ], "kind": "const" }, { "type": "VariableDeclaration", "start": 234, "end": 260, "loc": { "start": { "line": 9, "column": 2 }, "end": { "line": 9, "column": 28 } }, "declarations": [ { "type": "VariableDeclarator", "start": 240, "end": 259, "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 27 } }, "id": { "type": "Identifier", "start": 240, "end": 244, "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 12 }, "identifierName": "task" }, "name": "task" }, "init": { "type": "MemberExpression", "start": 247, "end": 259, "loc": { "start": { "line": 9, "column": 15 }, "end": { "line": 9, "column": 27 } }, "object": { "type": "Identifier", "start": 247, "end": 254, "loc": { "start": { "line": 9, "column": 15 }, "end": { "line": 9, "column": 22 }, "identifierName": "message" }, "name": "message" }, "property": { "type": "Identifier", "start": 255, "end": 259, "loc": { "start": { "line": 9, "column": 23 }, "end": { "line": 9, "column": 27 }, "identifierName": "task" }, "name": "task" }, "computed": false } } ], "kind": "const" }, { "type": "SwitchStatement", "start": 263, "end": 723, "loc": { "start": { "line": 10, "column": 2 }, "end": { "line": 28, "column": 3 } }, "discriminant": { "type": "Identifier", "start": 271, "end": 275, "loc": { "start": { "line": 10, "column": 10 }, "end": { "line": 10, "column": 14 }, "identifierName": "task" }, "name": "task" }, "cases": [ { "type": "SwitchCase", "start": 283, "end": 546, "loc": { "start": { "line": 11, "column": 4 }, "end": { "line": 21, "column": 12 } }, "consequent": [ { "type": "IfStatement", "start": 303, "end": 533, "loc": { "start": { "line": 12, "column": 6 }, "end": { "line": 20, "column": 7 } }, "test": { "type": "LogicalExpression", "start": 307, "end": 337, "loc": { "start": { "line": 12, "column": 10 }, "end": { "line": 12, "column": 40 } }, "left": { "type": "MemberExpression", "start": 307, "end": 319, "loc": { "start": { "line": 12, "column": 10 }, "end": { "line": 12, "column": 22 } }, "object": { "type": "Identifier", "start": 307, "end": 313, "loc": { "start": { "line": 12, "column": 10 }, "end": { "line": 12, "column": 16 }, "identifierName": "config" }, "name": "config" }, "property": { "type": "Identifier", "start": 314, "end": 319, "loc": { "start": { "line": 12, "column": 17 }, "end": { "line": 12, "column": 22 }, "identifierName": "entry" }, "name": "entry" }, "computed": false }, "operator": "&&", "right": { "type": "MemberExpression", "start": 323, "end": 337, "loc": { "start": { "line": 12, "column": 26 }, "end": { "line": 12, "column": 40 } }, "object": { "type": "Identifier", "start": 323, "end": 329, "loc": { "start": { "line": 12, "column": 26 }, "end": { "line": 12, "column": 32 }, "identifierName": "config" }, "name": "config" }, "property": { "type": "Identifier", "start": 330, "end": 337, "loc": { "start": { "line": 12, "column": 33 }, "end": { "line": 12, "column": 40 }, "identifierName": "sources" }, "name": "sources" }, "computed": false } }, "consequent": { "type": "BlockStatement", "start": 339, "end": 429, "loc": { "start": { "line": 12, "column": 42 }, "end": { "line": 16, "column": 7 } }, "body": [ { "type": "ExpressionStatement", "start": 349, "end": 421, "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 15, "column": 11 } }, "expression": { "type": "CallExpression", "start": 349, "end": 420, "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 15, "column": 10 } }, "callee": { "type": "MemberExpression", "start": 349, "end": 367, "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 26 } }, "object": { "type": "CallExpression", "start": 349, "end": 362, "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 21 } }, "callee": { "type": "Identifier", "start": 349, "end": 354, "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 13 }, "identifierName": "webup" }, "name": "webup" }, "arguments": [ { "type": "Identifier", "start": 355, "end": 361, "loc": { "start": { "line": 13, "column": 14 }, "end": { "line": 13, "column": 20 }, "identifierName": "config" }, "name": "config" } ] }, "property": { "type": "Identifier", "start": 363, "end": 367, "loc": { "start": { "line": 13, "column": 22 }, "end": { "line": 13, "column": 26 }, "identifierName": "then" }, "name": "then" }, "computed": false }, "arguments": [ { "type": "ArrowFunctionExpression", "start": 368, "end": 419, "loc": { "start": { "line": 13, "column": 27 }, "end": { "line": 15, "column": 9 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [], "body": { "type": "BlockStatement", "start": 374, "end": 419, "loc": { "start": { "line": 13, "column": 33 }, "end": { "line": 15, "column": 9 } }, "body": [ { "type": "ExpressionStatement", "start": 386, "end": 409, "loc": { "start": { "line": 14, "column": 10 }, "end": { "line": 14, "column": 33 } }, "expression": { "type": "CallExpression", "start": 386, "end": 408, "loc": { "start": { "line": 14, "column": 10 }, "end": { "line": 14, "column": 32 } }, "callee": { "type": "MemberExpression", "start": 386, "end": 398, "loc": { "start": { "line": 14, "column": 10 }, "end": { "line": 14, "column": 22 } }, "object": { "type": "Identifier", "start": 386, "end": 393, "loc": { "start": { "line": 14, "column": 10 }, "end": { "line": 14, "column": 17 }, "identifierName": "process" }, "name": "process" }, "property": { "type": "Identifier", "start": 394, "end": 398, "loc": { "start": { "line": 14, "column": 18 }, "end": { "line": 14, "column": 22 }, "identifierName": "send" }, "name": "send" }, "computed": false }, "arguments": [ { "type": "StringLiteral", "start": 399, "end": 407, "loc": { "start": { "line": 14, "column": 23 }, "end": { "line": 14, "column": 31 } }, "extra": { "rawValue": "reload", "raw": "'reload'" }, "value": "reload" } ] } } ], "directives": [] } } ] } } ], "directives": [] }, "alternate": { "type": "BlockStatement", "start": 435, "end": 533, "loc": { "start": { "line": 16, "column": 13 }, "end": { "line": 20, "column": 7 } }, "body": [ { "type": "ExpressionStatement", "start": 445, "end": 525, "loc": { "start": { "line": 17, "column": 8 }, "end": { "line": 19, "column": 11 } }, "expression": { "type": "CallExpression", "start": 445, "end": 524, "loc": { "start": { "line": 17, "column": 8 }, "end": { "line": 19, "column": 10 } }, "callee": { "type": "MemberExpression", "start": 445, "end": 471, "loc": { "start": { "line": 17, "column": 8 }, "end": { "line": 17, "column": 34 } }, "object": { "type": "CallExpression", "start": 445, "end": 466, "loc": { "start": { "line": 17, "column": 8 }, "end": { "line": 17, "column": 29 } }, "callee": { "type": "MemberExpression", "start": 445, "end": 458, "loc": { "start": { "line": 17, "column": 8 }, "end": { "line": 17, "column": 21 } }, "object": { "type": "Identifier", "start": 445, "end": 452, "loc": { "start": { "line": 17, "column": 8 }, "end": { "line": 17, "column": 15 }, "identifierName": "builder" }, "name": "builder" }, "property": {