@xailabs/altx
Version:
Flux flavor based on alt.js
1,379 lines (1,378 loc) • 146 kB
JSON
{
"type": "File",
"start": 0,
"end": 852,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 27,
"column": 0
}
},
"program": {
"type": "Program",
"start": 0,
"end": 852,
"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": 850,
"loc": {
"start": {
"line": 4,
"column": 0
},
"end": {
"line": 26,
"column": 1
}
},
"declaration": {
"type": "FunctionDeclaration",
"start": 110,
"end": 850,
"loc": {
"start": {
"line": 4,
"column": 15
},
"end": {
"line": 26,
"column": 1
}
},
"id": {
"type": "Identifier",
"start": 119,
"end": 132,
"loc": {
"start": {
"line": 4,
"column": 24
},
"end": {
"line": 4,
"column": 37
},
"identifierName": "actionFactory"
},
"name": "actionFactory"
},
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "Identifier",
"start": 133,
"end": 139,
"loc": {
"start": {
"line": 4,
"column": 38
},
"end": {
"line": 4,
"column": 44
},
"identifierName": "action"
},
"name": "action"
},
{
"type": "AssignmentPattern",
"start": 141,
"end": 219,
"loc": {
"start": {
"line": 4,
"column": 46
},
"end": {
"line": 7,
"column": 4
}
},
"left": {
"type": "ObjectPattern",
"start": 141,
"end": 216,
"loc": {
"start": {
"line": 4,
"column": 46
},
"end": {
"line": 7,
"column": 1
}
},
"properties": [
{
"type": "ObjectProperty",
"start": 148,
"end": 166,
"loc": {
"start": {
"line": 5,
"column": 4
},
"end": {
"line": 5,
"column": 22
}
},
"method": false,
"shorthand": true,
"computed": false,
"key": {
"type": "Identifier",
"start": 148,
"end": 157,
"loc": {
"start": {
"line": 5,
"column": 4
},
"end": {
"line": 5,
"column": 13
},
"identifierName": "namespace"
},
"name": "namespace"
},
"value": {
"type": "AssignmentPattern",
"start": 148,
"end": 166,
"loc": {
"start": {
"line": 5,
"column": 4
},
"end": {
"line": 5,
"column": 22
}
},
"left": {
"type": "Identifier",
"start": 148,
"end": 157,
"loc": {
"start": {
"line": 5,
"column": 4
},
"end": {
"line": 5,
"column": 13
},
"identifierName": "namespace"
},
"name": "namespace"
},
"right": {
"type": "StringLiteral",
"start": 158,
"end": 166,
"loc": {
"start": {
"line": 5,
"column": 14
},
"end": {
"line": 5,
"column": 22
}
},
"extra": {
"rawValue": "global",
"raw": "'global'"
},
"value": "global"
}
},
"extra": {
"shorthand": true
}
},
{
"type": "ObjectProperty",
"start": 173,
"end": 213,
"loc": {
"start": {
"line": 6,
"column": 4
},
"end": {
"line": 6,
"column": 44
}
},
"method": false,
"shorthand": true,
"computed": false,
"key": {
"type": "Identifier",
"start": 173,
"end": 179,
"loc": {
"start": {
"line": 6,
"column": 4
},
"end": {
"line": 6,
"column": 10
},
"identifierName": "logger"
},
"name": "logger"
},
"value": {
"type": "AssignmentPattern",
"start": 173,
"end": 213,
"loc": {
"start": {
"line": 6,
"column": 4
},
"end": {
"line": 6,
"column": 44
}
},
"left": {
"type": "Identifier",
"start": 173,
"end": 179,
"loc": {
"start": {
"line": 6,
"column": 4
},
"end": {
"line": 6,
"column": 10
},
"identifierName": "logger"
},
"name": "logger"
},
"right": {
"type": "CallExpression",
"start": 180,
"end": 213,
"loc": {
"start": {
"line": 6,
"column": 11
},
"end": {
"line": 6,
"column": 44
}
},
"callee": {
"type": "Identifier",
"start": 180,
"end": 192,
"loc": {
"start": {
"line": 6,
"column": 11
},
"end": {
"line": 6,
"column": 23
},
"identifierName": "createLogger"
},
"name": "createLogger"
},
"arguments": [
{
"type": "LogicalExpression",
"start": 193,
"end": 212,
"loc": {
"start": {
"line": 6,
"column": 24
},
"end": {
"line": 6,
"column": 43
}
},
"left": {
"type": "MemberExpression",
"start": 193,
"end": 202,
"loc": {
"start": {
"line": 6,
"column": 24
},
"end": {
"line": 6,
"column": 33
}
},
"object": {
"type": "Identifier",
"start": 193,
"end": 199,
"loc": {
"start": {
"line": 6,
"column": 24
},
"end": {
"line": 6,
"column": 30
},
"identifierName": "action"
},
"name": "action"
},
"property": {
"type": "Identifier",
"start": 200,
"end": 202,
"loc": {
"start": {
"line": 6,
"column": 31
},
"end": {
"line": 6,
"column": 33
},
"identifierName": "id"
},
"name": "id"
},
"computed": false
},
"operator": "||",
"right": {
"type": "Identifier",
"start": 206,
"end": 212,
"loc": {
"start": {
"line": 6,
"column": 37
},
"end": {
"line": 6,
"column": 43
},
"identifierName": "action"
},
"name": "action"
}
}
]
}
},
"extra": {
"shorthand": true
}
}
]
},
"right": {
"type": "ObjectExpression",
"start": 217,
"end": 219,
"loc": {
"start": {
"line": 7,
"column": 2
},
"end": {
"line": 7,
"column": 4
}
},
"properties": []
}
}
],
"body": {
"type": "BlockStatement",
"start": 221,
"end": 850,
"loc": {
"start": {
"line": 7,
"column": 6
},
"end": {
"line": 26,
"column": 1
}
},
"body": [
{
"type": "VariableDeclaration",
"start": 228,
"end": 261,
"loc": {
"start": {
"line": 8,
"column": 4
},
"end": {
"line": 8,
"column": 37
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 234,
"end": 260,
"loc": {
"start": {
"line": 8,
"column": 10
},
"end": {
"line": 8,
"column": 36
}
},
"id": {
"type": "Identifier",
"start": 234,
"end": 238,
"loc": {
"start": {
"line": 8,
"column": 10
},
"end": {
"line": 8,
"column": 14
},
"identifierName": "name"
},
"name": "name"
},
"init": {
"type": "LogicalExpression",
"start": 241,
"end": 260,
"loc": {
"start": {
"line": 8,
"column": 17
},
"end": {
"line": 8,
"column": 36
}
},
"left": {
"type": "MemberExpression",
"start": 241,
"end": 250,
"loc": {
"start": {
"line": 8,
"column": 17
},
"end": {
"line": 8,
"column": 26
}
},
"object": {
"type": "Identifier",
"start": 241,
"end": 247,
"loc": {
"start": {
"line": 8,
"column": 17
},
"end": {
"line": 8,
"column": 23
},
"identifierName": "action"
},
"name": "action"
},
"property": {
"type": "Identifier",
"start": 248,
"end": 250,
"loc": {
"start": {
"line": 8,
"column": 24
},
"end": {
"line": 8,
"column": 26
},
"identifierName": "id"
},
"name": "id"
},
"computed": false
},
"operator": "||",
"right": {
"type": "Identifier",
"start": 254,
"end": 260,
"loc": {
"start": {
"line": 8,
"column": 30
},
"end": {
"line": 8,
"column": 36
},
"identifierName": "action"
},
"name": "action"
}
}
}
],
"kind": "const"
},
{
"type": "ExpressionStatement",
"start": 267,
"end": 355,
"loc": {
"start": {
"line": 9,
"column": 4
},
"end": {
"line": 9,
"column": 92
}
},
"expression": {
"type": "AssignmentExpression",
"start": 267,
"end": 354,
"loc": {
"start": {
"line": 9,
"column": 4
},
"end": {
"line": 9,
"column": 91
}
},
"operator": "=",
"left": {
"type": "Identifier",
"start": 267,
"end": 273,
"loc": {
"start": {
"line": 9,
"column": 4
},
"end": {
"line": 9,
"column": 10
},
"identifierName": "action"
},
"name": "action"
},
"right": {
"type": "ConditionalExpression",
"start": 276,
"end": 354,
"loc": {
"start": {
"line": 9,
"column": 13
},
"end": {
"line": 9,
"column": 91
}
},
"test": {
"type": "BinaryExpression",
"start": 276,
"end": 302,
"loc": {
"start": {
"line": 9,
"column": 13
},
"end": {
"line": 9,
"column": 39
}
},
"left": {
"type": "UnaryExpression",
"start": 276,
"end": 289,
"loc": {
"start": {
"line": 9,
"column": 13
},
"end": {
"line": 9,
"column": 26
}
},
"operator": "typeof",
"prefix": true,
"argument": {
"type": "Identifier",
"start": 283,
"end": 289,
"loc": {
"start": {
"line": 9,
"column": 20
},
"end": {
"line": 9,
"column": 26
},
"identifierName": "action"
},
"name": "action"
},
"extra": {
"parenthesizedArgument": false
}
},
"operator": "===",
"right": {
"type": "StringLiteral",
"start": 294,
"end": 302,
"loc": {
"start": {
"line": 9,
"column": 31
},
"end": {
"line": 9,
"column": 39
}
},
"extra": {
"rawValue": "string",
"raw": "'string'"
},
"value": "string"
}
},
"consequent": {
"type": "MemberExpression",
"start": 305,
"end": 345,
"loc": {
"start": {
"line": 9,
"column": 42
},
"end": {
"line": 9,
"column": 82
}
},
"object": {
"type": "CallExpression",
"start": 305,
"end": 337,
"loc": {
"start": {
"line": 9,
"column": 42
},
"end": {
"line": 9,
"column": 74
}
},
"callee": {
"type": "Identifier",
"start": 305,
"end": 318,
"loc": {
"start": {
"line": 9,
"column": 42
},
"end": {
"line": 9,
"column": 55
},
"identifierName": "createActions"
},
"name": "createActions"
},
"arguments": [
{
"type": "Identifier",
"start": 319,
"end": 328,
"loc": {
"start": {
"line": 9,
"column": 56
},
"end": {
"line": 9,
"column": 65
},
"identifierName": "namespace"
},
"name": "namespace"
},
{
"type": "Identifier",
"start": 330,
"end": 336,
"loc": {
"start": {
"line": 9,
"column": 67
},
"end": {
"line": 9,
"column": 73
},
"identifierName": "action"
},
"name": "action"
}
]
},
"property": {
"type": "Identifier",
"start": 338,
"end": 344,
"loc": {
"start": {
"line": 9,
"column": 75
},
"end": {
"line": 9,
"column": 81
},
"identifierName": "action"
},
"name": "action"
},
"computed": true
},
"alternate": {
"type": "Identifier",
"start": 348,
"end": 354,
"loc": {
"start": {
"line": 9,
"column": 85
},
"end": {
"line": 9,
"column": 91
},
"identifierName": "action"
},
"name": "action"
}
}
}
},
{
"type": "ReturnStatement",
"start": 361,
"end": 847,
"loc": {
"start": {
"line": 10,
"column": 4
},
"end": {
"line": 25,
"column": 6
}
},
"argument": {
"type": "ObjectExpression",
"start": 368,
"end": 846,
"loc": {
"start": {
"line": 10,
"column": 11
},
"end": {
"line": 25,
"column": 5
}
},
"properties": [
{
"type": "ObjectProperty",
"start": 379,
"end": 839,
"loc": {
"start": {
"line": 11,
"column": 8
},
"end": {
"line": 24,
"column": 9
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 379,
"end": 385,
"loc": {
"start": {
"line": 11,
"column": 8
},
"end": {
"line": 11,
"column": 14
},
"identifierName": "create"
},
"name": "create"
},
"value": {
"type": "ArrowFunctionExpression",
"start": 387,
"end": 839,
"loc": {
"start": {
"line": 11,
"column": 16
},
"end": {
"line": 24,
"column": 9
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "Identifier",
"start": 388,
"end": 404,
"loc": {
"start": {
"line": 11,
"column": 17
},
"end": {
"line": 11,
"column": 33
},
"identifierName": "createDefinition"
},
"name": "createDefinition"
}
],
"body": {
"type": "BlockStatement",
"start": 409,
"end": 839,
"loc": {
"start": {
"line": 11,
"column": 38
},
"end": {
"line": 24,
"column": 9
}
},
"body": [
{
"type": "VariableDeclaration",
"start": 424,
"end": 560,
"loc": {
"start": {
"line": 12,
"column": 12
},
"end": {
"line": 17,
"column": 14
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 430,
"end": 559,
"loc": {
"start": {
"line": 12,
"column": 18
},
"end": {
"line": 17,
"column": 13
}
},
"id": {
"type": "Identifier",
"start": 430,
"end": 440,
"loc": {
"start": {
"line": 12,
"column": 18
},
"end": {
"line": 12,
"column": 28
},
"identifierName": "definition"
},
"name": "definition"
},
"init": {
"type": "ObjectExpression",
"start": 443,
"end": 559,
"loc": {
"start": {
"line": 12,
"column": 31
},
"end": {
"line": 17,
"column": 13
}
},
"properties": [
{
"type": "ObjectProperty",
"start": 462,
"end": 466,
"loc": {
"start": {
"line": 13,
"column": 16
},
"end": {
"line": 13,
"column": 20
}
},
"method": false,
"shorthand": true,
"computed": false,
"key": {
"type": "Identifier",
"start": 462,
"end": 466,
"loc": {
"start": {
"line": 13,
"column": 16
},
"end": {
"line": 13,
"column": 20
},
"identifierName": "name"
},
"name": "name"
},
"value": {
"type": "Identifier",
"start": 462,
"end": 466,
"loc": {
"start": {
"line": 13,
"column": 16
},
"end": {
"line": 13,
"column": 20
},
"identifierName": "name"
},
"name": "name"
},
"extra": {
"shorthand": true
}
},
{
"type": "ObjectProperty",
"start": 485,
"end": 491,
"loc": {
"start": {
"line": 14,
"column": 16
},
"end": {
"line": 14,
"column": 22
}
},
"method": false,
"shorthand": true,
"computed": false,
"key": {
"type": "Identifier",
"start": 485,
"end": 491,
"loc": {
"start": {
"line": 14,
"column": 16
},
"end": {
"line": 14,
"column": 22
},
"identifierName": "action"
},
"name": "action"
},
"value": {
"type": "Identifier",
"start": 485,
"end": 491,
"loc": {
"start": {
"line": 14,
"column": 16
},
"end": {
"line": 14,
"column": 22
},
"identifierName": "action"
},
"name": "action"
},
"extra": {
"shorthand": true
}
},
{
"type": "ObjectProperty",
"start": 510,
"end": 519,
"loc": {
"start": {
"line": 15,
"column": 16
},
"end": {
"line": 15,
"column": 25
}
},
"method": false,
"shorthand": true,
"computed": false,
"key": {
"type": "Identifier",
"start": 510,
"end": 519,
"loc": {
"start": {
"line": 15,
"column": 16
},
"end": {
"line": 15,
"column": 25
},
"identifierName": "namespace"
},
"name": "namespace"
},
"value": {
"type": "Identifier",
"start": 510,
"end": 519,
"loc": {
"start": {
"line": 15,
"column": 16
},
"end": {
"line": 15,
"column": 25
},
"identifierName": "namespace"
},
"name": "namespace"
},
"extra": {
"shorthand": true
}
},
{
"type": "ObjectProperty",
"start": 538,
"end": 544,
"loc": {
"start": {
"line": 16,
"column": 16
},
"end": {
"line": 16,
"column": 22
}
},
"method": false,
"shorthand": true,
"computed": false,
"key": {
"type": "Identifier",
"start": 538,
"end": 544,
"loc": {
"start": {
"line": 16,
"column": 16
},
"end": {
"line": 16,
"column": 22
},
"identifierName": "logger"
},
"name": "logger"
},
"value": {
"type": "Identifier",
"start": 538,
"end": 544,
"loc": {
"start": {
"line": 16,
"column": 16
},
"end": {
"line": 16,
"column": 22
},
"identifierName": "logger"
},
"name": "logger"
},
"extra": {
"shorthand": true
}
}
]
}
}