UNPKG

@xailabs/altx

Version:

Flux flavor based on alt.js

1,484 lines 263 kB
{ "type": "File", "start": 0, "end": 1332, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 42, "column": 0 } }, "program": { "type": "Program", "start": 0, "end": 1332, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 42, "column": 0 } }, "sourceType": "module", "body": [ { "type": "ImportDeclaration", "start": 0, "end": 42, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 42 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 7, "end": 16, "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 16 } }, "local": { "type": "Identifier", "start": 7, "end": 16, "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 16 }, "identifierName": "defensive" }, "name": "defensive" } } ], "source": { "type": "StringLiteral", "start": 22, "end": 41, "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 41 } }, "extra": { "rawValue": "./utils/defensive", "raw": "'./utils/defensive'" }, "value": "./utils/defensive" } }, { "type": "ImportDeclaration", "start": 46, "end": 115, "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 3, "column": 69 } }, "specifiers": [ { "type": "ImportSpecifier", "start": 54, "end": 69, "loc": { "start": { "line": 3, "column": 8 }, "end": { "line": 3, "column": 23 } }, "imported": { "type": "Identifier", "start": 54, "end": 69, "loc": { "start": { "line": 3, "column": 8 }, "end": { "line": 3, "column": 23 }, "identifierName": "validateCreator" }, "name": "validateCreator" }, "local": { "type": "Identifier", "start": 54, "end": 69, "loc": { "start": { "line": 3, "column": 8 }, "end": { "line": 3, "column": 23 }, "identifierName": "validateCreator" }, "name": "validateCreator" } }, { "type": "ImportSpecifier", "start": 71, "end": 89, "loc": { "start": { "line": 3, "column": 25 }, "end": { "line": 3, "column": 43 } }, "imported": { "type": "Identifier", "start": 71, "end": 89, "loc": { "start": { "line": 3, "column": 25 }, "end": { "line": 3, "column": 43 }, "identifierName": "validateDefinition" }, "name": "validateDefinition" }, "local": { "type": "Identifier", "start": 71, "end": 89, "loc": { "start": { "line": 3, "column": 25 }, "end": { "line": 3, "column": 43 }, "identifierName": "validateDefinition" }, "name": "validateDefinition" } } ], "source": { "type": "StringLiteral", "start": 96, "end": 114, "loc": { "start": { "line": 3, "column": 50 }, "end": { "line": 3, "column": 68 } }, "extra": { "rawValue": "./utils/validate", "raw": "'./utils/validate'" }, "value": "./utils/validate" } }, { "type": "ImportDeclaration", "start": 117, "end": 162, "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 4, "column": 45 } }, "specifiers": [ { "type": "ImportSpecifier", "start": 125, "end": 137, "loc": { "start": { "line": 4, "column": 8 }, "end": { "line": 4, "column": 20 } }, "imported": { "type": "Identifier", "start": 125, "end": 137, "loc": { "start": { "line": 4, "column": 8 }, "end": { "line": 4, "column": 20 }, "identifierName": "createLogger" }, "name": "createLogger" }, "local": { "type": "Identifier", "start": 125, "end": 137, "loc": { "start": { "line": 4, "column": 8 }, "end": { "line": 4, "column": 20 }, "identifierName": "createLogger" }, "name": "createLogger" } } ], "source": { "type": "StringLiteral", "start": 144, "end": 161, "loc": { "start": { "line": 4, "column": 27 }, "end": { "line": 4, "column": 44 } }, "extra": { "rawValue": "./utils/logging", "raw": "'./utils/logging'" }, "value": "./utils/logging" } }, { "type": "ImportDeclaration", "start": 164, "end": 208, "loc": { "start": { "line": 5, "column": 0 }, "end": { "line": 5, "column": 44 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 171, "end": 184, "loc": { "start": { "line": 5, "column": 7 }, "end": { "line": 5, "column": 20 } }, "local": { "type": "Identifier", "start": 171, "end": 184, "loc": { "start": { "line": 5, "column": 7 }, "end": { "line": 5, "column": 20 }, "identifierName": "createActions" }, "name": "createActions" } } ], "source": { "type": "StringLiteral", "start": 190, "end": 207, "loc": { "start": { "line": 5, "column": 26 }, "end": { "line": 5, "column": 43 } }, "extra": { "rawValue": "./createActions", "raw": "'./createActions'" }, "value": "./createActions" } }, { "type": "ExportDefaultDeclaration", "start": 212, "end": 1330, "loc": { "start": { "line": 7, "column": 0 }, "end": { "line": 41, "column": 1 } }, "declaration": { "type": "FunctionDeclaration", "start": 227, "end": 1330, "loc": { "start": { "line": 7, "column": 15 }, "end": { "line": 41, "column": 1 } }, "id": { "type": "Identifier", "start": 236, "end": 246, "loc": { "start": { "line": 7, "column": 24 }, "end": { "line": 7, "column": 34 }, "identifierName": "createCall" }, "name": "createCall" }, "generator": false, "expression": false, "async": false, "params": [ { "type": "Identifier", "start": 247, "end": 251, "loc": { "start": { "line": 7, "column": 35 }, "end": { "line": 7, "column": 39 }, "identifierName": "name" }, "name": "name" }, { "type": "AssignmentPattern", "start": 253, "end": 456, "loc": { "start": { "line": 7, "column": 41 }, "end": { "line": 12, "column": 4 } }, "left": { "type": "ObjectPattern", "start": 253, "end": 453, "loc": { "start": { "line": 7, "column": 41 }, "end": { "line": 12, "column": 1 } }, "properties": [ { "type": "ObjectProperty", "start": 260, "end": 278, "loc": { "start": { "line": 8, "column": 4 }, "end": { "line": 8, "column": 22 } }, "method": false, "shorthand": true, "computed": false, "key": { "type": "Identifier", "start": 260, "end": 269, "loc": { "start": { "line": 8, "column": 4 }, "end": { "line": 8, "column": 13 }, "identifierName": "namespace" }, "name": "namespace" }, "value": { "type": "AssignmentPattern", "start": 260, "end": 278, "loc": { "start": { "line": 8, "column": 4 }, "end": { "line": 8, "column": 22 } }, "left": { "type": "Identifier", "start": 260, "end": 269, "loc": { "start": { "line": 8, "column": 4 }, "end": { "line": 8, "column": 13 }, "identifierName": "namespace" }, "name": "namespace" }, "right": { "type": "StringLiteral", "start": 270, "end": 278, "loc": { "start": { "line": 8, "column": 14 }, "end": { "line": 8, "column": 22 } }, "extra": { "rawValue": "global", "raw": "'global'" }, "value": "global" } }, "extra": { "shorthand": true } }, { "type": "ObjectProperty", "start": 285, "end": 331, "loc": { "start": { "line": 9, "column": 4 }, "end": { "line": 9, "column": 50 } }, "method": false, "shorthand": true, "computed": false, "key": { "type": "Identifier", "start": 285, "end": 299, "loc": { "start": { "line": 9, "column": 4 }, "end": { "line": 9, "column": 18 }, "identifierName": "defaultActions" }, "name": "defaultActions" }, "value": { "type": "AssignmentPattern", "start": 285, "end": 331, "loc": { "start": { "line": 9, "column": 4 }, "end": { "line": 9, "column": 50 } }, "left": { "type": "Identifier", "start": 285, "end": 299, "loc": { "start": { "line": 9, "column": 4 }, "end": { "line": 9, "column": 18 }, "identifierName": "defaultActions" }, "name": "defaultActions" }, "right": { "type": "ArrayExpression", "start": 300, "end": 331, "loc": { "start": { "line": 9, "column": 19 }, "end": { "line": 9, "column": 50 } }, "elements": [ { "type": "StringLiteral", "start": 301, "end": 310, "loc": { "start": { "line": 9, "column": 20 }, "end": { "line": 9, "column": 29 } }, "extra": { "rawValue": "started", "raw": "'started'" }, "value": "started" }, { "type": "StringLiteral", "start": 312, "end": 319, "loc": { "start": { "line": 9, "column": 31 }, "end": { "line": 9, "column": 38 } }, "extra": { "rawValue": "error", "raw": "'error'" }, "value": "error" }, { "type": "StringLiteral", "start": 321, "end": 330, "loc": { "start": { "line": 9, "column": 40 }, "end": { "line": 9, "column": 49 } }, "extra": { "rawValue": "success", "raw": "'success'" }, "value": "success" } ] } }, "extra": { "shorthand": true } }, { "type": "ObjectProperty", "start": 338, "end": 399, "loc": { "start": { "line": 10, "column": 4 }, "end": { "line": 10, "column": 65 } }, "method": false, "shorthand": true, "computed": false, "key": { "type": "Identifier", "start": 338, "end": 345, "loc": { "start": { "line": 10, "column": 4 }, "end": { "line": 10, "column": 11 }, "identifierName": "actions" }, "name": "actions" }, "value": { "type": "AssignmentPattern", "start": 338, "end": 399, "loc": { "start": { "line": 10, "column": 4 }, "end": { "line": 10, "column": 65 } }, "left": { "type": "Identifier", "start": 338, "end": 345, "loc": { "start": { "line": 10, "column": 4 }, "end": { "line": 10, "column": 11 }, "identifierName": "actions" }, "name": "actions" }, "right": { "type": "CallExpression", "start": 346, "end": 399, "loc": { "start": { "line": 10, "column": 12 }, "end": { "line": 10, "column": 65 } }, "callee": { "type": "Identifier", "start": 346, "end": 359, "loc": { "start": { "line": 10, "column": 12 }, "end": { "line": 10, "column": 25 }, "identifierName": "createActions" }, "name": "createActions" }, "arguments": [ { "type": "TemplateLiteral", "start": 360, "end": 382, "loc": { "start": { "line": 10, "column": 26 }, "end": { "line": 10, "column": 48 } }, "expressions": [ { "type": "Identifier", "start": 363, "end": 372, "loc": { "start": { "line": 10, "column": 29 }, "end": { "line": 10, "column": 38 }, "identifierName": "namespace" }, "name": "namespace" }, { "type": "Identifier", "start": 376, "end": 380, "loc": { "start": { "line": 10, "column": 42 }, "end": { "line": 10, "column": 46 }, "identifierName": "name" }, "name": "name" } ], "quasis": [ { "type": "TemplateElement", "start": 361, "end": 361, "loc": { "start": { "line": 10, "column": 27 }, "end": { "line": 10, "column": 27 } }, "value": { "raw": "", "cooked": "" }, "tail": false }, { "type": "TemplateElement", "start": 373, "end": 374, "loc": { "start": { "line": 10, "column": 39 }, "end": { "line": 10, "column": 40 } }, "value": { "raw": ":", "cooked": ":" }, "tail": false }, { "type": "TemplateElement", "start": 381, "end": 381, "loc": { "start": { "line": 10, "column": 47 }, "end": { "line": 10, "column": 47 } }, "value": { "raw": "", "cooked": "" }, "tail": true } ] }, { "type": "Identifier", "start": 384, "end": 398, "loc": { "start": { "line": 10, "column": 50 }, "end": { "line": 10, "column": 64 }, "identifierName": "defaultActions" }, "name": "defaultActions" } ] } }, "extra": { "shorthand": true } }, { "type": "ObjectProperty", "start": 406, "end": 449, "loc": { "start": { "line": 11, "column": 4 }, "end": { "line": 11, "column": 47 } }, "method": false, "shorthand": true, "computed": false, "key": { "type": "Identifier", "start": 406, "end": 412, "loc": { "start": { "line": 11, "column": 4 }, "end": { "line": 11, "column": 10 }, "identifierName": "logger" }, "name": "logger" }, "value": { "type": "AssignmentPattern", "start": 406, "end": 449, "loc": { "start": { "line": 11, "column": 4 }, "end": { "line": 11, "column": 47 } }, "left": { "type": "Identifier", "start": 406, "end": 412, "loc": { "start": { "line": 11, "column": 4 }, "end": { "line": 11, "column": 10 }, "identifierName": "logger" }, "name": "logger" }, "right": { "type": "CallExpression", "start": 413, "end": 449, "loc": { "start": { "line": 11, "column": 11 }, "end": { "line": 11, "column": 47 } }, "callee": { "type": "Identifier", "start": 413, "end": 425, "loc": { "start": { "line": 11, "column": 11 }, "end": { "line": 11, "column": 23 }, "identifierName": "createLogger" }, "name": "createLogger" }, "arguments": [ { "type": "TemplateLiteral", "start": 426, "end": 448, "loc": { "start": { "line": 11, "column": 24 }, "end": { "line": 11, "column": 46 } }, "expressions": [ { "type": "Identifier", "start": 429, "end": 438, "loc": { "start": { "line": 11, "column": 27 }, "end": { "line": 11, "column": 36 }, "identifierName": "namespace" }, "name": "namespace" }, { "type": "Identifier", "start": 442, "end": 446, "loc": { "start": { "line": 11, "column": 40 }, "end": { "line": 11, "column": 44 }, "identifierName": "name" }, "name": "name" } ], "quasis": [ { "type": "TemplateElement", "start": 427, "end": 427, "loc": { "start": { "line": 11, "column": 25 }, "end": { "line": 11, "column": 25 } }, "value": { "raw": "", "cooked": "" }, "tail": false }, { "type": "TemplateElement", "start": 439, "end": 440, "loc": { "start": { "line": 11, "column": 37 }, "end": { "line": 11, "column": 38 } }, "value": { "raw": ":", "cooked": ":" }, "tail": false }, { "type": "TemplateElement", "start": 447, "end": 447, "loc": { "start": { "line": 11, "column": 45 }, "end": { "line": 11, "column": 45 } }, "value": { "raw": "", "cooked": "" }, "tail": true } ] } ] } }, "extra": { "shorthand": true } } ] }, "right": { "type": "ObjectExpression", "start": 454, "end": 456, "loc": { "start": { "line": 12, "column": 2 }, "end": { "line": 12, "column": 4 } }, "properties": [] } } ], "body": { "type": "BlockStatement", "start": 458, "end": 1330, "loc": { "start": { "line": 12, "column": 6 }, "end": { "line": 41, "column": 1 } }, "body": [ { "type": "IfStatement", "start": 467, "end": 571, "loc": { "start": { "line": 14, "column": 4 }, "end": { "line": 16, "column": 5 } }, "test": { "type": "CallExpression", "start": 471, "end": 519, "loc": { "start": { "line": 14, "column": 8 }, "end": { "line": 14, "column": 56 } }, "callee": { "type": "Identifier", "start": 471, "end": 486, "loc": { "start": { "line": 14, "column": 8 }, "end": { "line": 14, "column": 23 }, "identifierName": "validateCreator" }, "name": "validateCreator" }, "arguments": [ { "type": "ObjectExpression", "start": 487, "end": 510, "loc": { "start": { "line": 14, "column": 24 }, "end": { "line": 14, "column": 47 } }, "properties": [ { "type": "ObjectProperty", "start": 488, "end": 492, "loc": { "start": { "line": 14, "column": 25 }, "end": { "line": 14, "column": 29 } }, "method": false, "shorthand": true, "computed": false, "key": { "type": "Identifier", "start": 488, "end": 492, "loc": { "start": { "line": 14, "column": 25 }, "end": { "line": 14, "column": 29 }, "identifierName": "name" }, "name": "name" }, "value": { "type": "Identifier", "start": 488, "end": 492, "loc": { "start": { "line": 14, "column": 25 }, "end": { "line": 14, "column": 29 }, "identifierName": "name" }, "name": "name" }, "extra": { "shorthand": true } }, { "type": "ObjectProperty", "start": 494, "end": 501, "loc": { "start": { "line": 14, "column": 31 }, "end": { "line": 14, "column": 38 } }, "method": false, "shorthand": true, "computed": false, "key": { "type": "Identifier", "start": 494, "end": 501, "loc": { "start": { "line": 14, "column": 31 }, "end": { "line": 14, "column": 38 }, "identifierName": "actions" }, "name": "actions" }, "value": { "type": "Identifier", "start": 494, "end": 501, "loc": { "start": { "line": 14, "column": 31 }, "end": { "line": 14, "column": 38 }, "identifierName": "actions" }, "name": "actions" }, "extra": { "shorthand": true } }, { "type": "ObjectProperty", "start": 503, "end": 509, "loc": { "start": { "line": 14, "column": 40 }, "end": { "line": 14, "column": 46 } }, "method": false, "shorthand": true, "computed": false, "key": { "type": "Identifier", "start": 503, "end": 509, "loc": { "start": { "line": 14, "column": 40 }, "end": { "line": 14, "column": 46 }, "identifierName": "logger" }, "name": "logger" }, "value": { "type": "Identifier", "start": 503, "end": 509, "loc": { "start": { "line": 14, "column": 40 }, "end": { "line": 14, "column": 46 }, "identifierName": "logger" }, "name": "logger" }, "extra": { "shorthand": true } } ] }, { "type": "Identifier", "start": 512, "end": 518, "loc": { "start": { "line": 14, "column": 49 }, "end": { "line": 14, "column": 55 }, "identifierName": "logger" }, "name": "logger" } ] }, "consequent": { "type": "BlockStatement", "start": 521, "end": 571, "loc": { "start": { "line": 14, "column": 58 }, "end": { "line": 16, "column": 5 } }, "body": [ { "type": "ThrowStatement", "start": 532, "end": 564, "loc": { "start": { "line": 15, "column": 8 }, "end": { "line": 15, "column": 40 } }, "argument": {