@xailabs/altx
Version:
Flux flavor based on alt.js
1,352 lines (1,351 loc) • 152 kB
JSON
{
"type": "File",
"start": 0,
"end": 855,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 27,
"column": 0
}
},
"program": {
"type": "Program",
"start": 0,
"end": 855,
"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": 853,
"loc": {
"start": {
"line": 4,
"column": 0
},
"end": {
"line": 26,
"column": 1
}
},
"declaration": {
"type": "FunctionDeclaration",
"start": 110,
"end": 853,
"loc": {
"start": {
"line": 4,
"column": 15
},
"end": {
"line": 26,
"column": 1
}
},
"id": {
"type": "Identifier",
"start": 119,
"end": 135,
"loc": {
"start": {
"line": 4,
"column": 24
},
"end": {
"line": 4,
"column": 40
},
"identifierName": "createViewAction"
},
"name": "createViewAction"
},
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "Identifier",
"start": 136,
"end": 142,
"loc": {
"start": {
"line": 4,
"column": 41
},
"end": {
"line": 4,
"column": 47
},
"identifierName": "action"
},
"name": "action"
},
{
"type": "AssignmentPattern",
"start": 144,
"end": 222,
"loc": {
"start": {
"line": 4,
"column": 49
},
"end": {
"line": 7,
"column": 4
}
},
"left": {
"type": "ObjectPattern",
"start": 144,
"end": 219,
"loc": {
"start": {
"line": 4,
"column": 49
},
"end": {
"line": 7,
"column": 1
}
},
"properties": [
{
"type": "ObjectProperty",
"start": 151,
"end": 169,
"loc": {
"start": {
"line": 5,
"column": 4
},
"end": {
"line": 5,
"column": 22
}
},
"method": false,
"shorthand": true,
"computed": false,
"key": {
"type": "Identifier",
"start": 151,
"end": 160,
"loc": {
"start": {
"line": 5,
"column": 4
},
"end": {
"line": 5,
"column": 13
},
"identifierName": "namespace"
},
"name": "namespace"
},
"value": {
"type": "AssignmentPattern",
"start": 151,
"end": 169,
"loc": {
"start": {
"line": 5,
"column": 4
},
"end": {
"line": 5,
"column": 22
}
},
"left": {
"type": "Identifier",
"start": 151,
"end": 160,
"loc": {
"start": {
"line": 5,
"column": 4
},
"end": {
"line": 5,
"column": 13
},
"identifierName": "namespace"
},
"name": "namespace"
},
"right": {
"type": "StringLiteral",
"start": 161,
"end": 169,
"loc": {
"start": {
"line": 5,
"column": 14
},
"end": {
"line": 5,
"column": 22
}
},
"extra": {
"rawValue": "global",
"raw": "'global'"
},
"value": "global"
}
},
"extra": {
"shorthand": true
}
},
{
"type": "ObjectProperty",
"start": 176,
"end": 216,
"loc": {
"start": {
"line": 6,
"column": 4
},
"end": {
"line": 6,
"column": 44
}
},
"method": false,
"shorthand": true,
"computed": false,
"key": {
"type": "Identifier",
"start": 176,
"end": 182,
"loc": {
"start": {
"line": 6,
"column": 4
},
"end": {
"line": 6,
"column": 10
},
"identifierName": "logger"
},
"name": "logger"
},
"value": {
"type": "AssignmentPattern",
"start": 176,
"end": 216,
"loc": {
"start": {
"line": 6,
"column": 4
},
"end": {
"line": 6,
"column": 44
}
},
"left": {
"type": "Identifier",
"start": 176,
"end": 182,
"loc": {
"start": {
"line": 6,
"column": 4
},
"end": {
"line": 6,
"column": 10
},
"identifierName": "logger"
},
"name": "logger"
},
"right": {
"type": "CallExpression",
"start": 183,
"end": 216,
"loc": {
"start": {
"line": 6,
"column": 11
},
"end": {
"line": 6,
"column": 44
}
},
"callee": {
"type": "Identifier",
"start": 183,
"end": 195,
"loc": {
"start": {
"line": 6,
"column": 11
},
"end": {
"line": 6,
"column": 23
},
"identifierName": "createLogger"
},
"name": "createLogger"
},
"arguments": [
{
"type": "LogicalExpression",
"start": 196,
"end": 215,
"loc": {
"start": {
"line": 6,
"column": 24
},
"end": {
"line": 6,
"column": 43
}
},
"left": {
"type": "MemberExpression",
"start": 196,
"end": 205,
"loc": {
"start": {
"line": 6,
"column": 24
},
"end": {
"line": 6,
"column": 33
}
},
"object": {
"type": "Identifier",
"start": 196,
"end": 202,
"loc": {
"start": {
"line": 6,
"column": 24
},
"end": {
"line": 6,
"column": 30
},
"identifierName": "action"
},
"name": "action"
},
"property": {
"type": "Identifier",
"start": 203,
"end": 205,
"loc": {
"start": {
"line": 6,
"column": 31
},
"end": {
"line": 6,
"column": 33
},
"identifierName": "id"
},
"name": "id"
},
"computed": false
},
"operator": "||",
"right": {
"type": "Identifier",
"start": 209,
"end": 215,
"loc": {
"start": {
"line": 6,
"column": 37
},
"end": {
"line": 6,
"column": 43
},
"identifierName": "action"
},
"name": "action"
}
}
]
}
},
"extra": {
"shorthand": true
}
}
]
},
"right": {
"type": "ObjectExpression",
"start": 220,
"end": 222,
"loc": {
"start": {
"line": 7,
"column": 2
},
"end": {
"line": 7,
"column": 4
}
},
"properties": []
}
}
],
"body": {
"type": "BlockStatement",
"start": 224,
"end": 853,
"loc": {
"start": {
"line": 7,
"column": 6
},
"end": {
"line": 26,
"column": 1
}
},
"body": [
{
"type": "VariableDeclaration",
"start": 231,
"end": 264,
"loc": {
"start": {
"line": 8,
"column": 4
},
"end": {
"line": 8,
"column": 37
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 237,
"end": 263,
"loc": {
"start": {
"line": 8,
"column": 10
},
"end": {
"line": 8,
"column": 36
}
},
"id": {
"type": "Identifier",
"start": 237,
"end": 241,
"loc": {
"start": {
"line": 8,
"column": 10
},
"end": {
"line": 8,
"column": 14
},
"identifierName": "name"
},
"name": "name"
},
"init": {
"type": "LogicalExpression",
"start": 244,
"end": 263,
"loc": {
"start": {
"line": 8,
"column": 17
},
"end": {
"line": 8,
"column": 36
}
},
"left": {
"type": "MemberExpression",
"start": 244,
"end": 253,
"loc": {
"start": {
"line": 8,
"column": 17
},
"end": {
"line": 8,
"column": 26
}
},
"object": {
"type": "Identifier",
"start": 244,
"end": 250,
"loc": {
"start": {
"line": 8,
"column": 17
},
"end": {
"line": 8,
"column": 23
},
"identifierName": "action"
},
"name": "action"
},
"property": {
"type": "Identifier",
"start": 251,
"end": 253,
"loc": {
"start": {
"line": 8,
"column": 24
},
"end": {
"line": 8,
"column": 26
},
"identifierName": "id"
},
"name": "id"
},
"computed": false
},
"operator": "||",
"right": {
"type": "Identifier",
"start": 257,
"end": 263,
"loc": {
"start": {
"line": 8,
"column": 30
},
"end": {
"line": 8,
"column": 36
},
"identifierName": "action"
},
"name": "action"
}
}
}
],
"kind": "const"
},
{
"type": "ExpressionStatement",
"start": 270,
"end": 358,
"loc": {
"start": {
"line": 9,
"column": 4
},
"end": {
"line": 9,
"column": 92
}
},
"expression": {
"type": "AssignmentExpression",
"start": 270,
"end": 357,
"loc": {
"start": {
"line": 9,
"column": 4
},
"end": {
"line": 9,
"column": 91
}
},
"operator": "=",
"left": {
"type": "Identifier",
"start": 270,
"end": 276,
"loc": {
"start": {
"line": 9,
"column": 4
},
"end": {
"line": 9,
"column": 10
},
"identifierName": "action"
},
"name": "action"
},
"right": {
"type": "ConditionalExpression",
"start": 279,
"end": 357,
"loc": {
"start": {
"line": 9,
"column": 13
},
"end": {
"line": 9,
"column": 91
}
},
"test": {
"type": "BinaryExpression",
"start": 279,
"end": 305,
"loc": {
"start": {
"line": 9,
"column": 13
},
"end": {
"line": 9,
"column": 39
}
},
"left": {
"type": "UnaryExpression",
"start": 279,
"end": 292,
"loc": {
"start": {
"line": 9,
"column": 13
},
"end": {
"line": 9,
"column": 26
}
},
"operator": "typeof",
"prefix": true,
"argument": {
"type": "Identifier",
"start": 286,
"end": 292,
"loc": {
"start": {
"line": 9,
"column": 20
},
"end": {
"line": 9,
"column": 26
},
"identifierName": "action"
},
"name": "action"
},
"extra": {
"parenthesizedArgument": false
}
},
"operator": "===",
"right": {
"type": "StringLiteral",
"start": 297,
"end": 305,
"loc": {
"start": {
"line": 9,
"column": 31
},
"end": {
"line": 9,
"column": 39
}
},
"extra": {
"rawValue": "string",
"raw": "'string'"
},
"value": "string"
}
},
"consequent": {
"type": "MemberExpression",
"start": 308,
"end": 348,
"loc": {
"start": {
"line": 9,
"column": 42
},
"end": {
"line": 9,
"column": 82
}
},
"object": {
"type": "CallExpression",
"start": 308,
"end": 340,
"loc": {
"start": {
"line": 9,
"column": 42
},
"end": {
"line": 9,
"column": 74
}
},
"callee": {
"type": "Identifier",
"start": 308,
"end": 321,
"loc": {
"start": {
"line": 9,
"column": 42
},
"end": {
"line": 9,
"column": 55
},
"identifierName": "createActions"
},
"name": "createActions"
},
"arguments": [
{
"type": "Identifier",
"start": 322,
"end": 331,
"loc": {
"start": {
"line": 9,
"column": 56
},
"end": {
"line": 9,
"column": 65
},
"identifierName": "namespace"
},
"name": "namespace"
},
{
"type": "Identifier",
"start": 333,
"end": 339,
"loc": {
"start": {
"line": 9,
"column": 67
},
"end": {
"line": 9,
"column": 73
},
"identifierName": "action"
},
"name": "action"
}
]
},
"property": {
"type": "Identifier",
"start": 341,
"end": 347,
"loc": {
"start": {
"line": 9,
"column": 75
},
"end": {
"line": 9,
"column": 81
},
"identifierName": "action"
},
"name": "action"
},
"computed": true
},
"alternate": {
"type": "Identifier",
"start": 351,
"end": 357,
"loc": {
"start": {
"line": 9,
"column": 85
},
"end": {
"line": 9,
"column": 91
},
"identifierName": "action"
},
"name": "action"
}
}
}
},
{
"type": "ReturnStatement",
"start": 364,
"end": 850,
"loc": {
"start": {
"line": 10,
"column": 4
},
"end": {
"line": 25,
"column": 6
}
},
"argument": {
"type": "ObjectExpression",
"start": 371,
"end": 849,
"loc": {
"start": {
"line": 10,
"column": 11
},
"end": {
"line": 25,
"column": 5
}
},
"properties": [
{
"type": "ObjectProperty",
"start": 382,
"end": 842,
"loc": {
"start": {
"line": 11,
"column": 8
},
"end": {
"line": 24,
"column": 9
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 382,
"end": 388,
"loc": {
"start": {
"line": 11,
"column": 8
},
"end": {
"line": 11,
"column": 14
},
"identifierName": "define"
},
"name": "define"
},
"value": {
"type": "ArrowFunctionExpression",
"start": 390,
"end": 842,
"loc": {
"start": {
"line": 11,
"column": 16
},
"end": {
"line": 24,
"column": 9
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "Identifier",
"start": 391,
"end": 407,
"loc": {
"start": {
"line": 11,
"column": 17
},
"end": {
"line": 11,
"column": 33
},
"identifierName": "createDefinition"
},
"name": "createDefinition"
}
],
"body": {
"type": "BlockStatement",
"start": 412,
"end": 842,
"loc": {
"start": {
"line": 11,
"column": 38
},
"end": {
"line": 24,
"column": 9
}
},
"body": [
{
"type": "VariableDeclaration",
"start": 427,
"end": 563,
"loc": {
"start": {
"line": 12,
"column": 12
},
"end": {
"line": 17,
"column": 14
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 433,
"end": 562,
"loc": {
"start": {
"line": 12,
"column": 18
},
"end": {
"line": 17,
"column": 13
}
},
"id": {
"type": "Identifier",
"start": 433,
"end": 443,
"loc": {
"start": {
"line": 12,
"column": 18
},
"end": {
"line": 12,
"column": 28
},
"identifierName": "definition"
},
"name": "definition"
},
"init": {
"type": "ObjectExpression",
"start": 446,
"end": 562,
"loc": {
"start": {
"line": 12,
"column": 31
},
"end": {
"line": 17,
"column": 13
}
},
"properties": [
{
"type": "ObjectProperty",
"start": 465,
"end": 469,
"loc": {
"start": {
"line": 13,
"column": 16
},
"end": {
"line": 13,
"column": 20
}
},
"method": false,
"shorthand": true,
"computed": false,
"key": {
"type": "Identifier",
"start": 465,
"end": 469,
"loc": {
"start": {
"line": 13,
"column": 16
},
"end": {
"line": 13,
"column": 20
},
"identifierName": "name"
},
"name": "name"
},
"value": {
"type": "Identifier",
"start": 465,
"end": 469,
"loc": {
"start": {
"line": 13,
"column": 16
},
"end": {
"line": 13,
"column": 20
},
"identifierName": "name"
},
"name": "name"
},
"extra": {
"shorthand": true
}
},
{
"type": "ObjectProperty",
"start": 488,
"end": 494,
"loc": {
"start": {
"line": 14,
"column": 16
},
"end": {
"line": 14,
"column": 22
}
},
"method": false,
"shorthand": true,
"computed": false,
"key": {
"type": "Identifier",
"start": 488,
"end": 494,
"loc": {
"start": {
"line": 14,
"column": 16
},
"end": {
"line": 14,
"column": 22
},
"identifierName": "action"
},
"name": "action"
},
"value": {
"type": "Identifier",
"start": 488,
"end": 494,
"loc": {
"start": {
"line": 14,
"column": 16
},
"end": {
"line": 14,
"column": 22
},
"identifierName": "action"
},
"name": "action"
},
"extra": {
"shorthand": true
}
},
{
"type": "ObjectProperty",
"start": 513,
"end": 522,
"loc": {
"start": {
"line": 15,
"column": 16
},
"end": {
"line": 15,
"column": 25
}
},
"method": false,
"shorthand": true,
"computed": false,
"key": {
"type": "Identifier",
"start": 513,
"end": 522,
"loc": {
"start": {
"line": 15,
"column": 16
},
"end": {
"line": 15,
"column": 25
},
"identifierName": "namespace"
},
"name": "namespace"
},
"value": {
"type": "Identifier",
"start": 513,
"end": 522,
"loc": {
"start": {
"line": 15,
"column": 16
},
"end": {
"line": 15,
"column": 25
},
"identifierName": "namespace"
},
"name": "namespace"
},
"extra": {
"shorthand": true
}
},
{
"type": "ObjectProperty",
"start": 541,
"end": 547,
"loc": {
"start": {
"line": 16,
"column": 16
},
"end": {
"line": 16,
"column": 22
}
},
"method": false,
"shorthand": true,
"computed": false,
"key": {
"type": "Identifier",
"start": 541,
"end": 547,
"loc": {
"start": {
"line": 16,
"column": 16
},
"end": {
"line": 16,
"column": 22
},
"identifierName": "logger"