backed-cli
Version:
The official command line interface for Backed
1,538 lines (1,537 loc) • 278 kB
JSON
{
"type": "File",
"start": 0,
"end": 1087,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 51,
"column": 0
}
},
"program": {
"type": "Program",
"start": 0,
"end": 1087,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 51,
"column": 0
}
},
"sourceType": "module",
"body": [
{
"type": "VariableDeclaration",
"start": 14,
"end": 64,
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 2,
"column": 50
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 20,
"end": 63,
"loc": {
"start": {
"line": 2,
"column": 6
},
"end": {
"line": 2,
"column": 49
}
},
"id": {
"type": "Identifier",
"start": 20,
"end": 34,
"loc": {
"start": {
"line": 2,
"column": 6
},
"end": {
"line": 2,
"column": 20
},
"identifierName": "elegantSpinner"
},
"name": "elegantSpinner"
},
"init": {
"type": "CallExpression",
"start": 37,
"end": 63,
"loc": {
"start": {
"line": 2,
"column": 23
},
"end": {
"line": 2,
"column": 49
}
},
"callee": {
"type": "Identifier",
"start": 37,
"end": 44,
"loc": {
"start": {
"line": 2,
"column": 23
},
"end": {
"line": 2,
"column": 30
},
"identifierName": "require"
},
"name": "require"
},
"arguments": [
{
"type": "StringLiteral",
"start": 45,
"end": 62,
"loc": {
"start": {
"line": 2,
"column": 31
},
"end": {
"line": 2,
"column": 48
}
},
"extra": {
"rawValue": "elegant-spinner",
"raw": "'elegant-spinner'"
},
"value": "elegant-spinner"
}
]
}
}
],
"kind": "const"
},
{
"type": "VariableDeclaration",
"start": 65,
"end": 105,
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 3,
"column": 40
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 71,
"end": 104,
"loc": {
"start": {
"line": 3,
"column": 6
},
"end": {
"line": 3,
"column": 39
}
},
"id": {
"type": "Identifier",
"start": 71,
"end": 80,
"loc": {
"start": {
"line": 3,
"column": 6
},
"end": {
"line": 3,
"column": 15
},
"identifierName": "logUpdate"
},
"name": "logUpdate"
},
"init": {
"type": "CallExpression",
"start": 83,
"end": 104,
"loc": {
"start": {
"line": 3,
"column": 18
},
"end": {
"line": 3,
"column": 39
}
},
"callee": {
"type": "Identifier",
"start": 83,
"end": 90,
"loc": {
"start": {
"line": 3,
"column": 18
},
"end": {
"line": 3,
"column": 25
},
"identifierName": "require"
},
"name": "require"
},
"arguments": [
{
"type": "StringLiteral",
"start": 91,
"end": 103,
"loc": {
"start": {
"line": 3,
"column": 26
},
"end": {
"line": 3,
"column": 38
}
},
"extra": {
"rawValue": "log-update",
"raw": "'log-update'"
},
"value": "log-update"
}
]
}
}
],
"kind": "const"
},
{
"type": "VariableDeclaration",
"start": 106,
"end": 137,
"loc": {
"start": {
"line": 4,
"column": 0
},
"end": {
"line": 4,
"column": 31
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 112,
"end": 136,
"loc": {
"start": {
"line": 4,
"column": 6
},
"end": {
"line": 4,
"column": 30
}
},
"id": {
"type": "Identifier",
"start": 112,
"end": 117,
"loc": {
"start": {
"line": 4,
"column": 6
},
"end": {
"line": 4,
"column": 11
},
"identifierName": "chalk"
},
"name": "chalk"
},
"init": {
"type": "CallExpression",
"start": 120,
"end": 136,
"loc": {
"start": {
"line": 4,
"column": 14
},
"end": {
"line": 4,
"column": 30
}
},
"callee": {
"type": "Identifier",
"start": 120,
"end": 127,
"loc": {
"start": {
"line": 4,
"column": 14
},
"end": {
"line": 4,
"column": 21
},
"identifierName": "require"
},
"name": "require"
},
"arguments": [
{
"type": "StringLiteral",
"start": 128,
"end": 135,
"loc": {
"start": {
"line": 4,
"column": 22
},
"end": {
"line": 4,
"column": 29
}
},
"extra": {
"rawValue": "chalk",
"raw": "'chalk'"
},
"value": "chalk"
}
]
}
}
],
"kind": "const"
},
{
"type": "VariableDeclaration",
"start": 138,
"end": 167,
"loc": {
"start": {
"line": 5,
"column": 0
},
"end": {
"line": 5,
"column": 29
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 142,
"end": 166,
"loc": {
"start": {
"line": 5,
"column": 4
},
"end": {
"line": 5,
"column": 28
}
},
"id": {
"type": "Identifier",
"start": 142,
"end": 147,
"loc": {
"start": {
"line": 5,
"column": 4
},
"end": {
"line": 5,
"column": 9
},
"identifierName": "frame"
},
"name": "frame"
},
"init": {
"type": "CallExpression",
"start": 150,
"end": 166,
"loc": {
"start": {
"line": 5,
"column": 12
},
"end": {
"line": 5,
"column": 28
}
},
"callee": {
"type": "Identifier",
"start": 150,
"end": 164,
"loc": {
"start": {
"line": 5,
"column": 12
},
"end": {
"line": 5,
"column": 26
},
"identifierName": "elegantSpinner"
},
"name": "elegantSpinner"
},
"arguments": []
}
}
],
"kind": "let"
},
{
"type": "VariableDeclaration",
"start": 168,
"end": 190,
"loc": {
"start": {
"line": 6,
"column": 0
},
"end": {
"line": 6,
"column": 22
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 172,
"end": 189,
"loc": {
"start": {
"line": 6,
"column": 4
},
"end": {
"line": 6,
"column": 21
}
},
"id": {
"type": "Identifier",
"start": 172,
"end": 176,
"loc": {
"start": {
"line": 6,
"column": 4
},
"end": {
"line": 6,
"column": 8
},
"identifierName": "text"
},
"name": "text"
},
"init": {
"type": "StringLiteral",
"start": 179,
"end": 189,
"loc": {
"start": {
"line": 6,
"column": 11
},
"end": {
"line": 6,
"column": 21
}
},
"extra": {
"rawValue": "Building",
"raw": "'Building'"
},
"value": "Building"
}
}
],
"kind": "let"
},
{
"type": "VariableDeclaration",
"start": 191,
"end": 208,
"loc": {
"start": {
"line": 7,
"column": 0
},
"end": {
"line": 7,
"column": 17
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 195,
"end": 207,
"loc": {
"start": {
"line": 7,
"column": 4
},
"end": {
"line": 7,
"column": 16
}
},
"id": {
"type": "Identifier",
"start": 195,
"end": 199,
"loc": {
"start": {
"line": 7,
"column": 4
},
"end": {
"line": 7,
"column": 8
},
"identifierName": "done"
},
"name": "done"
},
"init": {
"type": "BooleanLiteral",
"start": 202,
"end": 207,
"loc": {
"start": {
"line": 7,
"column": 11
},
"end": {
"line": 7,
"column": 16
}
},
"value": false
}
}
],
"kind": "let"
},
{
"type": "VariableDeclaration",
"start": 209,
"end": 229,
"loc": {
"start": {
"line": 8,
"column": 0
},
"end": {
"line": 8,
"column": 20
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 213,
"end": 228,
"loc": {
"start": {
"line": 8,
"column": 4
},
"end": {
"line": 8,
"column": 19
}
},
"id": {
"type": "Identifier",
"start": 213,
"end": 220,
"loc": {
"start": {
"line": 8,
"column": 4
},
"end": {
"line": 8,
"column": 11
},
"identifierName": "running"
},
"name": "running"
},
"init": {
"type": "BooleanLiteral",
"start": 223,
"end": 228,
"loc": {
"start": {
"line": 8,
"column": 14
},
"end": {
"line": 8,
"column": 19
}
},
"value": false
}
}
],
"kind": "let"
},
{
"type": "VariableDeclaration",
"start": 230,
"end": 244,
"loc": {
"start": {
"line": 9,
"column": 0
},
"end": {
"line": 9,
"column": 14
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 234,
"end": 243,
"loc": {
"start": {
"line": 9,
"column": 4
},
"end": {
"line": 9,
"column": 13
}
},
"id": {
"type": "Identifier",
"start": 234,
"end": 243,
"loc": {
"start": {
"line": 9,
"column": 4
},
"end": {
"line": 9,
"column": 13
},
"identifierName": "startTime"
},
"name": "startTime"
},
"init": null
}
],
"kind": "let"
},
{
"type": "VariableDeclaration",
"start": 246,
"end": 311,
"loc": {
"start": {
"line": 11,
"column": 0
},
"end": {
"line": 13,
"column": 2
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 252,
"end": 310,
"loc": {
"start": {
"line": 11,
"column": 6
},
"end": {
"line": 13,
"column": 1
}
},
"id": {
"type": "Identifier",
"start": 252,
"end": 256,
"loc": {
"start": {
"line": 11,
"column": 6
},
"end": {
"line": 11,
"column": 10
},
"identifierName": "time"
},
"name": "time"
},
"init": {
"type": "ArrowFunctionExpression",
"start": 259,
"end": 310,
"loc": {
"start": {
"line": 11,
"column": 13
},
"end": {
"line": 13,
"column": 1
}
},
"id": {
"type": "Identifier",
"start": 252,
"end": 256,
"loc": {
"start": {
"line": 11,
"column": 6
},
"end": {
"line": 11,
"column": 10
},
"identifierName": "time"
},
"name": "time"
},
"generator": false,
"expression": false,
"async": false,
"params": [],
"body": {
"type": "BlockStatement",
"start": 265,
"end": 310,
"loc": {
"start": {
"line": 11,
"column": 19
},
"end": {
"line": 13,
"column": 1
}
},
"body": [
{
"type": "ReturnStatement",
"start": 269,
"end": 308,
"loc": {
"start": {
"line": 12,
"column": 2
},
"end": {
"line": 12,
"column": 41
}
},
"argument": {
"type": "CallExpression",
"start": 276,
"end": 307,
"loc": {
"start": {
"line": 12,
"column": 9
},
"end": {
"line": 12,
"column": 40
}
},
"callee": {
"type": "MemberExpression",
"start": 276,
"end": 305,
"loc": {
"start": {
"line": 12,
"column": 9
},
"end": {
"line": 12,
"column": 38
}
},
"object": {
"type": "NewExpression",
"start": 276,
"end": 286,
"loc": {
"start": {
"line": 12,
"column": 9
},
"end": {
"line": 12,
"column": 19
}
},
"callee": {
"type": "Identifier",
"start": 280,
"end": 284,
"loc": {
"start": {
"line": 12,
"column": 13
},
"end": {
"line": 12,
"column": 17
},
"identifierName": "Date"
},
"name": "Date"
},
"arguments": []
},
"property": {
"type": "Identifier",
"start": 287,
"end": 305,
"loc": {
"start": {
"line": 12,
"column": 20
},
"end": {
"line": 12,
"column": 38
},
"identifierName": "toLocaleTimeString"
},
"name": "toLocaleTimeString"
},
"computed": false
},
"arguments": []
}
}
],
"directives": []
}
}
}
],
"kind": "const"
},
{
"type": "VariableDeclaration",
"start": 313,
"end": 356,
"loc": {
"start": {
"line": 15,
"column": 0
},
"end": {
"line": 17,
"column": 2
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 319,
"end": 355,
"loc": {
"start": {
"line": 15,
"column": 6
},
"end": {
"line": 17,
"column": 1
}
},
"id": {
"type": "Identifier",
"start": 319,
"end": 322,
"loc": {
"start": {
"line": 15,
"column": 6
},
"end": {
"line": 15,
"column": 9
},
"identifierName": "now"
},
"name": "now"
},
"init": {
"type": "ArrowFunctionExpression",
"start": 325,
"end": 355,
"loc": {
"start": {
"line": 15,
"column": 12
},
"end": {
"line": 17,
"column": 1
}
},
"id": {
"type": "Identifier",
"start": 319,
"end": 322,
"loc": {
"start": {
"line": 15,
"column": 6
},
"end": {
"line": 15,
"column": 9
},
"identifierName": "now"
},
"name": "now"
},
"generator": false,
"expression": false,
"async": false,
"params": [],
"body": {
"type": "BlockStatement",
"start": 331,
"end": 355,
"loc": {
"start": {
"line": 15,
"column": 18
},
"end": {
"line": 17,
"column": 1
}
},
"body": [
{
"type": "ReturnStatement",
"start": 335,
"end": 353,
"loc": {
"start": {
"line": 16,
"column": 2
},
"end": {
"line": 16,
"column": 20
}
},
"argument": {
"type": "CallExpression",
"start": 342,
"end": 352,
"loc": {
"start": {
"line": 16,
"column": 9
},
"end": {
"line": 16,
"column": 19
}
},
"callee": {
"type": "MemberExpression",
"start": 342,
"end": 350,
"loc": {
"start": {
"line": 16,
"column": 9
},
"end": {
"line": 16,
"column": 17
}
},
"object": {
"type": "Identifier",
"start": 342,
"end": 346,
"loc": {
"start": {
"line": 16,
"column": 9
},
"end": {
"line": 16,
"column": 13
},
"identifierName": "Date"
},
"name": "Date"
},
"property": {
"type": "Identifier",
"start": 347,
"end": 350,
"loc": {
"start": {
"line": 16,
"column": 14
},
"end": {
"line": 16,
"column": 17
},
"identifierName": "now"
},
"name": "now"
},
"computed": false
},
"arguments": []
}
}
],
"directives": []
}
}
}
],
"kind": "const"
},
{
"type": "VariableDeclaration",
"start": 358,
"end": 547,
"loc": {
"start": {
"line": 19,
"column": 0
},
"end": {
"line": 28,
"column": 2
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 362,
"end": 546,
"loc": {
"start": {
"line": 19,
"column": 4
},
"end": {
"line": 28,
"column": 1
}
},
"id": {
"type": "Identifier",
"start": 362,
"end": 370,
"loc": {
"start": {
"line": 19,
"column": 4
},
"end": {
"line": 19,
"column": 12
},
"identifierName": "interval"
},
"name": "interval"
},
"init": {
"type": "ArrowFunctionExpression",
"start": 373,
"end": 546,
"loc": {
"start": {
"line": 19,
"column": 15
},
"end": {
"line": 28,
"column": 1
}
},
"id": {
"type": "Identifier",
"start": 362,
"end": 370,
"loc": {
"start": {
"line": 19,
"column": 4
},
"end": {
"line": 19,
"column": 12
},
"identifierName": "interval"
},
"name": "interval"
},
"generator": false,
"expression": false,
"async": false,
"params": [],
"body": {
"type": "BlockStatement",
"start": 379,
"end": 546,
"loc": {
"start": {
"line": 19,
"column": 21
},
"end": {
"line": 28,
"column": 1
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 383,
"end": 544,
"loc": {
"start": {
"line": 20,
"column": 2
},
"end": {
"line": 27,
"column": 9
}
},
"expression": {
"type": "CallExpression",
"start": 383,
"end": 543,
"loc": {
"start": {
"line": 20,
"column": 2
},
"end": {
"line": 27,
"column": 8
}
},
"callee": {
"type": "Identifier",
"start": 383,
"end": 394,
"loc": {
"start": {
"line": 20,
"column": 2
},
"end": {
"line": 20,
"column": 13
},
"identifierName": "setInterval"
},
"name": "setInterval"
},
"arguments": [
{
"type": "ArrowFunctionExpression",
"start": 395,
"end": 538,
"loc": {
"start": {
"line": 20,
"column": 14
},
"end": {
"line": 27,
"column": 3
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [],
"body": {
"type": "BlockStatement",
"start": 401,
"end": 538,
"loc": {
"start": {
"line": 20,
"column": 20
},
"end": {
"line": 27,
"column": 3
}
},
"body": [
{
"type": "IfStatement",
"start": 407,
"end": 534,
"loc": {
"start": {
"line": 21,
"column": 4
},
"end": {
"line": 26,
"column": 5
}
},
"test": {
"type": "Identifier",
"start": 411,
"end": 418,
"loc": {
"start": {
"line": 21,
"column": 8
},
"end": {
"line": 21,
"column": 15
},
"identifierName": "running"
},
"name": "running"
},
"consequent": {
"type": "BlockStatement",
"start": 420,
"end": 534,
"loc": {
"start": {
"line": 21,
"column": 17
},
"end": {
"line": 26,
"column": 5
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 428,
"end": 472,
"loc": {
"start": {
"line": 22,
"column": 6
},
"end": {
"line": 22,
"column": 50
}
},
"expression": {
"type": "CallExpression",
"start": 428,
"end": 471,
"loc": {
"start": {
"line": 22,
"column": 6
},
"end": {
"line": 22,
"column": 49
}
},
"callee": {
"type": "Identifier",
"start": 428,
"end": 437,
"loc": {
"start": {
"line": 22,
"column": 6
},
"end": {
"line": 22,
"column": 15
},
"identifierName": "logUpdate"
},
"name": "logUpdate"
},
"arguments": [
{
"type": "TemplateLiteral",
"start": 438,
"end": 470,
"loc": {
"start": {
"line": 22,
"column": 16
},
"end": {
"line": 22,
"column": 48
}
},
"expressions": [
{
"type": "CallExpression",
"start": 442,
"end": 448,
"loc": {
"start": {
"line": 22,
"column": 20
},
"end": {
"line": 22,
"column": 26
}
},
"callee": {
"type": "Identifier",
"start": 442,
"end": 446,
"loc": {
"start": {
"line": 22,
"column": 20
},
"end": {
"line": 22,
"column": 24
},
"identifierName": "time"
},
"name": "time"
},
"arguments": []
},
{
"type": "Identifier",
"start": 453,
"end": 457,
"loc": {
"start": {
"line": 22,
"column": 31
},
"end": {
"line": 22,
"column": 35
},
"identifierName": "text"
},
"name": "text"
},
{
"type": "CallExpression",
"start": 461,
"end": 468,
"loc": {
"start": {
"line": 22,
"column": 39
},
"end": {
"line": 22,
"column": 46
}
},
"callee": {
"type": "Identifier",
"start": 461,
"end": 466,
"loc": {
"start": {
"line": 22,
"column": 39
},
"end": {
"line": 22,
"column": 44
},
"identifierName": "frame"
},
"name": "frame"
},
"arguments": []
}
],
"quasis": [
{
"type": "TemplateElement",
"start": 439,
"end": 440,
"loc": {
"start": {
"line": 22,
"column": 17
},
"end": {
"line": 22,
"column": 18
}
},
"value": {
"raw": "[",
"cooked": "["
},
"tail": false
},
{
"type": "TemplateElement",
"start": 449,
"end": 451,
"loc": {
"start": {
"line": 22,
"column": 27
},
"end": {
"line": 22,
"column": 29
}
},
"value": {
"raw": "] ",
"cooked": "] "
},
"tail": false
},
{
"type": "TemplateElement",
"start": 458,
"end": 459,
"loc": {
"start": {
"line": 22,
"column": 36
},
"end": {
"line": 22,
"column": 37
}
},
"value": {
"raw": " ",
"cooked": " "
},
"tail": false
},
{
"type": "TemplateElement",
"start": 469,
"end": 469,
"loc": {
"start": {
"line": 22,
"column": 47
},
"end": {
"line": 22,
"column": 47
}
},
"value": {
"raw": "",
"cooked": ""
},
"tail": true
}
]
}
]
}
},
{
"type": "IfStatement",
"start": 479,
"end": 528,
"loc": {
"start": {
"line": 23,
"column": 6
},
"end": {
"line": 25,
"column": 7
}
},
"test": {
"type": "Identifier",
"start": 483,
"end": 487,
"loc": {
"start": {