UNPKG

@xailabs/altx

Version:

Flux flavor based on alt.js

1,483 lines (1,482 loc) 285 kB
{ "type": "File", "start": 0, "end": 1544, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 43, "column": 0 } }, "program": { "type": "Program", "start": 0, "end": 1544, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 43, "column": 0 } }, "sourceType": "module", "body": [ { "type": "ImportDeclaration", "start": 0, "end": 69, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 69 } }, "specifiers": [ { "type": "ImportSpecifier", "start": 8, "end": 23, "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 23 } }, "imported": { "type": "Identifier", "start": 8, "end": 23, "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 23 }, "identifierName": "validateCreator" }, "name": "validateCreator" }, "local": { "type": "Identifier", "start": 8, "end": 23, "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 23 }, "identifierName": "validateCreator" }, "name": "validateCreator" } }, { "type": "ImportSpecifier", "start": 25, "end": 43, "loc": { "start": { "line": 1, "column": 25 }, "end": { "line": 1, "column": 43 } }, "imported": { "type": "Identifier", "start": 25, "end": 43, "loc": { "start": { "line": 1, "column": 25 }, "end": { "line": 1, "column": 43 }, "identifierName": "validateDefinition" }, "name": "validateDefinition" }, "local": { "type": "Identifier", "start": 25, "end": 43, "loc": { "start": { "line": 1, "column": 25 }, "end": { "line": 1, "column": 43 }, "identifierName": "validateDefinition" }, "name": "validateDefinition" } } ], "source": { "type": "StringLiteral", "start": 50, "end": 68, "loc": { "start": { "line": 1, "column": 50 }, "end": { "line": 1, "column": 68 } }, "extra": { "rawValue": "./utils/validate", "raw": "'./utils/validate'" }, "value": "./utils/validate" } }, { "type": "ImportDeclaration", "start": 71, "end": 116, "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 2, "column": 45 } }, "specifiers": [ { "type": "ImportSpecifier", "start": 79, "end": 91, "loc": { "start": { "line": 2, "column": 8 }, "end": { "line": 2, "column": 20 } }, "imported": { "type": "Identifier", "start": 79, "end": 91, "loc": { "start": { "line": 2, "column": 8 }, "end": { "line": 2, "column": 20 }, "identifierName": "createLogger" }, "name": "createLogger" }, "local": { "type": "Identifier", "start": 79, "end": 91, "loc": { "start": { "line": 2, "column": 8 }, "end": { "line": 2, "column": 20 }, "identifierName": "createLogger" }, "name": "createLogger" } } ], "source": { "type": "StringLiteral", "start": 98, "end": 115, "loc": { "start": { "line": 2, "column": 27 }, "end": { "line": 2, "column": 44 } }, "extra": { "rawValue": "./utils/logging", "raw": "'./utils/logging'" }, "value": "./utils/logging" } }, { "type": "ImportDeclaration", "start": 118, "end": 162, "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 3, "column": 44 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 125, "end": 138, "loc": { "start": { "line": 3, "column": 7 }, "end": { "line": 3, "column": 20 } }, "local": { "type": "Identifier", "start": 125, "end": 138, "loc": { "start": { "line": 3, "column": 7 }, "end": { "line": 3, "column": 20 }, "identifierName": "createActions" }, "name": "createActions" } } ], "source": { "type": "StringLiteral", "start": 144, "end": 161, "loc": { "start": { "line": 3, "column": 26 }, "end": { "line": 3, "column": 43 } }, "extra": { "rawValue": "./createActions", "raw": "'./createActions'" }, "value": "./createActions" } }, { "type": "ExportDefaultDeclaration", "start": 166, "end": 1542, "loc": { "start": { "line": 5, "column": 0 }, "end": { "line": 42, "column": 1 } }, "declaration": { "type": "FunctionDeclaration", "start": 181, "end": 1542, "loc": { "start": { "line": 5, "column": 15 }, "end": { "line": 42, "column": 1 } }, "id": { "type": "Identifier", "start": 190, "end": 201, "loc": { "start": { "line": 5, "column": 24 }, "end": { "line": 5, "column": 35 }, "identifierName": "callFactory" }, "name": "callFactory" }, "generator": false, "expression": false, "async": false, "params": [ { "type": "Identifier", "start": 202, "end": 206, "loc": { "start": { "line": 5, "column": 36 }, "end": { "line": 5, "column": 40 }, "identifierName": "name" }, "name": "name" }, { "type": "AssignmentPattern", "start": 208, "end": 411, "loc": { "start": { "line": 5, "column": 42 }, "end": { "line": 10, "column": 4 } }, "left": { "type": "ObjectPattern", "start": 208, "end": 408, "loc": { "start": { "line": 5, "column": 42 }, "end": { "line": 10, "column": 1 } }, "properties": [ { "type": "ObjectProperty", "start": 215, "end": 233, "loc": { "start": { "line": 6, "column": 4 }, "end": { "line": 6, "column": 22 } }, "method": false, "shorthand": true, "computed": false, "key": { "type": "Identifier", "start": 215, "end": 224, "loc": { "start": { "line": 6, "column": 4 }, "end": { "line": 6, "column": 13 }, "identifierName": "namespace" }, "name": "namespace" }, "value": { "type": "AssignmentPattern", "start": 215, "end": 233, "loc": { "start": { "line": 6, "column": 4 }, "end": { "line": 6, "column": 22 } }, "left": { "type": "Identifier", "start": 215, "end": 224, "loc": { "start": { "line": 6, "column": 4 }, "end": { "line": 6, "column": 13 }, "identifierName": "namespace" }, "name": "namespace" }, "right": { "type": "StringLiteral", "start": 225, "end": 233, "loc": { "start": { "line": 6, "column": 14 }, "end": { "line": 6, "column": 22 } }, "extra": { "rawValue": "global", "raw": "'global'" }, "value": "global" } }, "extra": { "shorthand": true } }, { "type": "ObjectProperty", "start": 240, "end": 286, "loc": { "start": { "line": 7, "column": 4 }, "end": { "line": 7, "column": 50 } }, "method": false, "shorthand": true, "computed": false, "key": { "type": "Identifier", "start": 240, "end": 254, "loc": { "start": { "line": 7, "column": 4 }, "end": { "line": 7, "column": 18 }, "identifierName": "defaultActions" }, "name": "defaultActions" }, "value": { "type": "AssignmentPattern", "start": 240, "end": 286, "loc": { "start": { "line": 7, "column": 4 }, "end": { "line": 7, "column": 50 } }, "left": { "type": "Identifier", "start": 240, "end": 254, "loc": { "start": { "line": 7, "column": 4 }, "end": { "line": 7, "column": 18 }, "identifierName": "defaultActions" }, "name": "defaultActions" }, "right": { "type": "ArrayExpression", "start": 255, "end": 286, "loc": { "start": { "line": 7, "column": 19 }, "end": { "line": 7, "column": 50 } }, "elements": [ { "type": "StringLiteral", "start": 256, "end": 265, "loc": { "start": { "line": 7, "column": 20 }, "end": { "line": 7, "column": 29 } }, "extra": { "rawValue": "loading", "raw": "'loading'" }, "value": "loading" }, { "type": "StringLiteral", "start": 267, "end": 274, "loc": { "start": { "line": 7, "column": 31 }, "end": { "line": 7, "column": 38 } }, "extra": { "rawValue": "error", "raw": "'error'" }, "value": "error" }, { "type": "StringLiteral", "start": 276, "end": 285, "loc": { "start": { "line": 7, "column": 40 }, "end": { "line": 7, "column": 49 } }, "extra": { "rawValue": "success", "raw": "'success'" }, "value": "success" } ] } }, "extra": { "shorthand": true } }, { "type": "ObjectProperty", "start": 293, "end": 354, "loc": { "start": { "line": 8, "column": 4 }, "end": { "line": 8, "column": 65 } }, "method": false, "shorthand": true, "computed": false, "key": { "type": "Identifier", "start": 293, "end": 300, "loc": { "start": { "line": 8, "column": 4 }, "end": { "line": 8, "column": 11 }, "identifierName": "actions" }, "name": "actions" }, "value": { "type": "AssignmentPattern", "start": 293, "end": 354, "loc": { "start": { "line": 8, "column": 4 }, "end": { "line": 8, "column": 65 } }, "left": { "type": "Identifier", "start": 293, "end": 300, "loc": { "start": { "line": 8, "column": 4 }, "end": { "line": 8, "column": 11 }, "identifierName": "actions" }, "name": "actions" }, "right": { "type": "CallExpression", "start": 301, "end": 354, "loc": { "start": { "line": 8, "column": 12 }, "end": { "line": 8, "column": 65 } }, "callee": { "type": "Identifier", "start": 301, "end": 314, "loc": { "start": { "line": 8, "column": 12 }, "end": { "line": 8, "column": 25 }, "identifierName": "createActions" }, "name": "createActions" }, "arguments": [ { "type": "TemplateLiteral", "start": 315, "end": 337, "loc": { "start": { "line": 8, "column": 26 }, "end": { "line": 8, "column": 48 } }, "expressions": [ { "type": "Identifier", "start": 318, "end": 327, "loc": { "start": { "line": 8, "column": 29 }, "end": { "line": 8, "column": 38 }, "identifierName": "namespace" }, "name": "namespace" }, { "type": "Identifier", "start": 331, "end": 335, "loc": { "start": { "line": 8, "column": 42 }, "end": { "line": 8, "column": 46 }, "identifierName": "name" }, "name": "name" } ], "quasis": [ { "type": "TemplateElement", "start": 316, "end": 316, "loc": { "start": { "line": 8, "column": 27 }, "end": { "line": 8, "column": 27 } }, "value": { "raw": "", "cooked": "" }, "tail": false }, { "type": "TemplateElement", "start": 328, "end": 329, "loc": { "start": { "line": 8, "column": 39 }, "end": { "line": 8, "column": 40 } }, "value": { "raw": ":", "cooked": ":" }, "tail": false }, { "type": "TemplateElement", "start": 336, "end": 336, "loc": { "start": { "line": 8, "column": 47 }, "end": { "line": 8, "column": 47 } }, "value": { "raw": "", "cooked": "" }, "tail": true } ] }, { "type": "Identifier", "start": 339, "end": 353, "loc": { "start": { "line": 8, "column": 50 }, "end": { "line": 8, "column": 64 }, "identifierName": "defaultActions" }, "name": "defaultActions" } ] } }, "extra": { "shorthand": true } }, { "type": "ObjectProperty", "start": 361, "end": 404, "loc": { "start": { "line": 9, "column": 4 }, "end": { "line": 9, "column": 47 } }, "method": false, "shorthand": true, "computed": false, "key": { "type": "Identifier", "start": 361, "end": 367, "loc": { "start": { "line": 9, "column": 4 }, "end": { "line": 9, "column": 10 }, "identifierName": "logger" }, "name": "logger" }, "value": { "type": "AssignmentPattern", "start": 361, "end": 404, "loc": { "start": { "line": 9, "column": 4 }, "end": { "line": 9, "column": 47 } }, "left": { "type": "Identifier", "start": 361, "end": 367, "loc": { "start": { "line": 9, "column": 4 }, "end": { "line": 9, "column": 10 }, "identifierName": "logger" }, "name": "logger" }, "right": { "type": "CallExpression", "start": 368, "end": 404, "loc": { "start": { "line": 9, "column": 11 }, "end": { "line": 9, "column": 47 } }, "callee": { "type": "Identifier", "start": 368, "end": 380, "loc": { "start": { "line": 9, "column": 11 }, "end": { "line": 9, "column": 23 }, "identifierName": "createLogger" }, "name": "createLogger" }, "arguments": [ { "type": "TemplateLiteral", "start": 381, "end": 403, "loc": { "start": { "line": 9, "column": 24 }, "end": { "line": 9, "column": 46 } }, "expressions": [ { "type": "Identifier", "start": 384, "end": 393, "loc": { "start": { "line": 9, "column": 27 }, "end": { "line": 9, "column": 36 }, "identifierName": "namespace" }, "name": "namespace" }, { "type": "Identifier", "start": 397, "end": 401, "loc": { "start": { "line": 9, "column": 40 }, "end": { "line": 9, "column": 44 }, "identifierName": "name" }, "name": "name" } ], "quasis": [ { "type": "TemplateElement", "start": 382, "end": 382, "loc": { "start": { "line": 9, "column": 25 }, "end": { "line": 9, "column": 25 } }, "value": { "raw": "", "cooked": "" }, "tail": false }, { "type": "TemplateElement", "start": 394, "end": 395, "loc": { "start": { "line": 9, "column": 37 }, "end": { "line": 9, "column": 38 } }, "value": { "raw": ":", "cooked": ":" }, "tail": false }, { "type": "TemplateElement", "start": 402, "end": 402, "loc": { "start": { "line": 9, "column": 45 }, "end": { "line": 9, "column": 45 } }, "value": { "raw": "", "cooked": "" }, "tail": true } ] } ] } }, "extra": { "shorthand": true } } ] }, "right": { "type": "ObjectExpression", "start": 409, "end": 411, "loc": { "start": { "line": 10, "column": 2 }, "end": { "line": 10, "column": 4 } }, "properties": [] } } ], "body": { "type": "BlockStatement", "start": 413, "end": 1542, "loc": { "start": { "line": 10, "column": 6 }, "end": { "line": 42, "column": 1 } }, "body": [ { "type": "VariableDeclaration", "start": 420, "end": 484, "loc": { "start": { "line": 11, "column": 4 }, "end": { "line": 11, "column": 68 } }, "declarations": [ { "type": "VariableDeclarator", "start": 426, "end": 483, "loc": { "start": { "line": 11, "column": 10 }, "end": { "line": 11, "column": 67 } }, "id": { "type": "Identifier", "start": 426, "end": 432, "loc": { "start": { "line": 11, "column": 10 }, "end": { "line": 11, "column": 16 }, "identifierName": "errors" }, "name": "errors" }, "init": { "type": "CallExpression", "start": 435, "end": 483, "loc": { "start": { "line": 11, "column": 19 }, "end": { "line": 11, "column": 67 } }, "callee": { "type": "Identifier", "start": 435, "end": 450, "loc": { "start": { "line": 11, "column": 19 }, "end": { "line": 11, "column": 34 }, "identifierName": "validateCreator" }, "name": "validateCreator" }, "arguments": [ { "type": "ObjectExpression", "start": 451, "end": 474, "loc": { "start": { "line": 11, "column": 35 }, "end": { "line": 11, "column": 58 } }, "properties": [ { "type": "ObjectProperty", "start": 452, "end": 456, "loc": { "start": { "line": 11, "column": 36 }, "end": { "line": 11, "column": 40 } }, "method": false, "shorthand": true, "computed": false, "key": { "type": "Identifier", "start": 452, "end": 456, "loc": { "start": { "line": 11, "column": 36 }, "end": { "line": 11, "column": 40 }, "identifierName": "name" }, "name": "name" }, "value": { "type": "Identifier", "start": 452, "end": 456, "loc": { "start": { "line": 11, "column": 36 }, "end": { "line": 11, "column": 40 }, "identifierName": "name" }, "name": "name" }, "extra": { "shorthand": true } }, { "type": "ObjectProperty", "start": 458, "end": 465, "loc": { "start": { "line": 11, "column": 42 }, "end": { "line": 11, "column": 49 } }, "method": false, "shorthand": true, "computed": false, "key": { "type": "Identifier", "start": 458, "end": 465, "loc": { "start": { "line": 11, "column": 42 }, "end": { "line": 11, "column": 49 }, "identifierName": "actions" }, "name": "actions" }, "value": { "type": "Identifier", "start": 458, "end": 465, "loc": { "start": { "line": 11, "column": 42 }, "end": { "line": 11, "column": 49 }, "identifierName": "actions" }, "name": "actions" }, "extra": { "shorthand": true } }, { "type": "ObjectProperty", "start": 467, "end": 473, "loc": { "start": { "line": 11, "column": 51 }, "end": { "line": 11, "column": 57 } }, "method": false, "shorthand": true, "computed": false, "key": { "type": "Identifier", "start": 467, "end": 473, "loc": { "start": { "line": 11, "column": 51 }, "end": { "line": 11, "column": 57 }, "identifierName": "logger" }, "name": "logger" }, "value": { "type": "Identifier", "start": 467, "end": 473, "loc": { "start": { "line": 11, "column": 51 }, "end": { "line": 11, "column": 57 }, "identifierName": "logger" }, "name": "logger" }, "extra": { "shorthand": true } } ] }, { "type": "Identifier", "start": 476, "end": 482, "loc": { "start": { "line": 11, "column": 60 }, "end": { "line": 11, "column": 66 }, "identifierName": "logger" }, "name": "logger" } ] } } ], "kind": "const" }, { "type": "VariableDeclaration", "start": 490, "end": 538, "loc": { "start": { "line": 12, "column": 4 }, "end": { "line": 12, "column": 52 } }, "declarations": [ { "type": "VariableDeclarator", "start": 496, "end": 537, "loc": { "start": { "line": 12, "column": 10 }, "end": { "line": 12, "column": 51 } }, "id": { "type": "Identifier", "start": 496, "end": 505, "loc": { "start": { "line": 12, "column": 10 }, "end": { "line": 12, "column": 19 }, "identifierName": "errorKeys" }, "name": "errorKeys" }, "init": { "type": "LogicalExpression", "start": 508, "end": 537, "loc": { "start": { "line": 12, "column": 22 }, "end": { "line": 12, "column": 51 } }, "left": {