UNPKG

backed-cli

Version:

The official command line interface for Backed

1,257 lines (1,256 loc) 948 kB
{ "type": "File", "start": 0, "end": 5816, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 212, "column": 0 } }, "program": { "type": "Program", "start": 0, "end": 5816, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 212, "column": 0 } }, "sourceType": "module", "body": [ { "type": "VariableDeclaration", "start": 14, "end": 51, "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 2, "column": 37 } }, "declarations": [ { "type": "VariableDeclarator", "start": 20, "end": 50, "loc": { "start": { "line": 2, "column": 6 }, "end": { "line": 2, "column": 36 } }, "id": { "type": "ObjectPattern", "start": 20, "end": 34, "loc": { "start": { "line": 2, "column": 6 }, "end": { "line": 2, "column": 20 } }, "properties": [ { "type": "ObjectProperty", "start": 21, "end": 33, "loc": { "start": { "line": 2, "column": 7 }, "end": { "line": 2, "column": 19 } }, "method": false, "shorthand": true, "computed": false, "key": { "type": "Identifier", "start": 21, "end": 33, "loc": { "start": { "line": 2, "column": 7 }, "end": { "line": 2, "column": 19 }, "identifierName": "readFileSync" }, "name": "readFileSync" }, "value": { "type": "Identifier", "start": 21, "end": 33, "loc": { "start": { "line": 2, "column": 7 }, "end": { "line": 2, "column": 19 }, "identifierName": "readFileSync" }, "name": "readFileSync" }, "extra": { "shorthand": true } } ] }, "init": { "type": "CallExpression", "start": 37, "end": 50, "loc": { "start": { "line": 2, "column": 23 }, "end": { "line": 2, "column": 36 } }, "callee": { "type": "Identifier", "start": 37, "end": 44, "loc": { "start": { "line": 2, "column": 23 }, "end": { "line": 2, "column": 30 }, "identifierName": "require" }, "name": "require" }, "arguments": [ { "type": "StringLiteral", "start": 45, "end": 49, "loc": { "start": { "line": 2, "column": 31 }, "end": { "line": 2, "column": 35 } }, "extra": { "rawValue": "fs", "raw": "'fs'" }, "value": "fs" } ] } } ], "kind": "const" }, { "type": "VariableDeclaration", "start": 52, "end": 81, "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 3, "column": 29 } }, "declarations": [ { "type": "VariableDeclarator", "start": 58, "end": 80, "loc": { "start": { "line": 3, "column": 6 }, "end": { "line": 3, "column": 28 } }, "id": { "type": "Identifier", "start": 58, "end": 62, "loc": { "start": { "line": 3, "column": 6 }, "end": { "line": 3, "column": 10 }, "identifierName": "path" }, "name": "path" }, "init": { "type": "CallExpression", "start": 65, "end": 80, "loc": { "start": { "line": 3, "column": 13 }, "end": { "line": 3, "column": 28 } }, "callee": { "type": "Identifier", "start": 65, "end": 72, "loc": { "start": { "line": 3, "column": 13 }, "end": { "line": 3, "column": 20 }, "identifierName": "require" }, "name": "require" }, "arguments": [ { "type": "StringLiteral", "start": 73, "end": 79, "loc": { "start": { "line": 3, "column": 21 }, "end": { "line": 3, "column": 27 } }, "extra": { "rawValue": "path", "raw": "'path'" }, "value": "path" } ] } } ], "kind": "const" }, { "type": "VariableDeclaration", "start": 82, "end": 116, "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 4, "column": 34 } }, "declarations": [ { "type": "VariableDeclarator", "start": 88, "end": 115, "loc": { "start": { "line": 4, "column": 6 }, "end": { "line": 4, "column": 33 } }, "id": { "type": "ObjectPattern", "start": 88, "end": 95, "loc": { "start": { "line": 4, "column": 6 }, "end": { "line": 4, "column": 13 } }, "properties": [ { "type": "ObjectProperty", "start": 89, "end": 94, "loc": { "start": { "line": 4, "column": 7 }, "end": { "line": 4, "column": 12 } }, "method": false, "shorthand": true, "computed": false, "key": { "type": "Identifier", "start": 89, "end": 94, "loc": { "start": { "line": 4, "column": 7 }, "end": { "line": 4, "column": 12 }, "identifierName": "merge" }, "name": "merge" }, "value": { "type": "Identifier", "start": 89, "end": 94, "loc": { "start": { "line": 4, "column": 7 }, "end": { "line": 4, "column": 12 }, "identifierName": "merge" }, "name": "merge" }, "extra": { "shorthand": true } } ] }, "init": { "type": "CallExpression", "start": 98, "end": 115, "loc": { "start": { "line": 4, "column": 16 }, "end": { "line": 4, "column": 33 } }, "callee": { "type": "Identifier", "start": 98, "end": 105, "loc": { "start": { "line": 4, "column": 16 }, "end": { "line": 4, "column": 23 }, "identifierName": "require" }, "name": "require" }, "arguments": [ { "type": "StringLiteral", "start": 106, "end": 114, "loc": { "start": { "line": 4, "column": 24 }, "end": { "line": 4, "column": 32 } }, "extra": { "rawValue": "lodash", "raw": "'lodash'" }, "value": "lodash" } ] } } ], "kind": "const" }, { "type": "VariableDeclaration", "start": 117, "end": 157, "loc": { "start": { "line": 5, "column": 0 }, "end": { "line": 5, "column": 40 } }, "declarations": [ { "type": "VariableDeclarator", "start": 123, "end": 156, "loc": { "start": { "line": 5, "column": 6 }, "end": { "line": 5, "column": 39 } }, "id": { "type": "Identifier", "start": 123, "end": 129, "loc": { "start": { "line": 5, "column": 6 }, "end": { "line": 5, "column": 12 }, "identifierName": "logger" }, "name": "logger" }, "init": { "type": "CallExpression", "start": 132, "end": 156, "loc": { "start": { "line": 5, "column": 15 }, "end": { "line": 5, "column": 39 } }, "callee": { "type": "Identifier", "start": 132, "end": 139, "loc": { "start": { "line": 5, "column": 15 }, "end": { "line": 5, "column": 22 }, "identifierName": "require" }, "name": "require" }, "arguments": [ { "type": "StringLiteral", "start": 140, "end": 155, "loc": { "start": { "line": 5, "column": 23 }, "end": { "line": 5, "column": 38 } }, "extra": { "rawValue": "backed-logger", "raw": "'backed-logger'" }, "value": "backed-logger" } ] } } ], "kind": "const", "trailingComments": [ { "type": "CommentBlock", "value": "*\n * @param {string} config.name name off your project\n * @param {string} config.server.entry path to where your build is located\n * @param {string} config.server.entry path to where your build is located\n * @param {string} config.server.docs path to where your docs are located\n * @param {string} config.server.bowerPath path to bower_components\n * @param {string} config.server.nodeModulesPath path to node_modules\n * @param {string} config.server.demo path to the demo\n * @param {string} config.server.index path to your index.html file we serve a helper/docs index by default (not support for now)\n * @param {array} config.server.use static files to include [{path: some/path, static: some//path}] when static is undefined path will be used.\n ", "start": 159, "end": 910, "loc": { "start": { "line": 7, "column": 0 }, "end": { "line": 17, "column": 3 } } } ] }, { "type": "ExportDefaultDeclaration", "start": 911, "end": 5815, "loc": { "start": { "line": 18, "column": 0 }, "end": { "line": 211, "column": 1 } }, "declaration": { "type": "ClassDeclaration", "start": 926, "end": 5815, "loc": { "start": { "line": 18, "column": 15 }, "end": { "line": 211, "column": 1 } }, "id": { "type": "Identifier", "start": 932, "end": 938, "loc": { "start": { "line": 18, "column": 21 }, "end": { "line": 18, "column": 27 }, "identifierName": "Config" }, "name": "Config", "leadingComments": null }, "superClass": null, "body": { "type": "ClassBody", "start": 939, "end": 5815, "loc": { "start": { "line": 18, "column": 28 }, "end": { "line": 211, "column": 1 } }, "body": [ { "type": "ClassMethod", "start": 943, "end": 1408, "loc": { "start": { "line": 19, "column": 2 }, "end": { "line": 33, "column": 3 } }, "computed": false, "key": { "type": "Identifier", "start": 943, "end": 954, "loc": { "start": { "line": 19, "column": 2 }, "end": { "line": 19, "column": 13 }, "identifierName": "constructor" }, "name": "constructor" }, "static": false, "kind": "constructor", "id": null, "generator": false, "expression": false, "async": false, "params": [], "body": { "type": "BlockStatement", "start": 957, "end": 1408, "loc": { "start": { "line": 19, "column": 16 }, "end": { "line": 33, "column": 3 } }, "body": [ { "type": "ReturnStatement", "start": 963, "end": 1404, "loc": { "start": { "line": 20, "column": 4 }, "end": { "line": 32, "column": 7 } }, "argument": { "type": "NewExpression", "start": 970, "end": 1403, "loc": { "start": { "line": 20, "column": 11 }, "end": { "line": 32, "column": 6 } }, "callee": { "type": "Identifier", "start": 974, "end": 981, "loc": { "start": { "line": 20, "column": 15 }, "end": { "line": 20, "column": 22 }, "identifierName": "Promise" }, "name": "Promise" }, "arguments": [ { "type": "ArrowFunctionExpression", "start": 982, "end": 1402, "loc": { "start": { "line": 20, "column": 23 }, "end": { "line": 32, "column": 5 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [ { "type": "Identifier", "start": 983, "end": 990, "loc": { "start": { "line": 20, "column": 24 }, "end": { "line": 20, "column": 31 }, "identifierName": "resolve" }, "name": "resolve" }, { "type": "Identifier", "start": 992, "end": 998, "loc": { "start": { "line": 20, "column": 33 }, "end": { "line": 20, "column": 39 }, "identifierName": "reject" }, "name": "reject" } ], "body": { "type": "BlockStatement", "start": 1003, "end": 1402, "loc": { "start": { "line": 20, "column": 44 }, "end": { "line": 32, "column": 5 } }, "body": [ { "type": "ExpressionStatement", "start": 1011, "end": 1396, "loc": { "start": { "line": 21, "column": 6 }, "end": { "line": 31, "column": 9 } }, "expression": { "type": "CallExpression", "start": 1011, "end": 1395, "loc": { "start": { "line": 21, "column": 6 }, "end": { "line": 31, "column": 8 } }, "callee": { "type": "MemberExpression", "start": 1011, "end": 1035, "loc": { "start": { "line": 21, "column": 6 }, "end": { "line": 21, "column": 30 } }, "object": { "type": "CallExpression", "start": 1011, "end": 1030, "loc": { "start": { "line": 21, "column": 6 }, "end": { "line": 21, "column": 25 } }, "callee": { "type": "MemberExpression", "start": 1011, "end": 1028, "loc": { "start": { "line": 21, "column": 6 }, "end": { "line": 21, "column": 23 } }, "object": { "type": "ThisExpression", "start": 1011, "end": 1015, "loc": { "start": { "line": 21, "column": 6 }, "end": { "line": 21, "column": 10 } } }, "property": { "type": "Identifier", "start": 1016, "end": 1028, "loc": { "start": { "line": 21, "column": 11 }, "end": { "line": 21, "column": 23 }, "identifierName": "importConfig" }, "name": "importConfig" }, "computed": false }, "arguments": [] }, "property": { "type": "Identifier", "start": 1031, "end": 1035, "loc": { "start": { "line": 21, "column": 26 }, "end": { "line": 21, "column": 30 }, "identifierName": "then" }, "name": "then" }, "computed": false }, "arguments": [ { "type": "ArrowFunctionExpression", "start": 1036, "end": 1394, "loc": { "start": { "line": 21, "column": 31 }, "end": { "line": 31, "column": 7 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [ { "type": "Identifier", "start": 1036, "end": 1042, "loc": { "start": { "line": 21, "column": 31 }, "end": { "line": 21, "column": 37 }, "identifierName": "config" }, "name": "config" } ], "body": { "type": "BlockStatement", "start": 1046, "end": 1394, "loc": { "start": { "line": 21, "column": 41 }, "end": { "line": 31, "column": 7 } }, "body": [ { "type": "ExpressionStatement", "start": 1056, "end": 1080, "loc": { "start": { "line": 22, "column": 8 }, "end": { "line": 22, "column": 32 } }, "expression": { "type": "AssignmentExpression", "start": 1056, "end": 1079, "loc": { "start": { "line": 22, "column": 8 }, "end": { "line": 22, "column": 31 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 1056, "end": 1065, "loc": { "start": { "line": 22, "column": 8 }, "end": { "line": 22, "column": 17 } }, "object": { "type": "ThisExpression", "start": 1056, "end": 1060, "loc": { "start": { "line": 22, "column": 8 }, "end": { "line": 22, "column": 12 } } }, "property": { "type": "Identifier", "start": 1061, "end": 1065, "loc": { "start": { "line": 22, "column": 13 }, "end": { "line": 22, "column": 17 }, "identifierName": "name" }, "name": "name" }, "computed": false }, "right": { "type": "MemberExpression", "start": 1068, "end": 1079, "loc": { "start": { "line": 22, "column": 20 }, "end": { "line": 22, "column": 31 } }, "object": { "type": "Identifier", "start": 1068, "end": 1074, "loc": { "start": { "line": 22, "column": 20 }, "end": { "line": 22, "column": 26 }, "identifierName": "config" }, "name": "config" }, "property": { "type": "Identifier", "start": 1075, "end": 1079, "loc": { "start": { "line": 22, "column": 27 }, "end": { "line": 22, "column": 31 }, "identifierName": "name" }, "name": "name" }, "computed": false } } }, { "type": "ExpressionStatement", "start": 1089, "end": 1127, "loc": { "start": { "line": 23, "column": 8 }, "end": { "line": 23, "column": 46 } }, "expression": { "type": "AssignmentExpression", "start": 1089, "end": 1126, "loc": { "start": { "line": 23, "column": 8 }, "end": { "line": 23, "column": 45 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 1089, "end": 1101, "loc": { "start": { "line": 23, "column": 8 }, "end": { "line": 23, "column": 20 } }, "object": { "type": "ThisExpression", "start": 1089, "end": 1093, "loc": { "start": { "line": 23, "column": 8 }, "end": { "line": 23, "column": 12 } } }, "property": { "type": "Identifier", "start": 1094, "end": 1101, "loc": { "start": { "line": 23, "column": 13 }, "end": { "line": 23, "column": 20 }, "identifierName": "cleanup" }, "name": "cleanup" }, "computed": false }, "right": { "type": "LogicalExpression", "start": 1104, "end": 1126, "loc": { "start": { "line": 23, "column": 23 }, "end": { "line": 23, "column": 45 } }, "left": { "type": "MemberExpression", "start": 1104, "end": 1118, "loc": { "start": { "line": 23, "column": 23 }, "end": { "line": 23, "column": 37 } }, "object": { "type": "Identifier", "start": 1104, "end": 1110, "loc": { "start": { "line": 23, "column": 23 }, "end": { "line": 23, "column": 29 }, "identifierName": "config" }, "name": "config" }, "property": { "type": "Identifier", "start": 1111, "end": 1118, "loc": { "start": { "line": 23, "column": 30 }, "end": { "line": 23, "column": 37 }, "identifierName": "cleanup" }, "name": "cleanup" }, "computed": false }, "operator": "||", "right": { "type": "BooleanLiteral",