UNPKG

mongoose-data-seed

Version:

Seed mongodb with data using mongoose models

1,755 lines 37.9 kB
{ "type": "File", "start": 0, "end": 211, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 12, "column": 0 } }, "program": { "type": "Program", "start": 0, "end": 211, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 12, "column": 0 } }, "sourceType": "module", "body": [ { "type": "ExpressionStatement", "start": 0, "end": 85, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 4, "column": 3 } }, "expression": { "type": "CallExpression", "start": 0, "end": 84, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 4, "column": 2 } }, "callee": { "type": "CallExpression", "start": 0, "end": 26, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 26 } }, "callee": { "type": "Identifier", "start": 0, "end": 7, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 7 }, "identifierName": "require" }, "name": "require" }, "arguments": [ { "type": "StringLiteral", "start": 8, "end": 25, "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 25 } }, "extra": { "rawValue": "@babel/register", "raw": "'@babel/register'" }, "value": "@babel/register" } ] }, "arguments": [ { "type": "ObjectExpression", "start": 27, "end": 83, "loc": { "start": { "line": 1, "column": 27 }, "end": { "line": 4, "column": 1 } }, "properties": [ { "type": "ObjectProperty", "start": 31, "end": 52, "loc": { "start": { "line": 2, "column": 2 }, "end": { "line": 2, "column": 23 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 31, "end": 38, "loc": { "start": { "line": 2, "column": 2 }, "end": { "line": 2, "column": 9 }, "identifierName": "extends" }, "name": "extends" }, "value": { "type": "StringLiteral", "start": 40, "end": 52, "loc": { "start": { "line": 2, "column": 11 }, "end": { "line": 2, "column": 23 } }, "extra": { "rawValue": "./.babelrc", "raw": "'./.babelrc'" }, "value": "./.babelrc" } }, { "type": "ObjectProperty", "start": 56, "end": 80, "loc": { "start": { "line": 3, "column": 2 }, "end": { "line": 3, "column": 26 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 56, "end": 62, "loc": { "start": { "line": 3, "column": 2 }, "end": { "line": 3, "column": 8 }, "identifierName": "ignore" }, "name": "ignore" }, "value": { "type": "ArrayExpression", "start": 64, "end": 80, "loc": { "start": { "line": 3, "column": 10 }, "end": { "line": 3, "column": 26 } }, "elements": [ { "type": "RegExpLiteral", "start": 65, "end": 79, "loc": { "start": { "line": 3, "column": 11 }, "end": { "line": 3, "column": 25 } }, "extra": { "raw": "/node_modules/" }, "pattern": "node_modules", "flags": "" } ] } } ] } ] } }, { "type": "ExpressionStatement", "start": 87, "end": 113, "loc": { "start": { "line": 6, "column": 0 }, "end": { "line": 6, "column": 26 } }, "expression": { "type": "CallExpression", "start": 87, "end": 112, "loc": { "start": { "line": 6, "column": 0 }, "end": { "line": 6, "column": 25 } }, "callee": { "type": "Identifier", "start": 87, "end": 94, "loc": { "start": { "line": 6, "column": 0 }, "end": { "line": 6, "column": 7 }, "identifierName": "require" }, "name": "require" }, "arguments": [ { "type": "StringLiteral", "start": 95, "end": 111, "loc": { "start": { "line": 6, "column": 8 }, "end": { "line": 6, "column": 24 } }, "extra": { "rawValue": "core-js/stable", "raw": "'core-js/stable'" }, "value": "core-js/stable" } ] } }, { "type": "ExpressionStatement", "start": 114, "end": 153, "loc": { "start": { "line": 7, "column": 0 }, "end": { "line": 7, "column": 39 } }, "expression": { "type": "CallExpression", "start": 114, "end": 152, "loc": { "start": { "line": 7, "column": 0 }, "end": { "line": 7, "column": 38 } }, "callee": { "type": "Identifier", "start": 114, "end": 121, "loc": { "start": { "line": 7, "column": 0 }, "end": { "line": 7, "column": 7 }, "identifierName": "require" }, "name": "require" }, "arguments": [ { "type": "StringLiteral", "start": 122, "end": 151, "loc": { "start": { "line": 7, "column": 8 }, "end": { "line": 7, "column": 37 } }, "extra": { "rawValue": "regenerator-runtime/runtime", "raw": "'regenerator-runtime/runtime'" }, "value": "regenerator-runtime/runtime" } ] } }, { "type": "VariableDeclaration", "start": 155, "end": 186, "loc": { "start": { "line": 9, "column": 0 }, "end": { "line": 9, "column": 31 } }, "declarations": [ { "type": "VariableDeclarator", "start": 161, "end": 185, "loc": { "start": { "line": 9, "column": 6 }, "end": { "line": 9, "column": 30 } }, "id": { "type": "Identifier", "start": 161, "end": 166, "loc": { "start": { "line": 9, "column": 6 }, "end": { "line": 9, "column": 11 }, "identifierName": "chalk" }, "name": "chalk" }, "init": { "type": "CallExpression", "start": 169, "end": 185, "loc": { "start": { "line": 9, "column": 14 }, "end": { "line": 9, "column": 30 } }, "callee": { "type": "Identifier", "start": 169, "end": 176, "loc": { "start": { "line": 9, "column": 14 }, "end": { "line": 9, "column": 21 }, "identifierName": "require" }, "name": "require" }, "arguments": [ { "type": "StringLiteral", "start": 177, "end": 184, "loc": { "start": { "line": 9, "column": 22 }, "end": { "line": 9, "column": 29 } }, "extra": { "rawValue": "chalk", "raw": "'chalk'" }, "value": "chalk" } ] } } ], "kind": "const" }, { "type": "ExpressionStatement", "start": 188, "end": 210, "loc": { "start": { "line": 11, "column": 0 }, "end": { "line": 11, "column": 22 } }, "expression": { "type": "AssignmentExpression", "start": 188, "end": 209, "loc": { "start": { "line": 11, "column": 0 }, "end": { "line": 11, "column": 21 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 188, "end": 201, "loc": { "start": { "line": 11, "column": 0 }, "end": { "line": 11, "column": 13 } }, "object": { "type": "Identifier", "start": 188, "end": 193, "loc": { "start": { "line": 11, "column": 0 }, "end": { "line": 11, "column": 5 }, "identifierName": "chalk" }, "name": "chalk" }, "property": { "type": "Identifier", "start": 194, "end": 201, "loc": { "start": { "line": 11, "column": 6 }, "end": { "line": 11, "column": 13 }, "identifierName": "enabled" }, "name": "enabled" }, "computed": false }, "right": { "type": "BooleanLiteral", "start": 204, "end": 209, "loc": { "start": { "line": 11, "column": 16 }, "end": { "line": 11, "column": 21 } }, "value": false } } } ], "directives": [] }, "comments": [], "tokens": [ { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "require", "start": 0, "end": 7, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 7 } } }, { "type": { "label": "(", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 7, "end": 8, "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 8 } } }, { "type": { "label": "string", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "@babel/register", "start": 8, "end": 25, "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 25 } } }, { "type": { "label": ")", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 25, "end": 26, "loc": { "start": { "line": 1, "column": 25 }, "end": { "line": 1, "column": 26 } } }, { "type": { "label": "(", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 26, "end": 27, "loc": { "start": { "line": 1, "column": 26 }, "end": { "line": 1, "column": 27 } } }, { "type": { "label": "{", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 27, "end": 28, "loc": { "start": { "line": 1, "column": 27 }, "end": { "line": 1, "column": 28 } } }, { "type": { "label": "extends", "keyword": "extends", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "extends", "start": 31, "end": 38, "loc": { "start": { "line": 2, "column": 2 }, "end": { "line": 2, "column": 9 } } }, { "type": { "label": ":", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 38, "end": 39, "loc": { "start": { "line": 2, "column": 9 }, "end": { "line": 2, "column": 10 } } }, { "type": { "label": "string", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "./.babelrc", "start": 40, "end": 52, "loc": { "start": { "line": 2, "column": 11 }, "end": { "line": 2, "column": 23 } } }, { "type": { "label": ",", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 52, "end": 53, "loc": { "start": { "line": 2, "column": 23 }, "end": { "line": 2, "column": 24 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "ignore", "start": 56, "end": 62, "loc": { "start": { "line": 3, "column": 2 }, "end": { "line": 3, "column": 8 } } }, { "type": { "label": ":", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 62, "end": 63, "loc": { "start": { "line": 3, "column": 8 }, "end": { "line": 3, "column": 9 } } }, { "type": { "label": "[", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 64, "end": 65, "loc": { "start": { "line": 3, "column": 10 }, "end": { "line": 3, "column": 11 } } }, { "type": { "label": "regexp", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": { "pattern": "node_modules", "flags": "" }, "start": 65, "end": 79, "loc": { "start": { "line": 3, "column": 11 }, "end": { "line": 3, "column": 25 } } }, { "type": { "label": "]", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 79, "end": 80, "loc": { "start": { "line": 3, "column": 25 }, "end": { "line": 3, "column": 26 } } }, { "type": { "label": ",", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 80, "end": 81, "loc": { "start": { "line": 3, "column": 26 }, "end": { "line": 3, "column": 27 } } }, { "type": { "label": "}", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 82, "end": 83, "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 4, "column": 1 } } }, { "type": { "label": ")", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 83, "end": 84, "loc": { "start": { "line": 4, "column": 1 }, "end": { "line": 4, "column": 2 } } }, { "type": { "label": ";", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 84, "end": 85, "loc": { "start": { "line": 4, "column": 2 }, "end": { "line": 4, "column": 3 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "require", "start": 87, "end": 94, "loc": { "start": { "line": 6, "column": 0 }, "end": { "line": 6, "column": 7 } } }, { "type": { "label": "(", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 94, "end": 95, "loc": { "start": { "line": 6, "column": 7 }, "end": { "line": 6, "column": 8 } } }, { "type": { "label": "string", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "core-js/stable", "start": 95, "end": 111, "loc": { "start": { "line": 6, "column": 8 }, "end": { "line": 6, "column": 24 } } }, { "type": { "label": ")", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 111, "end": 112, "loc": { "start": { "line": 6, "column": 24 }, "end": { "line": 6, "column": 25 } } }, { "type": { "label": ";", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 112, "end": 113, "loc": { "start": { "line": 6, "column": 25 }, "end": { "line": 6, "column": 26 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "require", "start": 114, "end": 121, "loc": { "start": { "line": 7, "column": 0 }, "end": { "line": 7, "column": 7 } } }, { "type": { "label": "(", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 121, "end": 122, "loc": { "start": { "line": 7, "column": 7 }, "end": { "line": 7, "column": 8 } } }, { "type": { "label": "string", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "regenerator-runtime/runtime", "start": 122, "end": 151, "loc": { "start": { "line": 7, "column": 8 }, "end": { "line": 7, "column": 37 } } }, { "type": { "label": ")", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 151, "end": 152, "loc": { "start": { "line": 7, "column": 37 }, "end": { "line": 7, "column": 38 } } }, { "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": 7, "column": 38 }, "end": { "line": 7, "column": 39 } } }, { "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": 155, "end": 160, "loc": { "start": { "line": 9, "column": 0 }, "end": { "line": 9, "column": 5 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "chalk", "start": 161, "end": 166, "loc": { "start": { "line": 9, "column": 6 }, "end": { "line": 9, "column": 11 } } }, { "type": { "label": "=", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": true, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "=", "start": 167, "end": 168, "loc": { "start": { "line": 9, "column": 12 }, "end": { "line": 9, "column": 13 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "require", "start": 169, "end": 176, "loc": { "start": { "line": 9, "column": 14 }, "end": { "line": 9, "column": 21 } } }, { "type": { "label": "(", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 176, "end": 177, "loc": { "start": { "line": 9, "column": 21 }, "end": { "line": 9, "column": 22 } } }, { "type": { "label": "string", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "chalk", "start": 177, "end": 184, "loc": { "start": { "line": 9, "column": 22 }, "end": { "line": 9, "column": 29 } } }, { "type": { "label": ")", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 184, "end": 185, "loc": { "start": { "line": 9, "column": 29 }, "end": { "line": 9, "column": 30 } } }, { "type": { "label": ";", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 185, "end": 186, "loc": { "start": { "line": 9, "column": 30 }, "end": { "line": 9, "column": 31 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "chalk", "start": 188, "end": 193, "loc": { "start": { "line": 11, "column": 0 }, "end": { "line": 11, "column": 5 } } }, { "type": { "label": ".", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 193, "end": 194, "loc": { "start": { "line": 11, "column": 5 }, "end": { "line": 11, "column": 6 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "enabled", "start": 194, "end": 201, "loc": { "start": { "line": 11, "column": 6 }, "end": { "line": 11, "column": 13 } } }, { "type": { "label": "=", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": true, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "=", "start": 202, "end": 203, "loc": { "start": { "line": 11, "column": 14 }, "end": { "line": 11, "column": 15 } } }, { "type": { "label": "false", "keyword": "false", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "false", "start": 204, "end": 209, "loc": { "start": { "line": 11, "column": 16 }, "end": { "line": 11, "column": 21 } } }, { "type": { "label": ";", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 209, "end": 210, "loc": { "start": { "line": 11, "column": 21 }, "end": { "line": 11, "column": 22 } } }, { "type": { "label": "eof", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 211, "end": 211, "loc": { "start": { "line": 12, "column": 0 }, "end": { "line": 12, "column": 0 } } } ] }