UNPKG

backed-cli

Version:

The official command line interface for Backed

1,411 lines (1,410 loc) 408 kB
{ "type": "File", "start": 0, "end": 1652, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 72, "column": 0 } }, "program": { "type": "Program", "start": 0, "end": 1652, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 72, "column": 0 } }, "sourceType": "module", "body": [ { "type": "VariableDeclaration", "start": 15, "end": 47, "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 2, "column": 32 } }, "declarations": [ { "type": "VariableDeclarator", "start": 21, "end": 46, "loc": { "start": { "line": 2, "column": 6 }, "end": { "line": 2, "column": 31 } }, "id": { "type": "Identifier", "start": 21, "end": 23, "loc": { "start": { "line": 2, "column": 6 }, "end": { "line": 2, "column": 8 }, "identifierName": "fs" }, "name": "fs" }, "init": { "type": "CallExpression", "start": 26, "end": 46, "loc": { "start": { "line": 2, "column": 11 }, "end": { "line": 2, "column": 31 } }, "callee": { "type": "Identifier", "start": 26, "end": 33, "loc": { "start": { "line": 2, "column": 11 }, "end": { "line": 2, "column": 18 }, "identifierName": "require" }, "name": "require" }, "arguments": [ { "type": "StringLiteral", "start": 34, "end": 45, "loc": { "start": { "line": 2, "column": 19 }, "end": { "line": 2, "column": 30 } }, "extra": { "rawValue": "backed-fs", "raw": "'backed-fs'" }, "value": "backed-fs" } ] } } ], "kind": "const" }, { "type": "VariableDeclaration", "start": 49, "end": 82, "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 3, "column": 33 } }, "declarations": [ { "type": "VariableDeclarator", "start": 55, "end": 81, "loc": { "start": { "line": 3, "column": 6 }, "end": { "line": 3, "column": 32 } }, "id": { "type": "ObjectPattern", "start": 55, "end": 65, "loc": { "start": { "line": 3, "column": 6 }, "end": { "line": 3, "column": 16 } }, "properties": [ { "type": "ObjectProperty", "start": 56, "end": 64, "loc": { "start": { "line": 3, "column": 7 }, "end": { "line": 3, "column": 15 } }, "method": false, "shorthand": true, "computed": false, "key": { "type": "Identifier", "start": 56, "end": 64, "loc": { "start": { "line": 3, "column": 7 }, "end": { "line": 3, "column": 15 }, "identifierName": "readFile" }, "name": "readFile" }, "value": { "type": "Identifier", "start": 56, "end": 64, "loc": { "start": { "line": 3, "column": 7 }, "end": { "line": 3, "column": 15 }, "identifierName": "readFile" }, "name": "readFile" }, "extra": { "shorthand": true } } ] }, "init": { "type": "CallExpression", "start": 68, "end": 81, "loc": { "start": { "line": 3, "column": 19 }, "end": { "line": 3, "column": 32 } }, "callee": { "type": "Identifier", "start": 68, "end": 75, "loc": { "start": { "line": 3, "column": 19 }, "end": { "line": 3, "column": 26 }, "identifierName": "require" }, "name": "require" }, "arguments": [ { "type": "StringLiteral", "start": 76, "end": 80, "loc": { "start": { "line": 3, "column": 27 }, "end": { "line": 3, "column": 31 } }, "extra": { "rawValue": "fs", "raw": "'fs'" }, "value": "fs" } ] } } ], "kind": "const" }, { "type": "VariableDeclaration", "start": 84, "end": 115, "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 4, "column": 31 } }, "declarations": [ { "type": "VariableDeclarator", "start": 90, "end": 114, "loc": { "start": { "line": 4, "column": 6 }, "end": { "line": 4, "column": 30 } }, "id": { "type": "Identifier", "start": 90, "end": 95, "loc": { "start": { "line": 4, "column": 6 }, "end": { "line": 4, "column": 11 }, "identifierName": "webup" }, "name": "webup" }, "init": { "type": "CallExpression", "start": 98, "end": 114, "loc": { "start": { "line": 4, "column": 14 }, "end": { "line": 4, "column": 30 } }, "callee": { "type": "Identifier", "start": 98, "end": 105, "loc": { "start": { "line": 4, "column": 14 }, "end": { "line": 4, "column": 21 }, "identifierName": "require" }, "name": "require" }, "arguments": [ { "type": "StringLiteral", "start": 106, "end": 113, "loc": { "start": { "line": 4, "column": 22 }, "end": { "line": 4, "column": 29 } }, "extra": { "rawValue": "webup", "raw": "'webup'" }, "value": "webup" } ] } } ], "kind": "const" }, { "type": "VariableDeclaration", "start": 117, "end": 155, "loc": { "start": { "line": 5, "column": 0 }, "end": { "line": 5, "column": 38 } }, "declarations": [ { "type": "VariableDeclarator", "start": 123, "end": 154, "loc": { "start": { "line": 5, "column": 6 }, "end": { "line": 5, "column": 37 } }, "id": { "type": "Identifier", "start": 123, "end": 131, "loc": { "start": { "line": 5, "column": 6 }, "end": { "line": 5, "column": 14 }, "identifierName": "uglifyEs" }, "name": "uglifyEs" }, "init": { "type": "CallExpression", "start": 134, "end": 154, "loc": { "start": { "line": 5, "column": 17 }, "end": { "line": 5, "column": 37 } }, "callee": { "type": "Identifier", "start": 134, "end": 141, "loc": { "start": { "line": 5, "column": 17 }, "end": { "line": 5, "column": 24 }, "identifierName": "require" }, "name": "require" }, "arguments": [ { "type": "StringLiteral", "start": 142, "end": 153, "loc": { "start": { "line": 5, "column": 25 }, "end": { "line": 5, "column": 36 } }, "extra": { "rawValue": "uglify-es", "raw": "'uglify-es'" }, "value": "uglify-es" } ] } } ], "kind": "const" }, { "type": "ImportDeclaration", "start": 157, "end": 227, "loc": { "start": { "line": 6, "column": 0 }, "end": { "line": 6, "column": 70 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 164, "end": 171, "loc": { "start": { "line": 6, "column": 7 }, "end": { "line": 6, "column": 14 } }, "local": { "type": "Identifier", "start": 164, "end": 171, "loc": { "start": { "line": 6, "column": 7 }, "end": { "line": 6, "column": 14 }, "identifierName": "builder" }, "name": "builder" } } ], "source": { "type": "StringLiteral", "start": 177, "end": 226, "loc": { "start": { "line": 6, "column": 20 }, "end": { "line": 6, "column": 69 } }, "extra": { "rawValue": "./../node_modules/backed-builder/src/builder.js", "raw": "'./../node_modules/backed-builder/src/builder.js'" }, "value": "./../node_modules/backed-builder/src/builder.js" } }, { "type": "ImportDeclaration", "start": 229, "end": 262, "loc": { "start": { "line": 7, "column": 0 }, "end": { "line": 7, "column": 33 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 236, "end": 242, "loc": { "start": { "line": 7, "column": 7 }, "end": { "line": 7, "column": 13 } }, "local": { "type": "Identifier", "start": 236, "end": 242, "loc": { "start": { "line": 7, "column": 7 }, "end": { "line": 7, "column": 13 }, "identifierName": "server" }, "name": "server" } } ], "source": { "type": "StringLiteral", "start": 248, "end": 261, "loc": { "start": { "line": 7, "column": 19 }, "end": { "line": 7, "column": 32 } }, "extra": { "rawValue": "./server.js", "raw": "'./server.js'" }, "value": "./server.js" } }, { "type": "ImportDeclaration", "start": 264, "end": 299, "loc": { "start": { "line": 8, "column": 0 }, "end": { "line": 8, "column": 35 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 271, "end": 278, "loc": { "start": { "line": 8, "column": 7 }, "end": { "line": 8, "column": 14 } }, "local": { "type": "Identifier", "start": 271, "end": 278, "loc": { "start": { "line": 8, "column": 7 }, "end": { "line": 8, "column": 14 }, "identifierName": "watcher" }, "name": "watcher" } } ], "source": { "type": "StringLiteral", "start": 284, "end": 298, "loc": { "start": { "line": 8, "column": 20 }, "end": { "line": 8, "column": 34 } }, "extra": { "rawValue": "./watcher.js", "raw": "'./watcher.js'" }, "value": "./watcher.js" } }, { "type": "VariableDeclaration", "start": 303, "end": 563, "loc": { "start": { "line": 10, "column": 0 }, "end": { "line": 19, "column": 2 } }, "declarations": [ { "type": "VariableDeclarator", "start": 309, "end": 562, "loc": { "start": { "line": 10, "column": 6 }, "end": { "line": 19, "column": 1 } }, "id": { "type": "Identifier", "start": 309, "end": 314, "loc": { "start": { "line": 10, "column": 6 }, "end": { "line": 10, "column": 11 }, "identifierName": "build" }, "name": "build" }, "init": { "type": "ArrowFunctionExpression", "start": 317, "end": 562, "loc": { "start": { "line": 10, "column": 14 }, "end": { "line": 19, "column": 1 } }, "id": { "type": "Identifier", "start": 309, "end": 314, "loc": { "start": { "line": 10, "column": 6 }, "end": { "line": 10, "column": 11 }, "identifierName": "build" }, "name": "build" }, "generator": false, "expression": false, "async": false, "params": [ { "type": "Identifier", "start": 317, "end": 323, "loc": { "start": { "line": 10, "column": 14 }, "end": { "line": 10, "column": 20 }, "identifierName": "config" }, "name": "config" } ], "body": { "type": "BlockStatement", "start": 327, "end": 562, "loc": { "start": { "line": 10, "column": 24 }, "end": { "line": 19, "column": 1 } }, "body": [ { "type": "ReturnStatement", "start": 332, "end": 559, "loc": { "start": { "line": 11, "column": 2 }, "end": { "line": 18, "column": 5 } }, "argument": { "type": "NewExpression", "start": 339, "end": 558, "loc": { "start": { "line": 11, "column": 9 }, "end": { "line": 18, "column": 4 } }, "callee": { "type": "Identifier", "start": 343, "end": 350, "loc": { "start": { "line": 11, "column": 13 }, "end": { "line": 11, "column": 20 }, "identifierName": "Promise" }, "name": "Promise" }, "arguments": [ { "type": "ArrowFunctionExpression", "start": 351, "end": 557, "loc": { "start": { "line": 11, "column": 21 }, "end": { "line": 18, "column": 3 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [ { "type": "Identifier", "start": 352, "end": 359, "loc": { "start": { "line": 11, "column": 22 }, "end": { "line": 11, "column": 29 }, "identifierName": "resolve" }, "name": "resolve" }, { "type": "Identifier", "start": 361, "end": 367, "loc": { "start": { "line": 11, "column": 31 }, "end": { "line": 11, "column": 37 }, "identifierName": "reject" }, "name": "reject" } ], "body": { "type": "BlockStatement", "start": 372, "end": 557, "loc": { "start": { "line": 11, "column": 42 }, "end": { "line": 18, "column": 3 } }, "body": [ { "type": "IfStatement", "start": 379, "end": 502, "loc": { "start": { "line": 12, "column": 4 }, "end": { "line": 16, "column": 5 } }, "test": { "type": "LogicalExpression", "start": 383, "end": 413, "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 38 } }, "left": { "type": "MemberExpression", "start": 383, "end": 395, "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 20 } }, "object": { "type": "Identifier", "start": 383, "end": 389, "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 14 }, "identifierName": "config" }, "name": "config" }, "property": { "type": "Identifier", "start": 390, "end": 395, "loc": { "start": { "line": 12, "column": 15 }, "end": { "line": 12, "column": 20 }, "identifierName": "entry" }, "name": "entry" }, "computed": false }, "operator": "&&", "right": { "type": "MemberExpression", "start": 399, "end": 413, "loc": { "start": { "line": 12, "column": 24 }, "end": { "line": 12, "column": 38 } }, "object": { "type": "Identifier", "start": 399, "end": 405, "loc": { "start": { "line": 12, "column": 24 }, "end": { "line": 12, "column": 30 }, "identifierName": "config" }, "name": "config" }, "property": { "type": "Identifier", "start": 406, "end": 413, "loc": { "start": { "line": 12, "column": 31 }, "end": { "line": 12, "column": 38 }, "identifierName": "sources" }, "name": "sources" }, "computed": false } }, "consequent": { "type": "BlockStatement", "start": 415, "end": 502, "loc": { "start": { "line": 12, "column": 40 }, "end": { "line": 16, "column": 5 } }, "body": [ { "type": "ReturnStatement", "start": 424, "end": 495, "loc": { "start": { "line": 13, "column": 6 }, "end": { "line": 15, "column": 9 } }, "argument": { "type": "CallExpression", "start": 431, "end": 494, "loc": { "start": { "line": 13, "column": 13 }, "end": { "line": 15, "column": 8 } }, "callee": { "type": "MemberExpression", "start": 431, "end": 449, "loc": { "start": { "line": 13, "column": 13 }, "end": { "line": 13, "column": 31 } }, "object": { "type": "CallExpression", "start": 431, "end": 444, "loc": { "start": { "line": 13, "column": 13 }, "end": { "line": 13, "column": 26 } }, "callee": { "type": "Identifier", "start": 431, "end": 436, "loc": { "start": { "line": 13, "column": 13 }, "end": { "line": 13, "column": 18 }, "identifierName": "webup" }, "name": "webup" }, "arguments": [ { "type": "Identifier", "start": 437, "end": 443, "loc": { "start": { "line": 13, "column": 19 }, "end": { "line": 13, "column": 25 }, "identifierName": "config" }, "name": "config" } ] }, "property": { "type": "Identifier", "start": 445, "end": 449, "loc": { "start": { "line": 13, "column": 27 }, "end": { "line": 13, "column": 31 }, "identifierName": "then" }, "name": "then" }, "computed": false }, "arguments": [ { "type": "ArrowFunctionExpression", "start": 450, "end": 493, "loc": { "start": { "line": 13, "column": 32 }, "end": { "line": 15, "column": 7 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [], "body": { "type": "BlockStatement", "start": 456, "end": 493, "loc": { "start": { "line": 13, "column": 38 }, "end": { "line": 15, "column": 7 } }, "body": [ { "type": "ReturnStatement", "start": 467, "end": 484, "loc": { "start": { "line": 14, "column": 8 }, "end": { "line": 14, "column": 25 } }, "argument": { "type": "CallExpression", "start": 474, "end": 483, "loc": { "start": { "line": 14, "column": 15 }, "end": { "line": 14, "column": 24 } }, "callee": { "type": "Identifier", "start": 474, "end": 481, "loc": { "start": { "line": 14, "column": 15 }, "end": { "line": 14, "column": 22 }, "identifierName": "resolve" }, "name": "resolve" }, "arguments": [] } } ], "directives": [] } } ] } } ], "directives": [] }, "alternate": null }, { "type": "ExpressionStatement", "start": 508, "end": 552, "loc": { "start": { "line": 17, "column": 4 }, "end": { "line": 17, "column": 48 } }, "expression": { "type": "CallExpression", "start": 508, "end": 551, "loc": { "start": { "line": 17, "column": 4 }, "end": { "line": 17, "column": 47 } }, "callee": { "type": "MemberExpression", "start": 508, "end": 534, "loc": { "start": { "line": 17, "column": 4 }, "end": { "line": 17, "column": 30 } }, "object": { "type": "CallExpression", "start": 508, "end": 529, "loc": { "start": { "line": 17, "column": 4 }, "end": { "line": 17, "column": 25 } }, "callee": { "type": "MemberExpression", "start": 508, "end": 521, "loc": { "start": { "line": 17, "column": 4 }, "end": { "line": 17, "column": 17 } }, "object": { "type": "Identifier", "start": 508, "end": 515, "loc": { "start": { "line": 17, "column": 4 }, "end": { "line": 17, "column": 11 }, "identifierName": "builder" }, "name": "builder" }, "property": { "type": "Identifier", "start": 516, "end": 521, "loc": { "start": { "line": 17, "column": 12 }, "end": { "line": 17, "column": 17 }, "identifierName": "build" }, "name": "build" }, "computed": false }, "arguments": [ { "type": "Identifier", "start": 522, "end": 528, "loc": { "start": { "line": 17, "column": 18 }, "end": { "line": 17, "column": 24 }, "identifierName": "config"