backed-cli
Version:
The official command line interface for Backed
1,550 lines (1,549 loc) • 158 kB
JSON
{
"type": "File",
"start": 0,
"end": 416,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 26,
"column": 0
}
},
"program": {
"type": "Program",
"start": 0,
"end": 416,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 26,
"column": 0
}
},
"sourceType": "module",
"body": [
{
"type": "VariableDeclaration",
"start": 14,
"end": 45,
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 2,
"column": 31
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 20,
"end": 44,
"loc": {
"start": {
"line": 2,
"column": 6
},
"end": {
"line": 2,
"column": 30
}
},
"id": {
"type": "Identifier",
"start": 20,
"end": 25,
"loc": {
"start": {
"line": 2,
"column": 6
},
"end": {
"line": 2,
"column": 11
},
"identifierName": "chalk"
},
"name": "chalk"
},
"init": {
"type": "CallExpression",
"start": 28,
"end": 44,
"loc": {
"start": {
"line": 2,
"column": 14
},
"end": {
"line": 2,
"column": 30
}
},
"callee": {
"type": "Identifier",
"start": 28,
"end": 35,
"loc": {
"start": {
"line": 2,
"column": 14
},
"end": {
"line": 2,
"column": 21
},
"identifierName": "require"
},
"name": "require"
},
"arguments": [
{
"type": "StringLiteral",
"start": 36,
"end": 43,
"loc": {
"start": {
"line": 2,
"column": 22
},
"end": {
"line": 2,
"column": 29
}
},
"extra": {
"rawValue": "chalk",
"raw": "'chalk'"
},
"value": "chalk"
}
]
}
}
],
"kind": "const"
},
{
"type": "Identifier",
"start": 46,
"end": 386,
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 24,
"column": 1
}
},
"id": {
"type": "Identifier",
"start": 52,
"end": 58,
"loc": {
"start": {
"line": 3,
"column": 6
},
"end": {
"line": 3,
"column": 12
},
"identifierName": "Logger"
},
"name": "Logger"
},
"superClass": null,
"body": {
"type": "ClassBody",
"start": 59,
"end": 386,
"loc": {
"start": {
"line": 3,
"column": 13
},
"end": {
"line": 24,
"column": 1
}
},
"body": [
{
"type": "ClassMethod",
"start": 63,
"end": 129,
"loc": {
"start": {
"line": 4,
"column": 2
},
"end": {
"line": 6,
"column": 3
}
},
"computed": false,
"key": {
"type": "Identifier",
"start": 63,
"end": 69,
"loc": {
"start": {
"line": 4,
"column": 2
},
"end": {
"line": 4,
"column": 8
},
"identifierName": "_chalk"
},
"name": "_chalk"
},
"static": false,
"kind": "method",
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "Identifier",
"start": 70,
"end": 74,
"loc": {
"start": {
"line": 4,
"column": 9
},
"end": {
"line": 4,
"column": 13
},
"identifierName": "text"
},
"name": "text"
},
{
"type": "AssignmentPattern",
"start": 76,
"end": 91,
"loc": {
"start": {
"line": 4,
"column": 15
},
"end": {
"line": 4,
"column": 30
}
},
"left": {
"type": "Identifier",
"start": 76,
"end": 81,
"loc": {
"start": {
"line": 4,
"column": 15
},
"end": {
"line": 4,
"column": 20
},
"identifierName": "color"
},
"name": "color"
},
"right": {
"type": "StringLiteral",
"start": 84,
"end": 91,
"loc": {
"start": {
"line": 4,
"column": 23
},
"end": {
"line": 4,
"column": 30
}
},
"extra": {
"rawValue": "white",
"raw": "'white'"
},
"value": "white"
}
}
],
"body": {
"type": "BlockStatement",
"start": 93,
"end": 129,
"loc": {
"start": {
"line": 4,
"column": 32
},
"end": {
"line": 6,
"column": 3
}
},
"body": [
{
"type": "ReturnStatement",
"start": 99,
"end": 125,
"loc": {
"start": {
"line": 5,
"column": 4
},
"end": {
"line": 5,
"column": 30
}
},
"argument": {
"type": "CallExpression",
"start": 106,
"end": 124,
"loc": {
"start": {
"line": 5,
"column": 11
},
"end": {
"line": 5,
"column": 29
}
},
"callee": {
"type": "MemberExpression",
"start": 106,
"end": 118,
"loc": {
"start": {
"line": 5,
"column": 11
},
"end": {
"line": 5,
"column": 23
}
},
"object": {
"type": "Identifier",
"start": 106,
"end": 111,
"loc": {
"start": {
"line": 5,
"column": 11
},
"end": {
"line": 5,
"column": 16
},
"identifierName": "chalk"
},
"name": "chalk"
},
"property": {
"type": "Identifier",
"start": 112,
"end": 117,
"loc": {
"start": {
"line": 5,
"column": 17
},
"end": {
"line": 5,
"column": 22
},
"identifierName": "color"
},
"name": "color"
},
"computed": true
},
"arguments": [
{
"type": "Identifier",
"start": 119,
"end": 123,
"loc": {
"start": {
"line": 5,
"column": 24
},
"end": {
"line": 5,
"column": 28
},
"identifierName": "text"
},
"name": "text"
}
]
}
}
],
"directives": []
}
},
{
"type": "ClassMethod",
"start": 133,
"end": 184,
"loc": {
"start": {
"line": 8,
"column": 2
},
"end": {
"line": 10,
"column": 3
}
},
"computed": false,
"key": {
"type": "Identifier",
"start": 133,
"end": 136,
"loc": {
"start": {
"line": 8,
"column": 2
},
"end": {
"line": 8,
"column": 5
},
"identifierName": "log"
},
"name": "log"
},
"static": false,
"kind": "method",
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "Identifier",
"start": 137,
"end": 141,
"loc": {
"start": {
"line": 8,
"column": 6
},
"end": {
"line": 8,
"column": 10
},
"identifierName": "text"
},
"name": "text"
}
],
"body": {
"type": "BlockStatement",
"start": 143,
"end": 184,
"loc": {
"start": {
"line": 8,
"column": 12
},
"end": {
"line": 10,
"column": 3
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 149,
"end": 180,
"loc": {
"start": {
"line": 9,
"column": 4
},
"end": {
"line": 9,
"column": 35
}
},
"expression": {
"type": "CallExpression",
"start": 149,
"end": 179,
"loc": {
"start": {
"line": 9,
"column": 4
},
"end": {
"line": 9,
"column": 34
}
},
"callee": {
"type": "MemberExpression",
"start": 149,
"end": 160,
"loc": {
"start": {
"line": 9,
"column": 4
},
"end": {
"line": 9,
"column": 15
}
},
"object": {
"type": "Identifier",
"start": 149,
"end": 156,
"loc": {
"start": {
"line": 9,
"column": 4
},
"end": {
"line": 9,
"column": 11
},
"identifierName": "console"
},
"name": "console"
},
"property": {
"type": "Identifier",
"start": 157,
"end": 160,
"loc": {
"start": {
"line": 9,
"column": 12
},
"end": {
"line": 9,
"column": 15
},
"identifierName": "log"
},
"name": "log"
},
"computed": false
},
"arguments": [
{
"type": "CallExpression",
"start": 161,
"end": 178,
"loc": {
"start": {
"line": 9,
"column": 16
},
"end": {
"line": 9,
"column": 33
}
},
"callee": {
"type": "MemberExpression",
"start": 161,
"end": 172,
"loc": {
"start": {
"line": 9,
"column": 16
},
"end": {
"line": 9,
"column": 27
}
},
"object": {
"type": "ThisExpression",
"start": 161,
"end": 165,
"loc": {
"start": {
"line": 9,
"column": 16
},
"end": {
"line": 9,
"column": 20
}
}
},
"property": {
"type": "Identifier",
"start": 166,
"end": 172,
"loc": {
"start": {
"line": 9,
"column": 21
},
"end": {
"line": 9,
"column": 27
},
"identifierName": "_chalk"
},
"name": "_chalk"
},
"computed": false
},
"arguments": [
{
"type": "Identifier",
"start": 173,
"end": 177,
"loc": {
"start": {
"line": 9,
"column": 28
},
"end": {
"line": 9,
"column": 32
},
"identifierName": "text"
},
"name": "text"
}
]
}
]
}
}
],
"directives": []
}
},
{
"type": "ClassMethod",
"start": 188,
"end": 251,
"loc": {
"start": {
"line": 12,
"column": 2
},
"end": {
"line": 14,
"column": 3
}
},
"computed": false,
"key": {
"type": "Identifier",
"start": 188,
"end": 192,
"loc": {
"start": {
"line": 12,
"column": 2
},
"end": {
"line": 12,
"column": 6
},
"identifierName": "warn"
},
"name": "warn"
},
"static": false,
"kind": "method",
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "Identifier",
"start": 193,
"end": 197,
"loc": {
"start": {
"line": 12,
"column": 7
},
"end": {
"line": 12,
"column": 11
},
"identifierName": "text"
},
"name": "text"
}
],
"body": {
"type": "BlockStatement",
"start": 199,
"end": 251,
"loc": {
"start": {
"line": 12,
"column": 13
},
"end": {
"line": 14,
"column": 3
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 205,
"end": 247,
"loc": {
"start": {
"line": 13,
"column": 4
},
"end": {
"line": 13,
"column": 46
}
},
"expression": {
"type": "CallExpression",
"start": 205,
"end": 246,
"loc": {
"start": {
"line": 13,
"column": 4
},
"end": {
"line": 13,
"column": 45
}
},
"callee": {
"type": "MemberExpression",
"start": 205,
"end": 217,
"loc": {
"start": {
"line": 13,
"column": 4
},
"end": {
"line": 13,
"column": 16
}
},
"object": {
"type": "Identifier",
"start": 205,
"end": 212,
"loc": {
"start": {
"line": 13,
"column": 4
},
"end": {
"line": 13,
"column": 11
},
"identifierName": "console"
},
"name": "console"
},
"property": {
"type": "Identifier",
"start": 213,
"end": 217,
"loc": {
"start": {
"line": 13,
"column": 12
},
"end": {
"line": 13,
"column": 16
},
"identifierName": "warn"
},
"name": "warn"
},
"computed": false
},
"arguments": [
{
"type": "CallExpression",
"start": 218,
"end": 245,
"loc": {
"start": {
"line": 13,
"column": 17
},
"end": {
"line": 13,
"column": 44
}
},
"callee": {
"type": "MemberExpression",
"start": 218,
"end": 229,
"loc": {
"start": {
"line": 13,
"column": 17
},
"end": {
"line": 13,
"column": 28
}
},
"object": {
"type": "ThisExpression",
"start": 218,
"end": 222,
"loc": {
"start": {
"line": 13,
"column": 17
},
"end": {
"line": 13,
"column": 21
}
}
},
"property": {
"type": "Identifier",
"start": 223,
"end": 229,
"loc": {
"start": {
"line": 13,
"column": 22
},
"end": {
"line": 13,
"column": 28
},
"identifierName": "_chalk"
},
"name": "_chalk"
},
"computed": false
},
"arguments": [
{
"type": "Identifier",
"start": 230,
"end": 234,
"loc": {
"start": {
"line": 13,
"column": 29
},
"end": {
"line": 13,
"column": 33
},
"identifierName": "text"
},
"name": "text"
},
{
"type": "StringLiteral",
"start": 236,
"end": 244,
"loc": {
"start": {
"line": 13,
"column": 35
},
"end": {
"line": 13,
"column": 43
}
},
"extra": {
"rawValue": "yellow",
"raw": "'yellow'"
},
"value": "yellow"
}
]
}
]
}
}
],
"directives": []
}
},
{
"type": "ClassMethod",
"start": 255,
"end": 317,
"loc": {
"start": {
"line": 16,
"column": 2
},
"end": {
"line": 18,
"column": 3
}
},
"computed": false,
"key": {
"type": "Identifier",
"start": 255,
"end": 260,
"loc": {
"start": {
"line": 16,
"column": 2
},
"end": {
"line": 16,
"column": 7
},
"identifierName": "error"
},
"name": "error"
},
"static": false,
"kind": "method",
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "Identifier",
"start": 261,
"end": 265,
"loc": {
"start": {
"line": 16,
"column": 8
},
"end": {
"line": 16,
"column": 12
},
"identifierName": "text"
},
"name": "text"
}
],
"body": {
"type": "BlockStatement",
"start": 267,
"end": 317,
"loc": {
"start": {
"line": 16,
"column": 14
},
"end": {
"line": 18,
"column": 3
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 273,
"end": 313,
"loc": {
"start": {
"line": 17,
"column": 4
},
"end": {
"line": 17,
"column": 44
}
},
"expression": {
"type": "CallExpression",
"start": 273,
"end": 312,
"loc": {
"start": {
"line": 17,
"column": 4
},
"end": {
"line": 17,
"column": 43
}
},
"callee": {
"type": "MemberExpression",
"start": 273,
"end": 286,
"loc": {
"start": {
"line": 17,
"column": 4
},
"end": {
"line": 17,
"column": 17
}
},
"object": {
"type": "Identifier",
"start": 273,
"end": 280,
"loc": {
"start": {
"line": 17,
"column": 4
},
"end": {
"line": 17,
"column": 11
},
"identifierName": "console"
},
"name": "console"
},
"property": {
"type": "Identifier",
"start": 281,
"end": 286,
"loc": {
"start": {
"line": 17,
"column": 12
},
"end": {
"line": 17,
"column": 17
},
"identifierName": "error"
},
"name": "error"
},
"computed": false
},
"arguments": [
{
"type": "CallExpression",
"start": 287,
"end": 311,
"loc": {
"start": {
"line": 17,
"column": 18
},
"end": {
"line": 17,
"column": 42
}
},
"callee": {
"type": "MemberExpression",
"start": 287,
"end": 298,
"loc": {
"start": {
"line": 17,
"column": 18
},
"end": {
"line": 17,
"column": 29
}
},
"object": {
"type": "ThisExpression",
"start": 287,
"end": 291,
"loc": {
"start": {
"line": 17,
"column": 18
},
"end": {
"line": 17,
"column": 22
}
}
},
"property": {
"type": "Identifier",
"start": 292,
"end": 298,
"loc": {
"start": {
"line": 17,
"column": 23
},
"end": {
"line": 17,
"column": 29
},
"identifierName": "_chalk"
},
"name": "_chalk"
},
"computed": false
},
"arguments": [
{
"type": "Identifier",
"start": 299,
"end": 303,
"loc": {
"start": {
"line": 17,
"column": 30
},
"end": {
"line": 17,
"column": 34
},
"identifierName": "text"
},
"name": "text"
},
{
"type": "StringLiteral",
"start": 305,
"end": 310,
"loc": {
"start": {
"line": 17,
"column": 36
},
"end": {
"line": 17,
"column": 41
}
},
"extra": {
"rawValue": "red",
"raw": "'red'"
},
"value": "red"
}
]
}
]
}
}
],
"directives": []
}
},
{
"type": "ClassMethod",
"start": 321,
"end": 383,
"loc": {
"start": {
"line": 20,
"column": 2
},
"end": {
"line": 22,
"column": 3
}
},
"computed": false,
"key": {
"type": "Identifier",
"start": 321,
"end": 327,
"loc": {
"start": {
"line": 20,
"column": 2
},
"end": {
"line": 20,
"column": 8
},
"identifierName": "succes"
},
"name": "succes"
},
"static": false,
"kind": "method",
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "Identifier",
"start": 328,
"end": 332,
"loc": {
"start": {
"line": 20,
"column": 9
},
"end": {
"line": 20,
"column": 13
},
"identifierName": "text"
},
"name": "text"
}
],
"body": {
"type": "BlockStatement",
"start": 334,
"end": 383,
"loc": {
"start": {
"line": 20,
"column": 15
},
"end": {
"line": 22,
"column": 3
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 340,
"end": 379,
"loc": {
"start": {
"line": 21,
"column": 4
},
"end": {
"line": 21,
"column": 43
}
},
"expression": {
"type": "CallExpression",
"start": 340,
"end": 378,
"loc": {
"start": {
"line": 21,
"column": 4
},
"end": {
"line": 21,
"column": 42
}
},
"callee": {
"type": "MemberExpression",
"start": 340,
"end": 351,
"loc": {
"start": {
"line": 21,
"column": 4
},
"end": {
"line": 21,
"column": 15
}
},
"object": {
"type": "Identifier",
"start": 340,
"end": 347,
"loc": {
"start": {
"line": 21,
"column": 4
},
"end": {
"line": 21,
"column": 11
},
"identifierName": "console"
},
"name": "console"
},
"property": {
"type": "Identifier",
"start": 348,
"end": 351,
"loc": {
"start": {
"line": 21,
"column": 12
},
"end": {
"line": 21,
"column": 15
},
"identifierName": "log"
},
"name": "log"
},
"computed": false
},
"arguments": [
{
"type": "CallExpression",
"start": 352,
"end": 377,
"loc": {
"start": {
"line": 21,
"column": 16
},
"end": {
"line": 21,
"column": 41
}
},
"callee": {
"type": "MemberExpression",
"start": 352,
"end": 363,
"loc": {
"start": {
"line": 21,
"column": 16
},
"end": {
"line": 21,
"column": 27
}
},
"object": {
"type": "ThisExpression",
"start": 352,
"end": 356,
"loc": {
"start": {
"line": 21,
"column": 16
},
"end": {
"line": 21,
"column": 20
}
}
},
"property": {
"type": "Identifier",
"start": 357,
"end": 363,
"loc": {
"start": {
"line": 21,
"column": 21
},
"end": {
"line": 21,
"column": 27
},
"identifierName": "_chalk"
},
"name": "_chalk"
},
"computed": false
},
"arguments": [
{
"type": "Identifier",
"start": 364,
"end": 368,
"loc": {
"start": {
"line": 21,
"column": 28
},
"end": {
"line": 21,
"column": 32
},
"identifierName": "text"
},
"name": "text"
},
{
"type": "StringLiteral",
"start": 370,
"end": 376,
"loc": {
"start": {
"line": 21,
"column": 34
},
"end": {
"line": 21,
"column": 40
}
},
"extra": {
"rawValue": "cyan",
"raw": "'cyan'"
},
"value": "cyan"
}
]
}
]
}
}
],
"directives": []
}
}
]
},
"name": "_",
"leadingComments": [],
"trailingComments": []
},
{
"type": "Identifier",
"start": 387,
"end": 415,
"loc": {
"start": {
"line": 25,
"column": 0
},
"end": {
"line": 25,
"column": 28
}
},
"declaration": {
"type": "NewExpression",
"start": 402,
"end": 414,
"loc": {
"start": {
"line": 25,
"column": 15
},
"end": {
"line": 25,
"column": 27
}
},
"callee": {
"type": "Identifier",
"start": 406,
"end": 412,
"loc": {
"start": {
"line": 25,
"column": 19
},
"end": {
"line": 25,
"column": 25
},
"identifierName": "Logger"
},
"name": "Logger"
},
"arguments": []
},
"name": "_",
"leadingComments": [],
"trailingComments": []
},
{
"type": "ExportDefaultDeclaration",
"start": 387,
"end": 415,
"loc": {
"start": {
"line": 25,
"column": 0
},
"end": {
"line": 25,
"column": 28
}
},
"declaration": {
"type": "ClassDeclaration",
"start": 46,
"end": 386,
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 24,
"column": 1
}
},
"id": {
"type": "Identifier",
"start": 52,
"end": 58,
"loc": {
"start": {
"line": 3,
"column": 6
},
"end": {
"line": 3,
"column": 12
},
"identifierName": "Logger"
},
"name": "Logger"
},
"superClass": null,
"body": {
"type": "ClassBody",
"start": 59,
"end": 386,
"loc": {
"start": {
"line": 3,
"column": 13
},
"end": {
"line": 24,
"column": 1
}
},
"body": [
{
"type": "ClassMethod",
"start": 63,