mongoose-data-seed
Version:
Seed mongodb with data using mongoose models
724 lines • 16.4 kB
JSON
{
"type": "File",
"start": 0,
"end": 160,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 11,
"column": 0
}
},
"program": {
"type": "Program",
"start": 0,
"end": 160,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 11,
"column": 0
}
},
"sourceType": "module",
"body": [
{
"type": "ExportNamedDeclaration",
"start": 104,
"end": 159,
"loc": {
"start": {
"line": 7,
"column": 0
},
"end": {
"line": 10,
"column": 2
}
},
"specifiers": [],
"source": null,
"declaration": {
"type": "VariableDeclaration",
"start": 111,
"end": 159,
"loc": {
"start": {
"line": 7,
"column": 7
},
"end": {
"line": 10,
"column": 2
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 117,
"end": 158,
"loc": {
"start": {
"line": 7,
"column": 13
},
"end": {
"line": 10,
"column": 1
}
},
"id": {
"type": "Identifier",
"start": 117,
"end": 126,
"loc": {
"start": {
"line": 7,
"column": 13
},
"end": {
"line": 7,
"column": 22
},
"identifierName": "ExitCodes"
},
"name": "ExitCodes",
"leadingComments": null
},
"init": {
"type": "ObjectExpression",
"start": 129,
"end": 158,
"loc": {
"start": {
"line": 7,
"column": 25
},
"end": {
"line": 10,
"column": 1
}
},
"properties": [
{
"type": "ObjectProperty",
"start": 133,
"end": 143,
"loc": {
"start": {
"line": 8,
"column": 2
},
"end": {
"line": 8,
"column": 12
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 133,
"end": 140,
"loc": {
"start": {
"line": 8,
"column": 2
},
"end": {
"line": 8,
"column": 9
},
"identifierName": "Success"
},
"name": "Success"
},
"value": {
"type": "NumericLiteral",
"start": 142,
"end": 143,
"loc": {
"start": {
"line": 8,
"column": 11
},
"end": {
"line": 8,
"column": 12
}
},
"extra": {
"rawValue": 0,
"raw": "0"
},
"value": 0
}
},
{
"type": "ObjectProperty",
"start": 147,
"end": 155,
"loc": {
"start": {
"line": 9,
"column": 2
},
"end": {
"line": 9,
"column": 10
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 147,
"end": 152,
"loc": {
"start": {
"line": 9,
"column": 2
},
"end": {
"line": 9,
"column": 7
},
"identifierName": "Error"
},
"name": "Error"
},
"value": {
"type": "NumericLiteral",
"start": 154,
"end": 155,
"loc": {
"start": {
"line": 9,
"column": 9
},
"end": {
"line": 9,
"column": 10
}
},
"extra": {
"rawValue": 1,
"raw": "1"
},
"value": 1
}
}
]
},
"leadingComments": null
}
],
"kind": "const",
"leadingComments": [
{
"type": "CommentBlock",
"value": "*\n * System exit codes\n *\n * Map exit code key to exit code number\n * @type {Map<string, number>}\n ",
"start": 0,
"end": 103,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 6,
"column": 3
}
}
}
],
"trailingComments": []
},
"leadingComments": [
{
"type": "CommentBlock",
"value": "*\n * System exit codes\n *\n * Map exit code key to exit code number\n * @type {Map<string, number>}\n ",
"start": 0,
"end": 103,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 6,
"column": 3
}
}
}
]
}
],
"directives": []
},
"comments": [
{
"type": "CommentBlock",
"value": "*\n * System exit codes\n *\n * Map exit code key to exit code number\n * @type {Map<string, number>}\n ",
"start": 0,
"end": 103,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 6,
"column": 3
}
}
}
],
"tokens": [
{
"type": "CommentBlock",
"value": "*\n * System exit codes\n *\n * Map exit code key to exit code number\n * @type {Map<string, number>}\n ",
"start": 0,
"end": 103,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 6,
"column": 3
}
}
},
{
"type": {
"label": "export",
"keyword": "export",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "export",
"start": 104,
"end": 110,
"loc": {
"start": {
"line": 7,
"column": 0
},
"end": {
"line": 7,
"column": 6
}
}
},
{
"type": {
"label": "const",
"keyword": "const",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "const",
"start": 111,
"end": 116,
"loc": {
"start": {
"line": 7,
"column": 7
},
"end": {
"line": 7,
"column": 12
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "ExitCodes",
"start": 117,
"end": 126,
"loc": {
"start": {
"line": 7,
"column": 13
},
"end": {
"line": 7,
"column": 22
}
}
},
{
"type": {
"label": "=",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": true,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "=",
"start": 127,
"end": 128,
"loc": {
"start": {
"line": 7,
"column": 23
},
"end": {
"line": 7,
"column": 24
}
}
},
{
"type": {
"label": "{",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 129,
"end": 130,
"loc": {
"start": {
"line": 7,
"column": 25
},
"end": {
"line": 7,
"column": 26
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "Success",
"start": 133,
"end": 140,
"loc": {
"start": {
"line": 8,
"column": 2
},
"end": {
"line": 8,
"column": 9
}
}
},
{
"type": {
"label": ":",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 140,
"end": 141,
"loc": {
"start": {
"line": 8,
"column": 9
},
"end": {
"line": 8,
"column": 10
}
}
},
{
"type": {
"label": "num",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": 0,
"start": 142,
"end": 143,
"loc": {
"start": {
"line": 8,
"column": 11
},
"end": {
"line": 8,
"column": 12
}
}
},
{
"type": {
"label": ",",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 143,
"end": 144,
"loc": {
"start": {
"line": 8,
"column": 12
},
"end": {
"line": 8,
"column": 13
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "Error",
"start": 147,
"end": 152,
"loc": {
"start": {
"line": 9,
"column": 2
},
"end": {
"line": 9,
"column": 7
}
}
},
{
"type": {
"label": ":",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 152,
"end": 153,
"loc": {
"start": {
"line": 9,
"column": 7
},
"end": {
"line": 9,
"column": 8
}
}
},
{
"type": {
"label": "num",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": 1,
"start": 154,
"end": 155,
"loc": {
"start": {
"line": 9,
"column": 9
},
"end": {
"line": 9,
"column": 10
}
}
},
{
"type": {
"label": ",",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 155,
"end": 156,
"loc": {
"start": {
"line": 9,
"column": 10
},
"end": {
"line": 9,
"column": 11
}
}
},
{
"type": {
"label": "}",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 157,
"end": 158,
"loc": {
"start": {
"line": 10,
"column": 0
},
"end": {
"line": 10,
"column": 1
}
}
},
{
"type": {
"label": ";",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 158,
"end": 159,
"loc": {
"start": {
"line": 10,
"column": 1
},
"end": {
"line": 10,
"column": 2
}
}
},
{
"type": {
"label": "eof",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 160,
"end": 160,
"loc": {
"start": {
"line": 11,
"column": 0
},
"end": {
"line": 11,
"column": 0
}
}
}
]
}