UNPKG

mongoose-data-seed

Version:

Seed mongodb with data using mongoose models

1,162 lines 26.3 kB
{ "type": "File", "start": 0, "end": 156, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 9, "column": 0 } }, "program": { "type": "Program", "start": 0, "end": 156, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 9, "column": 0 } }, "sourceType": "module", "body": [ { "type": "ImportDeclaration", "start": 0, "end": 39, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 39 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 7, "end": 17, "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 17 } }, "local": { "type": "Identifier", "start": 7, "end": 17, "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 17 }, "identifierName": "usageGuide" }, "name": "usageGuide" } } ], "source": { "type": "StringLiteral", "start": 23, "end": 38, "loc": { "start": { "line": 1, "column": 23 }, "end": { "line": 1, "column": 38 } }, "extra": { "rawValue": "./usage-guide", "raw": "'./usage-guide'" }, "value": "./usage-guide" }, "trailingComments": [ { "type": "CommentBlock", "value": "*\n * Prints the install command user-guide\n ", "start": 41, "end": 89, "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 5, "column": 3 } } } ] }, { "type": "Identifier", "start": 90, "end": 133, "loc": { "start": { "line": 6, "column": 0 }, "end": { "line": 6, "column": 43 } }, "declarations": [ { "type": "VariableDeclarator", "start": 96, "end": 132, "loc": { "start": { "line": 6, "column": 6 }, "end": { "line": 6, "column": 42 } }, "id": { "type": "Identifier", "start": 96, "end": 100, "loc": { "start": { "line": 6, "column": 6 }, "end": { "line": 6, "column": 10 }, "identifierName": "help" }, "name": "help", "leadingComments": null }, "init": { "type": "ArrowFunctionExpression", "start": 103, "end": 132, "loc": { "start": { "line": 6, "column": 13 }, "end": { "line": 6, "column": 42 } }, "id": null, "generator": false, "expression": true, "async": false, "params": [], "body": { "type": "CallExpression", "start": 109, "end": 132, "loc": { "start": { "line": 6, "column": 19 }, "end": { "line": 6, "column": 42 } }, "callee": { "type": "MemberExpression", "start": 109, "end": 120, "loc": { "start": { "line": 6, "column": 19 }, "end": { "line": 6, "column": 30 } }, "object": { "type": "Identifier", "start": 109, "end": 116, "loc": { "start": { "line": 6, "column": 19 }, "end": { "line": 6, "column": 26 }, "identifierName": "console" }, "name": "console" }, "property": { "type": "Identifier", "start": 117, "end": 120, "loc": { "start": { "line": 6, "column": 27 }, "end": { "line": 6, "column": 30 }, "identifierName": "log" }, "name": "log" }, "computed": false }, "arguments": [ { "type": "Identifier", "start": 121, "end": 131, "loc": { "start": { "line": 6, "column": 31 }, "end": { "line": 6, "column": 41 }, "identifierName": "usageGuide" }, "name": "usageGuide" } ] } }, "leadingComments": null } ], "kind": "const", "leadingComments": [], "name": "_", "trailingComments": [] }, { "type": "Identifier", "start": 135, "end": 155, "loc": { "start": { "line": 8, "column": 0 }, "end": { "line": 8, "column": 20 } }, "declaration": { "type": "Identifier", "start": 150, "end": 154, "loc": { "start": { "line": 8, "column": 15 }, "end": { "line": 8, "column": 19 }, "identifierName": "help" }, "name": "help" }, "name": "_", "leadingComments": [], "trailingComments": [] }, { "type": "ExportDefaultDeclaration", "start": 135, "end": 155, "loc": { "start": { "line": 8, "column": 0 }, "end": { "line": 8, "column": 20 } }, "declaration": { "type": "VariableDeclaration", "start": 90, "end": 133, "loc": { "start": { "line": 6, "column": 0 }, "end": { "line": 6, "column": 43 } }, "declarations": [ { "type": "VariableDeclarator", "start": 96, "end": 132, "loc": { "start": { "line": 6, "column": 6 }, "end": { "line": 6, "column": 42 } }, "id": { "type": "Identifier", "start": 96, "end": 100, "loc": { "start": { "line": 6, "column": 6 }, "end": { "line": 6, "column": 10 }, "identifierName": "help" }, "name": "help", "leadingComments": null }, "init": { "type": "ArrowFunctionExpression", "start": 103, "end": 132, "loc": { "start": { "line": 6, "column": 13 }, "end": { "line": 6, "column": 42 } }, "id": { "type": "Identifier", "start": 96, "end": 100, "loc": { "start": { "line": 6, "column": 6 }, "end": { "line": 6, "column": 10 }, "identifierName": "help" }, "name": "help", "leadingComments": null }, "generator": false, "expression": true, "async": false, "params": [], "body": { "type": "CallExpression", "start": 109, "end": 132, "loc": { "start": { "line": 6, "column": 19 }, "end": { "line": 6, "column": 42 } }, "callee": { "type": "MemberExpression", "start": 109, "end": 120, "loc": { "start": { "line": 6, "column": 19 }, "end": { "line": 6, "column": 30 } }, "object": { "type": "Identifier", "start": 109, "end": 116, "loc": { "start": { "line": 6, "column": 19 }, "end": { "line": 6, "column": 26 }, "identifierName": "console" }, "name": "console" }, "property": { "type": "Identifier", "start": 117, "end": 120, "loc": { "start": { "line": 6, "column": 27 }, "end": { "line": 6, "column": 30 }, "identifierName": "log" }, "name": "log" }, "computed": false }, "arguments": [ { "type": "Identifier", "start": 121, "end": 131, "loc": { "start": { "line": 6, "column": 31 }, "end": { "line": 6, "column": 41 }, "identifierName": "usageGuide" }, "name": "usageGuide" } ] } }, "leadingComments": null } ], "kind": "const", "leadingComments": [ { "type": "CommentBlock", "value": "*\n * Prints the install command user-guide\n ", "start": 41, "end": 89, "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 5, "column": 3 } } } ], "trailingComments": [] } } ], "directives": [] }, "comments": [ { "type": "CommentBlock", "value": "*\n * Prints the install command user-guide\n ", "start": 41, "end": 89, "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 5, "column": 3 } } } ], "tokens": [ { "type": { "label": "import", "keyword": "import", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "import", "start": 0, "end": 6, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 6 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "usageGuide", "start": 7, "end": 17, "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 17 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "from", "start": 18, "end": 22, "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 22 } } }, { "type": { "label": "string", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "./usage-guide", "start": 23, "end": 38, "loc": { "start": { "line": 1, "column": 23 }, "end": { "line": 1, "column": 38 } } }, { "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": 1, "column": 38 }, "end": { "line": 1, "column": 39 } } }, { "type": "CommentBlock", "value": "*\n * Prints the install command user-guide\n ", "start": 41, "end": 89, "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 5, "column": 3 } } }, { "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": 90, "end": 95, "loc": { "start": { "line": 6, "column": 0 }, "end": { "line": 6, "column": 5 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "help", "start": 96, "end": 100, "loc": { "start": { "line": 6, "column": 6 }, "end": { "line": 6, "column": 10 } } }, { "type": { "label": "=", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": true, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "=", "start": 101, "end": 102, "loc": { "start": { "line": 6, "column": 11 }, "end": { "line": 6, "column": 12 } } }, { "type": { "label": "(", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 103, "end": 104, "loc": { "start": { "line": 6, "column": 13 }, "end": { "line": 6, "column": 14 } } }, { "type": { "label": ")", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 104, "end": 105, "loc": { "start": { "line": 6, "column": 14 }, "end": { "line": 6, "column": 15 } } }, { "type": { "label": "=>", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 106, "end": 108, "loc": { "start": { "line": 6, "column": 16 }, "end": { "line": 6, "column": 18 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "console", "start": 109, "end": 116, "loc": { "start": { "line": 6, "column": 19 }, "end": { "line": 6, "column": 26 } } }, { "type": { "label": ".", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 116, "end": 117, "loc": { "start": { "line": 6, "column": 26 }, "end": { "line": 6, "column": 27 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "log", "start": 117, "end": 120, "loc": { "start": { "line": 6, "column": 27 }, "end": { "line": 6, "column": 30 } } }, { "type": { "label": "(", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 120, "end": 121, "loc": { "start": { "line": 6, "column": 30 }, "end": { "line": 6, "column": 31 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "usageGuide", "start": 121, "end": 131, "loc": { "start": { "line": 6, "column": 31 }, "end": { "line": 6, "column": 41 } } }, { "type": { "label": ")", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 131, "end": 132, "loc": { "start": { "line": 6, "column": 41 }, "end": { "line": 6, "column": 42 } } }, { "type": { "label": ";", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 132, "end": 133, "loc": { "start": { "line": 6, "column": 42 }, "end": { "line": 6, "column": 43 } } }, { "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": 135, "end": 141, "loc": { "start": { "line": 8, "column": 0 }, "end": { "line": 8, "column": 6 } } }, { "type": { "label": "default", "keyword": "default", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "default", "start": 142, "end": 149, "loc": { "start": { "line": 8, "column": 7 }, "end": { "line": 8, "column": 14 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "help", "start": 150, "end": 154, "loc": { "start": { "line": 8, "column": 15 }, "end": { "line": 8, "column": 19 } } }, { "type": { "label": ";", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 154, "end": 155, "loc": { "start": { "line": 8, "column": 19 }, "end": { "line": 8, "column": 20 } } }, { "type": { "label": "eof", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 156, "end": 156, "loc": { "start": { "line": 9, "column": 0 }, "end": { "line": 9, "column": 0 } } } ] }