@xailabs/altx
Version:
Flux flavor based on alt.js
1,378 lines • 146 kB
JSON
{
"type": "File",
"start": 0,
"end": 859,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 27,
"column": 0
}
},
"program": {
"type": "Program",
"start": 0,
"end": 859,
"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": 857,
"loc": {
"start": {
"line": 4,
"column": 0
},
"end": {
"line": 26,
"column": 1
}
},
"declaration": {
"type": "FunctionDeclaration",
"start": 110,
"end": 857,
"loc": {
"start": {
"line": 4,
"column": 15
},
"end": {
"line": 26,
"column": 1
}
},
"id": {
"type": "Identifier",
"start": 119,
"end": 139,
"loc": {
"start": {
"line": 4,
"column": 24
},
"end": {
"line": 4,
"column": 44
},
"identifierName": "actionHandlerFactory"
},
"name": "actionHandlerFactory"
},
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "Identifier",
"start": 140,
"end": 146,
"loc": {
"start": {
"line": 4,
"column": 45
},
"end": {
"line": 4,
"column": 51
},
"identifierName": "action"
},
"name": "action"
},
{
"type": "AssignmentPattern",
"start": 148,
"end": 226,
"loc": {
"start": {
"line": 4,
"column": 53
},
"end": {
"line": 7,
"column": 4
}
},
"left": {
"type": "ObjectPattern",
"start": 148,
"end": 223,
"loc": {
"start": {
"line": 4,
"column": 53
},
"end": {
"line": 7,
"column": 1
}
},
"properties": [
{
"type": "ObjectProperty",
"start": 155,
"end": 173,
"loc": {
"start": {
"line": 5,
"column": 4
},
"end": {
"line": 5,
"column": 22
}
},
"method": false,
"shorthand": true,
"computed": false,
"key": {
"type": "Identifier",
"start": 155,
"end": 164,
"loc": {
"start": {
"line": 5,
"column": 4
},
"end": {
"line": 5,
"column": 13
},
"identifierName": "namespace"
},
"name": "namespace"
},
"value": {
"type": "AssignmentPattern",
"start": 155,
"end": 173,
"loc": {
"start": {
"line": 5,
"column": 4
},
"end": {
"line": 5,
"column": 22
}
},
"left": {
"type": "Identifier",
"start": 155,
"end": 164,
"loc": {
"start": {
"line": 5,
"column": 4
},
"end": {
"line": 5,
"column": 13
},
"identifierName": "namespace"
},
"name": "namespace"
},
"right": {
"type": "StringLiteral",
"start": 165,
"end": 173,
"loc": {
"start": {
"line": 5,
"column": 14
},
"end": {
"line": 5,
"column": 22
}
},
"extra": {
"rawValue": "global",
"raw": "'global'"
},
"value": "global"
}
},
"extra": {
"shorthand": true
}
},
{
"type": "ObjectProperty",
"start": 180,
"end": 220,
"loc": {
"start": {
"line": 6,
"column": 4
},
"end": {
"line": 6,
"column": 44
}
},
"method": false,
"shorthand": true,
"computed": false,
"key": {
"type": "Identifier",
"start": 180,
"end": 186,
"loc": {
"start": {
"line": 6,
"column": 4
},
"end": {
"line": 6,
"column": 10
},
"identifierName": "logger"
},
"name": "logger"
},
"value": {
"type": "AssignmentPattern",
"start": 180,
"end": 220,
"loc": {
"start": {
"line": 6,
"column": 4
},
"end": {
"line": 6,
"column": 44
}
},
"left": {
"type": "Identifier",
"start": 180,
"end": 186,
"loc": {
"start": {
"line": 6,
"column": 4
},
"end": {
"line": 6,
"column": 10
},
"identifierName": "logger"
},
"name": "logger"
},
"right": {
"type": "CallExpression",
"start": 187,
"end": 220,
"loc": {
"start": {
"line": 6,
"column": 11
},
"end": {
"line": 6,
"column": 44
}
},
"callee": {
"type": "Identifier",
"start": 187,
"end": 199,
"loc": {
"start": {
"line": 6,
"column": 11
},
"end": {
"line": 6,
"column": 23
},
"identifierName": "createLogger"
},
"name": "createLogger"
},
"arguments": [
{
"type": "LogicalExpression",
"start": 200,
"end": 219,
"loc": {
"start": {
"line": 6,
"column": 24
},
"end": {
"line": 6,
"column": 43
}
},
"left": {
"type": "MemberExpression",
"start": 200,
"end": 209,
"loc": {
"start": {
"line": 6,
"column": 24
},
"end": {
"line": 6,
"column": 33
}
},
"object": {
"type": "Identifier",
"start": 200,
"end": 206,
"loc": {
"start": {
"line": 6,
"column": 24
},
"end": {
"line": 6,
"column": 30
},
"identifierName": "action"
},
"name": "action"
},
"property": {
"type": "Identifier",
"start": 207,
"end": 209,
"loc": {
"start": {
"line": 6,
"column": 31
},
"end": {
"line": 6,
"column": 33
},
"identifierName": "id"
},
"name": "id"
},
"computed": false
},
"operator": "||",
"right": {
"type": "Identifier",
"start": 213,
"end": 219,
"loc": {
"start": {
"line": 6,
"column": 37
},
"end": {
"line": 6,
"column": 43
},
"identifierName": "action"
},
"name": "action"
}
}
]
}
},
"extra": {
"shorthand": true
}
}
]
},
"right": {
"type": "ObjectExpression",
"start": 224,
"end": 226,
"loc": {
"start": {
"line": 7,
"column": 2
},
"end": {
"line": 7,
"column": 4
}
},
"properties": []
}
}
],
"body": {
"type": "BlockStatement",
"start": 228,
"end": 857,
"loc": {
"start": {
"line": 7,
"column": 6
},
"end": {
"line": 26,
"column": 1
}
},
"body": [
{
"type": "VariableDeclaration",
"start": 235,
"end": 268,
"loc": {
"start": {
"line": 8,
"column": 4
},
"end": {
"line": 8,
"column": 37
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 241,
"end": 267,
"loc": {
"start": {
"line": 8,
"column": 10
},
"end": {
"line": 8,
"column": 36
}
},
"id": {
"type": "Identifier",
"start": 241,
"end": 245,
"loc": {
"start": {
"line": 8,
"column": 10
},
"end": {
"line": 8,
"column": 14
},
"identifierName": "name"
},
"name": "name"
},
"init": {
"type": "LogicalExpression",
"start": 248,
"end": 267,
"loc": {
"start": {
"line": 8,
"column": 17
},
"end": {
"line": 8,
"column": 36
}
},
"left": {
"type": "MemberExpression",
"start": 248,
"end": 257,
"loc": {
"start": {
"line": 8,
"column": 17
},
"end": {
"line": 8,
"column": 26
}
},
"object": {
"type": "Identifier",
"start": 248,
"end": 254,
"loc": {
"start": {
"line": 8,
"column": 17
},
"end": {
"line": 8,
"column": 23
},
"identifierName": "action"
},
"name": "action"
},
"property": {
"type": "Identifier",
"start": 255,
"end": 257,
"loc": {
"start": {
"line": 8,
"column": 24
},
"end": {
"line": 8,
"column": 26
},
"identifierName": "id"
},
"name": "id"
},
"computed": false
},
"operator": "||",
"right": {
"type": "Identifier",
"start": 261,
"end": 267,
"loc": {
"start": {
"line": 8,
"column": 30
},
"end": {
"line": 8,
"column": 36
},
"identifierName": "action"
},
"name": "action"
}
}
}
],
"kind": "const"
},
{
"type": "ExpressionStatement",
"start": 274,
"end": 362,
"loc": {
"start": {
"line": 9,
"column": 4
},
"end": {
"line": 9,
"column": 92
}
},
"expression": {
"type": "AssignmentExpression",
"start": 274,
"end": 361,
"loc": {
"start": {
"line": 9,
"column": 4
},
"end": {
"line": 9,
"column": 91
}
},
"operator": "=",
"left": {
"type": "Identifier",
"start": 274,
"end": 280,
"loc": {
"start": {
"line": 9,
"column": 4
},
"end": {
"line": 9,
"column": 10
},
"identifierName": "action"
},
"name": "action"
},
"right": {
"type": "ConditionalExpression",
"start": 283,
"end": 361,
"loc": {
"start": {
"line": 9,
"column": 13
},
"end": {
"line": 9,
"column": 91
}
},
"test": {
"type": "BinaryExpression",
"start": 283,
"end": 309,
"loc": {
"start": {
"line": 9,
"column": 13
},
"end": {
"line": 9,
"column": 39
}
},
"left": {
"type": "UnaryExpression",
"start": 283,
"end": 296,
"loc": {
"start": {
"line": 9,
"column": 13
},
"end": {
"line": 9,
"column": 26
}
},
"operator": "typeof",
"prefix": true,
"argument": {
"type": "Identifier",
"start": 290,
"end": 296,
"loc": {
"start": {
"line": 9,
"column": 20
},
"end": {
"line": 9,
"column": 26
},
"identifierName": "action"
},
"name": "action"
},
"extra": {
"parenthesizedArgument": false
}
},
"operator": "===",
"right": {
"type": "StringLiteral",
"start": 301,
"end": 309,
"loc": {
"start": {
"line": 9,
"column": 31
},
"end": {
"line": 9,
"column": 39
}
},
"extra": {
"rawValue": "string",
"raw": "'string'"
},
"value": "string"
}
},
"consequent": {
"type": "MemberExpression",
"start": 312,
"end": 352,
"loc": {
"start": {
"line": 9,
"column": 42
},
"end": {
"line": 9,
"column": 82
}
},
"object": {
"type": "CallExpression",
"start": 312,
"end": 344,
"loc": {
"start": {
"line": 9,
"column": 42
},
"end": {
"line": 9,
"column": 74
}
},
"callee": {
"type": "Identifier",
"start": 312,
"end": 325,
"loc": {
"start": {
"line": 9,
"column": 42
},
"end": {
"line": 9,
"column": 55
},
"identifierName": "createActions"
},
"name": "createActions"
},
"arguments": [
{
"type": "Identifier",
"start": 326,
"end": 335,
"loc": {
"start": {
"line": 9,
"column": 56
},
"end": {
"line": 9,
"column": 65
},
"identifierName": "namespace"
},
"name": "namespace"
},
{
"type": "Identifier",
"start": 337,
"end": 343,
"loc": {
"start": {
"line": 9,
"column": 67
},
"end": {
"line": 9,
"column": 73
},
"identifierName": "action"
},
"name": "action"
}
]
},
"property": {
"type": "Identifier",
"start": 345,
"end": 351,
"loc": {
"start": {
"line": 9,
"column": 75
},
"end": {
"line": 9,
"column": 81
},
"identifierName": "action"
},
"name": "action"
},
"computed": true
},
"alternate": {
"type": "Identifier",
"start": 355,
"end": 361,
"loc": {
"start": {
"line": 9,
"column": 85
},
"end": {
"line": 9,
"column": 91
},
"identifierName": "action"
},
"name": "action"
}
}
}
},
{
"type": "ReturnStatement",
"start": 368,
"end": 854,
"loc": {
"start": {
"line": 10,
"column": 4
},
"end": {
"line": 25,
"column": 6
}
},
"argument": {
"type": "ObjectExpression",
"start": 375,
"end": 853,
"loc": {
"start": {
"line": 10,
"column": 11
},
"end": {
"line": 25,
"column": 5
}
},
"properties": [
{
"type": "ObjectProperty",
"start": 386,
"end": 846,
"loc": {
"start": {
"line": 11,
"column": 8
},
"end": {
"line": 24,
"column": 9
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 386,
"end": 392,
"loc": {
"start": {
"line": 11,
"column": 8
},
"end": {
"line": 11,
"column": 14
},
"identifierName": "create"
},
"name": "create"
},
"value": {
"type": "ArrowFunctionExpression",
"start": 394,
"end": 846,
"loc": {
"start": {
"line": 11,
"column": 16
},
"end": {
"line": 24,
"column": 9
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "Identifier",
"start": 395,
"end": 411,
"loc": {
"start": {
"line": 11,
"column": 17
},
"end": {
"line": 11,
"column": 33
},
"identifierName": "createDefinition"
},
"name": "createDefinition"
}
],
"body": {
"type": "BlockStatement",
"start": 416,
"end": 846,
"loc": {
"start": {
"line": 11,
"column": 38
},
"end": {
"line": 24,
"column": 9
}
},
"body": [
{
"type": "VariableDeclaration",
"start": 431,
"end": 567,
"loc": {
"start": {
"line": 12,
"column": 12
},
"end": {
"line": 17,
"column": 14
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 437,
"end": 566,
"loc": {
"start": {
"line": 12,
"column": 18
},
"end": {
"line": 17,
"column": 13
}
},
"id": {
"type": "Identifier",
"start": 437,
"end": 447,
"loc": {
"start": {
"line": 12,
"column": 18
},
"end": {
"line": 12,
"column": 28
},
"identifierName": "definition"
},
"name": "definition"
},
"init": {
"type": "ObjectExpression",
"start": 450,
"end": 566,
"loc": {
"start": {
"line": 12,
"column": 31
},
"end": {
"line": 17,
"column": 13
}
},
"properties": [
{
"type": "ObjectProperty",
"start": 469,
"end": 473,
"loc": {
"start": {
"line": 13,
"column": 16
},
"end": {
"line": 13,
"column": 20
}
},
"method": false,
"shorthand": true,
"computed": false,
"key": {
"type": "Identifier",
"start": 469,
"end": 473,
"loc": {
"start": {
"line": 13,
"column": 16
},
"end": {
"line": 13,
"column": 20
},
"identifierName": "name"
},
"name": "name"
},
"value": {
"type": "Identifier",
"start": 469,
"end": 473,
"loc": {
"start": {
"line": 13,
"column": 16
},
"end": {
"line": 13,
"column": 20
},
"identifierName": "name"
},
"name": "name"
},
"extra": {
"shorthand": true
}
},
{
"type": "ObjectProperty",
"start": 492,
"end": 498,
"loc": {
"start": {
"line": 14,
"column": 16
},
"end": {
"line": 14,
"column": 22
}
},
"method": false,
"shorthand": true,
"computed": false,
"key": {
"type": "Identifier",
"start": 492,
"end": 498,
"loc": {
"start": {
"line": 14,
"column": 16
},
"end": {
"line": 14,
"column": 22
},
"identifierName": "action"
},
"name": "action"
},
"value": {
"type": "Identifier",
"start": 492,
"end": 498,
"loc": {
"start": {
"line": 14,
"column": 16
},
"end": {
"line": 14,
"column": 22
},
"identifierName": "action"
},
"name": "action"
},
"extra": {
"shorthand": true
}
},
{
"type": "ObjectProperty",
"start": 517,
"end": 526,
"loc": {
"start": {
"line": 15,
"column": 16
},
"end": {
"line": 15,
"column": 25
}
},
"method": false,
"shorthand": true,
"computed": false,
"key": {
"type": "Identifier",
"start": 517,
"end": 526,
"loc": {
"start": {
"line": 15,
"column": 16
},
"end": {
"line": 15,
"column": 25
},
"identifierName": "namespace"
},
"name": "namespace"
},
"value": {
"type": "Identifier",
"start": 517,
"end": 526,
"loc": {
"start": {
"line": 15,
"column": 16
},
"end": {
"line": 15,
"column": 25
},
"identifierName": "namespace"
},
"name": "namespace"
},
"extra": {
"shorthand": true
}
},
{
"type": "ObjectProperty",
"start": 545,
"end": 551,
"loc": {
"start": {
"line": 16,
"column": 16
},
"end": {
"line": 16,
"column": 22
}
},
"method": false,
"shorthand": true,
"computed": false,
"key": {
"type": "Identifier",
"start": 545,
"end": 551,
"loc": {
"start": {
"line": 16,
"column": 16
},
"end": {
"line": 16,
"column": 22
},
"identifierName": "logger"
},
"name": "logger"
},
"value": {
"type": "Identifier",
"start": 545,
"end": 551,
"loc": {
"start": {
"line": 16,
"column": 16
},
"end": {
"line": 16,
"column": 22
},
"identifierName": "logger"
},
"name": "logger"
},
"extra": {
"shorthand": true
}
}
]
}
}