mirror of
https://github.com/swc-project/swc.git
synced 2024-11-28 02:29:04 +03:00
469 lines
15 KiB
JSON
469 lines
15 KiB
JSON
{
|
|
"type": "Script",
|
|
"span": {
|
|
"start": 1,
|
|
"end": 293,
|
|
"ctxt": 0
|
|
},
|
|
"body": [
|
|
{
|
|
"type": "ExpressionStatement",
|
|
"span": {
|
|
"start": 1,
|
|
"end": 14,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "StringLiteral",
|
|
"span": {
|
|
"start": 1,
|
|
"end": 13,
|
|
"ctxt": 0
|
|
},
|
|
"value": "use strict",
|
|
"raw": "\"use strict\""
|
|
}
|
|
},
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"span": {
|
|
"start": 15,
|
|
"end": 49,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "var",
|
|
"declare": false,
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"span": {
|
|
"start": 19,
|
|
"end": 48,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 19,
|
|
"end": 25,
|
|
"ctxt": 0
|
|
},
|
|
"value": "config",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"init": {
|
|
"type": "CallExpression",
|
|
"span": {
|
|
"start": 28,
|
|
"end": 48,
|
|
"ctxt": 0
|
|
},
|
|
"callee": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 28,
|
|
"end": 35,
|
|
"ctxt": 0
|
|
},
|
|
"value": "require",
|
|
"optional": false
|
|
},
|
|
"arguments": [
|
|
{
|
|
"spread": null,
|
|
"expression": {
|
|
"type": "StringLiteral",
|
|
"span": {
|
|
"start": 36,
|
|
"end": 47,
|
|
"ctxt": 0
|
|
},
|
|
"value": "../config",
|
|
"raw": "\"../config\""
|
|
}
|
|
}
|
|
],
|
|
"typeArguments": null
|
|
},
|
|
"definite": false
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "ExpressionStatement",
|
|
"span": {
|
|
"start": 50,
|
|
"end": 293,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "AssignmentExpression",
|
|
"span": {
|
|
"start": 50,
|
|
"end": 293,
|
|
"ctxt": 0
|
|
},
|
|
"operator": "=",
|
|
"left": {
|
|
"type": "MemberExpression",
|
|
"span": {
|
|
"start": 50,
|
|
"end": 70,
|
|
"ctxt": 0
|
|
},
|
|
"object": {
|
|
"type": "MemberExpression",
|
|
"span": {
|
|
"start": 50,
|
|
"end": 64,
|
|
"ctxt": 0
|
|
},
|
|
"object": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 50,
|
|
"end": 56,
|
|
"ctxt": 0
|
|
},
|
|
"value": "module",
|
|
"optional": false
|
|
},
|
|
"property": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 57,
|
|
"end": 64,
|
|
"ctxt": 0
|
|
},
|
|
"value": "exports",
|
|
"optional": false
|
|
}
|
|
},
|
|
"property": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 65,
|
|
"end": 70,
|
|
"ctxt": 0
|
|
},
|
|
"value": "route",
|
|
"optional": false
|
|
}
|
|
},
|
|
"right": {
|
|
"type": "FunctionExpression",
|
|
"identifier": null,
|
|
"params": [
|
|
{
|
|
"type": "Parameter",
|
|
"span": {
|
|
"start": 83,
|
|
"end": 89,
|
|
"ctxt": 0
|
|
},
|
|
"decorators": [],
|
|
"pat": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 83,
|
|
"end": 89,
|
|
"ctxt": 0
|
|
},
|
|
"value": "server",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
}
|
|
}
|
|
],
|
|
"decorators": [],
|
|
"span": {
|
|
"start": 73,
|
|
"end": 293,
|
|
"ctxt": 0
|
|
},
|
|
"body": {
|
|
"type": "BlockStatement",
|
|
"span": {
|
|
"start": 91,
|
|
"end": 293,
|
|
"ctxt": 0
|
|
},
|
|
"stmts": [
|
|
{
|
|
"type": "ExpressionStatement",
|
|
"span": {
|
|
"start": 119,
|
|
"end": 291,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "CallExpression",
|
|
"span": {
|
|
"start": 119,
|
|
"end": 290,
|
|
"ctxt": 0
|
|
},
|
|
"callee": {
|
|
"type": "MemberExpression",
|
|
"span": {
|
|
"start": 119,
|
|
"end": 129,
|
|
"ctxt": 0
|
|
},
|
|
"object": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 119,
|
|
"end": 125,
|
|
"ctxt": 0
|
|
},
|
|
"value": "server",
|
|
"optional": false
|
|
},
|
|
"property": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 126,
|
|
"end": 129,
|
|
"ctxt": 0
|
|
},
|
|
"value": "get",
|
|
"optional": false
|
|
}
|
|
},
|
|
"arguments": [
|
|
{
|
|
"spread": null,
|
|
"expression": {
|
|
"type": "BinaryExpression",
|
|
"span": {
|
|
"start": 130,
|
|
"end": 165,
|
|
"ctxt": 0
|
|
},
|
|
"operator": "+",
|
|
"left": {
|
|
"type": "MemberExpression",
|
|
"span": {
|
|
"start": 130,
|
|
"end": 149,
|
|
"ctxt": 0
|
|
},
|
|
"object": {
|
|
"type": "MemberExpression",
|
|
"span": {
|
|
"start": 130,
|
|
"end": 140,
|
|
"ctxt": 0
|
|
},
|
|
"object": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 130,
|
|
"end": 136,
|
|
"ctxt": 0
|
|
},
|
|
"value": "config",
|
|
"optional": false
|
|
},
|
|
"property": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 137,
|
|
"end": 140,
|
|
"ctxt": 0
|
|
},
|
|
"value": "env",
|
|
"optional": false
|
|
}
|
|
},
|
|
"property": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 141,
|
|
"end": 149,
|
|
"ctxt": 0
|
|
},
|
|
"value": "siteRoot",
|
|
"optional": false
|
|
}
|
|
},
|
|
"right": {
|
|
"type": "StringLiteral",
|
|
"span": {
|
|
"start": 152,
|
|
"end": 165,
|
|
"ctxt": 0
|
|
},
|
|
"value": "/auth/login",
|
|
"raw": "\"/auth/login\""
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"spread": null,
|
|
"expression": {
|
|
"type": "FunctionExpression",
|
|
"identifier": null,
|
|
"params": [
|
|
{
|
|
"type": "Parameter",
|
|
"span": {
|
|
"start": 177,
|
|
"end": 180,
|
|
"ctxt": 0
|
|
},
|
|
"decorators": [],
|
|
"pat": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 177,
|
|
"end": 180,
|
|
"ctxt": 0
|
|
},
|
|
"value": "req",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
}
|
|
},
|
|
{
|
|
"type": "Parameter",
|
|
"span": {
|
|
"start": 182,
|
|
"end": 185,
|
|
"ctxt": 0
|
|
},
|
|
"decorators": [],
|
|
"pat": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 182,
|
|
"end": 185,
|
|
"ctxt": 0
|
|
},
|
|
"value": "res",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
}
|
|
},
|
|
{
|
|
"type": "Parameter",
|
|
"span": {
|
|
"start": 187,
|
|
"end": 191,
|
|
"ctxt": 0
|
|
},
|
|
"decorators": [],
|
|
"pat": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 187,
|
|
"end": 191,
|
|
"ctxt": 0
|
|
},
|
|
"value": "next",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
}
|
|
}
|
|
],
|
|
"decorators": [],
|
|
"span": {
|
|
"start": 167,
|
|
"end": 289,
|
|
"ctxt": 0
|
|
},
|
|
"body": {
|
|
"type": "BlockStatement",
|
|
"span": {
|
|
"start": 193,
|
|
"end": 289,
|
|
"ctxt": 0
|
|
},
|
|
"stmts": [
|
|
{
|
|
"type": "ExpressionStatement",
|
|
"span": {
|
|
"start": 259,
|
|
"end": 286,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "CallExpression",
|
|
"span": {
|
|
"start": 259,
|
|
"end": 285,
|
|
"ctxt": 0
|
|
},
|
|
"callee": {
|
|
"type": "MemberExpression",
|
|
"span": {
|
|
"start": 259,
|
|
"end": 271,
|
|
"ctxt": 0
|
|
},
|
|
"object": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 259,
|
|
"end": 262,
|
|
"ctxt": 0
|
|
},
|
|
"value": "req",
|
|
"optional": false
|
|
},
|
|
"property": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 263,
|
|
"end": 271,
|
|
"ctxt": 0
|
|
},
|
|
"value": "redirect",
|
|
"optional": false
|
|
}
|
|
},
|
|
"arguments": [
|
|
{
|
|
"spread": null,
|
|
"expression": {
|
|
"type": "StringLiteral",
|
|
"span": {
|
|
"start": 272,
|
|
"end": 284,
|
|
"ctxt": 0
|
|
},
|
|
"value": "/auth/live",
|
|
"raw": "\"/auth/live\""
|
|
}
|
|
}
|
|
],
|
|
"typeArguments": null
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"generator": false,
|
|
"async": false,
|
|
"typeParameters": null,
|
|
"returnType": null
|
|
}
|
|
}
|
|
],
|
|
"typeArguments": null
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"generator": false,
|
|
"async": false,
|
|
"typeParameters": null,
|
|
"returnType": null
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"interpreter": null
|
|
}
|