UNPKG

backed-cli

Version:

The official command line interface for Backed

1,695 lines (1,694 loc) 1.85 MB
{ "type": "File", "start": 0, "end": 5259, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 175, "column": 0 } }, "program": { "type": "Program", "start": 0, "end": 5259, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 175, "column": 0 } }, "sourceType": "module", "body": [ { "type": "VariableDeclaration", "start": 14, "end": 49, "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 2, "column": 35 } }, "declarations": [ { "type": "VariableDeclarator", "start": 20, "end": 48, "loc": { "start": { "line": 2, "column": 6 }, "end": { "line": 2, "column": 34 } }, "id": { "type": "ObjectPattern", "start": 20, "end": 28, "loc": { "start": { "line": 2, "column": 6 }, "end": { "line": 2, "column": 14 } }, "properties": [ { "type": "ObjectProperty", "start": 21, "end": 27, "loc": { "start": { "line": 2, "column": 7 }, "end": { "line": 2, "column": 13 } }, "method": false, "shorthand": true, "computed": false, "key": { "type": "Identifier", "start": 21, "end": 27, "loc": { "start": { "line": 2, "column": 7 }, "end": { "line": 2, "column": 13 }, "identifierName": "rollup" }, "name": "rollup" }, "value": { "type": "Identifier", "start": 21, "end": 27, "loc": { "start": { "line": 2, "column": 7 }, "end": { "line": 2, "column": 13 }, "identifierName": "rollup" }, "name": "rollup" }, "extra": { "shorthand": true } } ] }, "init": { "type": "CallExpression", "start": 31, "end": 48, "loc": { "start": { "line": 2, "column": 17 }, "end": { "line": 2, "column": 34 } }, "callee": { "type": "Identifier", "start": 31, "end": 38, "loc": { "start": { "line": 2, "column": 17 }, "end": { "line": 2, "column": 24 }, "identifierName": "require" }, "name": "require" }, "arguments": [ { "type": "StringLiteral", "start": 39, "end": 47, "loc": { "start": { "line": 2, "column": 25 }, "end": { "line": 2, "column": 33 } }, "extra": { "rawValue": "rollup", "raw": "'rollup'" }, "value": "rollup" } ] } } ], "kind": "const" }, { "type": "VariableDeclaration", "start": 50, "end": 79, "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 3, "column": 29 } }, "declarations": [ { "type": "VariableDeclarator", "start": 56, "end": 78, "loc": { "start": { "line": 3, "column": 6 }, "end": { "line": 3, "column": 28 } }, "id": { "type": "Identifier", "start": 56, "end": 60, "loc": { "start": { "line": 3, "column": 6 }, "end": { "line": 3, "column": 10 }, "identifierName": "path" }, "name": "path" }, "init": { "type": "CallExpression", "start": 63, "end": 78, "loc": { "start": { "line": 3, "column": 13 }, "end": { "line": 3, "column": 28 } }, "callee": { "type": "Identifier", "start": 63, "end": 70, "loc": { "start": { "line": 3, "column": 13 }, "end": { "line": 3, "column": 20 }, "identifierName": "require" }, "name": "require" }, "arguments": [ { "type": "StringLiteral", "start": 71, "end": 77, "loc": { "start": { "line": 3, "column": 21 }, "end": { "line": 3, "column": 27 } }, "extra": { "rawValue": "path", "raw": "'path'" }, "value": "path" } ] } } ], "kind": "const" }, { "type": "VariableDeclaration", "start": 80, "end": 120, "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 4, "column": 40 } }, "declarations": [ { "type": "VariableDeclarator", "start": 86, "end": 119, "loc": { "start": { "line": 4, "column": 6 }, "end": { "line": 4, "column": 39 } }, "id": { "type": "ObjectPattern", "start": 86, "end": 92, "loc": { "start": { "line": 4, "column": 6 }, "end": { "line": 4, "column": 12 } }, "properties": [ { "type": "ObjectProperty", "start": 87, "end": 91, "loc": { "start": { "line": 4, "column": 7 }, "end": { "line": 4, "column": 11 } }, "method": false, "shorthand": true, "computed": false, "key": { "type": "Identifier", "start": 87, "end": 91, "loc": { "start": { "line": 4, "column": 7 }, "end": { "line": 4, "column": 11 }, "identifierName": "fork" }, "name": "fork" }, "value": { "type": "Identifier", "start": 87, "end": 91, "loc": { "start": { "line": 4, "column": 7 }, "end": { "line": 4, "column": 11 }, "identifierName": "fork" }, "name": "fork" }, "extra": { "shorthand": true } } ] }, "init": { "type": "CallExpression", "start": 95, "end": 119, "loc": { "start": { "line": 4, "column": 15 }, "end": { "line": 4, "column": 39 } }, "callee": { "type": "Identifier", "start": 95, "end": 102, "loc": { "start": { "line": 4, "column": 15 }, "end": { "line": 4, "column": 22 }, "identifierName": "require" }, "name": "require" }, "arguments": [ { "type": "StringLiteral", "start": 103, "end": 118, "loc": { "start": { "line": 4, "column": 23 }, "end": { "line": 4, "column": 38 } }, "extra": { "rawValue": "child_process", "raw": "'child_process'" }, "value": "child_process" } ] } } ], "kind": "const" }, { "type": "ImportDeclaration", "start": 121, "end": 154, "loc": { "start": { "line": 5, "column": 0 }, "end": { "line": 5, "column": 33 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 128, "end": 134, "loc": { "start": { "line": 5, "column": 7 }, "end": { "line": 5, "column": 13 } }, "local": { "type": "Identifier", "start": 128, "end": 134, "loc": { "start": { "line": 5, "column": 7 }, "end": { "line": 5, "column": 13 }, "identifierName": "logger" }, "name": "logger" } } ], "source": { "type": "StringLiteral", "start": 140, "end": 153, "loc": { "start": { "line": 5, "column": 19 }, "end": { "line": 5, "column": 32 } }, "extra": { "rawValue": "./logger.js", "raw": "'./logger.js'" }, "value": "./logger.js" } }, { "type": "VariableDeclaration", "start": 155, "end": 168, "loc": { "start": { "line": 6, "column": 0 }, "end": { "line": 6, "column": 13 } }, "declarations": [ { "type": "VariableDeclarator", "start": 159, "end": 167, "loc": { "start": { "line": 6, "column": 4 }, "end": { "line": 6, "column": 12 } }, "id": { "type": "Identifier", "start": 159, "end": 167, "loc": { "start": { "line": 6, "column": 4 }, "end": { "line": 6, "column": 12 }, "identifierName": "iterator" }, "name": "iterator" }, "init": null } ], "kind": "let" }, { "type": "VariableDeclaration", "start": 169, "end": 179, "loc": { "start": { "line": 7, "column": 0 }, "end": { "line": 7, "column": 10 } }, "declarations": [ { "type": "VariableDeclarator", "start": 173, "end": 178, "loc": { "start": { "line": 7, "column": 4 }, "end": { "line": 7, "column": 9 } }, "id": { "type": "Identifier", "start": 173, "end": 178, "loc": { "start": { "line": 7, "column": 4 }, "end": { "line": 7, "column": 9 }, "identifierName": "cache" }, "name": "cache" }, "init": null } ], "kind": "let" }, { "type": "VariableDeclaration", "start": 180, "end": 198, "loc": { "start": { "line": 8, "column": 0 }, "end": { "line": 8, "column": 18 } }, "declarations": [ { "type": "VariableDeclarator", "start": 184, "end": 197, "loc": { "start": { "line": 8, "column": 4 }, "end": { "line": 8, "column": 17 } }, "id": { "type": "Identifier", "start": 184, "end": 192, "loc": { "start": { "line": 8, "column": 4 }, "end": { "line": 8, "column": 12 }, "identifierName": "warnings" }, "name": "warnings" }, "init": { "type": "ArrayExpression", "start": 195, "end": 197, "loc": { "start": { "line": 8, "column": 15 }, "end": { "line": 8, "column": 17 } }, "elements": [] } } ], "kind": "let" }, { "type": "VariableDeclaration", "start": 200, "end": 270, "loc": { "start": { "line": 10, "column": 0 }, "end": { "line": 10, "column": 70 } }, "declarations": [ { "type": "VariableDeclarator", "start": 206, "end": 269, "loc": { "start": { "line": 10, "column": 6 }, "end": { "line": 10, "column": 69 } }, "id": { "type": "Identifier", "start": 206, "end": 215, "loc": { "start": { "line": 10, "column": 6 }, "end": { "line": 10, "column": 15 }, "identifierName": "logWorker" }, "name": "logWorker" }, "init": { "type": "CallExpression", "start": 218, "end": 269, "loc": { "start": { "line": 10, "column": 18 }, "end": { "line": 10, "column": 69 } }, "callee": { "type": "Identifier", "start": 218, "end": 222, "loc": { "start": { "line": 10, "column": 18 }, "end": { "line": 10, "column": 22 }, "identifierName": "fork" }, "name": "fork" }, "arguments": [ { "type": "CallExpression", "start": 223, "end": 268, "loc": { "start": { "line": 10, "column": 23 }, "end": { "line": 10, "column": 68 } }, "callee": { "type": "MemberExpression", "start": 223, "end": 232, "loc": { "start": { "line": 10, "column": 23 }, "end": { "line": 10, "column": 32 } }, "object": { "type": "Identifier", "start": 223, "end": 227, "loc": { "start": { "line": 10, "column": 23 }, "end": { "line": 10, "column": 27 }, "identifierName": "path" }, "name": "path" }, "property": { "type": "Identifier", "start": 228, "end": 232, "loc": { "start": { "line": 10, "column": 28 }, "end": { "line": 10, "column": 32 }, "identifierName": "join" }, "name": "join" }, "computed": false }, "arguments": [ { "type": "Identifier", "start": 233, "end": 242, "loc": { "start": { "line": 10, "column": 33 }, "end": { "line": 10, "column": 42 }, "identifierName": "__dirname" }, "name": "__dirname" }, { "type": "StringLiteral", "start": 244, "end": 267, "loc": { "start": { "line": 10, "column": 44 }, "end": { "line": 10, "column": 67 } }, "extra": { "rawValue": "workers/log-worker.js", "raw": "'workers/log-worker.js'" }, "value": "workers/log-worker.js" } ] } ] } } ], "kind": "const" }, { "type": "FunctionDeclaration", "start": 272, "end": 681, "loc": { "start": { "line": 12, "column": 0 }, "end": { "line": 30, "column": 1 } }, "id": { "type": "Identifier", "start": 283, "end": 290, "loc": { "start": { "line": 12, "column": 11 }, "end": { "line": 12, "column": 18 }, "identifierName": "bundler" }, "name": "bundler" }, "generator": true, "expression": false, "async": false, "params": [ { "type": "Identifier", "start": 291, "end": 298, "loc": { "start": { "line": 12, "column": 19 }, "end": { "line": 12, "column": 26 }, "identifierName": "bundles" }, "name": "bundles" }, { "type": "Identifier", "start": 300, "end": 302, "loc": { "start": { "line": 12, "column": 28 }, "end": { "line": 12, "column": 30 }, "identifierName": "fn" }, "name": "fn" } ], "body": { "type": "BlockStatement", "start": 304, "end": 681, "loc": { "start": { "line": 12, "column": 32 }, "end": { "line": 30, "column": 1 } }, "body": [ { "type": "VariableDeclaration", "start": 308, "end": 321, "loc": { "start": { "line": 13, "column": 2 }, "end": { "line": 13, "column": 15 } }, "declarations": [ { "type": "VariableDeclarator", "start": 312, "end": 320, "loc": { "start": { "line": 13, "column": 6 }, "end": { "line": 13, "column": 14 } }, "id": { "type": "Identifier", "start": 312, "end": 315, "loc": { "start": { "line": 13, "column": 6 }, "end": { "line": 13, "column": 9 }, "identifierName": "fns" }, "name": "fns" }, "init": { "type": "ArrayExpression", "start": 318, "end": 320, "loc": { "start": { "line": 13, "column": 12 }, "end": { "line": 13, "column": 14 } }, "elements": [] } } ], "kind": "let" }, { "type": "ForOfStatement", "start": 324, "end": 473, "loc": { "start": { "line": 14, "column": 2 }, "end": { "line": 19, "column": 3 } }, "left": { "type": "VariableDeclaration", "start": 329, "end": 339, "loc": { "start": { "line": 14, "column": 7 }, "end": { "line": 14, "column": 17 } }, "declarations": [ { "type": "VariableDeclarator", "start": 333, "end": 339, "loc": { "start": { "line": 14, "column": 11 }, "end": { "line": 14, "column": 17 } }, "id": { "type": "Identifier", "start": 333, "end": 339, "loc": { "start": { "line": 14, "column": 11 }, "end": { "line": 14, "column": 17 }, "identifierName": "bundle" }, "name": "bundle" }, "init": null } ], "kind": "let" }, "right": { "type": "Identifier", "start": 343, "end": 350, "loc": { "start": { "line": 14, "column": 21 }, "end": { "line": 14, "column": 28 }, "identifierName": "bundles" }, "name": "bundles" }, "body": { "type": "BlockStatement", "start": 352, "end": 473, "loc": { "start": { "line": 14, "column": 30 }, "end": { "line": 19, "column": 3 } }, "body": [ { "type": "VariableDeclaration", "start": 358, "end": 381, "loc": { "start": { "line": 15, "column": 4 }, "end": { "line": 15, "column": 27 } }, "declarations": [ { "type": "VariableDeclarator", "start": 362, "end": 380, "loc": { "start": { "line": 15, "column": 8 }, "end": { "line": 15, "column": 26 } }, "id": { "type": "Identifier", "start": 362, "end": 366, "loc": { "start": { "line": 15, "column": 8 }, "end": { "line": 15, "column": 12 }, "identifierName": "dest" }, "name": "dest" }, "init": { "type": "MemberExpression", "start": 369, "end": 380, "loc": { "start": { "line": 15, "column": 15 }, "end": { "line": 15, "column": 26 } }, "object": { "type": "Identifier", "start": 369, "end": 375, "loc": { "start": { "line": 15, "column": 15 }, "end": { "line": 15, "column": 21 }, "identifierName": "bundle" }, "name": "bundle" }, "property": { "type": "Identifier", "start": 376, "end": 380, "loc": { "start": { "line": 15, "column": 22 }, "end": { "line": 15, "column": 26 }, "identifierName": "dest" }, "name": "dest" }, "computed": false } } ], "kind": "let" }, { "type": "ExpressionStatement", "start": 386, "end": 419, "loc": { "start": { "line": 16, "column": 4 }, "end": { "line": 16, "column": 37 } }, "expression": { "type": "AssignmentExpression", "start": 386, "end": 418, "loc": { "start": { "line": 16, "column": 4 }, "end": { "line": 16, "column": 36 } }, "operator": "=", "left": { "type": "Identifier", "start": 386, "end": 392, "loc": { "start": { "line": 16, "column": 4 }, "end": { "line": 16, "column": 10 }, "identifierName": "bundle" }, "name": "bundle" }, "right": { "type": "LogicalExpression", "start": 395, "end": 418, "loc": { "start": { "line": 16, "column": 13 }, "end": { "line": 16, "column": 36 } }, "left": { "type": "MemberExpression", "start": 395, "end": 408, "loc": { "start": { "line": 16, "column": 13 }, "end": { "line": 16, "column": 26 } }, "object": { "type": "Identifier", "start": 395, "end": 401, "loc": { "start": { "line": 16, "column": 13 }, "end": { "line": 16, "column": 19 }, "identifierName": "bundle" }, "name": "bundle" }, "property": { "type": "Identifier", "start": 402, "end": 408, "loc": { "start": { "line": 16, "column": 20 }, "end": { "line": 16, "column": 26 }, "identifierName": "bundle" }, "name": "bundle" }, "computed": false }, "operator": "||", "right": { "type": "Identifier", "start": 412, "end": 418, "loc": { "start": { "line": 16, "column": 30 }, "end": { "line": 16, "column": 36 }, "identifierName": "bundle" }, "name": "bundle" } } } }, { "type": "ExpressionStatement", "start": 424, "end": 443, "loc": { "start": { "line": 17, "column": 4 }, "end": { "line": 17, "column": 23 } }, "expression": { "type": "AssignmentExpression", "start": 424, "end": 442, "loc": { "start": { "line": 17, "column": 4 }, "end": { "line": 17, "column": 22 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 424, "end": 435, "loc": { "start": { "line": 17, "column": 4 }, "end": { "line": 17, "column": 15 } }, "object": { "type": "Identifier", "start": 424, "end": 430, "loc": { "start": { "line": 17, "column": 4 }, "end": { "line": 17, "column": 10 }, "identifierName": "bundle" }, "name": "bundle" }, "property": { "type": "Identifier", "start": 431, "end": 435, "loc": { "start": { "line": 17, "column": 11 }, "end": { "line": 17, "column": 15 }, "identifierName": "dest" }, "name": "dest" }, "computed": false }, "right": { "type": "Identifier", "start": 438, "end": 442, "loc": { "start": { "line": 17, "column": 18 }, "end": { "line": 17, "column": 22 }, "identifierName": "dest" }, "name": "dest" } } }, { "type": "ExpressionStatement", "start": 448, "end": 469, "loc": { "start": { "line": 18, "column": 4 }, "end": { "line": 18, "column": 25 } }, "expression": { "type": "CallExpression", "start": 448, "end": 468, "loc": { "start": { "line": 18, "column": 4 }, "end": { "line": 18, "column": 24 } }, "callee": { "type": "MemberExpression", "start": 448, "end": 456, "loc": { "start": { "line": 18, "column": 4 }, "end": { "line": 18, "column": 12 } }, "object": { "type": "Identifier", "start": 448, "end": 451, "loc": { "start": { "line": 18, "column": 4 }, "end": { "line": 18, "column": 7 }, "identifierName": "fns" }, "name": "fns" }, "property": { "type": "Identifier", "start": 452, "end": 456, "loc": { "start": { "line": 18, "column": 8 }, "end": { "line": 18, "column": 12 }, "identifierName": "push" }, "name": "push" }, "computed": false }, "arguments": [ { "type": "CallExpression", "start": 457, "end": 467, "loc": { "start": { "line": 18, "column": 13 }, "end": { "line": 18, "column": 23 } }, "callee": { "type": "Identifier", "start": 457, "end": 459, "loc": { "start": { "line": 18, "column": 13 }, "end": { "line": 18, "column": 15 }, "identifierName": "fn" }, "name": "fn" }, "arguments": [ { "type": "Identifier", "start": 460, "end": 466, "loc": { "start": { "line": 18, "column": 16 }, "end": { "line": 18, "column": 22 }, "identifierName": "bundle" }, "name": "bundle" } ] } ] } } ], "directives": [] } }, { "type": "ExpressionStatement", "start": 477, "end": 679, "loc": { "start": { "line": 21, "column": 2 }, "end": { "line": 29, "column": 5 } }, "expression": { "type": "YieldExpression", "start": 477, "end": 678, "loc": { "start": { "line": 21, "column": 2 }, "end": { "line": 29, "column": 4 } }, "delegate": false, "argument": { "type": "CallExpression", "start": 483, "end": 678, "loc": { "start": { "line": 21, "column": 8 }, "end": { "line": 29, "column": 4 } }, "callee": { "type": "MemberExpression", "start": 483, "end": 504, "loc": { "start": { "line": 21, "column": 8 }, "end": { "line": 21, "column": 29 } }, "object": { "type": "CallExpression", "start": 483, "end": 499, "loc": { "start": { "line": 21, "column": 8 }, "end": { "line": 21, "column": 24 } }, "callee": { "type": "MemberExpression", "start": 483, "end": 494, "loc": { "start": { "line": 21, "column": 8 }, "end": { "line": 21, "column": 19 } }, "object": { "type": "Identifier", "start": 483, "end": 490, "loc": { "start": { "line": 21, "column": 8 }, "end": { "line": 21, "column": 15 }, "identifierName": "Promise" }, "name": "Promise" }, "property": {