UNPKG

roc

Version:

Build modern web applications easily

1,936 lines 250 kB
{ "type": "Program", "start": 0, "end": 4275, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 111, "column": 0 } }, "sourceType": "module", "body": [ { "type": "ImportDeclaration", "start": 0, "end": 37, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 37 } }, "specifiers": [], "source": { "type": "Literal", "start": 7, "end": 36, "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 36 } }, "value": "source-map-support/register", "rawValue": "source-map-support/register", "raw": "'source-map-support/register'" } }, { "type": "ImportDeclaration", "start": 39, "end": 71, "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 3, "column": 32 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 46, "end": 54, "loc": { "start": { "line": 3, "column": 7 }, "end": { "line": 3, "column": 15 } }, "local": { "type": "Identifier", "start": 46, "end": 54, "loc": { "start": { "line": 3, "column": 7 }, "end": { "line": 3, "column": 15 } }, "name": "minimist" } } ], "importKind": "value", "source": { "type": "Literal", "start": 60, "end": 70, "loc": { "start": { "line": 3, "column": 21 }, "end": { "line": 3, "column": 31 } }, "value": "minimist", "rawValue": "minimist", "raw": "'minimist'" } }, { "type": "ImportDeclaration", "start": 72, "end": 106, "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 4, "column": 34 } }, "specifiers": [ { "type": "ImportSpecifier", "start": 81, "end": 89, "loc": { "start": { "line": 4, "column": 9 }, "end": { "line": 4, "column": 17 } }, "imported": { "type": "Identifier", "start": 81, "end": 89, "loc": { "start": { "line": 4, "column": 9 }, "end": { "line": 4, "column": 17 } }, "name": "isString" }, "local": { "type": "Identifier", "start": 81, "end": 89, "loc": { "start": { "line": 4, "column": 9 }, "end": { "line": 4, "column": 17 } }, "name": "isString" } } ], "importKind": "value", "source": { "type": "Literal", "start": 97, "end": 105, "loc": { "start": { "line": 4, "column": 25 }, "end": { "line": 4, "column": 33 } }, "value": "lodash", "rawValue": "lodash", "raw": "'lodash'" } }, { "type": "ImportDeclaration", "start": 108, "end": 144, "loc": { "start": { "line": 6, "column": 0 }, "end": { "line": 6, "column": 36 } }, "specifiers": [ { "type": "ImportSpecifier", "start": 117, "end": 124, "loc": { "start": { "line": 6, "column": 9 }, "end": { "line": 6, "column": 16 } }, "imported": { "type": "Identifier", "start": 117, "end": 124, "loc": { "start": { "line": 6, "column": 9 }, "end": { "line": 6, "column": 16 } }, "name": "execute" }, "local": { "type": "Identifier", "start": 117, "end": 124, "loc": { "start": { "line": 6, "column": 9 }, "end": { "line": 6, "column": 16 } }, "name": "execute" } } ], "importKind": "value", "source": { "type": "Literal", "start": 132, "end": 143, "loc": { "start": { "line": 6, "column": 24 }, "end": { "line": 6, "column": 35 } }, "value": "./execute", "rawValue": "./execute", "raw": "'./execute'" } }, { "type": "ImportDeclaration", "start": 145, "end": 190, "loc": { "start": { "line": 7, "column": 0 }, "end": { "line": 7, "column": 45 } }, "specifiers": [ { "type": "ImportSpecifier", "start": 154, "end": 169, "loc": { "start": { "line": 7, "column": 9 }, "end": { "line": 7, "column": 24 } }, "imported": { "type": "Identifier", "start": 154, "end": 169, "loc": { "start": { "line": 7, "column": 9 }, "end": { "line": 7, "column": 24 } }, "name": "getAbsolutePath" }, "local": { "type": "Identifier", "start": 154, "end": 169, "loc": { "start": { "line": 7, "column": 9 }, "end": { "line": 7, "column": 24 } }, "name": "getAbsolutePath" } } ], "importKind": "value", "source": { "type": "Literal", "start": 177, "end": 189, "loc": { "start": { "line": 7, "column": 32 }, "end": { "line": 7, "column": 44 } }, "value": "../helpers", "rawValue": "../helpers", "raw": "'../helpers'" } }, { "type": "ImportDeclaration", "start": 191, "end": 232, "loc": { "start": { "line": 8, "column": 0 }, "end": { "line": 8, "column": 41 } }, "specifiers": [ { "type": "ImportSpecifier", "start": 200, "end": 208, "loc": { "start": { "line": 8, "column": 9 }, "end": { "line": 8, "column": 17 } }, "imported": { "type": "Identifier", "start": 200, "end": 208, "loc": { "start": { "line": 8, "column": 9 }, "end": { "line": 8, "column": 17 } }, "name": "validate" }, "local": { "type": "Identifier", "start": 200, "end": 208, "loc": { "start": { "line": 8, "column": 9 }, "end": { "line": 8, "column": 17 } }, "name": "validate" } } ], "importKind": "value", "source": { "type": "Literal", "start": 216, "end": 231, "loc": { "start": { "line": 8, "column": 25 }, "end": { "line": 8, "column": 40 } }, "value": "../validation", "rawValue": "../validation", "raw": "'../validation'" } }, { "type": "ImportDeclaration", "start": 233, "end": 288, "loc": { "start": { "line": 9, "column": 0 }, "end": { "line": 9, "column": 55 } }, "specifiers": [ { "type": "ImportSpecifier", "start": 242, "end": 247, "loc": { "start": { "line": 9, "column": 9 }, "end": { "line": 9, "column": 14 } }, "imported": { "type": "Identifier", "start": 242, "end": 247, "loc": { "start": { "line": 9, "column": 9 }, "end": { "line": 9, "column": 14 } }, "name": "merge" }, "local": { "type": "Identifier", "start": 242, "end": 247, "loc": { "start": { "line": 9, "column": 9 }, "end": { "line": 9, "column": 14 } }, "name": "merge" } }, { "type": "ImportSpecifier", "start": 249, "end": 261, "loc": { "start": { "line": 9, "column": 16 }, "end": { "line": 9, "column": 28 } }, "imported": { "type": "Identifier", "start": 249, "end": 261, "loc": { "start": { "line": 9, "column": 16 }, "end": { "line": 9, "column": 28 } }, "name": "appendConfig" }, "local": { "type": "Identifier", "start": 249, "end": 261, "loc": { "start": { "line": 9, "column": 16 }, "end": { "line": 9, "column": 28 } }, "name": "appendConfig" } } ], "importKind": "value", "source": { "type": "Literal", "start": 269, "end": 287, "loc": { "start": { "line": 9, "column": 36 }, "end": { "line": 9, "column": 54 } }, "value": "../configuration", "rawValue": "../configuration", "raw": "'../configuration'" } }, { "type": "ImportDeclaration", "start": 289, "end": 372, "loc": { "start": { "line": 10, "column": 0 }, "end": { "line": 10, "column": 83 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 296, "end": 320, "loc": { "start": { "line": 10, "column": 7 }, "end": { "line": 10, "column": 31 } }, "local": { "type": "Identifier", "start": 296, "end": 320, "loc": { "start": { "line": 10, "column": 7 }, "end": { "line": 10, "column": 31 } }, "name": "buildDocumentationObject" } } ], "importKind": "value", "source": { "type": "Literal", "start": 326, "end": 371, "loc": { "start": { "line": 10, "column": 37 }, "end": { "line": 10, "column": 82 } }, "value": "../documentation/build-documentation-object", "rawValue": "../documentation/build-documentation-object", "raw": "'../documentation/build-documentation-object'" } }, { "type": "ImportDeclaration", "start": 373, "end": 437, "loc": { "start": { "line": 11, "column": 0 }, "end": { "line": 11, "column": 64 } }, "specifiers": [ { "type": "ImportSpecifier", "start": 382, "end": 402, "loc": { "start": { "line": 11, "column": 9 }, "end": { "line": 11, "column": 29 } }, "imported": { "type": "Identifier", "start": 382, "end": 402, "loc": { "start": { "line": 11, "column": 9 }, "end": { "line": 11, "column": 29 } }, "name": "getApplicationConfig" }, "local": { "type": "Identifier", "start": 382, "end": 402, "loc": { "start": { "line": 11, "column": 9 }, "end": { "line": 11, "column": 29 } }, "name": "getApplicationConfig" } } ], "importKind": "value", "source": { "type": "Literal", "start": 410, "end": 436, "loc": { "start": { "line": 11, "column": 37 }, "end": { "line": 11, "column": 63 } }, "value": "../configuration/helpers", "rawValue": "../configuration/helpers", "raw": "'../configuration/helpers'" } }, { "type": "ImportDeclaration", "start": 438, "end": 634, "loc": { "start": { "line": 12, "column": 0 }, "end": { "line": 20, "column": 19 } }, "specifiers": [ { "type": "ImportSpecifier", "start": 451, "end": 470, "loc": { "start": { "line": 13, "column": 4 }, "end": { "line": 13, "column": 23 } }, "imported": { "type": "Identifier", "start": 451, "end": 470, "loc": { "start": { "line": 13, "column": 4 }, "end": { "line": 13, "column": 23 } }, "name": "buildCompleteConfig" }, "local": { "type": "Identifier", "start": 451, "end": 470, "loc": { "start": { "line": 13, "column": 4 }, "end": { "line": 13, "column": 23 } }, "name": "buildCompleteConfig" } }, { "type": "ImportSpecifier", "start": 476, "end": 505, "loc": { "start": { "line": 14, "column": 4 }, "end": { "line": 14, "column": 33 } }, "imported": { "type": "Identifier", "start": 476, "end": 505, "loc": { "start": { "line": 14, "column": 4 }, "end": { "line": 14, "column": 33 } }, "name": "generateCommandsDocumentation" }, "local": { "type": "Identifier", "start": 476, "end": 505, "loc": { "start": { "line": 14, "column": 4 }, "end": { "line": 14, "column": 33 } }, "name": "generateCommandsDocumentation" } }, { "type": "ImportSpecifier", "start": 511, "end": 539, "loc": { "start": { "line": 15, "column": 4 }, "end": { "line": 15, "column": 32 } }, "imported": { "type": "Identifier", "start": 511, "end": 539, "loc": { "start": { "line": 15, "column": 4 }, "end": { "line": 15, "column": 32 } }, "name": "generateCommandDocumentation" }, "local": { "type": "Identifier", "start": 511, "end": 539, "loc": { "start": { "line": 15, "column": 4 }, "end": { "line": 15, "column": 32 } }, "name": "generateCommandDocumentation" } }, { "type": "ImportSpecifier", "start": 545, "end": 557, "loc": { "start": { "line": 16, "column": 4 }, "end": { "line": 16, "column": 16 } }, "imported": { "type": "Identifier", "start": 545, "end": 557, "loc": { "start": { "line": 16, "column": 4 }, "end": { "line": 16, "column": 16 } }, "name": "parseOptions" }, "local": { "type": "Identifier", "start": 545, "end": 557, "loc": { "start": { "line": 16, "column": 4 }, "end": { "line": 16, "column": 16 } }, "name": "parseOptions" } }, { "type": "ImportSpecifier", "start": 563, "end": 574, "loc": { "start": { "line": 17, "column": 4 }, "end": { "line": 17, "column": 15 } }, "imported": { "type": "Identifier", "start": 563, "end": 574, "loc": { "start": { "line": 17, "column": 4 }, "end": { "line": 17, "column": 15 } }, "name": "getMappings" }, "local": { "type": "Identifier", "start": 563, "end": 574, "loc": { "start": { "line": 17, "column": 4 }, "end": { "line": 17, "column": 15 } }, "name": "getMappings" } }, { "type": "ImportSpecifier", "start": 580, "end": 594, "loc": { "start": { "line": 18, "column": 4 }, "end": { "line": 18, "column": 18 } }, "imported": { "type": "Identifier", "start": 580, "end": 594, "loc": { "start": { "line": 18, "column": 4 }, "end": { "line": 18, "column": 18 } }, "name": "parseArguments" }, "local": { "type": "Identifier", "start": 580, "end": 594, "loc": { "start": { "line": 18, "column": 4 }, "end": { "line": 18, "column": 18 } }, "name": "parseArguments" } }, { "type": "ImportSpecifier", "start": 600, "end": 614, "loc": { "start": { "line": 19, "column": 4 }, "end": { "line": 19, "column": 18 } }, "imported": { "type": "Identifier", "start": 600, "end": 614, "loc": { "start": { "line": 19, "column": 4 }, "end": { "line": 19, "column": 18 } }, "name": "getSuggestions" }, "local": { "type": "Identifier", "start": 600, "end": 614, "loc": { "start": { "line": 19, "column": 4 }, "end": { "line": 19, "column": 18 } }, "name": "getSuggestions" } } ], "importKind": "value", "source": { "type": "Literal", "start": 622, "end": 633, "loc": { "start": { "line": 20, "column": 7 }, "end": { "line": 20, "column": 18 } }, "value": "./helpers", "rawValue": "./helpers", "raw": "'./helpers'" } }, { "type": "ImportDeclaration", "start": 635, "end": 690, "loc": { "start": { "line": 21, "column": 0 }, "end": { "line": 21, "column": 55 } }, "specifiers": [ { "type": "ImportSpecifier", "start": 644, "end": 663, "loc": { "start": { "line": 21, "column": 9 }, "end": { "line": 21, "column": 28 } }, "imported": { "type": "Identifier", "start": 644, "end": 649, "loc": { "start": { "line": 21, "column": 9 }, "end": { "line": 21, "column": 14 } }, "name": "error" }, "local": { "type": "Identifier", "start": 653, "end": 663, "loc": { "start": { "line": 21, "column": 18 }, "end": { "line": 21, "column": 28 } }, "name": "styleError" } } ], "importKind": "value", "source": { "type": "Literal", "start": 671, "end": 689, "loc": { "start": { "line": 21, "column": 36 }, "end": { "line": 21, "column": 54 } }, "value": "../helpers/style", "rawValue": "../helpers/style", "raw": "'../helpers/style'" }, "trailingComments": [ { "type": "Block", "value": "*\n * Invokes the Roc cli.\n *\n * @param {{version: string, name: string}} info - Information about the cli.\n * @param {rocConfig} initalConfig - The inital configuration, will be merged with the selected extensions and\n * application.\n * @param {rocMetaConfig} initalMeta - The inital meta configuration, will be merged with the selected extensions.\n * @param {string[]} [args=process.argv] - From where it should parse the arguments.\n *\n * @returns {undefined}\n ", "start": 692, "end": 1159, "loc": { "start": { "line": 23, "column": 0 }, "end": { "line": 33, "column": 3 } }, "range": [ 692, 1159 ] } ] }, { "type": "ExportNamedDeclaration", "start": 1160, "end": 4274, "loc": { "start": { "line": 34, "column": 0 }, "end": { "line": 110, "column": 1 } }, "declaration": { "type": "FunctionDeclaration", "start": 1167, "end": 4274, "loc": { "start": { "line": 34, "column": 7 }, "end": { "line": 110, "column": 1 } }, "id": { "type": "Identifier", "start": 1176, "end": 1182, "loc": { "start": { "line": 34, "column": 16 }, "end": { "line": 34, "column": 22 } }, "name": "runCli", "leadingComments": null }, "generator": false, "expression": false, "async": false, "params": [ { "type": "AssignmentPattern", "start": 1183, "end": 1227, "loc": { "start": { "line": 34, "column": 23 }, "end": { "line": 34, "column": 67 } }, "operator": "=", "left": { "type": "Identifier", "start": 1183, "end": 1187, "loc": { "start": { "line": 34, "column": 23 }, "end": { "line": 34, "column": 27 } }, "name": "info" }, "right": { "type": "ObjectExpression", "start": 1190, "end": 1227, "loc": { "start": { "line": 34, "column": 30 }, "end": { "line": 34, "column": 67 } }, "properties": [ { "type": "Property", "start": 1191, "end": 1209, "loc": { "start": { "line": 34, "column": 31 }, "end": { "line": 34, "column": 49 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 1191, "end": 1198, "loc": { "start": { "line": 34, "column": 31 }, "end": { "line": 34, "column": 38 } }, "name": "version" }, "value": { "type": "Literal", "start": 1200, "end": 1209, "loc": { "start": { "line": 34, "column": 40 }, "end": { "line": 34, "column": 49 } }, "value": "Unknown", "rawValue": "Unknown", "raw": "'Unknown'" }, "kind": "init" }, { "type": "Property", "start": 1211, "end": 1226, "loc": { "start": { "line": 34, "column": 51 }, "end": { "line": 34, "column": 66 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 1211, "end": 1215, "loc": { "start": { "line": 34, "column": 51 }, "end": { "line": 34, "column": 55 } }, "name": "name" }, "value": { "type": "Literal", "start": 1217, "end": 1226, "loc": { "start": { "line": 34, "column": 57 }, "end": { "line": 34, "column": 66 } }, "value": "Unknown", "rawValue": "Unknown", "raw": "'Unknown'" }, "kind": "init" } ] } }, { "type": "Identifier", "start": 1229, "end": 1241, "loc": { "start": { "line": 34, "column": 69 }, "end": { "line": 34, "column": 81 } }, "name": "initalConfig" }, { "type": "Identifier", "start": 1243, "end": 1253, "loc": { "start": { "line": 34, "column": 83 }, "end": { "line": 34, "column": 93 } }, "name": "initalMeta" }, { "type": "AssignmentPattern", "start": 1255, "end": 1274, "loc": { "start": { "line": 34, "column": 95 }, "end": { "line": 34, "column": 114 } }, "operator": "=", "left": { "type": "Identifier", "start": 1255, "end": 1259, "loc": { "start": { "line": 34, "column": 95 }, "end": { "line": 34, "column": 99 } }, "name": "args" }, "right": { "type": "MemberExpression", "start": 1262, "end": 1274, "loc": { "start": { "line": 34, "column": 102 }, "end": { "line": 34, "column": 114 } }, "object": { "type": "Identifier", "start": 1262, "end": 1269, "loc": { "start": { "line": 34, "column": 102 }, "end": { "line": 34, "column": 109 } }, "name": "process" }, "property": { "type": "Identifier", "start": 1270, "end": 1274, "loc": { "start": { "line": 34, "column": 110 }, "end": { "line": 34, "column": 114 } }, "name": "argv" }, "computed": false } } ], "body": { "type": "BlockStatement", "start": 1276, "end": 4274, "loc": { "start": { "line": 34, "column": 116 }, "end": { "line": 110, "column": 1 } }, "body": [ { "type": "VariableDeclaration", "start": 1282, "end": 1387, "loc": { "start": { "line": 35, "column": 4 }, "end": { "line": 35, "column": 109 } }, "declarations": [ { "type": "VariableDeclarator", "start": 1288, "end": 1386, "loc": { "start": { "line": 35, "column": 10 }, "end": { "line": 35, "column": 108 } }, "id": { "type": "ObjectPattern", "start": 1288, "end": 1360, "loc": { "start": { "line": 35, "column": 10 }, "end": { "line": 35, "column": 82 } }, "properties": [ { "type": "Property", "start": 1289, "end": 1290, "loc": { "start": { "line": 35, "column": 11 }, "end": { "line": 35, "column": 12 } }, "method": false, "shorthand": true, "computed": false, "key": { "type": "Identifier", "start": 1289, "end": 1290, "loc": { "start": { "line": 35, "column": 11 }, "end": { "line": 35, "column": 12 } }, "name": "_" }, "kind": "init", "value": { "type": "Identifier", "start": 1289, "end": 1290, "loc": { "start": { "line": 35, "column": 11 }, "end": { "line": 35, "column": 12 } }, "name": "_" } }, { "type": "Property", "start": 1292, "end": 1293, "loc": { "start": { "line": 35, "column": 14 }, "end": { "line": 35, "column": 15 } }, "method": false, "shorthand": true, "computed": false, "key": { "type": "Identifier", "start": 1292, "end": 1293, "loc": { "start": { "line": 35, "column": 14 }, "end": { "line": 35, "column": 15 } }, "name": "h" }, "kind": "init", "value": { "type": "Identifier", "start": 1292, "end": 1293, "loc": { "start": { "line": 35, "column": 14 }, "end": { "line": 35, "column": 15 } }, "name": "h" } }, { "type": "Property", "start": 1295, "end": 1299, "loc": { "start": { "line": 35, "column": 17 }, "end": { "line": 35, "column": 21 } }, "method": false, "shorthand": true, "computed": false, "key": { "type": "Identifier", "start": 1295, "end": 1299, "loc": { "start": { "line": 35, "column": 17 }, "end": { "line": 35, "column": 21 } }, "name": "help" }, "kind": "init", "value": { "type": "Identifier", "start": 1295, "end": 1299, "loc": { "start": { "line": 35, "column": 17 }, "end": { "line": 35, "column": 21 } }, "name": "help" } }, { "type": "Property", "start": 1301, "end": 1302, "loc": { "start": { "line": 35, "column": 23 }, "end": { "line": 35, "column": 24 } }, "method": false, "shorthand": true, "computed": false, "key": { "type": "Identifier", "start": 1301, "end": 1302, "loc": { "start": { "line": 35, "column": 23 }, "end": { "line": 35, "column": 24 } }, "name": "d" }, "kind": "init", "value": { "type": "Identifier", "start": 1301, "end": 1302, "loc": { "start": { "line": 35, "column": 23 }, "end": { "line": 35, "column": 24 } }, "name": "d" } }, { "type": "Property", "start": 1304, "end": 1309, "loc": { "start": { "line": 35, "column": 26 }, "end": { "line": 35, "column": 31 } }, "method": false, "shorthand": true, "computed": false, "key": { "type": "Identifier", "start": 1304, "end": 1309, "loc": { "start": { "line": 35, "column": 26 }, "end": { "line": 35, "column": 31 } }, "name": "debug" }, "kind": "init", "value": { "type": "Identifier", "start": 1304, "end": 1309, "loc": { "start": { "line": 35, "column": 26 }, "end": { "line": 35, "column": 31 } }, "name": "debug" } }, { "type": "Property", "start": 1311, "end": 1312, "loc": { "start": { "line": 35, "column": 33 }, "end": { "line": 35, "column": 34 } }, "method": false, "shorthand": true, "computed": false, "key": { "type": "Identifier", "start": 1311, "end": 1312, "loc": { "start": { "line": 35, "column": 33 }, "end": { "line": 35, "column": 34 } }, "name": "v" }, "kind": "init", "value": { "type": "Identifier", "start": 1311, "end": 1312, "loc": { "start": { "line": 35, "column": 33 }, "end": { "line": 35, "column": 34 } }, "name": "v" } }, { "type": "Property", "start": 1314, "end": 1321, "loc": { "start": { "line": 35, "column": 36 }, "end": { "line": 35, "column": 43 } }, "method": false, "shorthand": true, "computed": false, "key": { "type": "Identifier", "start": 1314, "end": 1321, "loc": { "start": { "line": 35, "column": 36 }, "end": { "line": 35, "column": 43 } }, "name": "version" }, "kind": "init", "value": { "type": "Identifier", "start": 1314, "end": 1321, "loc": { "start": { "line": 35, "column": 36 }, "end": { "line": 35, "column": 43 } }, "name": "version" } }, { "type": "Property", "start": 1323, "end"