@xailabs/altx
Version:
Flux flavor based on alt.js
1,379 lines (1,378 loc) • 146 kB
JSON
{
"type": "File",
"start": 0,
"end": 853,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 27,
"column": 0
}
},
"program": {
"type": "Program",
"start": 0,
"end": 853,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 27,
"column": 0
}
},
"sourceType": "module",
"body": [
{
"type": "ImportDeclaration",
"start": 0,
"end": 44,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 44
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 7,
"end": 20,
"loc": {
"start": {
"line": 1,
"column": 7
},
"end": {
"line": 1,
"column": 20
}
},
"local": {
"type": "Identifier",
"start": 7,
"end": 20,
"loc": {
"start": {
"line": 1,
"column": 7
},
"end": {
"line": 1,
"column": 20
},
"identifierName": "createActions"
},
"name": "createActions"
}
}
],
"source": {
"type": "StringLiteral",
"start": 26,
"end": 43,
"loc": {
"start": {
"line": 1,
"column": 26
},
"end": {
"line": 1,
"column": 43
}
},
"extra": {
"rawValue": "./createActions",
"raw": "'./createActions'"
},
"value": "./createActions"
}
},
{
"type": "ImportDeclaration",
"start": 46,
"end": 91,
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 2,
"column": 45
}
},
"specifiers": [
{
"type": "ImportSpecifier",
"start": 54,
"end": 66,
"loc": {
"start": {
"line": 2,
"column": 8
},
"end": {
"line": 2,
"column": 20
}
},
"imported": {
"type": "Identifier",
"start": 54,
"end": 66,
"loc": {
"start": {
"line": 2,
"column": 8
},
"end": {
"line": 2,
"column": 20
},
"identifierName": "createLogger"
},
"name": "createLogger"
},
"local": {
"type": "Identifier",
"start": 54,
"end": 66,
"loc": {
"start": {
"line": 2,
"column": 8
},
"end": {
"line": 2,
"column": 20
},
"identifierName": "createLogger"
},
"name": "createLogger"
}
}
],
"source": {
"type": "StringLiteral",
"start": 73,
"end": 90,
"loc": {
"start": {
"line": 2,
"column": 27
},
"end": {
"line": 2,
"column": 44
}
},
"extra": {
"rawValue": "./utils/logging",
"raw": "'./utils/logging'"
},
"value": "./utils/logging"
}
},
{
"type": "ExportDefaultDeclaration",
"start": 95,
"end": 851,
"loc": {
"start": {
"line": 4,
"column": 0
},
"end": {
"line": 26,
"column": 1
}
},
"declaration": {
"type": "FunctionDeclaration",
"start": 110,
"end": 851,
"loc": {
"start": {
"line": 4,
"column": 15
},
"end": {
"line": 26,
"column": 1
}
},
"id": {
"type": "Identifier",
"start": 119,
"end": 133,
"loc": {
"start": {
"line": 4,
"column": 24
},
"end": {
"line": 4,
"column": 38
},
"identifierName": "handlerFactory"
},
"name": "handlerFactory"
},
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "Identifier",
"start": 134,
"end": 140,
"loc": {
"start": {
"line": 4,
"column": 39
},
"end": {
"line": 4,
"column": 45
},
"identifierName": "action"
},
"name": "action"
},
{
"type": "AssignmentPattern",
"start": 142,
"end": 220,
"loc": {
"start": {
"line": 4,
"column": 47
},
"end": {
"line": 7,
"column": 4
}
},
"left": {
"type": "ObjectPattern",
"start": 142,
"end": 217,
"loc": {
"start": {
"line": 4,
"column": 47
},
"end": {
"line": 7,
"column": 1
}
},
"properties": [
{
"type": "ObjectProperty",
"start": 149,
"end": 167,
"loc": {
"start": {
"line": 5,
"column": 4
},
"end": {
"line": 5,
"column": 22
}
},
"method": false,
"shorthand": true,
"computed": false,
"key": {
"type": "Identifier",
"start": 149,
"end": 158,
"loc": {
"start": {
"line": 5,
"column": 4
},
"end": {
"line": 5,
"column": 13
},
"identifierName": "namespace"
},
"name": "namespace"
},
"value": {
"type": "AssignmentPattern",
"start": 149,
"end": 167,
"loc": {
"start": {
"line": 5,
"column": 4
},
"end": {
"line": 5,
"column": 22
}
},
"left": {
"type": "Identifier",
"start": 149,
"end": 158,
"loc": {
"start": {
"line": 5,
"column": 4
},
"end": {
"line": 5,
"column": 13
},
"identifierName": "namespace"
},
"name": "namespace"
},
"right": {
"type": "StringLiteral",
"start": 159,
"end": 167,
"loc": {
"start": {
"line": 5,
"column": 14
},
"end": {
"line": 5,
"column": 22
}
},
"extra": {
"rawValue": "global",
"raw": "'global'"
},
"value": "global"
}
},
"extra": {
"shorthand": true
}
},
{
"type": "ObjectProperty",
"start": 174,
"end": 214,
"loc": {
"start": {
"line": 6,
"column": 4
},
"end": {
"line": 6,
"column": 44
}
},
"method": false,
"shorthand": true,
"computed": false,
"key": {
"type": "Identifier",
"start": 174,
"end": 180,
"loc": {
"start": {
"line": 6,
"column": 4
},
"end": {
"line": 6,
"column": 10
},
"identifierName": "logger"
},
"name": "logger"
},
"value": {
"type": "AssignmentPattern",
"start": 174,
"end": 214,
"loc": {
"start": {
"line": 6,
"column": 4
},
"end": {
"line": 6,
"column": 44
}
},
"left": {
"type": "Identifier",
"start": 174,
"end": 180,
"loc": {
"start": {
"line": 6,
"column": 4
},
"end": {
"line": 6,
"column": 10
},
"identifierName": "logger"
},
"name": "logger"
},
"right": {
"type": "CallExpression",
"start": 181,
"end": 214,
"loc": {
"start": {
"line": 6,
"column": 11
},
"end": {
"line": 6,
"column": 44
}
},
"callee": {
"type": "Identifier",
"start": 181,
"end": 193,
"loc": {
"start": {
"line": 6,
"column": 11
},
"end": {
"line": 6,
"column": 23
},
"identifierName": "createLogger"
},
"name": "createLogger"
},
"arguments": [
{
"type": "LogicalExpression",
"start": 194,
"end": 213,
"loc": {
"start": {
"line": 6,
"column": 24
},
"end": {
"line": 6,
"column": 43
}
},
"left": {
"type": "MemberExpression",
"start": 194,
"end": 203,
"loc": {
"start": {
"line": 6,
"column": 24
},
"end": {
"line": 6,
"column": 33
}
},
"object": {
"type": "Identifier",
"start": 194,
"end": 200,
"loc": {
"start": {
"line": 6,
"column": 24
},
"end": {
"line": 6,
"column": 30
},
"identifierName": "action"
},
"name": "action"
},
"property": {
"type": "Identifier",
"start": 201,
"end": 203,
"loc": {
"start": {
"line": 6,
"column": 31
},
"end": {
"line": 6,
"column": 33
},
"identifierName": "id"
},
"name": "id"
},
"computed": false
},
"operator": "||",
"right": {
"type": "Identifier",
"start": 207,
"end": 213,
"loc": {
"start": {
"line": 6,
"column": 37
},
"end": {
"line": 6,
"column": 43
},
"identifierName": "action"
},
"name": "action"
}
}
]
}
},
"extra": {
"shorthand": true
}
}
]
},
"right": {
"type": "ObjectExpression",
"start": 218,
"end": 220,
"loc": {
"start": {
"line": 7,
"column": 2
},
"end": {
"line": 7,
"column": 4
}
},
"properties": []
}
}
],
"body": {
"type": "BlockStatement",
"start": 222,
"end": 851,
"loc": {
"start": {
"line": 7,
"column": 6
},
"end": {
"line": 26,
"column": 1
}
},
"body": [
{
"type": "VariableDeclaration",
"start": 229,
"end": 262,
"loc": {
"start": {
"line": 8,
"column": 4
},
"end": {
"line": 8,
"column": 37
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 235,
"end": 261,
"loc": {
"start": {
"line": 8,
"column": 10
},
"end": {
"line": 8,
"column": 36
}
},
"id": {
"type": "Identifier",
"start": 235,
"end": 239,
"loc": {
"start": {
"line": 8,
"column": 10
},
"end": {
"line": 8,
"column": 14
},
"identifierName": "name"
},
"name": "name"
},
"init": {
"type": "LogicalExpression",
"start": 242,
"end": 261,
"loc": {
"start": {
"line": 8,
"column": 17
},
"end": {
"line": 8,
"column": 36
}
},
"left": {
"type": "MemberExpression",
"start": 242,
"end": 251,
"loc": {
"start": {
"line": 8,
"column": 17
},
"end": {
"line": 8,
"column": 26
}
},
"object": {
"type": "Identifier",
"start": 242,
"end": 248,
"loc": {
"start": {
"line": 8,
"column": 17
},
"end": {
"line": 8,
"column": 23
},
"identifierName": "action"
},
"name": "action"
},
"property": {
"type": "Identifier",
"start": 249,
"end": 251,
"loc": {
"start": {
"line": 8,
"column": 24
},
"end": {
"line": 8,
"column": 26
},
"identifierName": "id"
},
"name": "id"
},
"computed": false
},
"operator": "||",
"right": {
"type": "Identifier",
"start": 255,
"end": 261,
"loc": {
"start": {
"line": 8,
"column": 30
},
"end": {
"line": 8,
"column": 36
},
"identifierName": "action"
},
"name": "action"
}
}
}
],
"kind": "const"
},
{
"type": "ExpressionStatement",
"start": 268,
"end": 356,
"loc": {
"start": {
"line": 9,
"column": 4
},
"end": {
"line": 9,
"column": 92
}
},
"expression": {
"type": "AssignmentExpression",
"start": 268,
"end": 355,
"loc": {
"start": {
"line": 9,
"column": 4
},
"end": {
"line": 9,
"column": 91
}
},
"operator": "=",
"left": {
"type": "Identifier",
"start": 268,
"end": 274,
"loc": {
"start": {
"line": 9,
"column": 4
},
"end": {
"line": 9,
"column": 10
},
"identifierName": "action"
},
"name": "action"
},
"right": {
"type": "ConditionalExpression",
"start": 277,
"end": 355,
"loc": {
"start": {
"line": 9,
"column": 13
},
"end": {
"line": 9,
"column": 91
}
},
"test": {
"type": "BinaryExpression",
"start": 277,
"end": 303,
"loc": {
"start": {
"line": 9,
"column": 13
},
"end": {
"line": 9,
"column": 39
}
},
"left": {
"type": "UnaryExpression",
"start": 277,
"end": 290,
"loc": {
"start": {
"line": 9,
"column": 13
},
"end": {
"line": 9,
"column": 26
}
},
"operator": "typeof",
"prefix": true,
"argument": {
"type": "Identifier",
"start": 284,
"end": 290,
"loc": {
"start": {
"line": 9,
"column": 20
},
"end": {
"line": 9,
"column": 26
},
"identifierName": "action"
},
"name": "action"
},
"extra": {
"parenthesizedArgument": false
}
},
"operator": "===",
"right": {
"type": "StringLiteral",
"start": 295,
"end": 303,
"loc": {
"start": {
"line": 9,
"column": 31
},
"end": {
"line": 9,
"column": 39
}
},
"extra": {
"rawValue": "string",
"raw": "'string'"
},
"value": "string"
}
},
"consequent": {
"type": "MemberExpression",
"start": 306,
"end": 346,
"loc": {
"start": {
"line": 9,
"column": 42
},
"end": {
"line": 9,
"column": 82
}
},
"object": {
"type": "CallExpression",
"start": 306,
"end": 338,
"loc": {
"start": {
"line": 9,
"column": 42
},
"end": {
"line": 9,
"column": 74
}
},
"callee": {
"type": "Identifier",
"start": 306,
"end": 319,
"loc": {
"start": {
"line": 9,
"column": 42
},
"end": {
"line": 9,
"column": 55
},
"identifierName": "createActions"
},
"name": "createActions"
},
"arguments": [
{
"type": "Identifier",
"start": 320,
"end": 329,
"loc": {
"start": {
"line": 9,
"column": 56
},
"end": {
"line": 9,
"column": 65
},
"identifierName": "namespace"
},
"name": "namespace"
},
{
"type": "Identifier",
"start": 331,
"end": 337,
"loc": {
"start": {
"line": 9,
"column": 67
},
"end": {
"line": 9,
"column": 73
},
"identifierName": "action"
},
"name": "action"
}
]
},
"property": {
"type": "Identifier",
"start": 339,
"end": 345,
"loc": {
"start": {
"line": 9,
"column": 75
},
"end": {
"line": 9,
"column": 81
},
"identifierName": "action"
},
"name": "action"
},
"computed": true
},
"alternate": {
"type": "Identifier",
"start": 349,
"end": 355,
"loc": {
"start": {
"line": 9,
"column": 85
},
"end": {
"line": 9,
"column": 91
},
"identifierName": "action"
},
"name": "action"
}
}
}
},
{
"type": "ReturnStatement",
"start": 362,
"end": 848,
"loc": {
"start": {
"line": 10,
"column": 4
},
"end": {
"line": 25,
"column": 6
}
},
"argument": {
"type": "ObjectExpression",
"start": 369,
"end": 847,
"loc": {
"start": {
"line": 10,
"column": 11
},
"end": {
"line": 25,
"column": 5
}
},
"properties": [
{
"type": "ObjectProperty",
"start": 380,
"end": 840,
"loc": {
"start": {
"line": 11,
"column": 8
},
"end": {
"line": 24,
"column": 9
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 380,
"end": 386,
"loc": {
"start": {
"line": 11,
"column": 8
},
"end": {
"line": 11,
"column": 14
},
"identifierName": "create"
},
"name": "create"
},
"value": {
"type": "ArrowFunctionExpression",
"start": 388,
"end": 840,
"loc": {
"start": {
"line": 11,
"column": 16
},
"end": {
"line": 24,
"column": 9
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "Identifier",
"start": 389,
"end": 405,
"loc": {
"start": {
"line": 11,
"column": 17
},
"end": {
"line": 11,
"column": 33
},
"identifierName": "createDefinition"
},
"name": "createDefinition"
}
],
"body": {
"type": "BlockStatement",
"start": 410,
"end": 840,
"loc": {
"start": {
"line": 11,
"column": 38
},
"end": {
"line": 24,
"column": 9
}
},
"body": [
{
"type": "VariableDeclaration",
"start": 425,
"end": 561,
"loc": {
"start": {
"line": 12,
"column": 12
},
"end": {
"line": 17,
"column": 14
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 431,
"end": 560,
"loc": {
"start": {
"line": 12,
"column": 18
},
"end": {
"line": 17,
"column": 13
}
},
"id": {
"type": "Identifier",
"start": 431,
"end": 441,
"loc": {
"start": {
"line": 12,
"column": 18
},
"end": {
"line": 12,
"column": 28
},
"identifierName": "definition"
},
"name": "definition"
},
"init": {
"type": "ObjectExpression",
"start": 444,
"end": 560,
"loc": {
"start": {
"line": 12,
"column": 31
},
"end": {
"line": 17,
"column": 13
}
},
"properties": [
{
"type": "ObjectProperty",
"start": 463,
"end": 467,
"loc": {
"start": {
"line": 13,
"column": 16
},
"end": {
"line": 13,
"column": 20
}
},
"method": false,
"shorthand": true,
"computed": false,
"key": {
"type": "Identifier",
"start": 463,
"end": 467,
"loc": {
"start": {
"line": 13,
"column": 16
},
"end": {
"line": 13,
"column": 20
},
"identifierName": "name"
},
"name": "name"
},
"value": {
"type": "Identifier",
"start": 463,
"end": 467,
"loc": {
"start": {
"line": 13,
"column": 16
},
"end": {
"line": 13,
"column": 20
},
"identifierName": "name"
},
"name": "name"
},
"extra": {
"shorthand": true
}
},
{
"type": "ObjectProperty",
"start": 486,
"end": 492,
"loc": {
"start": {
"line": 14,
"column": 16
},
"end": {
"line": 14,
"column": 22
}
},
"method": false,
"shorthand": true,
"computed": false,
"key": {
"type": "Identifier",
"start": 486,
"end": 492,
"loc": {
"start": {
"line": 14,
"column": 16
},
"end": {
"line": 14,
"column": 22
},
"identifierName": "action"
},
"name": "action"
},
"value": {
"type": "Identifier",
"start": 486,
"end": 492,
"loc": {
"start": {
"line": 14,
"column": 16
},
"end": {
"line": 14,
"column": 22
},
"identifierName": "action"
},
"name": "action"
},
"extra": {
"shorthand": true
}
},
{
"type": "ObjectProperty",
"start": 511,
"end": 520,
"loc": {
"start": {
"line": 15,
"column": 16
},
"end": {
"line": 15,
"column": 25
}
},
"method": false,
"shorthand": true,
"computed": false,
"key": {
"type": "Identifier",
"start": 511,
"end": 520,
"loc": {
"start": {
"line": 15,
"column": 16
},
"end": {
"line": 15,
"column": 25
},
"identifierName": "namespace"
},
"name": "namespace"
},
"value": {
"type": "Identifier",
"start": 511,
"end": 520,
"loc": {
"start": {
"line": 15,
"column": 16
},
"end": {
"line": 15,
"column": 25
},
"identifierName": "namespace"
},
"name": "namespace"
},
"extra": {
"shorthand": true
}
},
{
"type": "ObjectProperty",
"start": 539,
"end": 545,
"loc": {
"start": {
"line": 16,
"column": 16
},
"end": {
"line": 16,
"column": 22
}
},
"method": false,
"shorthand": true,
"computed": false,
"key": {
"type": "Identifier",
"start": 539,
"end": 545,
"loc": {
"start": {
"line": 16,
"column": 16
},
"end": {
"line": 16,
"column": 22
},
"identifierName": "logger"
},
"name": "logger"
},
"value": {
"type": "Identifier",
"start": 539,
"end": 545,
"loc": {
"start": {
"line": 16,
"column": 16
},
"end": {
"line": 16,
"column": 22
},
"identifierName": "logger"
},
"name": "logger"
},
"extra": {
"shorthand": true
}
}
]
}
}